Files
openmaxio-object-browser/web-app/build/static/js/3527.0fc04358.chunk.js

2 lines
38 KiB
JavaScript
Raw Normal View History

"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[3527,8823],{18823:(e,s,t)=>{t.r(s),t.d(s,{default:()=>u});var n=t(65043),a=t(58661),r=t(89923),i=t(64159),o=t(21383),c=t(56629),l=t(53518),d=t(70579);const u=e=>{let{closeDeleteModalAndRefresh:s,deleteOpen:t,selectedServiceAccount:u}=e;const x=(0,o.jL)(),[h,p]=(0,n.useState)(!1);if(!u)return null;return(0,d.jsx)(a.A,{title:"Delete Access Key",confirmText:"Delete",isOpen:t,titleIcon:(0,d.jsx)(r.xWY,{}),isLoading:h,onConfirm:()=>{p(!0),c.F.serviceAccounts.deleteServiceAccount(u).then((e=>{s(!0)})).catch((async e=>{const t=await e.json();x((0,i.C9)((0,l.S)(t))),s(!1)})).finally((()=>p(!1)))},onClose:()=>s(!1),confirmationContent:(0,d.jsxs)(n.Fragment,{children:["Are you sure you want to delete Access Key"," ",(0,d.jsx)("b",{style:{maxWidth:"200px",whiteSpace:"normal",wordWrap:"break-word"},children:u}),"?"]})})}},78619:(e,s,t)=>{t.d(s,{A:()=>A});var n=t(65043),a=t(33097),r=t.n(a),i=t(94574),o=t(89923),c=t(94141),l=t(61476),d=t.n(l),u=t(64159),x=t(21383),h=t(70579);const p=e=>{let{label:s="",value:t=""}=e;const n=(0,x.jL)();return(0,h.jsxs)(o.azJ,{sx:{marginTop:12},children:[(0,h.jsx)(o.l1Y,{children:s}),(0,h.jsx)(o.EmB,{actionButton:(0,h.jsx)(d(),{text:t,children:(0,h.jsx)(o.$nd,{id:"copy-path",variant:"regular",onClick:()=>{n((0,u.h0)(`${s} copied to clipboard`))},style:{marginRight:"5px",width:"28px",height:"28px",padding:"0px"},icon:(0,h.jsx)(o.TdU,{})})}),children:t})]})};var m=t(6681),j=t(77403);const y=i.Ay.div((e=>{let{theme:s}=e;return{color:r()(s,"signalColors.danger","#C51B3F"),fontSize:".85rem",margin:".5rem 0 .5rem 0",display:"flex",alignItems:"center","& svg ":{marginRight:".3rem",height:16,width:16}}})),g=(e,s)=>{let t=document.createElement("a");t.setAttribute("href","data:text/plain;charset=utf-8,"+s),t.setAttribute("download",e),t.style.display="none",document.body.appendChild(t),t.click(),document.body.removeChild(t)},A=e=>{let{newServiceAccount:s,open:t,closeModal:a,entity:i}=e;if(!s)return null;const l=r()(s,"console",null),d=r()(s,"idp",!1);return(0,h.jsx)(c.A,{modalOpen:t,onClose:()=>{a()},title:`New ${i} Created`,titleIcon:(0,h.jsx)(o.kQt,{}),children:(0,h.jsxs)(o.xA9,{container:!0,children:[(0,h.jsxs)(o.xA9,{item:!0,xs:12,children:["A new ",i," has been created with the following details:",!d&&l&&(0,h.jsx)(n.Fragment,{children:(0,h.jsxs)(o.xA9,{item:!0,xs:12,sx:{overflowY:"auto",maxHeight:350},children:[(0,h.jsx)(o.azJ,{sx:{padding:".8rem 0 0 0",fontWeight:600,fontSize:".9rem"},children:"Console Credentials"}),Array.isArray(l)&&l.map(((e,s)=>(0,h.jsxs)(n.Fragment,{children:[(0,h.jsx)(p,{label:"Access Key",value:e.accessKey}),(0,h.jsx)(p,{label:"Secret Key",value:e.secretKey})]}))),!Array.isArray(l)&&(0,h.jsxs)(n.Fragment,{children:[(0,h.jsx)(p,{label:"Access Key",value:l.accessKey}),(0,h.jsx)(p,{label:"Secret Key",value:l.secretKey})]})]})}),(null===l||void 0===l)&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(p,{label:"Access Key",value:s.accessKey||""}),(0,h.jsx)(p,{label:"Secret Key",value:s.secretKey||""})]}),d?(0,h.jsx)(y,{children:"Please Login via the configured external identity provider."}):(0,h.jsxs)(y,{children:[(0,h.jsx)(o.cJw,{}),(0,h.jsx)("span",{children:"Write these down, as this is the only time the secret will be displayed."})]})]}),(0,h.jsx)(o.xA9,{item:!0,xs:12,sx:{...j.Uz.modalButtonBar},children:!d&&(0,h.jsxs)(n.Fragment,{children:[(0,h.jsx)(m.A,{tooltip:"Download credentials in a JSON file formatted for import using mc alias import. This will only include the default login credentials.",children:(0,h.jsx)(o.$nd,{id:"download-button",label:"Download for import",onClick:()=>{let e={};if(l)if(Array.isArray(l)){e=l.map((e=>({url:e.url,accessKey:e.accessKey,secretKey:e.secretKey,api:"s3v4",path:"auto"})))[0]}else e={url:l.url,accessKey:l.accessKey,secretKey:l.secretKey,api:"s3v4",path:"auto"};else e={url:s.url,accessKey:s.accessKey,secretKey:s.secretKey,api:"s3v4",path:"auto"};g("credentials.json",JSON.stringify({...e}))},icon:(0,h.jsx)(o.s3U,{}),variant:"callAction"})}),Array.isArray(l)&&l.length>1&&(0,h.jsx)
//# sourceMappingURL=3527.0fc04358.chunk.js.map