Files
openmaxio-object-browser/web-app/build/static/js/9467.206b0190.chunk.js
2023-12-29 11:44:01 -06:00

2 lines
22 KiB
JavaScript

"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[9467],{89467:(e,t,n)=>{n.r(t),n.d(t,{default:()=>z});var a=n(72791),s=n(57689),l=n(29945),r=n(23814),i=n(38442),c=n(56087),o=n(87995),d=n(44690),u=n(78687),h=n(46078),x=n(79844),g=n(31776),p=n(82342),m=n(99670),j=n(73996),b=n(27454),f=n(59114),v=n(19208),k=n(26181),S=n.n(k),C=n(56028),y=n(17420),_=n(80184);const E=e=>{var t;let{open:n,closeModalAndRefresh:s,buckets:r}=e;const i=(0,d.TL)(),[c,u]=(0,a.useState)(!1),[h,x]=(0,a.useState)(!0),[m,j]=(0,a.useState)([]),[b,f]=(0,a.useState)(""),[v,k]=(0,a.useState)(""),[E,T]=(0,a.useState)(""),[B,w]=(0,a.useState)(""),[R,L]=(0,a.useState)(!1),[F,Z]=(0,a.useState)("0"),[I,z]=(0,a.useState)("0"),[A,N]=(0,a.useState)("expiry"),[K,U]=(0,a.useState)("0"),[W,M]=(0,a.useState)("0"),[D,P]=(0,a.useState)(!1),[O,q]=(0,a.useState)(null);(0,a.useEffect)((()=>{h&&g.h.admin.tiersList().then((e=>{const t=S()(e.data,"items",[]);if(null!==t&&t.length>=1){const e=t.map((e=>{const t=e.type,n=S()(e,"".concat(t,".name"),"");return{label:n,value:n}}));j(e),e.length>0&&T(e[0].value)}x(!1)})).catch((e=>{x(!1),i((0,o.zb)((0,p.g)(e.error)))}))}),[h,i]),(0,a.useEffect)((()=>{let e=!0;"expiry"!==A&&""===E&&(e=!1),P(e)}),[A,K,W,E]);const V=e=>{let{errString:t}=e;switch(t){case"":return(0,_.jsx)(l.xuv,{sx:{paddingTop:5,color:"#42C91A"},children:(0,_.jsx)(l.rE2,{})});case"n/a":return null;default:if(t)return(0,_.jsx)(l.xuv,{sx:{paddingTop:5,color:"#C72C48"},children:(0,_.jsx)(l.ua7,{tooltip:t,placement:"top",children:(0,_.jsx)(l.e6P,{})})})}return null};return(0,_.jsx)(C.Z,{modalOpen:n,onClose:()=>{s(!1)},title:"Set Lifecycle to multiple buckets",children:(0,_.jsx)(l.ent,{loadingStep:c||h,wizardSteps:[{label:"Lifecycle Configuration",componentRender:(0,_.jsx)(a.Fragment,{children:(0,_.jsxs)(l.ltY,{withBorders:!1,containerPadding:!1,children:[(0,_.jsx)(l.rjZ,{item:!0,xs:12,children:(0,_.jsx)(l.bSr,{label:"Local Buckets to replicate",sx:{maxWidth:"440px",width:"100%"},children:r.join(", ")})}),(0,_.jsx)("h4",{children:"Remote Endpoint Configuration"}),(0,_.jsxs)("fieldset",{className:"inputItem",children:[(0,_.jsx)("legend",{children:"Lifecycle Configuration"}),(0,_.jsx)(l.Eep,{currentValue:A,id:"quota_type",name:"quota_type",label:"ILM Rule",onChange:e=>{N(e.target.value)},selectorOptions:[{value:"expiry",label:"Expiry"},{value:"transition",label:"Transition"}]}),"expiry"===A?(0,_.jsxs)(a.Fragment,{children:[(0,_.jsx)(l.Wzg,{type:"number",id:"expiry_days",name:"expiry_days",onChange:e=>{U(e.target.value)},label:"Expiry Days",value:K,min:"0"}),(0,_.jsx)(l.Wzg,{type:"number",id:"noncurrentversion_expiration_days",name:"noncurrentversion_expiration_days",onChange:e=>{Z(e.target.value)},label:"Non-current Expiration Days",value:F,min:"0"})]}):(0,_.jsxs)(a.Fragment,{children:[(0,_.jsx)(l.Wzg,{type:"number",id:"transition_days",name:"transition_days",onChange:e=>{M(e.target.value)},label:"Transition Days",value:W,min:"0"}),(0,_.jsx)(l.Wzg,{type:"number",id:"noncurrentversion_transition_days",name:"noncurrentversion_transition_days",onChange:e=>{z(e.target.value)},label:"Non-current Transition Days",value:I,min:"0"}),(0,_.jsx)(l.Wzg,{id:"noncurrentversion_t_SC",name:"noncurrentversion_t_SC",onChange:e=>{w(e.target.value)},placeholder:"Set Non-current Version Transition Storage Class",label:"Non-current Version Transition Storage Class",value:B}),(0,_.jsx)(l.PhF,{label:"Storage Class",id:"storage_class",name:"storage_class",value:E,onChange:e=>{T(e)},options:m})]})]}),(0,_.jsxs)("fieldset",{className:"inputItem",children:[(0,_.jsx)("legend",{children:"File Configuration"}),(0,_.jsx)(l.Wzg,{id:"prefix",name:"prefix",onChange:e=>{f(e.target.value)},label:"Prefix",value:b}),(0,_.jsx)(y.Z,{name:"tags",label:"Tags",elements:v,onChange:e=>{k(e)},keyPlaceholder:"Tag Key",valuePlaceholder:"Tag Value",withBorder:!0}),(0,_.jsx)(l.rsf,{value:"expired_delete_marker",id:"expired_delete_marker",name:"expired_delete_marker",checked:R,onChange:e=>{L(e.target.checked)},label:"Expired Object Delete Marker"})]})]})}),buttons:[{type:"custom",label:"Create Rules",enabled:!h&&!c&&D,action:e=>{let t={};if("expiry"===A){t={...{expiry_days:parseInt(K)},noncurrentversion_expiration_days:parseInt(F)}}else{t={...{transition_days:parseInt(W)},noncurrentversion_transition_days:parseInt(I),noncurrentversion_transition_storage_class:B,storage_class:E}}const n={buckets:r,type:A,prefix:b,tags:v,expired_object_delete_marker:R,...t};g.h.buckets.addMultiBucketLifecycle(n).then((t=>{u(!1),q(t.data),e("++")})).catch((e=>{u(!1),i((0,o.zb)((0,p.g)(e.error)))}))}}]},{label:"Results",componentRender:(0,_.jsxs)(a.Fragment,{children:[(0,_.jsx)("h3",{children:"Multi Bucket lifecycle Assignments Results"}),(0,_.jsx)(l.rjZ,{container:!0,children:(0,_.jsxs)(l.rjZ,{item:!0,xs:12,children:[(0,_.jsx)("h4",{children:"Buckets Results"}),null===O||void 0===O||null===(t=O.results)||void 0===t?void 0:t.map((e=>(0,_.jsxs)(l.xuv,{sx:{display:"grid",gridTemplateColumns:"45px auto",alignItems:"center",justifyContent:"stretch"},children:[V({errString:e.error||""}),(0,_.jsx)("span",{children:e.bucketName})]})))]})})]}),buttons:[{type:"custom",label:"Done",enabled:!c,action:()=>s(!0)}]}],forModal:!0})})};var T=n(49535),B=n(16444),w=n(11087),R=n(45248);const L=B.ZP.div((e=>{let{theme:t}=e;return{border:"".concat(S()(t,"borderColor","#eaeaea")," 1px solid"),borderRadius:3,padding:15,cursor:"pointer","&.disabled":{backgroundColor:S()(t,"signalColors.danger","red")},"&:hover":{backgroundColor:S()(t,"boxBackground","#FBFAFA")},"& .bucketTitle":{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:10,"& h1":{padding:0,margin:0,marginBottom:5,fontSize:22,color:S()(t,"screenTitle.iconColor","#07193E"),["@media (max-width: ".concat(l.Egj.md,"px)")]:{marginBottom:0}}},"& .bucketDetails":{display:"flex",gap:40,"& span":{fontSize:14},["@media (max-width: ".concat(l.Egj.md,"px)")]:{flexFlow:"column-reverse",gap:5}},"& .bucketMetrics":{display:"flex",alignItems:"center",marginTop:20,gap:25,borderTop:"".concat(S()(t,"borderColor","#E2E2E2")," 1px solid"),paddingTop:20,"& svg.bucketIcon":{color:S()(t,"screenTitle.iconColor","#07193E"),fill:S()(t,"screenTitle.iconColor","#07193E")},"& .metric":{"& .min-icon":{color:S()(t,"fontColor","#000"),width:13,marginRight:5}},"& .metricLabel":{fontSize:14,fontWeight:"bold",color:S()(t,"fontColor","#000")},"& .metricText":{fontSize:24,fontWeight:"bold"},"& .unit":{fontSize:12,fontWeight:"normal"},["@media (max-width: ".concat(l.Egj.md,"px)")]:{marginTop:8,paddingTop:8}}}})),F=e=>{let{bucket:t,onSelect:n,selected:r,bulkSelect:o}=e;const d=(0,s.s0)(),u=(0,R.ae)("".concat(t.size)||"0"),h=u.split(" ")[0],x=u.split(" ")[1],g=S()(t,"details.quota.quota","0"),p=(0,R.Am)(g,!0,!1),m=(0,i.F)(t.name,c.D[c.EI.BUCKET_ADMIN])&&!1;return(0,_.jsxs)(L,{onClick:()=>{d("/buckets/".concat(t.name,"/admin"))},id:"manageBucket-".concat(t.name),className:"bucket-item ".concat(m?"disabled":""),children:[(0,_.jsxs)(l.xuv,{className:"bucketTitle",children:[o&&(0,_.jsx)(l.xuv,{onClick:e=>{e.stopPropagation()},children:(0,_.jsx)(l.XZJ,{checked:r,id:"select-".concat(t.name),label:"",name:"select-".concat(t.name),onChange:e=>{n(e)},value:t.name})}),(0,_.jsxs)("h1",{children:[t.name," ",m]})]}),(0,_.jsxs)(l.xuv,{className:"bucketDetails",children:[(0,_.jsxs)("span",{id:"created-".concat(t.name),children:[(0,_.jsx)("strong",{children:"Created:"})," ",t.creation_date?new Date(t.creation_date).toString():"n/a"]}),(0,_.jsxs)("span",{id:"access-".concat(t.name),children:[(0,_.jsx)("strong",{children:"Access:"})," ",(e=>{var t,n,a,s,l,r;return null===(t=e.rw_access)||void 0===t||!t.read||null!==(n=e.rw_access)&&void 0!==n&&n.write?null!==(a=e.rw_access)&&void 0!==a&&a.read||null===(s=e.rw_access)||void 0===s||!s.write?null!==(l=e.rw_access)&&void 0!==l&&l.read&&null!==(r=e.rw_access)&&void 0!==r&&r.write?"R/W":"":"W":"R"})(t)]})]}),(0,_.jsxs)(l.xuv,{className:"bucketMetrics",children:[(0,_.jsx)(w.rU,{to:"/buckets/".concat(t.name,"/admin"),children:(0,_.jsx)(l.wNb,{className:"bucketIcon",style:{height:48,width:48}})}),(0,_.jsxs)(l.rjZ,{item:!0,className:"metric",children:[(0,_.jsx)(l.rHZ,{}),(0,_.jsx)("span",{className:"metricLabel",children:"Usage"}),(0,_.jsxs)("div",{className:"metricText",children:[h,(0,_.jsx)("span",{className:"unit",children:x}),"0"!==g&&(0,_.jsxs)(a.Fragment,{children:[" ","/ ",p.total,(0,_.jsx)("span",{className:"unit",children:p.unit})]})]})]}),(0,_.jsxs)(l.rjZ,{item:!0,className:"metric",children:[(0,_.jsx)(l.xpX,{}),(0,_.jsx)("span",{className:"metricLabel",children:"Objects"}),(0,_.jsx)("div",{className:"metricText",children:t.objects?(0,R.CE)(t.objects):0})]})]})]})};var Z=n(84741);const I=e=>{let{open:t,closeModalAndRefresh:n,buckets:s}=e;const r=(0,d.TL)(),[i,c]=(0,a.useState)([]),[u,h]=(0,a.useState)(!1),[x,m]=(0,a.useState)(!1),[j,b]=(0,a.useState)(""),[f,v]=(0,a.useState)(""),[k,y]=(0,a.useState)(""),[E,T]=(0,a.useState)(""),[B,w]=(0,a.useState)(!0),[L,F]=(0,a.useState)("async"),[I,z]=(0,a.useState)("100"),[A,N]=(0,a.useState)("Gi"),[K,U]=(0,a.useState)("60"),[W,M]=(0,a.useState)([]),[D,P]=(0,a.useState)([]),[O,q]=(0,a.useState)([]),V=D.map((e=>({label:e,value:e})));(0,a.useEffect)((()=>{if(0===W.length){const e=[],t=[];s.forEach((n=>{e.push(n),t.push("")})),M(t),c(e)}}),[s,W.length]);const X=e=>{let{errString:t}=e;switch(t){case"":return(0,_.jsx)(l.xuv,{sx:{color:"#42C91A"},children:(0,_.jsx)(l.rE2,{})});case"n/a":return null;default:if(t)return(0,_.jsx)(l.xuv,{sx:{color:"#C72C48"},children:(0,_.jsx)(l.ua7,{tooltip:t,placement:"top",children:(0,_.jsx)(l.e6P,{})})})}return null},Y=(e,t)=>{const n=[...W];n[e]=t,M(n)},Q=e=>{let t=[...i],n=[...W];null===e||void 0===e||e.forEach((e=>{const a=S()(e,"errorString","");if(!a||""===a){const a=t.indexOf(e.originBucket||"");t.splice(a,1),n.splice(a,1)}})),c(t),M(n)};return(0,_.jsx)(C.Z,{modalOpen:t,onClose:()=>{n(!1)},title:"Set Multiple Bucket Replication",children:(0,_.jsx)(l.ent,{loadingStep:u||x,wizardSteps:[{label:"Remote Configuration",componentRender:(0,_.jsx)(a.Fragment,{children:(0,_.jsxs)(l.ltY,{containerPadding:!1,withBorders:!1,children:[(0,_.jsx)(l.bSr,{label:"Local Buckets to replicate",sx:{maxWidth:"440px",width:"100%"},children:i.join(", ")}),(0,_.jsx)("h4",{children:"Remote Endpoint Configuration"}),(0,_.jsxs)("span",{style:{fontSize:14},children:["Please avoid the use of root credentials for this feature",(0,_.jsx)("br",{}),(0,_.jsx)("br",{})]}),(0,_.jsx)(l.Wzg,{id:"accessKey",name:"accessKey",onChange:e=>{b(e.target.value)},label:"Access Key",value:j}),(0,_.jsx)(l.Wzg,{id:"secretKey",name:"secretKey",onChange:e=>{v(e.target.value)},label:"Secret Key",value:f}),(0,_.jsx)(l.Wzg,{id:"targetURL",name:"targetURL",onChange:e=>{y(e.target.value)},placeholder:"play.min.io:9000",label:"Target URL",value:k}),(0,_.jsx)(l.rsf,{checked:B,id:"useTLS",name:"useTLS",label:"Use TLS",onChange:e=>{w(e.target.checked)},value:"yes"}),(0,_.jsx)(l.Wzg,{id:"region",name:"region",onChange:e=>{T(e.target.value)},label:"Region",value:E}),(0,_.jsx)(l.PhF,{id:"replication_mode",name:"replication_mode",onChange:e=>{F(e)},label:"Replication Mode",value:L,options:[{label:"Asynchronous",value:"async"},{label:"Synchronous",value:"sync"}]}),"async"===L&&(0,_.jsx)(l.Wzg,{type:"number",id:"bandwidth_scalar",name:"bandwidth_scalar",onChange:e=>{e.target.validity.valid&&z(e.target.value)},label:"Bandwidth",value:I,min:"0",pattern:"[0-9]*",overlayObject:(0,_.jsx)(Z.Z,{id:"quota_unit",onUnitChange:e=>{N(e)},unitSelected:A,unitsList:(0,R.zQ)(["Ki"]),disabled:!1})}),(0,_.jsx)(l.Wzg,{id:"healthCheck",name:"healthCheck",onChange:e=>{U(e.target.value)},label:"Health Check Duration",value:K})]})}),buttons:[{type:"custom",label:"Next",enabled:!x,action:e=>{const t={accessKey:j,secretKey:f,targetURL:k,useTLS:B};m(!0),g.h.listExternalBuckets.listExternalBuckets(t).then((t=>{const n=S()(t.data,"buckets",[]);if(n&&n.length>0){const e=n.map((e=>e.name));P(e)}e("++"),m(!1)})).catch((e=>{m(!1),r((0,o.zb)((0,p.g)(e.error)))}))}}]},{label:"Bucket Assignments",componentRender:(0,_.jsxs)(a.Fragment,{children:[(0,_.jsx)("h3",{children:"Remote Bucket Assignments"}),(0,_.jsx)("span",{style:{fontSize:14},children:"Please select / type the desired remote bucket were you want the local data to be replicated."}),(0,_.jsx)(l.xuv,{sx:{display:"grid",gridTemplateColumns:"auto auto 45px",alignItems:"center",justifyContent:"stretch","& .hide":{opacity:0,transitionDuration:"0.3s"}},children:i.map(((e,t)=>{const n=(e=>{if(O&&O.length>0){const t=O.find((t=>t.originBucket===e));if(t){return S()(t,"errorString","")||""}}return"n/a"})(e);return(0,_.jsxs)(a.Fragment,{children:[(0,_.jsx)("div",{className:""===n?"hide":"",children:e}),(0,_.jsx)("div",{className:""===n?"hide":"",children:(s=t,D.length>0?(0,_.jsx)(a.Fragment,{children:(0,_.jsx)(l.PhF,{label:"",id:"assign-bucket-".concat(s),name:"assign-bucket-".concat(s),value:W[s],onChange:e=>{Y(s,e)},options:V,disabled:u})}):(0,_.jsx)(a.Fragment,{children:(0,_.jsx)(l.Wzg,{id:"assign-bucket-".concat(s),name:"assign-bucket-".concat(s),label:"",onChange:e=>{Y(s,e.target.value)},value:W[s],disabled:u})}))}),(0,_.jsx)("div",{className:""===n?"hide":"",children:O&&O.length>0&&(0,_.jsx)(X,{errString:n})})]},"buckets-assignation-".concat(t.toString(),"-").concat(e));var s}))})]}),buttons:[{type:"back",label:"Back",enabled:!0},{type:"next",label:"Create",enabled:!u,action:()=>{h(!0);const e=i.map(((e,t)=>({originBucket:e,destinationBucket:W[t]}))),t="".concat(B?"https://":"http://").concat(k),a=parseInt(K),s={accessKey:j,secretKey:f,targetURL:t,region:E,bucketsRelation:e,syncMode:L,bandwidth:"async"===L?parseInt((0,R.Pw)(I,A,!0)):0,healthCheckPeriod:a};g.h.bucketsReplication.setMultiBucketReplication(s).then((e=>{h(!1);const t=e.data.replicationState;q(t);const a=null===t||void 0===t?void 0:t.filter((e=>e.errorString&&""!==e.errorString));0===(null===a||void 0===a?void 0:a.length)?n(!0):setTimeout((()=>{Q(t)}),500)})).catch((e=>{h(!1),r((0,o.zb)((0,p.g)(e.error)))}))}}]}],forModal:!0})})},z=()=>{const e=(0,d.TL)(),t=(0,s.s0)(),[n,k]=(0,a.useState)([]),[S,C]=(0,a.useState)(!0),[y,B]=(0,a.useState)(""),[w,R]=(0,a.useState)([]),[L,Z]=(0,a.useState)(!1),[z,A]=(0,a.useState)(!1),[N,K]=(0,a.useState)(!1),[U,W]=(0,a.useState)(!1),M=(0,u.v9)(h.$4),D=!(null===M||void 0===M||!M.includes("object-browser-only"));(0,a.useEffect)((()=>{e((0,o.Sc)("ob_bucket_list"))}),[e]),(0,a.useEffect)((()=>{if(S){(()=>{C(!0),g.h.buckets.listBuckets().then((t=>{t.data?(C(!1),k(t.data.buckets||[])):t.error&&(C(!1),e((0,o.Ih)((0,p.g)(t.error))))}))})()}}),[S,e]);const P=n.filter((e=>""===y||e.name.indexOf(y)>=0)),O=n.length>0,q=e=>{const t=e.target,n=t.value,a=t.checked;let s=[...w];return a?s.push(n):s=s.filter((e=>e!==n)),R(s),s};(0,a.useEffect)((()=>{var e=!1;w.forEach((t=>{(0,T.Z)(t,c.D[c.EI.BUCKET_LIFECYCLE],!0)?K(!0):e=!0})),K(!e)}),[w]);const V=(0,T.Z)("*",[c.Ft.S3_CREATE_BUCKET]),X=(0,T.Z)("*",[c.Ft.S3_LIST_BUCKET,c.Ft.S3_ALL_LIST_BUCKET]);return(0,_.jsxs)(a.Fragment,{children:[L&&(0,_.jsx)(I,{open:L,buckets:w,closeModalAndRefresh:e=>{Z(!1),e&&R([])}}),z&&(0,_.jsx)(E,{buckets:w,closeModalAndRefresh:e=>{A(!1),e&&R([])},open:z}),!D&&(0,_.jsx)(x.Z,{label:"Buckets",actions:(0,_.jsx)(m.Z,{})}),(0,_.jsxs)(l.Xgh,{children:[(0,_.jsxs)(l.rjZ,{item:!0,xs:12,sx:r.OR.actionsTray,children:[D&&(0,_.jsx)(l.rjZ,{item:!0,xs:!0,children:(0,_.jsx)(j.Z,{marginRight:15,marginTop:10})}),O&&(0,_.jsx)(f.Z,{onChange:B,placeholder:"Search Buckets",value:y,sx:{minWidth:380,["@media (max-width: ".concat(l.Egj.md,"px)")]:{minWidth:220}}}),(0,_.jsxs)(l.rjZ,{item:!0,xs:12,sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:5},children:[!D&&(0,_.jsxs)(a.Fragment,{children:[(0,_.jsx)(b.Z,{tooltip:O?U?"Unselect Buckets":"Select Multiple Buckets":"",children:(0,_.jsx)(l.zxk,{id:"multiple-bucket-seection",onClick:()=>{W(!U),R([])},icon:(0,_.jsx)(l.amE,{}),variant:U?"callAction":"regular",disabled:!O})}),U&&(0,_.jsx)(b.Z,{tooltip:O?w.length===P.length?"Unselect All Buckets":"Select All Buckets":"",children:(0,_.jsx)(l.zxk,{id:"select-all-buckets",onClick:()=>{if(w.length===P.length)return void R([]);const e=P.map((e=>e.name));R(e)},icon:(0,_.jsx)(l.QQb,{}),variant:"regular"})}),(0,_.jsx)(b.Z,{tooltip:O?N?0===w.length?U?"Please select at least one bucket on which to configure Lifecycle":"Use the Select Multiple Buckets button to choose buckets on which to configure Lifecycle":"Set Lifecycle":(0,c.MK)(c.D[c.EI.BUCKET_LIFECYCLE],"configure lifecycle for the selected buckets"):"",children:(0,_.jsx)(l.zxk,{id:"set-lifecycle",onClick:()=>{A(!0)},icon:(0,_.jsx)(l.QIv,{}),variant:"regular",disabled:0===w.length||!N})}),(0,_.jsx)(b.Z,{tooltip:O?0===w.length?U?"Please select at least one bucket on which to configure Replication":"Use the Select Multiple Buckets button to choose buckets on which to configure Replication":"Set Replication":"",children:(0,_.jsx)(l.zxk,{id:"set-replication",onClick:()=>{Z(!0)},icon:(0,_.jsx)(l.D6F,{}),variant:"regular",disabled:0===w.length})})]}),(0,_.jsx)(b.Z,{tooltip:"Refresh",children:(0,_.jsx)(l.zxk,{id:"refresh-buckets",onClick:()=>{C(!0)},icon:(0,_.jsx)(l.DuK,{}),variant:"regular"})}),!D&&(0,_.jsx)(b.Z,{tooltip:V?"":(0,c.MK)([c.Ft.S3_CREATE_BUCKET],"create a bucket"),children:(0,_.jsx)(l.zxk,{id:"create-bucket",onClick:()=>{t(c.gA.ADD_BUCKETS)},icon:(0,_.jsx)(l.dtP,{}),variant:"callAction",disabled:!V,label:"Create Bucket"})})]})]}),S&&(0,_.jsx)(l.kod,{}),!S&&(0,_.jsxs)(l.rjZ,{item:!0,xs:12,sx:{marginTop:25,height:"calc(100vh - 211px)","&.isEmbedded":{height:"calc(100vh - 128px)"}},className:D?"isEmbedded":"",children:[0!==P.length&&(0,_.jsx)(v.Z,{rowRenderFunction:e=>{const t=P[e]||null;return t?(0,_.jsx)(F,{bucket:t,onSelect:q,selected:w.includes(t.name),bulkSelect:U}):null},totalItems:P.length}),0===P.length&&""!==y&&(0,_.jsx)(l.rjZ,{container:!0,children:(0,_.jsx)(l.rjZ,{item:!0,xs:8,children:(0,_.jsx)(l.KfX,{iconComponent:(0,_.jsx)(l.wNb,{}),title:"No Results",help:(0,_.jsx)(a.Fragment,{children:"No buckets match the filtering condition"})})})}),!O&&(0,_.jsx)(l.rjZ,{container:!0,children:(0,_.jsx)(l.rjZ,{item:!0,xs:8,children:(0,_.jsx)(l.KfX,{iconComponent:(0,_.jsx)(l.wNb,{}),title:"Buckets",help:(0,_.jsxs)(a.Fragment,{children:["MinIO uses buckets to organize objects. A bucket is similar to a folder or directory in a filesystem, where each bucket can hold an arbitrary number of objects.",(0,_.jsx)("br",{}),X?"":(0,_.jsxs)(a.Fragment,{children:[(0,_.jsx)("br",{}),(0,c.MK)([c.Ft.S3_LIST_BUCKET,c.Ft.S3_ALL_LIST_BUCKET],"view the buckets on this server"),(0,_.jsx)("br",{})]}),(0,_.jsxs)(i.s,{scopes:[c.Ft.S3_CREATE_BUCKET],resource:c.C3,children:[(0,_.jsx)("br",{}),"To get started,\xa0",(0,_.jsx)(l.vmT,{onClick:()=>{t(c.gA.ADD_BUCKETS)},children:"Create a Bucket."})]})]})})})})]})]})]})}},84741:(e,t,n)=>{n.d(t,{Z:()=>d});var a=n(72791),s=n(29945),l=n(16444),r=n(26181),i=n.n(r),c=n(80184);const o=l.ZP.button((e=>{let{theme:t}=e;return{border:"1px solid ".concat(i()(t,"borderColor","#E2E2E2")),borderRadius:3,color:i()(t,"secondaryText","#5B5C5C"),backgroundColor:i()(t,"boxBackground","#FBFAFA"),fontSize:12}})),d=e=>{let{id:t,unitSelected:n,unitsList:l,disabled:r=!1,onUnitChange:i}=e;const[d,u]=a.useState(null),h=Boolean(d),x=e=>{u(null),""!==e&&i&&i(e)};return(0,c.jsxs)(a.Fragment,{children:[(0,c.jsx)(o,{id:"".concat(t,"-button"),"aria-controls":"".concat(t,"-menu"),"aria-haspopup":"true","aria-expanded":h?"true":void 0,onClick:e=>{u(e.currentTarget)},disabled:r,type:"button",children:n}),(0,c.jsx)(s.udT,{id:"upload-main-menu",options:l,selectedOption:"",onSelect:e=>x(e),hideTriggerAction:()=>{x("")},open:h,anchorEl:d,anchorOrigin:"end"})]})}},17420:(e,t,n)=>{n.d(t,{Z:()=>d});var a=n(72791),s=n(26181),l=n.n(s),r=n(48573),i=n.n(r),c=n(29945),o=n(80184);const d=e=>{let{elements:t,name:n,label:s,tooltip:r="",keyPlaceholder:d="",valuePlaceholder:u="",onChange:h,withBorder:x=!1}=e;const[g,p]=(0,a.useState)([""]),[m,j]=(0,a.useState)([""]),b=(0,a.createRef)();(0,a.useEffect)((()=>{if(1===g.length&&""===g[0]&&1===m.length&&""===m[0]&&t&&""!==t){const e=t.split("&");let n=[],a=[];e.forEach((e=>{const t=e.split("=");2===t.length&&(n.push(t[0]),a.push(t[1]))})),n.push(""),a.push(""),p(n),j(a)}}),[g,m,t]),(0,a.useEffect)((()=>{const e=b.current;e&&g.length>1&&e.scrollIntoView(!1)}),[g]);const f=(0,a.useRef)(!0);(0,a.useLayoutEffect)((()=>{f.current?f.current=!1:S()}),[g,m]);const v=e=>{e.persist();let t=[...g];const n=l()(e.target,"dataset.index","0");t[parseInt(n)]=e.target.value,p(t)},k=e=>{e.persist();let t=[...m];const n=l()(e.target,"dataset.index","0");t[parseInt(n)]=e.target.value,j(t)},S=i()((()=>{let e="";g.forEach(((t,n)=>{if(g[n]&&m[n]){let a="".concat(t,"=").concat(m[n]);0!==n&&(a="&".concat(a)),e="".concat(e).concat(a)}})),h(e)}),500),C=m.map(((e,t)=>(0,o.jsxs)(c.rjZ,{item:!0,xs:12,className:"lineInputBoxes inputItem",children:[(0,o.jsx)(c.Wzg,{id:"".concat(n,"-key-").concat(t.toString()),label:"",name:"".concat(n,"-").concat(t.toString()),value:g[t],onChange:v,index:t,placeholder:d}),(0,o.jsx)("span",{className:"queryDiv",children:":"}),(0,o.jsx)(c.Wzg,{id:"".concat(n,"-value-").concat(t.toString()),label:"",name:"".concat(n,"-").concat(t.toString()),value:m[t],onChange:k,index:t,placeholder:u,overlayIcon:t===m.length-1?(0,o.jsx)(c.dtP,{}):null,overlayAction:()=>{(()=>{if(""!==g[g.length-1].trim()&&""!==m[m.length-1].trim()){const e=[...g],t=[...m];e.push(""),t.push(""),p(e),j(t)}})()}})]},"query-pair-".concat(n,"-").concat(t.toString()))));return(0,o.jsx)(a.Fragment,{children:(0,o.jsxs)(c.rjZ,{item:!0,xs:12,sx:{"& .lineInputBoxes":{display:"flex"},"& .queryDiv":{alignSelf:"center",margin:"-15px 4px 0",fontWeight:600}},className:"inputItem",children:[(0,o.jsxs)(c.AZs,{children:[s,""!==r&&(0,o.jsx)(c.xuv,{sx:{marginLeft:5,display:"flex",alignItems:"center","& .min-icon":{width:13}},children:(0,o.jsx)(c.ua7,{tooltip:r,placement:"top",children:(0,o.jsx)(c.byK,{style:{width:13,height:13}})})})]}),(0,o.jsxs)(c.xuv,{withBorders:x,sx:{padding:15,height:150,overflowY:"auto",position:"relative",marginTop:15},children:[C,(0,o.jsx)("div",{ref:b})]})]})})}}}]);
//# sourceMappingURL=9467.206b0190.chunk.js.map