Files
openmaxio-object-browser/portal-ui/build/static/js/1705.7586dfce.chunk.js
Daniel Valdivia ee82748aeb Release v0.15.10 (#1820)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-04-09 18:05:04 -07:00

2 lines
2.7 KiB
JavaScript

"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[1705],{71705:function(e,n,t){t.r(n);var l=t(29439),o=t(72791),c=t(9505),s=t(64554),a=t(56087),i=t(38442),u=t(26181),r=t.n(u),d=t(81918),f=t(29823),h=t(42419),v=t(75578),p=t(72401),Z=t(80184),x=(0,v.Z)(o.lazy((function(){return t.e(247).then(t.bind(t,40247))}))),j=(0,v.Z)(o.lazy((function(){return t.e(2763).then(t.bind(t,22763))})));n.default=function(e){var n=e.setErrorSnackMessage,t=e.bucketName,u=(0,o.useState)(null),v=(0,l.Z)(u,2),m=v[0],T=v[1],k=(0,o.useState)(!1),b=(0,l.Z)(k,2),g=b[0],G=b[1],_=(0,o.useState)([]),S=(0,l.Z)(_,2),y=S[0],C=S[1],A=(0,o.useState)(["",""]),E=(0,l.Z)(A,2),U=E[0],N=E[1],z=(0,o.useState)(!1),I=(0,l.Z)(z,2),w=I[0],F=I[1],P=(0,c.Z)((function(e){var n,t;null!=e&&null!=(null===e||void 0===e?void 0:e.details)&&(T(null===e||void 0===e||null===(n=e.details)||void 0===n?void 0:n.tags),C(Object.keys(null===e||void 0===e||null===(t=e.details)||void 0===t?void 0:t.tags)))}),(function(e){n(e)})),B=(0,l.Z)(P,2),K=B[0],O=B[1],D=function(){O("GET","/api/v1/buckets/".concat(t))};return(0,o.useEffect)((function(){D()}),[t]),(0,Z.jsxs)(s.Z,{children:[K?(0,Z.jsx)(p.Z,{style:{width:16,height:16}}):null,(0,Z.jsx)(i.s,{scopes:[a.Ft.S3_GET_BUCKET_TAGGING],resource:t,children:(0,Z.jsxs)(s.Z,{sx:{display:"flex",flexFlow:"column"},children:[(0,Z.jsx)(s.Z,{children:y&&y.map((function(e,n){var l=r()(m,"".concat(e),"");return""!==l?(0,Z.jsx)(i.s,{scopes:[a.Ft.S3_PUT_BUCKET_TAGGING],resource:t,matchAll:!0,errorProps:{deleteIcon:null,onDelete:null},children:(0,Z.jsx)(d.Z,{style:{textTransform:"none",marginRight:"5px"},size:"small",label:"".concat(e," : ").concat(l),color:"primary",deleteIcon:(0,Z.jsx)(f.Z,{}),onDelete:function(){!function(e,n){N([e,n]),F(!0)}(e,l)}})},"chip-".concat(n)):null}))}),(0,Z.jsx)(i.s,{scopes:[a.Ft.S3_PUT_BUCKET_TAGGING],resource:t,errorProps:{disabled:!0,onClick:null},children:(0,Z.jsx)(d.Z,{style:{maxWidth:80,marginTop:"10px"},icon:(0,Z.jsx)(h.Z,{}),clickable:!0,size:"small",label:"Add tag",color:"primary",variant:"outlined",onClick:function(){G(!0)}})})]})}),g&&(0,Z.jsx)(x,{modalOpen:g,currentTags:m,bucketName:t,onCloseAndUpdate:function(e){G(!1),e&&D()}}),w&&(0,Z.jsx)(j,{deleteOpen:w,currentTags:m,bucketName:t,onCloseAndUpdate:function(e){F(!1),e&&D()},selectedTag:U})]})}},9505:function(e,n,t){var l=t(29439),o=t(72791),c=t(81207);n.Z=function(e,n){var t=(0,o.useState)(!1),s=(0,l.Z)(t,2),a=s[0],i=s[1];return[a,function(t,l,o){i(!0),c.Z.invoke(t,l,o).then((function(n){i(!1),e(n)})).catch((function(e){i(!1),n(e)}))}]}},42419:function(e,n,t){var l=t(95318);n.Z=void 0;var o=l(t(45649)),c=t(80184),s=(0,o.default)((0,c.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");n.Z=s}}]);
//# sourceMappingURL=1705.7586dfce.chunk.js.map