2 lines
7.4 KiB
JavaScript
2 lines
7.4 KiB
JavaScript
"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[2661],{82661:function(e,n,a){a.r(n),a.d(n,{default:function(){return F}});var t=a(29439),s=a(1413),l=a(72791),i=a(60364),o=a(61889),r=a(36151),c=a(11135),u=a(25787),d=a(81207),f=a(56890),m=a(35855),Z=a(53994),p=a(53382),x=a(94454),h=a(79836),v=a(23814),j=a(42649),b=a(56028),g=a(21435),k=a(27391),S=a(30829),C=a(20068),N=a(68096),M=a(72455),E=a(66172),P=a(84570),w=a(80184),y=(0,M.Z)((function(e){return(0,c.Z)((0,s.Z)({},v.gM))}));function T(e){var n=y();return(0,w.jsx)(k.Z,(0,s.Z)({InputProps:{classes:n}},e))}var B=(0,u.Z)((function(e){return(0,c.Z)((0,s.Z)((0,s.Z)({},v.YI),v.Hr))}))((function(e){var n=e.classes,a=e.id,i=e.name,r=e.onChange,c=e.options,u=e.label,d=e.tooltip,f=void 0===d?"":d,m=e.value,Z=e.disabled,p=void 0!==Z&&Z,x=(0,l.useState)(c[0]),h=(0,t.Z)(x,2),v=h[0],j=h[1];return(0,w.jsx)(l.Fragment,{children:(0,w.jsxs)(o.ZP,{item:!0,xs:12,className:n.fieldContainer,children:[""!==u&&(0,w.jsxs)(S.Z,{htmlFor:a,className:n.inputLabel,children:[(0,w.jsx)("span",{children:u}),""!==f&&(0,w.jsx)("div",{className:n.tooltipContainer,children:(0,w.jsx)(C.Z,{title:f,placement:"top-start",children:(0,w.jsx)("div",{className:n.tooltip,children:(0,w.jsx)(P.Z,{})})})})]}),(0,w.jsx)(N.Z,{fullWidth:!0,children:(0,w.jsx)(E.Z,{id:a,options:c,getOptionLabel:function(e){return e.label},isOptionEqualToValue:function(e){return e.value===m},disabled:p,renderInput:function(e){return(0,w.jsx)(T,(0,s.Z)((0,s.Z)({},e),{},{name:i}))},value:v,onChange:function(e,n){n&&(r(n.value),j(n))},autoHighlight:!0})})]})})})),O=a(56375),R=(0,i.$j)(null,{setModalErrorSnackMessage:j.zb}),F=(0,u.Z)((function(e){return(0,c.Z)((0,s.Z)((0,s.Z)({arnField:{"& div div .MuiOutlinedInput-root":{padding:0}}},v.DF),v.ID))}))(R((function(e){var n=e.classes,a=e.open,s=e.selectedBucket,i=e.closeModalAndRefresh,c=e.setModalErrorSnackMessage,u=(0,l.useState)(!1),v=(0,t.Z)(u,2),j=v[0],k=v[1],S=(0,l.useState)(""),C=(0,t.Z)(S,2),N=C[0],M=C[1],E=(0,l.useState)(""),P=(0,t.Z)(E,2),y=P[0],T=P[1],R=(0,l.useState)(""),F=(0,t.Z)(R,2),D=F[0],H=F[1],I=(0,l.useState)([]),z=(0,t.Z)(I,2),W=z[0],L=z[1],A=(0,l.useState)([]),G=(0,t.Z)(A,2),U=G[0],V=G[1],$=(0,l.useCallback)((function(){k(!0),d.Z.invoke("GET","/api/v1/admin/arns").then((function(e){var n=[];null!==e.arns&&(n=e.arns),k(!1),V(n)})).catch((function(e){k(!1),c(e)}))}),[c]);(0,l.useEffect)((function(){$()}),[$]);var _=function(e,n){var a=W.indexOf(n),t=[];-1===a?t=t.concat(W,n):0===a?t=t.concat(W.slice(1)):a===W.length-1?t=t.concat(W.slice(0,-1)):a>0&&(t=t.concat(W.slice(0,a),W.slice(a+1))),L(t)},q=U.map((function(e){return{label:e,value:e}}));return(0,w.jsx)(b.Z,{modalOpen:a,onClose:function(){i()},title:"Subscribe To Bucket Events",titleIcon:(0,w.jsx)(O.c3W,{}),children:(0,w.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),j||(k(!0),d.Z.invoke("POST","/api/v1/buckets/".concat(s,"/events"),{configuration:{arn:D,events:W,prefix:N,suffix:y},ignoreExisting:!0}).then((function(){k(!1),i()})).catch((function(e){k(!1),c(e)})))},children:(0,w.jsxs)(o.ZP,{container:!0,children:[(0,w.jsxs)(o.ZP,{item:!0,xs:12,className:n.formScrollable,children:[(0,w.jsx)(o.ZP,{item:!0,xs:12,className:"".concat(n.arnField," ").concat(n.formFieldRow),children:(0,w.jsx)(B,{onChange:function(e){H(e)},id:"select-access-policy",name:"select-access-policy",label:"ARN",value:D,options:q})}),(0,w.jsx)(o.ZP,{item:!0,xs:12,className:n.formFieldRow,children:(0,w.jsx)(g.Z,{id:"prefix-input",name:"prefix-input",label:"Prefix",value:N,onChange:function(e){M(e.target.value)}})}),(0,w.jsx)(o.ZP,{item:!0,xs:12,className:n.formFieldRow,children:(0,w.jsx)(g.Z,{id:"suffix-input",name:"suffix-input",label:"Suffix",value:y,onChange:function(e){T(e.target.value)}})}),(0,w.jsx)(o.ZP,{item:!0,xs:12,className:n.formFieldRow,children:(0,w.jsxs)(h.Z,{size:"medium",children:[(0,w.jsx)(f.Z,{className:n.minTableHeader,children:(0,w.jsxs)(m.Z,{children:[(0,w.jsx)(Z.Z,{children:"Select"}),(0,w.jsx)(Z.Z,{children:"Event"})]})}),(0,w.jsx)(p.Z,{children:[{label:"PUT - Object Uploaded",value:"put"},{label:"GET - Object accessed",value:"get"},{label:"DELETE - Object Deleted",value:"delete"}].map((function(e){return(0,w.jsxs)(m.Z,{onClick:function(n){return _(0,e.value)},children:[(0,w.jsx)(Z.Z,{padding:"checkbox",children:(0,w.jsx)(x.Z,{value:e.value,color:"primary",inputProps:{"aria-label":"secondary checkbox"},onChange:function(n){return _(0,e.value)},checked:W.includes(e.value)})}),(0,w.jsx)(Z.Z,{className:n.wrapCell,children:e.label})]},"group-".concat(e.value))}))})]})})]}),(0,w.jsxs)(o.ZP,{item:!0,xs:12,className:n.modalButtonBar,children:[(0,w.jsx)(r.Z,{type:"button",variant:"outlined",color:"primary",disabled:j,onClick:function(){i()},children:"Cancel"}),(0,w.jsx)(r.Z,{type:"submit",variant:"contained",color:"primary",disabled:j,children:"Save"})]})]})})})})))},56028:function(e,n,a){var t=a(29439),s=a(1413),l=a(72791),i=a(60364),o=a(13400),r=a(55646),c=a(5574),u=a(65661),d=a(39157),f=a(11135),m=a(25787),Z=a(23814),p=a(42649),x=a(29823),h=a(28057),v=a(80184),j=(0,i.$j)((function(e){return{modalSnackMessage:e.system.modalSnackBar}}),{setModalSnackMessage:p.MK});n.Z=(0,m.Z)((function(e){return(0,f.Z)((0,s.Z)((0,s.Z)({},Z.Qw),{},{content:{padding:25,paddingBottom:0},customDialogSize:{width:"100%",maxWidth:765}},Z.sN))}))(j((function(e){var n=e.onClose,a=e.modalOpen,i=e.title,f=e.children,m=e.classes,Z=e.wideLimit,p=void 0===Z||Z,j=e.modalSnackMessage,b=e.noContentPadding,g=e.setModalSnackMessage,k=e.titleIcon,S=void 0===k?null:k,C=(0,l.useState)(!1),N=(0,t.Z)(C,2),M=N[0],E=N[1];(0,l.useEffect)((function(){g("")}),[g]),(0,l.useEffect)((function(){if(j){if(""===j.message)return void E(!1);"error"!==j.type&&E(!0)}}),[j]);var P=p?{classes:{paper:m.customDialogSize}}:{maxWidth:"lg",fullWidth:!0},w="";return j&&(w=j.detailedErrorMsg,(""===j.detailedErrorMsg||j.detailedErrorMsg.length<5)&&(w=j.message)),(0,v.jsxs)(c.Z,(0,s.Z)((0,s.Z)({open:a,classes:m},P),{},{scroll:"paper",onClose:function(e,a){"backdropClick"!==a&&n()},className:m.root,children:[(0,v.jsxs)(u.Z,{className:m.title,children:[(0,v.jsxs)("div",{className:m.titleText,children:[S," ",i]}),(0,v.jsx)("div",{className:m.closeContainer,children:(0,v.jsx)(o.Z,{"aria-label":"close",id:"close",className:m.closeButton,onClick:n,disableRipple:!0,size:"small",children:(0,v.jsx)(x.Z,{})})})]}),(0,v.jsx)(h.Z,{isModal:!0}),(0,v.jsx)(r.Z,{open:M,className:m.snackBarModal,onClose:function(){E(!1),g("")},message:w,ContentProps:{className:"".concat(m.snackBar," ").concat(j&&"error"===j.type?m.errorSnackBar:"")},autoHideDuration:j&&"error"===j.type?1e4:5e3}),(0,v.jsx)(d.Z,{className:b?"":m.content,children:f})]}))})))},56890:function(e,n,a){a.d(n,{Z:function(){return v}});var t=a(87462),s=a(63366),l=a(72791),i=a(28182),o=a(90767),r=a(829),c=a(93736),u=a(47630),d=a(95159);function f(e){return(0,d.Z)("MuiTableHead",e)}(0,a(30208).Z)("MuiTableHead",["root"]);var m=a(80184),Z=["className","component"],p=(0,u.ZP)("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:function(e,n){return n.root}})({display:"table-header-group"}),x={variant:"head"},h="thead",v=l.forwardRef((function(e,n){var a=(0,c.Z)({props:e,name:"MuiTableHead"}),l=a.className,u=a.component,d=void 0===u?h:u,v=(0,s.Z)(a,Z),j=(0,t.Z)({},a,{component:d}),b=function(e){var n=e.classes;return(0,o.Z)({root:["root"]},f,n)}(j);return(0,m.jsx)(r.Z.Provider,{value:x,children:(0,m.jsx)(p,(0,t.Z)({as:d,className:(0,i.Z)(b.root,l),ref:n,role:d===h?null:"rowgroup",ownerState:j},v))})}))}}]);
|
|
//# sourceMappingURL=2661.9502091e.chunk.js.map
|