Files
object-browser/portal-ui/build/static/js/343.a3ee0915.chunk.js
Alex 9f433bc359 Release v0.21.3 (#2455)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-11-15 07:52:33 -08:00

2 lines
7.0 KiB
JavaScript

"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[343],{24065:function(e,s,t){t.r(s),t.d(s,{default:function(){return B}});var n=t(29439),a=t(1413),o=t(72791),r=t(75952),c=t(60364),i=t(16871),l=t(11135),d=t(61889),u=t(81207),h=t(64554),x=t(56096),f=t(92983),m=t(21639),p=t(32291),Z=t(23814),j=t(25787),g=t(56028),w=t(21435),v=t(40986),y=t(3579),b=t(20165),S=t(87995),C=t(25469),A=t(80184),P=(0,j.Z)((function(e){return(0,l.Z)((0,a.Z)((0,a.Z)((0,a.Z)((0,a.Z)({},Z.ID),Z.DF),Z.bK),(0,Z.Bz)(e.spacing(4))))}))((function(e){var s=e.classes,t=e.open,a=e.closeModal,c=(0,C.TL)(),i=(0,o.useState)(""),l=(0,n.Z)(i,2),h=l[0],f=l[1],m=(0,o.useState)(""),p=(0,n.Z)(m,2),Z=p[0],j=p[1],P=(0,o.useState)(""),k=(0,n.Z)(P,2),I=k[0],N=k[1],F=(0,o.useState)(!1),E=(0,n.Z)(F,2),T=E[0],_=E[1],z=(0,o.useState)(!1),D=(0,n.Z)(z,2),M=D[0],R=D[1],K=localStorage.getItem("userLoggedIn")||"";return t?(0,A.jsxs)(g.Z,{title:"Change Password for ".concat(K),modalOpen:t,onClose:function(){j(""),N(""),f(""),a()},titleIcon:(0,A.jsx)(x.IaT,{}),children:[(0,A.jsx)("div",{children:"This will change your Console password. Please note your new password down, as it will be required to log into Console after this session."}),(0,A.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){!function(e){if(e.preventDefault(),Z===I){if(Z.length<8)c((0,S.zb)({errorMessage:"Passwords must be at least 8 characters long",detailedError:""}));else if(!T){_(!0);var s={current_secret_key:h,new_secret_key:Z};u.Z.invoke("POST","/api/v1/account/change-password",s).then((function(){_(!1),j(""),N(""),f(""),a()})).catch((function(e){_(!1),j(""),N(""),f(""),c((0,S.zb)(e))}))}}else c((0,S.zb)({errorMessage:"New passwords don't match",detailedError:""}))}(e)},children:(0,A.jsxs)(d.ZP,{container:!0,children:[(0,A.jsxs)(d.ZP,{item:!0,xs:12,className:s.modalFormScrollable,children:[(0,A.jsx)(d.ZP,{item:!0,xs:12,className:s.formFieldRow,children:(0,A.jsx)(w.Z,{id:"current-password",name:"current-password",onChange:function(e){f(e.target.value)},label:"Current Password",type:M?"text":"password",value:h,overlayAction:function(){return R(!M)},overlayIcon:M?(0,A.jsx)(b.Z,{}):(0,A.jsx)(y.Z,{})})}),(0,A.jsx)(d.ZP,{item:!0,xs:12,className:s.formFieldRow,children:(0,A.jsx)(w.Z,{id:"new-password",name:"new-password",onChange:function(e){j(e.target.value)},label:"New Password",type:M?"text":"password",value:Z,overlayAction:function(){return R(!M)},overlayIcon:M?(0,A.jsx)(b.Z,{}):(0,A.jsx)(y.Z,{})})}),(0,A.jsx)(d.ZP,{item:!0,xs:12,className:s.formFieldRow,children:(0,A.jsx)(w.Z,{id:"re-new-password",name:"re-new-password",onChange:function(e){N(e.target.value)},label:"Type New Password Again",type:M?"text":"password",value:I,overlayAction:function(){return R(!M)},overlayIcon:M?(0,A.jsx)(b.Z,{}):(0,A.jsx)(y.Z,{})})})]}),(0,A.jsx)(d.ZP,{item:!0,xs:12,className:s.modalButtonBar,children:(0,A.jsx)(r.zx,{id:"save-password-modal",type:"submit",variant:"callAction",color:"primary",disabled:T||!(h.length>0&&Z.length>0&&I.length>0),label:"Save"})}),T&&(0,A.jsx)(d.ZP,{item:!0,xs:12,children:(0,A.jsx)(v.Z,{})})]})})]}):null})),k=t(23804),I=t(74794),N=t(59114),F=t(75578),E=t(56087),T=t(38442),_=t(58493),z=t(18303),D=t(14048),M=t(72455),R=t(46078),K=t(27454),O=(0,F.Z)(o.lazy((function(){return t.e(3956).then(t.bind(t,23956))}))),L=(0,M.Z)((function(e){return(0,l.Z)((0,a.Z)((0,a.Z)((0,a.Z)((0,a.Z)({},Z.OR),Z.qg),{},{searchField:(0,a.Z)((0,a.Z)({},Z.qg.searchField),{},{marginRight:"auto",maxWidth:380})},Z.VX),(0,Z.Bz)(e.spacing(4))))})),B=function(){var e=(0,C.TL)(),s=(0,i.s0)(),t=L(),a=(0,c.v9)(R.$4),l=(0,o.useState)([]),Z=(0,n.Z)(l,2),j=Z[0],g=Z[1],w=(0,o.useState)(!1),v=(0,n.Z)(w,2),y=v[0],b=v[1],F=(0,o.useState)(""),M=(0,n.Z)(F,2),B=M[0],q=M[1],V=(0,o.useState)(!1),U=(0,n.Z)(V,2),Y=U[0],G=U[1],J=(0,o.useState)(null),W=(0,n.Z)(J,2),X=W[0],$=W[1],H=(0,o.useState)(!1),Q=(0,n.Z)(H,2),ee=Q[0],se=Q[1],te=(0,o.useState)([]),ne=(0,n.Z)(te,2),ae=ne[0],oe=ne[1],re=(0,o.useState)(!1),ce=(0,n.Z)(re,2),ie=ce[0],le=ce[1],de=(0,o.useState)(!1),ue=(0,n.Z)(de,2),he=ue[0],xe=ue[1],fe=a&&a.includes("external-idp")||!1;(0,o.useEffect)((function(){me()}),[]),(0,o.useEffect)((function(){y&&u.Z.invoke("GET","/api/v1/service-accounts").then((function(e){var s=e.sort(m.V2);b(!1),g(s)})).catch((function(s){e((0,S.Ih)(s)),b(!1)}))}),[y,b,g,e]);var me=function(){b(!0)},pe=[{type:"view",onClick:function(e){$(e),xe(!0)}},{type:"delete",onClick:function(e){$(e),G(!0)}}],Ze=j.filter((function(e){return e.toLowerCase().includes(B.toLowerCase())}));return(0,A.jsxs)(o.Fragment,{children:[Y&&(0,A.jsx)(O,{deleteOpen:Y,selectedServiceAccount:X,closeDeleteModalAndRefresh:function(e){!function(e){G(!1),e&&me()}(e)}}),ie&&(0,A.jsx)(z.Z,{deleteOpen:ie,selectedSAs:ae,closeDeleteModalAndRefresh:function(s){le(!1),s&&(e((0,S.y1)("Access keys deleted successfully.")),oe([]),b(!0))}}),he&&(0,A.jsx)(D.Z,{open:he,selectedAccessKey:X,closeModalAndRefresh:function(){xe(!1),b(!0)}}),(0,A.jsx)(P,{open:ee,closeModal:function(){return se(!1)}}),(0,A.jsx)(p.Z,{label:"Access Keys"}),(0,A.jsxs)(I.Z,{children:[(0,A.jsxs)(d.ZP,{item:!0,xs:12,className:t.actionsTray,children:[(0,A.jsx)(N.Z,{placeholder:"Search Access Keys",onChange:q,overrideClass:t.searchField,value:B}),(0,A.jsxs)(h.Z,{sx:{display:"flex"},children:[" ",(0,A.jsx)(K.Z,{tooltip:"Delete Selected",children:(0,A.jsx)(r.zx,{id:"delete-selected-accounts",onClick:function(){le(!0)},label:"Delete Selected",icon:(0,A.jsx)(x.pJl,{}),disabled:0===ae.length,variant:"secondary"})}),(0,A.jsx)(T.s,{scopes:[E.Ft.ADMIN_CREATE_USER],resource:E.C3,matchAll:!0,errorProps:{disabled:!0},children:(0,A.jsx)(r.zx,{id:"change-password",onClick:function(){return se(!0)},label:"Change Password",icon:(0,A.jsx)(x.tvm,{}),variant:"regular",disabled:fe})}),(0,A.jsx)(r.zx,{id:"create-service-account",onClick:function(){s("".concat(E.gA.ACCOUNT_ADD))},label:"Create access key",icon:(0,A.jsx)(x.dtP,{}),variant:"callAction"})]})]}),(0,A.jsx)(d.ZP,{item:!0,xs:12,className:t.tableBlock,children:(0,A.jsx)(f.Z,{isLoading:y,records:Ze,entityName:"Access Keys",idField:"",columns:[{label:"Access Key",elementKey:""}],itemActions:pe,selectedItems:ae,onSelect:function(e){return(0,_._0)(e,oe,ae)},onSelectAll:function(){ae.length!==j.length?oe(j):oe([])}})}),(0,A.jsx)(d.ZP,{item:!0,xs:12,marginTop:"15px",children:(0,A.jsx)(k.Z,{title:"Learn more about ACCESS KEYS",iconComponent:(0,A.jsx)(x.frP,{}),help:(0,A.jsxs)(o.Fragment,{children:["MinIO access keys are child identities of an authenticated MinIO user, including externally managed identities. Each access key inherits its privileges based on the policies attached to it\u2019s parent user or those groups in which the parent user has membership. Access Keys also support an optional inline policy which further restricts access to a subset of actions and resources available to the parent user.",(0,A.jsx)("br",{}),(0,A.jsx)("br",{}),"You can learn more at our"," ",(0,A.jsx)("a",{href:"https://min.io/docs/minio/linux/administration/identity-access-management/minio-user-management.html?ref=con#service-accounts",target:"_blank",rel:"noreferrer",children:"documentation"}),"."]})})})]})]})}}}]);
//# sourceMappingURL=343.a3ee0915.chunk.js.map