github.com/minio/console@v1.4.1/web-app/build/static/js/8789.5dfcad74.chunk.js (about)

     1  "use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[8789],{72237:(e,s,t)=>{t.d(s,{A:()=>l});var n=t(65043),r=t(70579);const l=function(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(t){return(0,r.jsx)(n.Suspense,{fallback:s,children:(0,r.jsx)(e,{...t})})}}},78789:(e,s,t)=>{t.r(s),t.d(s,{default:()=>S});var n=t(65043),r=t(73216),l=t(89923),o=t(56629),i=t(8185),c=t(77403),a=t(99161),d=t(77938),p=t(53518),u=t(72237),h=t(56483),x=t(64159),j=t(20554),m=t(6681),g=t(48793),b=t(55968),f=t(64681),A=t(70579);const y=(0,u.A)(n.lazy((()=>t.e(5851).then(t.bind(t,85851))))),G=(0,u.A)(n.lazy((()=>t.e(4705).then(t.bind(t,74705))))),S=()=>{const e=(0,j.jL)(),s=(0,r.Zp)(),[t,u]=(0,n.useState)(!1),[S,M]=(0,n.useState)(!1),[k,C]=(0,n.useState)([]),[v,P]=(0,n.useState)(""),[O,w]=(0,n.useState)(!1),[R,_]=(0,n.useState)([]);(0,n.useEffect)((()=>{M(!0)}),[]),(0,n.useEffect)((()=>{M(!0)}),[]),(0,n.useEffect)((()=>{e((0,x.ph)("groups"))}),[]);const F=(0,d._)(a.Ms,a.lj),z=(0,d._)(a.Ms,a.lP),D=(0,d._)(a.Ms,a.Oh),K=(0,d._)(a.Ms,a.bO,!0);(0,n.useEffect)((()=>{if(S)if(F){(()=>{o.F.groups.listGroups().then((e=>{let s=[];e.data.groups&&(s=e.data.groups.sort(i.SO)),C(s),M(!1)})).catch((s=>{e((0,x.C9)((0,p.S)(s.error))),M(!1)}))})()}else M(!1)}),[S,e,F]);const E=k.filter((e=>e.includes(v))),I=e=>{s("".concat(a.zZ.GROUPS,"/").concat((0,h.nf)(e)))},T=[{type:"view",onClick:I,disableButtonFunction:()=>!D},{type:"edit",onClick:I,disableButtonFunction:()=>!D}];return(0,A.jsxs)(n.Fragment,{children:[t&&(0,A.jsx)(y,{deleteOpen:t,selectedGroups:R,closeDeleteModalAndRefresh:e=>{u(!1),_([]),e&&M(!0)}}),O&&(0,A.jsx)(G,{open:O,selectedGroups:R,selectedUser:null,closeModalAndRefresh:()=>{w(!1)}}),(0,A.jsx)(g.A,{label:"Groups",actions:(0,A.jsx)(b.A,{})}),(0,A.jsx)(l.Mxu,{children:(0,A.jsxs)(l.xA9,{container:!0,children:[(0,A.jsxs)(l.xA9,{item:!0,xs:12,sx:c._0.actionsTray,children:[(0,A.jsx)(d.R,{resource:a.Ms,scopes:a.lj,errorProps:{disabled:!0},children:(0,A.jsx)(f.A,{placeholder:"Search Groups",onChange:P,value:v,sx:{maxWidth:380}})}),(0,A.jsxs)(l.azJ,{sx:{display:"flex"},children:[(0,A.jsx)(d.R,{resource:a.Ms,scopes:a.bO,matchAll:!0,errorProps:{disabled:!0},children:(0,A.jsx)(m.A,{tooltip:R.length<1?"Please select Groups on which you want to apply Policies":K?"Select Policy":(0,a.vj)(a.bO,"apply policies to Groups"),children:(0,A.jsx)(l.$nd,{id:"assign-policy",onClick:()=>{w(!0)},label:"Assign Policy",icon:(0,A.jsx)(l.n$X,{}),disabled:R.length<1||!K,variant:"regular"})})}),(0,A.jsx)(d.R,{resource:a.Ms,scopes:a.lP,matchAll:!0,errorProps:{disabled:!0},children:(0,A.jsx)(m.A,{tooltip:0===R.length?"Select Groups to delete":D?"Delete Selected":(0,a.vj)(a.Oh,"delete Groups"),children:(0,A.jsx)(l.$nd,{id:"delete-selected-groups",onClick:()=>{u(!0)},label:"Delete Selected",icon:(0,A.jsx)(l.d7y,{}),variant:"secondary",disabled:0===R.length||!D})})}),(0,A.jsx)(d.R,{resource:a.Ms,scopes:a.k1,matchAll:!0,errorProps:{disabled:!0},children:(0,A.jsx)(m.A,{tooltip:"Create Group",children:(0,A.jsx)(l.$nd,{id:"create-group",label:"Create Group",variant:"callAction",icon:(0,A.jsx)(l.REV,{}),onClick:()=>{s("".concat(a.zZ.GROUPS_ADD))}})})})]})]}),S&&(0,A.jsx)(l.z21,{}),!S&&(0,A.jsxs)(n.Fragment,{children:[k.length>0&&(0,A.jsxs)(n.Fragment,{children:[(0,A.jsx)(l.xA9,{item:!0,xs:12,sx:{marginBottom:15},children:(0,A.jsx)(d.R,{resource:a.Ms,scopes:a.lj,errorProps:{disabled:!0},children:(0,A.jsx)(l.bQt,{itemActions:T,columns:[{label:"Name"}],isLoading:S,selectedItems:R,onSelect:z||D?e=>{const{target:{value:s="",checked:t=!1}={}}=e;let n=[...R];return t?n.push(s):n=n.filter((e=>e!==s)),_(n),n}:void 0,records:E,entityName:"Groups",idField:""})})}),(0,A.jsx)(l.xA9,{item:!0,xs:12,children:(0,A.jsx)(l.lVp,{title:"Groups",iconComponent:(0,A.jsx)(l.YXz,{}),help:(0,A.jsxs)(n.Fragment,{children:["A group can have one attached IAM policy, where all users with membership in that group inherit that policy. Groups support more simplified management of user permissions on the MinIO Tenant.",(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-group-management.html?ref=con",target:"_blank",rel:"noopener",children:"documentation"}),"."]})})})]}),0===k.length&&(0,A.jsx)(l.xA9,{container:!0,children:(0,A.jsx)(l.xA9,{item:!0,xs:8,children:(0,A.jsx)(l.lVp,{title:"Groups",iconComponent:(0,A.jsx)(l.c2u,{}),help:(0,A.jsxs)(n.Fragment,{children:["A group can have one attached IAM policy, where all users with membership in that group inherit that policy. Groups support more simplified management of user permissions on the MinIO Tenant.",(0,A.jsxs)(d.R,{resource:a.Ms,scopes:a.k1,matchAll:!0,children:[(0,A.jsx)("br",{}),(0,A.jsx)("br",{}),"To get started,"," ",(0,A.jsx)(l.t53,{onClick:()=>{s("".concat(a.zZ.GROUPS_ADD))},children:"Create a Group"}),"."]})]})})})})]})]})})]})}},8185:(e,s,t)=>{t.d(s,{Hw:()=>r,LA:()=>n,SO:()=>l,rY:()=>o});const n=(e,s)=>{if(e.accessKey&&s.accessKey){if(e.accessKey>s.accessKey)return 1;if(e.accessKey<s.accessKey)return-1}return 0},r=(e,s)=>e.name>s.name?1:e.name<s.name?-1:0,l=(e,s)=>e>s?1:e<s?-1:0,o=(e,s)=>e.policy>s.policy?1:e.policy<s.policy?-1:0}}]);
     2  //# sourceMappingURL=8789.5dfcad74.chunk.js.map