"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[8158],{18158:function(e,n,t){t.r(n);var a=t(77439),i=t(49058),s=t(57223),r=t(67066),o=t.n(r),l=t(537),c=t(11927),d=t(4481),u=t(73130),p=t(80731),m=t(36045),h=t(70466),v=t(64519),Z=t(64964),f=t(46148),b=t(82266),g=t(77263),x=t(18054),P=(0,g.Z)(s.lazy((function(){return Promise.all([t.e(5201),t.e(1012)]).then(t.bind(t,61012))}))),y={setErrorSnackMessage:v.Ih},j=(0,l.$j)((function(e){return{loadingTenant:e.tenants.tenantDetails.loadingTenant}}),y);n.default=(0,d.Z)((function(e){return(0,c.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)({tableWrapper:{height:"450px"}},h.OR),h.qg),h.VX),(0,h.Bz)(e.spacing(4))))}))(j((function(e){var n=e.classes,t=e.setErrorSnackMessage,r=e.history,l=e.match,c=e.loadingTenant,d=(0,s.useState)([]),h=(0,a.Z)(d,2),v=h[0],g=h[1],y=(0,s.useState)(""),j=(0,a.Z)(y,2),E=j[0],S=j[1],N=(0,s.useState)(!0),w=(0,a.Z)(N,2),k=w[0],C=w[1],T=(0,s.useState)(null),L=(0,a.Z)(T,2),z=L[0],A=L[1],I=(0,s.useState)(!1),M=(0,a.Z)(I,2),R=M[0],V=M[1],F=l.params.tenantName,K=l.params.tenantNamespace;(0,s.useEffect)((function(){k&&Z.Z.invoke("GET","/api/v1/namespaces/".concat(K,"/tenants/").concat(F,"/pvcs")).then((function(e){var n=o()(e,"pvcs",[]);g(n||[]),C(!1)})).catch((function(e){C(!1),t(e)}))}),[k,t,F,K]);var B=v.filter((function(e){return e.name.includes(E)}));return(0,s.useEffect)((function(){c&&C(!0)}),[c]),(0,x.jsxs)(s.Fragment,{children:[R&&(0,x.jsx)(P,{deleteOpen:R,selectedPVC:z,closeDeleteModalAndRefresh:function(e){V(!1),C(!0)}}),(0,x.jsx)("h1",{className:n.sectionTitle,children:"Volumes"}),(0,x.jsx)(u.ZP,{item:!0,xs:12,className:n.actionsTray,children:(0,x.jsx)(p.Z,{placeholder:"\u641c\u7d22 (PVCs)",className:n.searchField,id:"search-resource",label:"",InputProps:{disableUnderline:!0,startAdornment:(0,x.jsx)(m.Z,{position:"start",children:(0,x.jsx)(b.Z,{})})},onChange:function(e){S(e.target.value)},variant:"standard"})}),(0,x.jsx)(u.ZP,{item:!0,xs:12,children:(0,x.jsx)("br",{})}),(0,x.jsx)(u.ZP,{item:!0,xs:12,className:n.tableBlock,children:(0,x.jsx)(f.Z,{itemActions:[{type:"view",onClick:function(e){r.push("/namespaces/".concat(K,"/tenants/").concat(F,"/pvcs/").concat(e.name))}},{type:"delete",onClick:function(e){var n=(0,i.Z)((0,i.Z)({},e),{},{tenant:F,namespace:K});A(n),V(!0)}}],columns:[{label:"Name",elementKey:"name"},{label:"Status",elementKey:"status",width:120},{label:"Capacity",elementKey:"capacity",width:120},{label:"\u5b58\u50a8\u7c7b",elementKey:"storageClass"}],isLoading:k,records:B,entityName:"PVCs",idField:"name",customPaperHeight:n.tableWrapper})})]})})))},36045:function(e,n,t){t.d(n,{Z:function(){return y}});var a=t(2759),i=t(91262),s=t(22376),r=t(57223),o=t(66977),l=t(32340),c=t(33677),d=t(26211),u=t(61800),p=t(96811),m=t(5814),h=t(42315);function v(e){return(0,h.Z)("MuiInputAdornment",e)}var Z,f=(0,t(7698).Z)("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]),b=t(71309),g=t(18054),x=["children","className","component","disablePointerEvents","disableTypography","position","variant"],P=(0,m.ZP)("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:function(e,n){var t=e.ownerState;return[n.root,n["position".concat((0,c.Z)(t.position))],!0===t.disablePointerEvents&&n.disablePointerEvents,n[t.variant]]}})((function(e){var n=e.theme,t=e.ownerState;return(0,s.Z)({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:n.palette.action.active},"filled"===t.variant&&(0,a.Z)({},"&.".concat(f.positionStart,"&:not(.").concat(f.hiddenLabel,")"),{marginTop:16}),"start"===t.position&&{marginRight:8},"end"===t.position&&{marginLeft:8},!0===t.disablePointerEvents&&{pointerEvents:"none"})})),y=r.forwardRef((function(e,n){var t=(0,b.Z)({props:e,name:"MuiInputAdornment"}),a=t.children,m=t.className,h=t.component,f=void 0===h?"div":h,y=t.disablePointerEvents,j=void 0!==y&&y,E=t.disableTypography,S=void 0!==E&&E,N=t.position,w=t.variant,k=(0,i.Z)(t,x),C=(0,p.Z)()||{},T=w;w&&C.variant,C&&!T&&(T=C.variant);var L=(0,s.Z)({},t,{hiddenLabel:C.hiddenLabel,size:C.size,disablePointerEvents:j,position:N,variant:T}),z=function(e){var n=e.classes,t=e.disablePointerEvents,a=e.hiddenLabel,i=e.position,s=e.size,r=e.variant,o={root:["root",t&&"disablePointerEvents",i&&"position".concat((0,c.Z)(i)),r,a&&"hiddenLabel",s&&"size".concat((0,c.Z)(s))]};return(0,l.Z)(o,v,n)}(L);return(0,g.jsx)(u.Z.Provider,{value:null,children:(0,g.jsx)(P,(0,s.Z)({as:f,ownerState:L,className:(0,o.Z)(z.root,m),ref:n},k,{children:"string"!==typeof a||S?(0,g.jsxs)(r.Fragment,{children:["start"===N?Z||(Z=(0,g.jsx)("span",{className:"notranslate",children:"\u200b"})):null,a]}):(0,g.jsx)(d.Z,{color:"text.secondary",children:a})}))})}))}}]);
//# sourceMappingURL=8158.be615f5d.chunk.js.map