mirror of
https://github.com/OpenMaxIO/openmaxio-object-browser
synced 2026-07-01 07:41:18 -07:00
2 lines
2.0 KiB
JavaScript
2 lines
2.0 KiB
JavaScript
"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[3138],{53138:(e,t,n)=>{n.r(t),n.d(t,{default:()=>j,emptyContent:()=>u});var a=n(72791),s=n(29945),r=n(57689),o=n(56087),l=n(87995),i=n(44690),c=n(23814),p=n(9505),x=n(40214),m=n(79844),d=n(61342),h=n(80184);const u='{\n "bytes": ""\n}',j=()=>{const e=(0,i.TL)(),t=(0,r.s0)(),[n,j]=(0,p.Z)((()=>t("".concat(o.gA.KMS_KEYS))),(t=>e((0,l.Ih)(t)))),[y,b]=(0,a.useState)(""),[k,g]=(0,a.useState)(u),f=""!==y.trim()&&-1===y.indexOf(" ");return(0,a.useEffect)((()=>{e((0,l.Sc)("import_key"))}),[]),(0,h.jsx)(a.Fragment,{children:(0,h.jsxs)(s.rjZ,{item:!0,xs:12,children:[(0,h.jsx)(m.Z,{label:(0,h.jsx)(s.hbI,{onClick:()=>t(o.gA.KMS_KEYS),label:"Keys"}),actions:(0,h.jsx)(d.Z,{})}),(0,h.jsx)(s.Xgh,{children:(0,h.jsx)(s.ltY,{title:"Import Key",icon:(0,h.jsx)(s.sR0,{}),helpBox:(0,h.jsx)(x.Z,{helpText:"Encryption Key",contents:["Import a cryptographic key in the Key Management Service server connected to MINIO."]}),children:(0,h.jsxs)("form",{noValidate:!0,autoComplete:"off",onSubmit:e=>{(e=>{e.preventDefault();let t=JSON.parse(k);j("POST","/api/v1/kms/keys/".concat(y,"/import"),t)})(e)},children:[(0,h.jsx)(s.Wzg,{id:"key-name",name:"key-name",label:"Key Name",autoFocus:!0,value:y,error:(e=>-1!==e.indexOf(" ")?"Key name cannot contain spaces":"")(y),onChange:e=>{b(e.target.value)}}),(0,h.jsx)(s.pq4,{label:"Set key Content",value:k,onChange:e=>{g(e)},editorHeight:"350px"}),(0,h.jsxs)(s.rjZ,{item:!0,xs:12,sx:c.ID.modalButtonBar,children:[(0,h.jsx)(s.zxk,{id:"clear",type:"button",variant:"regular",onClick:()=>{b(""),g("")},label:"Clear"}),(0,h.jsx)(s.zxk,{id:"import-key",type:"submit",variant:"callAction",color:"primary",disabled:n||!f,label:"Import"})]})]})})})]})})}},40214:(e,t,n)=>{n.d(t,{Z:()=>o});var a=n(72791),s=n(29945),r=n(80184);const o=e=>{let{helpText:t,contents:n}=e;return(0,r.jsx)(s.KfX,{iconComponent:(0,r.jsx)(s.M9A,{}),title:t,help:(0,r.jsx)(a.Fragment,{children:n.map((e=>(0,r.jsx)(s.xuv,{sx:{paddingBottom:"20px"},children:e})))})})}}}]);
|
|
//# sourceMappingURL=3138.82b73d53.chunk.js.map
|