2 lines
78 KiB
JavaScript
2 lines
78 KiB
JavaScript
"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[4131],{23804:function(e,t,n){n(72791);var i=n(11135),a=n(25787),l=n(61889),r=n(80184);t.Z=(0,a.Z)((function(e){return(0,i.Z)({root:{border:"1px solid #E2E2E2",borderRadius:2,backgroundColor:"#FBFAFA",paddingLeft:25,paddingTop:31,paddingBottom:21,paddingRight:30},leftItems:{fontSize:16,fontWeight:"bold",marginBottom:15,display:"flex",alignItems:"center","& .min-icon":{marginRight:15,height:28,width:38}},helpText:{fontSize:16,paddingLeft:5}})}))((function(e){var t=e.classes,n=e.iconComponent,i=e.title,a=e.help;return(0,r.jsx)("div",{className:t.root,children:(0,r.jsxs)(l.ZP,{container:!0,children:[(0,r.jsxs)(l.ZP,{item:!0,xs:12,className:t.leftItems,children:[n,i]}),(0,r.jsx)(l.ZP,{item:!0,xs:12,className:t.helpText,children:a})]})})}))},63856:function(e,t,n){var i=n(1413),a=(n(72791),n(75952)),l=n(64554),r=n(61889),o=n(11135),s=n(25787),d=n(27197),c=n(32686),x=n(23814),u=n(80705),p=n(85090),f=n(56096),h=n(80184),g=function(){return(0,h.jsx)(l.Z,{sx:{display:"flex",alignItems:"center","& .min-icon":{width:"10px",height:"10px"}},children:(0,h.jsx)(f.Q2V,{})})};t.Z=(0,s.Z)((function(e){return(0,o.Z)((0,i.Z)((0,i.Z)((0,i.Z)({},x.OR),x.bN),{},{schedulerIcon:{opacity:.4,fontSize:10,"& svg":{width:18,height:18}},selectorLabel:{color:"#9D9E9D",fontWeight:"bold",whiteSpace:"nowrap",marginLeft:10,fontSize:12}}))}))((function(e){e.classes;var t=e.timeStart,n=e.setTimeStart,i=e.timeEnd,o=e.setTimeEnd,s=e.triggerSync,x=e.label,f=void 0===x?"Filter:":x,m=e.startLabel,v=void 0===m?"Start Time:":m,j=e.endLabel,b=void 0===j?"End Time:":j;return(0,h.jsx)(r.ZP,{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,h.jsxs)(l.Z,{sx:{display:"grid",height:{md:"40px",xs:"auto"},alignItems:"center",gridTemplateColumns:{md:"auto 2fr auto",sm:"1fr"},padding:{md:"0",xs:" 5px"},gap:"5px"},children:[(0,h.jsx)(l.Z,{sx:{fontSize:"14px",fontWeight:500,marginRight:"5px"},children:f}),(0,h.jsxs)(l.Z,{sx:{display:"grid",height:{md:"40px",xs:"auto"},border:{md:"1px solid #eaeaea"},alignItems:"center",gridTemplateColumns:{md:"1fr 1fr",sm:"1fr"},gap:"8px",paddingLeft:"8px",paddingRight:"8px"},children:[(0,h.jsxs)(l.Z,{sx:{display:"grid",height:"30px",alignItems:"center",gridTemplateColumns:{xs:"12px auto 1fr"},gap:"5px"},children:[(0,h.jsx)(l.Z,{sx:{display:"flex",alignItems:"center","& .min-icon":{width:"10px",height:"10px",fill:"#B4B5B4"}},children:(0,h.jsx)(d.Z,{className:"min-icon"})}),(0,h.jsx)(l.Z,{sx:{fontSize:"12px",marginLeft:"8px"},children:v}),(0,h.jsx)(l.Z,{children:(0,h.jsx)(u.Z,{value:t,onChange:n,id:"stTime",classNamePrefix:"filter-date-",forFilterContained:!0,noInputIcon:!0,openPickerIcon:g})})]}),(0,h.jsxs)(l.Z,{sx:{display:"grid",height:"30px",alignItems:"center",gridTemplateColumns:{xs:"12px auto 1fr"},gap:"5px"},children:[(0,h.jsx)(l.Z,{sx:{display:"flex",alignItems:"center","& .min-icon":{width:"10px",height:"10px",fill:"#B4B5B4"}},children:(0,h.jsx)(c.Z,{className:"min-icon"})}),(0,h.jsx)(l.Z,{sx:{fontSize:"12px",marginLeft:"8px"},children:b}),(0,h.jsx)(l.Z,{children:(0,h.jsx)(u.Z,{value:i,onChange:o,id:"endTime",classNamePrefix:"filter-date-",forFilterContained:!0,noInputIcon:!0,openPickerIcon:g})})]})]}),s&&(0,h.jsx)(l.Z,{sx:{alignItems:"flex-end",display:"flex",justifyContent:"flex-end"},children:(0,h.jsx)(a.zx,{id:"sync",type:"button",variant:"callAction",onClick:s,icon:(0,h.jsx)(p.Z,{}),label:"Sync"})})]})})}))},80705:function(e,t,n){var i=n(1413),a=n(72791),l=n(27391),r=n(61889),o=n(30829),s=n(20068),d=n(36571),c=n(69783),x=n(98439),u=n(63466),p=n(27197),f=n(11135),h=n(25787),g=n(84570),m=n(23814),v=n(33976),j=n(80184);t.Z=(0,h.Z)((function(e){return(0,f.Z)((0,i.Z)((0,i.Z)({dateSelectorOverride:{height:40,border:"#EAEDEE 1px solid",marginLeft:15,backgroundColor:"#fff",padding:"0 16px",borderRadius:5,"&.MuiInput-underline:hover:not(.Mui-disabled):before":{borderBottom:0},"&:hover":{borderColor:"#000","&:before, &:after":{borderColor:"transparent",borderBottom:0}},"&:before, &:after":{borderColor:"transparent",borderBottom:0},"& input":{fontSize:12,fontWeight:600,color:"#393939"}},dateSelectorFilterOverride:{width:180,height:42,marginLeft:20,padding:0,borderRadius:5,"&.MuiInput-underline:hover:not(.Mui-disabled):before":{borderBottom:0},"&:hover":{"&:before, &:after":{borderColor:"transparent",borderBottom:0}},"&:before, &:after":{borderColor:"transparent",borderBottom:0},"& input":{fontSize:12,fontWeight:"bold",color:"#081C42"},"@media (max-width: 900px)":{width:103}},dateSelectorFormOverride:{width:"100%",maxWidth:840},parentDateOverride:{flexGrow:1},textBoxContainer:{flexGrow:1},openListIcon:{color:"#9D9E9D",width:8,marginTop:2},paperOverride:{"& .MuiCalendarPicker-root":{padding:"0 22px","& > div":{padding:0,"& > div > div.PrivatePickersFadeTransitionGroup-root:first-of-type":{color:"#0A224C",fontWeight:"bold"},"& > div > div.PrivatePickersFadeTransitionGroup-root:last-of-type":{color:"#9D9E9D","& + button.MuiButtonBase-root":{color:"#9D9E9D"}},"& > div:nth-child(2)":{"& > div":{width:0},"& > button.MuiButtonBase-root":{color:"#0A224C"}}}},"& .MuiTypography-root.MuiTypography-caption":{width:26,height:26,margin:5,color:"#BCBCBC",fontSize:10},"& button.MuiPickersDay-root":{fontWeight:"bold",width:26,height:26,margin:5,textAlign:"center","&.Mui-selected":{backgroundColor:e.palette.primary.main,color:"#fff"}},"& div.MuiPickersDay-hiddenDaySpacingFiller":{width:26,height:26,margin:5},"& div.PrivatePickersSlideTransition-root":{minHeight:240},"& div.MuiCalendarPicker-viewTransitionContainer":{borderTop:"#F0F3F5 1px solid"},"& .MuiClockPicker-arrowSwitcher":{marginRight:10,marginTop:-1,"& > div":{width:0},"& > button.MuiButtonBase-root":{color:"#0A224C"},"& + div > div":{width:255,height:255,backgroundColor:"#fff",marginTop:30,marginBottom:14,border:"#F0F3F5 3px solid","& > div:nth-child(2)":{backgroundColor:"#B4B5B4",width:12,height:12,"&::before":{content:"' '",width:35,height:35,display:"block",position:"absolute",border:"#F0F3F5 3px solid",top:-12,left:-12,borderRadius:"100%"}},"& > div:nth-child(3)":{backgroundColor:"#B4B5B4",width:4},"& > div:last-of-type":{marginTop:15,"& > span":{color:"#0A224C","&.Mui-selected":{color:"#fff"},"&[aria-label='1 hours'], &[aria-label='2 hours'], &[aria-label='3 hours'], &[aria-label='4 hours'], &[aria-label='5 hours'], &[aria-label='6 hours'], &[aria-label='7 hours'], &[aria-label='8 hours'], &[aria-label='9 hours'], &[aria-label='10 hours'], &[aria-label='11 hours'], &[aria-label='12 hours']":{fontWeight:"bold",fontSize:20,marginTop:-1}}}}}}},m.YI),m.Hr))}))((function(e){var t=e.value,n=e.onChange,f=e.classes,h=e.forSearchBlock,m=void 0!==h&&h,b=e.forFilterContained,y=void 0!==b&&b,Z=e.label,C=e.tooltip,w=void 0===C?"":C,S=e.required,E=e.id,N=e.disabled,T=void 0!==N&&N,k=e.noInputIcon,I=void 0!==k&&k,L=e.classNamePrefix,F=void 0===L?"":L,A=e.openPickerIcon,B={};I||(B={startAdornment:(0,j.jsx)(u.Z,{position:"start",children:(0,j.jsx)(p.Z,{})})}),y&&(B={endAdornment:(0,j.jsx)(u.Z,{position:"end",children:(0,j.jsx)(v.Z,{className:f.openListIcon})})});var R="".concat(F,"date-time-input ").concat(m?f.dateSelectorOverride:""," ").concat(y&&!m?f.dateSelectorFilterOverride:""),W=m?f.parentDateOverride:f.dateSelectorFormOverride,P=(0,j.jsx)(d._,{dateAdapter:c.Z,children:(0,j.jsx)(x.x,{value:t,onChange:n,InputProps:(0,i.Z)((0,i.Z)({},B),{},{className:R}),components:{OpenPickerIcon:A},label:"",className:W,disabled:T,renderInput:function(e){return(0,j.jsx)(l.Z,(0,i.Z)((0,i.Z)({id:E,variant:"standard"},e),{},{disabled:!0}))},ampm:!1,PopperProps:{className:f.paperOverride}})});if(m)return P;var D=y?"":f.fieldContainer;return(0,j.jsx)(a.Fragment,{children:(0,j.jsxs)(r.ZP,{item:!0,xs:12,className:"".concat(D," ").concat(F,"input-field-container "),children:[""!==Z&&(0,j.jsxs)(o.Z,{htmlFor:E,className:"".concat(f.inputLabel," ").concat(F,"input-label"),children:[(0,j.jsxs)("span",{children:[Z,S?"*":""]}),""!==w&&(0,j.jsx)("div",{className:f.tooltipContainer,children:(0,j.jsx)(s.Z,{title:w,placement:"top-start",children:(0,j.jsx)("div",{className:f.tooltip,children:(0,j.jsx)(g.Z,{})})})})]}),(0,j.jsx)("div",{className:"".concat(f.textBoxContainer," ").concat(F,"input-wrapper "),children:P})]})})}))},56028:function(e,t,n){var i=n(29439),a=n(1413),l=n(72791),r=n(60364),o=n(13400),s=n(55646),d=n(5574),c=n(65661),x=n(39157),u=n(11135),p=n(25787),f=n(23814),h=n(25469),g=n(29823),m=n(28057),v=n(87995),j=n(80184);t.Z=(0,p.Z)((function(e){return(0,u.Z)((0,a.Z)((0,a.Z)({},f.Qw),{},{content:{padding:25,paddingBottom:0},customDialogSize:{width:"100%",maxWidth:765}},f.sN))}))((function(e){var t=e.onClose,n=e.modalOpen,u=e.title,p=e.children,f=e.classes,b=e.wideLimit,y=void 0===b||b,Z=e.noContentPadding,C=e.titleIcon,w=void 0===C?null:C,S=(0,h.TL)(),E=(0,l.useState)(!1),N=(0,i.Z)(E,2),T=N[0],k=N[1],I=(0,r.v9)((function(e){return e.system.modalSnackBar}));(0,l.useEffect)((function(){S((0,v.MK)(""))}),[S]),(0,l.useEffect)((function(){if(I){if(""===I.message)return void k(!1);"error"!==I.type&&k(!0)}}),[I]);var L=y?{classes:{paper:f.customDialogSize}}:{maxWidth:"lg",fullWidth:!0},F="";return I&&(F=I.detailedErrorMsg,(""===I.detailedErrorMsg||I.detailedErrorMsg.length<5)&&(F=I.message)),(0,j.jsxs)(d.Z,(0,a.Z)((0,a.Z)({open:n,classes:f},L),{},{scroll:"paper",onClose:function(e,n){"backdropClick"!==n&&t()},className:f.root,children:[(0,j.jsxs)(c.Z,{className:f.title,children:[(0,j.jsxs)("div",{className:f.titleText,children:[w," ",u]}),(0,j.jsx)("div",{className:f.closeContainer,children:(0,j.jsx)(o.Z,{"aria-label":"close",id:"close",className:f.closeButton,onClick:t,disableRipple:!0,size:"small",children:(0,j.jsx)(g.Z,{})})})]}),(0,j.jsx)(m.Z,{isModal:!0}),(0,j.jsx)(s.Z,{open:T,className:f.snackBarModal,onClose:function(){k(!1),S((0,v.MK)(""))},message:F,ContentProps:{className:"".concat(f.snackBar," ").concat(I&&"error"===I.type?f.errorSnackBar:"")},autoHideDuration:I&&"error"===I.type?1e4:5e3}),(0,j.jsx)(x.Z,{className:Z?"":f.content,children:p})]}))}))},31300:function(e,t,n){n(72791);var i=n(64554),a=n(56096),l=n(80184);t.Z=function(e){var t=e.onlineCount,n=void 0===t?0:t,r=e.offlineCount,o=void 0===r?0:r,s=e.icon,d=void 0===s?null:s,c=e.label,x=void 0===c?"":c,u=e.okStatusText,p=void 0===u?"Online":u,f=e.notOkStatusText,h=void 0===f?"Offline":f;return(0,l.jsx)(i.Z,{sx:{fontFamily:"Lato,sans-serif",color:"#07193E",maxWidth:"321px",display:"flex",marginLeft:"auto",marginRight:"auto",cursor:"default"},children:(0,l.jsxs)(i.Z,{sx:{flex:1,display:"flex",padding:{sm:"0 8px 0 8px",xs:"0 10px 0 10px"}},children:[(0,l.jsxs)(i.Z,{sx:{flex:1,display:"flex",flexFlow:"column"},children:[(0,l.jsx)(i.Z,{sx:{fontSize:"16px",fontWeight:600},children:x}),(0,l.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:"5px",justifyContent:"space-between",paddingBottom:{md:"0px",xs:"10px"},fontSize:{xl:"55px",lg:"50px",md:"45px",xs:"35px"},flexFlow:"row",fontWeight:600,"& .stat-text":{color:"#696969",fontSize:"12px",marginTop:"8px"},"& .stat-value":{textAlign:"center",height:"50px"},"& .min-icon":{marginRight:"8px",marginTop:"8px",height:"10px",width:"10px"}},children:[(0,l.jsxs)(i.Z,{children:[(0,l.jsx)(i.Z,{className:"stat-value",children:n}),(0,l.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",marginTop:"5px","& .min-icon":{fill:"#4CCB92"}},children:[(0,l.jsx)(a.J$M,{}),(0,l.jsx)("div",{className:"stat-text",children:p})]})]}),(0,l.jsxs)(i.Z,{children:[(0,l.jsx)(i.Z,{className:"stat-value",children:o}),(0,l.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",marginTop:"8px","& .min-icon":{fill:"#C83B51"}},children:[(0,l.jsx)(a.J$M,{})," ",(0,l.jsx)("div",{className:"stat-text",children:h})]})]})]})]}),(0,l.jsx)(i.Z,{sx:{width:"20px",height:"20px",marginTop:"8px",maxWidth:"26px","& .min-icon":{width:"16px",height:"16px"}},children:d})]})})}},879:function(e,t,n){n.d(t,{D_:function(){return r},Et:function(){return a},GJ:function(){return l},yh:function(){return i}});var i={RED:"#C83B51",GREEN:"#4CCB92",YELLOW:"#E7A219"},a=function(e,t){return e<=t/2?i.RED:2!==t&&e===t/2+1?i.YELLOW:e===t?i.GREEN:void 0},l=function(e){switch(e){case"offline":return i.RED;case"online":return i.GREEN;default:return i.YELLOW}},r=function(e,t){return e<=t/2?i.RED:e===t/2+1?i.YELLOW:e===t?i.GREEN:void 0}},24131:function(e,t,n){n.r(t),n.d(t,{default:function(){return wt}});var i,a=n(29439),l=n(1413),r=n(72791),o=n(93433),s=n(60364),d=n(61889),c=n(11135),x=n(25787),u=n(64554),p=n(40986),f=n(23814),h=n(26181),g=n.n(h);!function(e){e.singleValue="singleValue",e.linearGraph="linearGraph",e.areaGraph="areaGraph",e.barChart="barChart",e.pieChart="pieChart",e.singleRep="singleRep",e.simpleWidget="simpleWidget"}(i||(i={}));var m=n(45248),v=n(51846),j=n(82332),b=n(56096),y=n(80184),Z=["#C4D4E9","#DCD1EE","#D1EEE7","#EEDED1","#AAF38F","#F9E6C5","#C83B51","#F4CECE","#D6D6D6"],C=function(e){return(0,m.v1)(e,"ns")},w=function(e){return parseInt(e).toString(10)},S=[{id:1,title:"Uptime",data:"N/A",type:i.simpleWidget,widgetIcon:(0,y.jsx)(b.oNq,{}),labelDisplayFunction:m.v1},{id:50,title:"Capacity",data:[],dataOuter:[{name:"outer",value:100}],widgetConfiguration:{outerChart:{colorList:["#9c9c9c"],innerRadius:0,outerRadius:0,startAngle:0,endAngle:0},innerChart:{colorList:Z,innerRadius:20,outerRadius:50,startAngle:90,endAngle:-200}},type:i.pieChart,innerLabel:"N/A",labelDisplayFunction:m.ae},{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:Z,innerRadius:20,outerRadius:50,startAngle:90,endAngle:-200}},type:i.pieChart,innerLabel:"N/A",labelDisplayFunction:m.ae},{id:68,title:"Data Usage Growth",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:i.areaGraph,yAxisFormatter:m.ae,xAxisFormatter:m.Ue},{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:i.barChart},{id:66,title:"Buckets",data:[],innerLabel:"N/A",type:i.singleRep,color:"#0071BC",fillColor:"#ADD5E0"},{id:44,title:"Objects",data:[],innerLabel:"N/A",type:i.singleRep,color:"#0071BC",fillColor:"#ADD5E0"},{id:63,title:"API Data Received Rate",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000",strokeWidth:3}],type:i.linearGraph,xAxisFormatter:m.Ue,yAxisFormatter:m.ae},{id:61,title:"Total Open FDs",data:[],innerLabel:"N/A",type:i.singleRep,color:"#22B573",fillColor:"#A6E8C4"},{id:62,title:"Total Goroutines",data:[],innerLabel:"N/A",type:i.singleRep,color:"#F7655E",fillColor:"#F4CECE"},{id:77,title:"Node CPU Usage",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:i.linearGraph,yAxisFormatter:w,xAxisFormatter:m.Ue},{id:60,title:"API Request Rate",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:i.linearGraph,yAxisFormatter:w,xAxisFormatter:m.Ue},{id:70,title:"API Data Sent Rate",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:i.linearGraph,xAxisFormatter:m.Ue,yAxisFormatter:m.ae},{id:17,title:"Internode Data Transfer",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:i.linearGraph,yAxisFormatter:m.ae,xAxisFormatter:m.Ue},{id:73,title:"Node IO",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:i.linearGraph,yAxisFormatter:m.ae,xAxisFormatter:m.Ue},{id:80,title:"Time Since Last Heal Activity",data:"N/A",type:i.simpleWidget,widgetIcon:(0,y.jsx)(v.Z,{}),labelDisplayFunction:C},{id:81,title:"Time Since Last Scan Activity",data:"N/A",type:i.simpleWidget,widgetIcon:(0,y.jsx)(j.Z,{}),labelDisplayFunction:C},{id:71,title:"API Request Error Rate",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:i.linearGraph,xAxisFormatter:m.Ue},{id:76,title:"Node Memory Usage",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:i.linearGraph,xAxisFormatter:m.Ue,yAxisFormatter:m.ae},{id:74,title:"Drive Used Capacity",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:i.linearGraph,xAxisFormatter:m.Ue,yAxisFormatter:m.ae},{id:82,title:"Drives Free Inodes",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:i.linearGraph,disableYAxis:!0,xAxisFormatter:m.Ue},{id:11,title:"Node Syscalls",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:i.linearGraph,yAxisFormatter:w,xAxisFormatter:m.Ue},{id:8,title:"Node File Descriptors",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:i.linearGraph,yAxisFormatter:w,xAxisFormatter:m.Ue},{id:500,mergedPanels:[{id:53,title:"Online",data:"N/A",type:i.singleValue},{id:69,title:"Offline",data:"N/A",type:i.singleValue}],title:"Servers"},{id:501,mergedPanels:[{id:9,title:"Online",data:"N/A",type:i.singleValue},{id:78,title:"Offline",data:"N/A",type:i.singleValue}],title:"Drives"},{id:502,mergedPanels:[{id:65,title:"Upload",data:"N/A",type:i.singleValue,labelDisplayFunction:m.ae},{id:64,title:"Download",data:"N/A",type:i.singleValue,labelDisplayFunction:m.ae}],title:"Network"}],E=function(e,t){if(0===e.length)return["","0"];if("mean"===t){var n=e.reduce((function(e,t){return e+parseFloat(t[1])}),0);return["",Math.floor(n/e.length).toString()]}var i=e.sort((function(e,t){return e[0]-t[0]}));return i[i.length-1]},N=function(e,t){if(!e)return t;var n=e.type;switch(t.type){case i.singleValue:case i.simpleWidget:if("stat"===n||"singlestat"===n){var a=g()(e,"targets[0].result[0].values",[]);null===a&&(a=[]);var r=g()(e,"options.reduceOptions.calcs[0]","lastNotNull"),o=E(a,r),s=t.labelDisplayFunction?t.labelDisplayFunction(o[1]):o[1];return(0,l.Z)((0,l.Z)({},t),{},{data:s})}break;case i.pieChart:if("gauge"===n){var d=g()(e,"options.reduceOptions.calcs[0]","lastNotNull"),c=g()(e,"targets",[]).filter((function(e){return null!==e})),x=c.map((function(e){var t=(e.result&&Array.isArray(e.result)?e.result:[]).map((function(t){var n=g()(t,"values",[]),i=Object.keys(t.metric),a=n.sort((function(e,t){return parseInt(e[0][1])-parseInt(t[0][1])})),l=t.metric[i[0]],r=a[a.length-1];return{name:l,value:parseInt(r[1]),legend:e.legendFormat}}));return t})),u=c[0].result&&c[0].result.length>0?c[0].result[0].values:[],p=E(u,d),f=t.labelDisplayFunction?t.labelDisplayFunction(p[1]):p[1];return(0,l.Z)((0,l.Z)({},t),{},{data:x,innerLabel:f})}break;case i.linearGraph:case i.areaGraph:if("graph"===n){var h=g()(e,"targets",[]);null===h&&(h=[]);var v=[],j=[];h.forEach((function(e,t){var n=g()(e,"result",[]),i=e.legendFormat;null===n&&(n=[]),n.forEach((function(e){var n=function(e,t){var n=Object.keys(e),i=new RegExp("{{(".concat(n.join("|"),")}}"),"g"),a=t.replace(i,(function(t){var n=t.replace(/({{|}})/g,"");return e[n]})),l=(a.match(/{{/g)||[]).length,r=(a.match(/}}/g)||[]).length,o=a.replace(/{{(.*?)}}/g,"");return l===r&&0!==l&&0!==r&&(n.forEach((function(t){a=a.replace(t,e[t])})),o=a),o}(e.metric,i),a="key_".concat(t).concat(n);v.push({dataKey:a,keyLabel:n,lineColor:"",fillColor:""});var l=g()(e,"values",[]);null===l&&(l=[]),l.forEach((function(e){var t=j.findIndex((function(t){return t.name===e[0]}));if(-1===t){var n={name:e[0]};n[a]=e[1],j.push(n)}else j[t][a]=e[1]}))}))}));var b=v.sort((function(e,t){return e.keyLabel<t.keyLabel?-1:e.keyLabel>t.keyLabel?1:0})).map((function(e,t){return(0,l.Z)((0,l.Z)({},e),{},{lineColor:Z[t]||(0,m.C5)(e.keyLabel),fillColor:Z[t]||(0,m.C5)(e.keyLabel)})})),y=j.sort((function(e,t){return e.name-t.name}));return(0,l.Z)((0,l.Z)({},t),{},{widgetConfiguration:b,data:y})}break;case i.barChart:if("bargauge"===n){var C=g()(e,"targets[0].result",[]);null===C&&(C=[]);var w=function(e,t){return e[0]-t[0]},S=[];return S=t.customStructure?t.customStructure.map((function(e){var t=C.find((function(t){var n=Object.keys(t.metric);return t.metric[n[0]]===e.originTag})),n=g()(t,"values",[]).sort(w),i=n[n.length-1]||["","0"];return{name:e.displayTag,a:parseInt(i[1])}})):C.map((function(e){var t=Object.keys(e.metric),n=e.metric[t[0]],i=g()(e,"values",[]).sort(w),a=i[i.length-1]||["","0"];return{name:n,a:parseInt(a[1])}})),(0,l.Z)((0,l.Z)({},t),{},{data:S})}break;case i.singleRep:if("stat"===n){var N=g()(e,"targets[0].result[0].values",[]);null===N&&(N=[]);var T=g()(e,"options.reduceOptions.calcs[0]","lastNotNull"),k=E(N,T),I=N.sort((function(e,t){return e[0]-t[0]})),L=[];1===I.length&&L.push({value:0}),I.forEach((function(e){L.push({value:parseInt(e[1])})}));var F=t.labelDisplayFunction?t.labelDisplayFunction(k[1]):k[1];return(0,l.Z)((0,l.Z)({},t),{},{data:L,innerLabel:F})}}return t},T=function(e){var t=e.split(" "),n=function(){var t=e;return isNaN(parseFloat(e))||(t=(0,m.nk)(parseFloat(e))),(0,y.jsx)(r.Fragment,{children:t})};return 2!==t.length?n():m.Dl.includes(t[1])?(0,y.jsxs)("span",{className:"commonValue",children:[t[0],(0,y.jsx)("span",{className:"unitText",children:t[1]})]}):n()},k=n(19847),I=n(72455),L=n(18073),F=n(43896),A=(0,I.Z)({tabRoot:{height:"40px",borderBottom:"1px solid #eaeaea"},root:{width:"120px",backgroundColor:"transparent",paddingTop:0,paddingBottom:0,fontSize:"14px",fontWeight:600,color:"#07193E",height:"40px"},selected:{"&.MuiTab-selected":{backgroundColor:"#F6F7F7 !important"},"&.MuiTab-wrapper":{color:"#07193E",fontWeight:600}},indicator:{background:"transparent linear-gradient(90deg, #072B4E 0%, #081C42 100%) 0% 0% no-repeat padding-box;",height:2},scroller:{maxWidth:1185,position:"relative","&::after":{content:'" "',backgroundColor:"#EEF1F4",height:2,width:"100%",display:"block"}}}),B=function(e){var t=e.selectedTab,n=e.onChange,i=e.tabOptions,a=A();return(0,y.jsx)(r.Fragment,{children:(0,y.jsx)(L.Z,{indicatorColor:"primary",textColor:"primary","aria-label":"cluster-tabs",variant:"scrollable",scrollButtons:"auto",value:t,onChange:function(e,t){n(t)},classes:{root:a.tabRoot,indicator:a.indicator,scroller:a.scroller},children:i.map((function(e,t){var n={label:e.label};return e.value&&(n=(0,l.Z)((0,l.Z)({},n),{},{value:e.value})),e.disabled&&(n=(0,l.Z)((0,l.Z)({},n),{},{disabled:e.disabled})),(0,r.createElement)(F.Z,(0,l.Z)((0,l.Z)({},n),{},{classes:{root:a.root,selected:a.selected},id:"simple-tab-".concat(t),"aria-controls":"simple-tabpanel-".concat(t),key:"tab-".concat(t,"-").concat(e.label)}))}))})})},R=n(20601),W=n(38725),P=n(90466),D=n(12891),z=n(24714),M=n(41048),O=n(35667),G=n(95193),U=(0,x.Z)((function(e){return(0,c.Z)((0,l.Z)({},f.Rp))}))((function(e){var t=e.active,n=e.payload,i=e.label,a=e.barChartConfiguration,l=e.classes;return t?(0,y.jsxs)("div",{className:l.customTooltip,children:[(0,y.jsx)("div",{className:l.timeStampTitle,children:i}),n&&n.map((function(e,t){return(0,y.jsxs)("div",{className:l.labelContainer,children:[(0,y.jsx)("div",{className:l.labelColor,style:{backgroundColor:a[t].color}}),(0,y.jsx)("div",{className:l.itemValue,children:(0,y.jsx)("span",{className:l.valueContainer,children:e.value})})]},"pltiem-".concat(t,"-").concat(i))}))]}):null})),_=n(81207),V=n(29598),K=n(72401),H=n(64119),$=n(71080),J=n(25469),Y=function(e){var t=e.panelItem,n=(0,J.TL)();return(0,y.jsx)(u.Z,{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,y.jsx)("button",{onClick:function(){n((0,$.xG)(t))},className:"zoom-graph-icon",children:(0,y.jsx)(H.Z,{})})})},q=n(87995),Q=n(71715),X=n(23786),ee=n(49900),te=n(91097),ne=function(e){var t=e.title,n=e.componentRef,i=e.data,l=r.useState(null),o=(0,a.Z)(l,2),s=o[0],d=o[1],c=Boolean(s),x=(0,J.TL)(),p=function(){var e;null!==i&&i.length>0?function(e,t){var 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=i,[Object.keys(e[0])].concat(e).map((function(e){return Object.values(e).toString()})).join("\n"))):function(e){x((0,q.Ih)(e))}({errorMessage:"Unable to download widget data",detailedError:"Unable to download widget data - data not available"})};return(0,y.jsx)(r.Fragment,{children:(0,y.jsxs)(u.Z,{justifyItems:"center",sx:{"& .download-icon":{backgroundColor:"transparent",border:0,padding:0,cursor:"pointer","& svg":{color:"#D0D0D0",height:16},"&:hover":{"& svg":{color:"#404143"}}}},children:[(0,y.jsx)("button",{onClick:function(e){d(e.currentTarget)},className:"download-icon",children:(0,y.jsx)(b._8t,{})}),(0,y.jsxs)(Q.Z,{id:"download-widget-main-menu","aria-labelledby":"download-widget-main",anchorEl:s,open:c,onClose:function(){d(null)},children:[(0,y.jsx)(X.Z,{onClick:function(){p()},children:(0,y.jsx)(ee.Z,{children:"Download as CSV"})}),(0,y.jsx)(X.Z,{onClick:function(){!function(){if(null!==t){var e=(t+"_"+Date.now().toString()+".png").replace(/\s+/g,"").trim().toLowerCase();(0,te.exportComponentAsPNG)(n,{fileName:e})}else{var i="widgetData_"+Date.now().toString()+".png";(0,te.exportComponentAsPNG)(n,{fileName:i})}}()},children:(0,y.jsx)(ee.Z,{children:"Download as PNG"})})]})]})})},ie=function(e){var t=e.y,n=e.payload;return(0,y.jsx)("text",{width:50,fontSize:"69.7%",textAnchor:"start",fill:"#333",transform:"translate(5,".concat(t,")"),fontWeight:400,dy:3,children:n.value})},ae=(0,x.Z)((function(e){return(0,c.Z)((0,l.Z)((0,l.Z)({},f.NP),{},{loadingAlign:{width:"100%",paddingTop:"15px",textAlign:"center",margin:"auto"}}))}))((function(e){var t=e.classes,n=e.title,i=e.panelItem,l=e.timeStart,o=e.timeEnd,c=(e.propLoading,e.apiPrefix),x=e.zoomActivated,u=void 0!==x&&x,p=(0,J.TL)(),f=(0,r.useState)(!1),h=(0,a.Z)(f,2),g=h[0],m=h[1],v=(0,r.useState)([]),j=(0,a.Z)(v,2),b=j[0],Z=j[1],C=(0,r.useState)(null),w=(0,a.Z)(C,2),S=w[0],E=w[1],T=(0,r.useState)(!1),k=(0,a.Z)(T,2),I=k[0],L=k[1],F=(0,r.useRef)(),A=(0,s.v9)((function(e){return e.dashboard.widgetLoadVersion}));(0,r.useEffect)((function(){m(!0)}),[A]),(0,r.useEffect)((function(){if(g){var e=0;if(null!==l&&null!==o){var t=o.unix()-l.unix(),n=Math.floor(t/60);e=n<1?15:n}_.Z.invoke("GET","/api/v1/".concat(c,"/info/widgets/").concat(i.id,"/?step=").concat(e,"&").concat(null!==l?"&start=".concat(l.unix()):"").concat(null!==l&&null!==o?"&":"").concat(null!==o?"end=".concat(o.unix()):"")).then((function(e){var t=N(e,i);Z(t.data),E(t),m(!1)})).catch((function(e){p((0,q.Ih)(e)),m(!1)}))}}),[g,i,o,l,p,c]);var B=S?S.widgetConfiguration:[],H=0,$=0;if(1===B.length){var Q=B[0];b.forEach((function(e,t){e[Q.dataKey]>$&&($=e[Q.dataKey],H=t)}))}var X=(0,V.Z)(),ee=(0,G.Z)(X.breakpoints.up("md"));return(0,y.jsxs)("div",{className:u?"":t.singleValueContainer,onMouseOver:function(){L(!0)},onMouseLeave:function(){L(!1)},children:[!u&&(0,y.jsxs)(d.ZP,{container:!0,children:[(0,y.jsx)(d.ZP,{item:!0,xs:10,alignItems:"start",justifyItems:"start",children:(0,y.jsx)("div",{className:t.titleContainer,children:n})}),(0,y.jsx)(d.ZP,{item:!0,xs:1,display:"flex",justifyContent:"flex-end",children:I&&(0,y.jsx)(Y,{panelItem:i})}),(0,y.jsx)(d.ZP,{item:!0,xs:1,display:"flex",justifyContent:"flex-end",children:(0,y.jsx)(ne,{title:n,componentRef:F,data:b})})]}),g&&(0,y.jsx)("div",{className:t.loadingAlign,children:(0,y.jsx)(K.Z,{})}),!g&&(0,y.jsx)("div",{ref:F,className:u?t.zoomChartCont:t.contentContainer,children:(0,y.jsx)(R.h,{width:"99%",children:(0,y.jsxs)(W.v,{data:b,layout:"vertical",barCategoryGap:1,children:[(0,y.jsx)(P.K,{type:"number",hide:!0}),(0,y.jsx)(D.B,{dataKey:"name",type:"category",interval:0,tick:(0,y.jsx)(ie,{}),tickLine:!1,axisLine:!1,width:150,hide:!ee,style:{fontSize:"12px",fontWeight:100}}),B.map((function(e){return(0,y.jsx)(z.$,{dataKey:e.dataKey,fill:e.color,background:e.background,barSize:u?25:12,children:1===B.length?(0,y.jsx)(r.Fragment,{children:b.map((function(t,n){return(0,y.jsx)(M.b,{fill:n===H?e.greatestColor:e.color},"chart-bar-".concat(n.toString()))}))}):null},"bar-".concat(e.dataKey))})),(0,y.jsx)(O.u,{cursor:{fill:"rgba(255, 255, 255, 0.3)"},content:(0,y.jsx)(U,{barChartConfiguration:B})})]})})})]})})),le=n(37762),re=n(28265),oe=n(82839),se=n(18602),de=(0,x.Z)((function(e){return(0,c.Z)((0,l.Z)({},f.Rp))}))((function(e){var t=e.active,n=e.payload,i=e.label,a=e.linearConfiguration,l=e.yAxisFormatter,r=e.classes;return t?(0,y.jsxs)("div",{className:r.customTooltip,children:[(0,y.jsx)("div",{className:r.timeStampTitle,children:(0,m.Ue)(i,!0)}),n&&n.map((function(e,t){return(0,y.jsxs)("div",{className:r.labelContainer,children:[(0,y.jsx)("div",{className:r.labelColor,style:{backgroundColor:a[t].lineColor}}),(0,y.jsx)("div",{className:r.itemValue,children:(0,y.jsxs)("span",{className:r.valueContainer,children:[a[t].keyLabel,":"," ",l(e.value)]})})]},"lbPl-".concat(t,"-").concat(a[t].keyLabel))}))]}):null})),ce=(0,x.Z)((function(e){return(0,c.Z)((0,l.Z)((0,l.Z)({},f.NP),{},{verticalAlignment:{flexDirection:"column"},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:"#404143",fontWeight:"bold",fontSize:12},loadingAlign:{width:40,height:40,textAlign:"center",margin:"15px auto"}}))}))((function(e){var t=e.classes,n=e.title,i=e.timeStart,o=e.timeEnd,c=(e.propLoading,e.panelItem),x=e.apiPrefix,p=e.hideYAxis,f=void 0!==p&&p,h=e.areaWidget,g=void 0!==h&&h,m=e.yAxisFormatter,v=void 0===m?function(e){return e}:m,j=e.xAxisFormatter,b=void 0===j?function(e,t,n){return e}:j,Z=e.zoomActivated,C=void 0!==Z&&Z,w=(0,J.TL)(),S=(0,r.useState)(!1),E=(0,a.Z)(S,2),T=E[0],k=E[1],I=(0,r.useState)(!1),L=(0,a.Z)(I,2),F=L[0],A=L[1],B=(0,r.useState)([]),W=(0,a.Z)(B,2),z=W[0],M=W[1],U=(0,r.useState)([]),H=(0,a.Z)(U,2),$=H[0],Q=H[1],X=(0,r.useState)(0),ee=(0,a.Z)(X,2),te=ee[0],ie=ee[1],ae=(0,r.useState)(null),ce=(0,a.Z)(ae,2),xe=ce[0],ue=ce[1],pe=(0,s.v9)((function(e){return e.dashboard.widgetLoadVersion})),fe=(0,r.useRef)();(0,r.useEffect)((function(){k(!0)}),[pe]),(0,r.useEffect)((function(){if(T){var e=0;if(null!==i&&null!==o){var t=o.unix()-i.unix(),n=Math.floor(t/60);e=n<1?15:n}_.Z.invoke("GET","/api/v1/".concat(x,"/info/widgets/").concat(c.id,"/?step=").concat(e,"&").concat(null!==i?"&start=".concat(i.unix()):"").concat(null!==i&&null!==o?"&":"").concat(null!==o?"end=".concat(o.unix()):"")).then((function(e){var t=N(e,c);M(t.data),ue(t),k(!1);var n,i=0,a=(0,le.Z)(t.data);try{for(a.s();!(n=a.n()).done;){var l=n.value;for(var r in l)if("name"!==r){var o=parseInt(l[r]);isNaN(o)&&(o=0),i<o&&(i=o)}}}catch(s){a.e(s)}finally{a.f()}ie(i)})).catch((function(e){w((0,q.Ih)(e)),k(!1)}))}}),[T,c,o,i,w,x]);var he=Math.floor(z.length/5);(0,r.useEffect)((function(){var e=z.map((function(e){var t=new Date(1e3*(null===e||void 0===e?void 0:e.name));return(0,l.Z)((0,l.Z)({},e),{},{name:t})}));Q(e)}),[z]);var ge=xe?null===xe||void 0===xe?void 0:xe.widgetConfiguration:[],me=function(e){var t=e.cx,n=e.cy;return e.index%3!==0?null:(0,y.jsx)("circle",{cx:t,cy:n,r:3,strokeWidth:0,fill:"#07264A"})},ve=(0,V.Z)(),je=(0,G.Z)(ve.breakpoints.up("md")),be=!1;return C&&(be=!0),(0,y.jsxs)(u.Z,{className:C?"":t.singleValueContainer,onMouseOver:function(){A(!0)},onMouseLeave:function(){A(!1)},children:[!C&&(0,y.jsxs)(d.ZP,{container:!0,alignItems:"left",children:[(0,y.jsx)(d.ZP,{item:!0,xs:10,alignItems:"start",children:(0,y.jsx)("div",{className:t.titleContainer,children:n})}),(0,y.jsx)(d.ZP,{item:!0,xs:1,display:"flex",justifyContent:"flex-end",alignContent:"flex-end",children:F&&(0,y.jsx)(Y,{panelItem:c})}),(0,y.jsx)(d.ZP,{item:!0,xs:1,display:"flex",justifyContent:"flex-end",children:(0,y.jsx)(ne,{title:n,componentRef:fe,data:$})})]}),(0,y.jsxs)(u.Z,{sx:C?{flexDirection:"column"}:{height:"100%",display:"grid",gridTemplateColumns:{md:"1fr 1fr",sm:"1fr"}},style:g?{gridTemplateColumns:"1fr"}:{},ref:fe,children:[T&&(0,y.jsx)(K.Z,{className:t.loadingAlign}),!T&&(0,y.jsxs)(r.Fragment,{children:[(0,y.jsx)("div",{className:C?t.zoomChartCont:t.chartCont,children:(0,y.jsx)(R.h,{width:"99%",children:(0,y.jsxs)(re.T,{data:z,margin:{top:5,right:20,left:f?20:5,bottom:0},children:[g&&(0,y.jsx)("defs",{children:(0,y.jsxs)("linearGradient",{id:"colorUv",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,y.jsx)("stop",{offset:"0%",stopColor:"#2781B0",stopOpacity:1}),(0,y.jsx)("stop",{offset:"100%",stopColor:"#ffffff",stopOpacity:0}),(0,y.jsx)("stop",{offset:"95%",stopColor:"#ffffff",stopOpacity:.8})]})}),(0,y.jsx)(oe.q,{strokeDasharray:g?"2 2":"5 5",strokeWidth:1,strokeOpacity:1,stroke:"#eee0e0",vertical:!g}),(0,y.jsx)(P.K,{dataKey:"name",tickFormatter:function(e){return b(e,be,!0)},interval:he,tick:{fontSize:"68%",fontWeight:"normal",color:"#404143"},tickCount:10,stroke:"#082045"}),(0,y.jsx)(D.B,{type:"number",domain:[0,1.1*te],hide:f,tickFormatter:function(e){return v(e)},tick:{fontSize:"68%",fontWeight:"normal",color:"#404143"},stroke:"#082045"}),ge.map((function(e,t){return(0,y.jsx)(se.u,{type:"monotone",dataKey:e.dataKey,isAnimationActive:!1,stroke:g?"#D7E5F8":e.lineColor,fill:g?"url(#colorUv)":e.fillColor,fillOpacity:g?.65:0,strokeWidth:g?0:3,strokeLinecap:"round",dot:!!g&&(0,y.jsx)(me,{})},"area-".concat(e.dataKey,"-").concat(t.toString()))})),(0,y.jsx)(O.u,{content:(0,y.jsx)(de,{linearConfiguration:ge,yAxisFormatter:v}),wrapperStyle:{zIndex:5e3}})]})})}),!g&&(0,y.jsxs)(r.Fragment,{children:[C&&(0,y.jsxs)(r.Fragment,{children:[(0,y.jsx)("strong",{children:"Series"}),(0,y.jsx)("br",{}),(0,y.jsx)("br",{})]}),je&&(0,y.jsx)("div",{className:t.legendChart,children:ge.map((function(e,n){return(0,y.jsxs)("div",{className:t.singleLegendContainer,children:[(0,y.jsx)("div",{className:t.colorContainer,style:{backgroundColor:e.lineColor}}),(0,y.jsx)("div",{className:t.legendLabel,children:e.keyLabel})]},"legend-".concat(e.keyLabel,"-").concat(n.toString()))}))})]})]})]})]})})),xe=n(73909),ue=n(21041),pe=(0,x.Z)((function(e){return(0,c.Z)((0,l.Z)((0,l.Z)({},f.NP),{},{loadingAlign:{width:"100%",paddingTop:"15px",textAlign:"center",margin:"auto"},pieChartLabel:{fontSize:60,color:"#07193E",fontWeight:"bold",width:"100%","& .unitText":{color:"#767676",fontSize:12}},chartContainer:{width:"100%",height:140}}))}))((function(e){var t=e.classes,n=e.title,i=e.panelItem,l=e.timeStart,o=e.timeEnd,d=(e.propLoading,e.apiPrefix),c=(0,J.TL)(),x=(0,r.useState)(!1),u=(0,a.Z)(x,2),p=u[0],f=u[1],h=(0,r.useState)([]),m=(0,a.Z)(h,2),v=m[0],j=m[1],b=(0,r.useState)([]),Z=(0,a.Z)(b,2),C=Z[0],w=Z[1],S=(0,r.useState)(null),E=(0,a.Z)(S,2),k=E[0],I=E[1],L=(0,s.v9)((function(e){return e.dashboard.widgetLoadVersion}));(0,r.useEffect)((function(){f(!0)}),[L]),(0,r.useEffect)((function(){if(p){var e=0;if(null!==l&&null!==o){var t=o.unix()-l.unix(),n=Math.floor(t/60);e=n<1?15:n}_.Z.invoke("GET","/api/v1/".concat(d,"/info/widgets/").concat(i.id,"/?step=").concat(e,"&").concat(null!==l?"&start=".concat(l.unix()):"").concat(null!==l&&null!==o?"&":"").concat(null!==o?"end=".concat(o.unix()):"")).then((function(e){var t=N(e,i);j(t.data),w(t.dataOuter),I(t),f(!1)})).catch((function(e){c((0,q.Ih)(e)),f(!1)}))}}),[p,i,o,l,c,d]);var F=k?k.widgetConfiguration:[],A=null===k||void 0===k?void 0:k.innerLabel,B=g()(F,"innerChart.colorList",[]),W=g()(F,"outerChart.colorList",[]);return(0,y.jsxs)("div",{className:t.singleValueContainer,children:[(0,y.jsx)("div",{className:t.titleContainer,children:n}),p&&(0,y.jsx)("div",{className:t.loadingAlign,children:(0,y.jsx)(K.Z,{})}),!p&&(0,y.jsxs)("div",{className:t.contentContainer,children:[(0,y.jsx)("span",{className:t.pieChartLabel,children:A&&T(A)}),(0,y.jsx)("div",{className:t.chartContainer,children:(0,y.jsx)(R.h,{width:"99%",children:(0,y.jsxs)(xe.u,{margin:{top:5,bottom:5},children:[C&&(0,y.jsx)(ue.b,{data:C,cx:"50%",cy:"50%",dataKey:"value",innerRadius:g()(F,"outerChart.innerRadius",0),outerRadius:g()(F,"outerChart.outerRadius","80%"),startAngle:g()(F,"outerChart.startAngle",0),endAngle:g()(F,"outerChart.endAngle",360),fill:"#201763",children:C.map((function(e,t){return(0,y.jsx)(M.b,{fill:"undefined"===typeof W[t]?"#393939":W[t]},"cellOuter-".concat(t))}))}),v&&(0,y.jsx)(ue.b,{data:v,dataKey:"value",cx:"50%",cy:"50%",innerRadius:g()(F,"innerChart.innerRadius",0),outerRadius:g()(F,"innerChart.outerRadius","80%"),startAngle:g()(F,"innerChart.startAngle",0),endAngle:g()(F,"innerChart.endAngle",360),fill:"#201763",children:v.map((function(e,t){return(0,y.jsx)(M.b,{fill:"undefined"===typeof B[t]?"#393939":B[t]},"cell-".concat(t))}))})]})})})]})]})})),fe=(0,s.$j)(null,{setErrorSnackMessage:q.Ih}),he=(0,x.Z)((function(e){return(0,c.Z)({mainWidgetContainer:{display:"inline-flex",color:"#072A4D",alignItems:"center"},icon:{color:"#072A4D",fill:"#072A4D",marginRight:5,marginLeft:12},widgetLabel:{fontWeight:"bold",textTransform:"uppercase",marginRight:10},widgetValue:{marginRight:25}})}))(fe((function(e){var t=e.classes,n=e.iconWidget,i=e.title,l=e.panelItem,o=e.timeStart,d=e.timeEnd,c=(e.propLoading,e.apiPrefix),x=e.renderFn,u=(0,J.TL)(),p=(0,r.useState)(!1),f=(0,a.Z)(p,2),h=f[0],g=f[1],m=(0,r.useState)(""),v=(0,a.Z)(m,2),j=v[0],b=v[1],Z=(0,s.v9)((function(e){return e.dashboard.widgetLoadVersion}));return(0,r.useEffect)((function(){g(!0)}),[Z]),(0,r.useEffect)((function(){if(h){var e=0;if(null!==o&&null!==d){var t=d.unix()-o.unix(),n=Math.floor(t/60);e=n<1?15:n}_.Z.invoke("GET","/api/v1/".concat(c,"/info/widgets/").concat(l.id,"/?step=").concat(e,"&").concat(null!==o?"&start=".concat(o.unix()):"").concat(null!==o&&null!==d?"&":"").concat(null!==d?"end=".concat(d.unix()):"")).then((function(e){var t=N(e,l);b(t.data),g(!1)})).catch((function(e){u((0,q.Ih)(e)),g(!1)}))}}),[h,l,d,o,u,c]),x?x({valueToRender:j,loading:h,title:i,id:l.id,iconWidget:n}):(0,y.jsxs)(r.Fragment,{children:[h&&(0,y.jsx)("div",{className:t.loadingAlign,children:(0,y.jsx)(K.Z,{})}),!h&&(0,y.jsxs)("span",{className:t.mainWidgetContainer,children:[(0,y.jsx)("span",{className:t.icon,children:n||null}),(0,y.jsxs)("span",{className:t.widgetLabel,children:[i,": "]}),(0,y.jsx)("span",{className:t.widgetValue,children:j})]})]})}))),ge=function(e){var t=e.children;return(0,y.jsx)(u.Z,{sx:{border:"1px solid #f1f1f1",borderRadius:"3px",padding:{md:"15px",xs:"5px"},height:{md:"136px",xs:"auto"},maxWidth:{sm:"100%"}},children:t})},me=n(20068),ve=function(e){var t=e.value,n=e.label,i=void 0===n?"":n,a=e.icon,l=void 0===a?null:a,r=e.loading,o=void 0!==r&&r;return(0,y.jsx)(u.Z,{sx:{fontFamily:"Lato,sans-serif",color:"#07193E",maxWidth:"300px",display:"flex",marginLeft:"auto",marginRight:"auto",cursor:"default",position:"relative",width:"100%"},children:(0,y.jsxs)(u.Z,{sx:{flex:1,display:"flex",width:"100%",padding:{sm:"0 8px 0 8px",xs:"0 10px 0 10px"}},children:[(0,y.jsxs)(u.Z,{sx:{flex:1,display:"flex",flexFlow:"column",marginTop:"12px",zIndex:10,overflow:"hidden"},children:[(0,y.jsx)(u.Z,{sx:{fontSize:"16px",fontWeight:600},children:i}),(0,y.jsx)(me.Z,{title:t,placement:"bottom",enterDelay:500,children:(0,y.jsx)(u.Z,{sx:{fontSize:{xl:"55px",lg:"50px",md:"36px",sm:"35px",xs:"35px"},fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",maxWidth:{md:187,xs:200},flexFlow:{md:"row",xs:"column"}},children:t})})]}),(0,y.jsx)(u.Z,{sx:{display:"flex",flexFlow:"column",alignItems:"center",justifyContent:"flex-start",marginTop:"8px",maxWidth:"26px","& .min-icon":{width:"16px",height:"16px"}},children:o?(0,y.jsx)(K.Z,{style:{width:"16px",height:"16px"}}):l})]})})},je=function(e){var t=e.title,n=e.value,i=e.loading;return(0,y.jsx)(ve,{label:t,icon:(0,y.jsx)(b.wNb,{}),value:n,loading:i})},be=function(e){var t=e.title,n=e.value,i=e.loading;return(0,y.jsx)(ve,{label:t,icon:(0,y.jsx)(b.xpX,{}),value:n,loading:i})},ye=(0,s.$j)(null,{setErrorSnackMessage:q.Ih})((function(e){var t=e.title,n=e.panelItem,i=e.timeStart,l=e.timeEnd,o=(e.propLoading,e.apiPrefix),d=(0,J.TL)(),c=(0,r.useState)(!1),x=(0,a.Z)(c,2),u=x[0],p=x[1],f=(0,r.useState)(null),h=(0,a.Z)(f,2),g=h[0],v=h[1],j=(0,s.v9)((function(e){return e.dashboard.widgetLoadVersion}));(0,r.useEffect)((function(){p(!0)}),[j]),(0,r.useEffect)((function(){if(u){var e=0;if(null!==i&&null!==l){var t=l.unix()-i.unix(),a=Math.floor(t/60);e=a<1?15:a}_.Z.invoke("GET","/api/v1/".concat(o,"/info/widgets/").concat(n.id,"/?step=").concat(e,"&").concat(null!==i?"&start=".concat(i.unix()):"").concat(null!==i&&null!==l?"&":"").concat(null!==l?"end=".concat(l.unix()):"")).then((function(e){var t=N(e,n);v(t),p(!1)})).catch((function(e){d((0,q.Ih)(e)),p(!1)}))}}),[u,n,l,i,d,o]);var b="";if(g){var Z=parseInt(g.innerLabel||"0");b=isNaN(Z)?"0":(0,m.nk)(Z)}var C;return 66===(C=n.id)?(0,y.jsx)(ge,{children:(0,y.jsx)(je,{loading:u,title:t,value:g?b:""})}):44===C?(0,y.jsx)(ge,{children:(0,y.jsx)(be,{loading:u,title:t,value:g?b:""})}):null})),Ze=(0,s.$j)(null,{setErrorSnackMessage:q.Ih}),Ce=(0,x.Z)((function(e){return(0,c.Z)((0,l.Z)((0,l.Z)({},f.NP),{},{loadingAlign:{width:"100%",textAlign:"center",margin:"auto"},metric:{fontSize:60,lineHeight:1,color:"#07193E",fontWeight:700},titleElement:{fontSize:10,color:"#767676",fontWeight:700},containerAlignment:{display:"flex",height:140,flexDirection:"column",justifyContent:"center","& .unitText":{color:"#767676",fontSize:12}}}))}))(Ze((function(e){var t=e.title,n=e.panelItem,i=e.timeStart,l=e.timeEnd,o=(e.propLoading,e.classes),d=e.apiPrefix,c=e.renderFn,x=(0,J.TL)(),u=(0,r.useState)(!1),p=(0,a.Z)(u,2),f=p[0],h=p[1],g=(0,r.useState)(""),m=(0,a.Z)(g,2),v=m[0],j=m[1],b=(0,s.v9)((function(e){return e.dashboard.widgetLoadVersion}));(0,r.useEffect)((function(){h(!0)}),[b]),(0,r.useEffect)((function(){if(f){var e=0;if(null!==i&&null!==l){var t=l.unix()-i.unix(),a=Math.floor(t/60);e=a<1?15:a}_.Z.invoke("GET","/api/v1/".concat(d,"/info/widgets/").concat(n.id,"/?step=").concat(e,"&").concat(null!==i?"&start=".concat(i.unix()):"").concat(null!==i&&null!==l?"&":"").concat(null!==l?"end=".concat(l.unix()):"")).then((function(e){var t=N(e,n);j(t.data),h(!1)})).catch((function(e){x((0,q.Ih)(e)),h(!1)}))}}),[f,n,l,i,x,d]);var Z=T(v);return c?c({valueToRender:Z,loading:f,title:t,id:n.id}):(0,y.jsxs)("div",{className:o.containerAlignment,children:[f&&(0,y.jsx)("div",{className:o.loadingAlign,children:(0,y.jsx)(K.Z,{})}),!f&&(0,y.jsxs)(r.Fragment,{children:[(0,y.jsx)("div",{className:o.metric,children:T(v)}),(0,y.jsx)("div",{className:o.titleElement,children:t})]})]})}))),we=function(e){var t=e.value,n=e.timeStart,i=e.timeEnd,l=(e.propLoading,e.apiPrefix),o=(0,J.TL)(),d=(0,r.useState)(!1),c=(0,a.Z)(d,2),x=c[0],p=c[1],f=(0,r.useState)(0),h=(0,a.Z)(f,2),g=h[0],v=h[1],j=(0,r.useState)(0),Z=(0,a.Z)(j,2),C=Z[0],w=Z[1],S=(0,r.useState)(0),E=(0,a.Z)(S,2),T=E[0],k=E[1],I=(0,r.useState)(0),L=(0,a.Z)(I,2),F=L[0],A=L[1],B=(0,s.v9)((function(e){return e.dashboard.widgetLoadVersion}));(0,r.useEffect)((function(){p(!0)}),[B]),(0,r.useEffect)((function(){if(x){var e=0;if(null!==n&&null!==i){var a=i.unix()-n.unix(),r=Math.floor(a/60);e=r<1?15:r}_.Z.invoke("GET","/api/v1/".concat(l,"/info/widgets/").concat(t.id,"/?step=").concat(e,"&").concat(null!==n?"&start=".concat(n.unix()):"").concat(null!==n&&null!==i?"&":"").concat(null!==i?"end=".concat(i.unix()):"")).then((function(e){var n=N(e,t),i=0,a=0,l=0;n.data.forEach((function(e){e.forEach((function(e){switch(e.legend){case"Total Usable":i+=e.value;break;case"Used Space":a+=e.value;break;case"Usable Free":l+=e.value}}))}));var r=Math.round(l/i*100);v(l),w(r),k(a),A(i),p(!1)})).catch((function(e){o((0,q.Ih)(e)),p(!1)}))}}),[x,t,i,n,o,l]);var R=(0,m.Am)(T,!0,!1),W=[{value:g,color:"#D6D6D6",label:"Usable Available Space"},{value:T,color:(0,m.hn)(T,F),label:"Used Space"}];return(0,y.jsxs)(u.Z,{sx:{flex:1,display:"flex",alignItems:"center",flexFlow:{sm:"row",xs:"column"}},children:[(0,y.jsx)(u.Z,{sx:{fontSize:"16px",fontWeight:600,alignSelf:{xs:"flex-start"}},children:"Capacity"}),(0,y.jsxs)(u.Z,{sx:{position:"relative",width:110,height:110,marginLeft:{sm:"auto",xs:""}},children:[(0,y.jsxs)(u.Z,{sx:{position:"absolute",display:"flex",flexFlow:"column",alignItems:"center",top:"50%",left:"50%",transform:"translate(-50%, -50%)",fontWeight:"bold",color:"#000",fontSize:12},children:["".concat(C,"%"),(0,y.jsx)("br",{}),(0,y.jsx)(u.Z,{sx:{color:"#8F9090",fontSize:"10px",display:"flex",flexFlow:"column",alignItems:"center",textAlign:"center"},children:"Free"})]}),(0,y.jsx)(xe.u,{width:110,height:110,children:(0,y.jsx)(ue.b,{data:W,cx:"50%",cy:"50%",dataKey:"value",outerRadius:50,innerRadius:40,startAngle:-70,endAngle:360,animationDuration:1,children:W.map((function(e,t){return(0,y.jsx)(M.b,{fill:e.color},"cellCapacity-".concat(t))}))})})]}),(0,y.jsxs)(u.Z,{sx:{display:"flex",alignItems:"center",marginLeft:{sm:"auto",xs:""}},children:[(0,y.jsxs)(u.Z,{children:[(0,y.jsx)(u.Z,{sx:{color:"#5E5E5E",fontWeight:"bold",fontSize:"14px"},children:"Used:"}),(0,y.jsxs)(u.Z,{sx:{display:"flex","& .value":{fontSize:"50px",fontFamily:"Lato",fontWeight:600,alignSelf:"flex-end",lineHeight:1},"& .unit":{color:"#5E5E5E",fontWeight:"bold",fontSize:"14px",marginLeft:"12px",alignSelf:"flex-end"}},children:[(0,y.jsx)("div",{className:"value",children:R.total}),(0,y.jsx)("div",{className:"unit",children:R.unit})]}),(0,y.jsx)(u.Z,{sx:{marginTop:"5px","& .value":{color:"#5E5E5E",fontWeight:"bold",fontSize:"14px",textAlign:"right"}},children:(0,y.jsxs)("div",{className:"value",children:["Of: ",(0,m.l5)(F)]})})]}),(0,y.jsx)(u.Z,{sx:{marginLeft:"15px",height:"100%",display:"flex",alignItems:"flex-start"},children:(0,y.jsx)(u.Z,{children:x?(0,y.jsx)(K.Z,{style:{width:"26px",height:"26px"}}):(0,y.jsx)(b.rHZ,{})})})]})]})},Se=function(e){var t=e.icon,n=e.label,i=e.value,a=e.loading,l=void 0!==a&&a;return(0,y.jsxs)(u.Z,{sx:{display:"grid",alignItems:"center",gap:"8px",height:"33px",paddingLeft:"15px",gridTemplateColumns:{xs:"20px 1.5fr .5fr 20px"},background:"#EBF9EE","& .min-icon":{height:"12px",width:"12px",fill:"#4CCB92"},"& .ok-icon":{height:"8px",width:"8px",fill:"#4CCB92",color:"#4CCB92"}},className:"dashboard-time-stat-item",children:[l?(0,y.jsx)(K.Z,{style:{width:10,height:10}}):t,(0,y.jsx)(u.Z,{sx:{fontSize:"12px",color:"#4CCB92",fontWeight:600},children:n}),(0,y.jsx)(u.Z,{sx:{fontSize:"12px",color:"#4CCB92"},children:i}),"n/a"!==i?(0,y.jsx)(b.tmp,{className:"ok-icon"}):null]})},Ee=function(e){var t=e.valueToRender,n=void 0===t?"":t,i=e.loading,a=void 0!==i&&i,l=e.iconWidget,r=void 0===l?null:l;return(0,y.jsx)(u.Z,{sx:{display:"flex",height:"47px",borderRadius:"2px","& .dashboard-time-stat-item":{height:"100%",width:"100%"}},children:(0,y.jsx)(Se,{loading:a,icon:r,label:(0,y.jsxs)(u.Z,{children:[(0,y.jsx)(u.Z,{sx:{display:{md:"inline",xs:"none"}},children:"Time since last"})," ","Heal Activity"]}),value:n})})},Ne=function(e){var t=e.valueToRender,n=void 0===t?"":t,i=e.loading,a=void 0!==i&&i,l=e.iconWidget,r=void 0===l?null:l;return(0,y.jsx)(u.Z,{sx:{display:"flex",height:"47px",borderRadius:"2px","& .dashboard-time-stat-item":{height:"100%",width:"100%"}},children:(0,y.jsx)(Se,{loading:a,icon:r,label:(0,y.jsxs)(u.Z,{children:[(0,y.jsx)(u.Z,{sx:{display:{md:"inline",xs:"none"}},children:"Time since last"})," ","Scan Activity"]}),value:n})})},Te=function(e){var t=e.valueToRender,n=void 0===t?"":t,i=e.loading,a=void 0!==i&&i,l=e.iconWidget,r=void 0===l?null:l;return(0,y.jsx)(u.Z,{sx:{display:"flex",height:"47px",borderRadius:"2px","& .dashboard-time-stat-item":{height:"100%",width:"100%"}},children:(0,y.jsx)(Se,{loading:a,icon:r,label:(0,y.jsx)(u.Z,{children:"Uptime"}),value:n})})},ke=function(e,t,n,a,l){var r=arguments.length>5&&void 0!==arguments[5]&&arguments[5];switch(e.type){case i.singleValue:return(0,y.jsx)(Ce,{title:e.title,panelItem:e,timeStart:t,timeEnd:n,propLoading:a,apiPrefix:l});case i.simpleWidget:var o,s=null;return 80===e.id?s=Ee:81===e.id?s=Ne:1===e.id&&(s=Te),[80,81,1].includes(e.id)&&(o=function(e){var t=e.valueToRender,n=e.loading,i=e.title,a=e.id,l=e.iconWidget;return(0,y.jsx)(s,{valueToRender:t,loading:n,title:i,id:a,iconWidget:l})}),(0,y.jsx)(he,{title:e.title,panelItem:e,timeStart:t,timeEnd:n,propLoading:a,apiPrefix:l,iconWidget:e.widgetIcon,renderFn:o});case i.pieChart:return 50===e.id?(0,y.jsx)(ge,{children:(0,y.jsx)(we,{value:e,timeStart:t,timeEnd:n,propLoading:a,apiPrefix:l})}):(0,y.jsx)(pe,{title:e.title,panelItem:e,timeStart:t,timeEnd:n,propLoading:a,apiPrefix:l});case i.linearGraph:case i.areaGraph:return(0,y.jsx)(ce,{title:e.title,panelItem:e,timeStart:t,timeEnd:n,propLoading:a,hideYAxis:e.disableYAxis,xAxisFormatter:e.xAxisFormatter,yAxisFormatter:e.yAxisFormatter,apiPrefix:l,areaWidget:e.type===i.areaGraph,zoomActivated:r});case i.barChart:return(0,y.jsx)(ae,{title:e.title,panelItem:e,timeStart:t,timeEnd:n,propLoading:a,apiPrefix:l,zoomActivated:r});case i.singleRep:var d=e.fillColor?e.fillColor:e.color;return(0,y.jsx)(ye,{title:e.title,panelItem:e,timeStart:t,timeEnd:n,propLoading:a,color:e.color,fillColor:d,apiPrefix:l});default:return null}},Ie=n(56028),Le=function(e){var t=e.value,n=e.modalOpen,i=e.timeStart,a=e.timeEnd,l=e.apiPrefix,o=(0,J.TL)();return t?(0,y.jsx)(Ie.Z,{title:t.title,onClose:function(){o((0,$.jv)())},modalOpen:n,wideLimit:!1,noContentPadding:!0,children:(0,y.jsx)(r.Fragment,{children:ke(t,i,a,!0,l,!0)})}):null},Fe=n(63856),Ae=[{sx:{minWidth:0,display:"grid",gridTemplateColumns:{md:"1fr 1fr 1fr 1fr",sm:"1fr 1fr",xs:"1fr"},gap:"30px"},columns:[{componentId:66},{componentId:44},{componentId:500},{componentId:501}]},{sx:{display:"grid",minWidth:0,gridTemplateColumns:{md:"1fr 1fr",xs:"1fr"},gap:"30px"},columns:[{componentId:50},{componentId:502}]},{sx:{display:"grid",minWidth:0,gridTemplateColumns:{md:"1fr 1fr 1fr",xs:"1fr"},gap:"30px"},columns:[{componentId:80},{componentId:81},{componentId:1}]},{sx:{display:"grid",minWidth:0,gridTemplateColumns:{sm:"1fr 1fr",xs:"1fr"},gap:"30px"},columns:[{componentId:68},{componentId:52}]},{sx:{display:"grid",minWidth:0,gridTemplateColumns:{sm:"1fr 1fr",xs:"1fr"},gap:"30px"},columns:[{componentId:63},{componentId:70}]}],Be=[{sx:{display:"grid",gridTemplateColumns:"1fr",gap:"30px"},columns:[{componentId:60}]},{sx:{display:"grid",minWidth:0,gridTemplateColumns:{sm:"1fr 1fr",xs:"1fr"},gap:"30px"},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}]}],Re=[{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}]}],We=[{sx:{display:"grid",minWidth:0,gridTemplateColumns:"1fr 1fr",gap:"30px"},columns:[{componentId:11},{componentId:8}]}],Pe=function(e){var t=e.children;return(0,y.jsx)(u.Z,{sx:{display:"grid",gridTemplateColumns:"1fr",gap:"30px"},children:t})},De=n(57621),ze=n(9585),Me=n(43504),Oe=(0,I.Z)({root:{backgroundColor:"#fff",padding:0},title:(0,l.Z)({},f.NP.titleContainer),content:{maxWidth:"100%"}}),Ge=(0,x.Z)((function(e){return(0,c.Z)((0,l.Z)((0,l.Z)({},f.NP),{},{cardRoot:(0,l.Z)((0,l.Z)({},f.NP.singleValueContainer),{},{"&.MuiPaper-root":{borderRadius:10}}),metricText:{fontSize:70,lineHeight:1.1,color:"#07193E",fontWeight:"bold"},unitText:{fontSize:10,color:"#767676",fontWeight:"normal"},subHearderContainer:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},subMessage:{fontSize:10,color:"#767676","&.bold":{fontWeight:"bold"}},headerContainer:{display:"flex",justifyContent:"space-between"},viewAll:{fontSize:10,color:"#C83B51",textTransform:"capitalize","& a, & a:hover, & a:visited, & a:active":{color:"#C83B51"}},extraMargin:{margin:"10px 20px 10px 0"}}))}))((function(e){var t=e.title,n=e.metricValue,i=e.metricUnit,a=e.subMessage,l=e.moreLink,o=e.rightComponent,s=e.extraMargin,d=void 0!==s&&s,c=e.classes,x=Oe(),u=function(){return(0,y.jsx)(r.Fragment,{children:(0,y.jsxs)("div",{className:c.subHearderContainer,children:[(0,y.jsxs)("div",{className:c.leftSide,children:[(0,y.jsx)("div",{children:(0,y.jsxs)("span",{className:c.metricText,children:[n,(0,y.jsx)("span",{className:c.unitText,children:i})]})}),a&&(0,y.jsx)("div",{className:"".concat(c.subMessage," ").concat(a.fontWeight?a.fontWeight:""),children:a.message})]}),(0,y.jsx)("div",{className:c.rightSide,children:o})]})})},p=function(){return(0,y.jsx)(r.Fragment,{children:(0,y.jsxs)("div",{className:c.headerContainer,children:[(0,y.jsx)("span",{className:c.title,children:t}),l&&(0,y.jsx)(r.Fragment,{children:(0,y.jsx)("span",{className:c.viewAll,children:(0,y.jsx)(Me.rU,{to:l,children:"View All"})})})]})})};return(0,y.jsx)(r.Fragment,{children:(0,y.jsx)(De.Z,{className:"".concat(c.cardRoot," ").concat(d?c.extraMargin:""),children:""!==n&&(0,y.jsx)(ze.Z,{title:(0,y.jsx)(p,{}),subheader:(0,y.jsx)(r.Fragment,{children:(0,y.jsx)(u,{})}),classes:{root:x.root,title:x.title,content:x.content}})})})})),Ue=function(e){var t=e.title,n=e.leftComponent,i=e.rightComponent;return(0,y.jsx)(r.Fragment,{children:(0,y.jsx)(Ge,{title:t,metricValue:n,rightComponent:i})})},_e=function(e){var t=e.panelItem,n=e.timeStart,i=e.timeEnd,l=(e.propLoading,e.apiPrefix),o=e.statLabel,d=(0,J.TL)(),c=(0,r.useState)(!1),x=(0,a.Z)(c,2),p=x[0],f=x[1],h=(0,r.useState)(""),g=(0,a.Z)(h,2),m=g[0],v=g[1],j=(0,s.v9)((function(e){return e.dashboard.widgetLoadVersion}));return(0,r.useEffect)((function(){f(!0)}),[j]),(0,r.useEffect)((function(){if(p){var e=0;if(null!==n&&null!==i){var a=i.unix()-n.unix(),r=Math.floor(a/60);e=r<1?15:r}_.Z.invoke("GET","/api/v1/".concat(l,"/info/widgets/").concat(t.id,"/?step=").concat(e,"&").concat(null!==n?"&start=".concat(n.unix()):"").concat(null!==n&&null!==i?"&":"").concat(null!==i?"end=".concat(i.unix()):"")).then((function(e){var n=N(e,t);v(n.data),f(!1)})).catch((function(e){d((0,q.Ih)(e)),f(!1)}))}}),[p,t,i,n,d,l]),p?(0,y.jsx)(u.Z,{sx:{width:"100%",paddingTop:"5px",textAlign:"center",margin:"auto"},children:(0,y.jsx)(K.Z,{style:{width:12,height:12}})}):(0,y.jsxs)(u.Z,{children:[(0,y.jsx)(u.Z,{className:"stat-value",children:m}),o]})},Ve=function(e){var t=e.statItemLeft,n=void 0===t?null:t,i=e.statItemRight,a=void 0===i?null:i,l=e.icon,r=void 0===l?null:l,o=e.label,s=void 0===o?"":o;return(0,y.jsx)(u.Z,{sx:{fontFamily:"Lato,sans-serif",color:"#07193E",maxWidth:"321px",display:"flex",marginLeft:"auto",marginRight:"auto",cursor:"default"},children:(0,y.jsxs)(u.Z,{sx:{flex:1,display:"flex",padding:{sm:"0 8px 0 8px",xs:"0 10px 0 10px"}},children:[(0,y.jsxs)(u.Z,{sx:{flex:1,display:"flex",flexFlow:"column"},children:[(0,y.jsx)(u.Z,{sx:{fontSize:"16px",fontWeight:600},children:s}),(0,y.jsxs)(u.Z,{sx:{display:"flex",alignItems:"center",gap:"5px",justifyContent:"space-between",paddingBottom:{md:"0px",xs:"10px"},fontSize:{xl:"55px",lg:"50px",md:"45px",xs:"35px"},flexFlow:"row",fontWeight:600,"& .stat-text":{color:"#696969",fontSize:"12px",marginTop:"8px"},"& .stat-value":{textAlign:"center",height:"50px"},"& .min-icon":{marginRight:"8px",marginTop:"8px",height:"10px",width:"10px"}},children:[n,a]})]}),(0,y.jsx)(u.Z,{sx:{width:"20px",height:"20px",marginTop:"8px",maxWidth:"26px","& .min-icon":{width:"16px",height:"16px"}},children:r})]})})},Ke=function(e){var t=e.info,n=e.timeStart,i=e.timeEnd,l=e.loading,r=e.apiPrefix,o=t.mergedPanels,s=void 0===o?[]:o,d=t.id,c=(0,a.Z)(s,2),x=c[0],p=c[1],f=(0,y.jsx)(_e,{panelItem:x,timeStart:n,timeEnd:i,propLoading:l,apiPrefix:r,statLabel:(0,y.jsxs)(u.Z,{sx:{display:"flex",alignItems:"center",marginTop:"5px","& .min-icon":{fill:"#4CCB92"}},children:[(0,y.jsx)(b.J$M,{}),(0,y.jsx)("div",{className:"stat-text",children:"Online"})]})}),h=(0,y.jsx)(_e,{panelItem:p,timeStart:n,timeEnd:i,propLoading:l,apiPrefix:r,statLabel:(0,y.jsxs)(u.Z,{sx:{display:"flex",alignItems:"center",marginTop:"5px","& .min-icon":{fill:"#C83B51"}},children:[(0,y.jsx)(b.J$M,{}),(0,y.jsx)("div",{className:"stat-text",children:"Offline"})]})}),g=null,m="";return 500===d?(g=(0,y.jsx)(b.SBZ,{}),m="Servers"):501===d&&(g=(0,y.jsx)(b.FU8,{}),m="Drives"),(0,y.jsx)(Ve,{statItemLeft:f,statItemRight:h,icon:g,label:m})},He=function(e){var t=e.value,n=e.loading;return(0,y.jsxs)(u.Z,{children:[(0,y.jsxs)(u.Z,{sx:{display:"flex",alignItems:"center",marginTop:"10px",gap:"10px","& .min-icon":{height:"15px",width:"15px",fill:"#4ccb92"}},children:[(0,y.jsx)(u.Z,{sx:{fontSize:"18px",color:"#696969"},children:"GET"}),n?(0,y.jsx)(K.Z,{style:{width:"15px",height:"15px"}}):(0,y.jsx)(b.vUj,{})]}),(0,y.jsx)(u.Z,{sx:{fontSize:"50px",fontFamily:"Lato",fontWeight:600},children:t})]})},$e=function(e){var t=e.value,n=e.loading;return(0,y.jsxs)(u.Z,{children:[(0,y.jsxs)(u.Z,{sx:{display:"flex",gap:"10px",alignItems:"center",marginTop:"10px","& .min-icon":{height:"15px",width:"15px",fill:"#2781b0"}},children:[(0,y.jsx)(u.Z,{sx:{fontSize:"18px",color:"#696969",fontWeight:"normal"},children:"PUT"}),n?(0,y.jsx)(K.Z,{style:{width:"15px",height:"15px"}}):(0,y.jsx)(b.Uxq,{})]}),(0,y.jsx)(u.Z,{sx:{fontSize:"50px",fontFamily:"Lato",fontWeight:600},children:t})]})},Je=function(e){var t=e.value,n=e.timeStart,i=e.timeEnd,l=e.propLoading,r=e.apiPrefix,o=t.mergedPanels,s=void 0===o?[]:o,d=(0,a.Z)(s,2),c=d[0],x=d[1],p=(0,y.jsx)(Ce,{title:t.title,panelItem:c,timeStart:n,timeEnd:i,propLoading:l,apiPrefix:r,renderFn:function(e){var t=e.valueToRender,n=e.loading,i=e.title,a=e.id;return(0,y.jsx)($e,{value:t,loading:n,title:i,id:a})}}),f=(0,y.jsx)(Ce,{title:t.title,panelItem:x,timeStart:n,timeEnd:i,propLoading:l,apiPrefix:r,renderFn:function(e){var t=e.valueToRender,n=e.loading,i=e.title,a=e.id;return(0,y.jsx)(He,{value:t,loading:n,title:i,id:a})}});return(0,y.jsxs)(u.Z,{sx:{flex:1,display:"flex",alignItems:"center",flexFlow:{sm:"row",xs:"column"},gap:"15px","& .unitText":{fontSize:"14px",color:"#5E5E5E",marginLeft:"5px"}},children:[(0,y.jsx)(u.Z,{sx:{fontSize:"16px",fontWeight:600},children:"Network"}),(0,y.jsx)(u.Z,{sx:{position:"relative",width:110,height:110,marginLeft:{sm:"auto",xs:""}},children:(0,y.jsx)(u.Z,{sx:{position:"absolute",display:"flex",flexFlow:"column",alignItems:"center",top:"50%",left:"50%",transform:"translate(-50%, -50%)",fontWeight:"bold",color:"#000",fontSize:12},children:f})}),(0,y.jsx)(u.Z,{sx:{display:"flex",alignItems:"center",marginLeft:{sm:"auto",xs:""}},children:(0,y.jsx)(u.Z,{sx:{display:"flex",alignItems:"center","& .value":{fontSize:"50px",fontFamily:"Lato"},"& .unit":{color:"#5E5E5E",fontSize:"18px",marginLeft:"12px",marginTop:"10px"}},children:p})}),(0,y.jsx)(u.Z,{sx:{marginLeft:"15px",height:"100%",display:"flex",alignItems:"flex-start","& .min-icon":{height:"15px",width:"15px"}},children:(0,y.jsx)(b.QBB,{})})]})},Ye=function(e){var t=e.info,n=e.timeStart,i=e.timeEnd,l=e.loading,r=e.apiPrefix,o=t.mergedPanels,s=void 0===o?[]:o,d=t.title,c=void 0===d?"":d,x=t.id,u=(0,a.Z)(s,2),p=u[0],f=u[1];return[500,501].includes(x)?(0,y.jsx)(ge,{children:(0,y.jsx)(Ke,{info:t,timeStart:n,timeEnd:i,loading:l,apiPrefix:r})}):502===x?(0,y.jsx)(ge,{children:(0,y.jsx)(Je,{apiPrefix:r,timeEnd:i,timeStart:n,value:t,propLoading:l})}):(0,y.jsx)(Ue,{title:c,leftComponent:ke(p,n,i,l,r),rightComponent:ke(f,n,i,l,r)})},qe=n(74794),Qe=n(23804),Xe=n(31300),et=n(98444),tt=n.n(et),nt=n(79834),it=n(90493),at=n(76278),lt=n(56125),rt=n(879),ot=function(e){var t=e.label,n=void 0===t?"":t,i=e.value,a=void 0===i?"":i,l=e.statusColor,r=void 0===l?"":l,o=e.hasStatus,s=void 0!==o&&o;return(0,y.jsx)(u.Z,{sx:{alignItems:"baseline",padding:"5px",display:"flex",gap:"5px"},children:(0,y.jsxs)(u.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",flexFlow:"column","& .stat-text":{color:"#5E5E5E",fontSize:"12px"},"& .stat-value":{fontSize:"18px",color:"#07193E",display:"flex",fontWeight:500,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},children:[(0,y.jsxs)("div",{className:"stat-value",children:[a," ",(0,y.jsx)(u.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",flexFlow:"column",marginLeft:"5px",maxWidth:"40px","&:first-of-type(svg)":{fill:"#848484"}},children:s?(0,y.jsx)(u.Z,{sx:{marginRight:"0px",justifyContent:"center",alignItems:"center",textAlign:"center","& svg.min-icon":{fill:r,width:"10px",height:"10px"}},children:(0,y.jsx)(b.J$M,{})}):(0,y.jsx)(u.Z,{sx:{width:"12px",height:"12px"}})})]}),(0,y.jsx)("div",{className:"stat-text",children:n})]})})},st=(0,x.Z)((function(e){return(0,c.Z)((0,l.Z)({},f.SJ))}))((function(e){var t=e.server,n=Object.keys(g()(t,"network",{})),i=n.length,a=t.drives?t.drives.length:0,l=n.reduce((function(e,n){return"online"===t.network[n]?e+1:e}),0),r=t.drives?t.drives.filter((function(e){return"ok"===e.state})).length:0;return(0,y.jsx)(u.Z,{sx:{display:"flex",alignItems:"flex-start",flexFlow:"column",flex:1},children:(0,y.jsxs)(u.Z,{sx:{display:"flex",alignItems:"center",padding:"3px",gap:"15px",justifyContent:"space-between",width:"100%",paddingLeft:"20px",flexFlow:{sm:"row",xs:"column"}},children:[(0,y.jsxs)(u.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,y.jsx)(u.Z,{sx:{fontWeight:600,textTransform:"none"},children:t.endpoint||""}),(null===t||void 0===t?void 0:t.state)&&(0,y.jsx)(u.Z,{sx:{marginLeft:"8px","& .min-icon":{fill:(0,rt.GJ)(t.state),height:"14px",width:"14px"}},children:(0,y.jsx)(b.J$M,{})})]}),(0,y.jsxs)(u.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",flex:"1.5",gap:{md:"5%",xs:"5%"}},children:[(0,y.jsx)(ot,{statusColor:(0,rt.Et)(r,a),label:"Drives",hasStatus:!0,value:"".concat(r,"/").concat(a)}),(0,y.jsx)(ot,{statusColor:(0,rt.D_)(l,i),label:"Network",hasStatus:!0,value:"".concat(l,"/").concat(i)}),(0,y.jsx)(ot,{statusColor:"green",label:"Up time",value:null!==t&&void 0!==t&&t.uptime?(0,m.v1)(t.uptime):"N/A"})]}),(0,y.jsx)(ot,{statusColor:"green",label:"",value:(0,y.jsxs)(u.Z,{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,y.jsx)("span",{className:"label",children:"Version:"}),t.version?t.version:"N/A"]})})]})})})),dt=function(e){switch(e){case"offline":return rt.yh.RED;case"ok":return rt.yh.GREEN;default:return rt.yh.YELLOW}},ct=(0,x.Z)((function(e){return(0,c.Z)((0,l.Z)({},f.SJ))}))((function(e){var t=e.drive,n=t.totalSpace||0,i=t.usedSpace||0,a=[{value:n-i,color:"#D6D6D6",label:"Free Space"},{value:t.usedSpace,color:(0,m.hn)(i,n),label:"Used Space"}];return(0,y.jsx)(u.Z,{sx:{display:"flex",flex:1,alignItems:"center",paddingBottom:"10px",padding:"20px",border:"1px solid #eaeaea"},children:(0,y.jsxs)(u.Z,{sx:{display:"flex",flexFlow:"column",marginLeft:"10px",flex:1},children:[(0,y.jsxs)(u.Z,{sx:{fontSize:"14px",fontWeight:400,display:"flex",alignItems:"center","& .min-icon":{marginRight:"10px",height:"10px",width:"10px",fill:dt(t.state),flexShrink:0},"& .drive-endpoint":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"normal",wordBreak:"break-all",marginRight:"8px",fontWeight:600,fontSize:{md:"16px",xs:"10px"}}},children:[(0,y.jsx)("div",{className:"drive-endpoint",children:t.endpoint||""}),t.state&&(0,y.jsx)(b.J$M,{})]}),(0,y.jsxs)(u.Z,{sx:{flex:1,display:"flex",alignItems:"center",paddingLeft:"20px",marginTop:"10px",flexFlow:{sm:"row",xs:"column"},"& .info-label":{color:"#5E5E5E",fontSize:"12px",textAlign:"center"},"& .info-value":{fontSize:"18px",color:"#07193E",display:"flex",fontWeight:500,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},children:[(0,y.jsx)(u.Z,{sx:{flex:1},children:(0,y.jsxs)("div",{style:{position:"relative",width:110,height:110},children:[(0,y.jsx)("span",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",fontWeight:"bold",color:"#000",fontSize:12},children:t.usedSpace?(0,m.l5)(t.usedSpace):"-"}),(0,y.jsx)("div",{children:(0,y.jsx)(xe.u,{width:110,height:110,children:(0,y.jsx)(ue.b,{data:a,cx:"50%",cy:"50%",dataKey:"value",outerRadius:50,innerRadius:40,startAngle:-70,endAngle:360,animationDuration:1,children:a.map((function(e,t){return(0,y.jsx)(M.b,{fill:e.color},"cellCapacity-".concat(t))}))})})})]})}),(0,y.jsxs)(u.Z,{sx:{display:"flex",gap:"5%",alignItems:"center",flex:2,flexGrow:1},children:[(0,y.jsxs)(u.Z,{sx:{display:"flex",flexFlow:"column"},children:[(0,y.jsx)("div",{className:"info-value",children:(0,m.ae)(t.totalSpace?t.totalSpace.toString():"0")}),(0,y.jsx)("label",{className:"info-label",children:"Capacity"})]}),(0,y.jsxs)(u.Z,{sx:{display:"flex",flexFlow:"column"},children:[(0,y.jsx)("div",{className:"info-value",children:(0,m.ae)(t.usedSpace?t.usedSpace.toString():"0")}),(0,y.jsx)("label",{className:"info-label",children:"Used"})]}),(0,y.jsxs)(u.Z,{sx:{display:"flex",flexFlow:"column"},children:[(0,y.jsx)("div",{className:"info-value",children:(0,m.ae)(t.availableSpace?t.availableSpace.toString():"0")}),(0,y.jsx)("label",{className:"info-label",children:"Available"})]})]})]})]})})})),xt=n(79976),ut=function(e){var t=e.data,n=r.useState(t.length>1?"":t[0].endpoint+"-0"),i=(0,a.Z)(n,2),l=i[0],o=i[1],s=function(e){o(e)};return(0,y.jsxs)(u.Z,{children:[(0,y.jsxs)(u.Z,{sx:{marginBottom:"10px"},children:["Servers (",t.length,")"]}),(0,y.jsx)(it.Z,{sx:{width:"100%",flex:1,padding:"0"},component:"nav","aria-labelledby":"nested-list-subheader",children:t.map((function(e,t){var n="".concat(e.endpoint,"-").concat(t),i=l===n;return(0,y.jsxs)(r.Fragment,{children:[(0,y.jsxs)(at.Z,{disableRipple:!0,onClick:function(){s(i?"":n)},className:i?"expanded":"",sx:{display:"flex",alignItems:"center",justifyContent:"space-between",borderTop:0===t?"1px solid #f1f1f1":"",borderBottom:"1px solid #f1f1f1",borderLeft:"1px solid #f1f1f1",borderRight:"1px solid #f1f1f1",padding:"3px 10px 3px 10px","&:hover":{background:"#bebbbb0d"}},children:[(0,y.jsx)(st,{server:e,index:t}),(0,y.jsx)(u.Z,{sx:{height:"25px",width:"25px",background:"#FBFAFA",borderRadius:"2px","&:hover":{background:"#fafafa"},display:{md:"block",xs:"none"},"& .collapse-icon":{fill:"#494949","& g rect":{fill:"#ffffff"}},"& .expand-icon":{fill:"#494949","& rect":{fill:"#ffffff"}}},children:i?(0,y.jsx)(xt.cg,{className:"collapse-icon"}):(0,y.jsx)(xt.Ud,{className:"expand-icon"})})]}),i?(0,y.jsxs)(u.Z,{sx:{border:"1px solid #f1f1f1",borderTop:"0"},children:[(0,y.jsxs)(nt.Z,{component:"div",sx:{paddingLeft:"30px"},children:["Drives (",e.drives.length,")"]},"".concat(t,"-drive-details")),(0,y.jsx)(lt.Z,{in:i,timeout:"auto",unmountOnExit:!0,sx:{width:"100%",flex:1,display:"flex",padding:{md:"15px 30px",xs:"10px 10px"},"& .MuiCollapse-wrapperInner":{display:"flex",flexFlow:"column",gap:"15px"}},children:e.drives.map((function(e,t){return(0,y.jsx)(ct,{drive:e},"".concat(e.endpoint,"-").concat(t))}))})]},"".concat(e.endpoint,"-").concat(t)):null]},n)}))})]})},pt=function(e){var t=e.counterValue,n=e.label,i=void 0===n?"":n,a=e.icon,l=void 0===a?null:a,r=e.actions,o=void 0===r?null:r;e.loading;return(0,y.jsx)(u.Z,{sx:{fontFamily:"Lato,sans-serif",color:"#07193E",maxWidth:"300px",display:"flex",marginLeft:"auto",marginRight:"auto",cursor:"default",position:"relative",width:"100%"},children:(0,y.jsxs)(u.Z,{sx:{flex:1,display:"flex",width:"100%",padding:{sm:"0 8px 0 8px",xs:"0 10px 0 10px"},position:"absolute"},children:[(0,y.jsxs)(u.Z,{sx:{flex:1,display:"flex",flexFlow:"column",marginTop:"8px",zIndex:10,overflow:"hidden"},children:[(0,y.jsx)(u.Z,{sx:{fontSize:"16px",fontWeight:600},children:i}),(0,y.jsx)(me.Z,{title:t,placement:"bottom",enterDelay:500,children:(0,y.jsx)(u.Z,{sx:{fontSize:t.toString().length>=5?{xl:"50px",lg:"45px",md:"28px",sm:"28px",xs:"20px"}:{xl:"55px",lg:"50px",md:"36px",sm:"35px",xs:"35px"},fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",maxWidth:{md:187,xs:200},flexFlow:{md:"row",xs:"column"}},children:t})})]}),(0,y.jsxs)(u.Z,{sx:{display:"flex",flexFlow:"column",alignItems:"center",justifyContent:"flex-start",marginTop:"8px",maxWidth:"26px","& .min-icon":{width:"16px",height:"16px"}},children:[l,(0,y.jsx)(u.Z,{sx:{display:"flex"},children:o})]})]})})},ft=function(e){var t=e.usageValue,n=e.total,i=e.unit,a=[{value:n,color:"#D6D6D6",label:"Free Space"},{value:t,color:"#073052",label:"Used Space"}];return(0,y.jsxs)(u.Z,{sx:{maxHeight:"110px",display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:"19px",padding:"10px","& .unit-value":{fontSize:"50px",color:"#07193E"},"& .unit-type":{fontSize:"18px",color:"#5E5E5E",marginTop:"20px",marginLeft:"5px"},"& .usage-label":{display:"flex",alignItems:"center",fontSize:"16px",fontWeight:600,marginRight:"20px",marginTop:"-10px","& .min-icon":{marginLeft:"10px",height:16,width:16}}},children:[(0,y.jsxs)(u.Z,{children:[(0,y.jsx)("div",{className:"usage-label",children:(0,y.jsx)("span",{children:"Reported Usage"})}),(0,y.jsx)(me.Z,{title:"".concat(t," Bytes"),children:(0,y.jsx)("label",{className:"unit-value",style:{fontWeight:600},children:n})}),(0,y.jsx)("label",{className:"unit-type",children:i})]}),(0,y.jsx)(u.Z,{children:(0,y.jsx)(u.Z,{sx:{flex:1},children:(0,y.jsx)("div",{style:{position:"relative",width:105,height:105,top:"-8px"},children:(0,y.jsx)("div",{children:(0,y.jsx)(xe.u,{width:105,height:105,children:(0,y.jsx)(ue.b,{data:a,cx:"50%",cy:"50%",dataKey:"value",outerRadius:45,innerRadius:35,startAngle:-70,endAngle:360,animationDuration:1,children:a.map((function(e,t){return(0,y.jsx)(M.b,{fill:e.color},"cellCapacity-".concat(t))}))})})})})})})]})},ht=n(75952),gt=n(56087),mt=n(27454),vt=function(e){var t=e.children;return(0,y.jsx)(u.Z,{sx:{border:"1px solid #f1f1f1",padding:{md:"15px",xs:"5px"},height:"136px",maxWidth:{sm:"100%"}},children:t})},jt=function(e){var t,n,i,a=e.usage,l=a&&a.usage?a.usage.toString():"0",r=function(e){return void 0===e?{total:"0",unit:"Mi"}:(0,m.Am)(e)}(l),s=a||{},c=s.lastScan,x=void 0===c?"n/a":c,p=s.lastHeal,f=void 0===p?"n/a":p,h=s.upTime,g=void 0===h?"n/a":h,v=function(e){return null!==e?(0,o.Z)(e.servers).sort((function(e,t){var n=e.endpoint.toLowerCase(),i=t.endpoint.toLowerCase();return n<i?-1:n>i?1:0})):[]}(a||null),j=[];v.forEach((function(e){var t=e.drives.map((function(e){return e}));j=[].concat((0,o.Z)(j),(0,o.Z)(t))}));var Z=tt()(v,"state"),C=Z.offline,w=void 0===C?[]:C,S=Z.online,E=void 0===S?[]:S,N=tt()(j,"state"),T=N.offline,k=void 0===T?[]:T,I=N.ok,L=void 0===I?[]:I;return(0,y.jsx)(u.Z,{children:(0,y.jsxs)(u.Z,{sx:{display:"grid",gridTemplateRows:"1fr",gridTemplateColumns:"1fr",gap:"27px",marginBottom:"40px"},children:[(0,y.jsxs)(u.Z,{sx:{display:"grid",gridTemplateColumns:"1fr",gap:"40px"},children:[(0,y.jsxs)(u.Z,{sx:{display:"grid",gridTemplateRows:"136px",gridTemplateColumns:{sm:"1fr 1fr 1fr",xs:"1fr"},gap:{md:"20px",xs:"20px"}},children:[(0,y.jsx)(vt,{children:(0,y.jsx)(pt,{label:"Buckets",icon:(0,y.jsx)(b.wNb,{}),counterValue:a?(0,m.nk)(a.buckets):0,actions:(0,y.jsx)(Me.rU,{to:gt.gA.BUCKETS,style:{zIndex:999,textDecoration:"none",top:"40px",position:"relative",marginRight:"75px"},children:(0,y.jsx)(mt.Z,{tooltip:"Browse",children:(0,y.jsx)(ht.zx,{id:"browse-dashboard",onClick:function(){},label:"Browse",icon:(0,y.jsx)(b.LZ3,{}),variant:"regular",style:{padding:5,height:30,fontSize:14,marginTop:20}})})})})}),(0,y.jsx)(vt,{children:(0,y.jsx)(pt,{label:"Objects",icon:(0,y.jsx)(b.xpX,{}),counterValue:a?(0,m.nk)(a.objects):0})}),(0,y.jsx)(vt,{children:(0,y.jsx)(Xe.Z,{onlineCount:E.length,offlineCount:w.length,label:"Servers",icon:(0,y.jsx)(b.SBZ,{})})}),(0,y.jsx)(vt,{children:(0,y.jsx)(Xe.Z,{offlineCount:k.length,onlineCount:L.length,label:"Drives",icon:(0,y.jsx)(b.FU8,{})})}),(0,y.jsxs)(u.Z,{sx:{gridRowStart:"1",gridRowEnd:"3",gridColumnStart:"3",border:"1px solid #f1f1f1",padding:"15px",display:"grid",justifyContent:"stretch"},children:[(0,y.jsx)(ft,{usageValue:l,total:r.total,unit:r.unit}),(0,y.jsxs)(u.Z,{sx:{display:"flex",flexFlow:"column",gap:"14px"},children:[(0,y.jsx)(Se,{icon:(0,y.jsx)(b.lnI,{}),label:(0,y.jsxs)(u.Z,{children:[(0,y.jsx)(u.Z,{sx:{display:{md:"inline",xs:"none"}},children:"Time since last"})," ","Heal Activity"]}),value:f}),(0,y.jsx)(Se,{icon:(0,y.jsx)(xt.EY,{}),label:(0,y.jsxs)(u.Z,{children:[(0,y.jsx)(u.Z,{sx:{display:{md:"inline",xs:"none"}},children:"Time since last"})," ","Scan Activity"]}),value:x}),(0,y.jsx)(Se,{icon:(0,y.jsx)(b.oNq,{}),label:"Uptime",value:g})]})]})]}),(0,y.jsxs)(d.ZP,{container:!0,spacing:1,children:[(0,y.jsx)(d.ZP,{item:!0,xs:4,children:(0,y.jsx)(Se,{icon:(0,y.jsx)(b.idV,{}),label:"Backend type",value:null!==a&&void 0!==a&&null!==(t=a.backend)&&void 0!==t&&t.backendType?a.backend.backendType:"Unknown"})}),(0,y.jsx)(d.ZP,{item:!0,xs:4,children:(0,y.jsx)(Se,{icon:(0,y.jsx)(b.QaX,{}),label:"Standard storage class parity",value:null!==a&&void 0!==a&&null!==(n=a.backend)&&void 0!==n&&n.standardSCParity?a.backend.standardSCParity.toString():"n/a"})}),(0,y.jsx)(d.ZP,{item:!0,xs:4,children:(0,y.jsx)(Se,{icon:(0,y.jsx)(b.QaX,{}),label:"Reduced redundancy storage class parity",value:null!==a&&void 0!==a&&null!==(i=a.backend)&&void 0!==i&&i.standardSCParity?a.backend.rrSCParity.toString():"n/a"})})]}),(0,y.jsx)(u.Z,{sx:{display:"grid",gridTemplateRows:"auto",gridTemplateColumns:"1fr",gap:"auto"},children:(0,y.jsx)(ut,{data:v})})]}),"not configured"===(null===a||void 0===a?void 0:a.advancedMetricsStatus)&&(0,y.jsx)(u.Z,{children:(0,y.jsx)(Qe.Z,{iconComponent:(0,y.jsx)(b.a$2,{}),title:"We can\u2019t retrieve advanced metrics at this time.",help:(0,y.jsxs)(u.Z,{children:[(0,y.jsx)(u.Z,{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,y.jsx)(u.Z,{sx:{paddingTop:"20px",fontSize:"14px","& a":{color:function(e){return e.colors.link}}},children:(0,y.jsx)("a",{href:"https://min.io/docs/minio/linux/operations/monitoring/collect-minio-metrics-using-prometheus.html",target:"_blank",rel:"noreferrer",children:"Read more about Prometheus on our Docs site."})})]})})})]})})},bt=n(85090),yt=n(32110),Zt=(0,x.Z)((function(e){return(0,c.Z)((0,l.Z)((0,l.Z)((0,l.Z)({},f.OR),f.bN),{},{dashboardRow:{display:"flex",flexDirection:"row",justifyContent:"flex-start",flexWrap:"wrap"}}))}))((function(e){var t,n=e.apiPrefix,i=void 0===n?"admin":n,l=e.usage,c=(0,J.TL)(),x=(0,s.v9)((function(e){return e.dashboard.zoom.openZoom})),f=(0,s.v9)((function(e){return e.dashboard.zoom.widgetRender})),h=(0,r.useState)(null),g=(0,a.Z)(h,2),m=g[0],v=g[1],j=(0,r.useState)(null),Z=(0,a.Z)(j,2),C=Z[0],w=Z[1],E=S,N=(0,r.useState)(0),T=(0,a.Z)(N,2),I=T[0],L=T[1],F=function(e){return e.reduce((function(e,t,n){var a=t.columns,l=(void 0===a?[]:a).map((function(e,t){var a;return function(e,t){return(0,y.jsx)(r.Fragment,{children:e?(0,y.jsx)(r.Fragment,{children:(0,y.jsx)(u.Z,{children:e.mergedPanels?(0,y.jsx)(Ye,{info:e,timeStart:m,timeEnd:C,loading:!0,apiPrefix:i}):ke(e,m,C,!0,i,x)})}):null},"widget-".concat(t))}((a=e.componentId,E.find((function(e){return e.id===a}))),"".concat(n,"-").concat(t))})),s=(0,y.jsx)(u.Z,{sx:t.sx,children:l},"layout-row-".concat(n));return[].concat((0,o.Z)(e),[s])}),[])};return t="not configured"!==(null===l||void 0===l?void 0:l.advancedMetricsStatus)?[{label:"Usage"},{label:"Traffic"},{label:"Resources"},{label:"Info"}]:[{label:"Info"},{label:"Usage",disabled:!0},{label:"Traffic",disabled:!0},{label:"Resources",disabled:!0}],(0,y.jsxs)(qe.Z,{children:[x&&(0,y.jsx)(Le,{modalOpen:x,timeStart:m,timeEnd:C,widgetRender:0,value:f,apiPrefix:i}),(0,y.jsx)(d.ZP,{item:!0,xs:12,children:(0,y.jsx)(B,{selectedTab:I,onChange:function(e){L(e)},tabOptions:t})}),(0,y.jsxs)(d.ZP,{item:!0,xs:12,sx:{paddingTop:"20px"},children:[(0,y.jsx)(u.Z,{sx:{marginBottom:"20px"},children:I===("not configured"===(null===l||void 0===l?void 0:l.advancedMetricsStatus)?0:3)?(0,y.jsxs)(d.ZP,{container:!0,children:[(0,y.jsx)(d.ZP,{item:!0,children:(0,y.jsx)(u.Z,{sx:{color:"#000",fontSize:18,lineHeight:2,fontWeight:700,marginLeft:"21px",display:"flex"},children:"Server Information"})}),(0,y.jsx)(d.ZP,{item:!0,xs:!0,children:(0,y.jsx)(d.ZP,{container:!0,direction:"row-reverse",children:(0,y.jsx)(d.ZP,{item:!0,children:(0,y.jsx)(ht.zx,{id:"sync",type:"button",variant:"callAction",onClick:function(){c((0,yt.y)())},icon:(0,y.jsx)(bt.Z,{}),label:"Sync"})})})})]}):(0,y.jsx)(Fe.Z,{timeStart:m,setTimeStart:v,timeEnd:C,setTimeEnd:w,triggerSync:function(){c((0,$.JO)())}})}),(0,y.jsx)(k.x,{index:"not configured"===(null===l||void 0===l?void 0:l.advancedMetricsStatus)?3:0,value:I,children:(0,y.jsxs)(Pe,{children:["unavailable"===(null===l||void 0===l?void 0:l.advancedMetricsStatus)&&(0,y.jsx)(Qe.Z,{iconComponent:(0,y.jsx)(b.a$2,{}),title:"We can\u2019t retrieve advanced metrics at this time.",help:(0,y.jsx)(u.Z,{sx:{fontSize:"14px"},children:"It looks like Prometheus is not available or reachable at the moment."})}),E.length?F(Ae):null]})}),(0,y.jsx)(k.x,{index:1,value:I,children:(0,y.jsxs)(Pe,{children:["unavailable"===(null===l||void 0===l?void 0:l.advancedMetricsStatus)&&(0,y.jsx)(Qe.Z,{iconComponent:(0,y.jsx)(b.a$2,{}),title:"We can\u2019t retrieve advanced metrics at this time.",help:(0,y.jsx)(u.Z,{sx:{fontSize:"14px"},children:"It looks like Prometheus is not available or reachable at the moment."})}),E.length?F(Be):null]})}),(0,y.jsx)(k.x,{index:2,value:I,children:(0,y.jsxs)(Pe,{children:["unavailable"===(null===l||void 0===l?void 0:l.advancedMetricsStatus)&&(0,y.jsx)(Qe.Z,{iconComponent:(0,y.jsx)(b.a$2,{}),title:"We can\u2019t retrieve advanced metrics at this time.",help:(0,y.jsx)(u.Z,{sx:{fontSize:"14px"},children:"It looks like Prometheus is not available or reachable at the moment."})}),E.length?F(Re):null,(0,y.jsx)("h2",{style:{margin:0,borderBottom:"1px solid #dedede"},children:"Advanced"}),E.length?F(We):null]})}),(0,y.jsxs)(k.x,{index:"not configured"===(null===l||void 0===l?void 0:l.advancedMetricsStatus)?0:3,value:I,children:[!l&&(0,y.jsx)(p.Z,{}),l&&(0,y.jsx)(jt,{usage:l})]})]})]})})),Ct=n(32291),wt=(0,x.Z)((function(e){return(0,c.Z)((0,l.Z)({},(0,f.Bz)(e.spacing(4))))}))((function(e){var t=e.classes,n=(0,J.TL)(),i=(0,r.useState)(!0),l=(0,a.Z)(i,2),o=l[0],c=l[1],x=(0,s.v9)((function(e){return e.dashboard.usage}));return(0,r.useEffect)((function(){o&&(c(!1),n((0,yt.y)()))}),[o,n]),(0,y.jsxs)(r.Fragment,{children:[(0,y.jsx)(Ct.Z,{label:"Metrics"}),o?(0,y.jsx)(d.ZP,{container:!0,children:(0,y.jsx)(d.ZP,{item:!0,xs:12,className:t.container,children:(0,y.jsx)(p.Z,{})})}):(0,y.jsx)(Zt,{usage:x})]})}))},19847:function(e,t,n){n.d(t,{x:function(){return s}});var i=n(1413),a=n(45987),l=n(72791),r=n(80184),o=["children","value","index"],s=function(e){var t=e.children,n=e.value,s=e.index,d=(0,a.Z)(e,o);return(0,r.jsx)("div",(0,i.Z)((0,i.Z)({role:"tabpanel",hidden:n!==s,id:"simple-tabpanel-".concat(s),"aria-labelledby":"simple-tab-".concat(s),style:{marginTop:"5px"}},d),{},{children:n===s&&(0,r.jsx)(l.Fragment,{children:t})}))}}}]);
|
|
//# sourceMappingURL=4131.34341b0f.chunk.js.map
|