Files
object-browser/portal-ui/build/static/js/1913.2b54b9d3.chunk.js
Alex 262a601d21 Release v0.22.0 (#2482)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-12-02 15:12:59 -08:00

2 lines
6.8 KiB
JavaScript

"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[1913],{33690:function(e,n,t){t.r(n);var o=t(29439),i=t(1413),a=t(72791),r=t(75952),l=t(11135),s=t(25787),c=t(61889),d=t(23814),u=t(81207),f=t(56028),p=t(90673),m=t(56096),x=t(92217),h=t(87995),Z=t(25469),b=t(19859),g=t(80184);(0,l.Z)((0,i.Z)((0,i.Z)({},d.ID),d.bK));n.default=(0,s.Z)((function(e){return(0,l.Z)((0,i.Z)((0,i.Z)((0,i.Z)({codeMirrorContainer:{marginBottom:20,"& label":{marginBottom:".5rem"},"& label + div":{display:"none"}}},d.DF),d.ID),d.bK))}))((function(e){var n=e.classes,t=e.open,i=e.bucketName,l=e.actualPolicy,s=e.actualDefinition,d=e.closeModalAndRefresh,j=(0,Z.TL)(),v=(0,a.useState)(!1),y=(0,o.Z)(v,2),C=y[0],P=y[1],S=(0,a.useState)(""),N=(0,o.Z)(S,2),k=N[0],w=N[1],M=(0,a.useState)(b.L),B=(0,o.Z)(M,2),O=B[0],T=B[1];return(0,a.useEffect)((function(){w(l),T(s?JSON.stringify(JSON.parse(s),null,4):b.L)}),[w,l,T,s]),(0,g.jsx)(f.Z,{title:"Change Access Policy",modalOpen:t,onClose:function(){d()},titleIcon:(0,g.jsx)(m.QXQ,{}),children:(0,g.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),C||(P(!0),u.Z.invoke("PUT","/api/v1/buckets/".concat(i,"/set-policy"),{access:k,definition:O}).then((function(e){P(!1),d()})).catch((function(e){P(!1),j((0,h.zb)(e))})))},children:(0,g.jsxs)(c.ZP,{container:!0,children:[(0,g.jsxs)(c.ZP,{item:!0,xs:12,className:n.modalFormScrollable,children:[(0,g.jsx)(c.ZP,{item:!0,xs:12,className:n.formFieldRow,children:(0,g.jsx)(p.Z,{value:k,label:"Access Policy",id:"select-access-policy",name:"select-access-policy",onChange:function(e){w(e.target.value)},options:[{value:"PRIVATE",label:"Private"},{value:"PUBLIC",label:"Public"},{value:"CUSTOM",label:"Custom"}]})}),"PUBLIC"===k&&(0,g.jsx)("div",{style:{marginTop:"25px",fontSize:"14px",fontStyle:"italic",color:"#5E5E5E"},children:"* Warning: With Public access anyone will be able to upload, download and delete files from this Bucket *"}),"CUSTOM"===k&&(0,g.jsx)(c.ZP,{item:!0,xs:12,className:n.codeMirrorContainer,children:(0,g.jsx)(x.Z,{label:"Write Policy",value:O,onBeforeChange:function(e,n,t){T(t)},editorHeight:"350px"})})]}),(0,g.jsxs)(c.ZP,{item:!0,xs:12,className:n.modalButtonBar,children:[(0,g.jsx)(r.zx,{id:"cancel",type:"button",variant:"regular",onClick:function(){d()},disabled:C,label:"Cancel"}),(0,g.jsx)(r.zx,{id:"set",type:"submit",variant:"callAction",disabled:C||"CUSTOM"===k&&!O,label:"Set"})]})]})})})}))},92217:function(e,n,t){var o=t(1413),i=t(72791),a=t(61889),r=t(30829),l=t(20068),s=t(64554),c=t(11135),d=t(25787),u=t(84570),f=t(23814),p=t(56096),m=t(75952),x=t(78029),h=t.n(x),Z=t(90932),b=t(27454),g=t(80184);n.Z=(0,d.Z)((function(e){return(0,c.Z)((0,o.Z)({},f.YI))}))((function(e){var n=e.value,t=e.label,o=void 0===t?"":t,c=e.tooltip,d=void 0===c?"":c,f=e.mode,x=void 0===f?"json":f,j=e.classes,v=e.onBeforeChange,y=(e.readOnly,e.editorHeight),C=void 0===y?"250px":y;return(0,g.jsxs)(i.Fragment,{children:[(0,g.jsx)(a.ZP,{item:!0,xs:12,sx:{marginBottom:"10px"},children:(0,g.jsxs)(r.Z,{className:j.inputLabel,children:[(0,g.jsx)("span",{children:o}),""!==d&&(0,g.jsx)("div",{className:j.tooltipContainer,children:(0,g.jsx)(l.Z,{title:d,placement:"top-start",children:(0,g.jsx)("div",{className:j.tooltip,children:(0,g.jsx)(u.Z,{})})})})]})}),(0,g.jsx)(a.ZP,{item:!0,xs:12,style:{maxHeight:C,overflow:"auto",border:"1px solid #eaeaea"},children:(0,g.jsx)(Z.Z,{value:n,language:x,onChange:function(e){v(null,null,e.target.value)},id:"code_wrapper",padding:15,style:{fontSize:12,backgroundColor:"#fefefe",fontFamily:"ui-monospace,SFMono-Regular,SF Mono,Consolas,Liberation Mono,Menlo,monospace",minHeight:C||"initial",color:"#000000"}})}),(0,g.jsx)(a.ZP,{item:!0,xs:12,sx:{background:"#f7f7f7",border:"1px solid #eaeaea",borderTop:0},children:(0,g.jsx)(s.Z,{sx:{display:"flex",alignItems:"center",padding:"2px",paddingRight:"5px",justifyContent:"flex-end","& button":{height:"26px",width:"26px",padding:"2px"," .min-icon":{marginLeft:"0"}}},children:(0,g.jsx)(b.Z,{tooltip:"Copy to Clipboard",children:(0,g.jsx)(h(),{text:n,children:(0,g.jsx)(m.zx,{type:"button",id:"copy-code-mirror",icon:(0,g.jsx)(p.TIy,{}),color:"primary",variant:"regular"})})})})})]})}))},56028:function(e,n,t){var o=t(29439),i=t(1413),a=t(72791),r=t(60364),l=t(13400),s=t(55646),c=t(5574),d=t(65661),u=t(39157),f=t(11135),p=t(25787),m=t(23814),x=t(25469),h=t(29823),Z=t(28057),b=t(87995),g=t(80184);n.Z=(0,p.Z)((function(e){return(0,f.Z)((0,i.Z)((0,i.Z)({},m.Qw),{},{content:{padding:25,paddingBottom:0},customDialogSize:{width:"100%",maxWidth:765}},m.sN))}))((function(e){var n=e.onClose,t=e.modalOpen,f=e.title,p=e.children,m=e.classes,j=e.wideLimit,v=void 0===j||j,y=e.noContentPadding,C=e.titleIcon,P=void 0===C?null:C,S=(0,x.TL)(),N=(0,a.useState)(!1),k=(0,o.Z)(N,2),w=k[0],M=k[1],B=(0,r.v9)((function(e){return e.system.modalSnackBar}));(0,a.useEffect)((function(){S((0,b.MK)(""))}),[S]),(0,a.useEffect)((function(){if(B){if(""===B.message)return void M(!1);"error"!==B.type&&M(!0)}}),[B]);var O=v?{classes:{paper:m.customDialogSize}}:{maxWidth:"lg",fullWidth:!0},T="";return B&&(T=B.detailedErrorMsg,(""===B.detailedErrorMsg||B.detailedErrorMsg.length<5)&&(T=B.message)),(0,g.jsxs)(c.Z,(0,i.Z)((0,i.Z)({open:t,classes:m},O),{},{scroll:"paper",onClose:function(e,t){"backdropClick"!==t&&n()},className:m.root,children:[(0,g.jsxs)(d.Z,{className:m.title,children:[(0,g.jsxs)("div",{className:m.titleText,children:[P," ",f]}),(0,g.jsx)("div",{className:m.closeContainer,children:(0,g.jsx)(l.Z,{"aria-label":"close",id:"close",className:m.closeButton,onClick:n,disableRipple:!0,size:"small",children:(0,g.jsx)(h.Z,{})})})]}),(0,g.jsx)(Z.Z,{isModal:!0}),(0,g.jsx)(s.Z,{open:w,className:m.snackBarModal,onClose:function(){M(!1),S((0,b.MK)(""))},message:T,ContentProps:{className:"".concat(m.snackBar," ").concat(B&&"error"===B.type?m.errorSnackBar:"")},autoHideDuration:B&&"error"===B.type?1e4:5e3}),(0,g.jsx)(u.Z,{className:y?"":m.content,children:p})]}))}))},19859:function(e,n,t){t.d(n,{L:function(){return o}});var o='{\n "Version": "2012-10-17",\n "Statement": [\n \n ]\n}'},61120:function(e,n,t){function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}t.d(n,{Z:function(){return o}})},60136:function(e,n,t){t.d(n,{Z:function(){return i}});var o=t(89611);function i(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&(0,o.Z)(e,n)}},82963:function(e,n,t){t.d(n,{Z:function(){return a}});var o=t(71002),i=t(97326);function a(e,n){if(n&&("object"===(0,o.Z)(n)||"function"===typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.Z)(e)}}}]);
//# sourceMappingURL=1913.2b54b9d3.chunk.js.map