github.com/minio/console@v1.4.1/web-app/build/static/js/9340.acfd036d.chunk.js (about) 1 "use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[9340],{71102:(e,t,n)=>{n.d(t,{A:()=>o});var i=n(65043),a=n(89923),l=n(70579);const o=e=>{let{timeStart:t,setTimeStart:n,timeEnd:o,setTimeEnd:s,triggerSync:r,label:d="Filter:",startLabel:c="Start Time:",endLabel:x="End Time:"}=e;return(0,l.jsx)(a.xA9,{item:!0,xs:12,sx:{"& .filter-date-input-label, .end-time-input-label":{display:"none"},"& .MuiInputBase-adornedEnd.filter-date-date-time-input":{width:"100%",border:"1px solid #eaeaea",paddingLeft:"8px",paddingRight:"8px",borderRadius:"1px"},"& .MuiInputAdornment-root button":{height:"20px",width:"20px",marginRight:"5px"},"& .filter-date-input-wrapper":{height:"30px",width:"100%","& .MuiTextField-root":{height:"30px",width:"90%","& input.Mui-disabled":{color:"#000000",WebkitTextFillColor:"#101010"}}}},children:(0,l.jsxs)(a.azJ,{sx:{display:"grid",height:40,alignItems:"center",gridTemplateColumns:"auto 2fr auto",padding:0,["@media (max-width: ".concat(a.nmC.sm,"px)")]:{padding:5},["@media (max-width: ".concat(a.nmC.md,"px)")]:{gridTemplateColumns:"1fr",height:"auto"},gap:"5px"},children:[(0,l.jsx)(a.azJ,{sx:{fontSize:"14px",fontWeight:500,marginRight:"5px"},className:"muted",children:d}),(0,l.jsxs)(a.azJ,{customBorderPadding:"0px",sx:{display:"grid",height:40,alignItems:"center",gridTemplateColumns:"1fr 1fr",gap:"8px",paddingLeft:"8px",paddingRight:"8px",["@media (max-width: ".concat(a.nmC.md,"px)")]:{height:"auto",gridTemplateColumns:"1fr"}},children:[(0,l.jsx)(a.e8j,{value:t,onChange:n,id:"stTime",secondsSelector:!1,pickerStartComponent:(0,l.jsxs)(i.Fragment,{children:[(0,l.jsx)(a.b1c,{}),(0,l.jsx)("span",{children:c})]})}),(0,l.jsx)(a.e8j,{value:o,onChange:s,id:"endTime",secondsSelector:!1,pickerStartComponent:(0,l.jsxs)(i.Fragment,{children:[(0,l.jsx)(a.b1c,{}),(0,l.jsx)("span",{children:x})]})})]}),r&&(0,l.jsx)(a.azJ,{sx:{alignItems:"flex-end",display:"flex",justifyContent:"flex-end"},children:(0,l.jsx)(a.$nd,{id:"sync",type:"button",variant:"callAction",onClick:r,icon:(0,l.jsx)(a.Fjq,{}),label:"Sync"})})]})})}},95109:(e,t,n)=>{n.d(t,{A:()=>d});n(65043);var i=n(94574),a=n(33097),l=n.n(a),o=n(89923),s=n(70579);const r=i.Ay.div((e=>{let{theme:t}=e;return{fontFamily:"Inter,sans-serif",maxWidth:"321px",display:"flex",marginLeft:"auto",marginRight:"auto",cursor:"default",color:l()(t,"signalColors.main","#07193E"),"& .mainBox":{flex:1,display:"flex",padding:"0 8px 0 8px",["@media (max-width: ".concat(o.nmC.sm,"px)")]:{padding:"0 10px 0 10px"},"& .indicatorIcon":{width:"20px",height:"20px",marginTop:"8px",maxWidth:"26px","& .min-icon":{width:"16px",height:"16px"}},"& .indicatorContainer":{flex:1,display:"flex",flexFlow:"column","& .indicatorLabel":{fontSize:"16px",fontWeight:600},"& .counterIndicator":{display:"flex",alignItems:"center",gap:"5px",justifyContent:"space-between",paddingBottom:0,fontSize:"55px",["@media (max-width: ".concat(o.nmC.sm,"px)")]:{paddingBottom:10,fontSize:"35px"},["@media (max-width: ".concat(o.nmC.lg,"px)")]:{fontSize:"45px"},["@media (max-width: ".concat(o.nmC.xl,"px)")]:{fontSize:"50px"},flexFlow:"row",fontWeight:600,"& .stat-text":{color:l()(t,"mutedText","#87888D"),fontSize:"12px",marginTop:"8px"},"& .stat-value":{textAlign:"center",height:"50px"},"& .min-icon":{marginRight:"8px",marginTop:"8px",height:"10px",width:"10px"}},"& .onlineCounter":{display:"flex",alignItems:"center",marginTop:"5px","& .min-icon":{fill:l()(t,"signalColors.good","#4CCB92")}},"& .offlineCount":{display:"flex",alignItems:"center",marginTop:"8px","& .min-icon":{fill:l()(t,"signalColors.danger","#C51B3F")}}}}}})),d=e=>{let{onlineCount:t=0,offlineCount:n=0,icon:i=null,label:a="",okStatusText:l="Online",notOkStatusText:d="Offline"}=e;return(0,s.jsx)(r,{children:(0,s.jsxs)(o.azJ,{className:"mainBox",children:[(0,s.jsxs)(o.azJ,{className:"indicatorContainer",children:[(0,s.jsx)(o.azJ,{className:"indicatorLabel",children:a}),(0,s.jsxs)(o.azJ,{className:"counterIndicator",children:[(0,s.jsxs)(o.azJ,{children:[(0,s.jsx)(o.azJ,{className:"stat-value",children:t}),(0,s.jsxs)(o.azJ,{className:"onlineCounter",children:[(0,s.jsx)(o.GQ2,{}),(0,s.jsx)("div",{className:"stat-text",children:l})]})]}),(0,s.jsxs)(o.azJ,{children:[(0,s.jsx)(o.azJ,{className:"stat-value",children:n}),(0,s.jsxs)(o.azJ,{className:"offlineCount",children:[(0,s.jsx)(o.GQ2,{})," ",(0,s.jsx)("div",{className:"stat-text",children:d})]})]})]})]}),(0,s.jsx)(o.azJ,{className:"indicatorIcon",children:i})]})})}},71435:(e,t,n)=>{n.d(t,{CS:()=>o,Ez:()=>i,WJ:()=>a,Zb:()=>l});const i={RED:"#C83B51",GREEN:"#4CCB92",YELLOW:"#FFBD62"},a=(e,t)=>e<=t/2?"bad":2!==t&&e===t/2+1?"warn":e===t?"good":void 0,l=e=>{switch(e){case"offline":return"bad";case"online":return"good";default:return"warn"}},o=(e,t)=>e<=t/2?"bad":e===t/2+1?"warn":e===t?"good":void 0},19340:(e,t,n)=>{n.r(t),n.d(t,{default:()=>ot});var i=n(65043),a=n(22166),l=n(20554),o=n(39820),s=n(46537),r=n(64159),d=n(89923),c=n(33097),x=n.n(c);let m=function(e){return e.singleValue="singleValue",e.linearGraph="linearGraph",e.areaGraph="areaGraph",e.barChart="barChart",e.pieChart="pieChart",e.singleRep="singleRep",e.simpleWidget="simpleWidget",e}({});var p=n(56483),g=n(70579);const h=["#C4D4E9","#DCD1EE","#D1EEE7","#EEDED1","#AAF38F","#F9E6C5","#C83B51","#F4CECE","#D6D6D6"],u=e=>(0,p.hr)(e,"ns"),f=e=>parseInt(e).toString(10),j=[{id:1,title:"Uptime",data:"N/A",type:m.simpleWidget,widgetIcon:(0,g.jsx)(d.Owo,{}),labelDisplayFunction:p.hr},{id:50,title:"Capacity",data:[],dataOuter:[{name:"outer",value:100}],widgetConfiguration:{outerChart:{colorList:["#9c9c9c"],innerRadius:0,outerRadius:0,startAngle:0,endAngle:0},innerChart:{colorList:h,innerRadius:20,outerRadius:50,startAngle:90,endAngle:-200}},type:m.pieChart,innerLabel:"N/A",labelDisplayFunction:p.nO},{id:51,title:"Usable Capacity",data:[],dataOuter:[{name:"outer",value:100}],widgetConfiguration:{outerChart:{colorList:["#9c9c9c"],innerRadius:0,outerRadius:0,startAngle:0,endAngle:0},innerChart:{colorList:h,innerRadius:20,outerRadius:50,startAngle:90,endAngle:-200}},type:m.pieChart,innerLabel:"N/A",labelDisplayFunction:p.nO},{id:68,title:"Data Usage Growth",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:m.areaGraph,yAxisFormatter:p.nO,xAxisFormatter:p.yz},{id:52,title:"Object size distribution",data:[],widgetConfiguration:[{dataKey:"a",color:"#2781B0",background:{fill:"#EEF1F4"},greatestColor:"#081C42"}],customStructure:[{originTag:"LESS_THAN_1024_B",displayTag:"Less than 1024B"},{originTag:"BETWEEN_1024_B_AND_1_MB",displayTag:"Between 1024B and 1MB"},{originTag:"BETWEEN_1_MB_AND_10_MB",displayTag:"Between 1MB and 10MB"},{originTag:"BETWEEN_10_MB_AND_64_MB",displayTag:"Between 10MB and 64MB"},{originTag:"BETWEEN_64_MB_AND_128_MB",displayTag:"Between 64MB and 128MB"},{originTag:"BETWEEN_128_MB_AND_512_MB",displayTag:"Between 128MB and 512MB"},{originTag:"GREATER_THAN_512_MB",displayTag:"Greater than 512MB"}],type:m.barChart},{id:66,title:"Buckets",data:[],innerLabel:"N/A",type:m.singleRep,color:"#0071BC",fillColor:"#ADD5E0"},{id:44,title:"Objects",data:[],innerLabel:"N/A",type:m.singleRep,color:"#0071BC",fillColor:"#ADD5E0"},{id:63,title:"API Data Received Rate",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000",strokeWidth:3}],type:m.linearGraph,xAxisFormatter:p.yz,yAxisFormatter:p.nO},{id:61,title:"Total Open FDs",data:[],innerLabel:"N/A",type:m.singleRep,color:"#22B573",fillColor:"#A6E8C4"},{id:62,title:"Total Goroutines",data:[],innerLabel:"N/A",type:m.singleRep,color:"#F7655E",fillColor:"#F4CECE"},{id:77,title:"Node CPU Usage",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:m.linearGraph,yAxisFormatter:f,xAxisFormatter:p.yz},{id:60,title:"API Request Rate",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:m.linearGraph,yAxisFormatter:f,xAxisFormatter:p.yz},{id:70,title:"API Data Sent Rate",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:m.linearGraph,xAxisFormatter:p.yz,yAxisFormatter:p.nO},{id:17,title:"Internode Data Transfer",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:m.linearGraph,yAxisFormatter:p.nO,xAxisFormatter:p.yz},{id:73,title:"Node IO",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:m.linearGraph,yAxisFormatter:p.nO,xAxisFormatter:p.yz},{id:80,title:"Time Since Last Heal Activity",data:"N/A",type:m.simpleWidget,widgetIcon:(0,g.jsx)(d.Sdx,{}),labelDisplayFunction:u},{id:81,title:"Time Since Last Scan Activity",data:"N/A",type:m.simpleWidget,widgetIcon:(0,g.jsx)(d.KLX,{}),labelDisplayFunction:u},{id:71,title:"API Request Error Rate",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:m.linearGraph,xAxisFormatter:p.yz},{id:76,title:"Node Memory Usage",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:m.linearGraph,xAxisFormatter:p.yz,yAxisFormatter:p.nO},{id:74,title:"Drive Used Capacity",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:m.linearGraph,xAxisFormatter:p.yz,yAxisFormatter:p.nO},{id:82,title:"Drives Free Inodes",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:m.linearGraph,disableYAxis:!0,xAxisFormatter:p.yz},{id:11,title:"Node Syscalls",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:m.linearGraph,yAxisFormatter:f,xAxisFormatter:p.yz},{id:8,title:"Node File Descriptors",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:m.linearGraph,yAxisFormatter:f,xAxisFormatter:p.yz},{id:500,mergedPanels:[{id:53,title:"Online",data:"N/A",type:m.singleValue},{id:69,title:"Offline",data:"N/A",type:m.singleValue}],title:"Servers"},{id:501,mergedPanels:[{id:9,title:"Online",data:"N/A",type:m.singleValue},{id:78,title:"Offline",data:"N/A",type:m.singleValue}],title:"Drives"},{id:502,mergedPanels:[{id:65,title:"Upload",data:"N/A",type:m.singleValue,labelDisplayFunction:p.nO},{id:64,title:"Download",data:"N/A",type:m.singleValue,labelDisplayFunction:p.nO}],title:"Network"}],C=(e,t)=>{if(0===e.length)return["","0"];if("mean"===t){const t=e.reduce(((e,t)=>e+parseFloat(t[1])),0);return["",Math.floor(t/e.length).toString()]}{const t=e.sort(((e,t)=>e[0]-t[0]));return t[t.length-1]}},y=(e,t)=>{if(!e)return t;const n=e.type;switch(t.type){case m.singleValue:case m.simpleWidget:if("stat"===n||"singlestat"===n){let n=x()(e,"targets[0].result[0].values",[]);null===n&&(n=[]);const i=x()(e,"options.reduceOptions.calcs[0]","lastNotNull"),a=C(n,i),l=t.labelDisplayFunction?t.labelDisplayFunction(a[1]):a[1];return{...t,data:l}}break;case m.pieChart:if("gauge"===n){const n=x()(e,"options.reduceOptions.calcs[0]","lastNotNull");let i=x()(e,"targets",[]).filter((e=>null!==e));const a=i.map((e=>(e.result&&Array.isArray(e.result)?e.result:[]).map((t=>{const n=x()(t,"values",[]),i=Object.keys(t.metric),a=n.sort(((e,t)=>parseInt(e[0][1])-parseInt(t[0][1]))),l=t.metric[i[0]],o=a[a.length-1];return{name:l,value:parseInt(o[1]),legend:e.legendFormat}})))),l=i[0].result&&i[0].result.length>0?i[0].result[0].values:[],o=C(l,n),s=t.labelDisplayFunction?t.labelDisplayFunction(o[1]):o[1];return{...t,data:a,innerLabel:s}}break;case m.linearGraph:case m.areaGraph:if("graph"===n){let n=x()(e,"targets",[]);null===n&&(n=[]);const i=[],a=[];n.forEach(((e,t)=>{let n=x()(e,"result",[]);const l=e.legendFormat;null===n&&(n=[]),n.forEach((e=>{const n=((e,t)=>{const n=Object.keys(e),i=new RegExp("{{(".concat(n.join("|"),")}}"),"g");let a=t.replace(i,(t=>{const n=t.replace(/({{|}})/g,"");return e[n]}));const l=(a.match(/{{/g)||[]).length,o=(a.match(/}}/g)||[]).length;let s=a.replace(/{{(.*?)}}/g,"");return l===o&&0!==l&&0!==o&&(n.forEach((t=>{a=a.replace(t,e[t])})),s=a),s})(e.metric,l),o="key_".concat(t).concat(n);i.push({dataKey:o,keyLabel:n,lineColor:"",fillColor:""});let s=x()(e,"values",[]);null===s&&(s=[]),s.forEach((e=>{const t=a.findIndex((t=>t.name===e[0]));if(-1===t){let t={name:e[0]};t[o]=e[1],a.push(t)}else a[t][o]=e[1]}))}))}));const l=i.sort(((e,t)=>e.keyLabel<t.keyLabel?-1:e.keyLabel>t.keyLabel?1:0)).map(((e,t)=>({...e,lineColor:h[t]||(0,p.h4)(e.keyLabel),fillColor:h[t]||(0,p.h4)(e.keyLabel)}))),o=a.sort(((e,t)=>e.name-t.name));return{...t,widgetConfiguration:l,data:o}}break;case m.barChart:if("bargauge"===n){let n=x()(e,"targets[0].result",[]);null===n&&(n=[]);const i=(e,t)=>e[0]-t[0];let a=[];return a=t.customStructure?t.customStructure.map((e=>{const t=n.find((t=>t.metric.range===e.originTag)),a=x()(t,"values",[]).sort(i),l=a[a.length-1]||["","0"];return{name:e.displayTag,a:parseInt(l[1])}})):n.map((e=>{const t=Object.keys(e.metric),n=e.metric[t[0]],a=x()(e,"values",[]).sort(i),l=a[a.length-1]||["","0"];return{name:n,a:parseInt(l[1])}})),{...t,data:a}}break;case m.singleRep:if("stat"===n){let n=x()(e,"targets[0].result[0].values",[]);null===n&&(n=[]);const i=x()(e,"options.reduceOptions.calcs[0]","lastNotNull"),a=C(n,i),l=n.sort(((e,t)=>e[0]-t[0]));let o=[];1===l.length&&o.push({value:0}),l.forEach((e=>{o.push({value:parseInt(e[1])})}));const s=t.labelDisplayFunction?t.labelDisplayFunction(a[1]):a[1];return{...t,data:o,innerLabel:s}}}return t},v=e=>{const t=e.split(" "),n=()=>{let t=e;return isNaN(parseFloat(e))||(t=(0,p.dq)(parseFloat(e))),(0,g.jsx)(i.Fragment,{children:t})};return 2!==t.length?n():p.MD.includes(t[1])?(0,g.jsxs)("span",{className:"commonValue",children:[t[0],(0,g.jsx)("span",{className:"unitText",children:t[1]})]}):n()};var b=n(94574),w=n(50108),z=n(82291),S=n(52185),A=n(6026),T=n(38643),I=n(17869),F=n(86150),J=n(77403),N=n(47027);const E=e=>{let{panelItem:t}=e;const n=(0,l.jL)();return(0,g.jsx)(d.azJ,{sx:{alignItems:"right",gap:"10px","& .link-text":{color:"#2781B0",fontSize:"12px",fontWeight:600},"& .zoom-graph-icon":{backgroundColor:"transparent",border:0,padding:0,cursor:"pointer","& svg":{color:"#D0D0D0",height:16},"&:hover":{"& svg":{color:"#404143"}}}},children:(0,g.jsx)("button",{onClick:()=>{n((0,N.ZQ)(t))},className:"zoom-graph-icon",children:(0,g.jsx)(d.mSu,{})})})};var L=n(72663);const k=e=>{let{title:t,componentRef:n,data:a}=e;const[o,s]=i.useState(null),c=Boolean(o),x=(0,l.jL)(),m=()=>{if(null!==a&&a.length>0)((e,t)=>{let n=document.createElement("a");n.setAttribute("href","data:text/plain;charset=utf-8,"+t),n.setAttribute("download",e),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n)})(null!==t?(t+"_"+Date.now().toString()+".csv").replace(/\s+/g,"").trim().toLowerCase():"widgetData_"+Date.now().toString()+".csv",(e=a,[Object.keys(e[0])].concat(e).map((e=>Object.values(e).toString())).join("\n")));else{let e;e={errorMessage:"Unable to download widget data",detailedError:"Unable to download widget data - data not available"},(e=>{x((0,r.C9)(e))})(e)}var e},p=e=>{"csv"===e?m():"png"===e&&(()=>{if(null!==t){const e=(t+"_"+Date.now().toString()+".png").replace(/\s+/g,"").trim().toLowerCase();(0,L.exportComponentAsPNG)(n,{fileName:e})}else{const e="widgetData_"+Date.now().toString()+".png";(0,L.exportComponentAsPNG)(n,{fileName:e})}})()};return(0,g.jsx)(i.Fragment,{children:(0,g.jsxs)(d.azJ,{sx:{justifyItems:"center","& .download-icon":{backgroundColor:"transparent",border:0,padding:0,cursor:"pointer","& svg":{color:"#D0D0D0",height:16},"&:hover":{"& svg":{color:"#404143"}}}},children:[(0,g.jsx)("button",{className:"download-icon",onClick:e=>{s(e.currentTarget)},children:(0,g.jsx)(d.s3U,{})}),(0,g.jsx)(d.Vey,{id:"download-widget-main-menu",options:[{label:"Download as CSV",value:"csv"},{label:"Download as PNG",value:"png"}],selectedOption:"",onSelect:e=>p(e),hideTriggerAction:()=>{s(null)},open:c,anchorEl:o,anchorOrigin:"end"})]})})},W=e=>{let{active:t,payload:n,label:i,barChartConfiguration:a}=e;return t?(0,g.jsxs)(d.azJ,{sx:J.VI.customTooltip,children:[(0,g.jsx)(d.azJ,{sx:J.VI.timeStampTitle,children:i}),n&&n.map(((e,t)=>(0,g.jsxs)(d.azJ,{sx:J.VI.labelContainer,children:[(0,g.jsx)(d.azJ,{sx:J.VI.labelColor,style:{backgroundColor:a[t].color}}),(0,g.jsx)(d.azJ,{sx:{...J.VI.itemValue,"& span.valueContainer":{...J.VI.valueContainer}},children:(0,g.jsx)("span",{className:"valueContainer",children:e.value})})]},"pltiem-".concat(t,"-").concat(i))))]}):null};var B=n(20649);const R=b.Ay.div((e=>{let{theme:t}=e;return{...(0,J.yE)(t),loadingAlign:{width:"100%",paddingTop:"15px",textAlign:"center",margin:"auto"}}})),D=e=>{let{y:t,payload:n}=e;return(0,g.jsx)("text",{width:50,fontSize:"69.7%",textAnchor:"start",fill:"#333",transform:"translate(5,".concat(t,")"),fontWeight:400,dy:3,children:n.value})},M=e=>{let{title:t,panelItem:n,timeStart:o,timeEnd:s,apiPrefix:c,zoomActivated:x=!1}=e;const m=(0,l.jL)(),[p,h]=(0,i.useState)(!1),[u,f]=(0,i.useState)([]),[j,C]=(0,i.useState)(null),[v,b]=(0,i.useState)(!1),[J,N]=(0,i.useState)(window.innerWidth>=d.nmC.md),L=(0,i.useRef)(),M=(0,a.d4)((e=>e.dashboard.widgetLoadVersion));(0,i.useEffect)((()=>{h(!0)}),[M]),(0,i.useEffect)((()=>{const e=()=>{let e=!1;window.innerWidth>=d.nmC.md&&(e=!0),N(e)};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]),(0,i.useEffect)((()=>{if(p){let e=0;if(null!==o&&null!==s){const t=s.toUnixInteger()-o.toUnixInteger(),n=Math.floor(t/60);e=n<1?15:n}B.A.invoke("GET","/api/v1/".concat(c,"/info/widgets/").concat(n.id,"/?step=").concat(e,"&").concat(null!==o?"&start=".concat(o.toUnixInteger()):"").concat(null!==o&&null!==s?"&":"").concat(null!==s?"end=".concat(s.toUnixInteger()):"")).then((e=>{const t=y(e,n);f(t.data),C(t),h(!1)})).catch((e=>{m((0,r.C9)(e)),h(!1)}))}}),[p,n,s,o,m,c]);const O=j?j.widgetConfiguration:[];let U=0,V=0;if(1===O.length){const e=O[0];u.forEach(((t,n)=>{t[e.dataKey]>V&&(V=t[e.dataKey],U=n)}))}return(0,g.jsx)(R,{children:(0,g.jsxs)(d.azJ,{className:x?"":"singleValueContainer",onMouseOver:()=>{b(!0)},onMouseLeave:()=>{b(!1)},children:[!x&&(0,g.jsxs)(d.xA9,{container:!0,children:[(0,g.jsx)(d.xA9,{item:!0,xs:10,sx:{alignItems:"start",justifyItems:"start"},children:(0,g.jsx)("div",{className:"titleContainer",children:t})}),(0,g.jsx)(d.xA9,{item:!0,xs:1,sx:{display:"flex",justifyContent:"flex-end"},children:v&&(0,g.jsx)(E,{panelItem:n})}),(0,g.jsx)(d.xA9,{item:!0,xs:1,sx:{display:"flex",justifyContent:"flex-end"},children:(0,g.jsx)(k,{title:t,componentRef:L,data:u})})]}),p&&(0,g.jsx)(d.azJ,{className:"loadingAlign",children:(0,g.jsx)(d.aHM,{})}),!p&&(0,g.jsx)("div",{ref:L,className:x?"zoomChartCont":"contentContainer",children:(0,g.jsx)(w.u,{width:"99%",children:(0,g.jsxs)(z.E,{data:u,layout:"vertical",barCategoryGap:1,children:[(0,g.jsx)(S.W,{type:"number",hide:!0}),(0,g.jsx)(A.h,{dataKey:"name",type:"category",interval:0,tick:(0,g.jsx)(D,{}),tickLine:!1,axisLine:!1,width:150,hide:!J,style:{fontSize:"12px",fontWeight:100}}),O.map((e=>(0,g.jsx)(T.y,{dataKey:e.dataKey,fill:e.color,background:e.background,barSize:x?25:12,children:1===O.length?(0,g.jsx)(i.Fragment,{children:u.map(((t,n)=>(0,g.jsx)(I.f,{fill:n===U?e.greatestColor:e.color},"chart-bar-".concat(n.toString()))))}):null},"bar-".concat(e.dataKey)))),(0,g.jsx)(F.m,{cursor:{fill:"rgba(255, 255, 255, 0.3)"},content:(0,g.jsx)(W,{barChartConfiguration:O})})]})})})]})})};var O=n(877),U=n(87734),V=n(13839);const G=e=>{let{active:t,payload:n,label:i,linearConfiguration:a,yAxisFormatter:l}=e;return t?(0,g.jsxs)(d.azJ,{sx:J.VI.customTooltip,children:[(0,g.jsx)(d.azJ,{sx:J.VI.timeStampTitle,children:(0,p.yz)(i,!0)}),n&&n.map(((e,t)=>(0,g.jsxs)(d.azJ,{sx:J.VI.labelContainer,children:[(0,g.jsx)(d.azJ,{sx:J.VI.labelColor,style:{backgroundColor:a[t].lineColor}}),(0,g.jsx)(d.azJ,{sx:{...J.VI.itemValue,"& span.valueContainer":{...J.VI.valueContainer}},children:(0,g.jsxs)("span",{className:"valueContainer",children:[a[t].keyLabel,":"," ",l(e.value)]})})]},"lbPl-".concat(t,"-").concat(a[t].keyLabel))))]}):null},P=b.Ay.div((e=>{let{theme:t}=e;return{...(0,J.yE)(t),"& .chartCont":{position:"relative",height:140,width:"100%"},"& .legendChart":{display:"flex",flexDirection:"column",flex:"0 1 auto",maxHeight:130,margin:0,overflowY:"auto",position:"relative",textAlign:"center",width:"100%",justifyContent:"flex-start",color:x()(t,"mutedText","#87888d"),fontWeight:"bold",fontSize:12,["@media (max-width: ".concat(d.nmC.md,"px)")]:{display:"none"}},"& .loadingAlign":{width:40,height:40,textAlign:"center",margin:"15px auto"}}})),_=e=>{let{title:t,timeStart:n,timeEnd:o,panelItem:s,apiPrefix:c,hideYAxis:x=!1,areaWidget:m=!1,yAxisFormatter:p=(e=>e),xAxisFormatter:h=((e,t,n)=>e),zoomActivated:u=!1}=e;const f=(0,l.jL)(),[j,C]=(0,i.useState)(!1),[v,b]=(0,i.useState)(!1),[z,T]=(0,i.useState)([]),[I,J]=(0,i.useState)([]),[N,L]=(0,i.useState)(0),[W,R]=(0,i.useState)(null),D=(0,a.d4)((e=>e.dashboard.widgetLoadVersion)),M=(0,i.useRef)(null);(0,i.useEffect)((()=>{C(!0)}),[D]),(0,i.useEffect)((()=>{if(j){let e=0;if(null!==n&&null!==o){const t=o.toUnixInteger()-n.toUnixInteger(),i=Math.floor(t/60);e=i<1?15:i}B.A.invoke("GET","/api/v1/".concat(c,"/info/widgets/").concat(s.id,"/?step=").concat(e,"&").concat(null!==n?"&start=".concat(n.toUnixInteger()):"").concat(null!==n&&null!==o?"&":"").concat(null!==o?"end=".concat(o.toUnixInteger()):"")).then((e=>{const t=y(e,s);T(t.data),R(t),C(!1);let n=0;for(const i of t.data)for(const e in i){if("name"===e)continue;let t=parseInt(i[e]);isNaN(t)&&(t=0),n<t&&(n=t)}L(n)})).catch((e=>{f((0,r.C9)(e)),C(!1)}))}}),[j,s,o,n,f,c]);let _=Math.floor(z.length/5);(0,i.useEffect)((()=>{const e=z.map((e=>{const t=new Date(1e3*(null===e||void 0===e?void 0:e.name));return{...e,name:t}}));J(e)}),[z]);const K=W?null===W||void 0===W?void 0:W.widgetConfiguration:[],H=e=>{const{cx:t,cy:n,index:i}=e;return i%3!==0?null:(0,g.jsx)("circle",{cx:t,cy:n,r:3,strokeWidth:0,fill:"#07264A"})};let Q=!1;return u&&(Q=!0),(0,g.jsx)(P,{children:(0,g.jsxs)(d.azJ,{className:u?"":"singleValueContainer",onMouseOver:()=>{b(!0)},onMouseLeave:()=>{b(!1)},children:[!u&&(0,g.jsxs)(d.xA9,{container:!0,children:[(0,g.jsx)(d.xA9,{item:!0,xs:10,sx:{alignItems:"start"},children:(0,g.jsx)(d.azJ,{className:"titleContainer",children:t})}),(0,g.jsx)(d.xA9,{item:!0,xs:1,sx:{display:"flex",justifyContent:"flex-end",alignContent:"flex-end"},children:v&&(0,g.jsx)(E,{panelItem:s})}),(0,g.jsx)(d.xA9,{item:!0,xs:1,sx:{display:"flex",justifyContent:"flex-end"},children:null!==M&&(0,g.jsx)(k,{title:t,componentRef:M,data:I})})]}),(0,g.jsx)("div",{ref:M,children:(0,g.jsxs)(d.azJ,{sx:u?{flexDirection:"column"}:{height:"100%",display:"grid",gridTemplateColumns:"1fr 1fr",["@media (max-width: ".concat(d.nmC.md,"px)")]:{gridTemplateColumns:"1fr"}},style:m?{gridTemplateColumns:"1fr"}:{},children:[j&&(0,g.jsx)(d.aHM,{className:"loadingAlign"}),!j&&(0,g.jsxs)(i.Fragment,{children:[(0,g.jsx)(d.azJ,{className:u?"zoomChartCont":"chartCont",children:(0,g.jsx)(w.u,{width:"99%",children:(0,g.jsxs)(O.Q,{data:z,margin:{top:5,right:20,left:x?20:5,bottom:0},children:[m&&(0,g.jsx)("defs",{children:(0,g.jsxs)("linearGradient",{id:"colorUv",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,g.jsx)("stop",{offset:"0%",stopColor:"#2781B0",stopOpacity:1}),(0,g.jsx)("stop",{offset:"100%",stopColor:"#ffffff",stopOpacity:0}),(0,g.jsx)("stop",{offset:"95%",stopColor:"#ffffff",stopOpacity:.8})]})}),(0,g.jsx)(U.d,{strokeDasharray:m?"2 2":"5 5",strokeWidth:1,strokeOpacity:1,stroke:"#eee0e0",vertical:!m}),(0,g.jsx)(S.W,{dataKey:"name",tickFormatter:e=>h(e,Q,!0),interval:_,tick:{fontSize:"68%",fontWeight:"normal",color:"#404143"},tickCount:10,stroke:"#082045"}),(0,g.jsx)(A.h,{type:"number",domain:[0,1.1*N],hide:x,tickFormatter:e=>p(e),tick:{fontSize:"68%",fontWeight:"normal",color:"#404143"},stroke:"#082045"}),K.map(((e,t)=>(0,g.jsx)(V.G,{type:"monotone",dataKey:e.dataKey,isAnimationActive:!1,stroke:m?"#D7E5F8":e.lineColor,fill:m?"url(#colorUv)":e.fillColor,fillOpacity:m?.65:0,strokeWidth:m?0:3,strokeLinecap:"round",dot:!!m&&(0,g.jsx)(H,{})},"area-".concat(e.dataKey,"-").concat(t.toString())))),(0,g.jsx)(F.m,{content:(0,g.jsx)(G,{linearConfiguration:K,yAxisFormatter:p}),wrapperStyle:{zIndex:5e3}})]})})}),!m&&(0,g.jsxs)(i.Fragment,{children:[u&&(0,g.jsxs)(i.Fragment,{children:[(0,g.jsx)("strong",{children:"Series"}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{})]}),(0,g.jsx)(d.azJ,{className:"legendChart",children:K.map(((e,t)=>(0,g.jsxs)(d.azJ,{className:"singleLegendContainer",children:[(0,g.jsx)(d.azJ,{className:"colorContainer",style:{backgroundColor:e.lineColor}}),(0,g.jsx)(d.azJ,{className:"legendLabel",children:e.keyLabel})]},"legend-".concat(e.keyLabel,"-").concat(t.toString()))))})]})]})]})})]})})};var K=n(60163),H=n(4240);const Q=b.Ay.div((e=>{let{theme:t}=e;return{...(0,J.yE)(t),"& .loadingAlign":{width:"100%",paddingTop:"15px",textAlign:"center",margin:"auto"},"& .pieChartLabel":{fontSize:60,color:x()(t,"signalColors.main","#07193E"),fontWeight:"bold",width:"100%","& .unitText":{color:x()(t,"mutedText","#87888d"),fontSize:12}},"& .chartContainer":{width:"100%",height:140}}})),q=e=>{let{title:t,panelItem:n,timeStart:o,timeEnd:s,apiPrefix:c}=e;const m=(0,l.jL)(),[p,h]=(0,i.useState)(!1),[u,f]=(0,i.useState)([]),[j,C]=(0,i.useState)([]),[b,z]=(0,i.useState)(null),S=(0,a.d4)((e=>e.dashboard.widgetLoadVersion));(0,i.useEffect)((()=>{h(!0)}),[S]),(0,i.useEffect)((()=>{if(p){let e=0;if(null!==o&&null!==s){const t=s.toUnixInteger()-o.toUnixInteger(),n=Math.floor(t/60);e=n<1?15:n}B.A.invoke("GET","/api/v1/".concat(c,"/info/widgets/").concat(n.id,"/?step=").concat(e,"&").concat(null!==o?"&start=".concat(o.toUnixInteger()):"").concat(null!==o&&null!==s?"&":"").concat(null!==s?"end=".concat(s.toUnixInteger()):"")).then((e=>{const t=y(e,n);f(t.data),C(t.dataOuter),z(t),h(!1)})).catch((e=>{m((0,r.C9)(e)),h(!1)}))}}),[p,n,s,o,m,c]);const A=b?b.widgetConfiguration:[],T=null===b||void 0===b?void 0:b.innerLabel,F=x()(A,"innerChart.colorList",[]),J=x()(A,"outerChart.colorList",[]);return(0,g.jsx)(Q,{children:(0,g.jsxs)(d.azJ,{className:"singleValueContainer",children:[(0,g.jsx)(d.azJ,{className:"titleContainer",children:t}),p&&(0,g.jsx)(d.azJ,{className:"loadingAlign",children:(0,g.jsx)(d.aHM,{})}),!p&&(0,g.jsxs)(d.azJ,{className:"contentContainer",children:[(0,g.jsx)("span",{className:"pieChartLabel",children:T&&v(T)}),(0,g.jsx)(d.azJ,{className:"chartContainer",children:(0,g.jsx)(w.u,{width:"99%",children:(0,g.jsxs)(K.r,{margin:{top:5,bottom:5},children:[j&&(0,g.jsx)(H.F,{data:j,cx:"50%",cy:"50%",dataKey:"value",innerRadius:x()(A,"outerChart.innerRadius",0),outerRadius:x()(A,"outerChart.outerRadius","80%"),startAngle:x()(A,"outerChart.startAngle",0),endAngle:x()(A,"outerChart.endAngle",360),fill:"#201763",children:j.map(((e,t)=>(0,g.jsx)(I.f,{fill:"undefined"===typeof J[t]?"#393939":J[t]},"cellOuter-".concat(t))))}),u&&(0,g.jsx)(H.F,{data:u,dataKey:"value",cx:"50%",cy:"50%",innerRadius:x()(A,"innerChart.innerRadius",0),outerRadius:x()(A,"innerChart.outerRadius","80%"),startAngle:x()(A,"innerChart.startAngle",0),endAngle:x()(A,"innerChart.endAngle",360),fill:"#201763",children:u.map(((e,t)=>(0,g.jsx)(I.f,{fill:"undefined"===typeof F[t]?"#393939":F[t]},"cell-".concat(t))))})]})})})]})]})})},Y=b.Ay.span((e=>{let{theme:t}=e;return{display:"inline-flex",color:x()(t,"signalColors.main","#07193E"),alignItems:"center","& .icon":{color:x()(t,"signalColors.main","#07193E"),fill:x()(t,"signalColors.main","#07193E"),marginRight:5,marginLeft:12},"& .widgetLabel":{fontWeight:"bold",textTransform:"uppercase",marginRight:10},"& .widgetValue":{marginRight:25}}})),Z=e=>{let{iconWidget:t,title:n,panelItem:o,timeStart:s,timeEnd:c,apiPrefix:x,renderFn:m}=e;const p=(0,l.jL)(),[h,u]=(0,i.useState)(!1),[f,j]=(0,i.useState)(""),C=(0,a.d4)((e=>e.dashboard.widgetLoadVersion));return(0,i.useEffect)((()=>{u(!0)}),[C]),(0,i.useEffect)((()=>{if(h){let e=0;if(null!==s&&null!==c){const t=c.toUnixInteger()-s.toUnixInteger(),n=Math.floor(t/60);e=n<1?15:n}B.A.invoke("GET","/api/v1/".concat(x,"/info/widgets/").concat(o.id,"/?step=").concat(e,"&").concat(null!==s?"&start=".concat(s.toUnixInteger()):"").concat(null!==s&&null!==c?"&":"").concat(null!==c?"end=".concat(c.toUnixInteger()):"")).then((e=>{const t=y(e,o);j(t.data),u(!1)})).catch((e=>{p((0,r.C9)(e)),u(!1)}))}}),[h,o,c,s,p,x]),m?m({valueToRender:f,loading:h,title:n,id:o.id,iconWidget:t}):(0,g.jsxs)(i.Fragment,{children:[h&&(0,g.jsx)("div",{className:"loadingAlign",children:(0,g.jsx)(d.aHM,{})}),!h&&(0,g.jsxs)(Y,{children:[(0,g.jsx)("span",{className:"icon",children:t||null}),(0,g.jsxs)("span",{className:"widgetLabel",children:[n,": "]}),(0,g.jsx)("span",{className:"widgetValue",children:f})]})]})},X=e=>{let{children:t}=e;return(0,g.jsx)(d.azJ,{withBorders:!0,sx:{borderRadius:"3px",padding:15,height:136,maxWidth:"100%",["@media (max-width: ".concat(d.nmC.sm,"px)")]:{padding:5,height:"auto"},["@media (max-width: ".concat(d.nmC.md,"px)")]:{display:"flex",flexFlow:"column",maxWidth:"initial"}},children:t})},$=b.Ay.div((e=>{let{theme:t}=e;return{fontFamily:"Inter,sans-serif",color:x()(t,"signalColors.main","#07193E"),maxWidth:"300px",display:"flex",marginLeft:"auto",marginRight:"auto",cursor:"default",position:"relative",width:"100%"}})),ee=e=>{let{value:t,label:n="",icon:i=null,loading:a=!1}=e;return(0,g.jsx)($,{children:(0,g.jsxs)(d.azJ,{sx:{flex:1,display:"flex",width:"100%",padding:"0 8px 0 8px",["@media (max-width: ".concat(d.nmC.sm,"px)")]:{padding:"0 10px 0 10px"}},children:[(0,g.jsxs)(d.azJ,{sx:{flex:1,display:"flex",flexFlow:"column",marginTop:"12px",zIndex:10,overflow:"hidden"},children:[(0,g.jsx)(d.azJ,{sx:{fontSize:"16px",fontWeight:600},children:n}),(0,g.jsx)(d.m_M,{tooltip:t,placement:"bottom",children:(0,g.jsx)(d.azJ,{sx:{fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",maxWidth:187,flexFlow:"row",fontSize:55,["@media (max-width: ".concat(d.nmC.sm,"px)")]:{fontSize:35,maxWidth:200,flexFlow:"column"},["@media (max-width: ".concat(d.nmC.md,"px)")]:{fontSize:35},["@media (max-width: ".concat(d.nmC.lg,"px)")]:{fontSize:36},["@media (max-width: ".concat(d.nmC.xl,"px)")]:{fontSize:50}},children:t})})]}),(0,g.jsx)(d.azJ,{sx:{display:"flex",flexFlow:"column",alignItems:"center",justifyContent:"flex-start",marginTop:"8px",maxWidth:"26px","& .min-icon":{width:"16px",height:"16px"}},children:a?(0,g.jsx)(d.aHM,{style:{width:"16px",height:"16px"}}):i})]})})},te=e=>{let{title:t,value:n,loading:i}=e;return(0,g.jsx)(ee,{label:t,icon:(0,g.jsx)(d.brV,{}),value:n,loading:i})},ne=e=>{let{title:t,value:n,loading:i}=e;return(0,g.jsx)(ee,{label:t,icon:(0,g.jsx)(d.Sxe,{}),value:n,loading:i})},ie=(0,a.Ng)(null,{setErrorSnackMessage:r.C9})((e=>{let{title:t,panelItem:n,timeStart:o,timeEnd:s,propLoading:d,apiPrefix:c}=e;const x=(0,l.jL)(),[m,h]=(0,i.useState)(!1),[u,f]=(0,i.useState)(null),j=(0,a.d4)((e=>e.dashboard.widgetLoadVersion));(0,i.useEffect)((()=>{h(!0)}),[j]),(0,i.useEffect)((()=>{if(m){let e=0;if(null!==o&&null!==s){const t=s.toUnixInteger()-o.toUnixInteger(),n=Math.floor(t/60);e=n<1?15:n}B.A.invoke("GET","/api/v1/".concat(c,"/info/widgets/").concat(n.id,"/?step=").concat(e,"&").concat(null!==o?"&start=".concat(o.toUnixInteger()):"").concat(null!==o&&null!==s?"&":"").concat(null!==s?"end=".concat(s.toUnixInteger()):"")).then((e=>{const t=y(e,n);f(t),h(!1)})).catch((e=>{x((0,r.C9)(e)),h(!1)}))}}),[m,n,s,o,x,c]);let C="";if(u){const e=parseInt(u.innerLabel||"0");C=isNaN(e)?"0":(0,p.dq)(e)}return 66===(v=n.id)?(0,g.jsx)(X,{children:(0,g.jsx)(te,{loading:m,title:t,value:u?C:""})}):44===v?(0,g.jsx)(X,{children:(0,g.jsx)(ne,{loading:m,title:t,value:u?C:""})}):null;var v})),ae=b.Ay.div((e=>{let{theme:t}=e;return{display:"flex",height:140,flexDirection:"column",justifyContent:"center","& .unitText":{color:x()(t,"mutedText","#87888d"),fontSize:12},"& .loadingAlign":{width:"100%",textAlign:"center",margin:"auto"},"& .metric":{fontSize:60,lineHeight:1,color:x()(t,"signalColors.main","#07193E"),fontWeight:700},"& .titleElement":{fontSize:10,color:x()(t,"mutedText","#87888d"),fontWeight:700},...(0,J.yE)(t)}})),le=e=>{let{title:t,panelItem:n,timeStart:o,timeEnd:s,apiPrefix:c,renderFn:x}=e;const m=(0,l.jL)(),[p,h]=(0,i.useState)(!1),[u,f]=(0,i.useState)(""),j=(0,a.d4)((e=>e.dashboard.widgetLoadVersion));(0,i.useEffect)((()=>{h(!0)}),[j]),(0,i.useEffect)((()=>{if(p){let e=0;if(null!==o&&null!==s){const t=s.toUnixInteger()-o.toUnixInteger(),n=Math.floor(t/60);e=n<1?15:n}B.A.invoke("GET","/api/v1/".concat(c,"/info/widgets/").concat(n.id,"/?step=").concat(e,"&").concat(null!==o?"&start=".concat(o.toUnixInteger()):"").concat(null!==o&&null!==s?"&":"").concat(null!==s?"end=".concat(s.toUnixInteger()):"")).then((e=>{const t=y(e,n);f(t.data),h(!1)})).catch((e=>{m((0,r.C9)(e)),h(!1)}))}}),[p,n,s,o,m,c]);const C=v(u);return x?x({valueToRender:C,loading:p,title:t,id:n.id}):(0,g.jsxs)(ae,{children:[p&&(0,g.jsx)(d.azJ,{className:"loadingAlign",children:(0,g.jsx)(d.aHM,{})}),!p&&(0,g.jsxs)(i.Fragment,{children:[(0,g.jsx)(d.azJ,{className:"metric",children:v(u)}),(0,g.jsx)(d.azJ,{className:"titleElement",children:t})]})]})},oe=b.Ay.div((e=>{let{theme:t}=e;return{flex:1,display:"flex",alignItems:"center",flexFlow:"row","& .usableLabel":{color:x()(t,"mutedText","#87888d"),fontSize:"10px",display:"flex",flexFlow:"column",alignItems:"center",textAlign:"center"},"& .usedLabel":{color:x()(t,"mutedText","#87888d"),fontWeight:"bold",fontSize:"14px"},"& .totalUsed":{display:"flex","& .value":{fontSize:"50px",fontFamily:"Inter",fontWeight:600,alignSelf:"flex-end",lineHeight:1},"& .unit":{color:x()(t,"mutedText","#87888d"),fontWeight:"bold",fontSize:"14px",marginLeft:"12px",alignSelf:"flex-end"}},"& .ofUsed":{marginTop:"5px","& .value":{color:x()(t,"mutedText","#87888d"),fontWeight:"bold",fontSize:"14px",textAlign:"right"}},["@media (max-width: ".concat(d.nmC.sm,"px)")]:{flexFlow:"column"}}})),se=e=>{let{value:t,timeStart:n,timeEnd:o,apiPrefix:s}=e;const c=(0,l.jL)(),[x,m]=(0,i.useState)(!1),[h,u]=(0,i.useState)(0),[f,j]=(0,i.useState)(0),[C,v]=(0,i.useState)(0),[b,w]=(0,i.useState)(0),z=(0,a.d4)((e=>e.dashboard.widgetLoadVersion));(0,i.useEffect)((()=>{m(!0)}),[z]),(0,i.useEffect)((()=>{if(x){let e=0;if(null!==n&&null!==o){const t=o.toUnixInteger()-n.toUnixInteger(),i=Math.floor(t/60);e=i<1?15:i}B.A.invoke("GET","/api/v1/".concat(s,"/info/widgets/").concat(t.id,"/?step=").concat(e,"&").concat(null!==n?"&start=".concat(n.toUnixInteger()):"").concat(null!==n&&null!==o?"&":"").concat(null!==o?"end=".concat(o.toUnixInteger()):"")).then((e=>{const n=y(e,t);let i=0,a=0,l=0;n.data.forEach((e=>{e.forEach((e=>{switch(e.legend){case"Total Usable":i+=e.value;break;case"Used Space":a+=e.value;break;case"Usable Free":l+=e.value}}))}));const o=Math.round(l/i*100);u(l),j(o),v(a),w(i),m(!1)})).catch((e=>{c((0,r.C9)(e)),m(!1)}))}}),[x,t,o,n,c,s]);const S=(0,p.GT)(C,!0,!1),A=[{value:h,color:"#D6D6D6",label:"Usable Available Space"},{value:C,color:(0,p.zv)(C,b),label:"Used Space"}];return(0,g.jsxs)(oe,{children:[(0,g.jsx)(d.azJ,{sx:{fontSize:"16px",fontWeight:600,["@media (max-width: ".concat(d.nmC.sm,"px)")]:{alignSelf:"flex-start"}},children:"Capacity"}),(0,g.jsxs)(d.azJ,{sx:{position:"relative",width:110,height:110,marginLeft:"auto",["@media (max-width: ".concat(d.nmC.sm,"px)")]:{marginLeft:""}},children:[(0,g.jsxs)(d.azJ,{sx:{position:"absolute",display:"flex",flexFlow:"column",alignItems:"center",top:"50%",left:"50%",transform:"translate(-50%, -50%)",fontWeight:"bold",fontSize:12},children:["".concat(f,"%"),(0,g.jsx)("br",{}),(0,g.jsx)(d.azJ,{className:"usableLabel",children:"Free"})]}),(0,g.jsx)(K.r,{width:110,height:110,children:(0,g.jsx)(H.F,{data:A,cx:"50%",cy:"50%",dataKey:"value",outerRadius:50,innerRadius:40,startAngle:-70,endAngle:360,animationDuration:1,children:A.map(((e,t)=>(0,g.jsx)(I.f,{fill:e.color},"cellCapacity-".concat(t))))})})]}),(0,g.jsxs)(d.azJ,{sx:{display:"flex",alignItems:"center",marginLeft:"auto",["@media (max-width: ".concat(d.nmC.sm,"px)")]:{marginLeft:""}},children:[(0,g.jsxs)(d.azJ,{children:[(0,g.jsx)(d.azJ,{className:"usedLabel",children:"Used:"}),(0,g.jsxs)(d.azJ,{className:"totalUsed",children:[(0,g.jsx)("div",{className:"value",children:S.total}),(0,g.jsx)("div",{className:"unit",children:S.unit})]}),(0,g.jsx)(d.azJ,{className:"ofUsed",children:(0,g.jsxs)("div",{className:"value",children:["Of: ",(0,p.qO)(b)]})})]}),(0,g.jsx)(d.azJ,{sx:{marginLeft:"15px",height:"100%",display:"flex",alignItems:"flex-start"},children:(0,g.jsx)(d.azJ,{children:x?(0,g.jsx)(d.aHM,{style:{width:"26px",height:"26px"}}):(0,g.jsx)(d.wNL,{})})})]})]})},re=b.Ay.div((e=>{let{theme:t}=e;return{display:"grid",alignItems:"center",gap:8,height:33,paddingLeft:15,gridTemplateColumns:"20px 1.5fr .5fr 20px",background:x()(t,"boxBackground","#FBFAFA"),"& .min-icon":{height:"12px",width:"12px",fill:x()(t,"signalColors.good","#4CCB92")},"& .ok-icon":{height:"8px",width:"8px",fill:x()(t,"signalColors.good","#4CCB92"),color:x()(t,"signalColors.good","#4CCB92")},"& .timeStatLabel":{fontSize:"12px",color:x()(t,"signalColors.good","#4CCB92"),fontWeight:600},"& .timeStatValue":{fontSize:"12px",color:x()(t,"signalColors.good","#4CCB92")}}})),de=e=>{let{icon:t,label:n,value:i,loading:a=!1}=e;return(0,g.jsxs)(re,{className:"dashboard-time-stat-item",children:[a?(0,g.jsx)(d.aHM,{style:{width:10,height:10}}):t,(0,g.jsx)(d.azJ,{className:"timeStatLabel",children:n}),(0,g.jsx)(d.azJ,{className:"timeStatValue",children:i}),"n/a"!==i?(0,g.jsx)(d.BK0,{className:"ok-icon"}):null]})},ce=e=>{let{valueToRender:t="",loading:n=!1,iconWidget:i=null}=e;return(0,g.jsx)(d.azJ,{sx:{display:"flex",height:"47px",borderRadius:"2px","& .dashboard-time-stat-item":{height:"100%",width:"100%"}},children:(0,g.jsx)(de,{loading:n,icon:i,label:(0,g.jsxs)(d.azJ,{children:[(0,g.jsx)(d.azJ,{sx:{display:"inline",["@media (max-width: ".concat(d.nmC.sm,"px)")]:{display:"none"}},children:"Time since last"})," ","Heal Activity"]}),value:t})})},xe=e=>{let{valueToRender:t="",loading:n=!1,iconWidget:i=null}=e;return(0,g.jsx)(d.azJ,{sx:{display:"flex",height:"47px",borderRadius:"2px","& .dashboard-time-stat-item":{height:"100%",width:"100%"}},children:(0,g.jsx)(de,{loading:n,icon:i,label:(0,g.jsxs)(d.azJ,{children:[(0,g.jsx)(d.azJ,{sx:{display:"inline",["@media (max-width: ".concat(d.nmC.sm,"px)")]:{display:"none"}},children:"Time since last"})," ","Scan Activity"]}),value:t})})},me=e=>{let{valueToRender:t="",loading:n=!1,iconWidget:i=null}=e;return(0,g.jsx)(d.azJ,{sx:{display:"flex",height:47,borderRadius:2,"& .dashboard-time-stat-item":{height:"100%",width:"100%"}},children:(0,g.jsx)(de,{loading:n,icon:i,label:(0,g.jsx)(d.azJ,{children:"Uptime"}),value:t})})},pe=function(e,t,n,i,a){let l=arguments.length>5&&void 0!==arguments[5]&&arguments[5];switch(e.type){case m.singleValue:return(0,g.jsx)(le,{title:e.title,panelItem:e,timeStart:t,timeEnd:n,apiPrefix:a});case m.simpleWidget:let o,s=null;return 80===e.id?s=ce:81===e.id?s=xe:1===e.id&&(s=me),[80,81,1].includes(e.id)&&(o=e=>{let{valueToRender:t,loading:n,title:i,id:a,iconWidget:l}=e;return(0,g.jsx)(s,{valueToRender:t,loading:n,title:i,id:a,iconWidget:l})}),(0,g.jsx)(Z,{title:e.title,panelItem:e,timeStart:t,timeEnd:n,apiPrefix:a,iconWidget:e.widgetIcon,renderFn:o});case m.pieChart:return 50===e.id?(0,g.jsx)(X,{children:(0,g.jsx)(se,{value:e,timeStart:t,timeEnd:n,apiPrefix:a})}):(0,g.jsx)(q,{title:e.title,panelItem:e,timeStart:t,timeEnd:n,apiPrefix:a});case m.linearGraph:case m.areaGraph:return(0,g.jsx)(_,{title:e.title,panelItem:e,timeStart:t,timeEnd:n,hideYAxis:e.disableYAxis,xAxisFormatter:e.xAxisFormatter,yAxisFormatter:e.yAxisFormatter,apiPrefix:a,areaWidget:e.type===m.areaGraph,zoomActivated:l});case m.barChart:return(0,g.jsx)(M,{title:e.title,panelItem:e,timeStart:t,timeEnd:n,apiPrefix:a,zoomActivated:l});case m.singleRep:const r=e.fillColor?e.fillColor:e.color;return(0,g.jsx)(ie,{title:e.title,panelItem:e,timeStart:t,timeEnd:n,propLoading:i,color:e.color,fillColor:r,apiPrefix:a});default:return null}},ge=[{sx:{minWidth:0,display:"grid",gap:"30px",gridTemplateColumns:"1fr 1fr 1fr 1fr",["@media (max-width: ".concat(d.nmC.sm,"px)")]:{gridTemplateColumns:"1fr"},["@media (max-width: ".concat(d.nmC.md,"px)")]:{gridTemplateColumns:"1fr 1fr"}},columns:[{componentId:66},{componentId:44},{componentId:500},{componentId:501}]},{sx:{display:"grid",minWidth:0,gap:"30px",gridTemplateColumns:"1fr 1fr",["@media (max-width: ".concat(d.nmC.md,"px)")]:{gridTemplateColumns:"1fr"}},columns:[{componentId:50},{componentId:502}]},{sx:{display:"grid",minWidth:0,gap:"30px",gridTemplateColumns:"1fr 1fr 1fr",["@media (max-width: ".concat(d.nmC.md,"px)")]:{gridTemplateColumns:"1fr"}},columns:[{componentId:80},{componentId:81},{componentId:1}]},{sx:{display:"grid",minWidth:0,gap:"30px",gridTemplateColumns:"1fr 1fr",["@media (max-width: ".concat(d.nmC.md,"px)")]:{gridTemplateColumns:"1fr"}},columns:[{componentId:68},{componentId:52}]},{sx:{display:"grid",minWidth:0,gap:"30px",gridTemplateColumns:"1fr 1fr",["@media (max-width: ".concat(d.nmC.md,"px)")]:{gridTemplateColumns:"1fr"}},columns:[{componentId:63},{componentId:70}]}],he=[{sx:{display:"grid",gridTemplateColumns:"1fr",gap:"30px"},columns:[{componentId:60}]},{sx:{display:"grid",minWidth:0,gap:"30px",gridTemplateColumns:"1fr 1fr",["@media (max-width: ".concat(d.nmC.md,"px)")]:{gridTemplateColumns:"1fr"}},columns:[{componentId:71,sx:{flex:1,width:"50%",flexShrink:0}},{componentId:17,sx:{flex:1,width:"50%",flexShrink:0}}]},{sx:{display:"grid",gridTemplateColumns:"1fr",gap:"30px"},columns:[{componentId:73}]}],ue=[{sx:{display:"grid",minWidth:0,gridTemplateColumns:"1fr 1fr",gap:"30px"},columns:[{componentId:76},{componentId:77}]},{sx:{display:"grid",minWidth:0,gridTemplateColumns:"1fr 1fr",gap:"30px"},columns:[{componentId:82},{componentId:74}]}],fe=[{sx:{display:"grid",minWidth:0,gridTemplateColumns:"1fr 1fr",gap:"30px"},columns:[{componentId:11},{componentId:8}]}],je=e=>{let{children:t}=e;return(0,g.jsx)(d.azJ,{sx:{display:"grid",gridTemplateColumns:"1fr",gap:"30px"},children:t})};var Ce=n(94141);const ye=e=>{let{value:t,modalOpen:n,timeStart:a,timeEnd:o,apiPrefix:s}=e;const r=(0,l.jL)();return t?(0,g.jsx)(Ce.A,{title:t.title,onClose:()=>{r((0,N.Nv)())},modalOpen:n,wideLimit:!1,sx:{padding:0},children:(0,g.jsx)(i.Fragment,{children:pe(t,a,o,!0,s,!0)})}):null};var ve=n(71102),be=n(35475);const we=b.Ay.div((e=>{let{theme:t}=e;return{...(0,J.yE)(t),"& .metricText":{fontSize:70,lineHeight:1.1,color:x()(t,"signalColors.main","#07193E"),fontWeight:"bold"},"& .unitText":{fontSize:10,color:x()(t,"mutedText","#87888d"),fontWeight:"normal"},"& .subHeaderContainer":{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},"& .subMessage":{fontSize:10,color:x()(t,"mutedText","#87888d"),"&.bold":{fontWeight:"bold"}},"& .headerContainer":{display:"flex",justifyContent:"space-between"},"& .viewAll":{fontSize:10,color:x()(t,"signalColors.danger","#C83B51"),textTransform:"capitalize","& a, & a:hover, & a:visited, & a:active":{color:x()(t,"signalColors.danger","#C83B51")}}}})),ze=e=>{let{title:t,metricValue:n,metricUnit:a,subMessage:l,moreLink:o,rightComponent:s,extraMargin:r=!1}=e;const c=()=>(0,g.jsx)(i.Fragment,{children:(0,g.jsxs)("div",{className:"subHeaderContainer",children:[(0,g.jsxs)("div",{className:"leftSide",children:[(0,g.jsx)("div",{children:(0,g.jsxs)("span",{className:"metricText",children:[n,(0,g.jsx)("span",{className:"unitText",children:a})]})}),l&&(0,g.jsx)(d.azJ,{sx:{fontWeight:l.fontWeight||"normal"},children:l.message})]}),(0,g.jsx)("div",{className:"rightSide",children:s})]})}),x=()=>(0,g.jsx)(i.Fragment,{children:(0,g.jsxs)("div",{className:"headerContainer",children:[(0,g.jsx)("span",{className:"titleContainer",children:t}),o&&(0,g.jsx)(i.Fragment,{children:(0,g.jsx)("span",{className:"viewAll",children:(0,g.jsx)(be.N_,{to:o,children:"View All"})})})]})});return(0,g.jsx)(i.Fragment,{children:(0,g.jsx)(d.azJ,{withBorders:!0,sx:{height:200,padding:16,margin:r?"10px 20px 10px 0":""},children:""!==n&&(0,g.jsxs)(we,{children:[(0,g.jsx)(x,{}),(0,g.jsx)(c,{})]})})})},Se=e=>{let{title:t,leftComponent:n,rightComponent:a}=e;return(0,g.jsx)(i.Fragment,{children:(0,g.jsx)(ze,{title:t,metricValue:n,rightComponent:a})})},Ae=e=>{let{panelItem:t,timeStart:n,timeEnd:o,apiPrefix:s,statLabel:c}=e;const x=(0,l.jL)(),[m,p]=(0,i.useState)(!1),[h,u]=(0,i.useState)(""),f=(0,a.d4)((e=>e.dashboard.widgetLoadVersion));return(0,i.useEffect)((()=>{p(!0)}),[f]),(0,i.useEffect)((()=>{if(m){let e=0;if(null!==n&&null!==o){const t=o.toUnixInteger()-n.toUnixInteger(),i=Math.floor(t/60);e=i<1?15:i}B.A.invoke("GET","/api/v1/".concat(s,"/info/widgets/").concat(t.id,"/?step=").concat(e,"&").concat(null!==n?"&start=".concat(n.toUnixInteger()):"").concat(null!==n&&null!==o?"&":"").concat(null!==o?"end=".concat(o.toUnixInteger()):"")).then((e=>{const n=y(e,t);u(n.data),p(!1)})).catch((e=>{x((0,r.C9)(e)),p(!1)}))}}),[m,t,o,n,x,s]),m?(0,g.jsx)(d.azJ,{sx:{width:"100%",paddingTop:"5px",textAlign:"center",margin:"auto"},children:(0,g.jsx)(d.aHM,{style:{width:12,height:12}})}):(0,g.jsxs)(d.azJ,{children:[(0,g.jsx)(d.azJ,{className:"stat-value",children:h}),c]})},Te=b.Ay.div((e=>{let{theme:t}=e;return{fontFamily:"Inter,sans-serif",color:x()(t,"signalColors.main","#07193E"),maxWidth:"321px",display:"flex",marginLeft:"auto",marginRight:"auto",cursor:"default","& .stat-text":{color:x()(t,"mutedText","#87888d"),fontSize:"12px",marginTop:"8px"}}})),Ie=e=>{let{statItemLeft:t=null,statItemRight:n=null,icon:i=null,label:a=""}=e;return(0,g.jsx)(Te,{children:(0,g.jsxs)(d.azJ,{sx:{flex:1,display:"flex",padding:"0 8px 0 8px",["@media (max-width: ".concat(d.nmC.sm,"px)")]:{padding:"0 10px 0 10px"}},children:[(0,g.jsxs)(d.azJ,{sx:{flex:1,display:"flex",flexFlow:"column"},children:[(0,g.jsx)(d.azJ,{sx:{fontSize:"16px",fontWeight:600},children:a}),(0,g.jsxs)(d.azJ,{sx:{display:"flex",alignItems:"center",gap:5,justifyContent:"space-between",paddingBottom:0,fontSize:55,flexFlow:"row",fontWeight:600,"& .stat-value":{textAlign:"center",height:"50px"},"& .min-icon":{marginRight:"8px",marginTop:"8px",height:"10px",width:"10px"},["@media (max-width: ".concat(d.nmC.sm,"px)")]:{fontSize:35},["@media (max-width: ".concat(d.nmC.lg,"px)")]:{fontSize:45},["@media (max-width: ".concat(d.nmC.xl,"px)")]:{fontSize:50}},children:[t,n]})]}),(0,g.jsx)(d.azJ,{sx:{width:"20px",height:"20px",marginTop:"8px",maxWidth:"26px","& .min-icon":{width:"16px",height:"16px"}},children:i})]})})},Fe=b.Ay.div((e=>{let{theme:t}=e;return{display:"flex",alignItems:"center",marginTop:"5px",gap:8,"&.online":{"& .min-icon":{margin:0,fill:x()(t,"signalColors.good","#4CCB92")}},"&.offline":{"& .min-icon":{margin:0,fill:x()(t,"signalColors.danger","#C51B3F")}},"& .indicatorText":{color:x()(t,"mutedText","#C51B3F"),fontSize:12}}})),Je=e=>{let{info:t,timeStart:n,timeEnd:i,apiPrefix:a}=e;const{mergedPanels:l=[],id:o}=t,[s,r]=l,c=(0,g.jsx)(Ae,{panelItem:s,timeStart:n,timeEnd:i,apiPrefix:a,statLabel:(0,g.jsxs)(Fe,{className:"online",children:[(0,g.jsx)(d.GQ2,{}),(0,g.jsx)(d.azJ,{className:"indicatorText",children:"Online"})]})}),x=(0,g.jsx)(Ae,{panelItem:r,timeStart:n,timeEnd:i,apiPrefix:a,statLabel:(0,g.jsxs)(Fe,{className:"offline",children:[(0,g.jsx)(d.GQ2,{}),(0,g.jsx)(d.azJ,{className:"indicatorText",children:"Offline"})]})});let m=null,p="";return 500===o?(m=(0,g.jsx)(d.WXN,{}),p="Servers"):501===o&&(m=(0,g.jsx)(d.JUN,{}),p="Drives"),(0,g.jsx)(Ie,{statItemLeft:c,statItemRight:x,icon:m,label:p})},Ne=b.Ay.div((e=>{let{theme:t}=e;return{"& .putLabel":{display:"flex",gap:10,alignItems:"center",marginTop:"10px","& .min-icon":{height:15,width:15,fill:x()(t,"signalColors.good","#4CCB92")},"& .getText":{fontSize:"18px",color:x()(t,"mutedText","#87888d"),fontWeight:"bold"},"& .valueText":{fontSize:50,fontFamily:"Inter",fontWeight:600}}}})),Ee=e=>{let{value:t,loading:n}=e;return(0,g.jsxs)(Ne,{children:[(0,g.jsxs)(d.azJ,{className:"putLabel",children:[(0,g.jsx)(d.azJ,{className:"getText",children:"GET"}),n?(0,g.jsx)(d.aHM,{style:{width:"15px",height:"15px"}}):(0,g.jsx)(d.OFF,{})]}),(0,g.jsx)(d.azJ,{className:"valueText",children:t})]})},Le=b.Ay.div((e=>{let{theme:t}=e;return{"& .putLabel":{display:"flex",gap:10,alignItems:"center",marginTop:"10px","& .min-icon":{height:15,width:15,fill:x()(t,"signalColors.info","#2781B0")},"& .putText":{fontSize:"18px",color:x()(t,"mutedText","#87888d"),fontWeight:"bold"},"& .valueText":{fontSize:50,fontFamily:"Inter",fontWeight:600}}}})),ke=e=>{let{value:t,loading:n}=e;return(0,g.jsxs)(Le,{children:[(0,g.jsxs)(d.azJ,{className:"putLabel",children:[(0,g.jsx)(d.azJ,{className:"putText",children:"PUT"}),n?(0,g.jsx)(d.aHM,{style:{width:"15px",height:"15px"}}):(0,g.jsx)(d.z8D,{})]}),(0,g.jsx)(d.azJ,{className:"valueText",children:t})]})},We=b.Ay.div((e=>{let{theme:t}=e;return{flex:1,display:"flex",alignItems:"center",flexFlow:"row",gap:"15px","& .unitText":{fontSize:"14px",color:x()(t,"mutedText","#87888d"),marginLeft:"5px"},"& .unit":{color:x()(t,"mutedText","#87888d"),fontSize:"18px",marginLeft:"12px",marginTop:"10px"},["@media (max-width: ".concat(d.nmC.sm,"px)")]:{flexFlow:"column"}}})),Be=e=>{let{value:t,timeStart:n,timeEnd:i,apiPrefix:a}=e;const{mergedPanels:l=[]}=t,[o,s]=l,r=(0,g.jsx)(le,{title:t.title,panelItem:o,timeStart:n,timeEnd:i,apiPrefix:a,renderFn:e=>{let{valueToRender:t,loading:n,title:i,id:a}=e;return(0,g.jsx)(ke,{value:t,loading:n,title:i,id:a})}}),c=(0,g.jsx)(le,{title:t.title,panelItem:s,timeStart:n,timeEnd:i,apiPrefix:a,renderFn:e=>{let{valueToRender:t,loading:n,title:i,id:a}=e;return(0,g.jsx)(Ee,{value:t,loading:n,title:i,id:a})}});return(0,g.jsxs)(We,{children:[(0,g.jsx)(d.azJ,{sx:{fontSize:"16px",fontWeight:600},children:"Network"}),(0,g.jsx)(d.azJ,{sx:{position:"relative",width:110,height:110,marginLeft:"auto",["@media (max-width: ".concat(d.nmC.sm,"px)")]:{marginLeft:"0"}},children:(0,g.jsx)(d.azJ,{sx:{position:"absolute",display:"flex",flexFlow:"column",alignItems:"center",top:"50%",left:"50%",transform:"translate(-50%, -50%)",fontWeight:"bold",fontSize:12},children:c})}),(0,g.jsx)(d.azJ,{sx:{display:"flex",alignItems:"center",marginLeft:"auto",["@media (max-width: ".concat(d.nmC.sm,"px)")]:{marginLeft:"0"}},children:(0,g.jsx)(d.azJ,{sx:{display:"flex",alignItems:"center","& .value":{fontSize:"50px",fontFamily:"Inter"}},children:r})}),(0,g.jsx)(d.azJ,{sx:{marginLeft:"15px",height:"100%",display:"flex",alignItems:"flex-start","& .min-icon":{height:"15px",width:"15px"}},children:(0,g.jsx)(d.vhL,{})})]})},Re=e=>{let{info:t,timeStart:n,timeEnd:i,loading:a,apiPrefix:l}=e;const{mergedPanels:o=[],title:s="",id:r}=t,[d,c]=o;return[500,501].includes(r)?(0,g.jsx)(X,{children:(0,g.jsx)(Je,{info:t,timeStart:n,timeEnd:i,apiPrefix:l})}):502===r?(0,g.jsx)(X,{children:(0,g.jsx)(Be,{apiPrefix:l,timeEnd:i,timeStart:n,value:t})}):(0,g.jsx)(Se,{title:s,leftComponent:pe(d,n,i,a,l),rightComponent:pe(c,n,i,a,l)})};var De=n(95109),Me=n(39835),Oe=n.n(Me),Ue=n(71435);const Ve=b.Ay.div((e=>{let{theme:t}=e;return{alignItems:"baseline",padding:"5px",display:"flex",gap:"5px","& .StatBox":{display:"flex",alignItems:"center",justifyContent:"center",flexFlow:"column","& .stat-text":{color:x()(t,"mutedText","#87888d"),fontSize:"12px"},"& .stat-value":{fontSize:"18px",color:x()(t,"signalColors.main","#07193E"),display:"flex",fontWeight:500,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","& .stat-container":{display:"flex",alignItems:"center",justifyContent:"center",flexFlow:"column",marginLeft:"5px",maxWidth:"40px","&:first-of-type(svg)":{fill:x()(t,"mutedText","#87888d")},"& .stat-indicator":{marginRight:"0px",justifyContent:"center",alignItems:"center",textAlign:"center","& svg.min-icon":{width:"10px",height:"10px"},"&.good":{"& svg.min-icon":{fill:x()(t,"signalColors.good","#4CCB92")}},"&.warn":{"& svg.min-icon":{fill:x()(t,"signalColors.warning","#FFBD62")}},"&.bad":{"& svg.min-icon":{fill:x()(t,"signalColors.danger","#C51B3F")}}}}}}}})),Ge=b.Ay.div((e=>{let{theme:t}=e;return{display:"flex",alignItems:"flex-start",flexFlow:"column",flex:1,"& .server-state":{marginLeft:"8px","& .min-icon":{height:"14px",width:"14px"},"&.good":{"& svg.min-icon":{fill:x()(t,"signalColors.good","#4CCB92")}},"&.warn":{"& svg.min-icon":{fill:x()(t,"signalColors.warning","#FFBD62")}},"&.bad":{"& svg.min-icon":{fill:x()(t,"signalColors.danger","#C51B3F")}}}}})),Pe=e=>{let{label:t="",value:n="",statusColor:i="warn",hasStatus:a=!1}=e;return(0,g.jsx)(Ve,{children:(0,g.jsxs)(d.azJ,{className:"StatBox",children:[(0,g.jsxs)("div",{className:"stat-value",children:[n," ",(0,g.jsx)(d.azJ,{className:"stat-container",children:a?(0,g.jsx)(d.azJ,{className:"stat-indicator ".concat(i),children:(0,g.jsx)(d.GQ2,{})}):(0,g.jsx)(d.azJ,{sx:{width:"12px",height:"12px"}})})]}),(0,g.jsx)("div",{className:"stat-text",children:t})]})})},_e=e=>{let{server:t}=e;const n=Object.keys(x()(t,"network",{})),i=n.length,a=t.drives?t.drives.length:0,l=n.reduce(((e,n)=>"online"===(t.network?t.network[n]:"")?e+1:e),0),o=t.drives?t.drives.filter((e=>"ok"===e.state)).length:0;return(0,g.jsx)(Ge,{children:(0,g.jsxs)(d.azJ,{sx:{display:"flex",alignItems:"center",padding:"3px",gap:"15px",justifyContent:"space-between",width:"100%",paddingLeft:"20px",flexFlow:"row",["@media (max-width: ".concat(d.nmC.md,"px)")]:{flexFlow:"column"}},children:[(0,g.jsxs)(d.azJ,{sx:{display:"flex",alignItems:"center"},children:[(0,g.jsx)(d.azJ,{sx:{fontWeight:600,textTransform:"none"},children:t.endpoint||""}),(null===t||void 0===t?void 0:t.state)&&(0,g.jsx)(d.azJ,{className:"server-state ".concat((0,Ue.Zb)(t.state)),children:(0,g.jsx)(d.GQ2,{})})]}),(0,g.jsxs)(d.azJ,{sx:{display:"flex",alignItems:"center",justifyContent:"center",flex:"1.5",gap:"5%"},children:[(0,g.jsx)(Pe,{statusColor:(0,Ue.WJ)(o,a),label:"Drives",hasStatus:!0,value:"".concat(o,"/").concat(a)}),(0,g.jsx)(Pe,{statusColor:(0,Ue.CS)(l,i),label:"Network",hasStatus:!0,value:"".concat(l,"/").concat(i)}),(0,g.jsx)(Pe,{statusColor:"good",label:"Up time",value:null!==t&&void 0!==t&&t.uptime?(0,p.hr)("".concat(t.uptime)):"N/A"})]}),(0,g.jsx)(Pe,{statusColor:"good",label:"",value:(0,g.jsxs)(d.azJ,{sx:{background:"rgb(235, 236, 237)",color:"#000000",paddingLeft:"10px",paddingRight:"10px",borderRadius:"2px",fontSize:"12px",marginTop:"5px","& .label":{fontWeight:600,marginRight:"3px"}},children:[(0,g.jsx)("span",{className:"label",children:"Version:"}),t.version?t.version:"N/A"]})})]})})},Ke=e=>{switch(e){case"offline":return Ue.Ez.RED;case"ok":return Ue.Ez.GREEN;default:return Ue.Ez.YELLOW}},He=b.Ay.div((e=>{let{theme:t}=e;return{flex:1,display:"flex",alignItems:"center",paddingLeft:"20px",marginTop:"10px",flexFlow:"row","& .info-label":{color:x()(t,"mutedText","#87888d"),fontSize:"12px",textAlign:"center"},"& .info-value":{fontSize:"18px",color:x()(t,"signalColors.main","#07193E"),display:"flex",fontWeight:500,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},["@media (max-width: ".concat(d.nmC.sm,"px)")]:{flexFlow:"column"}}})),Qe=e=>{let{drive:t}=e;const n=t.totalSpace||0,i=t.usedSpace||0;return(0,g.jsx)(d.azJ,{withBorders:!0,sx:{display:"flex",flex:1,alignItems:"center",paddingBottom:"10px",padding:"20px"},children:(0,g.jsxs)(d.azJ,{sx:{display:"flex",flexFlow:"column",marginLeft:"10px",flex:1},children:[(0,g.jsxs)(d.azJ,{sx:{fontSize:"14px",fontWeight:400,display:"flex",alignItems:"center","& .min-icon":{marginRight:"10px",height:"10px",width:"10px",fill:Ke(t.state||""),flexShrink:0},"& .drive-endpoint":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"normal",wordBreak:"break-all",marginRight:"8px",fontWeight:600,fontSize:16,["@media (max-width: ".concat(d.nmC.sm,"px)")]:{fontSize:10}}},children:[(0,g.jsx)("div",{className:"drive-endpoint",children:t.endpoint||""}),t.state&&(0,g.jsx)(d.GQ2,{})]}),(0,g.jsxs)(He,{children:[(0,g.jsx)(d.azJ,{sx:{flex:1},children:(0,g.jsx)(d.cNv,{label:!0,usedBytes:i,totalBytes:n,width:"120",height:"120"})}),(0,g.jsxs)(d.azJ,{sx:{display:"flex",gap:"5%",alignItems:"center",flex:2,flexGrow:1},children:[(0,g.jsxs)(d.azJ,{sx:{display:"flex",flexFlow:"column"},children:[(0,g.jsx)("div",{className:"info-value",children:(0,p.nO)(t.totalSpace?t.totalSpace.toString():"0")}),(0,g.jsx)("label",{className:"info-label",children:"Capacity"})]}),(0,g.jsxs)(d.azJ,{sx:{display:"flex",flexFlow:"column"},children:[(0,g.jsx)("div",{className:"info-value",children:(0,p.nO)(t.usedSpace?t.usedSpace.toString():"0")}),(0,g.jsx)("label",{className:"info-label",children:"Used"})]}),(0,g.jsxs)(d.azJ,{sx:{display:"flex",flexFlow:"column"},children:[(0,g.jsx)("div",{className:"info-value",children:(0,p.nO)(t.availableSpace?t.availableSpace.toString():"0")}),(0,g.jsx)("label",{className:"info-label",children:"Available"})]})]})]})]})})},qe=e=>{let{data:t}=e;const[n,a]=i.useState(t.length>1?"":t[0].endpoint+"-0"),l=e=>{a(e)};return(0,g.jsxs)(d.azJ,{children:[(0,g.jsxs)(d.azJ,{sx:{fontSize:18,lineHeight:2,fontWeight:700},children:["Servers (",t.length,")"]}),(0,g.jsx)(d.azJ,{children:t.map(((e,t)=>{var i,a;const o="".concat(e.endpoint,"-").concat(t),s=n===o;return(0,g.jsxs)(d.nD3,{expanded:s,onTitleClick:()=>{l(s?"":o)},id:"key",title:(0,g.jsx)(_e,{server:e,index:t}),sx:{marginBottom:15},children:[(0,g.jsxs)(d.azJ,{useBackground:!0,sx:{padding:"10px 30px",fontWeight:"bold"},children:["Drives (",null===(i=e.drives)||void 0===i?void 0:i.length,")"]}),(0,g.jsx)(d.azJ,{sx:{flex:1,display:"flex",flexDirection:"column",padding:"15px 30px",gap:15,["@media (max-width: ".concat(d.nmC.sm,"px)")]:{padding:"10px 10px"}},children:null===(a=e.drives)||void 0===a?void 0:a.map(((e,t)=>(0,g.jsx)(Qe,{drive:e},"".concat(e.endpoint,"-").concat(t))))})]},o)}))})]})},Ye=b.Ay.div((e=>{let{theme:t}=e;return{fontFamily:"Inter,sans-serif",color:x()(t,"signalColors.main","#07193E"),maxWidth:"300px",display:"flex",marginLeft:"auto",marginRight:"auto",cursor:"default",position:"relative",width:"100%"}})),Ze=e=>{let{counterValue:t,label:n="",icon:i=null,actions:a=null}=e;return(0,g.jsx)(Ye,{children:(0,g.jsxs)(d.azJ,{sx:{flex:1,display:"flex",width:"100%",padding:"0 8px 0 8px",position:"absolute",["@media (max-width: ".concat(d.nmC.md,"px)")]:{padding:"0 10px 0 10px"}},children:[(0,g.jsxs)(d.azJ,{sx:{flex:1,display:"flex",flexFlow:"column",marginTop:"8px",zIndex:10,overflow:"hidden"},children:[(0,g.jsx)(d.azJ,{sx:{fontSize:"16px",fontWeight:600},children:n}),(0,g.jsx)(d.m_M,{tooltip:t,placement:"bottom",children:(0,g.jsx)(d.azJ,{sx:{fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",maxWidth:187,flexFlow:"row",fontSize:t.toString().length>=5?50:55,["@media (max-width: ".concat(d.nmC.sm,"px)")]:{flexFlow:"column",maxWidth:200,fontSize:t.toString().length>=5?20:35},["@media (max-width: ".concat(d.nmC.md,"px)")]:{fontSize:t.toString().length>=5?28:35},["@media (max-width: ".concat(d.nmC.lg,"px)")]:{fontSize:t.toString().length>=5?28:36},["@media (max-width: ".concat(d.nmC.xl,"px)")]:{fontSize:t.toString().length>=5?45:50}},children:t})})]}),(0,g.jsxs)(d.azJ,{sx:{display:"flex",flexFlow:"column",alignItems:"center",justifyContent:"flex-start",marginTop:"8px",maxWidth:"26px","& .min-icon":{width:"16px",height:"16px"}},children:[i,(0,g.jsx)(d.azJ,{sx:{display:"flex"},children:a})]})]})})};var Xe=n(80882),$e=n(99161),et=n(6681);const tt=e=>{let{children:t}=e;return(0,g.jsx)(d.azJ,{withBorders:!0,sx:{padding:15,height:"136px",maxWidth:"100%",["@media (max-width: ".concat(d.nmC.sm,"px)")]:{padding:5,maxWidth:"initial"}},children:t})},nt=e=>{var t,n,i,a,l,o,s,r,c,x;let{usage:m}=e;const h=m&&m.usage?m.usage.toString():"0",u=(e=>void 0===e?{total:"0",unit:"Mi"}:(0,p.GT)(e))(h),{lastScan:f="n/a",lastHeal:j="n/a",upTime:C="n/a"}={},y=(e=>e&&e.servers?[...e.servers].sort((function(e,t){var n,i;const a=(null===(n=e.endpoint)||void 0===n?void 0:n.toLowerCase())||"",l=(null===(i=t.endpoint)||void 0===i?void 0:i.toLowerCase())||"";return a<l?-1:a>l?1:0})):[])(m);let v=[];y.forEach((e=>{var t;const n=null===(t=e.drives)||void 0===t?void 0:t.map((e=>e));n&&(v=[...v,...n])}));const b=Oe()(y,"state"),{offline:w=[],online:z=[]}=b,S=Oe()(v,"state"),{offline:A=[],ok:T=[]}=S;return(0,g.jsx)(d.azJ,{children:(0,g.jsxs)(d.azJ,{sx:{display:"grid",gridTemplateRows:"1fr",gridTemplateColumns:"1fr",gap:27,marginBottom:40},children:[(0,g.jsxs)(d.azJ,{sx:{display:"grid",gridTemplateColumns:"1fr",gap:"40px"},children:[(0,g.jsxs)(d.azJ,{sx:{display:"grid",gridTemplateRows:"136px",gridTemplateColumns:"1fr 1fr 1fr",gap:20,["@media (max-width: ".concat(d.nmC.sm,"px)")]:{gridTemplateColumns:"1fr"},["@media (max-width: ".concat(d.nmC.md,"px)")]:{marginBottom:0}},children:[(0,g.jsx)(tt,{children:(0,g.jsx)(Ze,{label:"Buckets",icon:(0,g.jsx)(d.brV,{}),counterValue:m?(0,p.dq)(m.buckets):0,actions:(0,g.jsx)(be.N_,{to:$e.zZ.BUCKETS,style:{zIndex:3,textDecoration:"none",top:"40px",position:"relative",marginRight:"75px"},children:(0,g.jsx)(et.A,{tooltip:"Browse",children:(0,g.jsx)(d.$nd,{id:"browse-dashboard",onClick:()=>{},label:"Browse",icon:(0,g.jsx)(d.flY,{}),variant:"regular",style:{padding:5,height:30,fontSize:14,marginTop:20}})})})})}),(0,g.jsx)(tt,{children:(0,g.jsx)(Ze,{label:"Objects",icon:(0,g.jsx)(d.Sxe,{}),counterValue:m?(0,p.dq)(m.objects):0})}),(0,g.jsx)(tt,{children:(0,g.jsx)(De.A,{onlineCount:z.length,offlineCount:w.length,label:"Servers",icon:(0,g.jsx)(d.WXN,{})})}),(0,g.jsx)(tt,{children:(0,g.jsx)(De.A,{offlineCount:(null===m||void 0===m||null===(t=m.backend)||void 0===t?void 0:t.offlineDrives)||A.length,onlineCount:(null===m||void 0===m||null===(n=m.backend)||void 0===n?void 0:n.onlineDrives)||T.length,label:"Drives",icon:(0,g.jsx)(d.JUN,{})})}),(0,g.jsxs)(d.azJ,{withBorders:!0,sx:{gridRowStart:"1",gridRowEnd:"3",gridColumnStart:"3",padding:15,display:"grid",justifyContent:"stretch"},children:[(0,g.jsx)(Xe.A,{usageValue:h,total:u.total,unit:u.unit}),(0,g.jsxs)(d.azJ,{sx:{display:"flex",flexFlow:"column",gap:"14px"},children:[(0,g.jsx)(de,{icon:(0,g.jsx)(d.Sdx,{}),label:(0,g.jsxs)(d.azJ,{children:[(0,g.jsx)(d.azJ,{sx:{display:"inline",["@media (max-width: ".concat(d.nmC.sm,"px)")]:{display:"none"}},children:"Time since last"})," ","Heal Activity"]}),value:j}),(0,g.jsx)(de,{icon:(0,g.jsx)(d.Zui,{}),label:(0,g.jsxs)(d.azJ,{children:[(0,g.jsx)(d.azJ,{sx:{display:"inline",["@media (max-width: ".concat(d.nmC.sm,"px)")]:{display:"none"}},children:"Time since last"})," ","Scan Activity"]}),value:f}),(0,g.jsx)(de,{icon:(0,g.jsx)(d.Owo,{}),label:"Uptime",value:C})]})]})]}),(0,g.jsxs)(d.azJ,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gap:"14px",["@media (max-width: ".concat(d.nmC.lg,"px)")]:{gridTemplateColumns:"1fr"}},children:[(0,g.jsx)(de,{icon:(0,g.jsx)(d.NBP,{}),label:"Backend type",value:null!==(i=null===m||void 0===m||null===(a=m.backend)||void 0===a?void 0:a.backendType)&&void 0!==i?i:"Unknown"}),(0,g.jsx)(de,{icon:(0,g.jsx)(d.eXQ,{}),label:"Standard storage class parity",value:null!==(l=null===m||void 0===m||null===(o=m.backend)||void 0===o||null===(s=o.standardSCParity)||void 0===s?void 0:s.toString())&&void 0!==l?l:"n/a"}),(0,g.jsx)(de,{icon:(0,g.jsx)(d.eXQ,{}),label:"Reduced redundancy storage class parity",value:null!==(r=null===m||void 0===m||null===(c=m.backend)||void 0===c||null===(x=c.rrSCParity)||void 0===x?void 0:x.toString())&&void 0!==r?r:"n/a"})]}),(0,g.jsx)(d.azJ,{sx:{display:"grid",gridTemplateRows:"auto",gridTemplateColumns:"1fr",gap:"auto"},children:(0,g.jsx)(qe,{data:y})})]}),"not configured"===(null===m||void 0===m?void 0:m.advancedMetricsStatus)&&(0,g.jsx)(d.azJ,{children:(0,g.jsx)(d.lVp,{iconComponent:(0,g.jsx)(d.uMc,{}),title:"We can\u2019t retrieve advanced metrics at this time.",help:(0,g.jsxs)(d.azJ,{children:[(0,g.jsx)(d.azJ,{sx:{fontSize:"14px"},children:"MinIO Dashboard will display basic metrics as we couldn\u2019t connect to Prometheus successfully. Please try again in a few minutes. If the problem persists, you can review your configuration and confirm that Prometheus server is up and running."}),(0,g.jsx)(d.azJ,{sx:{paddingTop:20,fontSize:14},children:(0,g.jsx)("a",{href:"https://min.io/docs/minio/linux/operations/monitoring/collect-minio-metrics-using-prometheus.html",target:"_blank",rel:"noopener",children:"Read more about Prometheus on our Docs site."})})]})})})]})})},it=e=>{let{apiPrefix:t="admin",usage:n}=e;const a=(0,l.jL)(),r=(0,l.GV)((e=>e.dashboard.status)),c=(0,l.GV)((e=>e.dashboard.zoom.openZoom)),x=(0,l.GV)((e=>e.dashboard.zoom.widgetRender)),m=(0,l.GV)(s.s$),p=!(null===m||void 0===m||!m.includes("object-browser-only"));let h=!1;(null!==m&&void 0!==m&&m.includes("hide-menu")||p)&&(h=!0);const[u,f]=(0,i.useState)(null),[C,y]=(0,i.useState)(null),v=j,[b,w]=(0,i.useState)("info"),z=e=>e.reduce(((e,n,a)=>{const{columns:l=[]}=n,o=l.map(((e,n)=>{var l;return((e,n)=>(0,g.jsx)(i.Fragment,{children:e?(0,g.jsx)(i.Fragment,{children:(0,g.jsx)(d.azJ,{children:e.mergedPanels?(0,g.jsx)(Re,{info:e,timeStart:u,timeEnd:C,loading:!0,apiPrefix:t}):pe(e,u,C,!0,t,c)})}):null},"widget-".concat(n)))((l=e.componentId,v.find((e=>e.id===l))),"".concat(a,"-").concat(n))}));return[...e,(0,g.jsx)(d.azJ,{sx:n.sx,children:o},"layout-row-".concat(a))]}),[]),S="not configured"===(null===n||void 0===n?void 0:n.advancedMetricsStatus),A=(0,g.jsx)(d.azJ,{sx:{marginBottom:20},children:"info"===b?(0,g.jsxs)(d.xA9,{container:!0,children:[(0,g.jsx)(d.xA9,{item:!0,children:(0,g.jsx)(d.azJ,{sx:{fontSize:18,lineHeight:2,fontWeight:700},children:"Server Information"})}),(0,g.jsx)(d.xA9,{item:!0,xs:!0,children:(0,g.jsx)(d.xA9,{container:!0,direction:"row-reverse",children:(0,g.jsx)(d.xA9,{item:!0,children:(0,g.jsx)(d.$nd,{id:"sync",type:"button",variant:"callAction",onClick:()=>{a((0,o.i)())},disabled:"loading"===r,icon:(0,g.jsx)(d.Fjq,{}),label:"Sync"})})})})]}):(0,g.jsx)(ve.A,{timeStart:u,setTimeStart:f,timeEnd:C,setTimeEnd:y,triggerSync:()=>{a((0,N.pA)())}})});let T=[{tabConfig:{label:"Info",id:"info",disabled:!1},content:(0,g.jsxs)(i.Fragment,{children:[(!n||"loading"===r)&&(0,g.jsx)(d.z21,{}),n&&"idle"===r&&(0,g.jsxs)(i.Fragment,{children:[A,(0,g.jsx)(nt,{usage:n})]})]})},...[{tabConfig:{label:"Usage",id:"usage",disabled:S},content:(0,g.jsxs)(i.Fragment,{children:[A,(0,g.jsxs)(je,{children:["unavailable"===(null===n||void 0===n?void 0:n.advancedMetricsStatus)&&(0,g.jsx)(d.lVp,{iconComponent:(0,g.jsx)(d.uMc,{}),title:"We can\u2019t retrieve advanced metrics at this time.",help:(0,g.jsx)(d.azJ,{sx:{fontSize:"14px"},children:"It looks like Prometheus is not available or reachable at the moment."})}),v.length?z(ge):null]})]})},{tabConfig:{label:"Traffic",id:"traffic",disabled:S},content:(0,g.jsxs)(i.Fragment,{children:[A,(0,g.jsxs)(je,{children:["unavailable"===(null===n||void 0===n?void 0:n.advancedMetricsStatus)&&(0,g.jsx)(d.lVp,{iconComponent:(0,g.jsx)(d.uMc,{}),title:"We can\u2019t retrieve advanced metrics at this time.",help:(0,g.jsx)(d.azJ,{sx:{fontSize:"14px"},children:"It looks like Prometheus is not available or reachable at the moment."})}),v.length?z(he):null]})]})},{tabConfig:{label:"Resources",id:"resources",disabled:S},content:(0,g.jsxs)(i.Fragment,{children:[A,(0,g.jsxs)(je,{children:["unavailable"===(null===n||void 0===n?void 0:n.advancedMetricsStatus)&&(0,g.jsx)(d.lVp,{iconComponent:(0,g.jsx)(d.uMc,{}),title:"We can\u2019t retrieve advanced metrics at this time.",help:(0,g.jsx)(d.azJ,{sx:{fontSize:"14px"},children:"It looks like Prometheus is not available or reachable at the moment."})}),v.length?z(ue):null,(0,g.jsx)("h2",{style:{margin:0,borderBottom:"1px solid #dedede"},children:"Advanced"}),v.length?z(fe):null]})]})}]];return(0,g.jsxs)(d.Mxu,{sx:{padding:h?0:"2rem"},children:[c&&(0,g.jsx)(ye,{modalOpen:c,timeStart:u,timeEnd:C,widgetRender:0,value:x,apiPrefix:t}),(0,g.jsx)(d.tUM,{horizontal:!0,options:T,currentTabOrPath:b,onTabClick:e=>{w(e)}})]})};var at=n(48793),lt=n(55968);const ot=()=>{const e=(0,l.jL)(),[t,n]=(0,i.useState)(!1),d=(0,a.d4)((e=>e.dashboard.usage)),c=(0,a.d4)(s.s$),x=!(null===c||void 0===c||!c.includes("object-browser-only"));let m=!1;return(null!==c&&void 0!==c&&c.includes("hide-menu")||x)&&(m=!0),(0,i.useEffect)((()=>{t||(n(!0),e((0,o.i)()))}),[t,e]),(0,i.useEffect)((()=>{e((0,r.ph)("metrics"))}),[e]),(0,g.jsxs)(i.Fragment,{children:[!m&&(0,g.jsx)(at.A,{label:"Metrics",actions:(0,g.jsx)(lt.A,{})}),(0,g.jsx)(it,{usage:d})]})}}}]); 2 //# sourceMappingURL=9340.acfd036d.chunk.js.map