Files
openmaxio-object-browser/web-app/build/static/js/8789.c066ce6c.chunk.js
Alex 3db998f9c4 Release v1.6.2 (#3407)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2024-07-12 12:43:59 -07:00

2 lines
5.2 KiB
JavaScript

"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[8789],{72237:(e,s,t)=>{t.d(s,{A:()=>o});var n=t(65043),r=t(70579);const o=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:()=>G});var n=t(65043),r=t(73216),o=t(89923),l=t(56629),c=t(8185),i=t(77403),a=t(99161),d=t(77938),p=t(53518),u=t(72237),h=t(64159),x=t(21383),j=t(6681),m=t(48793),g=t(55968),b=t(64681),A=t(70579);const f=(0,u.A)(n.lazy((()=>t.e(5851).then(t.bind(t,85851))))),y=(0,u.A)(n.lazy((()=>t.e(4705).then(t.bind(t,74705))))),G=()=>{const e=(0,x.jL)(),s=(0,r.Zp)(),[t,u]=(0,n.useState)(!1),[G,S]=(0,n.useState)(!1),[M,C]=(0,n.useState)([]),[k,v]=(0,n.useState)(""),[P,O]=(0,n.useState)(!1),[R,w]=(0,n.useState)([]);(0,n.useEffect)((()=>{S(!0)}),[]),(0,n.useEffect)((()=>{S(!0)}),[]),(0,n.useEffect)((()=>{e((0,h.ph)("groups"))}),[]);const _=(0,d._)(a.Ms,a.lj),F=(0,d._)(a.Ms,a.lP),z=(0,d._)(a.Ms,a.Oh),D=(0,d._)(a.Ms,a.bO,!0);(0,n.useEffect)((()=>{if(G)if(_){(()=>{l.F.groups.listGroups().then((e=>{let s=[];e.data.groups&&(s=e.data.groups.sort(c.SO)),C(s),S(!1)})).catch((s=>{e((0,h.C9)((0,p.S)(s.error))),S(!1)}))})()}else S(!1)}),[G,e,_]);const I=M.filter((e=>e.includes(k))),K=e=>{s("".concat(a.zZ.GROUPS,"/").concat(encodeURIComponent(e)))},E=[{type:"view",onClick:K,disableButtonFunction:()=>!z},{type:"edit",onClick:K,disableButtonFunction:()=>!z}];return(0,A.jsxs)(n.Fragment,{children:[t&&(0,A.jsx)(f,{deleteOpen:t,selectedGroups:R,closeDeleteModalAndRefresh:e=>{u(!1),w([]),e&&S(!0)}}),P&&(0,A.jsx)(y,{open:P,selectedGroups:R,selectedUser:null,closeModalAndRefresh:()=>{O(!1)}}),(0,A.jsx)(m.A,{label:"Groups",actions:(0,A.jsx)(g.A,{})}),(0,A.jsx)(o.Mxu,{children:(0,A.jsxs)(o.xA9,{container:!0,children:[(0,A.jsxs)(o.xA9,{item:!0,xs:12,sx:i._0.actionsTray,children:[(0,A.jsx)(d.R,{resource:a.Ms,scopes:a.lj,errorProps:{disabled:!0},children:(0,A.jsx)(b.A,{placeholder:"Search Groups",onChange:v,value:k,sx:{maxWidth:380}})}),(0,A.jsxs)(o.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)(j.A,{tooltip:R.length<1?"Please select Groups on which you want to apply Policies":D?"Select Policy":(0,a.vj)(a.bO,"apply policies to Groups"),children:(0,A.jsx)(o.$nd,{id:"assign-policy",onClick:()=>{O(!0)},label:"Assign Policy",icon:(0,A.jsx)(o.n$X,{}),disabled:R.length<1||!D,variant:"regular"})})}),(0,A.jsx)(d.R,{resource:a.Ms,scopes:a.lP,matchAll:!0,errorProps:{disabled:!0},children:(0,A.jsx)(j.A,{tooltip:0===R.length?"Select Groups to delete":z?"Delete Selected":(0,a.vj)(a.Oh,"delete Groups"),children:(0,A.jsx)(o.$nd,{id:"delete-selected-groups",onClick:()=>{u(!0)},label:"Delete Selected",icon:(0,A.jsx)(o.d7y,{}),variant:"secondary",disabled:0===R.length||!z})})}),(0,A.jsx)(d.R,{resource:a.Ms,scopes:a.k1,matchAll:!0,errorProps:{disabled:!0},children:(0,A.jsx)(j.A,{tooltip:"Create Group",children:(0,A.jsx)(o.$nd,{id:"create-group",label:"Create Group",variant:"callAction",icon:(0,A.jsx)(o.REV,{}),onClick:()=>{s("".concat(a.zZ.GROUPS_ADD))}})})})]})]}),G&&(0,A.jsx)(o.z21,{}),!G&&(0,A.jsxs)(n.Fragment,{children:[M.length>0&&(0,A.jsxs)(n.Fragment,{children:[(0,A.jsx)(o.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)(o.bQt,{itemActions:E,columns:[{label:"Name"}],isLoading:G,selectedItems:R,onSelect:F||z?e=>{const{target:{value:s="",checked:t=!1}={}}=e;let n=[...R];return t?n.push(s):n=n.filter((e=>e!==s)),w(n),n}:void 0,records:I,entityName:"Groups",idField:""})})}),(0,A.jsx)(o.xA9,{item:!0,xs:12,children:(0,A.jsx)(o.lVp,{title:"Groups",iconComponent:(0,A.jsx)(o.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===M.length&&(0,A.jsx)(o.xA9,{container:!0,children:(0,A.jsx)(o.xA9,{item:!0,xs:8,children:(0,A.jsx)(o.lVp,{title:"Groups",iconComponent:(0,A.jsx)(o.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)(o.t53,{onClick:()=>{s("".concat(a.zZ.GROUPS_ADD))},children:"Create a Group"}),"."]})]})})})})]})]})})]})}},8185:(e,s,t)=>{t.d(s,{Hw:()=>r,LA:()=>n,SO:()=>o,rY:()=>l});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,o=(e,s)=>e>s?1:e<s?-1:0,l=(e,s)=>e.policy>s.policy?1:e.policy<s.policy?-1:0}}]);
//# sourceMappingURL=8789.c066ce6c.chunk.js.map