mirror of
https://github.com/OpenMaxIO/openmaxio-object-browser
synced 2026-07-01 07:41:18 -07:00
2 lines
5.2 KiB
JavaScript
2 lines
5.2 KiB
JavaScript
"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[191],{75578:(e,s,t)=>{t.d(s,{Z:()=>o});var r=t(72791),n=t(80184);const o=function(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(t){return(0,n.jsx)(r.Suspense,{fallback:s,children:(0,n.jsx)(e,{...t})})}}},60191:(e,s,t)=>{t.r(s),t.d(s,{default:()=>G});var r=t(72791),n=t(57689),o=t(29945),l=t(31776),c=t(21639),i=t(23814),a=t(56087),d=t(38442),p=t(82342),u=t(75578),h=t(45248),x=t(87995),j=t(44690),m=t(27454),g=t(79844),f=t(61342),y=t(59114),b=t(80184);const C=(0,u.Z)(r.lazy((()=>t.e(8896).then(t.bind(t,88896))))),v=(0,u.Z)(r.lazy((()=>t.e(9134).then(t.bind(t,39134))))),G=()=>{const e=(0,j.TL)(),s=(0,n.s0)(),[t,u]=(0,r.useState)(!1),[G,k]=(0,r.useState)(!1),[A,S]=(0,r.useState)([]),[Z,w]=(0,r.useState)(""),[F,P]=(0,r.useState)(!1),[K,M]=(0,r.useState)([]);(0,r.useEffect)((()=>{k(!0)}),[]),(0,r.useEffect)((()=>{k(!0)}),[]),(0,r.useEffect)((()=>{e((0,x.Sc)("groups"))}),[]);const D=(0,d.F)(a.C3,a.vh),O=(0,d.F)(a.C3,a.oX),_=(0,d.F)(a.C3,a.k_),I=(0,d.F)(a.C3,a.fC,!0);(0,r.useEffect)((()=>{if(G)if(D){(()=>{l.h.groups.listGroups().then((e=>{let s=[];e.data.groups&&(s=e.data.groups.sort(c.V2)),S(s),k(!1)})).catch((s=>{e((0,x.Ih)((0,p.g)(s.error))),k(!1)}))})()}else k(!1)}),[G,e,D]);const R=A.filter((e=>e.includes(Z))),T=e=>{s("".concat(a.gA.GROUPS,"/").concat((0,h.LL)(e)))},z=[{type:"view",onClick:T,disableButtonFunction:()=>!_},{type:"edit",onClick:T,disableButtonFunction:()=>!_}];return(0,b.jsxs)(r.Fragment,{children:[t&&(0,b.jsx)(C,{deleteOpen:t,selectedGroups:K,closeDeleteModalAndRefresh:e=>{u(!1),M([]),e&&k(!0)}}),F&&(0,b.jsx)(v,{open:F,selectedGroups:K,selectedUser:null,closeModalAndRefresh:()=>{P(!1)}}),(0,b.jsx)(g.Z,{label:"Groups",actions:(0,b.jsx)(f.Z,{})}),(0,b.jsx)(o.Xgh,{children:(0,b.jsxs)(o.rjZ,{container:!0,children:[(0,b.jsxs)(o.rjZ,{item:!0,xs:12,sx:i.OR.actionsTray,children:[(0,b.jsx)(d.s,{resource:a.C3,scopes:a.vh,errorProps:{disabled:!0},children:(0,b.jsx)(y.Z,{placeholder:"Search Groups",onChange:w,value:Z,sx:{maxWidth:380}})}),(0,b.jsxs)(o.xuv,{sx:{display:"flex"},children:[(0,b.jsx)(d.s,{resource:a.C3,scopes:a.fC,matchAll:!0,errorProps:{disabled:!0},children:(0,b.jsx)(m.Z,{tooltip:K.length<1?"Please select Groups on which you want to apply Policies":I?"Select Policy":(0,a.MK)(a.fC,"apply policies to Groups"),children:(0,b.jsx)(o.zxk,{id:"assign-policy",onClick:()=>{P(!0)},label:"Assign Policy",icon:(0,b.jsx)(o.v42,{}),disabled:K.length<1||!I,variant:"regular"})})}),(0,b.jsx)(d.s,{resource:a.C3,scopes:a.oX,matchAll:!0,errorProps:{disabled:!0},children:(0,b.jsx)(m.Z,{tooltip:0===K.length?"Select Groups to delete":_?"Delete Selected":(0,a.MK)(a.k_,"delete Groups"),children:(0,b.jsx)(o.zxk,{id:"delete-selected-groups",onClick:()=>{u(!0)},label:"Delete Selected",icon:(0,b.jsx)(o.pJl,{}),variant:"secondary",disabled:0===K.length||!_})})}),(0,b.jsx)(d.s,{resource:a.C3,scopes:a.vN,matchAll:!0,errorProps:{disabled:!0},children:(0,b.jsx)(m.Z,{tooltip:"Create Group",children:(0,b.jsx)(o.zxk,{id:"create-group",label:"Create Group",variant:"callAction",icon:(0,b.jsx)(o.dtP,{}),onClick:()=>{s("".concat(a.gA.GROUPS_ADD))}})})})]})]}),G&&(0,b.jsx)(o.kod,{}),!G&&(0,b.jsxs)(r.Fragment,{children:[A.length>0&&(0,b.jsxs)(r.Fragment,{children:[(0,b.jsx)(o.rjZ,{item:!0,xs:12,sx:{marginBottom:15},children:(0,b.jsx)(d.s,{resource:a.C3,scopes:a.vh,errorProps:{disabled:!0},children:(0,b.jsx)(o.wQF,{itemActions:z,columns:[{label:"Name"}],isLoading:G,selectedItems:K,onSelect:O||_?e=>{const{target:{value:s="",checked:t=!1}={}}=e;let r=[...K];return t?r.push(s):r=r.filter((e=>e!==s)),M(r),r}:void 0,records:R,entityName:"Groups",idField:""})})}),(0,b.jsx)(o.rjZ,{item:!0,xs:12,children:(0,b.jsx)(o.KfX,{title:"Groups",iconComponent:(0,b.jsx)(o.wws,{}),help:(0,b.jsxs)(r.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,b.jsx)("br",{}),(0,b.jsx)("br",{}),"You can learn more at our"," ",(0,b.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===A.length&&(0,b.jsx)(o.rjZ,{container:!0,children:(0,b.jsx)(o.rjZ,{item:!0,xs:8,children:(0,b.jsx)(o.KfX,{title:"Groups",iconComponent:(0,b.jsx)(o.oyc,{}),help:(0,b.jsxs)(r.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,b.jsxs)(d.s,{resource:a.C3,scopes:a.vN,matchAll:!0,children:[(0,b.jsx)("br",{}),(0,b.jsx)("br",{}),"To get started,"," ",(0,b.jsx)(o.vmT,{onClick:()=>{s("".concat(a.gA.GROUPS_ADD))},children:"Create a Group"}),"."]})]})})})})]})]})})]})}},21639:(e,s,t)=>{t.d(s,{KE:()=>l,LQ:()=>r,V2:()=>o,g4:()=>n});const r=(e,s)=>{if(e.accessKey&&s.accessKey){if(e.accessKey>s.accessKey)return 1;if(e.accessKey<s.accessKey)return-1}return 0},n=(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=191.054df5a7.chunk.js.map
|