mirror of
https://github.com/OpenMaxIO/openmaxio-object-browser
synced 2026-07-01 07:41:18 -07:00
2 lines
19 KiB
JavaScript
2 lines
19 KiB
JavaScript
|
|
(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[1011],{99956:(e,t,o)=>{"use strict";o.d(t,{X:()=>i});o(65043);var n=o(24241),r=o(70579);const i=[{label:"Access Key",elementKey:"accessKey"},{label:"Expiry",elementKey:"expiration",renderFunction:e=>{if("1970-01-01T00:00:00Z"!==e){const t=n.c9.fromISO(e).toUTC().toFormat("y/M/d hh:mm:ss z");return(0,r.jsx)("span",{title:t,children:t})}return(0,r.jsx)("span",{children:"no-expiry"})}},{label:"Status",elementKey:"accountStatus",renderFunction:e=>"off"===e?"Disabled":"Enabled"},{label:"Name",elementKey:"name"},{label:"Description",elementKey:"description"}]},10158:(e,t,o)=>{"use strict";o.d(t,{A:()=>m});var n=o(65043),r=o(89923),i=o(56629),a=o(53518),l=o(41206),c=o(21383),s=o(64159),u=o(94141),p=o(77403),d=o(24241),f=o(70579);const m=e=>{let{open:t,selectedAccessKey:o,closeModalAndRefresh:m}=e;const y=(0,c.jL)(),[h,b]=(0,n.useState)(!1),[g,x]=(0,n.useState)(""),[v,C]=(0,n.useState)(""),[S,w]=(0,n.useState)(""),[j,k]=(0,n.useState)(),[E,_]=(0,n.useState)("enabled");(0,n.useEffect)((()=>{h||""===o||(b(!0),i.F.serviceAccounts.getServiceAccount(o||"").then((e=>{b(!1);const t=e.data;C((null===t||void 0===t?void 0:t.name)||""),null!==t&&void 0!==t&&t.expiration&&k(d.c9.fromISO(null===t||void 0===t?void 0:t.expiration)),w((null===t||void 0===t?void 0:t.description)||""),_(t.accountStatus),x(t.policy||"")})).catch((e=>{b(!1),y((0,s.Dy)((0,a.S)(e)))})))}),[o]);return(0,f.jsx)(u.A,{title:`Edit details of - ${o}`,modalOpen:t,onClose:()=>{m()},titleIcon:(0,f.jsx)(r.uYH,{}),children:(0,f.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:e=>{var t;t=g,e.preventDefault(),i.F.serviceAccounts.updateServiceAccount(o||"",{policy:t,description:S,expiry:j,name:v,status:E}).then((()=>{m()})).catch((async e=>{const t=await e.json();y((0,s.C9)((0,a.S)(t)))}))},children:(0,f.jsxs)(r.xA9,{container:!0,children:[(0,f.jsx)(r.xA9,{item:!0,xs:12,children:(0,f.jsx)(l.A,{label:"Access Key Policy",value:g,onChange:e=>{x(e)},editorHeight:"350px",helptip:(0,f.jsx)(n.Fragment,{children:(0,f.jsx)("a",{target:"blank",href:"https://min.io/docs/minio/kubernetes/upstream/administration/identity-access-management/policy-based-access-control.html#policy-document-structure",children:"Guide to access policy structure"})})})}),(0,f.jsx)(r.azJ,{sx:{marginBottom:"15px",marginTop:"15px",display:"flex",width:"100%","& label":{width:"195px"}},children:(0,f.jsx)(r.e8j,{noLabelMinWidth:!0,value:j,onChange:e=>{k(e)},id:"expiryTime",label:"Expiry",timeFormat:"24h",secondsSelector:!1})}),(0,f.jsx)(r.xA9,{xs:12,sx:{marginBottom:"15px"},children:(0,f.jsx)(r.cl_,{value:v,size:120,label:"Name",id:"name",name:"name",type:"text",placeholder:"Enter a name",onChange:e=>{C(e.target.value)}})}),(0,f.jsx)(r.xA9,{xs:12,sx:{marginBottom:"15px"},children:(0,f.jsx)(r.cl_,{size:120,value:S,label:"Description",id:"description",name:"description",type:"text",placeholder:"Enter a description",onChange:e=>{w(e.target.value)}})}),(0,f.jsxs)(r.xA9,{xs:12,sx:{display:"flex",alignItems:"center",justifyContent:"start",fontWeight:600,color:"rgb(7, 25, 62)",gap:2,marginBottom:"15px"},children:[(0,f.jsx)("label",{style:{width:"150px"},children:"Status"}),(0,f.jsx)(r.azJ,{sx:{padding:"2px"},children:(0,f.jsx)(r.dOG,{style:{gap:"115px"},indicatorLabels:["Enabled","Disabled"],checked:"on"===E,id:"saStatus",name:"saStatus",label:"",onChange:e=>{_(e.target.checked?"on":"off")},value:"yes"})})]}),(0,f.jsxs)(r.xA9,{item:!0,xs:12,sx:p.Uz.modalButtonBar,children:[(0,f.jsx)(r.$nd,{id:"cancel-sa-policy",type:"button",variant:"regular",onClick:()=>{m()},disabled:h,label:"Cancel"}),(0,f.jsx)(r.$nd,{id:"save-sa-policy",type:"submit",variant:"callAction",color:"primary",disabled:h,label:"Update"})]})]})})})}},72237:(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var n=o(65043),r=o(70579);const i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(o){return(0,r.jsx)(n.Suspense,{fallback:t,children:(0,r.jsx)(e,{...o})})}}},41206:(e,t,o)=>{"use strict";o.d(t,{A:()=>s});var n=o(65043),r=o(89923),i=o(61476),a=o.n(i),l=o(6681)
|
||
|
|
//# sourceMappingURL=1011.75fdf45e.chunk.js.map
|