PageSourceSearch

https://netmon.com/demo/static/js/9521.09e0e7e8.chunk.js

js netmon.com collected 2026-10-06 20:38:05 UTC 10,037 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunknetmon=self.webpackChunknetmon||[]).push([[9521,1676],{59521:(e,t,s)=>{s.r(t),s.d(t,{default:()=>j});var a=s(65043),i=s(8502),l=s(1185),r=s(45543),n=s(33949),o=s(44844),c=s(17150),d=s(28096),u=s(71676),h=s(70579),x=function(e){return e[e.File=0]="File",e[e.Directory=1]="Directory",e}(x||{});const m=["\\Windows","\\Program Files","\\Program Files (x86)","\\Windows\\System32","\\Windows\\SxS","\\Windows\\SYSWOW64","\\ProgramData","\\Users\\All Users","\\Users\\Default","\\Users\\Public","\\System Volume Information","\\Recovery","\\Boot","\\Documents and Settings","\\Windows\\WinSxS","\\Windows\\assembly","\\Windows\\Microsoft.NET"],y=e=>{for(const t of m){if(new RegExp("".concat(t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"$"),"i").test(e))return!0}return!1},p=e=>{const t=1024,s=1048576,a=1073741824,i=1099511627776;if(e>=i){return"".concat((e/i).toFixed(2)," TB")}if(e>=a){return"".concat((e/a).toFixed(2)," GB")}if(e>=s){return"".concat((e/s).toFixed(2)," MB")}if(e>=t){return"".concat((e/t).toFixed(2)," KB")}return"".concat(e," bytes")};function g(e){const[t,s]=(0,a.useState)(!0),[r,o]=(0,a.useState)(!1),c=(e.Size/e.TotalSize*100).toFixed(0),d=y(e.Path),u=(0,a.useCallback)(((t,s)=>t.concat(s).sort(((e,t)=>t.Size-e.Size)).map(((t,s)=>(0,h.jsx)(g,{Name:t.Name,Type:t.Type,Path:t.Path,Size:t.Size,TotalSize:t.TotalSize,SubFolders:t.SubFolders,Files:t.Files,Expandable:"Directory"===t.Type,ShowPercentage:!0,RootSize:e.RootSize,Depth:e.Depth+1,IsRoot:!1,FetchFolder:e.FetchFolder,TryDelete:e.TryDelete},s)))),[e]);return(0,h.jsxs)(i.A,{className:e.Expandable?"directory-card":"directory-card file",children:[(0,h.jsx)(i.A.Header,{className:"directory-card-header",onClick:()=>e.Expandable&&s(!t),children:(0,h.jsx)("table",{style:{width:"100%"},children:(0,h.jsx)("tbody",{children:(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{style:{width:"5%"},children:"Directory"===e.Type?t?e.SubFolders&&e.SubFolders.length>0||e.Files&&e.Files.length>0?(0,h.jsx)("i",{className:"fa fa-folder-plus"}):(0,h.jsx)("i",{className:"fa fa-folder"}):(0,h.jsx)("i",{className:"fa fa-folder-open"}):(0,h.jsx)("i",{className:"fa fa-file"})}),(0,h.jsx)("td",{style:{width:e.IsRoot?"15%":"50%"},children:e.Name}),e.IsRoot?(0,h.jsx)("td",{children:(0,h.jsxs)("div",{style:{height:"25px",width:"80%",background:"#80808085",borderRadius:"0.5em",border:"1px solid rgb(48, 55, 72)"},children:[(0,h.jsx)("div",{style:{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%,-50%)"},children:"".concat(p(e.Size)," / ").concat(p(e.TotalSize),"  (").concat((e.Size/e.TotalSize*100).toFixed(0),"%)")}),(0,h.jsx)("div",{style:{height:"100%",width:"".concat(c,"%"),borderRadius:"0.5em 0 0 0.5em",background:parseInt(c)<90?parseInt(c)<70?"#40d179ba":"#D1B636ba":"#D1362Cba"}})]})}):(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("td",{style:{width:"30%"},children:p(e.Size)}),(0,h.jsx)("td",{style:{width:"15%"},children:e.ShowPercentage?"".concat((e.Size/e.RootSize*100).toFixed(1),"%"):""}),(0,h.jsx)("td",{children:(0,h.jsx)("i",{className:d?"fa fa-trash-can disabled-icon":"fa fa-tras
1h-can widget-delete-icon",onClick:t=>{t.stopPropagation(),d||("Directory"===e.Type?e.TryDelete(e.Path,x.Directory):e.TryDelete(e.Path,x.File))}})})]})]})})})}),(0,h.jsx)(l.A,{in:!t,children:(0,h.jsx)("div",{id:"basic-collapse",style:{backgroundColor:"#2a2e38"},children:(0,h.jsx)("div",{style:{minHeight:"50px",backgroundColor:"#2a2e38",paddingBottom:"5px"},children:!t&&(e.SubFolders&&e.SubFolders.length>0||e.Files&&e.Files.length>0?u(e.SubFolders,e.Files):r?(0,h.jsxs)("div",{className:"d-flex justify-content-center mt-1",children:[(0,h.jsx)("div",{className:"spinner-border text-primary",role:"status"}),"                "]}):(0,h.jsx)("div",{className:"d-flex justify-content-center mt-1",children:(0,h.jsx)(n.A,{onClick:()=>{o(!0),e.FetchFolder(e.Path)},ButtonText:"Fetch"})}))})})})]})}function f(e){var t;const[s,l]=(0,a.useState)(null),[n,m]=(0,a.useState)(null),y=null===(t=e.device)||void 0===t?void 0:t.id,[p,f]=(0,o.A)((async()=>{if((0,c.hX)(n))return!1;try{const e=await r.Ay.post((null===n||void 0===n?void 0:n.Type)===x.Directory?"/tryDeleteFolder":"/tryDeleteFile",{deviceid:y,path:null===n||void 0===n?void 0:n.Path});if(201===e.data.status)return await j(),!0;throw new Error(e.data.status.toString())}catch(t){var e;t&&401===(null===(e=t.response)||void 0===e?void 0:e.status)?d.oR.error("Agent Admin permission required to delete."):console.error(t)}return!1}));(0,a.useEffect)((()=>(j(),()=>{l(null),m(null)})),[y]);const j=async()=>{try{const e=await r.Ay.post("/getDetailedDiskUsage",{deviceid:y});201===e.data.status&&l(e.data.message)}catch(e){console.error(e)}},b=async(e,t)=>{m({Path:e,Type:t}),await f(),m(null)},v=async e=>{try{201===(await r.Ay.post("/getFolderUsageFromPath",{deviceid:y,path:e})).data.status&&j()}catch(t){console.error(t)}};return(0,h.jsxs)(i.A,{className:"widget-card",children:[(0,h.jsxs)(i.A.Header,{className:"widget-header",style:{display:"flex",alignItems:"center",justifyContent:"center"},children:[(0,h.jsx)("h6",{className:"widget-header-text",children:"Detailed Disk Usage"}),(0,h.jsx)("i",{style:{position:"absolute",right:"20px",top:"50%",transform:"translateY(-50%)",cursor:"pointer"},className:"fa fa-arrows-rotate widget-interactable-icon",onClick:async()=>{try{201===(await r.Ay.post("/generateDiskUsage",{deviceid:y})).data.status&&d.oR.info("Disk usage generation in progress. This may take some time.",{position:"top-right",autoClose:3e3})}catch(e){console.error(e)}}})]}),(0,h.jsx)(p,{context:null===n||void 0===n?void 0:n.Path,title:"Are you sure you want to delete?",successTitle:"Successfully deleted",failureTitle:"Failed to delete"}),(0,h.jsx)(i.A.Body,{className:"widget-card-body",style:{overflowX:"hidden",position:"relative"},children:s&&s.length>0?s.map(((e,t)=>(0,h.jsx)(g,{FetchFolder:v,Name:e.Name,Path:e.Path,IsRoot:!0,Type:e.Type,Size:e.Size,TotalSize:e.TotalSize,SubFolders:e.SubFolders,Files:e.Files,Expandable:!0,ShowPercentage:!1,RootSize:e.Size,TryDelete:b,Depth:0},t))):(0,h.jsx)(u.default,{style:{},className:"standin",device:e.device,loading:e.loading,noHeader:!0})})]})}const j=a.memo(f)},71676:(e,t,s)=>{s.r(t),s.d(t,{default:()=>c});var a=s(65043),i=s(8502),l=s(6058),r=s(95274),n=s(70579);const o=e=>{let{style:t,className:s,device:o,loading:c,noHeader:d=!1}=e;const{graphData:u,labels:h,colors:x,myBox:m}=a.useMemo((()=>{var e;let t=[],s=[],a=[];const i={height:"150px"};if(null!==o&&void 0!==o&&null!==(e=o.disks)&&void 0!==e&&e.length){i.height="".concat(100+20*o.disks.length,"px"),o.disks.filter((e=>e.name&&"tmpfs"!==e.name)).forEach((e=>{if(e.available&&parseInt(e.available)>-1&&e.total&&parseInt(e.total)>-1){let i=parseInt(e.total),l=parseInt(e.available),r=parseInt((i-l)/i*100);t.push(r),s.push(e.name.includes("\\\\?\\")?"No Label":e.name),a.push(parseInt(r)<90?parseInt(r)<70?"#40d179ba":"#D1B636ba":"#D1362Cba")}}))}return{graphData:t,labels:s,colors:a,myBox:i}}),[o]);return d?(0,n.jsx)("div",{style:m,children:u.length>0?(0,n.jsx)(l.yP,{data:{labels:h,datasets:[{axis:"y",data:u,backgroundColor:x,categoryPercentage:1,barThickness:20}]},height:150,options:{animation:!1,scales:{y:{ticks:{color:"#d3d3d3"}},x:{ticks:{color:"#d3d3d3"}}}
1,indexAxis:"y",maintainAspectRatio:!1,plugins:{legend:{display:!1}}}}):(0,n.jsx)("h6",{style:{textAlign:"center"},children:"No Disk Data"})}):(0,n.jsxs)(i.A,{style:{...t},className:"widget-card ".concat(s),children:[(0,n.jsxs)(i.A.Header,{className:"widget-header",children:[(0,n.jsx)("div",{className:"widget-header-left",children:(0,n.jsx)("i",{className:"fa-solid fa-hdd"})}),(0,n.jsx)("div",{className:"widget-header-center",children:"Volume Utilization"}),(0,n.jsx)("div",{className:"widget-header-right"})]}),(0,n.jsx)(i.A.Body,{className:"widget-card-body",children:(0,n.jsx)(r.A,{enabled:c,children:(0,n.jsx)("div",{style:m,children:u.length>0?(0,n.jsx)(l.yP,{data:{labels:h,datasets:[{axis:"y",data:u,backgroundColor:x,categoryPercentage:1,barThickness:20}]},height:150,options:{animation:!1,scales:{y:{ticks:{color:"#d3d3d3"}},x:{ticks:{color:"#d3d3d3"}}},indexAxis:"y",maintainAspectRatio:!1,plugins:{legend:{display:!1}}}}):(0,n.jsx)("h6",{style:{textAlign:"center"},children:"No Disk Data"})})})})]})},c=a.memo(o)},44844:(e,t,s)=>{s.d(t,{A:()=>o});var a=s(65043),i=s(33949),l=s(17150),r=s(70579);const n=e=>{let{open:t,confirmStatus:s,onConfirm:a,onCancel:l,onClose:n,title:o,successTitle:c,failureTitle:d,context:u}=e;if(!t)return null;const h="success"===s?c:"failure"===s?d:o;return(0,r.jsx)("div",{className:"confirm-block",children:(0,r.jsx)("div",{className:"confirm-banner",children:"pending"===s?(0,r.jsx)("div",{className:"spinner-border text-primary",role:"status",style:{width:"3rem",height:"3rem"}}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"success"===s?"confirm-prompt success":"confirm-prompt",children:[(0,r.jsx)("div",{className:"confirm-title",children:h}),(0,r.jsx)("div",{className:"confirm-context",children:u})]}),(0,r.jsx)("div",{className:"confirm-button-container",children:"success"===s||"failure"===s?(0,r.jsx)(i.A,{ButtonText:"Close",onClick:n}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.A,{ButtonText:"Confirm",onClick:a}),(0,r.jsx)(i.A,{ButtonText:"Cancel",onClick:l})]})})]})})})},o=e=>{const[t,s]=(0,a.useState)(null),[i,o]=(0,a.useState)(),c=(0,a.useCallback)((()=>new Promise((e=>{s({resolve:e})}))),[]),d=(0,a.useCallback)((()=>{s(null),o(null)}),[]),u=(0,a.useRef)(e);u.current=e;const h=(0,a.useRef)(t);h.current=t;const x=(0,a.useCallback)((async()=>{if((0,l.hX)(u.current)){var e;null===(e=h.current)||void 0===e||e.resolve(!0),d()}else{o("pending");const e=await u.current();o(e?"success":"failure")}}),[d]),m=(0,a.useCallback)((()=>{var e;null===(e=h.current)||void 0===e||e.resolve(!1),d()}),[d]),y=(0,a.useRef)({});y.current={open:null!==t,confirmStatus:i,onConfirm:x,onCancel:m,onClose:d};return[(0,a.useCallback)((e=>(0,r.jsx)(n,{...e,...y.current})),[]),c]}}}]);
2//# sourceMappingURL=9521.09e0e7e8.chunk.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.