Files
openmaxio-object-browser/portal-ui/build/static/js/3171.faff106e.chunk.js
Alex 3875fb3eaa Release v0.31.0 (#2912)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2023-06-29 12:21:34 -07:00

2 lines
10 KiB
JavaScript

"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[3171],{21435:function(e,n,s){var t=s(29439),i=s(1413),o=s(72791),a=s(27391),r=s(61889),l=s(30829),c=s(20068),d=s(13400),u=s(20165),p=s(3579),x=s(11135),m=s(72455),h=s(25787),f=s(23814),g=s(29945),v=s(28182),Z=s(80184),j=(0,m.Z)((function(e){return(0,x.Z)((0,i.Z)({},f.gM))}));function b(e){var n=j();return(0,Z.jsx)(a.Z,(0,i.Z)({InputProps:{classes:n}},e))}n.Z=(0,h.Z)((function(e){return(0,x.Z)((0,i.Z)((0,i.Z)((0,i.Z)({},f.YI),f.Hr),{},{textBoxContainer:{flexGrow:1,position:"relative"},overlayAction:{position:"absolute",right:5,top:6,"& svg":{maxWidth:15,maxHeight:15},"&.withLabel":{top:5}}}))}))((function(e){var n=e.label,s=e.onChange,a=e.value,x=e.id,m=e.name,h=e.type,f=void 0===h?"text":h,j=e.autoComplete,y=void 0===j?"off":j,S=e.disabled,C=void 0!==S&&S,P=e.multiline,w=void 0!==P&&P,N=e.tooltip,A=void 0===N?"":N,F=e.index,B=void 0===F?0:F,T=e.error,k=void 0===T?"":T,z=e.required,E=void 0!==z&&z,M=e.placeholder,R=void 0===M?"":M,I=e.min,K=e.max,L=e.overlayId,G=e.overlayIcon,U=void 0===G?null:G,O=e.overlayObject,W=void 0===O?null:O,D=e.extraInputProps,V=void 0===D?{}:D,Y=e.overlayAction,H=e.noLabelMinWidth,_=void 0!==H&&H,Q=e.pattern,X=void 0===Q?"":Q,q=e.autoFocus,J=void 0!==q&&q,$=e.classes,ee=e.className,ne=void 0===ee?"":ee,se=e.onKeyPress,te=e.onFocus,ie=e.onPaste,oe=(0,i.Z)({"data-index":B},V),ae=(0,o.useState)(!1),re=(0,t.Z)(ae,2),le=re[0],ce=re[1];"number"===f&&I&&(oe.min=I),"number"===f&&K&&(oe.max=K),""!==X&&(oe.pattern=X);var de=U,ue=f;return"password"===f&&null===U&&(de=le?(0,Z.jsx)(u.Z,{}):(0,Z.jsx)(p.Z,{}),ue=le?"text":"password"),(0,Z.jsx)(o.Fragment,{children:(0,Z.jsxs)(r.ZP,{container:!0,className:(0,v.Z)(""!==ne?ne:"",""!==k?$.errorInField:$.inputBoxContainer),children:[""!==n&&(0,Z.jsxs)(l.Z,{htmlFor:x,className:_?$.noMinWidthLabel:$.inputLabel,children:[(0,Z.jsxs)("span",{children:[n,E?"*":""]}),""!==A&&(0,Z.jsx)("div",{className:$.tooltipContainer,children:(0,Z.jsx)(c.Z,{title:A,placement:"top-start",children:(0,Z.jsx)("div",{className:$.tooltip,children:(0,Z.jsx)(g.byK,{})})})})]}),(0,Z.jsxs)("div",{className:$.textBoxContainer,children:[(0,Z.jsx)(b,{id:x,name:m,fullWidth:!0,value:a,autoFocus:J,disabled:C,onChange:s,type:ue,multiline:w,autoComplete:y,inputProps:oe,error:""!==k,helperText:k,placeholder:R,className:$.inputRebase,onKeyPress:se,onFocus:te,onPaste:ie}),de&&(0,Z.jsx)("div",{className:"".concat($.overlayAction," ").concat(""!==n?"withLabel":""),children:(0,Z.jsx)(d.Z,{onClick:Y?function(){Y()}:function(){return ce(!le)},id:L,size:"small",disableFocusRipple:!1,disableRipple:!1,disableTouchRipple:!1,children:de})}),W&&(0,Z.jsx)("div",{className:"".concat($.overlayAction," ").concat(""!==n?"withLabel":""),children:W})]})]})})}))},43171:function(e,n,s){s.r(n),s.d(n,{default:function(){return P}});var t=s(29439),i=s(1413),o=s(72791),a=s(57689),r=s(11135),l=s(25787),c=s(23814),d=s(61889),u=s(40986),p=s(29945),x=s(21435),m=s(64554),h=s(80184),f=function(e){var n=e.icon,s=e.description;return(0,h.jsxs)(m.Z,{sx:{display:"flex","& .min-icon":{marginRight:"10px",height:"23px",width:"23px",marginBottom:"10px"}},children:[n," ",(0,h.jsx)("div",{style:{fontSize:"14px",fontStyle:"italic",color:"#5E5E5E"},children:s})]})},g=function(){return(0,h.jsxs)(m.Z,{sx:{flex:1,border:"1px solid #eaeaea",borderRadius:"2px",display:"flex",flexFlow:"column",padding:"20px",marginTop:{xs:"0px"}},children:[(0,h.jsxs)(m.Z,{sx:{fontSize:"16px",fontWeight:600,display:"flex",alignItems:"center",marginBottom:"16px","& .min-icon":{height:"21px",width:"21px",marginRight:"15px"}},children:[(0,h.jsx)(p.M9A,{}),(0,h.jsx)("div",{children:"Learn more about Groups"})]}),(0,h.jsxs)(m.Z,{sx:{fontSize:"14px",marginBottom:"15px"},children:["Adding groups lets you assign IAM policies to multiple users at once.",(0,h.jsx)(m.Z,{sx:{paddingTop:"20px",paddingBottom:"10px"},children:"Users inherit access permissions to data and resources through the groups they belong to."}),(0,h.jsx)(m.Z,{sx:{paddingTop:"10px",paddingBottom:"10px"},children:"A user can be a member of multiple groups."}),(0,h.jsx)(m.Z,{sx:{paddingTop:"10px",paddingBottom:"10px"},children:"Groups provide a simplified method for managing shared permissions among users with common access patterns and workloads. Client\u2019s cannot authenticate to a MinIO deployment using a group as an identity."})]}),(0,h.jsxs)(m.Z,{sx:{display:"flex",flexFlow:"column"},children:[(0,h.jsx)(f,{icon:(0,h.jsx)(p.wws,{}),description:"Add Users to Group"}),(0,h.jsx)(m.Z,{sx:{paddingTop:"10px",paddingBottom:"10px"},children:"Select from the list of displayed users to assign users to the new group at creation. These users inherit the policies assigned to the group."}),(0,h.jsx)(f,{icon:(0,h.jsx)(p.v42,{}),description:"Assign Custom IAM Policies for Group"}),(0,h.jsx)(m.Z,{sx:{paddingTop:"10px",paddingBottom:"10px"},children:"You can add policies to the group by selecting it from the Groups view after creation. The Policy view lets you manage the assigned policies for the group."})]})]})},v=s(40228),Z=s(56087),j=s(81207),b=s(87995),y=s(81551),S=s(47974),C=s(99670),P=(0,l.Z)((function(e){return(0,r.Z)((0,i.Z)((0,i.Z)({},c.DF),c.ID))}))((function(e){var n=e.classes,s=(0,y.TL)(),i=(0,a.s0)(),r=(0,o.useState)(""),l=(0,t.Z)(r,2),c=l[0],m=l[1],f=(0,o.useState)(!1),P=(0,t.Z)(f,2),w=P[0],N=P[1],A=(0,o.useState)([]),F=(0,t.Z)(A,2),B=F[0],T=F[1],k=(0,o.useState)(!1),z=(0,t.Z)(k,2),E=z[0],M=z[1];(0,o.useEffect)((function(){M(""!==c.trim())}),[c,B]),(0,o.useEffect)((function(){if(w){j.Z.invoke("POST","/api/v1/groups",{group:c,members:B}).then((function(e){N(!1),i("".concat(Z.gA.GROUPS))})).catch((function(e){N(!1),s((0,b.Ih)(e))}))}}),[w,c,B,s,i]);return(0,o.useEffect)((function(){s((0,b.Sc)("add_group"))}),[]),(0,h.jsx)(o.Fragment,{children:(0,h.jsxs)(d.ZP,{item:!0,xs:12,children:[(0,h.jsx)(S.Z,{label:(0,h.jsx)(p.hbI,{label:"Groups",onClick:function(){return i(Z.gA.GROUPS)}}),actions:(0,h.jsx)(C.Z,{})}),(0,h.jsx)(p.Xgh,{children:(0,h.jsx)(p.ltY,{title:"Create Group",icon:(0,h.jsx)(p.yeO,{}),helpBox:(0,h.jsx)(g,{}),children:(0,h.jsxs)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),N(!0)},children:[(0,h.jsxs)(d.ZP,{container:!0,children:[(0,h.jsx)(d.ZP,{item:!0,xs:12,className:n.formFieldRow,children:(0,h.jsx)(x.Z,{id:"group-name",name:"group-name",label:"Group Name",autoFocus:!0,value:c,onChange:function(e){m(e.target.value)}})}),(0,h.jsx)(d.ZP,{item:!0,xs:12,className:n.userSelector,children:(0,h.jsx)(v.Z,{selectedUsers:B,setSelectedUsers:T,editMode:!0})})]}),(0,h.jsxs)(d.ZP,{item:!0,xs:12,className:n.modalButtonBar,children:[(0,h.jsx)(p.zxk,{id:"clear-group",type:"button",variant:"regular",style:n.spacerRight,onClick:function(){m(""),T([])},label:"Clear"}),(0,h.jsx)(p.zxk,{id:"save-group",type:"submit",variant:"callAction",disabled:w||!E,label:"Save"})]}),w&&(0,h.jsx)(d.ZP,{item:!0,xs:12,children:(0,h.jsx)(u.Z,{})})]})})})]})})}))},40228:function(e,n,s){var t=s(93433),i=s(29439),o=s(1413),a=s(72791),r=s(11135),l=s(25787),c=s(40986),d=s(26181),u=s.n(d),p=s(35527),x=s(61889),m=s(21639),h=s(23814),f=s(81207),g=s(92983),v=s(59114),Z=s(87995),j=s(81551),b=s(80184);n.Z=(0,l.Z)((function(e){return(0,r.Z)((0,o.Z)((0,o.Z)({paper:{display:"flex",overflow:"auto",flexDirection:"column",boxShadow:"none",border:0},tableBlock:(0,o.Z)({},h.VX.tableBlock),searchBox:{flex:1}},h.OR),{},{actionsTitle:{fontSize:14,alignSelf:"center",minWidth:160,marginRight:10},noFound:{textAlign:"center",padding:e.spacing(3),border:"1px solid #EAEAEA",fontSize:".9rem"}},h.jY))}))((function(e){var n=e.classes,s=e.selectedUsers,o=e.setSelectedUsers,r=e.editMode,l=void 0!==r&&r,d=(0,j.TL)(),h=(0,a.useState)([]),y=(0,i.Z)(h,2),S=y[0],C=y[1],P=(0,a.useState)(!1),w=(0,i.Z)(P,2),N=w[0],A=w[1],F=(0,a.useState)(""),B=(0,i.Z)(F,2),T=B[0],k=B[1],z=(0,a.useCallback)((function(){f.Z.invoke("GET","/api/v1/users").then((function(e){var n=u()(e,"users",[]);n||(n=[]),C(n.sort(m.LQ)),A(!1)})).catch((function(e){d((0,Z.zb)(e)),A(!1)}))}),[d]);(0,a.useEffect)((function(){A(!0)}),[]),(0,a.useEffect)((function(){N&&z()}),[N,z]);var E=s||[],M=S.filter((function(e){return e.accessKey.includes(T)}));return(0,b.jsx)(a.Fragment,{children:(0,b.jsx)(x.ZP,{item:!0,xs:12,children:(0,b.jsxs)(p.Z,{className:n.paper,children:[N&&(0,b.jsx)(c.Z,{}),null!==S&&S.length>0?(0,b.jsxs)(a.Fragment,{children:[(0,b.jsxs)(x.ZP,{item:!0,xs:12,className:n.actionsTray,children:[(0,b.jsx)("label",{className:n.actionsTitle,children:l?"Edit Members":"Assign Users"}),(0,b.jsx)("div",{className:n.searchBox,children:(0,b.jsx)(v.Z,{placeholder:"Filter Users",onChange:k,value:T})})]}),(0,b.jsx)(x.ZP,{item:!0,xs:12,className:n.tableBlock,children:(0,b.jsx)(g.Z,{columns:[{label:"Access Key",elementKey:"accessKey"}],onSelect:function(e){var n=e.target,s=n.value,i=n.checked,a=(0,t.Z)(E);return i?a.push(s):a=a.filter((function(e){return e!==s})),o(a),a},selectedItems:E,isLoading:N,records:M,entityName:"Users",idField:"accessKey",customPaperHeight:n.multiSelectTable})})]}):(0,b.jsx)("div",{className:n.noFound,children:"No Users to display"})]})})})}))},21639:function(e,n,s){s.d(n,{KE:function(){return a},LQ:function(){return t},V2:function(){return o},g4:function(){return i}});var t=function(e,n){return e.accessKey>n.accessKey?1:e.accessKey<n.accessKey?-1:0},i=function(e,n){return e.name>n.name?1:e.name<n.name?-1:0},o=function(e,n){return e>n?1:e<n?-1:0},a=function(e,n){return e.policy>n.policy?1:e.policy<n.policy?-1:0}},3579:function(e,n,s){var t=s(64836);n.Z=void 0;var i=t(s(45649)),o=s(80184),a=(0,i.default)((0,o.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}),"RemoveRedEye");n.Z=a},20165:function(e,n,s){var t=s(64836);n.Z=void 0;var i=t(s(45649)),o=s(80184),a=(0,i.default)((0,o.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"}),"VisibilityOff");n.Z=a}}]);
//# sourceMappingURL=3171.faff106e.chunk.js.map