Files
openmaxio-object-browser/portal-ui/build/static/js/3549.66269f80.chunk.js
Alex 7a14f0c012 Release v0.23.1 (#2648)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2023-02-08 18:20:55 -08:00

2 lines
14 KiB
JavaScript

"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[3549],{65935:function(e,n,t){t.r(n),t.d(n,{default:function(){return k}});var i=t(29439),s=t(1413),a=t(72791),r=t(57689),o=t(75952),c=t(11135),l=t(25787),d=t(23814),x=t(61889),u=t(64554),p=t(92217),h=t(74794),m=t(21435),y=t(37516),f=t(80184),j=function(e){var n=e.icon,t=e.description;return(0,f.jsxs)(u.Z,{sx:{display:"flex","& .min-icon":{marginRight:"10px",height:"23px",width:"23px",marginBottom:"10px"}},children:[n," ",(0,f.jsx)("div",{style:{fontSize:"14px",fontStyle:"italic",color:"#5E5E5E"},children:t})]})},g=function(){return(0,f.jsxs)(u.Z,{sx:{flex:1,border:"1px solid #eaeaea",borderRadius:"2px",display:"flex",flexFlow:"column",padding:"20px",marginTop:{xs:"0px"}},children:[(0,f.jsxs)(u.Z,{sx:{fontSize:"16px",fontWeight:600,display:"flex",alignItems:"center",marginBottom:"16px",paddingBottom:"20px","& .min-icon":{height:"21px",width:"21px",marginRight:"15px"}},children:[(0,f.jsx)(o.M9A,{}),(0,f.jsx)("div",{children:"Learn more about Access Keys"})]}),(0,f.jsxs)(u.Z,{sx:{fontSize:"14px",marginBottom:"15px"},children:[(0,f.jsxs)(u.Z,{sx:{paddingBottom:"20px"},children:[(0,f.jsx)(j,{icon:(0,f.jsx)(o.nO6,{}),description:"Create Access Keys"}),(0,f.jsx)(u.Z,{sx:{paddingTop:"20px"},children:"Access Keys inherit the policies explicitly attached to the parent user, and the policies attached to each group in which the parent user has membership."})]}),(0,f.jsxs)(u.Z,{sx:{paddingBottom:"20px"},children:[(0,f.jsx)(j,{icon:(0,f.jsx)(o.tvm,{}),description:"Assign Custom Credentials"}),(0,f.jsx)(u.Z,{sx:{paddingTop:"10px"},children:"Randomized access credentials are recommended, and provided by default. You may use your own custom Access Key and Secret Key by replacing the default values. After creation of any Access Key, you will be given the opportunity to view and download the account credentials."}),(0,f.jsx)(u.Z,{sx:{paddingTop:"10px"},children:"Access Keys support programmatic access by applications. You cannot use a Access Key to log into the MinIO Console."})]}),(0,f.jsxs)(u.Z,{sx:{paddingBottom:"20px"},children:[(0,f.jsx)(j,{icon:(0,f.jsx)(o.v42,{}),description:"Assign Access Policies"}),(0,f.jsx)(u.Z,{sx:{paddingTop:"10px"},children:"You can specify an optional JSON-formatted IAM policy to further restrict Access Key access to a subset of the actions and resources explicitly allowed for the parent user. Additional access beyond that of the parent user cannot be implemented through these policies."}),(0,f.jsx)(u.Z,{sx:{paddingTop:"10px"},children:"You cannot modify the optional Access Key IAM policy after saving."})]})]}),(0,f.jsx)(u.Z,{sx:{display:"flex",flexFlow:"column"}})]})},v=t(3579),Z=t(20165),b=t(56087),A=t(81207),K=t(37798),C=t(50896),w=t(84741),S=t(60680),P=t(87995),N=t(25469),k=(0,l.Z)((function(e){return(0,c.Z)((0,s.Z)((0,s.Z)({},d.DF),d.ID))}))((function(e){var n=e.classes,t=(0,N.TL)(),s=(0,r.s0)(),c=(0,a.useState)(!1),l=(0,i.Z)(c,2),d=l[0],j=l[1],k=(0,a.useState)((0,w.zO)(16)),I=(0,i.Z)(k,2),T=I[0],B=I[1],O=(0,a.useState)((0,w.zO)(32)),M=(0,i.Z)(O,2),z=M[0],F=M[1],E=(0,a.useState)(!1),R=(0,i.Z)(E,2),Y=R[0],D=R[1],J=(0,a.useState)(null),L=(0,i.Z)(J,2),_=L[0],H=L[1],W=(0,a.useState)(!1),U=(0,i.Z)(W,2),V=U[0],G=U[1],q=(0,a.useState)(""),Q=(0,i.Z)(q,2),X=Q[0],$=Q[1];(0,a.useEffect)((function(){d&&A.Z.invoke("POST","/api/v1/service-account-credentials",{policy:X,accessKey:T,secretKey:z}).then((function(e){j(!1),H({accessKey:e.accessKey||"",secretKey:e.secretKey||"",url:e.url||""})})).catch((function(e){j(!1),t((0,P.Ih)(e))}))}),[d,j,t,X,T,z]),(0,a.useEffect)((function(){Y&&A.Z.invoke("GET","/api/v1/user/policy").then((function(e){$(JSON.stringify(JSON.parse(e),null,4))}))}),[Y]);return(0,f.jsxs)(a.Fragment,{children:[null!==_&&(0,f.jsx)(K.default,{newServiceAccount:_,open:null!==_,closeModal:function(){H(null),s("".concat(b.gA.ACCOUNT))},entity:"Access Key"}),(0,f.jsxs)(x.ZP,{item:!0,xs:12,children:[(0,f.jsx)(o.mr1,{label:(0,f.jsx)(o.hbI,{label:"Access Keys",onClick:function(){return s(b.gA.ACCOUNT)}})}),(0,f.jsx)(h.Z,{children:(0,f.jsxs)(u.Z,{sx:{display:"grid",padding:"25px",gap:"25px",gridTemplateColumns:{md:"2fr 1.2fr",xs:"1fr"},border:"1px solid #eaeaea"},children:[(0,f.jsxs)(u.Z,{children:[(0,f.jsx)(C.Z,{icon:(0,f.jsx)(o.tVY,{}),children:"Create Access Key"}),(0,f.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){!function(e){e.preventDefault(),j(!0)}(e)},children:(0,f.jsxs)(x.ZP,{container:!0,item:!0,spacing:"20",sx:{marginTop:1},children:[(0,f.jsx)(x.ZP,{item:!0,xs:12,children:(0,f.jsx)(x.ZP,{container:!0,item:!0,spacing:"20",children:(0,f.jsx)(x.ZP,{item:!0,xs:12,children:(0,f.jsxs)(x.ZP,{container:!0,children:[(0,f.jsx)(x.ZP,{item:!0,xs:1,children:(0,f.jsx)(o.tvm,{})}),(0,f.jsx)(x.ZP,{item:!0,children:(0,f.jsxs)(x.ZP,{container:!0,item:!0,spacing:"20",children:[(0,f.jsxs)(x.ZP,{item:!0,xs:12,children:[" ",(0,f.jsx)("div",{className:n.stackedInputs,children:(0,f.jsx)(m.Z,{value:T,label:"Access Key",id:"accessKey",name:"accessKey",placeholder:"Enter Access Key",onChange:function(e){B(e.target.value)}})})]}),(0,f.jsx)(x.ZP,{item:!0,xs:12,children:(0,f.jsx)("div",{className:n.stackedInputs,children:(0,f.jsx)(m.Z,{value:z,label:"Secret Key",id:"secretKey",name:"secretKey",type:V?"text":"password",placeholder:"Enter Secret Key",onChange:function(e){F(e.target.value)},overlayIcon:V?(0,f.jsx)(Z.Z,{}):(0,f.jsx)(v.Z,{}),overlayAction:function(){return G(!V)}})})})]})})]})})})}),(0,f.jsxs)(x.ZP,{container:!0,item:!0,spacing:"20",children:[(0,f.jsx)(x.ZP,{item:!0,xs:12,children:(0,f.jsxs)(x.ZP,{container:!0,children:[(0,f.jsx)(x.ZP,{item:!0,xs:1,children:(0,f.jsx)(o.v42,{})}),(0,f.jsx)(x.ZP,{item:!0,xs:11,children:(0,f.jsx)(y.Z,{value:"serviceAccountPolicy",id:"serviceAccountPolicy",name:"serviceAccountPolicy",checked:Y,onChange:function(e){D(e.target.checked)},label:"Restrict beyond user policy",tooltip:"You can specify an optional JSON-formatted IAM policy to further restrict Access Key access to a subset of the actions and resources explicitly allowed for the parent user. Additional access beyond that of the parent user cannot be implemented through these policies."})})]})}),Y&&(0,f.jsxs)(x.ZP,{item:!0,xs:12,className:n.codeMirrorContainer,children:[(0,f.jsx)("div",{children:(0,f.jsx)(S.Z,{children:"Current User Policy - edit the JSON to remove permissions for this Access Key"})}),(0,f.jsx)(x.ZP,{item:!0,xs:12,className:n.formScrollable,children:(0,f.jsx)(p.Z,{value:X,onBeforeChange:function(e,n,t){$(t)},editorHeight:"350px"})})]})]}),(0,f.jsxs)(x.ZP,{item:!0,xs:12,className:n.modalButtonBar,children:[(0,f.jsx)(o.zxk,{id:"clear",type:"button",variant:"regular",onClick:function(){$(""),H(null),B(""),F(""),G(!1)},label:"Clear"}),(0,f.jsx)(o.zxk,{id:"create-sa",type:"submit",variant:"callAction",color:"primary",label:"Create"})]})]})})]}),(0,f.jsx)(g,{})]})})]})]})}))},37798:function(e,n,t){t.r(n),t.d(n,{default:function(){return Z}});var i=t(1413),s=t(72791),a=t(26181),r=t.n(a),o=t(75952),c=t(11135),l=t(25787),d=t(56028),x=t(61889),u=t(77196),p=t(63466),h=t(78029),m=t.n(h),y=t(23814),f=t(27454),j=t(80184),g=(0,l.Z)((function(e){return(0,c.Z)({container:{display:"flex",flexFlow:"column",padding:"20px 0 8px 0"},inputWithCopy:{"& .MuiInputBase-root ":{width:"100%",background:"#FBFAFA","& .MuiInputBase-input":{height:".8rem"},"& .MuiInputAdornment-positionEnd":{marginRight:".5rem","& .MuiButtonBase-root":{height:"2rem"}}},"& .MuiButtonBase-root .min-icon":{width:".8rem",height:".8rem"}},inputLabel:(0,i.Z)((0,i.Z)({},y.YI.inputLabel),{},{fontSize:".8rem"})})}))((function(e){var n=e.label,t=void 0===n?"":n,i=e.value,s=void 0===i?"":i,a=e.classes,r=void 0===a?{}:a;return(0,j.jsxs)("div",{className:r.container,children:[(0,j.jsxs)("div",{className:r.inputLabel,children:[t,":"]}),(0,j.jsx)("div",{className:r.inputWithCopy,children:(0,j.jsx)(u.Z,{value:s,readOnly:!0,endAdornment:(0,j.jsx)(p.Z,{position:"end",children:(0,j.jsx)(f.Z,{tooltip:"Copy",children:(0,j.jsx)(m(),{text:s,children:(0,j.jsx)(o.zxk,{id:"copy-clipboard","aria-label":"copy",onClick:function(){},onMouseDown:function(){},style:{width:"28px",height:"28px",padding:"0px"},icon:(0,j.jsx)(o.TIy,{})})})})})})})]})})),v=function(e,n){var t=document.createElement("a");t.setAttribute("href","data:text/plain;charset=utf-8,"+n),t.setAttribute("download",e),t.style.display="none",document.body.appendChild(t),t.click(),document.body.removeChild(t)},Z=(0,l.Z)((function(e){return(0,c.Z)({warningBlock:{color:"red",fontSize:".85rem",margin:".5rem 0 .5rem 0",display:"flex",alignItems:"center","& svg ":{marginRight:".3rem",height:16,width:16}},credentialTitle:{padding:".8rem 0 0 0",fontWeight:600,fontSize:".9rem"},buttonContainer:{display:"flex",justifyContent:"flex-end",marginTop:"1rem"},credentialsPanel:{overflowY:"auto",maxHeight:350},promptTitle:{display:"flex",alignItems:"center"},buttonSpacer:{marginRight:".9rem"}})}))((function(e){var n=e.classes,t=e.newServiceAccount,a=e.open,c=e.closeModal,l=e.entity;if(!t)return null;var u=r()(t,"console",null),p=r()(t,"idp",!1);return(0,j.jsx)(d.Z,{modalOpen:a,onClose:function(){c()},title:(0,j.jsx)("div",{className:n.promptTitle,children:(0,j.jsxs)("div",{children:["New ",l," Created"]})}),titleIcon:(0,j.jsx)(o.tVY,{}),children:(0,j.jsxs)(x.ZP,{container:!0,children:[(0,j.jsxs)(x.ZP,{item:!0,xs:12,className:n.formScrollable,children:["A new ",l," has been created with the following details:",!p&&u&&(0,j.jsx)(s.Fragment,{children:(0,j.jsxs)(x.ZP,{item:!0,xs:12,className:n.credentialsPanel,children:[(0,j.jsx)("div",{className:n.credentialTitle,children:"Console Credentials"}),Array.isArray(u)&&u.map((function(e,n){return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(g,{label:"Access Key",value:e.accessKey}),(0,j.jsx)(g,{label:"Secret Key",value:e.secretKey})]})})),!Array.isArray(u)&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(g,{label:"Access Key",value:u.accessKey}),(0,j.jsx)(g,{label:"Secret Key",value:u.secretKey})]})]})}),(null===u||void 0===u)&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(g,{label:"Access Key",value:t.accessKey||""}),(0,j.jsx)(g,{label:"Secret Key",value:t.secretKey||""})]}),p?(0,j.jsx)("div",{className:n.warningBlock,children:"Please Login via the configured external identity provider."}):(0,j.jsxs)("div",{className:n.warningBlock,children:[(0,j.jsx)(o.e6P,{}),(0,j.jsx)("span",{children:"Write these down, as this is the only time the secret will be displayed."})]})]}),(0,j.jsx)(x.ZP,{item:!0,xs:12,className:n.buttonContainer,children:!p&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(f.Z,{tooltip:"Download credentials in a JSON file formatted for import using mc alias import. This will only include the default login credentials.",children:(0,j.jsx)(o.zxk,{id:"download-button",label:"Download for import",className:n.buttonSpacer,onClick:function(){var e={};u?e=Array.isArray(u)?u.map((function(e){return{url:e.url,accessKey:e.accessKey,secretKey:e.secretKey,api:"s3v4",path:"auto"}}))[0]:{url:u.url,accessKey:u.accessKey,secretKey:u.secretKey,api:"s3v4",path:"auto"}:e={url:t.url,accessKey:t.accessKey,secretKey:t.secretKey,api:"s3v4",path:"auto"};v("credentials.json",JSON.stringify((0,i.Z)({},e)))},icon:(0,j.jsx)(o._8t,{}),variant:"callAction"})}),Array.isArray(u)&&u.length>1&&(0,j.jsx)(f.Z,{tooltip:"Download all access credentials to a JSON file. NOTE: This file is not formatted for import using mc alias import. If you plan to import this alias from the file, please use the Download for Import button. ",children:(0,j.jsx)(o.zxk,{id:"download-all-button",label:"Download all access credentials",className:n.buttonSpacer,onClick:function(){var e={};u&&Array.isArray(u)&&u.length>1&&(e=u.map((function(e){return{accessKey:e.accessKey,secretKey:e.secretKey}})));v("all_credentials.json",JSON.stringify((0,i.Z)({},e)))},icon:(0,j.jsx)(o._8t,{}),variant:"callAction",color:"primary"})})]})})]})})}))},92217:function(e,n,t){var i=t(1413),s=t(72791),a=t(61889),r=t(30829),o=t(20068),c=t(64554),l=t(11135),d=t(25787),x=t(75952),u=t(23814),p=t(78029),h=t.n(p),m=t(60655),y=t(27454),f=t(80184);n.Z=(0,d.Z)((function(e){return(0,l.Z)((0,i.Z)({},u.YI))}))((function(e){var n=e.value,t=e.label,i=void 0===t?"":t,l=e.tooltip,d=void 0===l?"":l,u=e.mode,p=void 0===u?"json":u,j=e.classes,g=e.onBeforeChange,v=(e.readOnly,e.editorHeight),Z=void 0===v?"250px":v;return(0,f.jsxs)(s.Fragment,{children:[(0,f.jsx)(a.ZP,{item:!0,xs:12,sx:{marginBottom:"10px"},children:(0,f.jsxs)(r.Z,{className:j.inputLabel,children:[(0,f.jsx)("span",{children:i}),""!==d&&(0,f.jsx)("div",{className:j.tooltipContainer,children:(0,f.jsx)(o.Z,{title:d,placement:"top-start",children:(0,f.jsx)("div",{className:j.tooltip,children:(0,f.jsx)(x.byK,{})})})})]})}),(0,f.jsx)(a.ZP,{item:!0,xs:12,style:{maxHeight:Z,overflow:"auto",border:"1px solid #eaeaea"},children:(0,f.jsx)(m.Z,{value:n,language:p,onChange:function(e){g(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:Z||"initial",color:"#000000"}})}),(0,f.jsx)(a.ZP,{item:!0,xs:12,sx:{background:"#f7f7f7",border:"1px solid #eaeaea",borderTop:0},children:(0,f.jsx)(c.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,f.jsx)(y.Z,{tooltip:"Copy to Clipboard",children:(0,f.jsx)(h(),{text:n,children:(0,f.jsx)(x.zxk,{type:"button",id:"copy-code-mirror",icon:(0,f.jsx)(x.TIy,{}),color:"primary",variant:"regular"})})})})})]})}))},60680:function(e,n,t){t(72791);var i=t(11135),s=t(25787),a=t(80184);n.Z=(0,s.Z)((function(e){return(0,i.Z)({root:{padding:0,margin:0,fontSize:".9rem"}})}))((function(e){var n=e.classes,t=e.children;return(0,a.jsx)("h1",{className:n.root,children:t})}))}}]);
//# sourceMappingURL=3549.66269f80.chunk.js.map