"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[9297],{56028:function(e,t,s){var r=s(29439),o=s(1413),n=s(72791),a=s(60364),i=s(13400),l=s(55646),c=s(5574),d=s(65661),u=s(39157),m=s(11135),h=s(25787),p=s(23814),f=s(25469),x=s(29823),Z=s(28057),g=s(87995),j=s(80184);t.Z=(0,h.Z)((function(e){return(0,m.Z)((0,o.Z)((0,o.Z)({},p.Qw),{},{content:{padding:25,paddingBottom:0},customDialogSize:{width:"100%",maxWidth:765}},p.sN))}))((function(e){var t=e.onClose,s=e.modalOpen,m=e.title,h=e.children,p=e.classes,v=e.wideLimit,C=void 0===v||v,y=e.noContentPadding,b=e.titleIcon,k=void 0===b?null:b,N=(0,f.TL)(),E=(0,n.useState)(!1),B=(0,r.Z)(E,2),L=B[0],S=B[1],w=(0,a.v9)((function(e){return e.system.modalSnackBar}));(0,n.useEffect)((function(){N((0,g.MK)(""))}),[N]),(0,n.useEffect)((function(){if(w){if(""===w.message)return void S(!1);"error"!==w.type&&S(!0)}}),[w]);var D=C?{classes:{paper:p.customDialogSize}}:{maxWidth:"lg",fullWidth:!0},M="";return w&&(M=w.detailedErrorMsg,(""===w.detailedErrorMsg||w.detailedErrorMsg.length<5)&&(M=w.message)),(0,j.jsxs)(c.Z,(0,o.Z)((0,o.Z)({open:s,classes:p},D),{},{scroll:"paper",onClose:function(e,s){"backdropClick"!==s&&t()},className:p.root,children:[(0,j.jsxs)(d.Z,{className:p.title,children:[(0,j.jsxs)("div",{className:p.titleText,children:[k," ",m]}),(0,j.jsx)("div",{className:p.closeContainer,children:(0,j.jsx)(i.Z,{"aria-label":"close",id:"close",className:p.closeButton,onClick:t,disableRipple:!0,size:"small",children:(0,j.jsx)(x.Z,{})})})]}),(0,j.jsx)(Z.Z,{isModal:!0}),(0,j.jsx)(l.Z,{open:L,className:p.snackBarModal,onClose:function(){S(!1),N((0,g.MK)(""))},message:M,ContentProps:{className:"".concat(p.snackBar," ").concat(w&&"error"===w.type?p.errorSnackBar:"")},autoHideDuration:w&&"error"===w.type?1e4:5e3}),(0,j.jsx)(u.Z,{className:y?"":p.content,children:h})]}))}))},89297:function(e,t,s){s.r(t);var r=s(93433),o=s(1413),n=s(61889),a=s(36151),i=s(11135),l=s(25787),c=(s(72791),s(56028)),d=s(92983),u=s(23814),m=s(38734),h=s(45248),p=s(80184);t.default=(0,l.Z)((function(e){return(0,i.Z)((0,o.Z)({buttonContainer:{textAlign:"right"},errorsList:{height:"calc(100vh - 280px)"}},u.ID))}))((function(e){var t=e.open,s=e.onCloseFormatErrorsList,o=e.errorsList,i=e.classes;return(0,p.jsx)(c.Z,{modalOpen:t,title:"Format Errors",onClose:s,titleIcon:(0,p.jsx)(m.cno,{}),children:(0,p.jsxs)(n.ZP,{container:!0,children:[(0,p.jsxs)(n.ZP,{item:!0,xs:12,className:i.modalFormScrollable,children:["There were some issues trying to format the selected CSI Drives, please fix the issues and try again.",(0,p.jsx)("br",{}),(0,p.jsx)(d.Z,{columns:[{label:"Node",elementKey:"node"},{label:"Drive",elementKey:"drive"},{label:"Message",elementKey:"error"}],entityName:"Format Errors",idField:"drive",records:o,isLoading:!1,customPaperHeight:i.errorsList,textSelectable:!0,noBackground:!0})]}),(0,p.jsxs)(n.ZP,{item:!0,xs:12,className:i.modalButtonBar,children:[(0,p.jsx)(a.Z,{color:"primary",variant:"outlined",onClick:function(){!function(e,t){var s=document.createElement("a");s.setAttribute("href","data:application/json;charset=utf-8,"+(0,h.LL)(t)),s.setAttribute("download",e),s.style.display="none",document.body.appendChild(s),s.click(),document.body.removeChild(s)}("csiFormatErrors.json",JSON.stringify((0,r.Z)(o)))},children:"Download"}),(0,p.jsx)(a.Z,{onClick:s,color:"primary",variant:"contained",autoFocus:!0,children:"Done"})]})]})})}))}}]);
//# sourceMappingURL=9297.8a17bfe7.chunk.js.map