diff options
Diffstat (limited to '')
-rw-r--r-- | src/pybind/mgr/dashboard/frontend/dist/en-US/803.08339784f3bb5d16.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pybind/mgr/dashboard/frontend/dist/en-US/803.08339784f3bb5d16.js b/src/pybind/mgr/dashboard/frontend/dist/en-US/803.08339784f3bb5d16.js new file mode 100644 index 000000000..067c61f3e --- /dev/null +++ b/src/pybind/mgr/dashboard/frontend/dist/en-US/803.08339784f3bb5d16.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkceph_dashboard=self.webpackChunkceph_dashboard||[]).push([[803],{77803:(Dr,t_,c)=>{c.r(t_),c.d(t_,{RgwModule:()=>L_,RoutedRgwModule:()=>Zr});var T=c(88692),a=c(20092),J=c(54247),G=c(51389),o_=c(37496),I=c(79512),j_=c(4268),et=c(44466),_t=c(66265),tt=c(23815),E=c.n(tt),ne=c(35758),Ee=c(95152),n_=c(33394),xe=c(64762),i_=c(35732),ke=c(25917),s_=c(19773),ot=c(96736),a_=c(5304),oe=c(20523),nt=c(93523),e=c(64537);let Q=class{constructor(n,_){this.http=n,this.rgwDaemonService=_,this.url="api/rgw/user"}list(){return this.enumerate().pipe((0,s_.zg)(n=>n.length>0?(0,ne.D)(n.map(_=>this.get(_))):(0,ke.of)([])))}enumerate(){return this.rgwDaemonService.request(n=>this.http.get(this.url,{params:n}))}enumerateEmail(){return this.rgwDaemonService.request(n=>this.http.get(`${this.url}/get_emails`,{params:n}))}get(n){return this.rgwDaemonService.request(_=>this.http.get(`${this.url}/${n}`,{params:_}))}getQuota(n){return this.rgwDaemonService.request(_=>this.http.get(`${this.url}/${n}/quota`,{params:_}))}create(n){return this.rgwDaemonService.request(_=>(E().keys(n).forEach(o=>{_=_.append(o,n[o])}),this.http.post(this.url,null,{params:_})))}update(n,_){return this.rgwDaemonService.request(o=>(E().keys(_).forEach(i=>{o=o.append(i,_[i])}),this.http.put(`${this.url}/${n}`,null,{params:o})))}updateQuota(n,_){return this.rgwDaemonService.request(o=>(E().keys(_).forEach(i=>{o=o.append(i,_[i])}),this.http.put(`${this.url}/${n}/quota`,null,{params:o})))}delete(n){return this.rgwDaemonService.request(_=>this.http.delete(`${this.url}/${n}`,{params:_}))}createSubuser(n,_){return this.rgwDaemonService.request(o=>(E().keys(_).forEach(i=>{o=o.append(i,_[i])}),this.http.post(`${this.url}/${n}/subuser`,null,{params:o})))}deleteSubuser(n,_){return this.rgwDaemonService.request(o=>this.http.delete(`${this.url}/${n}/subuser/${_}`,{params:o}))}addCapability(n,_,o){return this.rgwDaemonService.request(i=>(i=(i=i.append("type",_)).append("perm",o),this.http.post(`${this.url}/${n}/capability`,null,{params:i})))}deleteCapability(n,_,o){return this.rgwDaemonService.request(i=>(i=(i=i.append("type",_)).append("perm",o),this.http.delete(`${this.url}/${n}/capability`,{params:i})))}addS3Key(n,_){return this.rgwDaemonService.request(o=>(o=o.append("key_type","s3"),E().keys(_).forEach(i=>{o=o.append(i,_[i])}),this.http.post(`${this.url}/${n}/key`,null,{params:o})))}deleteS3Key(n,_){return this.rgwDaemonService.request(o=>(o=(o=o.append("key_type","s3")).append("access_key",_),this.http.delete(`${this.url}/${n}/key`,{params:o})))}exists(n){return this.get(n).pipe((0,ot.h)(!0),(0,a_.K)(_=>(E().isFunction(_.preventDefault)&&_.preventDefault(),(0,ke.of)(!1))))}emailExists(n){return n=decodeURIComponent(n),this.enumerateEmail().pipe((0,s_.zg)(_=>{const o=E().indexOf(_,n);return(0,ke.of)(-1!==o)}))}};Q.\u0275fac=function(n){return new(n||Q)(e.LFG(i_.eN),e.LFG(oe.b))},Q.\u0275prov=e.Yz7({token:Q,factory:Q.\u0275fac,providedIn:"root"}),Q=(0,xe.gn)([nt.o,(0,xe.w6)("design:paramtypes",[i_.eN,oe.b])],Q);var $=c(65862),w=c(18001),l_=c(93614),m=c(90070),Y=c(97161);class ze{constructor(){this.kmsProviders=["vault"],this.authMethods=["token","agent"],this.secretEngines=["kv","transit"],this.sse_s3="AES256",this.sse_kms="aws:kms"}}var ie=(()=>{return(t=ie||(ie={})).ENABLED="Enabled",t.DISABLED="Disabled",ie;var t})(),se=(()=>{return(t=se||(se={})).ENABLED="Enabled",t.SUSPENDED="Suspended",se;var t})(),ae=c(62862),j=c(18372),X=c(60312),B=c(30839),k=c(87925),q=c(94276),z=c(56310),H=c(41582);function it(t,n){1&t&&(e.TgZ(0,"option",29),e.SDv(1,30),e.qZA()),2&t&&e.Q6J("ngValue",null)}function st(t,n){if(1&t&&(e.TgZ(0,"option",31),e._uU(1),e.qZA()),2&t){const _=n.$implicit;e.Q6J("value",_),e.xp6(1),e.Oqu(_)}}function at(t,n){1&t&&(e.TgZ(0,"span",32),e.SDv(1,33),e.qZA())}function lt(t,n){if(1&t&&(e.TgZ(0,"div")(1,"div",7)(2,"label",22),e.SDv(3,23),e.qZA(),e.TgZ(4,"div",24)(5,"select",25),e.YNc(6,it,2,1,"option",26),e.YNc(7,st,2,2,"option",27),e.qZA(),e.YNc(8,at,2,0,"span",28),e.qZA()()()),2&t){const _=e.oxw(),o=e.MAs(5);e.xp6(6),e.Q6J("ngIf",null!==_.kmsProviders),e.xp6(1),e.Q6J("ngForOf",_.kmsProviders),e.xp6(1),e.Q6J("ngIf",_.configForm.showError("kms_provider",o,"required"))}}function rt(t,n){if(1&t&&(e.TgZ(0,"option",31),e._uU(1),e.qZA()),2&t){const _=n.$implicit;e.Q6J("value",_),e.xp6(1),e.Oqu(_)}}function ct(t,n){1&t&&(e.TgZ(0,"span",32),e.SDv(1,37),e.qZA())}function dt(t,n){if(1&t&&(e.TgZ(0,"div")(1,"div",7)(2,"label",34),e.SDv(3,35),e.qZA(),e.TgZ(4,"div",24)(5,"select",36),e.YNc(6,rt,2,2,"option",27),e.qZA(),e.YNc(7,ct,2,0,"span",28),e.qZA()()()),2&t){const _=e.oxw(),o=e.MAs(5);e.xp6(6),e.Q6J("ngForOf",_.authMethods),e.xp6(1),e.Q6J("ngIf",_.configForm.showError("auth_method",o,"required"))}}function ut(t,n){if(1&t&&(e.TgZ(0,"option",31),e._uU(1),e.qZA()),2&t){const _=n.$implicit;e.Q6J("value",_),e.xp6(1),e.Oqu(_)}}function gt(t,n){1&t&&(e.TgZ(0,"span",32),e.SDv(1,41),e.qZA())}function Rt(t,n){if(1&t&&(e.TgZ(0,"div")(1,"div",7)(2,"label",38),e.SDv(3,39),e.qZA(),e.TgZ(4,"div",24)(5,"select",40),e.YNc(6,ut,2,2,"option",27),e.qZA(),e.YNc(7,gt,2,0,"span",28),e.qZA()()()),2&t){const _=e.oxw(),o=e.MAs(5);e.xp6(6),e.Q6J("ngForOf",_.secretEngines),e.xp6(1),e.Q6J("ngIf",_.configForm.showError("secret_engine",o,"required"))}}function Tt(t,n){1&t&&(e.TgZ(0,"span",32),e.SDv(1,45),e.qZA())}function Et(t,n){if(1&t&&(e.TgZ(0,"div")(1,"div",7)(2,"label",42),e.SDv(3,43),e.qZA(),e.TgZ(4,"div",24),e._UZ(5,"input",44),e.YNc(6,Tt,2,0,"span",28),e.qZA()()()),2&t){const _=e.oxw(),o=e.MAs(5);e.xp6(6),e.Q6J("ngIf",_.configForm.showError("secret_path",o,"required"))}}function ft(t,n){1&t&&(e.TgZ(0,"div")(1,"div",7)(2,"label",46),e.SDv(3,47),e.qZA(),e.TgZ(4,"div",24),e._UZ(5,"input",48),e.qZA()()())}function pt(t,n){1&t&&(e.TgZ(0,"span",32),e.SDv(1,52),e.qZA())}function mt(t,n){if(1&t&&(e.TgZ(0,"div")(1,"div",7)(2,"label",49),e.SDv(3,50),e.qZA(),e.TgZ(4,"div",24),e._UZ(5,"input",51),e.YNc(6,pt,2,0,"span",28),e.qZA()()()),2&t){const _=e.oxw(),o=e.MAs(5);e.xp6(6),e.Q6J("ngIf",_.configForm.showError("address",o,"required"))}}function Mt(t,n){1&t&&(e.TgZ(0,"span",32),e.SDv(1,57),e.qZA())}function St(t,n){if(1&t){const _=e.EpF();e.TgZ(0,"div",7)(1,"label",53)(2,"span"),e.SDv(3,54),e.qZA(),e.TgZ(4,"cd-helper"),e.SDv(5,55),e.qZA()(),e.TgZ(6,"div",24)(7,"input",56),e.NdJ("change",function(i){e.CHM(_);const s=e.oxw();return e.KtG(s.fileUpload(i.target.files,"token"))}),e.qZA(),e.YNc(8,Mt,2,0,"span",28),e.qZA()()}if(2&t){const _=e.oxw(),o=e.MAs(5);e.xp6(8),e.Q6J("ngIf",_.configForm.showError("token",o,"required"))}}function Ct(t,n){1&t&&(e.TgZ(0,"span",32),e.SDv(1,62),e.qZA())}function Ot(t,n){if(1&t){const _=e.EpF();e.TgZ(0,"div")(1,"div",7)(2,"label",58)(3,"span"),e.SDv(4,59),e.qZA(),e.TgZ(5,"cd-helper"),e.SDv(6,60),e.qZA()(),e.TgZ(7,"div",24)(8,"input",61),e.NdJ("change",function(i){e.CHM(_);const s=e.oxw();return e.KtG(s.fileUpload(i.target.files,"ssl_cert"))}),e.qZA(),e.YNc(9,Ct,2,0,"span",28),e.qZA()()()}if(2&t){const _=e.oxw(),o=e.MAs(5);e.xp6(9),e.Q6J("ngIf",_.configForm.showError("ssl_cert",o,"required"))}}function Ft(t,n){1&t&&(e.TgZ(0,"span",32),e.SDv(1,67),e.qZA())}function Pt(t,n){if(1&t){const _=e.EpF();e.TgZ(0,"div")(1,"div",7)(2,"label",63)(3,"span"),e.SDv(4,64),e.qZA(),e.TgZ(5,"cd-helper"),e.SDv(6,65),e.qZA()(),e.TgZ(7,"div",24)(8,"input",66),e.NdJ("change",function(i){e.CHM(_);const s=e.oxw();return e.KtG(s.fileUpload(i.target.files,"client_cert"))}),e.qZA(),e.YNc(9,Ft,2,0,"span",28),e.qZA()()()}if(2&t){const _=e.oxw(),o=e.MAs(5);e.xp6(9),e.Q6J("ngIf",_.configForm.showError("client_cert",o,"required"))}}function Nt(t,n){1&t&&(e.TgZ(0,"span",32),e.SDv(1,72),e.qZA())}function Gt(t,n){if(1&t){const _=e.EpF();e.TgZ(0,"div")(1,"div",7)(2,"label",68)(3,"span"),e.SDv(4,69),e.qZA(),e.TgZ(5,"cd-helper"),e.SDv(6,70),e.qZA()(),e.TgZ(7,"div",24)(8,"input",71),e.NdJ("change",function(i){e.CHM(_);const s=e.oxw();return e.KtG(s.fileUpload(i.target.files,"client_key"))}),e.qZA(),e.YNc(9,Nt,2,0,"span",28),e.qZA()()()}if(2&t){const _=e.oxw(),o=e.MAs(5);e.xp6(9),e.Q6J("ngIf",_.configForm.showError("client_key",o,"required"))}}let At=(()=>{class t{constructor(_,o,i,s,l,r,d){this.formBuilder=_,this.activeModal=o,this.router=i,this.actionLabels=s,this.rgwBucketService=l,this.rgwEncryptionModal=r,this.notificationService=d,this.vaultAddress=/^((https?:\/\/)|(www.))(?:([a-zA-Z]+)|(\d+\.\d+.\d+.\d+)):\d{4}$/,this.submitAction=new e.vpe,this.createForm()}ngOnInit(){this.kmsProviders=this.rgwEncryptionModal.kmsProviders,this.authMethods=this.rgwEncryptionModal.authMethods,this.secretEngines=this.rgwEncryptionModal.secretEngines}createForm(){this.configForm=this.formBuilder.group({address:[null,[a.kI.required,m.h.custom("vaultPattern",_=>!E().isEmpty(_)&&!this.vaultAddress.test(_))]],kms_provider:["vault",a.kI.required],encryptionType:["aws:kms",a.kI.required],auth_method:["token",a.kI.required],secret_engine:["kv",a.kI.required],secret_path:["/"],namespace:[null],token:[null,[m.h.requiredIf({auth_method:"token"})]],ssl_cert:[null,m.h.sslCert()],client_cert:[null,m.h.pemCert()],client_key:[null,m.h.sslPrivKey()],kmsEnabled:[{value:!1}],s3Enabled:[{value:!1}]})}fileUpload(_,o){const i=_[0];(new FileReader).addEventListener("load",()=>{const l=this.configForm.get(o);l.setValue(i),l.markAsDirty(),l.markAsTouched(),l.updateValueAndValidity()})}onSubmit(){const _=this.configForm.value;this.rgwBucketService.setEncryptionConfig(_.encryptionType,_.kms_provider,_.auth_method,_.secret_engine,_.secret_path,_.namespace,_.address,_.token,_.owner,_.ssl_cert,_.client_cert,_.client_key).subscribe({next:()=>{this.notificationService.show(w.k.success,"Updated RGW Encryption Configuration values")},error:o=>{this.notificationService.show(w.k.error,o),this.configForm.setErrors({cdSubmitButton:!0})},complete:()=>{this.activeModal.close(),this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.onSameUrlNavigation="reload",this.router.navigate([this.router.url])}})}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(ae.O),e.Y36(G.Kz),e.Y36(J.F0),e.Y36(I.p4),e.Y36(Ee.o),e.Y36(ze),e.Y36(Y.g))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-config-modal"]],outputs:{submitAction:"submitAction"},features:[e._Bn([ze])],decls:30,vars:14,consts:function(){let n,_,o,i,s,l,r,d,u,R,O,F,b,h,M,L,S,W,C,Z,D,U,v,y,f,P,N,te;return n="Update RGW Encryption Configurations",_="Encryption Type",o="SSE-S3 Encryption",i="SSE-KMS Encryption",s="Key management service provider",l="-- Select a provider --",r="This field is required.",d="Authentication Method",u="This field is required.",R="Secret Engine",O="This field is required.",F="Secret Path ",b="This field is required.",h="Namespace ",M="Vault Address ",L="This field is required.",S="Token",W=" The token authentication method expects a Vault token to be present in a plaintext file. ",C="This field is required.",Z="CA Certificate",D="The SSL certificate in PEM format.",U="This field is required.",v="Client Certificate",y="The Client certificate in PEM format.",f="This field is required.",P="Client Private Key",N="The Client Private Key in PEM format.",te="This field is required.",[[3,"modalRef"],[1,"modal-title"],n,[1,"modal-content"],["name","configForm",3,"formGroup"],["frm","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","encryptionType",1,"cd-col-form-label","required"],_,[1,"col-md-auto","custom-checkbox","form-check-inline","ms-3"],["formControlName","encryptionType","id","s3Enabled","type","radio","name","encryptionType","value","AES256",1,"form-check-input"],["for","s3Enabled",1,"custom-check-label"],o,[1,"col-md-auto","custom-checkbox","form-check-inline"],["formControlName","encryptionType","id","kmsEnabled","name","encryptionType","value","aws:kms","type","radio",1,"form-check-input"],["for","kmsEnabled",1,"custom-check-label"],i,[4,"ngIf"],["class","form-group row",4,"ngIf"],[1,"modal-footer"],[3,"submitText","form","submitActionEvent"],["for","kms_provider",1,"cd-col-form-label","required"],s,[1,"cd-col-form-input"],["id","kms_provider","name","kms_provider","formControlName","kms_provider",1,"form-select"],[3,"ngValue",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],["class","invalid-feedback",4,"ngIf"],[3,"ngValue"],l,[3,"value"],[1,"invalid-feedback"],r,["for","auth_method",1,"cd-col-form-label","required"],d,["id","auth_method","name","auth_method","formControlName","auth_method",1,"form-select"],u,["for","secret_engine",1,"cd-col-form-label","required"],R,["id","secret_engine","name","secret_engine","formControlName","secret_engine",1,"form-select"],O,["for","secret_path",1,"cd-col-form-label"],F,["id","secret_path","name","secret_path","type","text","formControlName","secret_path",1,"form-control"],b,["for","namespace",1,"cd-col-form-label"],h,["id","namespace","name","namespace","type","text","formControlName","namespace",1,"form-control"],["for","address",1,"cd-col-form-label","required"],M,["id","address","name","address","formControlName","address","placeholder","http://127.0.0.1:8000",1,"form-control"],L,["for","token",1,"cd-col-form-label","required"],S,W,["type","file","formControlName","token",3,"change"],C,["for","ssl_cert",1,"cd-col-form-label"],Z,D,["type","file","formControlName","ssl_cert",3,"change"],U,["for","client_cert",1,"cd-col-form-label"],v,y,["type","file","formControlName","client_cert",3,"change"],f,["for","client_key",1,"cd-col-form-label"],P,N,["type","file",3,"change"],te]},template:function(_,o){1&_&&(e.TgZ(0,"cd-modal",0),e.ynx(1,1),e.SDv(2,2),e.BQk(),e.ynx(3,3),e.TgZ(4,"form",4,5)(6,"div",6)(7,"div",7)(8,"label",8),e.SDv(9,9),e.qZA(),e.TgZ(10,"div",10),e._UZ(11,"input",11),e.TgZ(12,"label",12),e.SDv(13,13),e.qZA()(),e.TgZ(14,"div",14),e._UZ(15,"input",15),e.TgZ(16,"label",16),e.SDv(17,17),e.qZA()()(),e.YNc(18,lt,9,3,"div",18),e.YNc(19,dt,8,2,"div",18),e.YNc(20,Rt,8,2,"div",18),e.YNc(21,Et,7,1,"div",18),e.YNc(22,ft,6,0,"div",18),e.YNc(23,mt,7,1,"div",18),e.YNc(24,St,9,1,"div",19),e.YNc(25,Ot,10,1,"div",18),e.YNc(26,Pt,10,1,"div",18),e.YNc(27,Gt,10,1,"div",18),e.qZA(),e.TgZ(28,"div",20)(29,"cd-form-button-panel",21),e.NdJ("submitActionEvent",function(){return o.onSubmit()}),e.qZA()()(),e.BQk(),e.qZA()),2&_&&(e.Q6J("modalRef",o.activeModal),e.xp6(4),e.Q6J("formGroup",o.configForm),e.xp6(14),e.Q6J("ngIf","aws:kms"===o.configForm.getValue("encryptionType")||"AES256"===o.configForm.getValue("encryptionType")),e.xp6(1),e.Q6J("ngIf","aws:kms"===o.configForm.getValue("encryptionType")||"AES256"===o.configForm.getValue("encryptionType")),e.xp6(1),e.Q6J("ngIf","aws:kms"===o.configForm.getValue("encryptionType")||"AES256"===o.configForm.getValue("encryptionType")),e.xp6(1),e.Q6J("ngIf","aws:kms"===o.configForm.getValue("encryptionType")||"AES256"===o.configForm.getValue("encryptionType")),e.xp6(1),e.Q6J("ngIf","aws:kms"===o.configForm.getValue("encryptionType")||"AES256"===o.configForm.getValue("encryptionType")),e.xp6(1),e.Q6J("ngIf","aws:kms"===o.configForm.getValue("encryptionType")||"AES256"===o.configForm.getValue("encryptionType")),e.xp6(1),e.Q6J("ngIf","token"===o.configForm.getValue("auth_method")),e.xp6(1),e.Q6J("ngIf","aws:kms"===o.configForm.getValue("encryptionType")||"AES256"===o.configForm.getValue("encryptionType")),e.xp6(1),e.Q6J("ngIf","aws:kms"===o.configForm.getValue("encryptionType")||"AES256"===o.configForm.getValue("encryptionType")),e.xp6(1),e.Q6J("ngIf","aws:kms"===o.configForm.getValue("encryptionType")||"AES256"===o.configForm.getValue("encryptionType")),e.xp6(2),e.Q6J("submitText",o.actionLabels.SUBMIT)("form",o.configForm))},dependencies:[T.sg,T.O5,j.S,X.z,B.p,k.o,q.b,z.P,H.V,a._Y,a.YN,a.Kr,a.Fj,a.EJ,a._,a.JJ,a.JL,a.sg,a.u]}),t})();var ee=c(63285),fe=c(82945),r_=c(63622),_e=c(10545);function It(t,n){1&t&&(e.TgZ(0,"div",9)(1,"label",42),e.SDv(2,43),e.qZA(),e.TgZ(3,"div",12),e._UZ(4,"input",44),e.qZA()())}function bt(t,n){1&t&&(e.TgZ(0,"span",45),e.SDv(1,46),e.qZA())}function ht(t,n){1&t&&(e.TgZ(0,"span",45),e.SDv(1,47),e.qZA())}function Lt(t,n){1&t&&(e.TgZ(0,"span",45),e.SDv(1,48),e.qZA())}function Wt(t,n){1&t&&(e.TgZ(0,"span",45),e.SDv(1,49),e.qZA())}function $t(t,n){1&t&&(e.TgZ(0,"span",45),e.SDv(1,50),e.qZA())}function Zt(t,n){1&t&&(e.TgZ(0,"span",45),e.SDv(1,51),e.qZA())}function Dt(t,n){1&t&&(e.TgZ(0,"span",45),e.SDv(1,52),e.qZA())}function Ut(t,n){1&t&&(e.TgZ(0,"span",45),e.SDv(1,53),e.qZA())}function vt(t,n){1&t&&(e.TgZ(0,"option",54),e.SDv(1,55),e.qZA()),2&t&&e.Q6J("ngValue",null)}function yt(t,n){1&t&&(e.TgZ(0,"option",54),e.SDv(1,56),e.qZA()),2&t&&e.Q6J("ngValue",null)}function wt(t,n){if(1&t&&(e.TgZ(0,"option",57),e._uU(1),e.qZA()),2&t){const _=n.$implicit;e.Q6J("value",_),e.xp6(1),e.Oqu(_)}}function xt(t,n){1&t&&(e.TgZ(0,"span",45),e.SDv(1,58),e.qZA())}function kt(t,n){1&t&&(e.TgZ(0,"option",54),e.SDv(1,60),e.qZA()),2&t&&e.Q6J("ngValue",null)}function zt(t,n){1&t&&(e.TgZ(0,"option",54),e.SDv(1,61),e.qZA()),2&t&&e.Q6J("ngValue",null)}function qt(t,n){if(1&t&&(e.TgZ(0,"option",57),e._uU(1),e.qZA()),2&t){const _=n.$implicit;e.Q6J("value",_.name),e.xp6(1),e.Oqu(_.description)}}function Ht(t,n){1&t&&(e.TgZ(0,"span",45),e.SDv(1,62),e.qZA())}function Xt(t,n){if(1&t&&(e.TgZ(0,"select",59),e.YNc(1,kt,2,1,"option",18),e.YNc(2,zt,2,1,"option",18),e.YNc(3,qt,2,2,"option",19),e.qZA(),e.YNc(4,Ht,2,0,"span",14)),2&t){e.oxw();const _=e.MAs(2),o=e.oxw();e.xp6(1),e.Q6J("ngIf",null===o.placementTargets),e.xp6(1),e.Q6J("ngIf",null!==o.placementTargets),e.xp6(1),e.Q6J("ngForOf",o.placementTargets),e.xp6(1),e.Q6J("ngIf",o.bucketForm.showError("placement-target",_,"required"))}}function Bt(t,n){1&t&&(e.ynx(0),e._UZ(1,"input",63),e.BQk())}function Qt(t,n){if(1&t){const _=e.EpF();e.TgZ(0,"fieldset")(1,"legend",25),e.SDv(2,64),e.qZA(),e.TgZ(3,"div",9)(4,"div",27)(5,"div",28)(6,"input",65),e.NdJ("change",function(){e.CHM(_);const i=e.oxw(2);return e.KtG(i.setMfaDeleteValidators())}),e.qZA(),e.TgZ(7,"label",66),e.SDv(8,67),e.qZA(),e.TgZ(9,"cd-helper")(10,"span"),e.SDv(11,68),e.qZA()()()()()()}}function Yt(t,n){1&t&&(e.TgZ(0,"span",45),e.SDv(1,77),e.qZA())}function Jt(t,n){if(1&t&&(e.TgZ(0,"div",9)(1,"label",74),e.SDv(2,75),e.qZA(),e.TgZ(3,"div",12),e._UZ(4,"input",76),e.YNc(5,Yt,2,0,"span",14),e.qZA()()),2&t){e.oxw(2);const _=e.MAs(2),o=e.oxw();e.xp6(5),e.Q6J("ngIf",o.bucketForm.showError("mfa-token-serial",_,"required"))}}function Kt(t,n){1&t&&(e.TgZ(0,"span",45),e.SDv(1,81),e.qZA())}function Vt(t,n){if(1&t&&(e.TgZ(0,"div",9)(1,"label",78),e.SDv(2,79),e.qZA(),e.TgZ(3,"div",12),e._UZ(4,"input",80),e.YNc(5,Kt,2,0,"span",14),e.qZA()()),2&t){e.oxw(2);const _=e.MAs(2),o=e.oxw();e.xp6(5),e.Q6J("ngIf",o.bucketForm.showError("mfa-token-pin",_,"required"))}}function jt(t,n){if(1&t){const _=e.EpF();e.TgZ(0,"fieldset")(1,"legend",25),e.SDv(2,69),e.qZA(),e.TgZ(3,"div",9)(4,"div",27)(5,"div",28)(6,"input",70),e.NdJ("change",function(){e.CHM(_);const i=e.oxw(2);return e.KtG(i.setMfaDeleteValidators())}),e.qZA(),e.TgZ(7,"label",71),e.SDv(8,72),e.qZA(),e.TgZ(9,"cd-helper")(10,"span"),e.SDv(11,73),e.qZA()()()()(),e.YNc(12,Jt,6,1,"div",8),e.YNc(13,Vt,6,1,"div",8),e.qZA()}if(2&t){const _=e.oxw(2);e.xp6(12),e.Q6J("ngIf",_.areMfaCredentialsRequired()),e.xp6(1),e.Q6J("ngIf",_.areMfaCredentialsRequired())}}function eo(t,n){1&t&&(e.TgZ(0,"div",9)(1,"label",82),e.SDv(2,83),e.qZA(),e.TgZ(3,"div",12)(4,"select",84)(5,"option",85),e.SDv(6,86),e.qZA(),e.TgZ(7,"option",87),e.SDv(8,88),e.qZA()()()())}function _o(t,n){1&t&&(e.TgZ(0,"span",45),e.SDv(1,93),e.qZA())}function to(t,n){1&t&&(e.TgZ(0,"span",45),e.SDv(1,94),e.qZA())}function oo(t,n){if(1&t&&(e.TgZ(0,"div",9)(1,"label",89),e.ynx(2),e.SDv(3,90),e.BQk(),e.TgZ(4,"cd-helper"),e.SDv(5,91),e.qZA()(),e.TgZ(6,"div",12),e._UZ(7,"input",92),e.YNc(8,_o,2,0,"span",14),e.YNc(9,to,2,0,"span",14),e.qZA()()),2&t){e.oxw();const _=e.MAs(2),o=e.oxw();e.xp6(8),e.Q6J("ngIf",o.bucketForm.showError("lock_retention_period_days",_,"pattern")),e.xp6(1),e.Q6J("ngIf",o.bucketForm.showError("lock_retention_period_days",_,"lockDays"))}}function no(t,n){1&t&&(e.TgZ(0,"option",54),e.SDv(1,105),e.qZA()),2&t&&e.Q6J("ngValue",null)}function io(t,n){if(1&t&&(e.TgZ(0,"option",57),e._uU(1),e.qZA()),2&t){const _=n.$implicit;e.Q6J("value",_),e.xp6(1),e.Oqu(_)}}function so(t,n){1&t&&(e.TgZ(0,"span",45),e.SDv(1,106),e.qZA())}function ao(t,n){if(1&t&&(e.TgZ(0,"div")(1,"div",9)(2,"label",102),e.SDv(3,103),e.qZA(),e.TgZ(4,"div",12)(5,"select",104),e.YNc(6,no,2,1,"option",18),e.YNc(7,io,2,2,"option",19),e.qZA(),e.YNc(8,so,2,0,"span",14),e.qZA()()()),2&t){e.oxw(2);const _=e.MAs(2),o=e.oxw();e.xp6(5),e.Q6J("autofocus",o.editing),e.xp6(1),e.Q6J("ngIf",null!==o.kmsProviders),e.xp6(1),e.Q6J("ngForOf",o.kmsProviders),e.xp6(1),e.Q6J("ngIf",o.bucketForm.showError("kms_provider",_,"required"))}}function lo(t,n){1&t&&(e.TgZ(0,"span",45),e.SDv(1,110),e.qZA())}function ro(t,n){if(1&t&&(e.TgZ(0,"div")(1,"div",9)(2,"label",107),e.SDv(3,108),e.qZA(),e.TgZ(4,"div",12),e._UZ(5,"input",109),e.YNc(6,lo,2,0,"span",14),e.qZA()()()),2&t){e.oxw(2);const _=e.MAs(2),o=e.oxw();e.xp6(6),e.Q6J("ngIf",o.bucketForm.showError("keyId",_,"required"))}}function co(t,n){if(1&t&&(e.TgZ(0,"div")(1,"div",9)(2,"div",27)(3,"div",95),e._UZ(4,"input",96),e.TgZ(5,"label",97),e.SDv(6,98),e.qZA()()()(),e.TgZ(7,"div",9)(8,"div",27)(9,"div",95),e._UZ(10,"input",99),e.TgZ(11,"label",100),e.SDv(12,101),e.qZA()()()(),e.YNc(13,ao,9,4,"div",24),e.YNc(14,ro,7,1,"div",24),e.qZA()),2&t){const _=e.oxw(2);e.xp6(4),e.uIk("disabled",!_.s3VaultConfig||null),e.xp6(6),e.uIk("disabled",!_.kmsVaultConfig||null),e.xp6(3),e.Q6J("ngIf","aws:kms"===_.bucketForm.getValue("encryption_type")),e.xp6(1),e.Q6J("ngIf","aws:kms"===_.bucketForm.getValue("encryption_type"))}}const c_=function(t){return{required:t}};function uo(t,n){if(1&t){const _=e.EpF();e.TgZ(0,"div",1)(1,"form",2,3)(3,"div",4)(4,"div",5),e.SDv(5,6),e.ALo(6,"titlecase"),e.ALo(7,"upperFirst"),e.qZA(),e.TgZ(8,"div",7),e.YNc(9,It,5,0,"div",8),e.TgZ(10,"div",9)(11,"label",10),e.SDv(12,11),e.qZA(),e.TgZ(13,"div",12),e._UZ(14,"input",13),e.YNc(15,bt,2,0,"span",14),e.YNc(16,ht,2,0,"span",14),e.YNc(17,Lt,2,0,"span",14),e.YNc(18,Wt,2,0,"span",14),e.YNc(19,$t,2,0,"span",14),e.YNc(20,Zt,2,0,"span",14),e.YNc(21,Dt,2,0,"span",14),e.YNc(22,Ut,2,0,"span",14),e.qZA()(),e.TgZ(23,"div",9)(24,"label",15),e.SDv(25,16),e.qZA(),e.TgZ(26,"div",12)(27,"select",17),e.YNc(28,vt,2,1,"option",18),e.YNc(29,yt,2,1,"option",18),e.YNc(30,wt,2,2,"option",19),e.qZA(),e.YNc(31,xt,2,0,"span",14),e.qZA()(),e.TgZ(32,"div",9)(33,"label",20),e.SDv(34,21),e.qZA(),e.TgZ(35,"div",12),e.YNc(36,Xt,5,4,"ng-template",null,22,e.W1O),e.YNc(38,Bt,2,0,"ng-container",23),e.qZA()(),e.YNc(39,Qt,12,0,"fieldset",24),e.YNc(40,jt,14,2,"fieldset",24),e.TgZ(41,"fieldset")(42,"legend",25),e.SDv(43,26),e.qZA(),e.TgZ(44,"div",9)(45,"div",27)(46,"div",28),e._UZ(47,"input",29),e.TgZ(48,"label",30),e.SDv(49,31),e.qZA(),e.TgZ(50,"cd-helper")(51,"span"),e.SDv(52,32),e.qZA()()()()(),e.YNc(53,eo,9,0,"div",8),e.YNc(54,oo,10,2,"div",8),e.qZA(),e.TgZ(55,"fieldset")(56,"legend",25),e.SDv(57,33),e.qZA(),e.TgZ(58,"div",9)(59,"div",27)(60,"div",28),e._UZ(61,"input",34),e.TgZ(62,"label",35),e.SDv(63,36),e.qZA(),e.TgZ(64,"cd-helper",37)(65,"span"),e.tHW(66,38),e.TgZ(67,"a",39),e.NdJ("click",function(){e.CHM(_);const i=e.oxw();return e.KtG(i.openConfigModal())}),e.qZA(),e.N_p(),e.qZA()()()()(),e.YNc(68,co,15,4,"div",24),e.qZA()(),e.TgZ(69,"div",40)(70,"cd-form-button-panel",41),e.NdJ("submitActionEvent",function(){e.CHM(_);const i=e.oxw();return e.KtG(i.submit())}),e.ALo(71,"titlecase"),e.ALo(72,"upperFirst"),e.qZA()()()()()}if(2&t){const _=e.MAs(2),o=e.MAs(37),i=e.oxw();e.xp6(1),e.Q6J("formGroup",i.bucketForm),e.xp6(6),e.pQV(e.lcZ(6,31,i.action))(e.lcZ(7,33,i.resource)),e.QtT(5),e.xp6(2),e.Q6J("ngIf",i.editing),e.xp6(2),e.Q6J("ngClass",e.VKq(39,c_,!i.editing)),e.xp6(3),e.Q6J("readonly",i.editing)("autofocus",!i.editing),e.xp6(1),e.Q6J("ngIf",i.bucketForm.showError("bid",_,"required")),e.xp6(1),e.Q6J("ngIf",i.bucketForm.showError("bid",_,"bucketNameInvalid")),e.xp6(1),e.Q6J("ngIf",i.bucketForm.showError("bid",_,"bucketNameNotAllowed")),e.xp6(1),e.Q6J("ngIf",i.bucketForm.showError("bid",_,"containsUpperCase")),e.xp6(1),e.Q6J("ngIf",i.bucketForm.showError("bid",_,"lowerCaseOrNumber")),e.xp6(1),e.Q6J("ngIf",i.bucketForm.showError("bid",_,"ipAddress")),e.xp6(1),e.Q6J("ngIf",i.bucketForm.showError("bid",_,"onlyLowerCaseAndNumbers")),e.xp6(1),e.Q6J("ngIf",i.bucketForm.showError("bid",_,"shouldBeInRange")),e.xp6(5),e.Q6J("autofocus",i.editing),e.xp6(1),e.Q6J("ngIf",null===i.owners),e.xp6(1),e.Q6J("ngIf",null!==i.owners),e.xp6(1),e.Q6J("ngForOf",i.owners),e.xp6(1),e.Q6J("ngIf",i.bucketForm.showError("owner",_,"required")),e.xp6(2),e.Q6J("ngClass",e.VKq(41,c_,!i.editing)),e.xp6(5),e.Q6J("ngIf",i.editing)("ngIfElse",o),e.xp6(1),e.Q6J("ngIf",i.editing),e.xp6(1),e.Q6J("ngIf",i.editing),e.xp6(13),e.Q6J("ngIf",i.bucketForm.getValue("lock_enabled")),e.xp6(1),e.Q6J("ngIf",i.bucketForm.getValue("lock_enabled")),e.xp6(7),e.uIk("disabled",!i.kmsVaultConfig&&!i.s3VaultConfig||null),e.xp6(7),e.Q6J("ngIf",i.bucketForm.getValue("encryption_enabled")),e.xp6(2),e.Q6J("form",i.bucketForm)("submitText",e.lcZ(71,35,i.action)+" "+e.lcZ(72,37,i.resource))}}let d_=(()=>{class t extends l_.E{get isVersioningEnabled(){return this.bucketForm.getValue("versioning")}get isMfaDeleteEnabled(){return this.bucketForm.getValue("mfa-delete")}constructor(_,o,i,s,l,r,d,u,R,O,F){super(),this.route=_,this.router=o,this.formBuilder=i,this.rgwBucketService=s,this.rgwSiteService=l,this.modalService=r,this.rgwUserService=d,this.notificationService=u,this.rgwEncryptionModal=R,this.actionLabels=O,this.changeDetectorRef=F,this.editing=!1,this.owners=null,this.kmsProviders=null,this.placementTargets=[],this.isVersioningAlreadyEnabled=!1,this.isMfaDeleteAlreadyEnabled=!1,this.icons=$.P,this.kmsVaultConfig=!1,this.s3VaultConfig=!1,this.editing=this.router.url.startsWith(`/rgw/bucket/${I.MQ.EDIT}`),this.action=this.editing?this.actionLabels.EDIT:this.actionLabels.CREATE,this.resource="bucket",this.createForm()}ngAfterViewChecked(){this.changeDetectorRef.detectChanges()}createForm(){const _=this,o=m.h.custom("lockDays",()=>{if(!_.bucketForm||!E().get(_.bucketForm.getRawValue(),"lock_enabled"))return!1;const i=Number(_.bucketForm.getValue("lock_retention_period_days"));return!Number.isInteger(i)||0===i});this.bucketForm=this.formBuilder.group({id:[null],bid:[null,[a.kI.required],this.editing?[]:[m.h.bucketName(),m.h.bucketExistence(!1,this.rgwBucketService)]],owner:[null,[a.kI.required]],kms_provider:["vault"],"placement-target":[null,this.editing?[]:[a.kI.required]],versioning:[null],"mfa-delete":[null],"mfa-token-serial":[""],"mfa-token-pin":[""],lock_enabled:[{value:!1,disabled:this.editing}],encryption_enabled:[null],encryption_type:[null,[m.h.requiredIf({encryption_enabled:!0})]],keyId:[null,[m.h.requiredIf({encryption_type:"aws:kms",encryption_enabled:!0})]],lock_mode:["COMPLIANCE"],lock_retention_period_days:[0,[m.h.number(!1),o]]})}ngOnInit(){const _={owners:this.rgwUserService.enumerate()};this.kmsProviders=this.rgwEncryptionModal.kmsProviders,this.rgwBucketService.getEncryptionConfig().subscribe(o=>{this.kmsVaultConfig=o[0],this.s3VaultConfig=o[1],this.kmsVaultConfig&&this.s3VaultConfig?this.bucketForm.get("encryption_type").setValue(""):this.kmsVaultConfig?this.bucketForm.get("encryption_type").setValue("aws:kms"):this.s3VaultConfig?this.bucketForm.get("encryption_type").setValue("AES256"):this.bucketForm.get("encryption_type").setValue("")}),this.editing||(_.getPlacementTargets=this.rgwSiteService.get("placement-targets")),this.route.params.subscribe(o=>{if(o.hasOwnProperty("bid")){const i=decodeURIComponent(o.bid);_.getBid=this.rgwBucketService.get(i)}(0,ne.D)(_).subscribe(i=>{if(this.owners=i.owners.sort(),i.getPlacementTargets){const s=i.getPlacementTargets;this.zonegroup=s.zonegroup,E().forEach(s.placement_targets,l=>{l.description=`${l.name} (${"pool"}: ${l.data_pool})`,this.placementTargets.push(l)}),1===this.placementTargets.length&&this.bucketForm.get("placement-target").setValue(this.placementTargets[0].name)}if(i.getBid){const s=i.getBid,l=E().clone(this.bucketForm.getRawValue());let r=E().pick(s,E().keys(l));r.lock_retention_period_days=this.rgwBucketService.getLockDays(s),r["placement-target"]=s.placement_rule,r.versioning=s.versioning===se.ENABLED,r["mfa-delete"]=s.mfa_delete===ie.ENABLED,r.encryption_enabled="Enabled"===s.encryption,r=E().merge(l,r),this.bucketForm.setValue(r),this.editing&&(this.isVersioningAlreadyEnabled=this.isVersioningEnabled,this.isMfaDeleteAlreadyEnabled=this.isMfaDeleteEnabled,this.setMfaDeleteValidators(),r.lock_enabled&&this.bucketForm.controls.versioning.disable())}this.loadingReady()})})}goToListView(){this.router.navigate(["/rgw/bucket"])}submit(){if(null==this.bucketForm.getValue("encryption_enabled")&&(this.bucketForm.get("encryption_enabled").setValue(!1),this.bucketForm.get("encryption_type").setValue(null)),this.bucketForm.pristine)return void this.goToListView();const _=this.bucketForm.value;if(this.editing){const o=this.getVersioningStatus(),i=this.getMfaDeleteStatus();this.rgwBucketService.update(_.bid,_.id,_.owner,o,_.encryption_enabled,_.encryption_type,_.keyId,i,_["mfa-token-serial"],_["mfa-token-pin"],_.lock_mode,_.lock_retention_period_days).subscribe(()=>{this.notificationService.show(w.k.success,"Updated Object Gateway bucket '" + _.bid + "'."),this.goToListView()},()=>{this.bucketForm.setErrors({cdSubmitButton:!0})})}else this.rgwBucketService.create(_.bid,_.owner,this.zonegroup,_["placement-target"],_.lock_enabled,_.lock_mode,_.lock_retention_period_days,_.encryption_enabled,_.encryption_type,_.keyId).subscribe(()=>{this.notificationService.show(w.k.success,"Created Object Gateway bucket '" + _.bid + "'"),this.goToListView()},()=>{this.bucketForm.setErrors({cdSubmitButton:!0})})}areMfaCredentialsRequired(){return this.isMfaDeleteEnabled!==this.isMfaDeleteAlreadyEnabled||this.isMfaDeleteAlreadyEnabled&&this.isVersioningEnabled!==this.isVersioningAlreadyEnabled}setMfaDeleteValidators(){const _=this.bucketForm.get("mfa-token-serial"),o=this.bucketForm.get("mfa-token-pin");this.areMfaCredentialsRequired()?(_.setValidators(a.kI.required),o.setValidators(a.kI.required)):(_.setValidators(null),o.setValidators(null)),_.updateValueAndValidity(),o.updateValueAndValidity()}getVersioningStatus(){return this.isVersioningEnabled?se.ENABLED:se.SUSPENDED}getMfaDeleteStatus(){return this.isMfaDeleteEnabled?ie.ENABLED:ie.DISABLED}fileUpload(_,o){const i=_[0];(new FileReader).addEventListener("load",()=>{const l=this.bucketForm.get(o);l.setValue(i),l.markAsDirty(),l.markAsTouched(),l.updateValueAndValidity()})}openConfigModal(){this.modalService.show(At,null,{size:"lg"}).componentInstance.configForm.get("encryptionType").setValue(this.bucketForm.getValue("encryption_type")||"AES256")}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(J.gz),e.Y36(J.F0),e.Y36(ae.O),e.Y36(Ee.o),e.Y36(n_.I),e.Y36(ee.Z),e.Y36(Q),e.Y36(Y.g),e.Y36(ze),e.Y36(I.p4),e.Y36(e.sBO))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-bucket-form"]],features:[e._Bn([ze]),e.qOj],decls:1,vars:1,consts:function(){let n,_,o,i,s,l,r,d,u,R,O,F,b,h,M,L,S,W,C,Z,D,U,v,y,f,P,N,te,A,Me,Se,Ce,Oe,Fe,Pe,Ne,Ge,Ae,Ie,be,he,Le,We,$e,Ze,De,Ue,ve,ye,we;return n="" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",_="Name",o="Name...",i="Owner",s="Placement target",l="Locking",r="Enabled",d="Enables locking for the objects in the bucket. Locking can only be enabled while creating a bucket.",u="Security",R="Encryption",O="Enables encryption for the objects in the bucket. To enable encryption on a bucket you need to set the configuration values for SSE-S3 or SSE-KMS. To set the configuration values " + "\ufffd#67\ufffd" + "Click here" + "\ufffd/#67\ufffd" + "",F="Id",b="This field is required.",h="Bucket names can only contain lowercase letters, numbers, periods and hyphens.",M="The chosen name is already in use.",L="Bucket names must not contain uppercase characters or underscores.",S="Each label must start and end with a lowercase letter or a number.",W="Bucket names cannot be formatted as IP address.",C="Bucket labels cannot be empty and can only contain lowercase letters, numbers and hyphens.",Z="Bucket names must be 3 to 63 characters long.",D="Loading...",U="-- Select a user --",v="This field is required.",y="Loading...",f="-- Select a placement target --",P="This field is required.",N="Versioning",te="Enabled",A="Enables versioning for the objects in the bucket.",Me="Multi-Factor Authentication",Se="Delete enabled",Ce="Enables MFA (multi-factor authentication) Delete, which requires additional authentication for changing the bucket versioning state.",Oe="Token Serial Number",Fe="This field is required.",Pe="Token PIN",Ne="This field is required.",Ge="Mode",Ae="Compliance",Ie="Governance",be="Days",he="The number of days that you want to specify for the default retention period that will be applied to new objects placed in this bucket.",Le="The entered value must be a positive integer.",We="Retention Days must be a positive integer.",$e="SSE-S3 Encryption",Ze="Connect to an external key management service",De="KMS Provider",Ue="-- Select a provider --",ve="This field is required.",ye="Key Id ",we="This field is required.",[["class","cd-col-form",4,"cdFormLoading"],[1,"cd-col-form"],["name","bucketForm","novalidate","",3,"formGroup"],["frm","ngForm"],[1,"card"],[1,"card-header"],n,[1,"card-body"],["class","form-group row",4,"ngIf"],[1,"form-group","row"],["for","bid",1,"cd-col-form-label",3,"ngClass"],_,[1,"cd-col-form-input"],["id","bid","name","bid","type","text","placeholder",o,"formControlName","bid",1,"form-control",3,"readonly","autofocus"],["class","invalid-feedback",4,"ngIf"],["for","owner",1,"cd-col-form-label","required"],i,["id","owner","name","owner","formControlName","owner",1,"form-select",3,"autofocus"],[3,"ngValue",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],["for","placement-target",1,"cd-col-form-label",3,"ngClass"],s,["placementTargetSelect",""],[4,"ngIf","ngIfElse"],[4,"ngIf"],[1,"cd-header"],l,[1,"cd-col-form-offset"],[1,"custom-control","custom-checkbox"],["id","lock_enabled","formControlName","lock_enabled","type","checkbox",1,"custom-control-input"],["for","lock_enabled",1,"custom-control-label"],r,d,u,["id","encryption_enabled","name","encryption_enabled","formControlName","encryption_enabled","type","checkbox",1,"form-check-input"],["for","encryption_enabled",1,"form-check-label"],R,["aria-label","toggle encryption helper"],O,["href","#/rgw/bucket/create","aria-label","click here",3,"click"],[1,"card-footer"],["wrappingClass","text-right",3,"form","submitText","submitActionEvent"],["for","id",1,"cd-col-form-label"],F,["id","id","name","id","type","text","formControlName","id","readonly","",1,"form-control"],[1,"invalid-feedback"],b,h,M,L,S,W,C,Z,[3,"ngValue"],D,U,[3,"value"],v,["id","placement-target","name","placement-target","formControlName","placement-target",1,"form-select"],y,f,P,["id","placement-target","name","placement-target","formControlName","placement-target","type","text","readonly","",1,"form-control"],N,["type","checkbox","id","versioning","name","versioning","formControlName","versioning",1,"custom-control-input",3,"change"],["for","versioning",1,"custom-control-label"],te,A,Me,["type","checkbox","id","mfa-delete","name","mfa-delete","formControlName","mfa-delete",1,"custom-control-input",3,"change"],["for","mfa-delete",1,"custom-control-label"],Se,Ce,["for","mfa-token-serial",1,"cd-col-form-label"],Oe,["type","text","id","mfa-token-serial","name","mfa-token-serial","formControlName","mfa-token-serial",1,"form-control"],Fe,["for","mfa-token-pin",1,"cd-col-form-label"],Pe,["type","text","id","mfa-token-pin","name","mfa-token-pin","formControlName","mfa-token-pin",1,"form-control"],Ne,["for","lock_mode",1,"cd-col-form-label"],Ge,["formControlName","lock_mode","name","lock_mode","id","lock_mode",1,"form-select"],["value","COMPLIANCE"],Ae,["value","GOVERNANCE"],Ie,["for","lock_retention_period_days",1,"cd-col-form-label"],be,he,["type","number","id","lock_retention_period_days","formControlName","lock_retention_period_days","min","0",1,"form-control"],Le,We,[1,"custom-control","custom-radio","custom-control-inline","ps-5"],["formControlName","encryption_type","id","sse_S3_enabled","type","radio","name","encryption_type","value","AES256",1,"form-check-input"],["for","sse_S3_enabled",1,"form-control-label"],$e,["formControlName","encryption_type","id","kms_enabled","name","encryption_type","value","aws:kms","type","radio",1,"form-check-input"],["for","kms_enabled",1,"form-control-label"],Ze,["for","kms_provider",1,"cd-col-form-label","required"],De,["id","kms_provider","name","kms_provider","formControlName","kms_provider",1,"form-select",3,"autofocus"],Ue,ve,["for","keyId",1,"cd-col-form-label","required"],ye,["id","keyId","name","keyId","type","text","formControlName","keyId",1,"form-control"],we]},template:function(_,o){1&_&&e.YNc(0,uo,73,43,"div",0),2&_&&e.Q6J("cdFormLoading",o.loading)},dependencies:[T.mk,T.sg,T.O5,j.S,B.p,fe.U,r_.y,k.o,q.b,z.P,H.V,a._Y,a.YN,a.Kr,a.Fj,a.wV,a.Wl,a.EJ,a._,a.JJ,a.JL,a.qQ,a.sg,a.u,T.rS,_e.m]}),t})();var u_=c(70882),Be=c(68136),Qe=c(30982),le=c(59019),qe=c(68774),Ye=c(47557),g_=c(66369),re=c(51847),ce=c(47640),R_=c(60251),Je=c(94928),T_=c(68962),go=c(96102);function Ro(t,n){1&t&&(e.TgZ(0,"td"),e.SDv(1,17),e.qZA())}function To(t,n){if(1&t&&(e.TgZ(0,"td"),e._uU(1),e.ALo(2,"dimless"),e.qZA()),2&t){const _=e.oxw(3);e.xp6(1),e.hij(" ",e.lcZ(2,1,_.selection.bucket_quota.max_size)," ")}}function Eo(t,n){1&t&&(e.TgZ(0,"td"),e.SDv(1,18),e.qZA())}function fo(t,n){if(1&t&&(e.TgZ(0,"td"),e._uU(1),e.qZA()),2&t){const _=e.oxw(3);e.xp6(1),e.hij(" ",_.selection.bucket_quota.max_objects," ")}}function po(t,n){if(1&t&&(e.ynx(0),e.TgZ(1,"tr")(2,"td",5),e.SDv(3,15),e.qZA(),e.YNc(4,Ro,2,0,"td",0),e.YNc(5,To,3,3,"td",0),e.qZA(),e.TgZ(6,"tr")(7,"td",5),e.SDv(8,16),e.qZA(),e.YNc(9,Eo,2,0,"td",0),e.YNc(10,fo,2,1,"td",0),e.qZA(),e.BQk()),2&t){const _=e.oxw(2);e.xp6(4),e.Q6J("ngIf",_.selection.bucket_quota.max_size<=-1),e.xp6(1),e.Q6J("ngIf",_.selection.bucket_quota.max_size>-1),e.xp6(4),e.Q6J("ngIf",_.selection.bucket_quota.max_objects<=-1),e.xp6(1),e.Q6J("ngIf",_.selection.bucket_quota.max_objects>-1)}}function mo(t,n){if(1&t&&(e.ynx(0),e.TgZ(1,"tr")(2,"td",5),e.SDv(3,19),e.qZA(),e.TgZ(4,"td"),e._uU(5),e.qZA()(),e.TgZ(6,"tr")(7,"td",5),e.SDv(8,20),e.qZA(),e.TgZ(9,"td"),e._uU(10),e.qZA()(),e.BQk()),2&t){const _=e.oxw(2);e.xp6(5),e.Oqu(_.selection.lock_mode),e.xp6(5),e.Oqu(_.selection.lock_retention_period_days)}}function Mo(t,n){if(1&t&&(e.ynx(0),e.TgZ(1,"table",1)(2,"tbody")(3,"tr")(4,"td",2),e.SDv(5,3),e.qZA(),e.TgZ(6,"td",4),e._uU(7),e.qZA()(),e.TgZ(8,"tr")(9,"td",5),e.SDv(10,6),e.qZA(),e.TgZ(11,"td"),e._uU(12),e.qZA()(),e.TgZ(13,"tr")(14,"td",5),e.SDv(15,7),e.qZA(),e.TgZ(16,"td"),e._uU(17),e.qZA()(),e.TgZ(18,"tr")(19,"td",5),e.SDv(20,8),e.qZA(),e.TgZ(21,"td"),e._uU(22),e.qZA()(),e.TgZ(23,"tr")(24,"td",5),e.SDv(25,9),e.qZA(),e.TgZ(26,"td"),e._uU(27),e.qZA()(),e.TgZ(28,"tr")(29,"td",5),e.SDv(30,10),e.qZA(),e.TgZ(31,"td"),e._uU(32),e.ALo(33,"cdDate"),e.qZA()()()(),e.TgZ(34,"div")(35,"legend"),e.SDv(36,11),e.qZA(),e.TgZ(37,"table",1)(38,"tbody")(39,"tr")(40,"td",2),e.SDv(41,12),e.qZA(),e.TgZ(42,"td",4),e._uU(43),e.ALo(44,"booleanText"),e.qZA()(),e.YNc(45,po,11,4,"ng-container",0),e.qZA()()(),e.TgZ(46,"legend"),e.SDv(47,13),e.qZA(),e.TgZ(48,"table",1)(49,"tbody")(50,"tr")(51,"td",2),e.SDv(52,14),e.qZA(),e.TgZ(53,"td",4),e._uU(54),e.ALo(55,"booleanText"),e.qZA()(),e.YNc(56,mo,11,2,"ng-container",0),e.qZA()(),e.BQk()),2&t){const _=e.oxw();e.xp6(7),e.Oqu(_.selection.versioning),e.xp6(5),e.Oqu(_.selection.encryption),e.xp6(5),e.Oqu(_.selection.mfa_delete),e.xp6(5),e.Oqu(_.selection.index_type),e.xp6(5),e.Oqu(_.selection.placement_rule),e.xp6(5),e.Oqu(e.lcZ(33,10,_.selection.mtime)),e.xp6(11),e.Oqu(e.lcZ(44,12,_.selection.bucket_quota.enabled)),e.xp6(2),e.Q6J("ngIf",_.selection.bucket_quota.enabled),e.xp6(9),e.Oqu(e.lcZ(55,14,_.selection.lock_enabled)),e.xp6(2),e.Q6J("ngIf",_.selection.lock_enabled)}}let So=(()=>{class t{constructor(_){this.rgwBucketService=_}ngOnChanges(){this.selection&&this.rgwBucketService.get(this.selection.bid).subscribe(_=>{_.lock_retention_period_days=this.rgwBucketService.getLockDays(_),this.selection=_})}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(Ee.o))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-bucket-details"]],inputs:{selection:"selection"},features:[e.TTD],decls:1,vars:1,consts:function(){let n,_,o,i,s,l,r,d,u,R,O,F,b,h,M,L;return n="Versioning",_="Encryption",o="MFA Delete",i="Index type",s="Placement rule",l="Last modification time",r="Bucket quota",d="Enabled",u="Locking",R="Enabled",O="Maximum size",F="Maximum objects",b="Unlimited",h="Unlimited",M="Mode",L="Days",[[4,"ngIf"],[1,"table","table-striped","table-bordered"],[1,"bold","w-25"],n,[1,"w-75"],[1,"bold"],_,o,i,s,l,r,d,u,R,O,F,b,h,M,L]},template:function(_,o){1&_&&e.YNc(0,Mo,57,16,"ng-container",0),2&_&&e.Q6J("ngIf",o.selection)},dependencies:[T.O5,T_.T,g_.n,go.N],styles:["table[_ngcontent-%COMP%]{table-layout:fixed}table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{word-wrap:break-word}"]}),t})();const Co=["bucketSizeTpl"],Oo=["bucketObjectTpl"];function Fo(t,n){if(1&t&&e._UZ(0,"cd-usage-bar",8),2&t){const _=e.oxw().row;e.Q6J("total",_.bucket_quota.max_size)("used",_.bucket_size)}}function Po(t,n){1&t&&e.SDv(0,9)}function No(t,n){if(1&t&&(e.YNc(0,Fo,1,2,"cd-usage-bar",6),e.YNc(1,Po,1,0,"ng-template",null,7,e.W1O)),2&t){const _=n.row,o=e.MAs(2);e.Q6J("ngIf",_.bucket_quota.max_size>0&&_.bucket_quota.enabled)("ngIfElse",o)}}function Go(t,n){if(1&t&&e._UZ(0,"cd-usage-bar",12),2&t){const _=e.oxw().row;e.Q6J("total",_.bucket_quota.max_objects)("used",_.num_objects)("isBinary",!1)}}function Ao(t,n){1&t&&e.SDv(0,13)}function Io(t,n){if(1&t&&(e.YNc(0,Go,1,3,"cd-usage-bar",10),e.YNc(1,Ao,1,0,"ng-template",null,11,e.W1O)),2&t){const _=n.row,o=e.MAs(2);e.Q6J("ngIf",_.bucket_quota.max_objects>0&&_.bucket_quota.enabled)("ngIfElse",o)}}let ho=(()=>{class t extends Be.o{constructor(_,o,i,s,l,r,d,u){super(u),this.authStorageService=_,this.dimlessBinaryPipe=o,this.dimlessPipe=i,this.rgwBucketService=s,this.modalService=l,this.urlBuilder=r,this.actionLabels=d,this.ngZone=u,this.columns=[],this.buckets=[],this.selection=new qe.r}ngOnInit(){this.permission=this.authStorageService.getPermissions().rgw,this.columns=[{name:"Name",prop:"bid",flexGrow:2},{name:"Owner",prop:"owner",flexGrow:2.5},{name:"Used Capacity",prop:"bucket_size",flexGrow:.6,pipe:this.dimlessBinaryPipe},{name:"Capacity Limit %",prop:"size_usage",cellTemplate:this.bucketSizeTpl,flexGrow:.8},{name:"Objects",prop:"num_objects",flexGrow:.6,pipe:this.dimlessPipe},{name:"Object Limit %",prop:"object_usage",cellTemplate:this.bucketObjectTpl,flexGrow:.8}];const _=()=>this.selection.first()&&`${encodeURIComponent(this.selection.first().bid)}`;this.tableActions=[{permission:"create",icon:$.P.add,routerLink:()=>this.urlBuilder.getCreate(),name:this.actionLabels.CREATE,canBePrimary:l=>!l.hasSelection},{permission:"update",icon:$.P.edit,routerLink:()=>this.urlBuilder.getEdit(_()),name:this.actionLabels.EDIT},{permission:"delete",icon:$.P.destroy,click:()=>this.deleteAction(),disable:()=>!this.selection.hasSelection,name:this.actionLabels.DELETE,canBePrimary:l=>l.hasMultiSelection}],this.setTableRefreshTimeout()}transformBucketData(){E().forEach(this.buckets,_=>{const o=_.bucket_quota.max_size,i=_.bucket_quota.max_objects;_.bucket_size=0,_.num_objects=0,E().isEmpty(_.usage)||(_.bucket_size=_.usage["rgw.main"].size_actual,_.num_objects=_.usage["rgw.main"].num_objects),_.size_usage=o>0?_.bucket_size/o:void 0,_.object_usage=i>0?_.num_objects/i:void 0})}getBucketList(_){this.setTableRefreshTimeout(),this.rgwBucketService.list(!0).subscribe(o=>{this.buckets=o,this.transformBucketData()},()=>{_.error()})}updateSelection(_){this.selection=_}deleteAction(){this.modalService.show(Qe.M,{itemDescription:this.selection.hasSingleSelection?"bucket":"buckets",itemNames:this.selection.selected.map(_=>_.bid),submitActionObservable:()=>new u_.y(_=>{(0,ne.D)(this.selection.selected.map(o=>this.rgwBucketService.delete(o.bid))).subscribe({error:o=>{_.error(o),this.table.refreshBtn()},complete:()=>{_.complete(),this.table.refreshBtn()}})})})}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(ce.j),e.Y36(Ye.$),e.Y36(g_.n),e.Y36(Ee.o),e.Y36(ee.Z),e.Y36(re.F),e.Y36(I.p4),e.Y36(e.R0b))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-bucket-list"]],viewQuery:function(_,o){if(1&_&&(e.Gf(le.a,7),e.Gf(Co,7),e.Gf(Oo,7)),2&_){let i;e.iGM(i=e.CRH())&&(o.table=i.first),e.iGM(i=e.CRH())&&(o.bucketSizeTpl=i.first),e.iGM(i=e.CRH())&&(o.bucketObjectTpl=i.first)}},features:[e._Bn([{provide:re.F,useValue:new re.F("rgw/bucket")}]),e.qOj],decls:8,vars:9,consts:function(){let n,_;return n="No Limit",_="No Limit",[["columnMode","flex","selectionType","multiClick","identifier","bid",3,"autoReload","data","columns","hasDetails","status","setExpandedRow","updateSelection","fetchData"],["table",""],[1,"table-actions",3,"permission","selection","tableActions"],["cdTableDetail","",3,"selection"],["bucketSizeTpl",""],["bucketObjectTpl",""],[3,"total","used",4,"ngIf","ngIfElse"],["noSizeQuota",""],[3,"total","used"],n,[3,"total","used","isBinary",4,"ngIf","ngIfElse"],["noObjectQuota",""],[3,"total","used","isBinary"],_]},template:function(_,o){1&_&&(e.TgZ(0,"cd-table",0,1),e.NdJ("setExpandedRow",function(s){return o.setExpandedRow(s)})("updateSelection",function(s){return o.updateSelection(s)})("fetchData",function(s){return o.getBucketList(s)}),e._UZ(2,"cd-table-actions",2)(3,"cd-rgw-bucket-details",3),e.qZA(),e.YNc(4,No,3,2,"ng-template",null,4,e.W1O),e.YNc(6,Io,3,2,"ng-template",null,5,e.W1O)),2&_&&(e.Q6J("autoReload",!1)("data",o.buckets)("columns",o.columns)("hasDetails",!0)("status",o.tableStatus),e.xp6(2),e.Q6J("permission",o.permission)("selection",o.selection)("tableActions",o.tableActions),e.xp6(1),e.Q6J("selection",o.expandedRow))},dependencies:[T.O5,R_.O,le.a,Je.K,So]}),t})();var Lo=c(58111),E_=c(76317),f_=c(61350),Wo=c(59376),$o=c(60351);function Zo(t,n){if(1&t){const _=e.EpF();e.TgZ(0,"cd-table-key-value",11),e.NdJ("fetchData",function(){e.CHM(_);const i=e.oxw(2);return e.KtG(i.getMetaData())}),e.qZA()}if(2&t){const _=e.oxw(2);e.Q6J("data",_.metadata)}}function Do(t,n){if(1&t&&e._UZ(0,"cd-table-performance-counter",12),2&t){const _=e.oxw(2);e.Q6J("serviceId",_.serviceMapId)}}function Uo(t,n){if(1&t&&e._UZ(0,"cd-grafana",15),2&t){const _=e.oxw(3);e.Q6J("grafanaPath","rgw-instance-detail?var-rgw_servers=rgw."+_.serviceId)("type","metrics")}}function vo(t,n){1&t&&(e.ynx(0,13),e.TgZ(1,"a",4),e.SDv(2,14),e.qZA(),e.YNc(3,Uo,1,2,"ng-template",6),e.BQk())}function yo(t,n){if(1&t&&(e.ynx(0),e.TgZ(1,"nav",1,2),e.ynx(3,3),e.TgZ(4,"a",4),e.SDv(5,5),e.qZA(),e.YNc(6,Zo,1,1,"ng-template",6),e.BQk(),e.ynx(7,7),e.TgZ(8,"a",4),e.SDv(9,8),e.qZA(),e.YNc(10,Do,1,1,"ng-template",6),e.BQk(),e.YNc(11,vo,4,0,"ng-container",9),e.qZA(),e._UZ(12,"div",10),e.BQk()),2&t){const _=e.MAs(2),o=e.oxw();e.xp6(11),e.Q6J("ngIf",o.grafanaPermission.read),e.xp6(1),e.Q6J("ngbNavOutlet",_)}}let wo=(()=>{class t{constructor(_,o){this.rgwDaemonService=_,this.authStorageService=o,this.serviceId="",this.serviceMapId="",this.grafanaPermission=this.authStorageService.getPermissions().grafana}ngOnChanges(){this.selection&&(this.serviceId=this.selection.id,this.serviceMapId=this.selection.service_map_id)}getMetaData(){E().isEmpty(this.serviceId)||this.rgwDaemonService.get(this.serviceId).subscribe(_=>{this.metadata=_.rgw_metadata})}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(oe.b),e.Y36(ce.j))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-daemon-details"]],inputs:{selection:"selection"},features:[e.TTD],decls:1,vars:1,consts:function(){let n,_,o,i;return n="Details",_="Performance Counters",o="Performance Details",i="RGW instance details",[[4,"ngIf"],["ngbNav","","cdStatefulTab","rgw-daemon-details",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem","details"],["ngbNavLink",""],n,["ngbNavContent",""],["ngbNavItem","performance-counters"],_,["ngbNavItem","performance-details",4,"ngIf"],[3,"ngbNavOutlet"],[3,"data","fetchData"],["serviceType","rgw",3,"serviceId"],["ngbNavItem","performance-details"],o,["title",i,"uid","x5ARzZtmk","grafanaStyle","one",3,"grafanaPath","type"]]},template:function(_,o){1&_&&e.YNc(0,yo,13,2,"ng-container",0),2&_&&e.Q6J("ngIf",o.selection)},dependencies:[T.O5,E_.F,f_.b,Wo.m,$o.p,G.uN,G.Pz,G.nv,G.Vx,G.tO,G.Dy]}),t})();function xo(t,n){if(1&t){const _=e.EpF();e.TgZ(0,"cd-table",8),e.NdJ("setExpandedRow",function(i){e.CHM(_);const s=e.oxw();return e.KtG(s.setExpandedRow(i))})("fetchData",function(i){e.CHM(_);const s=e.oxw();return e.KtG(s.getDaemonList(i))}),e._UZ(1,"cd-rgw-daemon-details",9),e.qZA()}if(2&t){const _=e.oxw();e.Q6J("data",_.daemons)("columns",_.columns)("hasDetails",!0),e.xp6(1),e.Q6J("selection",_.expandedRow)}}function ko(t,n){1&t&&e._UZ(0,"cd-grafana",11),2&t&&e.Q6J("grafanaPath","rgw-overview?")("type","metrics")}function zo(t,n){1&t&&(e.ynx(0,2),e.TgZ(1,"a",3),e.SDv(2,10),e.qZA(),e.YNc(3,ko,1,2,"ng-template",5),e.BQk())}function qo(t,n){1&t&&e._UZ(0,"cd-grafana",13),2&t&&e.Q6J("grafanaPath","radosgw-sync-overview?")("type","metrics")}function Ho(t,n){1&t&&(e.ynx(0,2),e.TgZ(1,"a",3),e.SDv(2,12),e.qZA(),e.YNc(3,qo,1,2,"ng-template",5),e.BQk())}let Xo=(()=>{class t extends Be.o{constructor(_,o,i,s){super(),this.rgwDaemonService=_,this.authStorageService=o,this.cephShortVersionPipe=i,this.rgwSiteService=s,this.columns=[],this.daemons=[],this.updateDaemons=l=>{this.daemons=l}}ngOnInit(){this.grafanaPermission=this.authStorageService.getPermissions().grafana,this.columns=[{name:"ID",prop:"id",flexGrow:2},{name:"Hostname",prop:"server_hostname",flexGrow:2},{name:"Port",prop:"port",flexGrow:1},{name:"Realm",prop:"realm_name",flexGrow:2},{name:"Zone Group",prop:"zonegroup_name",flexGrow:2},{name:"Zone",prop:"zone_name",flexGrow:2},{name:"Version",prop:"version",flexGrow:1,pipe:this.cephShortVersionPipe}],this.rgwSiteService.get("realms").subscribe(_=>this.isMultiSite=_.length>0)}getDaemonList(_){this.rgwDaemonService.list().subscribe(this.updateDaemons,()=>{_.error()})}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(oe.b),e.Y36(ce.j),e.Y36(Lo.F),e.Y36(n_.I))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-daemon-list"]],features:[e.qOj],decls:9,vars:3,consts:function(){let n,_,o,i,s;return n="Gateways List",_="Overall Performance",o="RGW overview",i="Sync Performance",s="Radosgw sync overview",[["ngbNav","",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem",""],["ngbNavLink",""],n,["ngbNavContent",""],["ngbNavItem","",4,"ngIf"],[3,"ngbNavOutlet"],["columnMode","flex",3,"data","columns","hasDetails","setExpandedRow","fetchData"],["cdTableDetail","",3,"selection"],_,["title",o,"uid","WAkugZpiz","grafanaStyle","two",3,"grafanaPath","type"],i,["title",s,"uid","rgw-sync-overview","grafanaStyle","two",3,"grafanaPath","type"]]},template:function(_,o){if(1&_&&(e.TgZ(0,"nav",0,1),e.ynx(2,2),e.TgZ(3,"a",3),e.SDv(4,4),e.qZA(),e.YNc(5,xo,2,4,"ng-template",5),e.BQk(),e.YNc(6,zo,4,0,"ng-container",6),e.YNc(7,Ho,4,0,"ng-container",6),e.qZA(),e._UZ(8,"div",7)),2&_){const i=e.MAs(1);e.xp6(6),e.Q6J("ngIf",o.grafanaPermission.read),e.xp6(1),e.Q6J("ngIf",o.grafanaPermission.read&&o.isMultiSite),e.xp6(1),e.Q6J("ngbNavOutlet",i)}},dependencies:[T.O5,E_.F,le.a,G.uN,G.Pz,G.nv,G.Vx,G.tO,G.Dy,wo]}),t})();var Bo=c(6481),Ke=c(28211),He=(()=>{return(t=He||(He={})).USERS="users",t.BUCKETS="buckets",t.METADATA="metadata",t.USAGE="usage",t.ZONE="zone",He;var t})();let p_=(()=>{class t{static getAll(){return Object.values(t.capabilities)}}return t.capabilities=He,t})();function Qo(t,n){1&t&&e._UZ(0,"input",22),2&t&&e.Q6J("readonly",!0)}function Yo(t,n){1&t&&(e.TgZ(0,"option",17),e.SDv(1,25),e.qZA()),2&t&&e.Q6J("ngValue",null)}function Jo(t,n){if(1&t&&(e.TgZ(0,"option",26),e._uU(1),e.qZA()),2&t){const _=n.$implicit;e.Q6J("value",_),e.xp6(1),e.Oqu(_)}}function Ko(t,n){if(1&t&&(e.TgZ(0,"select",23),e.YNc(1,Yo,2,1,"option",24),e.YNc(2,Jo,2,2,"option",19),e.qZA()),2&t){const _=e.oxw();e.xp6(1),e.Q6J("ngIf",null!==_.types),e.xp6(1),e.Q6J("ngForOf",_.types)}}function Vo(t,n){1&t&&(e.TgZ(0,"span",27),e.SDv(1,28),e.qZA())}function jo(t,n){if(1&t&&(e.TgZ(0,"option",26),e._uU(1),e.qZA()),2&t){const _=n.$implicit;e.Q6J("value",_),e.xp6(1),e.hij(" ",_," ")}}function en(t,n){1&t&&(e.TgZ(0,"span",27),e.SDv(1,29),e.qZA())}const _n=function(t){return{required:t}},tn=function(){return["read","write","*"]};let on=(()=>{class t{constructor(_,o,i){this.formBuilder=_,this.activeModal=o,this.actionLabels=i,this.submitAction=new e.vpe,this.editing=!0,this.types=[],this.resource="capability",this.createForm()}createForm(){this.formGroup=this.formBuilder.group({type:[null,[a.kI.required]],perm:[null,[a.kI.required]]})}setEditing(_=!0){this.editing=_,this.action=this.editing?this.actionLabels.EDIT:this.actionLabels.ADD}setValues(_,o){this.formGroup.setValue({type:_,perm:o})}setCapabilities(_){const o=[];_.forEach(i=>{o.push(i.type)}),this.types=[],p_.getAll().forEach(i=>{-1===E().indexOf(o,i)&&this.types.push(i)})}onSubmit(){this.submitAction.emit(this.formGroup.value),this.activeModal.close()}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(ae.O),e.Y36(G.Kz),e.Y36(I.p4))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-user-capability-modal"]],outputs:{submitAction:"submitAction"},decls:29,vars:24,consts:function(){let n,_,o,i,s,l,r;return n="" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",_="Type",o="Permission",i="-- Select a permission --",s="-- Select a type --",l="This field is required.",r="This field is required.",[[3,"modalRef"],[1,"modal-title"],n,[1,"modal-content"],["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","type",1,"cd-col-form-label",3,"ngClass"],_,[1,"cd-col-form-input"],["id","type","class","form-control","type","text","formControlName","type",3,"readonly",4,"ngIf"],["id","type","class","form-select","formControlName","type","autofocus","",4,"ngIf"],["class","invalid-feedback",4,"ngIf"],["for","perm",1,"cd-col-form-label","required"],o,["id","perm","formControlName","perm",1,"form-select"],[3,"ngValue"],i,[3,"value",4,"ngFor","ngForOf"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],["id","type","type","text","formControlName","type",1,"form-control",3,"readonly"],["id","type","formControlName","type","autofocus","",1,"form-select"],[3,"ngValue",4,"ngIf"],s,[3,"value"],[1,"invalid-feedback"],l,r]},template:function(_,o){if(1&_&&(e.TgZ(0,"cd-modal",0),e.ynx(1,1),e.SDv(2,2),e.ALo(3,"titlecase"),e.ALo(4,"upperFirst"),e.BQk(),e.ynx(5,3),e.TgZ(6,"form",4,5)(8,"div",6)(9,"div",7)(10,"label",8),e.SDv(11,9),e.qZA(),e.TgZ(12,"div",10),e.YNc(13,Qo,1,1,"input",11),e.YNc(14,Ko,3,2,"select",12),e.YNc(15,Vo,2,0,"span",13),e.qZA()(),e.TgZ(16,"div",7)(17,"label",14),e.SDv(18,15),e.qZA(),e.TgZ(19,"div",10)(20,"select",16)(21,"option",17),e.SDv(22,18),e.qZA(),e.YNc(23,jo,2,2,"option",19),e.qZA(),e.YNc(24,en,2,0,"span",13),e.qZA()()(),e.TgZ(25,"div",20)(26,"cd-form-button-panel",21),e.NdJ("submitActionEvent",function(){return o.onSubmit()}),e.ALo(27,"titlecase"),e.ALo(28,"upperFirst"),e.qZA()()(),e.BQk(),e.qZA()),2&_){const i=e.MAs(7);e.Q6J("modalRef",o.activeModal),e.xp6(4),e.pQV(e.lcZ(3,13,o.action))(e.lcZ(4,15,o.resource)),e.QtT(2),e.xp6(2),e.Q6J("formGroup",o.formGroup),e.xp6(4),e.Q6J("ngClass",e.VKq(21,_n,!o.editing)),e.xp6(3),e.Q6J("ngIf",o.editing),e.xp6(1),e.Q6J("ngIf",!o.editing),e.xp6(1),e.Q6J("ngIf",o.formGroup.showError("type",i,"required")),e.xp6(6),e.Q6J("ngValue",null),e.xp6(2),e.Q6J("ngForOf",e.DdM(23,tn)),e.xp6(1),e.Q6J("ngIf",o.formGroup.showError("perm",i,"required")),e.xp6(2),e.Q6J("form",o.formGroup)("submitText",e.lcZ(27,17,o.action)+" "+e.lcZ(28,19,o.resource))}},dependencies:[T.mk,T.sg,T.O5,X.z,B.p,fe.U,k.o,q.b,z.P,H.V,a._Y,a.YN,a.Kr,a.Fj,a.EJ,a.JJ,a.JL,a.sg,a.u,T.rS,_e.m]}),t})();var pe=c(58039),Xe=c(4416);function nn(t,n){1&t&&e._UZ(0,"input",17),2&t&&e.Q6J("readonly",!0)}function sn(t,n){1&t&&(e.TgZ(0,"option",21),e.SDv(1,22),e.qZA()),2&t&&e.Q6J("ngValue",null)}function an(t,n){if(1&t&&(e.TgZ(0,"option",23),e._uU(1),e.qZA()),2&t){const _=n.$implicit;e.Q6J("value",_),e.xp6(1),e.Oqu(_)}}function ln(t,n){if(1&t&&(e.TgZ(0,"select",18),e.YNc(1,sn,2,1,"option",19),e.YNc(2,an,2,2,"option",20),e.qZA()),2&t){const _=e.oxw();e.xp6(1),e.Q6J("ngIf",null!==_.userCandidates),e.xp6(1),e.Q6J("ngForOf",_.userCandidates)}}function rn(t,n){1&t&&(e.TgZ(0,"span",24),e.SDv(1,25),e.qZA())}function cn(t,n){1&t&&(e.TgZ(0,"div",7)(1,"div",26)(2,"div",27),e._UZ(3,"input",28),e.TgZ(4,"label",29),e.SDv(5,30),e.qZA()()()())}function dn(t,n){1&t&&(e.TgZ(0,"span",24),e.SDv(1,37),e.qZA())}const Ve=function(t){return{required:t}};function un(t,n){if(1&t&&(e.TgZ(0,"div",7)(1,"label",31),e.SDv(2,32),e.qZA(),e.TgZ(3,"div",10)(4,"div",33),e._UZ(5,"input",34)(6,"button",35)(7,"cd-copy-2-clipboard-button",36),e.qZA(),e.YNc(8,dn,2,0,"span",13),e.qZA()()),2&t){const _=e.oxw(),o=e.MAs(7);e.xp6(1),e.Q6J("ngClass",e.VKq(3,Ve,!_.viewing)),e.xp6(4),e.Q6J("readonly",_.viewing),e.xp6(3),e.Q6J("ngIf",_.formGroup.showError("access_key",o,"required"))}}function gn(t,n){1&t&&(e.TgZ(0,"span",24),e.SDv(1,43),e.qZA())}function Rn(t,n){if(1&t&&(e.TgZ(0,"div",7)(1,"label",38),e.SDv(2,39),e.qZA(),e.TgZ(3,"div",10)(4,"div",33),e._UZ(5,"input",40)(6,"button",41)(7,"cd-copy-2-clipboard-button",42),e.qZA(),e.YNc(8,gn,2,0,"span",13),e.qZA()()),2&t){const _=e.oxw(),o=e.MAs(7);e.xp6(1),e.Q6J("ngClass",e.VKq(3,Ve,!_.viewing)),e.xp6(4),e.Q6J("readonly",_.viewing),e.xp6(3),e.Q6J("ngIf",_.formGroup.showError("secret_key",o,"required"))}}let m_=(()=>{class t{constructor(_,o,i){this.formBuilder=_,this.activeModal=o,this.actionLabels=i,this.submitAction=new e.vpe,this.viewing=!0,this.userCandidates=[],this.resource="S3 Key",this.createForm()}createForm(){this.formGroup=this.formBuilder.group({user:[null,[a.kI.required]],generate_key:[!0],access_key:[null,[m.h.requiredIf({generate_key:!1})]],secret_key:[null,[m.h.requiredIf({generate_key:!1})]]})}setViewing(_=!0){this.viewing=_,this.action=this.viewing?this.actionLabels.SHOW:this.actionLabels.CREATE}setValues(_,o,i){this.formGroup.setValue({user:_,generate_key:E().isEmpty(o),access_key:o,secret_key:i})}setUserCandidates(_){this.userCandidates=_}onSubmit(){this.submitAction.emit(this.formGroup.value),this.activeModal.close()}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(ae.O),e.Y36(G.Kz),e.Y36(I.p4))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-user-s3-key-modal"]],outputs:{submitAction:"submitAction"},decls:23,vars:24,consts:function(){let n,_,o,i,s,l,r,d,u;return n="" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",_="Username",o="-- Select a username --",i="This field is required.",s="Auto-generate key",l="Access key",r="This field is required.",d="Secret key",u="This field is required.",[[3,"modalRef"],[1,"modal-title"],n,[1,"modal-content"],["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","user",1,"cd-col-form-label",3,"ngClass"],_,[1,"cd-col-form-input"],["id","user","class","form-control","type","text","formControlName","user",3,"readonly",4,"ngIf"],["id","user","class","form-control","formControlName","user","autofocus","",4,"ngIf"],["class","invalid-feedback",4,"ngIf"],["class","form-group row",4,"ngIf"],[1,"modal-footer"],[3,"form","submitText","showSubmit","submitActionEvent"],["id","user","type","text","formControlName","user",1,"form-control",3,"readonly"],["id","user","formControlName","user","autofocus","",1,"form-control"],[3,"ngValue",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[3,"ngValue"],o,[3,"value"],[1,"invalid-feedback"],i,[1,"cd-col-form-offset"],[1,"custom-control","custom-checkbox"],["id","generate_key","type","checkbox","formControlName","generate_key",1,"custom-control-input"],["for","generate_key",1,"custom-control-label"],s,["for","access_key",1,"cd-col-form-label",3,"ngClass"],l,[1,"input-group"],["id","access_key","type","password","formControlName","access_key",1,"form-control",3,"readonly"],["type","button","cdPasswordButton","access_key",1,"btn","btn-light"],["source","access_key"],r,["for","secret_key",1,"cd-col-form-label",3,"ngClass"],d,["id","secret_key","type","password","formControlName","secret_key",1,"form-control",3,"readonly"],["type","button","cdPasswordButton","secret_key",1,"btn","btn-light"],["source","secret_key"],u]},template:function(_,o){if(1&_&&(e.TgZ(0,"cd-modal",0),e.ynx(1,1),e.SDv(2,2),e.ALo(3,"titlecase"),e.ALo(4,"upperFirst"),e.BQk(),e.ynx(5,3),e.TgZ(6,"form",4,5)(8,"div",6)(9,"div",7)(10,"label",8),e.SDv(11,9),e.qZA(),e.TgZ(12,"div",10),e.YNc(13,nn,1,1,"input",11),e.YNc(14,ln,3,2,"select",12),e.YNc(15,rn,2,0,"span",13),e.qZA()(),e.YNc(16,cn,6,0,"div",14),e.YNc(17,un,9,5,"div",14),e.YNc(18,Rn,9,5,"div",14),e.qZA(),e.TgZ(19,"div",15)(20,"cd-form-button-panel",16),e.NdJ("submitActionEvent",function(){return o.onSubmit()}),e.ALo(21,"titlecase"),e.ALo(22,"upperFirst"),e.qZA()()(),e.BQk(),e.qZA()),2&_){const i=e.MAs(7);e.Q6J("modalRef",o.activeModal),e.xp6(4),e.pQV(e.lcZ(3,14,o.action))(e.lcZ(4,16,o.resource)),e.QtT(2),e.xp6(2),e.Q6J("formGroup",o.formGroup),e.xp6(4),e.Q6J("ngClass",e.VKq(22,Ve,!o.viewing)),e.xp6(3),e.Q6J("ngIf",o.viewing),e.xp6(1),e.Q6J("ngIf",!o.viewing),e.xp6(1),e.Q6J("ngIf",o.formGroup.showError("user",i,"required")),e.xp6(1),e.Q6J("ngIf",!o.viewing),e.xp6(1),e.Q6J("ngIf",!o.formGroup.getValue("generate_key")),e.xp6(1),e.Q6J("ngIf",!o.formGroup.getValue("generate_key")),e.xp6(2),e.Q6J("form",o.formGroup)("submitText",e.lcZ(21,18,o.action)+" "+e.lcZ(22,20,o.resource))("showSubmit",!o.viewing)}},dependencies:[T.mk,T.sg,T.O5,X.z,pe.s,B.p,fe.U,Xe.C,k.o,q.b,z.P,H.V,a._Y,a.YN,a.Kr,a.Fj,a.Wl,a.EJ,a.JJ,a.JL,a.sg,a.u,T.rS,_e.m]}),t})();class Tn{}function En(t,n){1&t&&(e.TgZ(0,"span",29),e.SDv(1,30),e.qZA())}function fn(t,n){1&t&&(e.TgZ(0,"span",29),e.SDv(1,31),e.qZA())}function pn(t,n){if(1&t&&(e.TgZ(0,"option",32),e._uU(1),e.qZA()),2&t){const _=n.$implicit;e.Q6J("value",_),e.xp6(1),e.hij(" ",_," ")}}function mn(t,n){1&t&&(e.TgZ(0,"span",29),e.SDv(1,33),e.qZA())}function Mn(t,n){1&t&&(e.TgZ(0,"span",29),e.SDv(1,47),e.qZA())}function Sn(t,n){if(1&t&&(e.TgZ(0,"div",7)(1,"label",41),e.SDv(2,42),e.qZA(),e.TgZ(3,"div",10)(4,"div",43),e._UZ(5,"input",44)(6,"button",45)(7,"cd-copy-2-clipboard-button",46),e.qZA(),e.YNc(8,Mn,2,0,"span",15),e.qZA()()),2&t){const _=e.oxw(2),o=e.MAs(7);e.xp6(8),e.Q6J("ngIf",_.formGroup.showError("secret_key",o,"required"))}}function Cn(t,n){if(1&t&&(e.TgZ(0,"fieldset")(1,"legend"),e.SDv(2,34),e.qZA(),e.TgZ(3,"div",7)(4,"div",35)(5,"div",36),e._UZ(6,"input",37),e.TgZ(7,"label",38),e.SDv(8,39),e.qZA()()()(),e.YNc(9,Sn,9,1,"div",40),e.qZA()),2&t){const _=e.oxw();e.xp6(9),e.Q6J("ngIf",!_.editing&&!_.formGroup.getValue("generate_secret"))}}const On=function(t){return{required:t}},Fn=function(){return["read","write"]};let Pn=(()=>{class t{constructor(_,o,i){this.formBuilder=_,this.bsModalRef=o,this.actionLabels=i,this.submitAction=new e.vpe,this.editing=!0,this.subusers=[],this.resource="Subuser",this.createForm()}createForm(){this.formGroup=this.formBuilder.group({uid:[null],subuid:[null,[a.kI.required,this.subuserValidator()]],perm:[null,[a.kI.required]],generate_secret:[!0],secret_key:[null,[m.h.requiredIf({generate_secret:!1})]]})}subuserValidator(){const _=this;return o=>_.editing||(0,m.P)(o.value)?null:_.subusers.some(s=>E().isEqual(_.getSubuserName(s.id),o.value))?{subuserIdExists:!0}:null}getSubuserName(_){if(E().isEmpty(_))return _;const o=_.match(/([^:]+)(:(.+))?/);return E().isUndefined(o[3])?o[1]:o[3]}setEditing(_=!0){this.editing=_,this.action=this.editing?this.actionLabels.EDIT:this.actionLabels.CREATE}setValues(_,o="",i=""){this.formGroup.setValue({uid:_,subuid:this.getSubuserName(o),perm:i,generate_secret:!0,secret_key:null})}setSubusers(_){this.subusers=_}onSubmit(){const _=this.formGroup.value,o=new Tn;o.id=`${_.uid}:${_.subuid}`,o.permissions=_.perm,o.generate_secret=_.generate_secret,o.secret_key=_.secret_key,this.submitAction.emit(o),this.bsModalRef.close()}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(ae.O),e.Y36(G.Kz),e.Y36(I.p4))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-user-subuser-modal"]],outputs:{submitAction:"submitAction"},decls:39,vars:26,consts:function(){let n,_,o,i,s,l,r,d,u,R,O,F,b,h;return n="" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",_="Username",o="Subuser",i="Permission",s="-- Select a permission --",l="read, write",r="full",d="This field is required.",u="The chosen subuser ID is already in use.",R="This field is required.",O="Swift key",F="Auto-generate secret",b="Secret key",h="This field is required.",[[3,"modalRef"],[1,"modal-title"],n,[1,"modal-content"],["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","uid",1,"cd-col-form-label"],_,[1,"cd-col-form-input"],["id","uid","type","text","formControlName","uid",1,"form-control",3,"readonly"],["for","subuid",1,"cd-col-form-label",3,"ngClass"],o,["id","subuid","type","text","formControlName","subuid","autofocus","",1,"form-control",3,"readonly"],["class","invalid-feedback",4,"ngIf"],["for","perm",1,"cd-col-form-label","required"],i,["id","perm","formControlName","perm",1,"form-select"],[3,"ngValue"],s,[3,"value",4,"ngFor","ngForOf"],["value","read-write"],l,["value","full-control"],r,[4,"ngIf"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],d,u,[3,"value"],R,O,[1,"cd-col-form-offset"],[1,"custom-control","custom-checkbox"],["id","generate_secret","type","checkbox","formControlName","generate_secret",1,"custom-control-input"],["for","generate_secret",1,"custom-control-label"],F,["class","form-group row",4,"ngIf"],["for","secret_key",1,"cd-col-form-label","required"],b,[1,"input-group"],["id","secret_key","type","password","formControlName","secret_key",1,"form-control"],["type","button","cdPasswordButton","secret_key",1,"btn","btn-light"],["source","secret_key"],h]},template:function(_,o){if(1&_&&(e.TgZ(0,"cd-modal",0),e.ynx(1,1),e.SDv(2,2),e.ALo(3,"titlecase"),e.ALo(4,"upperFirst"),e.BQk(),e.ynx(5,3),e.TgZ(6,"form",4,5)(8,"div",6)(9,"div",7)(10,"label",8),e.SDv(11,9),e.qZA(),e.TgZ(12,"div",10),e._UZ(13,"input",11),e.qZA()(),e.TgZ(14,"div",7)(15,"label",12),e.SDv(16,13),e.qZA(),e.TgZ(17,"div",10),e._UZ(18,"input",14),e.YNc(19,En,2,0,"span",15),e.YNc(20,fn,2,0,"span",15),e.qZA()(),e.TgZ(21,"div",7)(22,"label",16),e.SDv(23,17),e.qZA(),e.TgZ(24,"div",10)(25,"select",18)(26,"option",19),e.SDv(27,20),e.qZA(),e.YNc(28,pn,2,2,"option",21),e.TgZ(29,"option",22),e.SDv(30,23),e.qZA(),e.TgZ(31,"option",24),e.SDv(32,25),e.qZA()(),e.YNc(33,mn,2,0,"span",15),e.qZA()(),e.YNc(34,Cn,10,1,"fieldset",26),e.qZA(),e.TgZ(35,"div",27)(36,"cd-form-button-panel",28),e.NdJ("submitActionEvent",function(){return o.onSubmit()}),e.ALo(37,"titlecase"),e.ALo(38,"upperFirst"),e.qZA()()(),e.BQk(),e.qZA()),2&_){const i=e.MAs(7);e.Q6J("modalRef",o.bsModalRef),e.xp6(4),e.pQV(e.lcZ(3,15,o.action))(e.lcZ(4,17,o.resource)),e.QtT(2),e.xp6(2),e.Q6J("formGroup",o.formGroup),e.xp6(7),e.Q6J("readonly",!0),e.xp6(2),e.Q6J("ngClass",e.VKq(23,On,!o.editing)),e.xp6(3),e.Q6J("readonly",o.editing),e.xp6(1),e.Q6J("ngIf",o.formGroup.showError("subuid",i,"required")),e.xp6(1),e.Q6J("ngIf",o.formGroup.showError("subuid",i,"subuserIdExists")),e.xp6(6),e.Q6J("ngValue",null),e.xp6(2),e.Q6J("ngForOf",e.DdM(25,Fn)),e.xp6(5),e.Q6J("ngIf",o.formGroup.showError("perm",i,"required")),e.xp6(1),e.Q6J("ngIf",!o.editing),e.xp6(2),e.Q6J("form",o.formGroup)("submitText",e.lcZ(37,19,o.action)+" "+e.lcZ(38,21,o.resource))}},dependencies:[T.mk,T.sg,T.O5,X.z,pe.s,B.p,fe.U,Xe.C,k.o,q.b,z.P,H.V,a._Y,a.YN,a.Kr,a.Fj,a.Wl,a.EJ,a.JJ,a.JL,a.sg,a.u,T.rS,_e.m]}),t})();var M_=c(13472);let S_=(()=>{class t{constructor(_,o){this.activeModal=_,this.actionLabels=o,this.resource="Swift Key",this.action=this.actionLabels.SHOW}setValues(_,o){this.user=_,this.secret_key=o}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(G.Kz),e.Y36(I.p4))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-user-swift-key-modal"]],decls:23,vars:11,consts:function(){let n,_,o;return n="" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",_="Username",o="Secret key",[[3,"modalRef"],[1,"modal-title"],n,[1,"modal-content"],[1,"modal-body"],["novalidate",""],[1,"form-group","row"],["for","user",1,"cd-col-form-label"],_,[1,"cd-col-form-input"],["id","user","name","user","type","text",1,"form-control",3,"readonly","ngModel","ngModelChange"],["for","secret_key",1,"cd-col-form-label"],o,[1,"input-group"],["id","secret_key","name","secret_key","type","password",1,"form-control",3,"ngModel","readonly","ngModelChange"],["type","button","cdPasswordButton","secret_key",1,"btn","btn-light"],["source","secret_key"],[1,"modal-footer"],[3,"backAction"]]},template:function(_,o){1&_&&(e.TgZ(0,"cd-modal",0),e.ynx(1,1),e.SDv(2,2),e.ALo(3,"titlecase"),e.ALo(4,"upperFirst"),e.BQk(),e.ynx(5,3),e.TgZ(6,"div",4)(7,"form",5)(8,"div",6)(9,"label",7),e.SDv(10,8),e.qZA(),e.TgZ(11,"div",9)(12,"input",10),e.NdJ("ngModelChange",function(s){return o.user=s}),e.qZA()()(),e.TgZ(13,"div",6)(14,"label",11),e.SDv(15,12),e.qZA(),e.TgZ(16,"div",9)(17,"div",13)(18,"input",14),e.NdJ("ngModelChange",function(s){return o.secret_key=s}),e.qZA(),e._UZ(19,"button",15)(20,"cd-copy-2-clipboard-button",16),e.qZA()()()()(),e.TgZ(21,"div",17)(22,"cd-back-button",18),e.NdJ("backAction",function(){return o.activeModal.close()}),e.qZA()(),e.BQk(),e.qZA()),2&_&&(e.Q6J("modalRef",o.activeModal),e.xp6(4),e.pQV(e.lcZ(3,7,o.action))(e.lcZ(4,9,o.resource)),e.QtT(2),e.xp6(8),e.Q6J("readonly",!0)("ngModel",o.user),e.xp6(6),e.Q6J("ngModel",o.secret_key)("readonly",!0))},dependencies:[M_.W,X.z,pe.s,Xe.C,k.o,q.b,z.P,a._Y,a.Fj,a.JJ,a.JL,a.On,a.F,T.rS,_e.m]}),t})();var Nn=c(17932);function Gn(t,n){1&t&&(e.TgZ(0,"span",50),e.SDv(1,51),e.qZA())}function An(t,n){1&t&&(e.TgZ(0,"span",50),e.SDv(1,52),e.qZA())}function In(t,n){1&t&&(e.TgZ(0,"span",50),e.SDv(1,53),e.qZA())}function bn(t,n){1&t&&(e.TgZ(0,"span",50),e.SDv(1,57),e.qZA())}function hn(t,n){1&t&&(e.TgZ(0,"span",50),e.SDv(1,58),e.qZA())}function Ln(t,n){if(1&t&&(e.TgZ(0,"div",8)(1,"label",54),e.SDv(2,55),e.qZA(),e.TgZ(3,"div",11),e._UZ(4,"input",56),e.YNc(5,bn,2,0,"span",13),e.YNc(6,hn,2,0,"span",13),e.qZA()()),2&t){e.oxw();const _=e.MAs(2),o=e.oxw();e.xp6(4),e.Q6J("readonly",o.editing),e.xp6(1),e.Q6J("ngIf",o.userForm.showError("tenant",_,"pattern")),e.xp6(1),e.Q6J("ngIf",o.userForm.showError("tenant",_,"notUnique"))}}function Wn(t,n){1&t&&(e.TgZ(0,"span",50),e.SDv(1,59),e.qZA())}function $n(t,n){1&t&&(e.TgZ(0,"span",50),e.SDv(1,60),e.qZA())}function Zn(t,n){1&t&&(e.TgZ(0,"span",50),e.SDv(1,61),e.qZA())}function Dn(t,n){1&t&&(e.TgZ(0,"span",50),e.SDv(1,62),e.qZA())}function Un(t,n){1&t&&(e.TgZ(0,"span",50),e.SDv(1,65),e.qZA())}function vn(t,n){1&t&&(e.TgZ(0,"span",50),e.SDv(1,66),e.qZA())}function yn(t,n){if(1&t&&(e.TgZ(0,"div",8),e._UZ(1,"label",63),e.TgZ(2,"div",11),e._UZ(3,"input",64),e.YNc(4,Un,2,0,"span",13),e.YNc(5,vn,2,0,"span",13),e.qZA()()),2&t){e.oxw();const _=e.MAs(2),o=e.oxw();e.xp6(4),e.Q6J("ngIf",o.userForm.showError("max_buckets",_,"required")),e.xp6(1),e.Q6J("ngIf",o.userForm.showError("max_buckets",_,"min"))}}function wn(t,n){1&t&&(e.TgZ(0,"span",50),e.SDv(1,77),e.qZA())}function xn(t,n){if(1&t&&(e.TgZ(0,"div",8)(1,"label",71),e.SDv(2,72),e.qZA(),e.TgZ(3,"div",11)(4,"div",73),e._UZ(5,"input",74)(6,"button",75)(7,"cd-copy-2-clipboard-button",76),e.qZA(),e.YNc(8,wn,2,0,"span",13),e.qZA()()),2&t){e.oxw(2);const _=e.MAs(2),o=e.oxw();e.xp6(8),e.Q6J("ngIf",o.userForm.showError("access_key",_,"required"))}}function kn(t,n){1&t&&(e.TgZ(0,"span",50),e.SDv(1,83),e.qZA())}function zn(t,n){if(1&t&&(e.TgZ(0,"div",8)(1,"label",78),e.SDv(2,79),e.qZA(),e.TgZ(3,"div",11)(4,"div",73),e._UZ(5,"input",80)(6,"button",81)(7,"cd-copy-2-clipboard-button",82),e.qZA(),e.YNc(8,kn,2,0,"span",13),e.qZA()()),2&t){e.oxw(2);const _=e.MAs(2),o=e.oxw();e.xp6(8),e.Q6J("ngIf",o.userForm.showError("secret_key",_,"required"))}}function qn(t,n){if(1&t&&(e.TgZ(0,"fieldset")(1,"legend"),e.SDv(2,67),e.qZA(),e.TgZ(3,"div",8)(4,"div",14)(5,"div",15),e._UZ(6,"input",68),e.TgZ(7,"label",69),e.SDv(8,70),e.qZA()()()(),e.YNc(9,xn,9,1,"div",19),e.YNc(10,zn,9,1,"div",19),e.qZA()),2&t){const _=e.oxw(2);e.xp6(9),e.Q6J("ngIf",!_.editing&&!_.userForm.getValue("generate_key")),e.xp6(1),e.Q6J("ngIf",!_.editing&&!_.userForm.getValue("generate_key"))}}function Hn(t,n){1&t&&(e.TgZ(0,"span",94)(1,"span",95),e.SDv(2,96),e.qZA()())}const K=function(t){return[t]};function Xn(t,n){if(1&t){const _=e.EpF();e.TgZ(0,"span")(1,"div",73)(2,"span",97),e._UZ(3,"i"),e.qZA(),e._UZ(4,"input",98),e.TgZ(5,"span",97),e._UZ(6,"i"),e.qZA(),e._UZ(7,"input",98),e.TgZ(8,"button",99),e.NdJ("click",function(){const s=e.CHM(_).index,l=e.oxw(3);return e.KtG(l.showSubuserModal(s))}),e._UZ(9,"i",91),e.qZA(),e.TgZ(10,"button",100),e.NdJ("click",function(){const s=e.CHM(_).index,l=e.oxw(3);return e.KtG(l.deleteSubuser(s))}),e._UZ(11,"i",91),e.qZA()(),e._UZ(12,"span",95),e.qZA()}if(2&t){const _=n.$implicit,o=e.oxw(3);e.xp6(3),e.Tol(o.icons.user),e.xp6(1),e.s9C("value",_.id),e.xp6(2),e.Tol(o.icons.share),e.xp6(1),e.s9C("value","full-control"===_.permissions?"full":_.permissions),e.xp6(2),e.Q6J("ngClass",e.VKq(10,K,o.icons.edit)),e.xp6(2),e.Q6J("ngClass",e.VKq(12,K,o.icons.destroy))}}function Bn(t,n){if(1&t){const _=e.EpF();e.TgZ(0,"fieldset")(1,"legend"),e.SDv(2,84),e.qZA(),e.TgZ(3,"div",85)(4,"div",14),e.YNc(5,Hn,3,0,"span",86),e.YNc(6,Xn,13,14,"span",87),e.TgZ(7,"div",88)(8,"div",89)(9,"button",90),e.NdJ("click",function(){e.CHM(_);const i=e.oxw(2);return e.KtG(i.showSubuserModal())}),e._UZ(10,"i",91),e.ynx(11),e.SDv(12,92),e.ALo(13,"titlecase"),e.ALo(14,"upperFirst"),e.BQk(),e.qZA()()(),e._UZ(15,"span",93),e.qZA()()()}if(2&t){const _=e.oxw(2);e.xp6(5),e.Q6J("ngIf",0===_.subusers.length),e.xp6(1),e.Q6J("ngForOf",_.subusers),e.xp6(4),e.Q6J("ngClass",e.VKq(9,K,_.icons.add)),e.xp6(4),e.pQV(e.lcZ(13,5,_.actionLabels.CREATE))(e.lcZ(14,7,_.subuserLabel)),e.QtT(12)}}function Qn(t,n){1&t&&(e.TgZ(0,"span",94)(1,"span",95),e.SDv(2,106),e.qZA()())}function Yn(t,n){if(1&t){const _=e.EpF();e.TgZ(0,"span")(1,"div",73)(2,"div",97),e._UZ(3,"i"),e.qZA(),e._UZ(4,"input",98),e.TgZ(5,"button",107),e.NdJ("click",function(){const s=e.CHM(_).index,l=e.oxw(3);return e.KtG(l.showS3KeyModal(s))}),e._UZ(6,"i",91),e.qZA(),e.TgZ(7,"button",108),e.NdJ("click",function(){const s=e.CHM(_).index,l=e.oxw(3);return e.KtG(l.deleteS3Key(s))}),e._UZ(8,"i",91),e.qZA()(),e._UZ(9,"span",95),e.qZA()}if(2&t){const _=n.$implicit,o=e.oxw(3);e.xp6(3),e.Tol(o.icons.key),e.xp6(1),e.s9C("value",_.user),e.xp6(2),e.Q6J("ngClass",e.VKq(6,K,o.icons.show)),e.xp6(2),e.Q6J("ngClass",e.VKq(8,K,o.icons.destroy))}}function Jn(t,n){1&t&&(e.TgZ(0,"span",94)(1,"span",95),e.SDv(2,109),e.qZA()())}function Kn(t,n){if(1&t){const _=e.EpF();e.TgZ(0,"span")(1,"div",73)(2,"span",97),e._UZ(3,"i"),e.qZA(),e._UZ(4,"input",98),e.TgZ(5,"button",110),e.NdJ("click",function(){const s=e.CHM(_).index,l=e.oxw(3);return e.KtG(l.showSwiftKeyModal(s))}),e._UZ(6,"i",91),e.qZA()(),e._UZ(7,"span",95),e.qZA()}if(2&t){const _=n.$implicit,o=e.oxw(3);e.xp6(3),e.Tol(o.icons.key),e.xp6(1),e.s9C("value",_.user),e.xp6(2),e.Q6J("ngClass",e.VKq(5,K,o.icons.show))}}function Vn(t,n){if(1&t){const _=e.EpF();e.TgZ(0,"fieldset")(1,"legend"),e.SDv(2,101),e.qZA(),e.TgZ(3,"div",8)(4,"label",63),e.SDv(5,102),e.qZA(),e.TgZ(6,"div",11),e.YNc(7,Qn,3,0,"span",86),e.YNc(8,Yn,10,10,"span",87),e.TgZ(9,"div",88)(10,"div",89)(11,"button",103),e.NdJ("click",function(){e.CHM(_);const i=e.oxw(2);return e.KtG(i.showS3KeyModal())}),e._UZ(12,"i",91),e.ynx(13),e.SDv(14,104),e.ALo(15,"titlecase"),e.ALo(16,"upperFirst"),e.BQk(),e.qZA()()(),e._UZ(17,"span",93),e.qZA(),e._UZ(18,"hr"),e.qZA(),e.TgZ(19,"div",8)(20,"label",63),e.SDv(21,105),e.qZA(),e.TgZ(22,"div",11),e.YNc(23,Jn,3,0,"span",86),e.YNc(24,Kn,8,7,"span",87),e.qZA()()()}if(2&t){const _=e.oxw(2);e.xp6(7),e.Q6J("ngIf",0===_.s3Keys.length),e.xp6(1),e.Q6J("ngForOf",_.s3Keys),e.xp6(4),e.Q6J("ngClass",e.VKq(11,K,_.icons.add)),e.xp6(4),e.pQV(e.lcZ(15,7,_.actionLabels.CREATE))(e.lcZ(16,9,_.s3keyLabel)),e.QtT(14),e.xp6(7),e.Q6J("ngIf",0===_.swiftKeys.length),e.xp6(1),e.Q6J("ngForOf",_.swiftKeys)}}function jn(t,n){1&t&&(e.TgZ(0,"span",94)(1,"span",95),e.SDv(2,114),e.qZA()())}function ei(t,n){if(1&t){const _=e.EpF();e.TgZ(0,"span")(1,"div",73)(2,"div",97),e._UZ(3,"i"),e.qZA(),e._UZ(4,"input",98),e.TgZ(5,"button",115),e.NdJ("click",function(){const s=e.CHM(_).index,l=e.oxw(3);return e.KtG(l.showCapabilityModal(s))}),e._UZ(6,"i",91),e.qZA(),e.TgZ(7,"button",116),e.NdJ("click",function(){const s=e.CHM(_).index,l=e.oxw(3);return e.KtG(l.deleteCapability(s))}),e._UZ(8,"i",91),e.qZA()(),e._UZ(9,"span",95),e.qZA()}if(2&t){const _=n.$implicit,o=e.oxw(3);e.xp6(3),e.Tol(o.icons.share),e.xp6(1),e.hYB("value","",_.type,":",_.perm,""),e.xp6(2),e.Q6J("ngClass",e.VKq(7,K,o.icons.edit)),e.xp6(2),e.Q6J("ngClass",e.VKq(9,K,o.icons.destroy))}}function _i(t,n){if(1&t){const _=e.EpF();e.TgZ(0,"fieldset")(1,"legend"),e.SDv(2,111),e.qZA(),e.TgZ(3,"div",8)(4,"div",14),e.YNc(5,jn,3,0,"span",86),e.YNc(6,ei,10,11,"span",87),e.TgZ(7,"div",88)(8,"div",89)(9,"button",112),e.NdJ("click",function(){e.CHM(_);const i=e.oxw(2);return e.KtG(i.showCapabilityModal())}),e.ALo(10,"pipeFunction"),e.ALo(11,"pipeFunction"),e._UZ(12,"i",91),e.ynx(13),e.SDv(14,113),e.ALo(15,"titlecase"),e.ALo(16,"upperFirst"),e.BQk(),e.qZA()()(),e._UZ(17,"span",93),e.qZA()()()}if(2&t){const _=e.oxw(2);e.xp6(5),e.Q6J("ngIf",0===_.capabilities.length),e.xp6(1),e.Q6J("ngForOf",_.capabilities),e.xp6(3),e.Q6J("disabled",e.xi3(10,7,_.capabilities,_.hasAllCapabilities))("disableTooltip",!e.xi3(11,10,_.capabilities,_.hasAllCapabilities)),e.xp6(3),e.Q6J("ngClass",e.VKq(17,K,_.icons.add)),e.xp6(4),e.pQV(e.lcZ(15,13,_.actionLabels.ADD))(e.lcZ(16,15,_.capabilityLabel)),e.QtT(14)}}function ti(t,n){1&t&&(e.TgZ(0,"div",8)(1,"div",14)(2,"div",15),e._UZ(3,"input",117),e.TgZ(4,"label",118),e.SDv(5,119),e.qZA()()()())}function oi(t,n){1&t&&(e.TgZ(0,"span",50),e.SDv(1,123),e.qZA())}function ni(t,n){1&t&&(e.TgZ(0,"span",50),e.SDv(1,124),e.qZA())}function ii(t,n){1&t&&(e.TgZ(0,"span",50),e.SDv(1,125),e.qZA())}function si(t,n){if(1&t&&(e.TgZ(0,"div",8)(1,"label",120),e.SDv(2,121),e.qZA(),e.TgZ(3,"div",11),e._UZ(4,"input",122),e.YNc(5,oi,2,0,"span",13),e.YNc(6,ni,2,0,"span",13),e.YNc(7,ii,2,0,"span",13),e.qZA()()),2&t){e.oxw();const _=e.MAs(2),o=e.oxw();e.xp6(5),e.Q6J("ngIf",o.userForm.showError("user_quota_max_size",_,"required")),e.xp6(1),e.Q6J("ngIf",o.userForm.showError("user_quota_max_size",_,"quotaMaxSize")),e.xp6(1),e.Q6J("ngIf",o.userForm.showError("user_quota_max_size",o.formDir,"pattern"))}}function ai(t,n){1&t&&(e.TgZ(0,"div",8)(1,"div",14)(2,"div",15),e._UZ(3,"input",126),e.TgZ(4,"label",127),e.SDv(5,128),e.qZA()()()())}function li(t,n){1&t&&(e.TgZ(0,"span",50),e.SDv(1,132),e.qZA())}function ri(t,n){1&t&&(e.TgZ(0,"span",50),e.SDv(1,133),e.qZA())}function ci(t,n){if(1&t&&(e.TgZ(0,"div",8)(1,"label",129),e.SDv(2,130),e.qZA(),e.TgZ(3,"div",11),e._UZ(4,"input",131),e.YNc(5,li,2,0,"span",13),e.YNc(6,ri,2,0,"span",13),e.qZA()()),2&t){e.oxw();const _=e.MAs(2),o=e.oxw();e.xp6(5),e.Q6J("ngIf",o.userForm.showError("user_quota_max_objects",_,"required")),e.xp6(1),e.Q6J("ngIf",o.userForm.showError("user_quota_max_objects",_,"min"))}}function di(t,n){1&t&&(e.TgZ(0,"div",8)(1,"div",14)(2,"div",15),e._UZ(3,"input",134),e.TgZ(4,"label",135),e.SDv(5,136),e.qZA()()()())}function ui(t,n){1&t&&(e.TgZ(0,"span",50),e.SDv(1,140),e.qZA())}function gi(t,n){1&t&&(e.TgZ(0,"span",50),e.SDv(1,141),e.qZA())}function Ri(t,n){1&t&&(e.TgZ(0,"span",50),e.SDv(1,142),e.qZA())}function Ti(t,n){if(1&t&&(e.TgZ(0,"div",8)(1,"label",137),e.SDv(2,138),e.qZA(),e.TgZ(3,"div",11),e._UZ(4,"input",139),e.YNc(5,ui,2,0,"span",13),e.YNc(6,gi,2,0,"span",13),e.YNc(7,Ri,2,0,"span",13),e.qZA()()),2&t){e.oxw();const _=e.MAs(2),o=e.oxw();e.xp6(5),e.Q6J("ngIf",o.userForm.showError("bucket_quota_max_size",_,"required")),e.xp6(1),e.Q6J("ngIf",o.userForm.showError("bucket_quota_max_size",_,"quotaMaxSize")),e.xp6(1),e.Q6J("ngIf",o.userForm.showError("bucket_quota_max_size",o.formDir,"pattern"))}}function Ei(t,n){1&t&&(e.TgZ(0,"div",8)(1,"div",14)(2,"div",15),e._UZ(3,"input",143),e.TgZ(4,"label",144),e.SDv(5,145),e.qZA()()()())}function fi(t,n){1&t&&(e.TgZ(0,"span",50),e.SDv(1,149),e.qZA())}function pi(t,n){1&t&&(e.TgZ(0,"span",50),e.SDv(1,150),e.qZA())}function mi(t,n){if(1&t&&(e.TgZ(0,"div",8)(1,"label",146),e.SDv(2,147),e.qZA(),e.TgZ(3,"div",11),e._UZ(4,"input",148),e.YNc(5,fi,2,0,"span",13),e.YNc(6,pi,2,0,"span",13),e.qZA()()),2&t){e.oxw();const _=e.MAs(2),o=e.oxw();e.xp6(5),e.Q6J("ngIf",o.userForm.showError("bucket_quota_max_objects",_,"required")),e.xp6(1),e.Q6J("ngIf",o.userForm.showError("bucket_quota_max_objects",_,"min"))}}const C_=function(t){return{required:t}};function Mi(t,n){if(1&t){const _=e.EpF();e.TgZ(0,"div",1)(1,"form",2,3)(3,"div",4)(4,"div",5),e.SDv(5,6),e.ALo(6,"titlecase"),e.ALo(7,"upperFirst"),e.qZA(),e.TgZ(8,"div",7)(9,"div",8)(10,"label",9),e.SDv(11,10),e.qZA(),e.TgZ(12,"div",11),e._UZ(13,"input",12),e.YNc(14,Gn,2,0,"span",13),e.YNc(15,An,2,0,"span",13),e.YNc(16,In,2,0,"span",13),e.qZA()(),e.TgZ(17,"div",8)(18,"div",14)(19,"div",15)(20,"input",16),e.NdJ("click",function(){e.CHM(_);const i=e.oxw();return e.KtG(i.updateFieldsWhenTenanted())}),e.qZA(),e.TgZ(21,"label",17),e.SDv(22,18),e.qZA()()()(),e.YNc(23,Ln,7,3,"div",19),e.TgZ(24,"div",8)(25,"label",20),e.SDv(26,21),e.qZA(),e.TgZ(27,"div",11),e._UZ(28,"input",22),e.YNc(29,Wn,2,0,"span",13),e.YNc(30,$n,2,0,"span",13),e.qZA()(),e.TgZ(31,"div",8)(32,"label",23),e.SDv(33,24),e.qZA(),e.TgZ(34,"div",11),e._UZ(35,"input",25),e.YNc(36,Zn,2,0,"span",13),e.YNc(37,Dn,2,0,"span",13),e.qZA()(),e.TgZ(38,"div",8)(39,"label",26),e.SDv(40,27),e.qZA(),e.TgZ(41,"div",11)(42,"select",28),e.NdJ("change",function(i){e.CHM(_);const s=e.oxw();return e.KtG(s.onMaxBucketsModeChange(i.target.value))}),e.TgZ(43,"option",29),e.SDv(44,30),e.qZA(),e.TgZ(45,"option",31),e.SDv(46,32),e.qZA(),e.TgZ(47,"option",33),e.SDv(48,34),e.qZA()()()(),e.YNc(49,yn,6,2,"div",19),e.TgZ(50,"div",8)(51,"div",14)(52,"div",15),e._UZ(53,"input",35),e.TgZ(54,"label",36),e.SDv(55,37),e.qZA(),e.TgZ(56,"cd-helper"),e.SDv(57,38),e.qZA()()()(),e.YNc(58,qn,11,2,"fieldset",39),e.YNc(59,Bn,16,11,"fieldset",39),e.YNc(60,Vn,25,13,"fieldset",39),e.YNc(61,_i,18,19,"fieldset",39),e.TgZ(62,"fieldset")(63,"legend"),e.SDv(64,40),e.qZA(),e.TgZ(65,"div",8)(66,"div",14)(67,"div",15),e._UZ(68,"input",41),e.TgZ(69,"label",42),e.SDv(70,43),e.qZA()()()(),e.YNc(71,ti,6,0,"div",19),e.YNc(72,si,8,3,"div",19),e.YNc(73,ai,6,0,"div",19),e.YNc(74,ci,7,2,"div",19),e.qZA(),e.TgZ(75,"fieldset")(76,"legend"),e.SDv(77,44),e.qZA(),e.TgZ(78,"div",8)(79,"div",14)(80,"div",15),e._UZ(81,"input",45),e.TgZ(82,"label",46),e.SDv(83,47),e.qZA()()()(),e.YNc(84,di,6,0,"div",19),e.YNc(85,Ti,8,3,"div",19),e.YNc(86,Ei,6,0,"div",19),e.YNc(87,mi,7,2,"div",19),e.qZA()(),e.TgZ(88,"div",48)(89,"cd-form-button-panel",49),e.NdJ("submitActionEvent",function(){e.CHM(_);const i=e.oxw();return e.KtG(i.onSubmit())}),e.ALo(90,"titlecase"),e.ALo(91,"upperFirst"),e.qZA()()()()()}if(2&t){const _=e.MAs(2),o=e.oxw();e.xp6(1),e.Q6J("formGroup",o.userForm),e.xp6(6),e.pQV(e.lcZ(6,30,o.action))(e.lcZ(7,32,o.resource)),e.QtT(5),e.xp6(3),e.Q6J("ngClass",e.VKq(38,C_,!o.editing)),e.xp6(3),e.Q6J("readonly",o.editing),e.xp6(1),e.Q6J("ngIf",o.userForm.showError("user_id",_,"required")),e.xp6(1),e.Q6J("ngIf",o.userForm.showError("user_id",_,"pattern")),e.xp6(1),e.Q6J("ngIf",!o.userForm.getValue("show_tenant")&&o.userForm.showError("user_id",_,"notUnique")),e.xp6(4),e.Q6J("readonly",!0),e.xp6(3),e.Q6J("ngIf",o.userForm.getValue("show_tenant")),e.xp6(2),e.Q6J("ngClass",e.VKq(40,C_,!o.editing)),e.xp6(4),e.Q6J("ngIf",o.userForm.showError("display_name",_,"pattern")),e.xp6(1),e.Q6J("ngIf",o.userForm.showError("display_name",_,"required")),e.xp6(6),e.Q6J("ngIf",o.userForm.showError("email",_,"email")),e.xp6(1),e.Q6J("ngIf",o.userForm.showError("email",_,"notUnique")),e.xp6(12),e.Q6J("ngIf",1==o.userForm.get("max_buckets_mode").value),e.xp6(9),e.Q6J("ngIf",!o.editing),e.xp6(1),e.Q6J("ngIf",o.editing),e.xp6(1),e.Q6J("ngIf",o.editing),e.xp6(1),e.Q6J("ngIf",o.editing),e.xp6(10),e.Q6J("ngIf",o.userForm.controls.user_quota_enabled.value),e.xp6(1),e.Q6J("ngIf",o.userForm.controls.user_quota_enabled.value&&!o.userForm.getValue("user_quota_max_size_unlimited")),e.xp6(1),e.Q6J("ngIf",o.userForm.controls.user_quota_enabled.value),e.xp6(1),e.Q6J("ngIf",o.userForm.controls.user_quota_enabled.value&&!o.userForm.getValue("user_quota_max_objects_unlimited")),e.xp6(10),e.Q6J("ngIf",o.userForm.controls.bucket_quota_enabled.value),e.xp6(1),e.Q6J("ngIf",o.userForm.controls.bucket_quota_enabled.value&&!o.userForm.getValue("bucket_quota_max_size_unlimited")),e.xp6(1),e.Q6J("ngIf",o.userForm.controls.bucket_quota_enabled.value),e.xp6(1),e.Q6J("ngIf",o.userForm.controls.bucket_quota_enabled.value&&!o.userForm.getValue("bucket_quota_max_objects_unlimited")),e.xp6(2),e.Q6J("form",o.userForm)("submitText",e.lcZ(90,34,o.action)+" "+e.lcZ(91,36,o.resource))}}let O_=(()=>{class t extends l_.E{constructor(_,o,i,s,l,r,d){super(),this.formBuilder=_,this.route=o,this.router=i,this.rgwUserService=s,this.modalService=l,this.notificationService=r,this.actionLabels=d,this.editing=!1,this.submitObservables=[],this.icons=$.P,this.subusers=[],this.s3Keys=[],this.swiftKeys=[],this.capabilities=[],this.showTenant=!1,this.previousTenant=null,this.resource="user",this.subuserLabel="subuser",this.s3keyLabel="S3 Key",this.capabilityLabel="capability",this.editing=this.router.url.startsWith(`/rgw/user/${I.MQ.EDIT}`),this.action=this.editing?this.actionLabels.EDIT:this.actionLabels.CREATE,this.createForm()}createForm(){this.userForm=this.formBuilder.group({user_id:[null,[a.kI.required,a.kI.pattern(/^[a-zA-Z0-9!@#%^&*()_-]+$/)],this.editing?[]:[m.h.unique(this.rgwUserService.exists,this.rgwUserService,()=>this.userForm.getValue("tenant"))]],show_tenant:[this.editing],tenant:[null,[a.kI.pattern(/^[a-zA-Z0-9!@#%^&*()_-]+$/)],this.editing?[]:[m.h.unique(this.rgwUserService.exists,this.rgwUserService,()=>this.userForm.getValue("user_id"),!0)]],display_name:[null,[a.kI.required,a.kI.pattern(/^[a-zA-Z0-9!@#%^&*()_ -]+$/)]],email:[null,[m.h.email],[m.h.unique(this.rgwUserService.emailExists,this.rgwUserService)]],max_buckets_mode:[1],max_buckets:[1e3,[m.h.requiredIf({max_buckets_mode:"1"}),m.h.number(!1)]],suspended:[!1],generate_key:[!0],access_key:[null,[m.h.requiredIf({generate_key:!1})]],secret_key:[null,[m.h.requiredIf({generate_key:!1})]],user_quota_enabled:[!1],user_quota_max_size_unlimited:[!0],user_quota_max_size:[null,[m.h.composeIf({user_quota_enabled:!0,user_quota_max_size_unlimited:!1},[a.kI.required,this.quotaMaxSizeValidator])]],user_quota_max_objects_unlimited:[!0],user_quota_max_objects:[null,[m.h.requiredIf({user_quota_enabled:!0,user_quota_max_objects_unlimited:!1})]],bucket_quota_enabled:[!1],bucket_quota_max_size_unlimited:[!0],bucket_quota_max_size:[null,[m.h.composeIf({bucket_quota_enabled:!0,bucket_quota_max_size_unlimited:!1},[a.kI.required,this.quotaMaxSizeValidator])]],bucket_quota_max_objects_unlimited:[!0],bucket_quota_max_objects:[null,[m.h.requiredIf({bucket_quota_enabled:!0,bucket_quota_max_objects_unlimited:!1})]]})}ngOnInit(){this.route.params.subscribe(_=>{if(!_.hasOwnProperty("uid"))return void this.loadingReady();const o=decodeURIComponent(_.uid),i=[];i.push(this.rgwUserService.get(o)),i.push(this.rgwUserService.getQuota(o)),(0,ne.D)(i).subscribe(s=>{const l=E().clone(this.userForm.value);let r=E().pick(s[0],E().keys(this.userForm.value));switch(r.max_buckets){case-1:r.max_buckets_mode=-1,r.max_buckets="";break;case 0:r.max_buckets_mode=0,r.max_buckets="";break;default:r.max_buckets_mode=1}["user","bucket"].forEach(u=>{const R=s[1][u+"_quota"];r[u+"_quota_enabled"]=R.enabled,R.max_size<0?(r[u+"_quota_max_size_unlimited"]=!0,r[u+"_quota_max_size"]=null):(r[u+"_quota_max_size_unlimited"]=!1,r[u+"_quota_max_size"]=`${R.max_size} B`),R.max_objects<0?(r[u+"_quota_max_objects_unlimited"]=!0,r[u+"_quota_max_objects"]=null):(r[u+"_quota_max_objects_unlimited"]=!1,r[u+"_quota_max_objects"]=R.max_objects)}),r=E().merge(l,r),this.userForm.setValue(r),this.subusers=s[0].subusers,this.s3Keys=s[0].keys,this.swiftKeys=s[0].swift_keys;const d={"read, write":"*"};s[0].caps.forEach(u=>{u.perm in d&&(u.perm=d[u.perm])}),this.capabilities=s[0].caps,this.loadingReady()},()=>{this.loadingError()})})}goToListView(){this.router.navigate(["/rgw/user"])}onSubmit(){let _;if(this.userForm.pristine)return void this.goToListView();const o=this.getUID();if(this.editing){if(this._isGeneralDirty()){const i=this._getUpdateArgs();this.submitObservables.push(this.rgwUserService.update(o,i))}_="Updated Object Gateway user '" + o + "'"}else{const i=this._getCreateArgs();this.submitObservables.push(this.rgwUserService.create(i)),_="Created Object Gateway user '" + o + "'"}if(this._isUserQuotaDirty()){const i=this._getUserQuotaArgs();this.submitObservables.push(this.rgwUserService.updateQuota(o,i))}if(this._isBucketQuotaDirty()){const i=this._getBucketQuotaArgs();this.submitObservables.push(this.rgwUserService.updateQuota(o,i))}(0,Bo.z)(...this.submitObservables).subscribe({error:()=>{this.userForm.setErrors({cdSubmitButton:!0})},complete:()=>{this.notificationService.show(w.k.success,_),this.goToListView()}})}updateFieldsWhenTenanted(){this.showTenant=this.userForm.getValue("show_tenant"),this.showTenant?(this.userForm.get("user_id").markAsTouched(),this.previousTenant=this.userForm.get("tenant").value,this.userForm.get("tenant").patchValue(null)):(this.userForm.get("user_id").markAsUntouched(),this.userForm.get("tenant").patchValue(this.previousTenant))}getUID(){let _=this.userForm.getValue("user_id");const o=this.userForm?.getValue("tenant");return o&&o.length>0&&(_=`${this.userForm.getValue("tenant")}$${_}`),_}quotaMaxSizeValidator(_){return(0,m.P)(_.value)?null:null===RegExp("^(\\d+(\\.\\d+)?)\\s*(B|K(B|iB)?|M(B|iB)?|G(B|iB)?|T(B|iB)?)?$","i").exec(_.value)||(new Ke.H).toBytes(_.value)<1024?{quotaMaxSize:!0}:null}setSubuser(_,o){const i={"full-control":"full","read-write":"readwrite"},s=this.getUID();this.submitObservables.push(this.rgwUserService.createSubuser(s,{subuser:_.id,access:_.permissions in i?i[_.permissions]:_.permissions,key_type:"swift",secret_key:_.secret_key,generate_secret:_.generate_secret?"true":"false"})),E().isNumber(o)?this.subusers[o]=_:(this.subusers.push(_),this.swiftKeys.push({user:_.id,secret_key:_.generate_secret?"Apply your changes first...":_.secret_key})),this.userForm.markAsDirty()}deleteSubuser(_){const o=this.subusers[_];this.submitObservables.push(this.rgwUserService.deleteSubuser(this.getUID(),o.id)),this.s3Keys=this.s3Keys.filter(i=>i.user!==o.id),this.swiftKeys=this.swiftKeys.filter(i=>i.user!==o.id),this.subusers.splice(_,1),this.userForm.markAsDirty()}setCapability(_,o){const i=this.getUID();if(E().isNumber(o)){const s=this.capabilities[o];this.submitObservables.push(this.rgwUserService.deleteCapability(i,s.type,s.perm)),this.submitObservables.push(this.rgwUserService.addCapability(i,_.type,_.perm)),this.capabilities[o]=_}else this.submitObservables.push(this.rgwUserService.addCapability(i,_.type,_.perm)),this.capabilities=[...this.capabilities,_];this.userForm.markAsDirty()}deleteCapability(_){const o=this.capabilities[_];this.submitObservables.push(this.rgwUserService.deleteCapability(this.getUID(),o.type,o.perm)),this.capabilities.splice(_,1),this.capabilities=[...this.capabilities],this.userForm.markAsDirty()}hasAllCapabilities(_){return!E().difference(p_.getAll(),E().map(_,"type")).length}setS3Key(_,o){if(!E().isNumber(o)){const i=_.user.match(/([^:]+)(:(.+))?/),s=i[1],l={subuser:i[2]?i[3]:"",generate_key:_.generate_key?"true":"false"};"false"===l.generate_key&&(E().isNil(_.access_key)||(l.access_key=_.access_key),E().isNil(_.secret_key)||(l.secret_key=_.secret_key)),this.submitObservables.push(this.rgwUserService.addS3Key(s,l)),this.s3Keys.push({user:_.user,access_key:_.generate_key?"Apply your changes first...":_.access_key,secret_key:_.generate_key?"Apply your changes first...":_.secret_key})}this.userForm.markAsDirty()}deleteS3Key(_){const o=this.s3Keys[_];this.submitObservables.push(this.rgwUserService.deleteS3Key(this.getUID(),o.access_key)),this.s3Keys.splice(_,1),this.userForm.markAsDirty()}showSubuserModal(_){const o=this.getUID(),i=this.modalService.show(Pn);if(E().isNumber(_)){const s=this.subusers[_];i.componentInstance.setEditing(),i.componentInstance.setValues(o,s.id,s.permissions)}else i.componentInstance.setEditing(!1),i.componentInstance.setValues(o),i.componentInstance.setSubusers(this.subusers);i.componentInstance.submitAction.subscribe(s=>{this.setSubuser(s,_)})}showS3KeyModal(_){const o=this.modalService.show(m_);if(E().isNumber(_)){const i=this.s3Keys[_];o.componentInstance.setViewing(),o.componentInstance.setValues(i.user,i.access_key,i.secret_key)}else{const i=this._getS3KeyUserCandidates();o.componentInstance.setViewing(!1),o.componentInstance.setUserCandidates(i),o.componentInstance.submitAction.subscribe(s=>{this.setS3Key(s)})}}showSwiftKeyModal(_){const o=this.modalService.show(S_),i=this.swiftKeys[_];o.componentInstance.setValues(i.user,i.secret_key)}showCapabilityModal(_){const o=this.modalService.show(on);if(E().isNumber(_)){const i=this.capabilities[_];o.componentInstance.setEditing(),o.componentInstance.setValues(i.type,i.perm)}else o.componentInstance.setEditing(!1),o.componentInstance.setCapabilities(this.capabilities);o.componentInstance.submitAction.subscribe(i=>{this.setCapability(i,_)})}_isGeneralDirty(){return["display_name","email","max_buckets_mode","max_buckets","suspended"].some(_=>this.userForm.get(_).dirty)}_isUserQuotaDirty(){return["user_quota_enabled","user_quota_max_size_unlimited","user_quota_max_size","user_quota_max_objects_unlimited","user_quota_max_objects"].some(_=>this.userForm.get(_).dirty)}_isBucketQuotaDirty(){return["bucket_quota_enabled","bucket_quota_max_size_unlimited","bucket_quota_max_size","bucket_quota_max_objects_unlimited","bucket_quota_max_objects"].some(_=>this.userForm.get(_).dirty)}_getCreateArgs(){const _={uid:this.getUID(),display_name:this.userForm.getValue("display_name"),suspended:this.userForm.getValue("suspended"),email:"",max_buckets:this.userForm.getValue("max_buckets"),generate_key:this.userForm.getValue("generate_key"),access_key:"",secret_key:""},o=this.userForm.getValue("email");E().isString(o)&&o.length>0&&E().merge(_,{email:o}),this.userForm.getValue("generate_key")||E().merge(_,{generate_key:!1,access_key:this.userForm.getValue("access_key"),secret_key:this.userForm.getValue("secret_key")});const s=parseInt(this.userForm.getValue("max_buckets_mode"),10);return E().includes([-1,0],s)&&E().merge(_,{max_buckets:s}),_}_getUpdateArgs(){const _={},o=["display_name","email","max_buckets","suspended"];for(const s of o)_[s]=this.userForm.getValue(s);const i=parseInt(this.userForm.getValue("max_buckets_mode"),10);return E().includes([-1,0],i)&&(_.max_buckets=i),_}_getUserQuotaArgs(){const _={quota_type:"user",enabled:this.userForm.getValue("user_quota_enabled"),max_size_kb:-1,max_objects:-1};if(!this.userForm.getValue("user_quota_max_size_unlimited")){const o=(new Ke.H).toBytes(this.userForm.getValue("user_quota_max_size"));_.max_size_kb=(o/1024).toFixed(0)}return this.userForm.getValue("user_quota_max_objects_unlimited")||(_.max_objects=this.userForm.getValue("user_quota_max_objects")),_}_getBucketQuotaArgs(){const _={quota_type:"bucket",enabled:this.userForm.getValue("bucket_quota_enabled"),max_size_kb:-1,max_objects:-1};if(!this.userForm.getValue("bucket_quota_max_size_unlimited")){const o=(new Ke.H).toBytes(this.userForm.getValue("bucket_quota_max_size"));_.max_size_kb=(o/1024).toFixed(0)}return this.userForm.getValue("bucket_quota_max_objects_unlimited")||(_.max_objects=this.userForm.getValue("bucket_quota_max_objects")),_}_getS3KeyUserCandidates(){let _=[];const o=this.getUID();return E().isString(o)&&!E().isEmpty(o)&&_.push(o),this.subusers.forEach(i=>{_.push(i.id)}),this.s3Keys.forEach(i=>{_.push(i.user)}),_=E().uniq(_),_}onMaxBucketsModeChange(_){"1"===_&&(this.userForm.get("max_buckets").valid||this.userForm.patchValue({max_buckets:1e3}))}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(ae.O),e.Y36(J.gz),e.Y36(J.F0),e.Y36(Q),e.Y36(ee.Z),e.Y36(Y.g),e.Y36(I.p4))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-user-form"]],features:[e.qOj],decls:1,vars:1,consts:function(){let n,_,o,i,s,l,r,d,u,R,O,F,b,h,M,L,S,W,C,Z,D,U,v,y,f,P,N,te,A,Me,Se,Ce,Oe,Fe,Pe,Ne,Ge,Ae,Ie,be,he,Le,We,$e,Ze,De,Ue,ve,ye,we,p,W_,$_,Z_,D_,U_,v_,y_,w_,x_,k_,z_,q_,H_,X_,B_,Q_,Y_,J_,K_,V_;return n="" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",_="User ID",o="Show Tenant",i="Full name",s="Email address",l="Max. buckets",r="Disabled",d="Unlimited",u="Custom",R="Suspended",O="Suspending the user disables the user and subuser.",F="User quota",b="Enabled",h="Bucket quota",M="Enabled",L="This field is required.",S="The value is not valid.",W="The chosen user ID is already in use.",C="Tenant",Z="The value is not valid.",D="The chosen user ID exists in this tenant.",U="The value is not valid.",v="This field is required.",y="This is not a valid email address.",f="The chosen email address is already in use.",P="This field is required.",N="The entered value must be >= 1.",te="S3 key",A="Auto-generate key",Me="Access key",Se="This field is required.",Ce="Secret key",Oe="This field is required.",Fe="Subusers",Pe="" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",Ne="There are no subusers.",Ge="Edit",Ae="Delete",Ie="Keys",be="S3",he="" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",Le="Swift",We="There are no keys.",$e="Show",Ze="Delete",De="There are no keys.",Ue="Show",ve="Capabilities",ye="All capabilities are already added.",we="" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",p="There are no capabilities.",W_="Edit",$_="Delete",Z_="Unlimited size",D_="Max. size",U_="This field is required.",v_="The value is not valid.",y_="Size must be a number or in a valid format. eg: 5 GiB",w_="Unlimited objects",x_="Max. objects",k_="This field is required.",z_="The entered value must be >= 0.",q_="Unlimited size",H_="Max. size",X_="This field is required.",B_="The value is not valid.",Q_="Size must be a number or in a valid format. eg: 5 GiB",Y_="Unlimited objects",J_="Max. objects",K_="This field is required.",V_="The entered value must be >= 0.",[["class","cd-col-form",4,"cdFormLoading"],[1,"cd-col-form"],["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"card"],[1,"card-header"],n,[1,"card-body"],[1,"form-group","row"],["for","user_id",1,"cd-col-form-label",3,"ngClass"],_,[1,"cd-col-form-input"],["id","user_id","type","text","formControlName","user_id",1,"form-control",3,"readonly"],["class","invalid-feedback",4,"ngIf"],[1,"cd-col-form-offset"],[1,"custom-control","custom-checkbox"],["id","show_tenant","type","checkbox","formControlName","show_tenant",1,"custom-control-input",3,"readonly","click"],["for","show_tenant",1,"custom-control-label"],o,["class","form-group row",4,"ngIf"],["for","display_name",1,"cd-col-form-label",3,"ngClass"],i,["id","display_name","type","text","formControlName","display_name",1,"form-control"],["for","email",1,"cd-col-form-label"],s,["id","email","type","text","formControlName","email",1,"form-control"],["for","max_buckets_mode",1,"cd-col-form-label"],l,["formControlName","max_buckets_mode","name","max_buckets_mode","id","max_buckets_mode",1,"form-select",3,"change"],["value","-1"],r,["value","0"],d,["value","1"],u,["id","suspended","type","checkbox","formControlName","suspended",1,"custom-control-input"],["for","suspended",1,"custom-control-label"],R,O,[4,"ngIf"],F,["id","user_quota_enabled","type","checkbox","formControlName","user_quota_enabled",1,"custom-control-input"],["for","user_quota_enabled",1,"custom-control-label"],b,h,["id","bucket_quota_enabled","type","checkbox","formControlName","bucket_quota_enabled",1,"custom-control-input"],["for","bucket_quota_enabled",1,"custom-control-label"],M,[1,"card-footer"],["wrappingClass","text-right",3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],L,S,W,["for","tenant",1,"cd-col-form-label"],C,["id","tenant","type","text","formControlName","tenant","autofocus","",1,"form-control",3,"readonly"],Z,D,U,v,y,f,[1,"cd-col-form-label"],["id","max_buckets","type","number","formControlName","max_buckets","min","1",1,"form-control"],P,N,te,["id","generate_key","type","checkbox","formControlName","generate_key",1,"custom-control-input"],["for","generate_key",1,"custom-control-label"],A,["for","access_key",1,"cd-col-form-label","required"],Me,[1,"input-group"],["id","access_key","type","password","formControlName","access_key",1,"form-control"],["type","button","cdPasswordButton","access_key",1,"btn","btn-light"],["source","access_key"],Se,["for","secret_key",1,"cd-col-form-label","required"],Ce,["id","secret_key","type","password","formControlName","secret_key",1,"form-control"],["type","button","cdPasswordButton","secret_key",1,"btn","btn-light"],["source","secret_key"],Oe,Fe,[1,"row"],["class","no-border",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"row","my-2"],[1,"col-12"],["type","button",1,"btn","btn-light","float-end","tc_addSubuserButton",3,"click"],[3,"ngClass"],Pe,[1,"help-block"],[1,"no-border"],[1,"form-text","text-muted"],Ne,[1,"input-group-text"],["type","text","readonly","",1,"cd-form-control",3,"value"],["type","button","ngbTooltip",Ge,1,"btn","btn-light","tc_showSubuserButton",3,"click"],["type","button","ngbTooltip",Ae,1,"btn","btn-light","tc_deleteSubuserButton",3,"click"],Ie,be,["type","button",1,"btn","btn-light","float-end","tc_addS3KeyButton",3,"click"],he,Le,We,["type","button","ngbTooltip",$e,1,"btn","btn-light","tc_showS3KeyButton",3,"click"],["type","button","ngbTooltip",Ze,1,"btn","btn-light","tc_deleteS3KeyButton",3,"click"],De,["type","button","ngbTooltip",Ue,1,"btn","btn-light","tc_showSwiftKeyButton",3,"click"],ve,["type","button","ngbTooltip",ye,"triggers","pointerenter:pointerleave",1,"btn","btn-light","float-end","tc_addCapButton",3,"disabled","disableTooltip","click"],we,p,["type","button","ngbTooltip",W_,1,"btn","btn-light","tc_editCapButton",3,"click"],["type","button","ngbTooltip",$_,1,"btn","btn-light","tc_deleteCapButton",3,"click"],["id","user_quota_max_size_unlimited","type","checkbox","formControlName","user_quota_max_size_unlimited",1,"custom-control-input"],["for","user_quota_max_size_unlimited",1,"custom-control-label"],Z_,["for","user_quota_max_size",1,"cd-col-form-label","required"],D_,["id","user_quota_max_size","type","text","formControlName","user_quota_max_size","cdDimlessBinary","",1,"form-control"],U_,v_,y_,["id","user_quota_max_objects_unlimited","type","checkbox","formControlName","user_quota_max_objects_unlimited",1,"custom-control-input"],["for","user_quota_max_objects_unlimited",1,"custom-control-label"],w_,["for","user_quota_max_objects",1,"cd-col-form-label","required"],x_,["id","user_quota_max_objects","type","number","formControlName","user_quota_max_objects","min","0",1,"form-control"],k_,z_,["id","bucket_quota_max_size_unlimited","type","checkbox","formControlName","bucket_quota_max_size_unlimited",1,"custom-control-input"],["for","bucket_quota_max_size_unlimited",1,"custom-control-label"],q_,["for","bucket_quota_max_size",1,"cd-col-form-label","required"],H_,["id","bucket_quota_max_size","type","text","formControlName","bucket_quota_max_size","cdDimlessBinary","",1,"form-control"],X_,B_,Q_,["id","bucket_quota_max_objects_unlimited","type","checkbox","formControlName","bucket_quota_max_objects_unlimited",1,"custom-control-input"],["for","bucket_quota_max_objects_unlimited",1,"custom-control-label"],Y_,["for","bucket_quota_max_objects",1,"cd-col-form-label","required"],J_,["id","bucket_quota_max_objects","type","number","formControlName","bucket_quota_max_objects","min","0",1,"form-control"],K_,V_]},template:function(_,o){1&_&&e.YNc(0,Mi,92,42,"div",0),2&_&&e.Q6J("cdFormLoading",o.loading)},dependencies:[T.mk,T.sg,T.O5,j.S,pe.s,B.p,fe.U,Nn.Q,Xe.C,r_.y,k.o,q.b,z.P,H.V,a._Y,a.YN,a.Kr,a.Fj,a.wV,a.Wl,a.EJ,a.JJ,a.JL,a.qQ,a.sg,a.u,G._L,T.rS,_e.m,o_.i]}),t})();var F_=c(99466),Si=c(86969),Ci=c(78877);const Oi=["accessKeyTpl"],Fi=["secretKeyTpl"],Pi=function(t){return[t]};function Ni(t,n){if(1&t){const _=e.EpF();e.TgZ(0,"div")(1,"legend"),e.SDv(2,13),e.qZA(),e.TgZ(3,"div")(4,"cd-table",14),e.NdJ("updateSelection",function(i){e.CHM(_);const s=e.oxw(3);return e.KtG(s.updateKeysSelection(i))}),e.TgZ(5,"div",15)(6,"div",16)(7,"button",17),e.NdJ("click",function(){e.CHM(_);const i=e.oxw(3);return e.KtG(i.showKeyModal())}),e._UZ(8,"i",18),e.ynx(9),e.SDv(10,19),e.BQk(),e.qZA()()()()()()}if(2&t){const _=e.oxw(3);e.xp6(4),e.Q6J("data",_.keys)("columns",_.keysColumns),e.xp6(3),e.Q6J("disabled",!_.keysSelection.hasSingleSelection),e.xp6(1),e.Q6J("ngClass",e.VKq(4,Pi,_.icons.show))}}function Gi(t,n){if(1&t&&(e.TgZ(0,"tr")(1,"td",8),e.SDv(2,20),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA()()),2&t){const _=e.oxw(3);e.xp6(4),e.Oqu(_.user.email)}}function Ai(t,n){if(1&t&&(e.TgZ(0,"div"),e._uU(1),e.qZA()),2&t){const _=n.$implicit;e.xp6(1),e.AsE(" ",_.id," (",_.permissions,") ")}}function Ii(t,n){if(1&t&&(e.TgZ(0,"tr")(1,"td",8),e.SDv(2,21),e.qZA(),e.TgZ(3,"td"),e.YNc(4,Ai,2,2,"div",22),e.qZA()()),2&t){const _=e.oxw(3);e.xp6(4),e.Q6J("ngForOf",_.user.subusers)}}function bi(t,n){if(1&t&&(e.TgZ(0,"div"),e._uU(1),e.qZA()),2&t){const _=n.$implicit;e.xp6(1),e.AsE(" ",_.type," (",_.perm,") ")}}function hi(t,n){if(1&t&&(e.TgZ(0,"tr")(1,"td",8),e.SDv(2,23),e.qZA(),e.TgZ(3,"td"),e.YNc(4,bi,2,2,"div",22),e.qZA()()),2&t){const _=e.oxw(3);e.xp6(4),e.Q6J("ngForOf",_.user.caps)}}function Li(t,n){if(1&t&&(e.TgZ(0,"tr")(1,"td",8),e.SDv(2,24),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.ALo(5,"join"),e.qZA()()),2&t){const _=e.oxw(3);e.xp6(4),e.Oqu(e.lcZ(5,1,_.user.mfa_ids))}}function Wi(t,n){1&t&&(e.TgZ(0,"td"),e._uU(1,"-"),e.qZA())}function $i(t,n){1&t&&(e.TgZ(0,"td"),e.SDv(1,29),e.qZA())}function Zi(t,n){if(1&t&&(e.TgZ(0,"td"),e._uU(1),e.ALo(2,"dimlessBinary"),e.qZA()),2&t){const _=e.oxw(4);e.xp6(1),e.hij(" ",e.lcZ(2,1,_.user.user_quota.max_size)," ")}}function Di(t,n){1&t&&(e.TgZ(0,"td"),e._uU(1,"-"),e.qZA())}function Ui(t,n){1&t&&(e.TgZ(0,"td"),e.SDv(1,30),e.qZA())}function vi(t,n){if(1&t&&(e.TgZ(0,"td"),e._uU(1),e.qZA()),2&t){const _=e.oxw(4);e.xp6(1),e.hij(" ",_.user.user_quota.max_objects," ")}}function yi(t,n){if(1&t&&(e.TgZ(0,"div")(1,"legend"),e.SDv(2,25),e.qZA(),e.TgZ(3,"table",2)(4,"tbody")(5,"tr")(6,"td",3),e.SDv(7,26),e.qZA(),e.TgZ(8,"td",5),e._uU(9),e.ALo(10,"booleanText"),e.qZA()(),e.TgZ(11,"tr")(12,"td",8),e.SDv(13,27),e.qZA(),e.YNc(14,Wi,2,0,"td",0),e.YNc(15,$i,2,0,"td",0),e.YNc(16,Zi,3,3,"td",0),e.qZA(),e.TgZ(17,"tr")(18,"td",8),e.SDv(19,28),e.qZA(),e.YNc(20,Di,2,0,"td",0),e.YNc(21,Ui,2,0,"td",0),e.YNc(22,vi,2,1,"td",0),e.qZA()()()()),2&t){const _=e.oxw(3);e.xp6(9),e.Oqu(e.lcZ(10,7,_.user.user_quota.enabled)),e.xp6(5),e.Q6J("ngIf",!_.user.user_quota.enabled),e.xp6(1),e.Q6J("ngIf",_.user.user_quota.enabled&&_.user.user_quota.max_size<=-1),e.xp6(1),e.Q6J("ngIf",_.user.user_quota.enabled&&_.user.user_quota.max_size>-1),e.xp6(4),e.Q6J("ngIf",!_.user.user_quota.enabled),e.xp6(1),e.Q6J("ngIf",_.user.user_quota.enabled&&_.user.user_quota.max_objects<=-1),e.xp6(1),e.Q6J("ngIf",_.user.user_quota.enabled&&_.user.user_quota.max_objects>-1)}}function wi(t,n){1&t&&(e.TgZ(0,"td"),e._uU(1,"-"),e.qZA())}function xi(t,n){1&t&&(e.TgZ(0,"td"),e.SDv(1,35),e.qZA())}function ki(t,n){if(1&t&&(e.TgZ(0,"td"),e._uU(1),e.ALo(2,"dimlessBinary"),e.qZA()),2&t){const _=e.oxw(4);e.xp6(1),e.hij(" ",e.lcZ(2,1,_.user.bucket_quota.max_size)," ")}}function zi(t,n){1&t&&(e.TgZ(0,"td"),e._uU(1,"-"),e.qZA())}function qi(t,n){1&t&&(e.TgZ(0,"td"),e.SDv(1,36),e.qZA())}function Hi(t,n){if(1&t&&(e.TgZ(0,"td"),e._uU(1),e.qZA()),2&t){const _=e.oxw(4);e.xp6(1),e.hij(" ",_.user.bucket_quota.max_objects," ")}}function Xi(t,n){if(1&t&&(e.TgZ(0,"div")(1,"legend"),e.SDv(2,31),e.qZA(),e.TgZ(3,"table",2)(4,"tbody")(5,"tr")(6,"td",3),e.SDv(7,32),e.qZA(),e.TgZ(8,"td",5),e._uU(9),e.ALo(10,"booleanText"),e.qZA()(),e.TgZ(11,"tr")(12,"td",8),e.SDv(13,33),e.qZA(),e.YNc(14,wi,2,0,"td",0),e.YNc(15,xi,2,0,"td",0),e.YNc(16,ki,3,3,"td",0),e.qZA(),e.TgZ(17,"tr")(18,"td",8),e.SDv(19,34),e.qZA(),e.YNc(20,zi,2,0,"td",0),e.YNc(21,qi,2,0,"td",0),e.YNc(22,Hi,2,1,"td",0),e.qZA()()()()),2&t){const _=e.oxw(3);e.xp6(9),e.Oqu(e.lcZ(10,7,_.user.bucket_quota.enabled)),e.xp6(5),e.Q6J("ngIf",!_.user.bucket_quota.enabled),e.xp6(1),e.Q6J("ngIf",_.user.bucket_quota.enabled&&_.user.bucket_quota.max_size<=-1),e.xp6(1),e.Q6J("ngIf",_.user.bucket_quota.enabled&&_.user.bucket_quota.max_size>-1),e.xp6(4),e.Q6J("ngIf",!_.user.bucket_quota.enabled),e.xp6(1),e.Q6J("ngIf",_.user.bucket_quota.enabled&&_.user.bucket_quota.max_objects<=-1),e.xp6(1),e.Q6J("ngIf",_.user.bucket_quota.enabled&&_.user.bucket_quota.max_objects>-1)}}function Bi(t,n){if(1&t&&(e.TgZ(0,"div"),e.YNc(1,Ni,11,6,"div",0),e.TgZ(2,"legend"),e.SDv(3,1),e.qZA(),e.TgZ(4,"table",2)(5,"tbody")(6,"tr")(7,"td",3),e.SDv(8,4),e.qZA(),e.TgZ(9,"td",5),e._uU(10),e.qZA()(),e.TgZ(11,"tr")(12,"td",3),e.SDv(13,6),e.qZA(),e.TgZ(14,"td",5),e._uU(15),e.qZA()(),e.TgZ(16,"tr")(17,"td",3),e.SDv(18,7),e.qZA(),e.TgZ(19,"td",5),e._uU(20),e.qZA()(),e.TgZ(21,"tr")(22,"td",8),e.SDv(23,9),e.qZA(),e.TgZ(24,"td"),e._uU(25),e.qZA()(),e.YNc(26,Gi,5,1,"tr",0),e.TgZ(27,"tr")(28,"td",8),e.SDv(29,10),e.qZA(),e.TgZ(30,"td"),e._uU(31),e.ALo(32,"booleanText"),e.qZA()(),e.TgZ(33,"tr")(34,"td",8),e.SDv(35,11),e.qZA(),e.TgZ(36,"td"),e._uU(37),e.ALo(38,"booleanText"),e.qZA()(),e.TgZ(39,"tr")(40,"td",8),e.SDv(41,12),e.qZA(),e.TgZ(42,"td"),e._uU(43),e.ALo(44,"map"),e.qZA()(),e.YNc(45,Ii,5,1,"tr",0),e.YNc(46,hi,5,1,"tr",0),e.YNc(47,Li,6,3,"tr",0),e.qZA()(),e.YNc(48,yi,23,9,"div",0),e.YNc(49,Xi,23,9,"div",0),e.qZA()),2&t){const _=e.oxw(2);e.xp6(1),e.Q6J("ngIf",_.keys.length),e.xp6(9),e.Oqu(_.user.tenant),e.xp6(5),e.Oqu(_.user.user_id),e.xp6(5),e.Oqu(_.user.uid),e.xp6(5),e.Oqu(_.user.display_name),e.xp6(1),e.Q6J("ngIf",null==_.user.email?null:_.user.email.length),e.xp6(5),e.Oqu(e.lcZ(32,14,_.user.suspended)),e.xp6(6),e.Oqu(e.lcZ(38,16,"true"===_.user.system)),e.xp6(6),e.Oqu(e.xi3(44,18,_.user.max_buckets,_.maxBucketsMap)),e.xp6(2),e.Q6J("ngIf",_.user.subusers&&_.user.subusers.length),e.xp6(1),e.Q6J("ngIf",_.user.caps&&_.user.caps.length),e.xp6(1),e.Q6J("ngIf",null==_.user.mfa_ids?null:_.user.mfa_ids.length),e.xp6(1),e.Q6J("ngIf",_.user.user_quota),e.xp6(1),e.Q6J("ngIf",_.user.bucket_quota)}}function Qi(t,n){if(1&t&&(e.ynx(0),e.YNc(1,Bi,50,21,"div",0),e.BQk()),2&t){const _=e.oxw();e.xp6(1),e.Q6J("ngIf",_.user)}}let Yi=(()=>{class t{constructor(_,o){this.rgwUserService=_,this.modalService=o,this.keys=[],this.keysColumns=[],this.keysSelection=new qe.r,this.icons=$.P}ngOnInit(){this.keysColumns=[{name:"Username",prop:"username",flexGrow:1},{name:"Type",prop:"type",flexGrow:1}],this.maxBucketsMap={"-1":"Disabled",0:"Unlimited"}}ngOnChanges(){this.selection&&(this.user=this.selection,this.user.subusers=E().sortBy(this.user.subusers,"id"),this.user.caps=E().sortBy(this.user.caps,"type"),this.rgwUserService.getQuota(this.user.uid).subscribe(_=>{E().extend(this.user,_)}),this.keys=[],this.user.keys&&this.user.keys.forEach(_=>{this.keys.push({id:this.keys.length+1,type:"S3",username:_.user,ref:_})}),this.user.swift_keys&&this.user.swift_keys.forEach(_=>{this.keys.push({id:this.keys.length+1,type:"Swift",username:_.user,ref:_})}),this.keys=E().sortBy(this.keys,"user"))}updateKeysSelection(_){this.keysSelection=_}showKeyModal(){const _=this.keysSelection.first(),o=this.modalService.show("S3"===_.type?m_:S_);switch(_.type){case"S3":o.componentInstance.setViewing(),o.componentInstance.setValues(_.ref.user,_.ref.access_key,_.ref.secret_key);break;case"Swift":o.componentInstance.setValues(_.ref.user,_.ref.secret_key)}}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(Q),e.Y36(ee.Z))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-user-details"]],viewQuery:function(_,o){if(1&_&&(e.Gf(Oi,5),e.Gf(Fi,5)),2&_){let i;e.iGM(i=e.CRH())&&(o.accessKeyTpl=i.first),e.iGM(i=e.CRH())&&(o.secretKeyTpl=i.first)}},inputs:{selection:"selection"},features:[e.TTD],decls:1,vars:1,consts:function(){let n,_,o,i,s,l,r,d,u,R,O,F,b,h,M,L,S,W,C,Z,D,U,v,y,f,P;return n="Details",_="Tenant",o="User ID",i="Username",s="Full name",l="Suspended",r="System",d="Maximum buckets",u="Keys",R="Show",O="Email address",F="Subusers",b="Capabilities",h="MFAs(Id)",M="User quota",L="Enabled",S="Maximum size",W="Maximum objects",C="Unlimited",Z="Unlimited",D="Bucket quota",U="Enabled",v="Maximum size",y="Maximum objects",f="Unlimited",P="Unlimited",[[4,"ngIf"],n,[1,"table","table-striped","table-bordered"],[1,"bold","w-25"],_,[1,"w-75"],o,i,[1,"bold"],s,l,r,d,u,["columnMode","flex","selectionType","multi","forceIdentifier","true",3,"data","columns","updateSelection"],[1,"table-actions"],["dropdown","",1,"btn-group"],["type","button",1,"btn","btn-accent",3,"disabled","click"],[3,"ngClass"],R,O,F,[4,"ngFor","ngForOf"],b,h,M,L,S,W,C,Z,D,U,v,y,f,P]},template:function(_,o){1&_&&e.YNc(0,Qi,2,1,"ng-container",0),2&_&&e.Q6J("ngIf",o.selection)},dependencies:[T.mk,T.sg,T.O5,le.a,k.o,T_.T,Ye.$,Si.A,Ci.b]}),t})();const P_=function(){return{exact:!0}};let Ji=(()=>{class t{}return t.\u0275fac=function(_){return new(_||t)},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-user-tabs"]],decls:7,vars:4,consts:function(){let n,_;return n="Users",_="Roles",[[1,"nav","nav-tabs"],[1,"nav-item"],["routerLink","/rgw/user","routerLinkActive","active","ariaCurrentWhenActive","page",1,"nav-link",3,"routerLinkActiveOptions"],n,["routerLink","/rgw/roles","routerLinkActive","active","ariaCurrentWhenActive","page",1,"nav-link",3,"routerLinkActiveOptions"],_]},template:function(_,o){1&_&&(e.TgZ(0,"ul",0)(1,"li",1)(2,"a",2),e.SDv(3,3),e.qZA()(),e.TgZ(4,"li",1)(5,"a",4),e.SDv(6,5),e.qZA()()()),2&_&&(e.xp6(2),e.Q6J("routerLinkActiveOptions",e.DdM(2,P_)),e.xp6(3),e.Q6J("routerLinkActiveOptions",e.DdM(3,P_)))},dependencies:[J.rH,J.Od]}),t})();const Ki=["userSizeTpl"],Vi=["userObjectTpl"];function ji(t,n){if(1&t&&e._UZ(0,"cd-usage-bar",8),2&t){const _=e.oxw().row;e.Q6J("total",_.user_quota.max_size)("used",_.stats.size_actual)}}function es(t,n){1&t&&e.SDv(0,9)}function _s(t,n){if(1&t&&(e.YNc(0,ji,1,2,"cd-usage-bar",6),e.YNc(1,es,1,0,"ng-template",null,7,e.W1O)),2&t){const _=n.row,o=e.MAs(2);e.Q6J("ngIf",_.user_quota.max_size>0&&_.user_quota.enabled)("ngIfElse",o)}}function ts(t,n){if(1&t&&e._UZ(0,"cd-usage-bar",12),2&t){const _=e.oxw().row;e.Q6J("total",_.user_quota.max_objects)("used",_.stats.num_objects)("isBinary",!1)}}function os(t,n){1&t&&e.SDv(0,13)}function ns(t,n){if(1&t&&(e.YNc(0,ts,1,3,"cd-usage-bar",10),e.YNc(1,os,1,0,"ng-template",null,11,e.W1O)),2&t){const _=n.row,o=e.MAs(2);e.Q6J("ngIf",_.user_quota.max_objects>0&&_.user_quota.enabled)("ngIfElse",o)}}let ss=(()=>{class t extends Be.o{constructor(_,o,i,s,l,r){super(r),this.authStorageService=_,this.rgwUserService=o,this.modalService=i,this.urlBuilder=s,this.actionLabels=l,this.ngZone=r,this.columns=[],this.users=[],this.selection=new qe.r}ngOnInit(){this.permission=this.authStorageService.getPermissions().rgw,this.columns=[{name:"Username",prop:"uid",flexGrow:1},{name:"Tenant",prop:"tenant",flexGrow:1},{name:"Full name",prop:"display_name",flexGrow:1},{name:"Email address",prop:"email",flexGrow:1},{name:"Suspended",prop:"suspended",flexGrow:1,cellClass:"text-center",cellTransformation:F_.e.checkIcon},{name:"Max. buckets",prop:"max_buckets",flexGrow:1,cellTransformation:F_.e.map,customTemplateConfig:{"-1":"Disabled",0:"Unlimited"}},{name:"Capacity Limit %",prop:"size_usage",cellTemplate:this.userSizeTpl,flexGrow:.8},{name:"Object Limit %",prop:"object_usage",cellTemplate:this.userObjectTpl,flexGrow:.8}];const _=()=>this.selection.first()&&`${encodeURIComponent(this.selection.first().uid)}`;this.tableActions=[{permission:"create",icon:$.P.add,routerLink:()=>this.urlBuilder.getCreate(),name:this.actionLabels.CREATE,canBePrimary:l=>!l.hasSelection},{permission:"update",icon:$.P.edit,routerLink:()=>this.urlBuilder.getEdit(_()),name:this.actionLabels.EDIT},{permission:"delete",icon:$.P.destroy,click:()=>this.deleteAction(),disable:()=>!this.selection.hasSelection,name:this.actionLabels.DELETE,canBePrimary:l=>l.hasMultiSelection}],this.setTableRefreshTimeout()}getUserList(_){this.setTableRefreshTimeout(),this.rgwUserService.list().subscribe(o=>{this.users=o},()=>{_.error()})}updateSelection(_){this.selection=_}deleteAction(){this.modalService.show(Qe.M,{itemDescription:this.selection.hasSingleSelection?"user":"users",itemNames:this.selection.selected.map(_=>_.uid),submitActionObservable:()=>new u_.y(_=>{(0,ne.D)(this.selection.selected.map(o=>this.rgwUserService.delete(o.uid))).subscribe({error:o=>{_.error(o),this.table.refreshBtn()},complete:()=>{_.complete(),this.table.refreshBtn()}})})})}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(ce.j),e.Y36(Q),e.Y36(ee.Z),e.Y36(re.F),e.Y36(I.p4),e.Y36(e.R0b))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-user-list"]],viewQuery:function(_,o){if(1&_&&(e.Gf(le.a,7),e.Gf(Ki,7),e.Gf(Vi,7)),2&_){let i;e.iGM(i=e.CRH())&&(o.table=i.first),e.iGM(i=e.CRH())&&(o.userSizeTpl=i.first),e.iGM(i=e.CRH())&&(o.userObjectTpl=i.first)}},features:[e._Bn([{provide:re.F,useValue:new re.F("rgw/user")}]),e.qOj],decls:9,vars:9,consts:function(){let n,_;return n="No Limit",_="No Limit",[["columnMode","flex","selectionType","multiClick","identifier","uid",3,"autoReload","data","columns","hasDetails","status","setExpandedRow","updateSelection","fetchData"],["table",""],[1,"table-actions",3,"permission","selection","tableActions"],["cdTableDetail","",3,"selection"],["userSizeTpl",""],["userObjectTpl",""],[3,"total","used",4,"ngIf","ngIfElse"],["noSizeQuota",""],[3,"total","used"],n,[3,"total","used","isBinary",4,"ngIf","ngIfElse"],["noObjectQuota",""],[3,"total","used","isBinary"],_]},template:function(_,o){1&_&&(e._UZ(0,"cd-rgw-user-tabs"),e.TgZ(1,"cd-table",0,1),e.NdJ("setExpandedRow",function(s){return o.setExpandedRow(s)})("updateSelection",function(s){return o.updateSelection(s)})("fetchData",function(s){return o.getUserList(s)}),e._UZ(3,"cd-table-actions",2)(4,"cd-rgw-user-details",3),e.qZA(),e.YNc(5,_s,3,2,"ng-template",null,4,e.W1O),e.YNc(7,ns,3,2,"ng-template",null,5,e.W1O)),2&_&&(e.xp6(1),e.Q6J("autoReload",!1)("data",o.users)("columns",o.columns)("hasDetails",!0)("status",o.tableStatus),e.xp6(2),e.Q6J("permission",o.permission)("selection",o.selection)("tableActions",o.tableActions),e.xp6(1),e.Q6J("selection",o.expandedRow))},dependencies:[T.O5,R_.O,le.a,Je.K,Yi,Ji]}),t})();var as=c(83357),je=c(62946),N_=c(13464),ls=c(46797),de=c(95596),e_=c(80381),V=c(95463),x=c(43186),ue=c(97937),ge=c(98961);function rs(t,n){1&t&&(e.TgZ(0,"span",32),e.SDv(1,33),e.qZA())}function cs(t,n){1&t&&(e.TgZ(0,"span",32),e.SDv(1,34),e.qZA())}function ds(t,n){1&t&&(e.TgZ(0,"span",32),e.SDv(1,35),e.qZA())}function us(t,n){1&t&&(e.TgZ(0,"span",32),e.SDv(1,36),e.qZA())}function gs(t,n){1&t&&(e.TgZ(0,"span",32),e.SDv(1,37),e.qZA())}function Rs(t,n){1&t&&(e.TgZ(0,"span",32),e.SDv(1,38),e.qZA())}function Ts(t,n){1&t&&(e.TgZ(0,"span",32),e.SDv(1,39),e.qZA())}function Es(t,n){1&t&&(e.TgZ(0,"span",32),e.SDv(1,40),e.qZA())}function fs(t,n){1&t&&(e.TgZ(0,"span",32),e.SDv(1,41),e.qZA())}function ps(t,n){1&t&&(e.TgZ(0,"span",32),e.SDv(1,42),e.qZA())}let ms=(()=>{class t{constructor(_,o,i,s,l,r,d,u,R){this.activeModal=_,this.actionLabels=o,this.rgwMultisiteService=i,this.rgwZoneService=s,this.notificationService=l,this.rgwZonegroupService=r,this.rgwRealmService=d,this.rgwDaemonService=u,this.modalService=R,this.endpoints=/^((https?:\/\/)|(www.))(?:([a-zA-Z]+)|(\d+\.\d+.\d+.\d+)):\d{2,4}$/,this.ipv4Rgx=/^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/i,this.ipv6Rgx=/^(?:[a-f0-9]{1,4}:){7}[a-f0-9]{1,4}$/i,this.submitAction=new e.vpe,this.multisiteInfo=[],this.createForm()}createForm(){this.multisiteMigrateForm=new V.d({realmName:new a.p4(null,{validators:[a.kI.required,m.h.custom("uniqueName",_=>this.realmNames&&-1!==this.zoneNames.indexOf(_))]}),zonegroupName:new a.p4(null,{validators:[a.kI.required,m.h.custom("uniqueName",_=>this.zonegroupNames&&-1!==this.zoneNames.indexOf(_))]}),zoneName:new a.p4(null,{validators:[a.kI.required,m.h.custom("uniqueName",_=>this.zoneNames&&-1!==this.zoneNames.indexOf(_))]}),zone_endpoints:new a.p4([],{validators:[m.h.custom("endpoint",_=>!(E().isEmpty(_)||(_.includes(",")?(_.split(",").forEach(o=>!this.endpoints.test(o)&&!this.ipv4Rgx.test(o)&&!this.ipv6Rgx.test(o)),1):this.endpoints.test(_)||this.ipv4Rgx.test(_)||this.ipv6Rgx.test(_)))),a.kI.required]}),zonegroup_endpoints:new a.p4([],[m.h.custom("endpoint",_=>!(E().isEmpty(_)||(_.includes(",")?(_.split(",").forEach(o=>!this.endpoints.test(o)&&!this.ipv4Rgx.test(o)&&!this.ipv6Rgx.test(o)),1):this.endpoints.test(_)||this.ipv4Rgx.test(_)||this.ipv6Rgx.test(_)))),a.kI.required]),access_key:new a.p4(null),secret_key:new a.p4(null)})}ngOnInit(){this.realmList=void 0!==this.multisiteInfo[0]&&this.multisiteInfo[0].hasOwnProperty("realms")?this.multisiteInfo[0].realms:[],this.realmNames=this.realmList.map(_=>_.name),this.zonegroupList=void 0!==this.multisiteInfo[1]&&this.multisiteInfo[1].hasOwnProperty("zonegroups")?this.multisiteInfo[1].zonegroups:[],this.zonegroupNames=this.zonegroupList.map(_=>_.name),this.zoneList=void 0!==this.multisiteInfo[2]&&this.multisiteInfo[2].hasOwnProperty("zones")?this.multisiteInfo[2].zones:[],this.zoneNames=this.zoneList.map(_=>_.name)}submit(){const _=this.multisiteMigrateForm.value;this.realm=new x.L6,this.realm.name=_.realmName,this.zonegroup=new x.iG,this.zonegroup.name=_.zonegroupName,this.zonegroup.endpoints=_.zonegroup_endpoints,this.zone=new x.jb,this.zone.name=_.zoneName,this.zone.endpoints=_.zone_endpoints,this.zone.system_key=new x.VY,this.zone.system_key.access_key=_.access_key,this.zone.system_key.secret_key=_.secret_key,this.rgwMultisiteService.migrate(this.realm,this.zonegroup,this.zone).subscribe(()=>{this.notificationService.show(w.k.success,"" + this.actionLabels.MIGRATE + " done successfully"),this.submitAction.emit(),this.activeModal.close()},()=>{this.notificationService.show(w.k.error,"Migration failed")})}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(G.Kz),e.Y36(I.p4),e.Y36(e_.o),e.Y36(ue.g),e.Y36(Y.g),e.Y36(ge.K),e.Y36(de.y),e.Y36(oe.b),e.Y36(ee.Z))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-multisite-migrate"]],outputs:{submitAction:"submitAction"},decls:68,vars:14,consts:function(){let n,_,o,i,s,l,r,d,u,R,O,F,b,h,M,L,S,W;return n="Migrate Single Site to Multi-Site " + "\ufffd#3\ufffd" + "" + "\ufffd#4\ufffd" + "Migrate from a single-site deployment with a default zone group and zone to a multi-site system" + "\ufffd/#4\ufffd" + "" + "\ufffd/#3\ufffd" + "",_="Realm Name",o="Rename default zone group",i="Zone group Endpoints ",s="Rename default zone",l="Zone Endpoints ",r="S3 access key " + "\ufffd#47\ufffd" + "" + "\ufffd#48\ufffd" + "To see or copy your S3 access key, go to " + "[\ufffd#49\ufffd|\ufffd#50\ufffd|\ufffd#51\ufffd|\ufffd#52\ufffd]" + "Object Gateway > Users" + "[\ufffd/#49\ufffd|\ufffd/#50\ufffd|\ufffd/#51\ufffd|\ufffd/#52\ufffd]" + " and click on your user name. In " + "[\ufffd#49\ufffd|\ufffd#50\ufffd|\ufffd#51\ufffd|\ufffd#52\ufffd]" + "Keys" + "[\ufffd/#49\ufffd|\ufffd/#50\ufffd|\ufffd/#51\ufffd|\ufffd/#52\ufffd]" + ", click " + "[\ufffd#49\ufffd|\ufffd#50\ufffd|\ufffd#51\ufffd|\ufffd#52\ufffd]" + "Show" + "[\ufffd/#49\ufffd|\ufffd/#50\ufffd|\ufffd/#51\ufffd|\ufffd/#52\ufffd]" + ". View the access key by clicking Show and copy the key by clicking " + "[\ufffd#49\ufffd|\ufffd#50\ufffd|\ufffd#51\ufffd|\ufffd#52\ufffd]" + "Copy to Clipboard" + "[\ufffd/#49\ufffd|\ufffd/#50\ufffd|\ufffd/#51\ufffd|\ufffd/#52\ufffd]" + "." + "\ufffd/#48\ufffd" + "" + "\ufffd/#47\ufffd" + "",r=e.Zx4(r),d="S3 secret key " + "\ufffd#58\ufffd" + "" + "\ufffd#59\ufffd" + "To see or copy your S3 access key, go to " + "[\ufffd#60\ufffd|\ufffd#61\ufffd|\ufffd#62\ufffd|\ufffd#63\ufffd]" + "Object Gateway > Users" + "[\ufffd/#60\ufffd|\ufffd/#61\ufffd|\ufffd/#62\ufffd|\ufffd/#63\ufffd]" + " and click on your user name. In " + "[\ufffd#60\ufffd|\ufffd#61\ufffd|\ufffd#62\ufffd|\ufffd#63\ufffd]" + "Keys" + "[\ufffd/#60\ufffd|\ufffd/#61\ufffd|\ufffd/#62\ufffd|\ufffd/#63\ufffd]" + ", click " + "[\ufffd#60\ufffd|\ufffd#61\ufffd|\ufffd#62\ufffd|\ufffd#63\ufffd]" + "Show" + "[\ufffd/#60\ufffd|\ufffd/#61\ufffd|\ufffd/#62\ufffd|\ufffd/#63\ufffd]" + ". View the secret key by clicking Show and copy the key by clicking " + "[\ufffd#60\ufffd|\ufffd#61\ufffd|\ufffd#62\ufffd|\ufffd#63\ufffd]" + "Copy to Clipboard" + "[\ufffd/#60\ufffd|\ufffd/#61\ufffd|\ufffd/#62\ufffd|\ufffd/#63\ufffd]" + "." + "\ufffd/#59\ufffd" + "" + "\ufffd/#58\ufffd" + "",d=e.Zx4(d),u="This field is required.",R="The chosen realm name is already in use.",O="This field is required.",F="The chosen zone group name is already in use.",b="This field is required.",h="Please enter a valid IP address.",M="This field is required.",L="The chosen zone name is already in use.",S="This field is required.",W="Please enter a valid IP address.",[[3,"modalRef"],[1,"modal-title"],n,[1,"modal-content"],["name","multisiteMigrateForm","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","realmName",1,"cd-col-form-label","required"],_,[1,"cd-col-form-input"],["type","text","placeholder","Realm name...","id","realmName","name","realmName","formControlName","realmName",1,"form-control"],["class","invalid-feedback",4,"ngIf"],["for","zonegroupName",1,"cd-col-form-label","required"],o,["type","text","placeholder","Zone group name...","id","zonegroupName","name","zonegroupName","formControlName","zonegroupName",1,"form-control"],["for","zonegroup_endpoints",1,"cd-col-form-label","required"],i,["type","text","placeholder","e.g, http://ceph-node-00.com:80","id","zonegroup_endpoints","name","zonegroup_endpoints","formControlName","zonegroup_endpoints",1,"form-control"],["for","zoneName",1,"cd-col-form-label","required"],s,["type","text","placeholder","Zone name...","id","zoneName","name","zoneName","formControlName","zoneName",1,"form-control"],["for","zone_endpoints",1,"cd-col-form-label","required"],l,["type","text","placeholder","e.g, http://ceph-node-00.com:80","id","zone_endpoints","name","zone_endpoints","formControlName","zone_endpoints",1,"form-control"],["for","access_key",1,"cd-col-form-label","required"],r,["type","text","placeholder","e.g.","id","access_key","name","access_key","formControlName","access_key",1,"form-control"],d,["type","text","placeholder","e.g.","id","secret_key","name","secret_key","formControlName","secret_key",1,"form-control"],[1,"modal-footer"],[3,"submitText","form","submitActionEvent"],[1,"invalid-feedback"],u,R,O,F,b,h,M,L,S,W]},template:function(_,o){if(1&_&&(e.TgZ(0,"cd-modal",0),e.ynx(1,1),e.tHW(2,2),e.TgZ(3,"cd-helper"),e._UZ(4,"span"),e.qZA(),e.N_p(),e.BQk(),e.ynx(5,3),e.TgZ(6,"form",4,5)(8,"div",6)(9,"div",7)(10,"label",8),e.SDv(11,9),e.qZA(),e.TgZ(12,"div",10),e._UZ(13,"input",11),e.YNc(14,rs,2,0,"span",12),e.YNc(15,cs,2,0,"span",12),e.qZA()(),e.TgZ(16,"div",7)(17,"label",13),e.SDv(18,14),e.qZA(),e.TgZ(19,"div",10),e._UZ(20,"input",15),e.YNc(21,ds,2,0,"span",12),e.YNc(22,us,2,0,"span",12),e.qZA()(),e.TgZ(23,"div",7)(24,"label",16),e.SDv(25,17),e.qZA(),e.TgZ(26,"div",10),e._UZ(27,"input",18),e.YNc(28,gs,2,0,"span",12),e.YNc(29,Rs,2,0,"span",12),e.qZA()(),e.TgZ(30,"div",7)(31,"label",19),e.SDv(32,20),e.qZA(),e.TgZ(33,"div",10),e._UZ(34,"input",21),e.YNc(35,Ts,2,0,"span",12),e.YNc(36,Es,2,0,"span",12),e.qZA()(),e.TgZ(37,"div",7)(38,"label",22),e.SDv(39,23),e.qZA(),e.TgZ(40,"div",10),e._UZ(41,"input",24),e.YNc(42,fs,2,0,"span",12),e.YNc(43,ps,2,0,"span",12),e.qZA()(),e.TgZ(44,"div",7)(45,"label",25),e.tHW(46,26),e.TgZ(47,"cd-helper")(48,"span"),e._UZ(49,"b")(50,"b")(51,"b")(52,"b"),e.qZA()(),e.N_p(),e.qZA(),e.TgZ(53,"div",10),e._UZ(54,"input",27),e.qZA()(),e.TgZ(55,"div",7)(56,"label",25),e.tHW(57,28),e.TgZ(58,"cd-helper")(59,"span"),e._UZ(60,"b")(61,"b")(62,"b")(63,"b"),e.qZA()(),e.N_p(),e.qZA(),e.TgZ(64,"div",10),e._UZ(65,"input",29),e.qZA()()(),e.TgZ(66,"div",30)(67,"cd-form-button-panel",31),e.NdJ("submitActionEvent",function(){return o.submit()}),e.qZA()()(),e.BQk(),e.qZA()),2&_){const i=e.MAs(7);e.Q6J("modalRef",o.activeModal),e.xp6(6),e.Q6J("formGroup",o.multisiteMigrateForm),e.xp6(8),e.Q6J("ngIf",o.multisiteMigrateForm.showError("realmName",i,"required")),e.xp6(1),e.Q6J("ngIf",o.multisiteMigrateForm.showError("realmName",i,"uniqueName")),e.xp6(6),e.Q6J("ngIf",o.multisiteMigrateForm.showError("zonegroupName",i,"required")),e.xp6(1),e.Q6J("ngIf",o.multisiteMigrateForm.showError("zonegroupName",i,"uniqueName")),e.xp6(6),e.Q6J("ngIf",o.multisiteMigrateForm.showError("zonegroup_endpoints",i,"required")),e.xp6(1),e.Q6J("ngIf",o.multisiteMigrateForm.showError("zonegroup_endpoints",i,"endpoint")),e.xp6(6),e.Q6J("ngIf",o.multisiteMigrateForm.showError("zoneName",i,"required")),e.xp6(1),e.Q6J("ngIf",o.multisiteMigrateForm.showError("zoneName",i,"uniqueName")),e.xp6(6),e.Q6J("ngIf",o.multisiteMigrateForm.showError("zone_endpoints",i,"required")),e.xp6(1),e.Q6J("ngIf",o.multisiteMigrateForm.showError("zone_endpoints",i,"endpoint")),e.xp6(24),e.Q6J("submitText",o.actionLabels.MIGRATE)("form",o.multisiteMigrateForm)}},dependencies:[T.O5,j.S,X.z,B.p,k.o,q.b,z.P,H.V,a._Y,a.Fj,a.JJ,a.JL,a.sg,a.u]}),t})();var G_=c(80842),Re=c(34501);function Ms(t,n){if(1&t&&(e.TgZ(0,"strong",21),e._uU(1),e.qZA()),2&t){const _=n.$implicit;e.xp6(1),e.Oqu(_)}}function Ss(t,n){1&t&&(e.TgZ(0,"div",22)(1,"cd-alert-panel",23),e.SDv(2,24),e.qZA()())}function Cs(t,n){if(1&t){const _=e.EpF();e.ynx(0),e.TgZ(1,"label",10),e.tHW(2,11),e._UZ(3,"strong"),e.N_p(),e.qZA(),e.TgZ(4,"label",12),e.SDv(5,13),e.qZA(),e.YNc(6,Ms,2,1,"strong",14),e.TgZ(7,"div",15)(8,"div",16)(9,"input",17),e.NdJ("change",function(){e.CHM(_);const i=e.oxw();return e.KtG(i.showDangerText())}),e.qZA(),e.TgZ(10,"label",18),e.SDv(11,19),e.qZA()(),e.YNc(12,Ss,3,0,"div",20),e.qZA(),e.BQk()}if(2&t){const _=e.oxw();e.xp6(3),e.pQV(null==_.zone?null:_.zone.name),e.QtT(2),e.xp6(3),e.Q6J("ngForOf",_.includedPools),e.xp6(6),e.Q6J("ngIf",_.displayText)}}let Os=(()=>{class t{constructor(_,o,i,s,l){this.activeModal=_,this.actionLabels=o,this.notificationService=i,this.rgwZoneService=s,this.poolService=l,this.displayText=!1,this.includedPools=new Set,this.createForm()}ngOnInit(){this.zoneData$=this.rgwZoneService.get(this.zone),this.poolList$=this.poolService.getList()}ngAfterViewInit(){this.updateIncludedPools()}createForm(){this.zoneForm=new V.d({deletePools:new a.p4(!1)})}submit(){this.rgwZoneService.delete(this.zone.name,this.zoneForm.value.deletePools,this.includedPools,this.zone.parent).subscribe(()=>{this.notificationService.show(w.k.success,"Zone: '" + this.zone.name + "' deleted successfully"),this.activeModal.close()},()=>{this.zoneForm.setErrors({cdSubmitButton:!0})})}showDangerText(){this.displayText=!this.displayText}updateIncludedPools(){!this.zoneData$||!this.poolList$||this.zoneData$.subscribe(_=>{this.poolList$.subscribe(o=>{for(const i of o)for(const s of Object.values(_))if("string"==typeof s&&s.includes(i.pool_name))this.includedPools.add(i.pool_name);else if(Array.isArray(s)&&s[0].val)for(const l of s){const r=l.val;r.storage_classes.STANDARD.data_pool===i.pool_name&&this.includedPools.add(r.storage_classes.STANDARD.data_pool),r.data_extra_pool===i.pool_name&&this.includedPools.add(r.data_extra_pool),r.index_pool===i.pool_name&&this.includedPools.add(r.index_pool)}})})}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(G.Kz),e.Y36(I.p4),e.Y36(Y.g),e.Y36(ue.g),e.Y36(G_.q))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-multisite-zone-deletion-form"]],decls:12,vars:6,consts:function(){let n,_,o,i,s,l;return n="Delete Zone",_=" This will delete your " + "\ufffd#8\ufffd" + "" + "\ufffd0\ufffd" + "" + "\ufffd/#8\ufffd" + " Zone. ",o=" Do you want to delete the associated pools with the " + "\ufffd#3\ufffd" + "" + "\ufffd0\ufffd" + "" + "\ufffd/#3\ufffd" + " Zone?",i=" This will delete the following pools and any data stored in these pools:",s="Yes, I want to delete the pools.",l=" This will delete all the data in the pools! ",[[3,"modalRef"],[1,"modal-title"],n,[1,"modal-content"],["name","zoneForm","novalidate","",3,"formGroup"],[1,"modal-body","ms-4"],_,[4,"ngIf"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],[1,"mt-3"],o,[1,"mb-4"],i,["class","block",4,"ngFor","ngForOf"],[1,"form-group"],[1,"custom-control","custom-checkbox","mt-2"],["type","checkbox","name","deletePools","id","deletePools","formControlName","deletePools",1,"custom-control-input",3,"change"],["for","deletePools",1,"custom-control-label"],s,["class","me-4",4,"ngIf"],[1,"block"],[1,"me-4"],["type","danger"],l]},template:function(_,o){1&_&&(e.TgZ(0,"cd-modal",0),e.ynx(1,1),e.SDv(2,2),e.BQk(),e.ynx(3,3),e.TgZ(4,"form",4)(5,"div",5)(6,"label"),e.tHW(7,6),e._UZ(8,"strong"),e.N_p(),e.qZA(),e.YNc(9,Cs,13,3,"ng-container",7),e.qZA(),e.TgZ(10,"div",8)(11,"cd-form-button-panel",9),e.NdJ("submitActionEvent",function(){return o.submit()}),e.qZA()()(),e.BQk(),e.qZA()),2&_&&(e.Q6J("modalRef",o.activeModal),e.xp6(4),e.Q6J("formGroup",o.zoneForm),e.xp6(4),e.pQV(null==o.zone?null:o.zone.name),e.QtT(7),e.xp6(1),e.Q6J("ngIf",o.includedPools.size),e.xp6(2),e.Q6J("form",o.zoneForm)("submitText",o.actionLabels.DELETE))},dependencies:[T.sg,T.O5,X.z,Re.G,B.p,k.o,q.b,z.P,H.V,a._Y,a.Wl,a.JJ,a.JL,a.sg,a.u],styles:[".block[_ngcontent-%COMP%]{display:block}#scroll[_ngcontent-%COMP%]{height:100%;max-height:10rem;overflow:auto}"]}),t})();function Fs(t,n){1&t&&(e.ynx(0),e.TgZ(1,"label"),e.SDv(2,21),e.qZA(),e.BQk())}function Ps(t,n){if(1&t&&(e.TgZ(0,"strong",22),e._uU(1),e.qZA()),2&t){const _=n.$implicit;e.xp6(1),e.Oqu(_)}}function Ns(t,n){if(1&t&&(e.TgZ(0,"strong",22),e._uU(1),e.qZA()),2&t){const _=n.$implicit;e.xp6(1),e.Oqu(_)}}function Gs(t,n){if(1&t&&(e.ynx(0),e.TgZ(1,"strong",13),e._uU(2,"Pools:"),e.qZA(),e.TgZ(3,"div",23),e.YNc(4,Ns,2,1,"strong",15),e.qZA(),e.BQk()),2&t){const _=e.oxw(2);e.xp6(4),e.Q6J("ngForOf",_.includedPools)}}function As(t,n){1&t&&(e.ynx(0),e.TgZ(1,"label",24),e.SDv(2,25),e.qZA(),e.BQk())}function Is(t,n){1&t&&(e.TgZ(0,"div",26)(1,"cd-alert-panel",27),e.SDv(2,28),e.qZA()())}function bs(t,n){if(1&t){const _=e.EpF();e.ynx(0),e.TgZ(1,"label",11),e.tHW(2,12),e._UZ(3,"strong"),e.N_p(),e.qZA(),e.YNc(4,Fs,3,0,"ng-container",7),e.TgZ(5,"strong",13),e._uU(6,"Zones:"),e.qZA(),e.TgZ(7,"div",14),e.YNc(8,Ps,2,1,"strong",15),e.qZA(),e.YNc(9,Gs,5,1,"ng-container",7),e.TgZ(10,"div",16)(11,"div",17)(12,"input",18),e.NdJ("change",function(){e.CHM(_);const i=e.oxw();return e.KtG(i.showDangerText())}),e.qZA(),e.YNc(13,As,3,0,"ng-container",19),e.qZA(),e.YNc(14,Is,3,0,"div",20),e.qZA(),e.BQk()}if(2&t){const _=e.oxw(),o=e.MAs(13);e.xp6(3),e.pQV(null==_.zonegroup?null:_.zonegroup.name),e.QtT(2),e.xp6(1),e.Q6J("ngIf",_.includedPools.size>0),e.xp6(4),e.Q6J("ngForOf",_.zonesList),e.xp6(1),e.Q6J("ngIf",_.includedPools.size>0),e.xp6(4),e.Q6J("ngIf",_.includedPools.size>0)("ngIfElse",o),e.xp6(1),e.Q6J("ngIf",_.displayText)}}function hs(t,n){1&t&&(e.TgZ(0,"label",24),e.SDv(1,29),e.qZA())}let Ls=(()=>{class t{constructor(_,o,i,s,l,r){this.activeModal=_,this.actionLabels=o,this.notificationService=i,this.rgwZonegroupService=s,this.poolService=l,this.rgwZoneService=r,this.zonesPools=[],this.zonesList=[],this.displayText=!1,this.includedPools=new Set,this.createForm()}ngOnInit(){this.zonegroupData$=this.rgwZonegroupService.get(this.zonegroup),this.poolList$=this.poolService.getList()}ngAfterViewInit(){this.updateIncludedPools()}createForm(){this.zonegroupForm=new V.d({deletePools:new a.p4(!1)})}submit(){this.rgwZonegroupService.delete(this.zonegroup.name,this.zonegroupForm.value.deletePools,this.includedPools).subscribe(()=>{this.notificationService.show(w.k.success,"Zone: '" + this.zonegroup.name + "' deleted successfully"),this.activeModal.close()})}showDangerText(){this.includedPools.size>0&&(this.displayText=!this.displayText)}updateIncludedPools(){!this.zonegroupData$||!this.poolList$||this.zonegroupData$.subscribe(_=>{for(const o of _.zones)this.zonesList.push(o.name),this.rgwZoneService.get(o).subscribe(i=>{this.poolList$.subscribe(s=>{for(const l of Object.values(i))for(const r of s)if("string"==typeof l&&l.includes(r.pool_name))this.includedPools.add(r.pool_name);else if(Array.isArray(l)&&l[0].val)for(const d of l){const u=d.val;u.storage_classes.STANDARD.data_pool===r.pool_name&&this.includedPools.add(u.storage_classes.STANDARD.data_pool),u.data_extra_pool===r.pool_name&&this.includedPools.add(u.data_extra_pool),u.index_pool===r.pool_name&&this.includedPools.add(u.index_pool)}})})})}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(G.Kz),e.Y36(I.p4),e.Y36(Y.g),e.Y36(ge.K),e.Y36(G_.q),e.Y36(ue.g))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-multisite-zonegroup-deletion-form"]],decls:14,vars:6,consts:function(){let n,_,o,i,s,l,r;return n="Delete Zone Group",_=" This will delete your " + "\ufffd#8\ufffd" + "" + "\ufffd0\ufffd" + "" + "\ufffd/#8\ufffd" + " Zone Group. ",o=" Do you want to delete the associated zones and pools with the " + "\ufffd#3\ufffd" + "" + "\ufffd0\ufffd" + "" + "\ufffd/#3\ufffd" + " Zone Group?",i=" This will delete the following:",s="Yes, I want to delete the zones and their pools.",l=" This will delete all the data in the pools! ",r="Yes, I want to delete the zones.",[[3,"modalRef"],[1,"modal-title"],n,[1,"modal-content"],["name","zonegroupForm","novalidate","",3,"formGroup"],[1,"modal-body","ms-4"],_,[4,"ngIf"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],["noPoolsConfirmation",""],[1,"mt-3"],o,[1,"mt-3","mb-2","h5","block"],["id","scroll"],["class","block",4,"ngFor","ngForOf"],[1,"form-group"],[1,"custom-control","custom-checkbox","mt-2"],["type","checkbox","name","deletePools","id","deletePools","formControlName","deletePools",1,"custom-control-input",3,"change"],[4,"ngIf","ngIfElse"],["class","me-4",4,"ngIf"],i,[1,"block"],["id","scroll",1,"mb-2"],["for","deletePools",1,"custom-control-label"],s,[1,"me-4"],["type","danger"],l,r]},template:function(_,o){1&_&&(e.TgZ(0,"cd-modal",0),e.ynx(1,1),e.SDv(2,2),e.BQk(),e.ynx(3,3),e.TgZ(4,"form",4)(5,"div",5)(6,"label"),e.tHW(7,6),e._UZ(8,"strong"),e.N_p(),e.qZA(),e.YNc(9,bs,15,7,"ng-container",7),e.qZA(),e.TgZ(10,"div",8)(11,"cd-form-button-panel",9),e.NdJ("submitActionEvent",function(){return o.submit()}),e.qZA()()(),e.BQk(),e.qZA(),e.YNc(12,hs,2,0,"ng-template",null,10,e.W1O)),2&_&&(e.Q6J("modalRef",o.activeModal),e.xp6(4),e.Q6J("formGroup",o.zonegroupForm),e.xp6(4),e.pQV(null==o.zonegroup?null:o.zonegroup.name),e.QtT(7),e.xp6(1),e.Q6J("ngIf",o.zonesList.length>0),e.xp6(2),e.Q6J("form",o.zonegroupForm)("submitText",o.actionLabels.DELETE))},dependencies:[T.sg,T.O5,X.z,Re.G,B.p,k.o,q.b,z.P,H.V,a._Y,a.Wl,a.JJ,a.JL,a.sg,a.u],styles:[".block[_ngcontent-%COMP%]{display:block}#scroll[_ngcontent-%COMP%]{height:100%;max-height:10rem;overflow:auto}"]}),t})();const Ws=function(t,n,_){return[t,n,_]};function $s(t,n){if(1&t&&(e.TgZ(0,"span",10),e._UZ(1,"i",11),e.qZA()),2&t){const _=e.oxw();e.xp6(1),e.Q6J("ngClass",e.kEZ(1,Ws,_.icons.large3x,_.icons.spinner,_.icons.spin))}}function Zs(t,n){if(1&t&&(e.tHW(0,16,1),e.TgZ(1,"div"),e._UZ(2,"b"),e.qZA(),e.N_p()),2&t){const _=n.$implicit;e.xp6(2),e.pQV(_.realm)(_.token),e.QtT(0)}}function Ds(t,n){if(1&t&&(e.TgZ(0,"cd-alert-panel",15),e.tHW(1,16),e.YNc(2,Zs,3,2,"div",14),e.N_p(),e.qZA()),2&t){const _=e.oxw(2);e.xp6(2),e.Q6J("ngForOf",_.realms)}}function Us(t,n){1&t&&e._UZ(0,"hr")}function vs(t,n){if(1&t&&(e.TgZ(0,"div")(1,"div",17)(2,"label",18),e.SDv(3,19),e.qZA(),e.TgZ(4,"div",20),e._UZ(5,"input",21),e.qZA()(),e.TgZ(6,"div",17)(7,"label",22),e.SDv(8,23),e.qZA(),e.TgZ(9,"div",20),e._UZ(10,"input",24)(11,"cd-copy-2-clipboard-button",25),e.qZA(),e.YNc(12,Us,1,0,"hr",26),e.qZA()()),2&t){const _=n.$implicit,o=e.oxw(2);e.xp6(5),e.s9C("value",_.realm),e.xp6(5),e.s9C("value",_.token),e.xp6(1),e.s9C("source",_.token),e.Q6J("byId",!1),e.xp6(1),e.Q6J("ngIf",o.realms.length>1)}}function ys(t,n){if(1&t&&(e.TgZ(0,"div",12),e.YNc(1,Ds,3,1,"cd-alert-panel",13),e.YNc(2,vs,13,5,"div",14),e.qZA()),2&t){const _=e.oxw();e.xp6(1),e.Q6J("ngIf",!_.tokenValid),e.xp6(1),e.Q6J("ngForOf",_.realms)}}let ws=(()=>{class t{constructor(_,o,i,s,l){this.activeModal=_,this.rgwRealmService=o,this.actionLabels=i,this.notificationService=s,this.changeDetectorRef=l,this.tokenValid=!1,this.loading=!0,this.icons=$.P,this.createForm()}createForm(){this.exportTokenForm=new V.d({})}onSubmit(){this.activeModal.close()}ngOnInit(){this.rgwRealmService.getRealmTokens().subscribe(_=>{this.loading=!1,this.realms=_;var o=new RegExp("^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$");this.realms.forEach(i=>{this.tokenValid=!!o.test(i.token)})})}ngAfterViewChecked(){this.changeDetectorRef.detectChanges()}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(G.Kz),e.Y36(de.y),e.Y36(I.p4),e.Y36(Y.g),e.Y36(e.sBO))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-multisite-export"]],decls:10,vars:4,consts:function(){let n,_,o,i;return n="Export Multi-Site Realm Token",_="" + "\ufffd*2:1\ufffd\ufffd#1:1\ufffd" + "" + "\ufffd#2:1\ufffd" + "" + "\ufffd0:1\ufffd" + "" + "\ufffd/#2:1\ufffd" + " - " + "\ufffd1:1\ufffd" + " " + "\ufffd/#1:1\ufffd\ufffd/*2:1\ufffd" + "",o="Realm Name ",i="Token ",[[3,"modalRef"],[1,"modal-title"],n,[1,"modal-content"],["name","exportTokenForm",3,"formGroup"],["frm","ngForm"],["class","d-flex justify-content-center",4,"ngIf"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["aria-label","Close",1,"m-2","float-end",3,"backAction"],[1,"d-flex","justify-content-center"],[3,"ngClass"],[1,"modal-body"],["type","warning","class","mx-3",4,"ngIf"],[4,"ngFor","ngForOf"],["type","warning",1,"mx-3"],_,[1,"form-group","row"],["for","realmName",1,"cd-col-form-label"],o,[1,"cd-col-form-input"],["id","realmName","name","realmName","type","text","readonly","",3,"value"],["for","token",1,"cd-col-form-label"],i,["id","realmToken","name","realmToken","type","text","readonly","",1,"me-2","mb-4",3,"value"],[3,"source","byId"],[4,"ngIf"]]},template:function(_,o){1&_&&(e.TgZ(0,"cd-modal",0),e.ynx(1,1),e.SDv(2,2),e.BQk(),e.ynx(3,3),e.TgZ(4,"form",4,5),e.YNc(6,$s,2,5,"span",6),e.YNc(7,ys,3,2,"div",7),e.TgZ(8,"div",8)(9,"cd-back-button",9),e.NdJ("backAction",function(){return o.activeModal.close()}),e.qZA()()(),e.BQk(),e.qZA()),2&_&&(e.Q6J("modalRef",o.activeModal),e.xp6(4),e.Q6J("formGroup",o.exportTokenForm),e.xp6(2),e.Q6J("ngIf",o.loading),e.xp6(1),e.Q6J("ngIf",!o.loading))},dependencies:[T.mk,T.sg,T.O5,M_.W,X.z,Re.G,pe.s,k.o,z.P,H.V,a._Y,a.JL,a.sg]}),t})();var xs=c(7022),ks=c(22120),zs=c(48168),qs=c(14745),A_=c(79765),Hs=c(66682),Xs=c(54395),Bs=c(87519),Qs=c(45435),Ys=c(88002),I_=c(60192);function Js(t,n){1&t&&(e.TgZ(0,"span",29),e.SDv(1,30),e.qZA())}function Ks(t,n){1&t&&(e.TgZ(0,"span",29),e.SDv(1,31),e.qZA())}function Vs(t,n){1&t&&(e.TgZ(0,"span",29),e.SDv(1,32),e.qZA())}function js(t,n){1&t&&(e.TgZ(0,"div",9)(1,"label",33),e.SDv(2,34),e.qZA(),e.TgZ(3,"div",12)(4,"select",35)(5,"option",36),e.SDv(6,37),e.qZA(),e.TgZ(7,"option",38),e.SDv(8,39),e.qZA()()()())}function ea(t,n){1&t&&(e.TgZ(0,"span",29),e.SDv(1,43),e.qZA())}function _a(t,n){if(1&t){const _=e.EpF();e.TgZ(0,"div",9)(1,"label",40),e.SDv(2,41),e.qZA(),e.TgZ(3,"div",12)(4,"input",42),e.NdJ("focus",function(i){e.CHM(_);const s=e.oxw();return e.KtG(s.labelFocus.next(i.target.value))})("click",function(i){e.CHM(_);const s=e.oxw();return e.KtG(s.labelClick.next(i.target.value))}),e.qZA(),e.YNc(5,ea,2,0,"span",14),e.qZA()()}if(2&t){const _=e.oxw(),o=e.MAs(5);e.xp6(4),e.Q6J("ngbTypeahead",_.searchLabels),e.xp6(1),e.Q6J("ngIf",_.importTokenForm.showError("label",o,"required"))}}function ta(t,n){if(1&t&&(e.TgZ(0,"div",9)(1,"label",44),e.SDv(2,45),e.qZA(),e.TgZ(3,"div",12),e._UZ(4,"cd-select-badges",46),e.qZA()()),2&t){const _=e.oxw();e.xp6(4),e.Q6J("data",_.importTokenForm.controls.hosts.value)("options",_.hosts.options)("messages",_.hosts.messages)}}function oa(t,n){1&t&&(e.TgZ(0,"span",29),e.SDv(1,51),e.qZA())}function na(t,n){1&t&&(e.TgZ(0,"span",29),e.SDv(1,52),e.qZA())}function ia(t,n){if(1&t&&(e.TgZ(0,"div",9)(1,"label",47)(2,"span"),e.SDv(3,48),e.qZA(),e.TgZ(4,"cd-helper"),e.SDv(5,49),e.qZA()(),e.TgZ(6,"div",12),e._UZ(7,"input",50),e.YNc(8,oa,2,0,"span",14),e.YNc(9,na,2,0,"span",14),e.qZA()()),2&t){const _=e.oxw(),o=e.MAs(5);e.xp6(8),e.Q6J("ngIf",_.importTokenForm.showError("count",o,"min")),e.xp6(1),e.Q6J("ngIf",_.importTokenForm.showError("count",o,"pattern"))}}function sa(t,n){1&t&&(e.TgZ(0,"span",29),e.SDv(1,56),e.qZA())}function aa(t,n){1&t&&(e.TgZ(0,"span",29),e.SDv(1,57),e.qZA())}function la(t,n){1&t&&(e.TgZ(0,"span",29),e.SDv(1,58),e.qZA())}function ra(t,n){if(1&t&&(e.ynx(0),e.TgZ(1,"div",9)(2,"label",53),e.SDv(3,54),e.qZA(),e.TgZ(4,"div",12),e._UZ(5,"input",55),e.YNc(6,sa,2,0,"span",14),e.YNc(7,aa,2,0,"span",14),e.YNc(8,la,2,0,"span",14),e.qZA()(),e.BQk()),2&t){const _=e.oxw(),o=e.MAs(5);e.xp6(6),e.Q6J("ngIf",_.importTokenForm.showError("rgw_frontend_port",o,"pattern")),e.xp6(1),e.Q6J("ngIf",_.importTokenForm.showError("rgw_frontend_port",o,"min")),e.xp6(1),e.Q6J("ngIf",_.importTokenForm.showError("rgw_frontend_port",o,"max"))}}let ca=(()=>{class t{constructor(_,o,i,s,l){this.activeModal=_,this.hostService=o,this.rgwRealmService=i,this.actionLabels=s,this.notificationService=l,this.endpoints=/^((https?:\/\/)|(www.))(?:([a-zA-Z]+)|(\d+\.\d+.\d+.\d+)):\d{2,4}$/,this.ipv4Rgx=/^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/i,this.ipv6Rgx=/^(?:[a-f0-9]{1,4}:){7}[a-f0-9]{1,4}$/i,this.multisiteInfo=[],this.zoneList=[],this.labelClick=new A_.xQ,this.labelFocus=new A_.xQ,this.searchLabels=r=>(0,Hs.T)(r.pipe((0,Xs.b)(200),(0,Bs.x)()),this.labelFocus,this.labelClick.pipe((0,Qs.h)(()=>!this.typeahead.isPopupOpen()))).pipe((0,Ys.U)(d=>this.labels.filter(u=>u.toLowerCase().indexOf(d.toLowerCase())>-1).slice(0,10))),this.hosts={options:[],messages:new xs.a({empty:"There are no hosts.",filter:"Filter hosts"})},this.createForm()}ngOnInit(){this.zoneList=void 0!==this.multisiteInfo[2]&&this.multisiteInfo[2].hasOwnProperty("zones")?this.multisiteInfo[2].zones:[],this.zoneNames=this.zoneList.map(o=>o.name);const _=new zs.E(()=>{});this.hostService.list(_.toParams(),"false").subscribe(o=>{const i=[];E().forEach(o,s=>{if(E().get(s,"sources.orchestrator",!1)){const l=new qs.$(!1,E().get(s,"hostname"),"");i.push(l)}}),this.hosts.options=[...i]}),this.hostService.getLabels().subscribe(o=>{this.labels=o})}createForm(){this.importTokenForm=new V.d({realmToken:new a.NI("",{validators:[a.kI.required]}),zoneName:new a.NI(null,{validators:[a.kI.required,m.h.custom("uniqueName",_=>this.zoneNames&&-1!==this.zoneNames.indexOf(_))]}),rgw_frontend_port:new a.NI(null,{validators:[a.kI.required,a.kI.pattern("^[0-9]*$")]}),placement:new a.NI("hosts"),label:new a.NI(null,[m.h.requiredIf({placement:"label",unmanaged:!1})]),hosts:new a.NI([]),count:new a.NI(null,[m.h.number(!1)]),unmanaged:new a.NI(!1)})}onSubmit(){const _=this.importTokenForm.value,o={placement:{}};if(!_.unmanaged){switch(_.placement){case"hosts":_.hosts.length>0&&(o.placement.hosts=_.hosts);break;case"label":o.placement.label=_.label}E().isNumber(_.count)&&_.count>0&&(o.placement.count=_.count)}this.rgwRealmService.importRealmToken(_.realmToken,_.zoneName,_.rgw_frontend_port,o).subscribe(()=>{this.notificationService.show(w.k.success,"Realm token import successfull"),this.activeModal.close()},()=>{this.importTokenForm.setErrors({cdSubmitButton:!0})})}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(G.Kz),e.Y36(ks.x),e.Y36(de.y),e.Y36(I.p4),e.Y36(Y.g))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-multisite-import"]],viewQuery:function(_,o){if(1&_&&e.Gf(G.dR,5),2&_){let i;e.iGM(i=e.CRH())&&(o.typeahead=i.first)}},decls:47,vars:12,consts:function(){let n,_,o,i,s,l,r,d,u,R,O,F,b,h,M,L,S,W,C,Z,D,U,v,y;return n="Import Multi-Site Token",_="Zone Details",o="Token ",i="Secondary Zone Name",s="Service Details",l="Unmanaged",r="If set to true, the orchestrator will not start nor stop any daemon associated with this service. Placement and all other properties will be ignored.",d="This field is required.",u="This field is required.",R="The chosen zone name is already in use.",O="Placement",F="Hosts",b="Label",h="Label",M="This field is required.",L="Hosts",S="Count",W="Only that number of daemons will be created.",C="The value must be at least 1.",Z="The entered value needs to be a number.",D="Port",U="The entered value needs to be a number.",v="The value must be at least 1.",y="The value cannot exceed 65535.",[[3,"modalRef"],[1,"modal-title"],n,[1,"modal-content"],["name","importTokenForm",3,"formGroup"],["frm","ngForm"],[1,"modal-body"],["type","info","spacingClass","mb-3"],_,[1,"form-group","row"],["for","realmToken",1,"cd-col-form-label","required"],o,[1,"cd-col-form-input"],["id","realmToken","name","realmToken","type","text","formControlName","realmToken",1,"form-control"],["class","invalid-feedback",4,"ngIf"],["for","zoneName",1,"cd-col-form-label","required"],i,["type","text","placeholder","Zone name...","id","zoneName","name","zoneName","formControlName","zoneName",1,"form-control"],s,[1,"cd-col-form-offset"],[1,"custom-control","custom-checkbox"],["id","unmanaged","type","checkbox","formControlName","unmanaged",1,"custom-control-input"],["for","unmanaged",1,"custom-control-label"],l,r,["class","form-group row",4,"ngIf"],[4,"ngIf"],[1,"modal-footer"],[3,"submitText","form","submitActionEvent"],[1,"invalid-feedback"],d,u,R,["for","placement",1,"cd-col-form-label"],O,["id","placement","formControlName","placement",1,"form-select"],["value","hosts"],F,["value","label"],b,["for","label",1,"cd-col-form-label"],h,["id","label","type","text","formControlName","label",1,"form-control",3,"ngbTypeahead","focus","click"],M,["for","hosts",1,"cd-col-form-label"],L,["id","hosts",3,"data","options","messages"],["for","count",1,"cd-col-form-label"],S,W,["id","count","type","number","formControlName","count","min","1",1,"form-control"],C,Z,["for","rgw_frontend_port",1,"cd-col-form-label"],D,["id","rgw_frontend_port","type","number","formControlName","rgw_frontend_port","min","1","max","65535",1,"form-control"],U,v,y]},template:function(_,o){if(1&_&&(e.TgZ(0,"cd-modal",0),e.ynx(1,1),e.SDv(2,2),e.BQk(),e.ynx(3,3),e.TgZ(4,"form",4,5)(6,"div",6)(7,"cd-alert-panel",7)(8,"ul")(9,"li"),e._uU(10,"This feature allows you to configure a connection between your primary and secondary Ceph clusters for data replication. By importing a token, you establish a link between the clusters, enabling data synchronization."),e.qZA(),e.TgZ(11,"li"),e._uU(12,"To obtain the token, generate it from your primary Ceph cluster. This token includes encoded information about the primary cluster's endpoint, access key, and secret key."),e.qZA(),e.TgZ(13,"li"),e._uU(14,"The secondary zone represents the destination cluster where your data will be replicated."),e.qZA()()(),e.TgZ(15,"legend"),e.SDv(16,8),e.qZA(),e.TgZ(17,"div",9)(18,"label",10),e.SDv(19,11),e.qZA(),e.TgZ(20,"div",12),e._UZ(21,"input",13),e.YNc(22,Js,2,0,"span",14),e.qZA()(),e.TgZ(23,"div",9)(24,"label",15),e.SDv(25,16),e.qZA(),e.TgZ(26,"div",12),e._UZ(27,"input",17),e.YNc(28,Ks,2,0,"span",14),e.YNc(29,Vs,2,0,"span",14),e.qZA()(),e.TgZ(30,"legend"),e.SDv(31,18),e.qZA(),e.TgZ(32,"div",9)(33,"div",19)(34,"div",20),e._UZ(35,"input",21),e.TgZ(36,"label",22),e.SDv(37,23),e.qZA(),e.TgZ(38,"cd-helper"),e.SDv(39,24),e.qZA()()()(),e.YNc(40,js,9,0,"div",25),e.YNc(41,_a,6,2,"div",25),e.YNc(42,ta,5,3,"div",25),e.YNc(43,ia,10,2,"div",25),e.YNc(44,ra,9,3,"ng-container",26),e.qZA(),e.TgZ(45,"div",27)(46,"cd-form-button-panel",28),e.NdJ("submitActionEvent",function(){return o.onSubmit()}),e.qZA()()(),e.BQk(),e.qZA()),2&_){const i=e.MAs(5);e.Q6J("modalRef",o.activeModal),e.xp6(4),e.Q6J("formGroup",o.importTokenForm),e.xp6(18),e.Q6J("ngIf",o.importTokenForm.showError("realmToken",i,"required")),e.xp6(6),e.Q6J("ngIf",o.importTokenForm.showError("zoneName",i,"required")),e.xp6(1),e.Q6J("ngIf",o.importTokenForm.showError("zoneName",i,"uniqueName")),e.xp6(11),e.Q6J("ngIf",!o.importTokenForm.controls.unmanaged.value),e.xp6(1),e.Q6J("ngIf",!o.importTokenForm.controls.unmanaged.value&&"label"===o.importTokenForm.controls.placement.value),e.xp6(1),e.Q6J("ngIf",!o.importTokenForm.controls.unmanaged.value&&"hosts"===o.importTokenForm.controls.placement.value),e.xp6(1),e.Q6J("ngIf",!o.importTokenForm.controls.unmanaged.value),e.xp6(1),e.Q6J("ngIf",!o.importTokenForm.controls.unmanaged.value),e.xp6(2),e.Q6J("submitText",o.actionLabels.IMPORT)("form",o.importTokenForm)}},dependencies:[T.O5,j.S,I_.m,X.z,Re.G,B.p,k.o,q.b,z.P,H.V,a._Y,a.YN,a.Kr,a.Fj,a.wV,a.Wl,a.EJ,a.JJ,a.JL,a.qQ,a.Fd,a.sg,a.u]}),t})();var da=c(72625);function ua(t,n){1&t&&(e.TgZ(0,"span",20),e.SDv(1,21),e.qZA())}function ga(t,n){1&t&&(e.TgZ(0,"span",20),e.SDv(1,22),e.qZA())}function Ra(t,n){1&t&&(e.TgZ(0,"cd-helper")(1,"span"),e.SDv(2,23),e.qZA()())}function Ta(t,n){if(1&t&&(e.TgZ(0,"cd-helper")(1,"span"),e.tHW(2,24),e._UZ(3,"a",25),e.N_p(),e.qZA()()),2&t){const _=e.oxw();e.xp6(3),e.s9C("href",_.docUrl,e.LSH)}}function Ea(t,n){1&t&&(e.TgZ(0,"cd-helper")(1,"span"),e.SDv(2,26),e.qZA()())}let fa=(()=>{class t{constructor(_,o,i,s,l){this.activeModal=_,this.actionLabels=o,this.rgwRealmService=i,this.notificationService=s,this.docService=l,this.editing=!1,this.multisiteInfo=[],this.realmList=[],this.zonegroupList=[],this.defaultRealmDisabled=!1,this.action=this.editing?this.actionLabels.EDIT+this.resource:this.actionLabels.CREATE+this.resource,this.createForm()}createForm(){this.multisiteRealmForm=new V.d({realmName:new a.p4(null,{validators:[a.kI.required,m.h.custom("uniqueName",_=>"create"===this.action&&this.realmNames&&-1!==this.realmNames.indexOf(_))]}),default_realm:new a.p4(!1)})}ngOnInit(){this.realmList=void 0!==this.multisiteInfo[0]&&this.multisiteInfo[0].hasOwnProperty("realms")?this.multisiteInfo[0].realms:[],this.realmNames=this.realmList.map(_=>_.name),"edit"===this.action&&(this.zonegroupList=void 0!==this.multisiteInfo[1]&&this.multisiteInfo[1].hasOwnProperty("zonegroups")?this.multisiteInfo[1].zonegroups:[],this.multisiteRealmForm.get("realmName").setValue(this.info.data.name),this.multisiteRealmForm.get("default_realm").setValue(this.info.data.is_default),this.info.data.is_default&&this.multisiteRealmForm.get("default_realm").disable()),this.zonegroupList.forEach(_=>{!0===_.is_master&&_.realm_id===this.info.data.id&&(this.isMaster=!0)}),this.defaultsInfo&&null!==this.defaultsInfo.defaultRealmName&&(this.multisiteRealmForm.get("default_realm").disable(),this.defaultRealmDisabled=!0),this.docUrl=this.docService.urlGenerator("rgw-multisite")}submit(){const _=this.multisiteRealmForm.getRawValue();this.realm=new x.L6,"create"===this.action?(this.realm.name=_.realmName,this.rgwRealmService.create(this.realm,_.default_realm).subscribe(()=>{this.notificationService.show(w.k.success,"Realm: '" + _.realmName + "' created successfully"),this.activeModal.close()},()=>{this.multisiteRealmForm.setErrors({cdSubmitButton:!0})})):"edit"===this.action&&(this.realm.name=this.info.data.name,this.newRealmName=_.realmName,this.rgwRealmService.update(this.realm,_.default_realm,this.newRealmName).subscribe(()=>{this.notificationService.show(w.k.success,"Realm: '" + _.realmName + "' updated successfully"),this.activeModal.close()},()=>{this.multisiteRealmForm.setErrors({cdSubmitButton:!0})}))}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(G.Kz),e.Y36(I.p4),e.Y36(de.y),e.Y36(Y.g),e.Y36(da.R))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-multisite-realm-form"]],decls:27,vars:20,consts:function(){let n,_,o,i,s,l,r,d;return n="" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",_="Realm Name",o="Default",i="This field is required.",s="The chosen realm name is already in use.",l="You cannot unset the default flag.",r="Please consult the " + "\ufffd#3\ufffd" + "documentation" + "\ufffd/#3\ufffd" + " to follow the failover mechanism",d="Default realm already exists.",[[3,"modalRef"],[1,"modal-title"],n,[1,"modal-content"],["name","multisiteRealmForm","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","realmName",1,"cd-col-form-label","required"],_,[1,"cd-col-form-input"],["type","text","placeholder","Realm name...","id","realmName","name","realmName","formControlName","realmName",1,"form-control"],["class","invalid-feedback",4,"ngIf"],[1,"custom-control","custom-checkbox"],["id","default_realm","name","default_realm","formControlName","default_realm","type","checkbox",1,"form-check-input"],["for","default_realm",1,"form-check-label"],o,[4,"ngIf"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],i,s,l,r,[3,"href"],d]},template:function(_,o){if(1&_&&(e.TgZ(0,"cd-modal",0),e.ynx(1,1),e.SDv(2,2),e.ALo(3,"titlecase"),e.ALo(4,"upperFirst"),e.BQk(),e.ynx(5,3),e.TgZ(6,"form",4,5)(8,"div",6)(9,"div",7)(10,"label",8),e.SDv(11,9),e.qZA(),e.TgZ(12,"div",10),e._UZ(13,"input",11),e.YNc(14,ua,2,0,"span",12),e.YNc(15,ga,2,0,"span",12),e.TgZ(16,"div",13),e._UZ(17,"input",14),e.TgZ(18,"label",15),e.SDv(19,16),e.qZA(),e.YNc(20,Ra,3,0,"cd-helper",17),e.YNc(21,Ta,4,1,"cd-helper",17),e.YNc(22,Ea,3,0,"cd-helper",17),e.qZA()()()(),e.TgZ(23,"div",18)(24,"cd-form-button-panel",19),e.NdJ("submitActionEvent",function(){return o.submit()}),e.ALo(25,"titlecase"),e.ALo(26,"upperFirst"),e.qZA()()(),e.BQk(),e.qZA()),2&_){const i=e.MAs(7);e.Q6J("modalRef",o.activeModal),e.xp6(4),e.pQV(e.lcZ(3,12,o.action))(e.lcZ(4,14,o.resource)),e.QtT(2),e.xp6(2),e.Q6J("formGroup",o.multisiteRealmForm),e.xp6(8),e.Q6J("ngIf",o.multisiteRealmForm.showError("realmName",i,"required")),e.xp6(1),e.Q6J("ngIf",o.multisiteRealmForm.showError("realmName",i,"uniqueName")),e.xp6(2),e.uIk("disabled","edit"===o.action||null),e.xp6(3),e.Q6J("ngIf","edit"===o.action&&o.info.data.is_default),e.xp6(1),e.Q6J("ngIf","edit"===o.action&&!o.info.data.is_default),e.xp6(1),e.Q6J("ngIf",o.defaultRealmDisabled&&"create"===o.action),e.xp6(2),e.Q6J("form",o.multisiteRealmForm)("submitText",e.lcZ(25,16,o.action)+" "+e.lcZ(26,18,o.resource))}},dependencies:[T.O5,j.S,X.z,B.p,k.o,q.b,z.P,H.V,a._Y,a.Fj,a.Wl,a.JJ,a.JL,a.sg,a.u,T.rS,_e.m]}),t})();function pa(t,n){if(1&t&&(e.TgZ(0,"option",36),e._uU(1),e.qZA()),2&t){const _=n.$implicit,o=e.oxw();e.Q6J("value",_.name)("selected",_.name===o.multisiteZoneForm.getValue("selectedZonegroup")),e.xp6(1),e.hij(" ",_.name," ")}}function ma(t,n){1&t&&(e.TgZ(0,"span",37),e.SDv(1,38),e.qZA())}function Ma(t,n){1&t&&(e.TgZ(0,"span",37),e.SDv(1,39),e.qZA())}function Sa(t,n){1&t&&(e.TgZ(0,"span")(1,"cd-helper"),e.SDv(2,40),e.qZA()())}function Ca(t,n){1&t&&(e.TgZ(0,"span")(1,"cd-helper"),e.SDv(2,41),e.qZA()())}function Oa(t,n){if(1&t&&(e.TgZ(0,"cd-helper")(1,"span"),e.tHW(2,42),e._UZ(3,"a",43),e.N_p(),e.qZA()()),2&t){const _=e.oxw();e.xp6(3),e.s9C("href",_.docUrl,e.LSH)}}function Fa(t,n){1&t&&(e.TgZ(0,"span")(1,"cd-helper"),e.SDv(2,44),e.qZA()())}function Pa(t,n){1&t&&(e.TgZ(0,"span")(1,"cd-helper"),e.SDv(2,45),e.qZA()())}function Na(t,n){if(1&t&&(e.TgZ(0,"cd-helper")(1,"span"),e.tHW(2,46),e._UZ(3,"a",43),e.N_p(),e.qZA()()),2&t){const _=e.oxw();e.xp6(3),e.s9C("href",_.docUrl,e.LSH)}}function Ga(t,n){1&t&&(e.TgZ(0,"span",37),e.SDv(1,47),e.qZA())}function Aa(t,n){1&t&&(e.TgZ(0,"span",37),e.SDv(1,48),e.qZA())}function Ia(t,n){if(1&t&&(e.TgZ(0,"option",36),e._uU(1),e.qZA()),2&t){const _=n.$implicit,o=e.oxw(3);e.Q6J("value",_.name)("selected",_.name===o.multisiteZoneForm.getValue("placementTarget")),e.xp6(1),e.hij(" ",_.name," ")}}function ba(t,n){if(1&t&&(e.TgZ(0,"option",36),e._uU(1),e.qZA()),2&t){const _=n.$implicit,o=e.oxw(3);e.Q6J("value",_.poolname)("selected",_.poolname===o.multisiteZoneForm.getValue("placementDataPool")),e.xp6(1),e.hij(" ",_.poolname," ")}}function ha(t,n){if(1&t&&(e.TgZ(0,"option",36),e._uU(1),e.qZA()),2&t){const _=n.$implicit,o=e.oxw(3);e.Q6J("value",_.poolname)("selected",_.poolname===o.multisiteZoneForm.getValue("placementIndexPool")),e.xp6(1),e.hij(" ",_.poolname," ")}}function La(t,n){if(1&t&&(e.TgZ(0,"option",36),e._uU(1),e.qZA()),2&t){const _=n.$implicit,o=e.oxw(3);e.Q6J("value",_.poolname)("selected",_.poolname===o.multisiteZoneForm.getValue("placementDataExtraPool")),e.xp6(1),e.hij(" ",_.poolname," ")}}function Wa(t,n){if(1&t&&(e.TgZ(0,"option",71),e._uU(1),e.qZA()),2&t){const _=n.$implicit;e.Q6J("value",_.value),e.xp6(1),e.hij(" ",_.value," ")}}function $a(t,n){if(1&t&&(e.TgZ(0,"option",36),e._uU(1),e.qZA()),2&t){const _=n.$implicit,o=e.oxw(3);e.Q6J("value",_.poolname)("selected",_.poolname===o.multisiteZoneForm.getValue("storageDataPool")),e.xp6(1),e.hij(" ",_.poolname," ")}}function Za(t,n){if(1&t&&(e.TgZ(0,"option",71),e._uU(1),e.qZA()),2&t){const _=n.$implicit;e.Q6J("value",_),e.xp6(1),e.hij(" ",_," ")}}function Da(t,n){if(1&t){const _=e.EpF();e.TgZ(0,"div")(1,"legend"),e._uU(2,"Placement Targets"),e.qZA(),e.TgZ(3,"div",7)(4,"label",49),e.SDv(5,50),e.qZA(),e.TgZ(6,"div",10)(7,"select",51),e.NdJ("change",function(i){e.CHM(_);const s=e.oxw(2);return e.KtG(s.getZonePlacementData(i.target.value))}),e.YNc(8,Ia,2,3,"option",12),e.qZA()()(),e.TgZ(9,"div",7)(10,"label",52),e.SDv(11,53),e.qZA(),e.TgZ(12,"div",10)(13,"select",54),e.YNc(14,ba,2,3,"option",12),e.qZA()()(),e.TgZ(15,"div",7)(16,"label",55),e.SDv(17,56),e.qZA(),e.TgZ(18,"div",10)(19,"select",57),e.YNc(20,ha,2,3,"option",12),e.qZA()()(),e.TgZ(21,"div",7)(22,"label",58),e.SDv(23,59),e.qZA(),e.TgZ(24,"div",10)(25,"select",60),e.YNc(26,La,2,3,"option",12),e.qZA()()(),e.TgZ(27,"div")(28,"legend"),e._uU(29,"Storage Classes"),e.qZA(),e.TgZ(30,"div",7)(31,"label",61),e.SDv(32,62),e.qZA(),e.TgZ(33,"div",10)(34,"select",63),e.NdJ("change",function(i){e.CHM(_);const s=e.oxw(2);return e.KtG(s.getStorageClassData(i.target.value))}),e.YNc(35,Wa,2,2,"option",64),e.qZA()()(),e.TgZ(36,"div",7)(37,"label",65),e.SDv(38,66),e.qZA(),e.TgZ(39,"div",10)(40,"select",67),e.YNc(41,$a,2,3,"option",12),e.qZA()()(),e.TgZ(42,"div",7)(43,"label",68),e.SDv(44,69),e.qZA(),e.TgZ(45,"div",10)(46,"select",70),e.YNc(47,Za,2,2,"option",64),e.qZA()()()()()}if(2&t){const _=e.oxw(2);e.xp6(8),e.Q6J("ngForOf",_.placementTargets),e.xp6(5),e.Q6J("value",_.placementDataPool),e.xp6(1),e.Q6J("ngForOf",_.poolList),e.xp6(6),e.Q6J("ngForOf",_.poolList),e.xp6(6),e.Q6J("ngForOf",_.poolList),e.xp6(9),e.Q6J("ngForOf",_.storageClassList),e.xp6(6),e.Q6J("ngForOf",_.poolList),e.xp6(6),e.Q6J("ngForOf",_.compressionTypes)}}function Ua(t,n){if(1&t&&(e.TgZ(0,"div",7),e.YNc(1,Da,48,8,"div",21),e.qZA()),2&t){const _=e.oxw();e.xp6(1),e.Q6J("ngIf","edit"===_.action)}}let va=(()=>{class t{constructor(_,o,i,s,l,r,d,u){this.activeModal=_,this.actionLabels=o,this.rgwMultisiteService=i,this.rgwZoneService=s,this.rgwZoneGroupService=l,this.notificationService=r,this.rgwUserService=d,this.modalService=u,this.endpoints=/^((https?:\/\/)|(www.))(?:([a-zA-Z]+)|(\d+\.\d+.\d+.\d+)):\d{2,4}$/,this.ipv4Rgx=/^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/i,this.ipv6Rgx=/^(?:[a-f0-9]{1,4}:){7}[a-f0-9]{1,4}$/i,this.editing=!1,this.defaultsInfo=[],this.multisiteInfo=[],this.zonegroupList=[],this.zoneList=[],this.poolList=[],this.storageClassList=[],this.disableDefault=!1,this.disableMaster=!1,this.isMetadataSync=!1,this.syncStatusTimedOut=!1,this.createSystemUser=!1,this.compressionTypes=["lz4","zlib","snappy"],this.userListReady=!1,this.action=this.editing?this.actionLabels.EDIT+this.resource:this.actionLabels.CREATE+this.resource,this.createForm()}createForm(){this.multisiteZoneForm=new V.d({zoneName:new a.p4(null,{validators:[a.kI.required,m.h.custom("uniqueName",_=>"create"===this.action&&this.zoneNames&&-1!==this.zoneNames.indexOf(_))]}),default_zone:new a.p4(!1),master_zone:new a.p4(!1),selectedZonegroup:new a.p4(null),zone_endpoints:new a.p4(null,{validators:[m.h.custom("endpoint",_=>!(E().isEmpty(_)||(_.includes(",")?(_.split(",").forEach(o=>!this.endpoints.test(o)&&!this.ipv4Rgx.test(o)&&!this.ipv6Rgx.test(o)),1):this.endpoints.test(_)||this.ipv4Rgx.test(_)||this.ipv6Rgx.test(_)))),a.kI.required]}),access_key:new a.p4(null,a.kI.required),secret_key:new a.p4(null,a.kI.required),placementTarget:new a.p4(null),placementDataPool:new a.p4(""),placementIndexPool:new a.p4(null),placementDataExtraPool:new a.p4(null),storageClass:new a.p4(null),storageDataPool:new a.p4(null),storageCompression:new a.p4(null)})}onZoneGroupChange(_){let o=new x.iG;o.name=_,this.rgwZoneGroupService.get(o).subscribe(i=>{E().isEmpty(i.master_zone)?(this.multisiteZoneForm.get("master_zone").setValue(!0),this.multisiteZoneForm.get("master_zone").disable(),this.disableMaster=!1):!E().isEmpty(i.master_zone)&&"create"===this.action&&(this.multisiteZoneForm.get("master_zone").setValue(!1),this.multisiteZoneForm.get("master_zone").disable(),this.disableMaster=!0)}),this.multisiteZoneForm.getValue("selectedZonegroup")!==this.defaultsInfo.defaultZonegroupName&&(this.disableDefault=!0,this.multisiteZoneForm.get("default_zone").disable())}ngOnInit(){this.zonegroupList=void 0!==this.multisiteInfo[1]&&this.multisiteInfo[1].hasOwnProperty("zonegroups")?this.multisiteInfo[1].zonegroups:[],this.zoneList=void 0!==this.multisiteInfo[2]&&this.multisiteInfo[2].hasOwnProperty("zones")?this.multisiteInfo[2].zones:[],this.zoneNames=this.zoneList.map(_=>_.name),"create"===this.action&&void 0!==this.defaultsInfo.defaultZonegroupName&&(this.multisiteZoneForm.get("selectedZonegroup").setValue(this.defaultsInfo.defaultZonegroupName),this.onZoneGroupChange(this.defaultsInfo.defaultZonegroupName)),"edit"===this.action&&(this.placementTargets=this.info.parent?this.info.parent.data.placement_targets:[],this.rgwZoneService.getPoolNames().subscribe(o=>{this.poolList=o}),this.multisiteZoneForm.get("zoneName").setValue(this.info.data.name),this.multisiteZoneForm.get("selectedZonegroup").setValue(this.info.data.parent),this.multisiteZoneForm.get("default_zone").setValue(this.info.data.is_default),this.multisiteZoneForm.get("master_zone").setValue(this.info.data.is_master),this.multisiteZoneForm.get("zone_endpoints").setValue(this.info.data.endpoints.toString()),this.multisiteZoneForm.get("access_key").setValue(this.info.data.access_key),this.multisiteZoneForm.get("secret_key").setValue(this.info.data.secret_key),this.multisiteZoneForm.get("placementTarget").setValue(this.info.parent.data.default_placement),this.getZonePlacementData(this.multisiteZoneForm.getValue("placementTarget")),this.info.data.is_default&&(this.isDefaultZone=!0,this.multisiteZoneForm.get("default_zone").disable()),this.info.data.is_master&&(this.isMasterZone=!0,this.multisiteZoneForm.get("master_zone").disable()),(new x.jb).name=this.info.data.name,this.onZoneGroupChange(this.info.data.parent)),this.multisiteZoneForm.getValue("selectedZonegroup")!==this.defaultsInfo.defaultZonegroupName&&(this.disableDefault=!0,this.multisiteZoneForm.get("default_zone").disable())}getZonePlacementData(_){this.zone=new x.jb,this.zone.name=this.info.data.name,this.placementTargets&&this.placementTargets.forEach(o=>{o.name===_&&(this.storageClassList=Object.entries(o.storage_classes).map(([s,l])=>({key:s,value:l})))}),this.rgwZoneService.get(this.zone).subscribe(o=>{this.zoneInfo=o,this.zoneInfo&&this.zoneInfo.placement_pools&&this.zoneInfo.placement_pools.forEach(i=>{if(i.key===_){let s=i.val.storage_classes,l=s.STANDARD?s.STANDARD.data_pool:"",r=i.val.index_pool,d=i.val.data_extra_pool;this.poolList.push({poolname:l}),this.poolList.push({poolname:r}),this.poolList.push({poolname:d}),this.multisiteZoneForm.get("storageClass").setValue(this.storageClassList[0].value),this.multisiteZoneForm.get("storageDataPool").setValue(l),this.multisiteZoneForm.get("storageCompression").setValue(this.compressionTypes[0]),this.multisiteZoneForm.get("placementDataPool").setValue(l),this.multisiteZoneForm.get("placementIndexPool").setValue(r),this.multisiteZoneForm.get("placementDataExtraPool").setValue(d)}})})}getStorageClassData(_){let o=this.storageClassList.find(i=>i.value==_).value;this.poolList.push({poolname:o.data_pool}),this.multisiteZoneForm.get("storageDataPool").setValue(o.data_pool),this.multisiteZoneForm.get("storageCompression").setValue(o.compression_type)}submit(){const _=this.multisiteZoneForm.getRawValue();"create"===this.action?(this.zonegroup=new x.iG,this.zonegroup.name=_.selectedZonegroup,this.zone=new x.jb,this.zone.name=_.zoneName,this.zone.endpoints=_.zone_endpoints,this.zone.system_key=new x.VY,this.zone.system_key.access_key=_.access_key,this.zone.system_key.secret_key=_.secret_key,this.rgwZoneService.create(this.zone,this.zonegroup,_.default_zone,_.master_zone,this.zone.endpoints).subscribe(()=>{this.notificationService.show(w.k.success,"Zone: '" + _.zoneName + "' created successfully"),this.activeModal.close()},()=>{this.multisiteZoneForm.setErrors({cdSubmitButton:!0})})):"edit"===this.action&&(this.zonegroup=new x.iG,this.zonegroup.name=_.selectedZonegroup,this.zone=new x.jb,this.zone.name=this.info.data.name,this.zone.endpoints=_.zone_endpoints,this.zone.system_key=new x.VY,this.zone.system_key.access_key=_.access_key,this.zone.system_key.secret_key=_.secret_key,this.rgwZoneService.update(this.zone,this.zonegroup,_.zoneName,_.default_zone,_.master_zone,this.zone.endpoints,_.placementTarget,_.placementDataPool,_.placementIndexPool,_.placementDataExtraPool,_.storageClass,_.storageDataPool,_.storageCompression).subscribe(()=>{this.notificationService.show(w.k.success,"Zone: '" + _.zoneName + "' updated successfully"),this.activeModal.close()},()=>{this.multisiteZoneForm.setErrors({cdSubmitButton:!0})}))}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(G.Kz),e.Y36(I.p4),e.Y36(e_.o),e.Y36(ue.g),e.Y36(ge.K),e.Y36(Y.g),e.Y36(Q),e.Y36(ee.Z))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-multisite-zone-form"]],decls:71,vars:29,consts:function(){let n,_,o,i,s,l,r,d,u,R,O,F,b,h,M,L,S,W,C,Z,D,U,v,y,f;return n="" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",_="Select Zone Group",o="Zone Name",i="Default",s="Master",l="Endpoints",r="S3 access key " + "\ufffd#47\ufffd" + "" + "\ufffd#48\ufffd" + "To see or copy your S3 access key, go to " + "[\ufffd#49\ufffd|\ufffd#50\ufffd|\ufffd#51\ufffd|\ufffd#52\ufffd]" + "Object Gateway > Users" + "[\ufffd/#49\ufffd|\ufffd/#50\ufffd|\ufffd/#51\ufffd|\ufffd/#52\ufffd]" + " and click on your user name. In " + "[\ufffd#49\ufffd|\ufffd#50\ufffd|\ufffd#51\ufffd|\ufffd#52\ufffd]" + "Keys" + "[\ufffd/#49\ufffd|\ufffd/#50\ufffd|\ufffd/#51\ufffd|\ufffd/#52\ufffd]" + ", click " + "[\ufffd#49\ufffd|\ufffd#50\ufffd|\ufffd#51\ufffd|\ufffd#52\ufffd]" + "Show" + "[\ufffd/#49\ufffd|\ufffd/#50\ufffd|\ufffd/#51\ufffd|\ufffd/#52\ufffd]" + ". View the access key by clicking Show and copy the key by clicking " + "[\ufffd#49\ufffd|\ufffd#50\ufffd|\ufffd#51\ufffd|\ufffd#52\ufffd]" + "Copy to Clipboard" + "[\ufffd/#49\ufffd|\ufffd/#50\ufffd|\ufffd/#51\ufffd|\ufffd/#52\ufffd]" + "." + "\ufffd/#48\ufffd" + "" + "\ufffd/#47\ufffd" + "",r=e.Zx4(r),d="S3 secret key " + "\ufffd#58\ufffd" + "" + "\ufffd#59\ufffd" + "To see or copy your S3 access key, go to " + "[\ufffd#60\ufffd|\ufffd#61\ufffd|\ufffd#62\ufffd|\ufffd#63\ufffd]" + "Object Gateway > Users" + "[\ufffd/#60\ufffd|\ufffd/#61\ufffd|\ufffd/#62\ufffd|\ufffd/#63\ufffd]" + " and click on your user name. In " + "[\ufffd#60\ufffd|\ufffd#61\ufffd|\ufffd#62\ufffd|\ufffd#63\ufffd]" + "Keys" + "[\ufffd/#60\ufffd|\ufffd/#61\ufffd|\ufffd/#62\ufffd|\ufffd/#63\ufffd]" + ", click " + "[\ufffd#60\ufffd|\ufffd#61\ufffd|\ufffd#62\ufffd|\ufffd#63\ufffd]" + "Show" + "[\ufffd/#60\ufffd|\ufffd/#61\ufffd|\ufffd/#62\ufffd|\ufffd/#63\ufffd]" + ". View the secret key by clicking Show and copy the key by clicking " + "[\ufffd#60\ufffd|\ufffd#61\ufffd|\ufffd#62\ufffd|\ufffd#63\ufffd]" + "Copy to Clipboard" + "[\ufffd/#60\ufffd|\ufffd/#61\ufffd|\ufffd/#62\ufffd|\ufffd/#63\ufffd]" + "." + "\ufffd/#59\ufffd" + "" + "\ufffd/#58\ufffd" + "",d=e.Zx4(d),u="This field is required.",R="The chosen zone name is already in use.",O="Default zone can only exist in a default zone group. ",F="You cannot unset the default flag. ",b="Please consult the " + "\ufffd#3\ufffd" + "documentation" + "\ufffd/#3\ufffd" + " to follow the failover mechanism",h="Master zone already exists for the selected zone group. ",M="You cannot unset the master flag. ",L="Please consult the " + "\ufffd#3\ufffd" + "documentation" + "\ufffd/#3\ufffd" + " to follow the failover mechanism",S="This field is required.",W="Please enter a valid IP address.",C="Placement target",Z="Data pool",D="Index pool",U="Data extra pool",v="Storage Class",y="Data pool",f="Compression",[[3,"modalRef"],[1,"modal-title"],n,[1,"modal-content"],["name","multisiteZoneForm","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","selectedZonegroup",1,"cd-col-form-label"],_,[1,"cd-col-form-input"],["id","selectedZonegroup","formControlName","selectedZonegroup","name","selectedZonegroup",1,"form-select",3,"change"],[3,"value","selected",4,"ngFor","ngForOf"],["for","zonegroupName",1,"cd-col-form-label","required"],o,["type","text","placeholder","Zone name...","id","zoneName","name","zoneName","formControlName","zoneName",1,"form-control"],["class","invalid-feedback",4,"ngIf"],[1,"custom-control","custom-checkbox"],["id","default_zone","name","default_zone","formControlName","default_zone","type","checkbox",1,"form-check-input"],["for","default_zone",1,"form-check-label"],i,[4,"ngIf"],["id","master_zone","name","master_zone","formControlName","master_zone","type","checkbox",1,"form-check-input"],["for","master_zone",1,"form-check-label"],s,["for","zone_endpoints",1,"cd-col-form-label","required"],l,["type","text","placeholder","e.g, http://ceph-node-00.com:80","id","zone_endpoints","name","zone_endpoints","formControlName","zone_endpoints",1,"form-control"],["for","access_key",1,"cd-col-form-label","required"],r,["type","text","placeholder","DiPt4V7WWvy2njL1z6aC","id","access_key","name","access_key","formControlName","access_key",1,"form-control"],d,["type","text","placeholder","xSZUdYky0bTctAdCEEW8ikhfBVKsBV5LFYL82vvh","id","secret_key","name","secret_key","formControlName","secret_key",1,"form-control"],["class","form-group row",4,"ngIf"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],[3,"value","selected"],[1,"invalid-feedback"],u,R,O,F,b,[3,"href"],h,M,L,S,W,["for","placementTarget",1,"cd-col-form-label"],C,["id","placementTarget","formControlName","placementTarget","name","placementTarget",1,"form-select",3,"change"],["for","placementDataPool",1,"cd-col-form-label"],Z,["id","placementDataPool","formControlName","placementDataPool","name","placementDataPool",1,"form-select",3,"value"],["for","placementIndexPool",1,"cd-col-form-label"],D,["id","placementIndexPool","formControlName","placementIndexPool","name","placementIndexPool",1,"form-select"],["for","placementDataExtraPool",1,"cd-col-form-label"],U,["id","placementDataExtraPool","formControlName","placementDataExtraPool","name","placementDataExtraPool",1,"form-select"],["for","storageClass",1,"cd-col-form-label"],v,["id","storageClass","formControlName","storageClass","name","storageClass",1,"form-select",3,"change"],[3,"value",4,"ngFor","ngForOf"],["for","storageDataPool",1,"cd-col-form-label"],y,["id","storageDataPool","formControlName","storageDataPool","name","storageDataPool",1,"form-select"],["for","storageCompression",1,"cd-col-form-label"],f,["id","storageCompression","formControlName","storageCompression","name","storageCompression",1,"form-select"],[3,"value"]]},template:function(_,o){if(1&_&&(e.TgZ(0,"cd-modal",0),e.ynx(1,1),e.SDv(2,2),e.ALo(3,"titlecase"),e.ALo(4,"upperFirst"),e.BQk(),e.ynx(5,3),e.TgZ(6,"form",4,5)(8,"div",6)(9,"div",7)(10,"label",8),e.SDv(11,9),e.qZA(),e.TgZ(12,"div",10)(13,"select",11),e.NdJ("change",function(s){return o.onZoneGroupChange(s.target.value)}),e.YNc(14,pa,2,3,"option",12),e.qZA()()(),e.TgZ(15,"div",7)(16,"label",13),e.SDv(17,14),e.qZA(),e.TgZ(18,"div",10),e._UZ(19,"input",15),e.YNc(20,ma,2,0,"span",16),e.YNc(21,Ma,2,0,"span",16),e.TgZ(22,"div",17),e._UZ(23,"input",18),e.TgZ(24,"label",19),e.SDv(25,20),e.qZA(),e.YNc(26,Sa,3,0,"span",21),e.YNc(27,Ca,3,0,"span",21),e.YNc(28,Oa,4,1,"cd-helper",21),e._UZ(29,"br"),e.qZA(),e.TgZ(30,"div",17),e._UZ(31,"input",22),e.TgZ(32,"label",23),e.SDv(33,24),e.qZA(),e.YNc(34,Fa,3,0,"span",21),e.YNc(35,Pa,3,0,"span",21),e.YNc(36,Na,4,1,"cd-helper",21),e.qZA()()(),e.TgZ(37,"div",7)(38,"label",25),e.SDv(39,26),e.qZA(),e.TgZ(40,"div",10),e._UZ(41,"input",27),e.YNc(42,Ga,2,0,"span",16),e.YNc(43,Aa,2,0,"span",16),e.qZA()(),e.TgZ(44,"div",7)(45,"label",28),e.tHW(46,29),e.TgZ(47,"cd-helper")(48,"span"),e._UZ(49,"b")(50,"b")(51,"b")(52,"b"),e.qZA()(),e.N_p(),e.qZA(),e.TgZ(53,"div",10),e._UZ(54,"input",30),e.qZA()(),e.TgZ(55,"div",7)(56,"label",28),e.tHW(57,31),e.TgZ(58,"cd-helper")(59,"span"),e._UZ(60,"b")(61,"b")(62,"b")(63,"b"),e.qZA()(),e.N_p(),e.qZA(),e.TgZ(64,"div",10),e._UZ(65,"input",32),e.qZA()(),e.YNc(66,Ua,2,1,"div",33),e.qZA(),e.TgZ(67,"div",34)(68,"cd-form-button-panel",35),e.NdJ("submitActionEvent",function(){return o.submit()}),e.ALo(69,"titlecase"),e.ALo(70,"upperFirst"),e.qZA()()(),e.BQk(),e.qZA()),2&_){const i=e.MAs(7);e.Q6J("modalRef",o.activeModal),e.xp6(4),e.pQV(e.lcZ(3,21,o.action))(e.lcZ(4,23,o.resource)),e.QtT(2),e.xp6(2),e.Q6J("formGroup",o.multisiteZoneForm),e.xp6(7),e.uIk("disabled","edit"===o.action||null),e.xp6(1),e.Q6J("ngForOf",o.zonegroupList),e.xp6(6),e.Q6J("ngIf",o.multisiteZoneForm.showError("zoneName",i,"required")),e.xp6(1),e.Q6J("ngIf",o.multisiteZoneForm.showError("zoneName",i,"uniqueName")),e.xp6(2),e.uIk("disabled","edit"===o.action||null),e.xp6(3),e.Q6J("ngIf",o.disableDefault&&"create"===o.action),e.xp6(1),e.Q6J("ngIf",o.isDefaultZone),e.xp6(1),e.Q6J("ngIf","edit"===o.action&&!o.isDefaultZone),e.xp6(3),e.uIk("disabled","edit"===o.action||null),e.xp6(3),e.Q6J("ngIf",o.disableMaster),e.xp6(1),e.Q6J("ngIf",o.isMasterZone),e.xp6(1),e.Q6J("ngIf","edit"===o.action&&!o.isMasterZone),e.xp6(6),e.Q6J("ngIf",o.multisiteZoneForm.showError("zone_endpoints",i,"required")),e.xp6(1),e.Q6J("ngIf",o.multisiteZoneForm.showError("zone_endpoints",i,"endpoint")),e.xp6(23),e.Q6J("ngIf","edit"===o.action),e.xp6(2),e.Q6J("form",o.multisiteZoneForm)("submitText",e.lcZ(69,25,o.action)+" "+e.lcZ(70,27,o.resource))}},dependencies:[T.sg,T.O5,j.S,X.z,B.p,k.o,q.b,z.P,H.V,a._Y,a.YN,a.Kr,a.Fj,a.Wl,a.EJ,a.JJ,a.JL,a.sg,a.u,T.rS,_e.m]}),t})();var ya=c(36569);function wa(t,n){if(1&t&&(e.TgZ(0,"option",33),e._uU(1),e.qZA()),2&t){const _=n.$implicit,o=e.oxw();e.Q6J("value",_.name)("selected",_.name===o.multisiteZonegroupForm.getValue("selectedRealm")),e.xp6(1),e.hij(" ",_.name," ")}}function xa(t,n){1&t&&(e.TgZ(0,"span",34),e.SDv(1,35),e.qZA())}function ka(t,n){1&t&&(e.TgZ(0,"span",34),e.SDv(1,36),e.qZA())}function za(t,n){1&t&&(e.TgZ(0,"span")(1,"cd-helper"),e.SDv(2,37),e.qZA()())}function qa(t,n){if(1&t&&(e.TgZ(0,"cd-helper")(1,"span"),e.tHW(2,38),e._UZ(3,"a",39),e.N_p(),e.qZA()()),2&t){const _=e.oxw();e.xp6(3),e.s9C("href",_.docUrl,e.LSH)}}function Ha(t,n){1&t&&(e.TgZ(0,"cd-helper")(1,"span"),e.SDv(2,40),e.qZA()())}function Xa(t,n){1&t&&(e.TgZ(0,"span")(1,"cd-helper"),e.SDv(2,41),e.qZA()())}function Ba(t,n){if(1&t&&(e.TgZ(0,"cd-helper")(1,"span"),e.tHW(2,42),e._UZ(3,"a",39),e.N_p(),e.qZA()()),2&t){const _=e.oxw();e.xp6(3),e.s9C("href",_.docUrl,e.LSH)}}function Qa(t,n){1&t&&(e.TgZ(0,"cd-helper")(1,"span"),e.SDv(2,43),e.qZA()())}function Ya(t,n){1&t&&(e.TgZ(0,"span",34),e.SDv(1,44),e.qZA())}function Ja(t,n){1&t&&(e.TgZ(0,"span",34),e.SDv(1,45),e.qZA())}function Ka(t,n){1&t&&(e.TgZ(0,"span",34),e.SDv(1,49),e.qZA())}function Va(t,n){if(1&t&&(e.TgZ(0,"div",7)(1,"label",46),e.SDv(2,47),e.qZA(),e.TgZ(3,"div",10),e._UZ(4,"cd-select-badges",48)(5,"br"),e.YNc(6,Ka,2,0,"span",18),e.qZA()()),2&t){const _=e.oxw();e.xp6(4),e.Q6J("data",_.zonegroupZoneNames)("options",_.labelsOption)("customBadges",!0),e.xp6(2),e.Q6J("ngIf",_.isRemoveMasterZone)}}function ja(t,n){1&t&&(e.TgZ(0,"span"),e.SDv(1,68),e.qZA())}function el(t,n){if(1&t){const _=e.EpF();e.TgZ(0,"div")(1,"div",55)(2,"div",56),e._uU(3),e.ALo(4,"ordinal"),e.TgZ(5,"span",57),e.NdJ("click",function(){const s=e.CHM(_).index,l=e.oxw(2);return e.KtG(l.removePlacementTarget(s))}),e._uU(6,"\xd7"),e.qZA()(),e.TgZ(7,"div",58)(8,"div",7)(9,"label",59),e.SDv(10,60),e.qZA(),e.TgZ(11,"div",10),e._UZ(12,"input",61),e.TgZ(13,"span",34),e.YNc(14,ja,2,0,"span",23),e.qZA()()(),e.TgZ(15,"div",7)(16,"label",62),e.SDv(17,63),e.qZA(),e.TgZ(18,"div",10),e._UZ(19,"input",64),e.qZA()(),e.TgZ(20,"div",7)(21,"label",65),e.SDv(22,66),e.qZA(),e.TgZ(23,"div",10),e._UZ(24,"input",67),e.qZA()()()()()}if(2&t){const _=n.$implicit,o=n.index,i=e.oxw(2),s=e.MAs(6);e.xp6(1),e.Q6J("formGroup",_),e.xp6(2),e.hij(" ",e.lcZ(4,3,o+1)," "),e.xp6(11),e.Q6J("ngIf",i.showError(o,"placement_id",s,"required"))}}const _l=function(t){return[t]};function tl(t,n){if(1&t){const _=e.EpF();e.TgZ(0,"div")(1,"legend"),e._uU(2,"Placement targets"),e.qZA(),e.ynx(3,50),e.YNc(4,el,25,5,"div",51),e.BQk(),e.TgZ(5,"button",52),e.NdJ("click",function(){e.CHM(_);const i=e.oxw();return e.KtG(i.addPlacementTarget())}),e._UZ(6,"i",53),e.ynx(7),e.SDv(8,54),e.BQk(),e.qZA()()}if(2&t){const _=e.oxw();e.xp6(4),e.Q6J("ngForOf",_.placementTargets.controls)("ngForTrackBy",_.trackByFn),e.xp6(2),e.Q6J("ngClass",e.VKq(3,_l,_.icons.add))}}let ol=(()=>{class t{constructor(_,o,i,s,l){this.activeModal=_,this.actionLabels=o,this.rgwZonegroupService=i,this.notificationService=s,this.formBuilder=l,this.endpoints=/^((https?:\/\/)|(www.))(?:([a-zA-Z]+)|(\d+\.\d+.\d+.\d+)):\d{2,4}$/,this.ipv4Rgx=/^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/i,this.ipv6Rgx=/^(?:[a-f0-9]{1,4}:){7}[a-f0-9]{1,4}$/i,this.icons=$.P,this.editing=!1,this.defaultsInfo=[],this.multisiteInfo=[],this.realmList=[],this.zonegroupList=[],this.isMaster=!1,this.labelsOption=[],this.zoneList=[],this.isRemoveMasterZone=!1,this.disableDefault=!1,this.disableMaster=!1,this.action=this.editing?this.actionLabels.EDIT+this.resource:this.actionLabels.CREATE+this.resource,this.createForm()}createForm(){this.multisiteZonegroupForm=new V.d({default_zonegroup:new a.p4(!1),zonegroupName:new a.p4(null,{validators:[a.kI.required,m.h.custom("uniqueName",_=>"create"===this.action&&this.zonegroupNames&&-1!==this.zonegroupNames.indexOf(_))]}),master_zonegroup:new a.p4(!1),selectedRealm:new a.p4(null),zonegroup_endpoints:new a.p4(null,[m.h.custom("endpoint",_=>!(E().isEmpty(_)||(_.includes(",")?(_.split(",").forEach(o=>!this.endpoints.test(o)&&!this.ipv4Rgx.test(o)&&!this.ipv6Rgx.test(o)),1):this.endpoints.test(_)||this.ipv4Rgx.test(_)||this.ipv6Rgx.test(_)))),a.kI.required]),placementTargets:this.formBuilder.array([])})}ngOnInit(){E().forEach(this.multisiteZonegroupForm.get("placementTargets"),s=>{this.addPlacementTarget().patchValue(s)}),this.placementTargets=this.multisiteZonegroupForm.get("placementTargets"),this.realmList=void 0!==this.multisiteInfo[0]&&this.multisiteInfo[0].hasOwnProperty("realms")?this.multisiteInfo[0].realms:[],this.zonegroupList=void 0!==this.multisiteInfo[1]&&this.multisiteInfo[1].hasOwnProperty("zonegroups")?this.multisiteInfo[1].zonegroups:[],this.zonegroupList.forEach(s=>{!0===s.is_master&&!E().isEmpty(s.realm_id)&&(this.isMaster=!0,this.disableMaster=!0)}),this.isMaster||(this.multisiteZonegroupForm.get("master_zonegroup").setValue(!0),this.multisiteZonegroupForm.get("master_zonegroup").disable()),this.zoneList=void 0!==this.multisiteInfo[2]&&this.multisiteInfo[2].hasOwnProperty("zones")?this.multisiteInfo[2].zones:[],this.zonegroupNames=this.zonegroupList.map(s=>s.name);const i=this.zonegroupList.map(s=>s.zones).reduce((s,l)=>s.concat(l),[]).map(s=>s.name);if(this.allZoneNames=this.zoneList.map(s=>s.name),this.allZoneNames=E().difference(this.allZoneNames,i),"create"===this.action&&null!==this.defaultsInfo.defaultRealmName&&(this.multisiteZonegroupForm.get("selectedRealm").setValue(this.defaultsInfo.defaultRealmName),this.disableMaster&&this.multisiteZonegroupForm.get("master_zonegroup").disable()),"edit"===this.action){this.multisiteZonegroupForm.get("zonegroupName").setValue(this.info.data.name),this.multisiteZonegroupForm.get("selectedRealm").setValue(this.info.data.parent),this.multisiteZonegroupForm.get("default_zonegroup").setValue(this.info.data.is_default),this.multisiteZonegroupForm.get("master_zonegroup").setValue(this.info.data.is_master),this.multisiteZonegroupForm.get("zonegroup_endpoints").setValue(this.info.data.endpoints),this.info.data.is_default&&this.multisiteZonegroupForm.get("default_zonegroup").disable(),!this.info.data.is_default&&this.multisiteZonegroupForm.getValue("selectedRealm")!==this.defaultsInfo.defaultRealmName&&(this.multisiteZonegroupForm.get("default_zonegroup").disable(),this.disableDefault=!0),(this.info.data.is_master||this.disableMaster)&&this.multisiteZonegroupForm.get("master_zonegroup").disable(),this.zonegroupZoneNames=this.info.data.zones.map(l=>l.name),this.zgZoneNames=this.info.data.zones.map(l=>l.name),this.zgZoneIds=this.info.data.zones.map(l=>l.id);const s=new Set(this.allZoneNames);this.labelsOption=Array.from(s).map(l=>({enabled:!0,name:l,selected:!1,description:null})),this.info.data.placement_targets.forEach(l=>{const r=this.addPlacementTarget();let d={placement_id:l.name,tags:l.tags.join(","),storage_class:"string"==typeof l.storage_classes?l.storage_classes:l.storage_classes.join(",")};r.patchValue(d)})}}submit(){const _=this.multisiteZonegroupForm.getRawValue();if("create"===this.action)this.realm=new x.L6,this.realm.name=_.selectedRealm,this.zonegroup=new x.iG,this.zonegroup.name=_.zonegroupName,this.zonegroup.endpoints=_.zonegroup_endpoints,this.rgwZonegroupService.create(this.realm,this.zonegroup,_.default_zonegroup,_.master_zonegroup).subscribe(()=>{this.notificationService.show(w.k.success,"Zonegroup: '" + _.zonegroupName + "' created successfully"),this.activeModal.close()},()=>{this.multisiteZonegroupForm.setErrors({cdSubmitButton:!0})});else if("edit"===this.action){this.removedZones=E().difference(this.zgZoneNames,this.zonegroupZoneNames);const o=this.info.data.zones.filter(i=>i.id===this.info.data.master_zone);if(this.isRemoveMasterZone=this.removedZones.includes(o[0].name),this.isRemoveMasterZone)return void this.multisiteZonegroupForm.setErrors({cdSubmitButton:!0});this.addedZones=E().difference(this.zonegroupZoneNames,this.zgZoneNames),this.realm=new x.L6,this.realm.name=_.selectedRealm,this.zonegroup=new x.iG,this.zonegroup.name=this.info.data.name,this.newZonegroupName=_.zonegroupName,this.zonegroup.endpoints=_.zonegroup_endpoints.toString(),this.zonegroup.placement_targets=_.placementTargets,this.rgwZonegroupService.update(this.realm,this.zonegroup,this.newZonegroupName,_.default_zonegroup,_.master_zonegroup,this.removedZones,this.addedZones).subscribe(()=>{this.notificationService.show(w.k.success,"Zonegroup: '" + _.zonegroupName + "' updated successfully"),this.activeModal.close()},()=>{this.multisiteZonegroupForm.setErrors({cdSubmitButton:!0})})}}addPlacementTarget(){this.placementTargets=this.multisiteZonegroupForm.get("placementTargets");const _=new V.d({placement_id:new a.p4("",{validators:[a.kI.required]}),tags:new a.p4(""),storage_class:new a.p4([])});return this.placementTargets.push(_),_}trackByFn(_){return _}removePlacementTarget(_){this.placementTargets=this.multisiteZonegroupForm.get("placementTargets"),this.placementTargets.removeAt(_)}showError(_,o,i,s){return this.multisiteZonegroupForm.controls.placementTargets.controls[_].showError(o,i,s)}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(G.Kz),e.Y36(I.p4),e.Y36(ge.K),e.Y36(Y.g),e.Y36(a.QS))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-multisite-zonegroup-form"]],decls:49,vars:24,consts:function(){let n,_,o,i,s,l,r,d,u,R,O,F,b,h,M,L,S,W,C,Z,D,U,v,y;return n="" + "\ufffd0\ufffd" + " Zone Group",_="Select Realm",o="-- Select a realm --",i="Zone Group Name",s="Default",l="Master",r="Endpoints",d="This field is required.",u="The chosen zone group name is already in use.",R="Zone group doesn't belong to the default realm.",O="Please consult the " + "\ufffd#3\ufffd" + "documentation" + "\ufffd/#3\ufffd" + " to follow the failover mechanism",F="You cannot unset the default flag.",b="Multiple master zone groups can't be configured. If you want to create a new zone group and make it the master zone group, you must delete the default zone group.",h="Please consult the " + "\ufffd#3\ufffd" + "documentation" + "\ufffd/#3\ufffd" + " to follow the failover mechanism",M="You cannot unset the master flag.",L="This field is required.",S="Please enter a valid IP address.",W="Zones",C="Cannot remove master zone.",Z="Add placement target",D="Placement Id",U="Tags",v="Storage Class",y="This field is required.",[[3,"modalRef"],[1,"modal-title"],n,[1,"modal-content"],["name","multisiteZonegroupForm","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","selectedRealm",1,"cd-col-form-label"],_,[1,"cd-col-form-input"],["id","selectedRealm","formControlName","selectedRealm","name","selectedRealm",1,"form-select"],["ngValue",""],o,[3,"value","selected",4,"ngFor","ngForOf"],["for","zonegroupName",1,"cd-col-form-label","required"],i,["type","text","placeholder","Zone group name...","id","zonegroupName","name","zonegroupName","formControlName","zonegroupName",1,"form-control"],["class","invalid-feedback",4,"ngIf"],[1,"custom-control","custom-checkbox"],["id","default_zonegroup","name","default_zonegroup","formControlName","default_zonegroup","type","checkbox",1,"form-check-input"],["for","default_zonegroup",1,"form-check-label"],s,[4,"ngIf"],["id","master_zonegroup","name","master_zonegroup","formControlName","master_zonegroup","type","checkbox",1,"form-check-input"],["for","master_zonegroup",1,"form-check-label"],l,["for","zonegroup_endpoints",1,"cd-col-form-label","required"],r,["type","text","placeholder","e.g, http://ceph-node-00.com:80","id","zonegroup_endpoints","name","zonegroup_endpoints","formControlName","zonegroup_endpoints",1,"form-control"],["class","form-group row",4,"ngIf"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],[3,"value","selected"],[1,"invalid-feedback"],d,u,R,O,[3,"href"],F,b,h,M,L,S,["for","zones",1,"cd-col-form-label"],W,["id","zones",3,"data","options","customBadges"],C,["formArrayName","placementTargets"],[4,"ngFor","ngForOf","ngForTrackBy"],["type","button","id","add-plc",1,"btn","btn-light","float-end","my-3",3,"click"],[3,"ngClass"],Z,[1,"card",3,"formGroup"],[1,"card-header"],["name","remove_placement_target","ngbTooltip","Remove",1,"float-end","clickable",3,"click"],[1,"card-body"],["for","placement_id",1,"cd-col-form-label","required"],D,["type","text","name","placement_id","id","placement_id","formControlName","placement_id","placeholder","eg. default-placement",1,"form-control"],["for","tags",1,"cd-col-form-label"],U,["type","text","name","tags","id","tags","formControlName","tags","placeholder","comma separated tags, eg. default-placement, ssd",1,"form-control"],["for","storage_class",1,"cd-col-form-label"],v,["type","text","name","storage_class","id","storage_class","formControlName","storage_class","placeholder","eg. Standard-tier",1,"form-control"],y]},template:function(_,o){if(1&_&&(e.TgZ(0,"cd-modal",0),e.ynx(1,1),e.SDv(2,2),e.ALo(3,"titlecase"),e.BQk(),e.ynx(4,3),e.TgZ(5,"form",4,5)(7,"div",6)(8,"div",7)(9,"label",8),e.SDv(10,9),e.qZA(),e.TgZ(11,"div",10)(12,"select",11)(13,"option",12),e.SDv(14,13),e.qZA(),e.YNc(15,wa,2,3,"option",14),e.qZA()()(),e.TgZ(16,"div",7)(17,"label",15),e.SDv(18,16),e.qZA(),e.TgZ(19,"div",10),e._UZ(20,"input",17),e.YNc(21,xa,2,0,"span",18),e.YNc(22,ka,2,0,"span",18),e.TgZ(23,"div",19),e._UZ(24,"input",20),e.TgZ(25,"label",21),e.SDv(26,22),e.qZA(),e.YNc(27,za,3,0,"span",23),e.YNc(28,qa,4,1,"cd-helper",23),e.YNc(29,Ha,3,0,"cd-helper",23),e._UZ(30,"br")(31,"input",24),e.TgZ(32,"label",25),e.SDv(33,26),e.qZA(),e.YNc(34,Xa,3,0,"span",23),e.YNc(35,Ba,4,1,"cd-helper",23),e.YNc(36,Qa,3,0,"cd-helper",23),e.qZA()()(),e.TgZ(37,"div",7)(38,"label",27),e.SDv(39,28),e.qZA(),e.TgZ(40,"div",10),e._UZ(41,"input",29),e.YNc(42,Ya,2,0,"span",18),e.YNc(43,Ja,2,0,"span",18),e.qZA()(),e.YNc(44,Va,7,4,"div",30),e.YNc(45,tl,9,5,"div",23),e.qZA(),e.TgZ(46,"div",31)(47,"cd-form-button-panel",32),e.NdJ("submitActionEvent",function(){return o.submit()}),e.ALo(48,"titlecase"),e.qZA()()(),e.BQk(),e.qZA()),2&_){const i=e.MAs(6);e.Q6J("modalRef",o.activeModal),e.xp6(3),e.pQV(e.lcZ(3,20,o.action)),e.QtT(2),e.xp6(2),e.Q6J("formGroup",o.multisiteZonegroupForm),e.xp6(10),e.Q6J("ngForOf",o.realmList),e.xp6(6),e.Q6J("ngIf",o.multisiteZonegroupForm.showError("zonegroupName",i,"required")),e.xp6(1),e.Q6J("ngIf",o.multisiteZonegroupForm.showError("zonegroupName",i,"uniqueName")),e.xp6(2),e.uIk("disabled","edit"===o.action||null),e.xp6(3),e.Q6J("ngIf",o.disableDefault&&"create"===o.action),e.xp6(1),e.Q6J("ngIf","edit"===o.action&&!o.info.data.is_default),e.xp6(1),e.Q6J("ngIf","edit"===o.action&&o.info.data.is_default),e.xp6(2),e.uIk("disabled","edit"===o.action||null),e.xp6(3),e.Q6J("ngIf",o.disableMaster&&"create"===o.action),e.xp6(1),e.Q6J("ngIf","edit"===o.action&&!o.info.data.is_master),e.xp6(1),e.Q6J("ngIf","edit"===o.action&&o.info.data.is_master),e.xp6(6),e.Q6J("ngIf",o.multisiteZonegroupForm.showError("zonegroup_endpoints",i,"required")),e.xp6(1),e.Q6J("ngIf",o.multisiteZonegroupForm.showError("zonegroup_endpoints",i,"endpoint")),e.xp6(1),e.Q6J("ngIf","edit"===o.action),e.xp6(1),e.Q6J("ngIf","edit"===o.action),e.xp6(2),e.Q6J("form",o.multisiteZonegroupForm)("submitText",e.lcZ(48,22,o.action)+" Zone Group")}},dependencies:[T.mk,T.sg,T.O5,j.S,I_.m,X.z,B.p,k.o,q.b,z.P,H.V,a._Y,a.YN,a.Kr,a.Fj,a.Wl,a.EJ,a.JJ,a.JL,a.sg,a.u,a.CE,G._L,T.rS,ya.f]}),t})();var nl=c(61717),il=c(36848),sl=c(7273);const al=["tree"];function ll(t,n){if(1&t){const _=e.EpF();e.TgZ(0,"cd-alert-panel",17),e.tHW(1,18),e.TgZ(2,"a",19),e.NdJ("click",function(){e.CHM(_);const i=e.oxw();return e.KtG(i.enableRgwModule())}),e.qZA(),e.N_p(),e.qZA()}}function rl(t,n){1&t&&(e.TgZ(0,"cd-alert-panel",20),e.tHW(1,21),e._UZ(2,"a",22),e.N_p(),e.qZA())}function cl(t,n){if(1&t&&(e.TgZ(0,"span"),e._UZ(1,"cd-table-actions",23),e.qZA()),2&t){const _=e.oxw();e.xp6(1),e.Q6J("permission",_.permission)("btnColor","light")("selection",_.selection)("tableActions",_.migrateTableAction)}}const dl=function(t,n,_){return[t,n,_]};function ul(t,n){if(1&t&&e._UZ(0,"i",24),2&t){const _=e.oxw();e.Q6J("ngClass",e.kEZ(1,dl,_.icons.large,_.icons.spinner,_.icons.spin))}}function gl(t,n){if(1&t&&(e.TgZ(0,"span"),e._UZ(1,"i",30),e.qZA()),2&t){const _=e.oxw(2).$implicit,o=e.oxw();e.xp6(1),e.Q6J("title",_.data.warning_message)("ngClass",o.icons.danger)}}function Rl(t,n){if(1&t&&(e.TgZ(0,"span",29),e.YNc(1,gl,2,2,"span",5),e._UZ(2,"i",24),e._uU(3),e.qZA()),2&t){const _=e.oxw().$implicit;e.xp6(1),e.Q6J("ngIf",_.data.show_warning),e.xp6(1),e.Q6J("ngClass",_.data.icon),e.xp6(1),e.hij(" ",_.data.name," ")}}function Tl(t,n){1&t&&(e.TgZ(0,"span",31),e._uU(1," default "),e.qZA())}function El(t,n){1&t&&(e.TgZ(0,"span",32),e._uU(1," master "),e.qZA())}function fl(t,n){1&t&&(e.TgZ(0,"span",32),e._uU(1," secondary-zone "),e.qZA())}const b_=function(t){return[t]};function pl(t,n){if(1&t){const _=e.EpF();e.TgZ(0,"div",33)(1,"div",34)(2,"button",35),e.NdJ("click",function(){e.CHM(_);const i=e.oxw().$implicit,s=e.oxw();return e.KtG(s.openModal(i,!0))}),e._UZ(3,"i",24),e.qZA()(),e.TgZ(4,"div",34)(5,"button",36),e.NdJ("click",function(){e.CHM(_);const i=e.oxw().$implicit,s=e.oxw();return e.KtG(s.delete(i))}),e._UZ(6,"i",24),e.qZA()()()}if(2&t){const _=e.oxw().$implicit,o=e.oxw();e.xp6(1),e.Q6J("title",o.editTitle),e.xp6(1),e.Q6J("disabled",o.getDisable()||_.data.secondary_zone),e.xp6(1),e.Q6J("ngClass",e.VKq(6,b_,o.icons.edit)),e.xp6(1),e.Q6J("title",o.deleteTitle),e.xp6(1),e.Q6J("disabled",o.isDeleteDisabled(_)||_.data.secondary_zone),e.xp6(1),e.Q6J("ngClass",e.VKq(8,b_,o.icons.destroy))}}function ml(t,n){if(1&t&&(e.YNc(0,Rl,4,3,"span",25),e.YNc(1,Tl,2,0,"span",26),e.YNc(2,El,2,0,"span",27),e.YNc(3,fl,2,0,"span",27),e.YNc(4,pl,7,10,"div",28)),2&t){const _=n.$implicit;e.Q6J("ngIf",_.data.name),e.xp6(1),e.Q6J("ngIf",_.data.is_default),e.xp6(1),e.Q6J("ngIf",_.data.is_master),e.xp6(1),e.Q6J("ngIf",_.data.secondary_zone),e.xp6(1),e.Q6J("ngIf",_.isFocused)}}function Ml(t,n){if(1&t&&(e.TgZ(0,"div",37)(1,"legend"),e._uU(2),e.qZA(),e.TgZ(3,"div"),e._UZ(4,"cd-table-key-value",38),e.qZA()()),2&t){const _=e.oxw();e.xp6(2),e.Oqu(_.metadataTitle),e.xp6(2),e.Q6J("data",_.metadata)}}class Te{constructor(n,_,o,i,s,l,r,d,u,R,O,F){this.modalService=n,this.timerService=_,this.authStorageService=o,this.actionLabels=i,this.timerServiceVariable=s,this.router=l,this.rgwRealmService=r,this.rgwZonegroupService=d,this.rgwZoneService=u,this.rgwDaemonService=R,this.mgrModuleService=O,this.notificationService=F,this.sub=new N_.w,this.messages={noDefaultRealm:"Please create a default realm first to enable this feature",noMasterZone:"Please create a master zone for each zone group to enable this feature",noRealmExists:"No realm exists",disableExport:"Please create master zone group and master zone for each of the realms"},this.icons=$.P,this.selection=new qe.r,this.loadingIndicator=!0,this.nodes=[],this.treeOptions={useVirtualScroll:!0,nodeHeight:22,levelPadding:20,actionMapping:{mouse:{click:this.onNodeSelected.bind(this)}}},this.realms=[],this.zonegroups=[],this.zones=[],this.realmIds=[],this.zoneIds=[],this.defaultRealmId="",this.defaultZonegroupId="",this.defaultZoneId="",this.multisiteInfo=[],this.defaultsInfo=[],this.showMigrateAction=!1,this.editTitle="Edit",this.deleteTitle="Delete",this.disableExport=!0,this.restartGatewayMessage=!1,this.rgwModuleData=[],this.permission=this.authStorageService.getPermissions().rgw}openModal(n,_=!1){const o=_?n.data.type:n;this.bsModalRef=this.modalService.show("realm"===o?fa:"zonegroup"===o?ol:va,{resource:o,action:_?"edit":"create",info:n,defaultsInfo:this.defaultsInfo,multisiteInfo:this.multisiteInfo},{size:"lg"})}openMigrateModal(){this.bsModalRef=this.modalService.show(ms,{multisiteInfo:this.multisiteInfo},{size:"lg"})}openImportModal(){this.bsModalRef=this.modalService.show(ca,{multisiteInfo:this.multisiteInfo},{size:"lg"})}openExportModal(){this.bsModalRef=this.modalService.show(ws,{defaultsInfo:this.defaultsInfo,multisiteInfo:this.multisiteInfo},{size:"lg"})}getDisableExport(){return this.realms.forEach(n=>{this.zonegroups.forEach(_=>{n.id===_.realm_id&&_.is_master&&""!==_.master_zone&&(this.disableExport=!1)})}),!this.rgwModuleStatus||(this.realms.length<1?this.messages.noRealmExists:!!this.disableExport&&this.messages.disableExport)}getDisableImport(){return!this.rgwModuleStatus}ngOnInit(){const i={permission:"read",icon:$.P.exchange,name:this.actionLabels.MIGRATE,click:()=>this.openMigrateModal()},s={permission:"read",icon:$.P.download,name:this.actionLabels.IMPORT,click:()=>this.openImportModal(),disable:()=>this.getDisableImport()},l={permission:"read",icon:$.P.upload,name:this.actionLabels.EXPORT,click:()=>this.openExportModal(),disable:()=>this.getDisableExport()};this.createTableActions=[{permission:"create",icon:$.P.add,name:this.actionLabels.CREATE+" Realm",click:()=>this.openModal("realm")},{permission:"create",icon:$.P.add,name:this.actionLabels.CREATE+" Zone Group",click:()=>this.openModal("zonegroup"),disable:()=>this.getDisable()},{permission:"create",icon:$.P.add,name:this.actionLabels.CREATE+" Zone",click:()=>this.openModal("zone")}],this.migrateTableAction=[i],this.importAction=[s],this.exportAction=[l];const r=[this.rgwRealmService.getAllRealmsInfo(),this.rgwZonegroupService.getAllZonegroupsInfo(),this.rgwZoneService.getAllZonesInfo()];this.sub=this.timerService.get(()=>(0,ne.D)(r),2*this.timerServiceVariable.TIMER_SERVICE_PERIOD).subscribe(d=>{this.multisiteInfo=d,this.loadingIndicator=!1,this.nodes=this.abstractTreeData(d)},d=>{}),this.mgrModuleService.list().subscribe(d=>{this.rgwModuleData=d.filter(u=>"rgw"===u.name),this.rgwModuleData.length>0&&(this.rgwModuleStatus=this.rgwModuleData[0].enabled)})}ngOnDestroy(){this.sub.unsubscribe()}abstractTreeData(n){let _=[],o={},i={},s=[],l={},r=[];if(this.realms=n[0].realms,this.zonegroups=n[1].zonegroups,this.zones=n[2].zones,this.defaultRealmId=n[0].default_realm,this.defaultZonegroupId=n[1].default_zonegroup,this.defaultZoneId=n[2].default_zone,this.defaultsInfo=this.getDefaultsEntities(this.defaultRealmId,this.defaultZonegroupId,this.defaultZoneId),this.realms.length>0)for(const d of this.realms){const u=this.rgwRealmService.getRealmTree(d,this.defaultRealmId);o=u.nodes,this.realmIds=this.realmIds.concat(u.realmIds);for(const R of this.zonegroups)if(R.realm_id===d.id){i=this.rgwZonegroupService.getZonegroupTree(R,this.defaultZonegroupId,d);for(const O of R.zones){const F=this.rgwZoneService.getZoneTree(O,this.defaultZoneId,this.zones,R,d);l=F.nodes,this.zoneIds=this.zoneIds.concat(F.zoneIds),r.push(l),l={}}i.children=r,r=[],s.push(i),i={}}o.children=s,_.push(o),i={},l={},o={},s=[],r=[]}if(this.zonegroups.length>0)for(const d of this.zonegroups)if(!this.realmIds.includes(d.realm_id)){o=this.rgwZonegroupService.getZonegroupTree(d,this.defaultZonegroupId);for(const u of d.zones){const R=this.rgwZoneService.getZoneTree(u,this.defaultZoneId,this.zones,d);i=R.nodes,this.zoneIds=this.zoneIds.concat(R.zoneIds),s.push(i),i={}}o.children=s,_.push(o),i={},o={},s=[]}if(this.zones.length>0)for(const d of this.zones)this.zoneIds.length>0&&!this.zoneIds.includes(d.id)&&(o=this.rgwZoneService.getZoneTree(d,this.defaultZoneId,this.zones).nodes,_.push(o),o={});return this.realms.length<1&&this.zonegroups.length<1&&this.zones.length<1?[{name:"No nodes!"}]:(this.realmIds=[],this.zoneIds=[],this.getDisableMigrate(),this.rgwDaemonService.list().subscribe(d=>{const u=d.map(R=>R.realm_name);""!=this.defaultRealmId&&""!=this.defaultZonegroupId&&""!=this.defaultZoneId&&u.includes("")&&(this.restartGatewayMessage=!0)}),_)}getDefaultsEntities(n,_,o){const i=this.realms.find(R=>R.id===n),s=this.zonegroups.find(R=>R.id===_),l=this.zones.find(R=>R.id===o);return{defaultRealmName:void 0!==i?i.name:null,defaultZonegroupName:void 0!==s?s.name:null,defaultZoneName:void 0!==l?l.name:null}}onNodeSelected(n,_){je.iM.ACTIVATE(n,_,!0),this.metadataTitle=_.data.name,this.metadata=_.data.info,_.data.show=!0}onUpdateData(){this.tree.treeModel.expandAll()}getDisable(){let n=!0;return""===this.defaultRealmId?this.messages.noDefaultRealm:(this.zonegroups.forEach(_=>{E().isEmpty(_.master_zone)&&(n=!1)}),n?(this.editTitle="Edit",!1):(this.editTitle="Please create a master zone for each existing zonegroup to enable this feature",this.messages.noMasterZone))}getDisableMigrate(){return this.showMigrateAction=0===this.realms.length&&1===this.zonegroups.length&&"default"===this.zonegroups[0].name&&1===this.zones.length&&"default"===this.zones[0].name,this.showMigrateAction}isDeleteDisabled(n){let _=!1,o=0;if("realm"===n.data.type&&n.data.is_default&&this.realms.length<2&&(_=!0),"zonegroup"===n.data.type)if(this.zonegroups.length<2)this.deleteTitle="You can not delete the only zonegroup available",_=!0;else if(n.data.is_default)this.deleteTitle="You can not delete the default zonegroup",_=!0;else if(n.data.is_master){for(let i of this.zonegroups)if(!0===i.is_master&&(o++,o>1))break;o<2&&(this.deleteTitle="You can not delete the only master zonegroup available",_=!0)}return"zone"===n.data.type&&(this.zones.length<2?(this.deleteTitle="You can not delete the only zone available",_=!0):n.data.is_default?(this.deleteTitle="You can not delete the default zone",_=!0):n.data.is_master&&n.data.zone_zonegroup.zones.length<2&&(this.deleteTitle="You can not delete the master zone as there are no more zones in this zonegroup",_=!0)),_||(this.deleteTitle="Delete"),_}delete(n){"realm"===n.data.type?this.modalRef=this.modalService.show(Qe.M,{itemDescription:"" + n.data.type + " " + n.data.name + "",itemNames:[`${n.data.name}`],submitAction:()=>{this.rgwRealmService.delete(n.data.name).subscribe(()=>{this.modalRef.close(),this.notificationService.show(w.k.success,"Realm: '" + n.data.name + "' deleted successfully")},()=>{this.modalRef.componentInstance.stopLoadingSpinner()})}}):"zonegroup"===n.data.type?this.modalRef=this.modalService.show(Ls,{zonegroup:n.data}):"zone"===n.data.type&&(this.modalRef=this.modalService.show(Os,{zone:n.data}))}enableRgwModule(){let n;const _=()=>{(0,ls.H)(2e3).subscribe(()=>{this.mgrModuleService.list().subscribe(()=>{this.notificationService.suspendToasties(!1),this.blockUI.stop(),this.notificationService.show(w.k.success,"Enabled RGW Module"),this.router.navigateByUrl("/",{skipLocationChange:!0}).then(()=>{this.router.navigate(["/rgw/multisite"])})},()=>{_()})})};this.rgwModuleStatus||(n=this.mgrModuleService.enable("rgw")),n.subscribe(()=>{},()=>{this.notificationService.suspendToasties(!0),this.blockUI.start("Reconnecting, please wait ..."),_()})}}Te.\u0275fac=function(n){return new(n||Te)(e.Y36(ee.Z),e.Y36(il.f),e.Y36(ce.j),e.Y36(I.p4),e.Y36(I.eu),e.Y36(J.F0),e.Y36(de.y),e.Y36(ge.K),e.Y36(ue.g),e.Y36(oe.b),e.Y36(sl.N),e.Y36(Y.g))},Te.\u0275cmp=e.Xpm({type:Te,selectors:[["cd-rgw-multisite-details"]],viewQuery:function(n,_){if(1&n&&e.Gf(al,5),2&n){let o;e.iGM(o=e.CRH())&&(_.tree=o.first)}},decls:21,vars:18,consts:function(){let t,n,_;return t="Topology Viewer",n="In order to access the import/export feature, the rgw module must be enabled " + "\ufffd#2\ufffd" + " Enable the Object Gateway Module" + "\ufffd/#2\ufffd" + "",_="Please restart all Ceph Object Gateway instances in all zones to ensure consistent multisite configuration updates. " + "\ufffd#2\ufffd" + " Cluster->Services" + "\ufffd/#2\ufffd" + "",[[1,"row"],[1,"col-sm-12","col-lg-12"],["type","info","spacingClass","mb-3",4,"ngIf"],["type","warning","spacingClass","mb-3",4,"ngIf"],[1,"btn-group","mb-4","me-2",3,"permission","selection","tableActions"],[4,"ngIf"],[1,"btn-group","mb-4","me-2",3,"permission","btnColor","selection","tableActions"],[1,"card"],[1,"card-header"],t,[1,"card-body"],[1,"col-sm-6","col-lg-6","tree-container"],[3,"ngClass",4,"ngIf"],[3,"nodes","options","updateData"],["tree",""],["treeNodeTemplate",""],["class","col-sm-6 col-lg-6 metadata",4,"ngIf"],["type","info","spacingClass","mb-3"],n,[1,"text-decoration-underline",3,"click"],["type","warning","spacingClass","mb-3"],_,["routerLink","/services",1,"text-decoration-underline"],[1,"btn-group","mb-4","me-2","secondary",3,"permission","btnColor","selection","tableActions"],[3,"ngClass"],["class","me-3",4,"ngIf"],["class","badge badge-success me-2",4,"ngIf"],["class","badge badge-warning me-2",4,"ngIf"],["class","btn-group align-inline-btns","role","group",4,"ngIf"],[1,"me-3"],[1,"text-danger",3,"title","ngClass"],[1,"badge","badge-success","me-2"],[1,"badge","badge-warning","me-2"],["role","group",1,"btn-group","align-inline-btns"],[3,"title"],["type","button",1,"btn","btn-light","dropdown-toggle-split","ms-1",3,"disabled","click"],["type","button",1,"btn","btn-light","ms-1",3,"disabled","click"],[1,"col-sm-6","col-lg-6","metadata"],["cdTableDetail","",3,"data"]]},template:function(n,_){1&n&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div"),e.YNc(3,ll,3,0,"cd-alert-panel",2),e.YNc(4,rl,3,0,"cd-alert-panel",3),e._UZ(5,"cd-table-actions",4),e.YNc(6,cl,2,4,"span",5),e._UZ(7,"cd-table-actions",6)(8,"cd-table-actions",6),e.qZA(),e.TgZ(9,"div",7)(10,"div",8),e.SDv(11,9),e.qZA(),e.TgZ(12,"div",10)(13,"div",0)(14,"div",11),e.YNc(15,ul,1,5,"i",12),e.TgZ(16,"tree-root",13,14),e.NdJ("updateData",function(){return _.onUpdateData()}),e.YNc(18,ml,5,5,"ng-template",null,15,e.W1O),e.qZA()(),e.YNc(20,Ml,5,2,"div",16),e.qZA()()()()()),2&n&&(e.xp6(3),e.Q6J("ngIf",!_.rgwModuleStatus),e.xp6(1),e.Q6J("ngIf",_.restartGatewayMessage),e.xp6(1),e.Q6J("permission",_.permission)("selection",_.selection)("tableActions",_.createTableActions),e.xp6(1),e.Q6J("ngIf",_.showMigrateAction),e.xp6(1),e.Q6J("permission",_.permission)("btnColor","light")("selection",_.selection)("tableActions",_.importAction),e.xp6(1),e.Q6J("permission",_.permission)("btnColor","light")("selection",_.selection)("tableActions",_.exportAction),e.xp6(7),e.Q6J("ngIf",_.loadingIndicator),e.xp6(1),e.Q6J("nodes",_.nodes)("options",_.treeOptions),e.xp6(4),e.Q6J("ngIf",_.metadata))},dependencies:[T.mk,T.O5,Re.G,f_.b,Je.K,k.o,J.rH,je.qr],styles:[".tree-container[_ngcontent-%COMP%]{height:calc(100vh - 200px)}.align-inline-btns[_ngcontent-%COMP%]{margin-left:5em}.btn[_ngcontent-%COMP%]:disabled{pointer-events:none}"]}),(0,xe.gn)([(0,nl.bH)(),(0,xe.w6)("design:type",Object)],Te.prototype,"blockUI",void 0);var Sl=c(40267),Cl=c(7357),Ol=c(11656),Fl=c(4167),Pl=c(43190),Nl=c(68307),Gl=c(47349),Al=c(79241),Il=c(98677),bl=c(30490),hl=c(9219),Ll=c(17401),Wl=c(9024),$l=c(54740);const me=function(t,n){return[t,n]};let Zl=(()=>{class t{constructor(){this.icons=$.P}}return t.\u0275fac=function(_){return new(_||t)},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-sync-primary-zone"]],inputs:{realm:"realm",zonegroup:"zonegroup",zone:"zone"},decls:17,vars:23,consts:[[1,"pb-5"],[1,"pt-2",3,"ngClass"],[1,"badge","badge-info","mt-2"],[1,"mt-2",3,"ngClass"]],template:function(_,o){1&_&&(e.TgZ(0,"ul",0)(1,"li"),e._UZ(2,"i",1),e.qZA(),e.TgZ(3,"li",2),e._uU(4),e.qZA(),e.TgZ(5,"li"),e._UZ(6,"i",3),e.qZA(),e.TgZ(7,"li"),e._UZ(8,"i",3),e.qZA(),e.TgZ(9,"p",2),e._uU(10),e.qZA(),e.TgZ(11,"li"),e._UZ(12,"i",3),e.qZA(),e.TgZ(13,"li"),e._UZ(14,"i",3),e.qZA(),e.TgZ(15,"li",2),e._uU(16),e.qZA()()),2&_&&(e.xp6(2),e.Q6J("ngClass",e.WLB(8,me,o.icons.large2x,o.icons.reweight)),e.xp6(2),e.Oqu(o.realm),e.xp6(2),e.Q6J("ngClass",e.WLB(11,me,o.icons.large2x,o.icons.down)),e.xp6(2),e.Q6J("ngClass",e.WLB(14,me,o.icons.large2x,o.icons.cubes)),e.xp6(2),e.Oqu(o.zonegroup),e.xp6(2),e.Q6J("ngClass",e.WLB(17,me,o.icons.large2x,o.icons.down)),e.xp6(2),e.Q6J("ngClass",e.WLB(20,me,o.icons.large2x,o.icons.deploy)),e.xp6(2),e.Oqu(o.zone))},dependencies:[T.mk],styles:["ul[_ngcontent-%COMP%]{align-items:center;display:flex;flex-direction:column;list-style-type:none}.align-primary-zone[_ngcontent-%COMP%]{padding-left:4em}"]}),t})();var h_=c(90068);function Dl(t,n){1&t&&(e.TgZ(0,"span")(1,"ul",1)(2,"li")(3,"b"),e._uU(4,"Status:"),e.qZA()(),e.TgZ(5,"li"),e._uU(6,"No Sync"),e.qZA()()())}function Ul(t,n){if(1&t&&(e.TgZ(0,"span")(1,"b"),e._uU(2),e.ALo(3,"titlecase"),e.qZA(),e._uU(4),e.ALo(5,"titlecase"),e.qZA()),2&t){const _=e.oxw(2).$implicit;e.xp6(2),e.Oqu(e.lcZ(3,2,_.split(":")[0])),e.xp6(2),e.hij(":",e.lcZ(5,4,_.split(":")[1])," ")}}function vl(t,n){if(1&t&&(e.TgZ(0,"span")(1,"b"),e._uU(2),e.ALo(3,"titlecase"),e.qZA()()),2&t){const _=e.oxw(2).$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,_))}}function yl(t,n){if(1&t&&(e.TgZ(0,"span"),e.YNc(1,Ul,6,6,"span",0),e.YNc(2,vl,4,3,"span",0),e.qZA()),2&t){const _=e.oxw().$implicit;e.xp6(1),e.Q6J("ngIf",null==_?null:_.includes(":")),e.xp6(1),e.Q6J("ngIf",!(null!=_&&_.includes(":")))}}function wl(t,n){if(1&t&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"titlecase"),e.qZA()),2&t){const _=e.oxw().$implicit;e.xp6(1),e.hij(" ",e.lcZ(2,1,_)," ")}}function xl(t,n){if(1&t&&(e.TgZ(0,"li"),e.YNc(1,yl,3,2,"span",0),e.YNc(2,wl,3,3,"span",0),e.qZA()),2&t){const _=n.$implicit,o=e.oxw(3);e.xp6(1),e.Q6J("ngIf",!(null!=_&&_.includes(o.metadataSyncInfo.syncstatus)||null!=_&&_.includes("failed")||null!=_&&_.includes("error"))),e.xp6(1),e.Q6J("ngIf",(null==_?null:_.includes("failed"))||(null==_?null:_.includes("error")))}}function kl(t,n){if(1&t&&(e.TgZ(0,"ul",8)(1,"li")(2,"h5")(3,"b"),e._uU(4,"Metadata Sync Status:"),e.qZA()()(),e.YNc(5,xl,3,2,"li",9),e.qZA()),2&t){const _=e.oxw(2);e.xp6(5),e.Q6J("ngForOf",_.metadataSyncInfo.fullSyncStatus)}}function zl(t,n){1&t&&(e.TgZ(0,"li",10),e._uU(1,"Up to Date"),e.qZA())}function ql(t,n){if(1&t&&(e.TgZ(0,"a",12),e.SDv(1,13),e.ALo(2,"titlecase"),e.qZA()),2&t){e.oxw(2);const _=e.MAs(2),o=e.oxw();e.Q6J("ngbPopover",_),e.xp6(2),e.pQV(e.lcZ(2,2,o.metadataSyncInfo.syncstatus)),e.QtT(1)}}function Hl(t,n){if(1&t&&(e.TgZ(0,"a",12),e.SDv(1,14),e.qZA()),2&t){e.oxw(2);const _=e.MAs(2);e.Q6J("ngbPopover",_)}}function Xl(t,n){if(1&t&&(e.YNc(0,ql,3,4,"a",11),e.YNc(1,Hl,2,1,"a",11)),2&t){const _=e.oxw(2);e.Q6J("ngIf","Not Syncing From Zone"!==_.metadataSyncInfo.syncstatus),e.xp6(1),e.Q6J("ngIf","Not Syncing From Zone"===_.metadataSyncInfo.syncstatus)}}const Bl=function(t){return[t]};function Ql(t,n){if(1&t&&(e.TgZ(0,"li"),e._UZ(1,"i",15),e.TgZ(2,"a",16),e.SDv(3,17),e.qZA()()),2&t){e.oxw();const _=e.MAs(2),o=e.oxw();e.xp6(1),e.Q6J("ngClass",e.VKq(2,Bl,o.icons.danger)),e.xp6(1),e.Q6J("ngbPopover",_)}}function Yl(t,n){if(1&t&&(e.TgZ(0,"li",18),e._uU(1),e.ALo(2,"relativeDate"),e.qZA()),2&t){const _=e.oxw(2);e.xp6(1),e.Oqu(e.lcZ(2,1,_.metadataSyncInfo.timestamp))}}function Jl(t,n){if(1&t&&(e.TgZ(0,"span"),e.YNc(1,kl,6,1,"ng-template",null,2,e.W1O),e.TgZ(3,"ul",1),e.YNc(4,zl,2,0,"ng-template",null,3,e.W1O),e.YNc(6,Xl,2,2,"ng-template",null,4,e.W1O),e.TgZ(8,"li")(9,"b"),e._uU(10,"Status:"),e.qZA()(),e.YNc(11,Ql,4,4,"li",5),e.TgZ(12,"li",6),e._uU(13," Last Synced: "),e.qZA(),e.YNc(14,Yl,3,3,"li",7),e.qZA()()),2&t){const _=e.MAs(5),o=e.MAs(7),i=e.oxw();e.xp6(11),e.Q6J("ngIf",(null==i.metadataSyncInfo.syncstatus?null:i.metadataSyncInfo.syncstatus.includes("failed"))||(null==i.metadataSyncInfo.syncstatus?null:i.metadataSyncInfo.syncstatus.includes("error")))("ngIfElse",o),e.xp6(3),e.Q6J("ngIf",i.metadataSyncInfo.timestamp)("ngIfElse",_)}}let Kl=(()=>{class t{constructor(){this.icons=$.P,this.metadataSyncInfo={}}}return t.\u0275fac=function(_){return new(_||t)},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-sync-metadata-info"]],inputs:{metadataSyncInfo:"metadataSyncInfo"},decls:2,vars:2,consts:function(){let n,_,o;return n="" + "\ufffd0\ufffd" + "",_="Not Syncing",o="Error",[[4,"ngIf"],[1,"me-2"],["metadataSyncPopover",""],["upToDateTpl",""],["showMetadataStatus",""],[4,"ngIf","ngIfElse"],[1,"mt-4","fw-bold"],["class","badge badge-info",4,"ngIf","ngIfElse"],[1,"text-center"],[4,"ngFor","ngForOf"],[1,"badge","badge-success"],["class","lead text-primary","placement","top","popoverClass","rgw-overview-card-popover",3,"ngbPopover",4,"ngIf"],["placement","top","popoverClass","rgw-overview-card-popover",1,"lead","text-primary",3,"ngbPopover"],n,_,[1,"text-danger",3,"ngClass"],["placement","top","popoverClass","rgw-overview-card-popover",1,"lead","text-danger",3,"ngbPopover"],o,[1,"badge","badge-info"]]},template:function(_,o){1&_&&(e.YNc(0,Dl,7,0,"span",0),e.YNc(1,Jl,15,4,"span",0)),2&_&&(e.Q6J("ngIf","no sync (zone is master)"===o.metadataSyncInfo),e.xp6(1),e.Q6J("ngIf","no sync (zone is master)"!==o.metadataSyncInfo))},dependencies:[T.mk,T.sg,T.O5,G.o8,T.rS,h_.h],styles:["ul[_ngcontent-%COMP%]{align-items:center;display:flex;flex-direction:column;list-style-type:none}"]}),t})();function Vl(t,n){if(1&t&&(e.TgZ(0,"span")(1,"b"),e._uU(2),e.ALo(3,"titlecase"),e.qZA(),e._uU(4),e.ALo(5,"titlecase"),e.qZA()),2&t){const _=e.oxw(2).$implicit;e.xp6(2),e.Oqu(e.lcZ(3,2,_.split(": ")[0])),e.xp6(2),e.hij(":",e.lcZ(5,4,_.split(": ")[1])," ")}}function jl(t,n){if(1&t&&(e.TgZ(0,"span")(1,"b"),e._uU(2),e.ALo(3,"titlecase"),e.qZA()()),2&t){const _=e.oxw(2).$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,_))}}function er(t,n){if(1&t&&(e.TgZ(0,"span"),e.YNc(1,Vl,6,6,"span",9),e.YNc(2,jl,4,3,"span",9),e.qZA()),2&t){const _=e.oxw().$implicit;e.xp6(1),e.Q6J("ngIf",null==_?null:_.includes(":")),e.xp6(1),e.Q6J("ngIf",!(null!=_&&_.includes(":")))}}function _r(t,n){if(1&t&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"titlecase"),e.qZA()),2&t){const _=e.oxw().$implicit;e.xp6(1),e.hij(" ",e.lcZ(2,1,_)," ")}}function tr(t,n){if(1&t&&(e.TgZ(0,"li"),e.YNc(1,er,3,2,"span",9),e.YNc(2,_r,3,3,"span",9),e.qZA()),2&t){const _=n.$implicit,o=e.oxw(2);e.xp6(1),e.Q6J("ngIf",!(null!=_&&_.includes(o.zone.name)||null!=_&&_.includes(o.zone.syncstatus)||null!=_&&_.includes("failed")||null!=_&&_.includes("error"))),e.xp6(1),e.Q6J("ngIf",(null==_?null:_.includes("failed"))||(null==_?null:_.includes("error")))}}function or(t,n){if(1&t&&(e.TgZ(0,"ul",7)(1,"li")(2,"h5")(3,"b"),e._uU(4,"Sync Status:"),e.qZA()()(),e.YNc(5,tr,3,2,"li",8),e.qZA()),2&t){const _=e.oxw();e.xp6(5),e.Q6J("ngForOf",_.zone.fullSyncStatus)}}function nr(t,n){1&t&&(e.TgZ(0,"li",10),e._uU(1,"Up to Date"),e.qZA())}function ir(t,n){if(1&t&&(e.TgZ(0,"a",12),e.SDv(1,13),e.ALo(2,"titlecase"),e.qZA()),2&t){const _=e.oxw(2),o=e.MAs(1);e.Q6J("ngbPopover",o),e.xp6(2),e.pQV(e.lcZ(2,2,_.zone.syncstatus)),e.QtT(1)}}function sr(t,n){if(1&t&&(e.TgZ(0,"a",12),e.SDv(1,14),e.qZA()),2&t){e.oxw(2);const _=e.MAs(1);e.Q6J("ngbPopover",_)}}function ar(t,n){if(1&t&&(e.YNc(0,ir,3,4,"a",11),e.YNc(1,sr,2,1,"a",11)),2&t){const _=e.oxw();e.Q6J("ngIf","Not Syncing From Zone"!==_.zone.syncstatus),e.xp6(1),e.Q6J("ngIf","Not Syncing From Zone"===_.zone.syncstatus)}}const lr=function(t){return[t]};function rr(t,n){if(1&t&&(e.TgZ(0,"li"),e._UZ(1,"i",15),e.TgZ(2,"a",16),e.SDv(3,17),e.qZA()()),2&t){const _=e.oxw(),o=e.MAs(1);e.xp6(1),e.Q6J("ngClass",e.VKq(2,lr,_.icons.danger)),e.xp6(1),e.Q6J("ngbPopover",o)}}function cr(t,n){if(1&t&&(e.TgZ(0,"li",18),e._uU(1),e.ALo(2,"relativeDate"),e.qZA()),2&t){const _=e.oxw();e.xp6(1),e.Oqu(e.lcZ(2,1,_.zone.timestamp))}}let dr=(()=>{class t{constructor(){this.icons=$.P,this.zone={}}}return t.\u0275fac=function(_){return new(_||t)},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-sync-data-info"]],inputs:{zone:"zone"},decls:14,vars:4,consts:function(){let n,_,o;return n="" + "\ufffd0\ufffd" + "",_="Not Syncing",o="Error",[["syncPopover",""],[1,"me-2"],["upToDateTpl",""],["showStatus",""],[4,"ngIf","ngIfElse"],[1,"mt-4","fw-bold"],["class","badge badge-info",4,"ngIf","ngIfElse"],[1,"text-center"],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"badge","badge-success"],["class","lead text-primary","placement","top","popoverClass","rgw-overview-card-popover",3,"ngbPopover",4,"ngIf"],["placement","top","popoverClass","rgw-overview-card-popover",1,"lead","text-primary",3,"ngbPopover"],n,_,[1,"text-danger",3,"ngClass"],["placement","top","popoverClass","rgw-overview-card-popover",1,"lead","text-danger",3,"ngbPopover"],o,[1,"badge","badge-info"]]},template:function(_,o){if(1&_&&(e.YNc(0,or,6,1,"ng-template",null,0,e.W1O),e.TgZ(2,"ul",1),e.YNc(3,nr,2,0,"ng-template",null,2,e.W1O),e.YNc(5,ar,2,2,"ng-template",null,3,e.W1O),e.TgZ(7,"li")(8,"b"),e._uU(9,"Status:"),e.qZA()(),e.YNc(10,rr,4,4,"li",4),e.TgZ(11,"li",5),e._uU(12," Last Synced: "),e.qZA(),e.YNc(13,cr,3,3,"li",6),e.qZA()),2&_){const i=e.MAs(4),s=e.MAs(6);e.xp6(10),e.Q6J("ngIf",(null==o.zone.syncstatus?null:o.zone.syncstatus.includes("failed"))||(null==o.zone.syncstatus?null:o.zone.syncstatus.includes("error")))("ngIfElse",s),e.xp6(3),e.Q6J("ngIf",o.zone.timestamp)("ngIfElse",i)}},dependencies:[T.mk,T.sg,T.O5,G.o8,T.rS,h_.h],styles:["ul[_ngcontent-%COMP%]{align-items:center;display:flex;flex-direction:column;list-style-type:none}"]}),t})();function ur(t,n){if(1&t&&e._UZ(0,"cd-card-row",25),2&t){const _=e.oxw();e.Q6J("data",_.rgwDaemonCount)}}function gr(t,n){if(1&t&&e._UZ(0,"cd-card-row",26),2&t){const _=e.oxw();e.Q6J("data",_.rgwRealmCount)}}function Rr(t,n){if(1&t&&e._UZ(0,"cd-card-row",27),2&t){const _=e.oxw();e.Q6J("data",_.rgwZonegroupCount)}}function Tr(t,n){if(1&t&&e._UZ(0,"cd-card-row",28),2&t){const _=e.oxw();e.Q6J("data",_.rgwZoneCount)}}function Er(t,n){if(1&t&&e._UZ(0,"cd-card-row",29),2&t){const _=e.oxw();e.Q6J("data",_.rgwBucketCount)}}function fr(t,n){if(1&t&&e._UZ(0,"cd-card-row",30),2&t){const _=e.oxw();e.Q6J("data",_.UserCount)}}function pr(t,n){if(1&t&&e._UZ(0,"cd-card-row",31),2&t){const _=e.oxw();e.Q6J("data",_.objectCount)}}function mr(t,n){1&t&&(e.TgZ(0,"span",32)(1,"cd-alert-panel",33),e.tHW(2,34),e._UZ(3,"cd-doc",35),e.N_p(),e.qZA()())}const __=function(t,n,_){return[t,n,_]};function Mr(t,n){if(1&t&&(e.TgZ(0,"span",36),e._UZ(1,"i",37),e.qZA()),2&t){const _=e.oxw();e.xp6(1),e.Q6J("ngClass",e.kEZ(1,__,_.icons.large3x,_.icons.spinner,_.icons.spin))}}function Sr(t,n){if(1&t&&(e.TgZ(0,"span",36),e._UZ(1,"i",37),e.qZA()),2&t){const _=e.oxw(3);e.xp6(1),e.Q6J("ngClass",e.kEZ(1,__,_.icons.large3x,_.icons.spinner,_.icons.spin))}}function Cr(t,n){if(1&t&&(e.TgZ(0,"span",36),e._UZ(1,"cd-rgw-sync-primary-zone",43),e.qZA()),2&t){const _=e.oxw(3);e.xp6(1),e.Q6J("realm",_.realm)("zonegroup",_.zonegroup)("zone",_.zone)}}function Or(t,n){if(1&t&&(e.TgZ(0,"span",36),e._UZ(1,"i",37),e.qZA()),2&t){const _=e.oxw(3);e.xp6(1),e.Q6J("ngClass",e.kEZ(1,__,_.icons.large3x,_.icons.spinner,_.icons.spin))}}function Fr(t,n){if(1&t&&(e.TgZ(0,"span",51),e._UZ(1,"cd-rgw-sync-metadata-info",52),e.qZA()),2&t){const _=e.oxw(6);e.xp6(1),e.Q6J("metadataSyncInfo",_.metadataSyncInfo)}}function Pr(t,n){if(1&t&&(e.TgZ(0,"span",53),e._UZ(1,"cd-rgw-sync-data-info",54),e.qZA()),2&t){const _=e.oxw(2).$implicit;e.xp6(1),e.Q6J("zone",_)}}const Nr=function(t){return{"border-left":t}};function Gr(t,n){if(1&t&&(e.TgZ(0,"cd-card",48),e.YNc(1,Fr,2,1,"span",49),e.YNc(2,Pr,2,1,"span",50),e.qZA()),2&t){const _=n.$implicit;e.Q6J("cardTitle",_)("ngClass",e.VKq(6,Nr,"Data Sync"===_))("alignItemsCenter",!0)("justifyContentCenter",!0),e.xp6(1),e.Q6J("ngIf","Metadata Sync"===_),e.xp6(1),e.Q6J("ngIf","Data Sync"===_)}}function Ar(t,n){if(1&t&&(e.TgZ(0,"cd-card",45)(1,"div",46),e.YNc(2,Gr,3,8,"cd-card",47),e.qZA()()),2&t){const _=n.$implicit,o=e.oxw(4);e.s9C("cardTitle",_.name),e.xp6(2),e.Q6J("ngForOf",o.chartTitles)}}function Ir(t,n){if(1&t&&(e.TgZ(0,"div",1),e.YNc(1,Ar,3,2,"cd-card",44),e.qZA()),2&t){const _=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",_.replicaZonesInfo)("ngForTrackBy",_.trackByFn)}}function br(t,n){if(1&t&&(e.TgZ(0,"div",39)(1,"cd-card",40),e.YNc(2,Sr,2,5,"span",23),e.YNc(3,Cr,2,3,"span",23),e.qZA(),e.TgZ(4,"div",41)(5,"cd-card",42),e.YNc(6,Or,2,5,"span",23),e.YNc(7,Ir,2,2,"div",24),e.qZA()()()),2&t){const _=e.oxw(2);e.xp6(1),e.Q6J("alignItemsCenter",!0)("justifyContentCenter",!0),e.xp6(1),e.Q6J("ngIf",_.loading),e.xp6(1),e.Q6J("ngIf",!_.loading),e.xp6(3),e.Q6J("ngIf",_.loading),e.xp6(1),e.Q6J("ngIf",!_.loading)}}function hr(t,n){if(1&t&&(e.TgZ(0,"div",1),e.YNc(1,br,8,6,"div",38),e.qZA()),2&t){const _=e.oxw(),o=e.MAs(30);e.xp6(1),e.Q6J("ngIf",_.showMultisiteCard)("ngIfElse",o)}}let Lr=(()=>{class t{constructor(_,o,i,s,l,r,d,u,R,O){this.authStorageService=_,this.healthService=o,this.refreshIntervalService=i,this.rgwDaemonService=s,this.rgwRealmService=l,this.rgwZonegroupService=r,this.rgwZoneService=d,this.rgwBucketService=u,this.prometheusService=R,this.rgwMultisiteService=O,this.icons=$.P,this.interval=new N_.w,this.rgwDaemonCount=0,this.rgwRealmCount=0,this.rgwZonegroupCount=0,this.rgwZoneCount=0,this.rgwBucketCount=0,this.objectCount=0,this.UserCount=0,this.totalPoolUsedBytes=0,this.averageObjectSize=0,this.multisiteInfo=[],this.queriesResults={RGW_REQUEST_PER_SECOND:"",BANDWIDTH:"",AVG_GET_LATENCY:"",AVG_PUT_LATENCY:""},this.chartTitles=["Metadata Sync","Data Sync"],this.replicaZonesInfo=[],this.showMultisiteCard=!0,this.loading=!0,this.subject=new Cl.t,this.syncCardLoading=!0,this.permissions=this.authStorageService.getPermissions()}ngOnInit(){this.interval=this.refreshIntervalService.intervalData$.subscribe(()=>{this.daemonSub=this.rgwDaemonService.list().subscribe(_=>{this.rgwDaemonCount=_.length}),this.HealthSub=this.healthService.getClusterCapacity().subscribe(_=>{this.objectCount=_.total_objects,this.totalPoolUsedBytes=_.total_pool_bytes_used,this.averageObjectSize=_.average_object_size}),this.getSyncStatus()}),this.BucketSub=this.rgwBucketService.getTotalBucketsAndUsersLength().subscribe(_=>{this.rgwBucketCount=_.buckets_count,this.UserCount=_.users_count}),this.realmSub=this.rgwRealmService.list().subscribe(_=>{this.rgwRealmCount=_.realms.length}),this.ZonegroupSub=this.rgwZonegroupService.list().subscribe(_=>{this.rgwZonegroupCount=_.zonegroups.length}),this.ZoneSUb=this.rgwZoneService.list().subscribe(_=>{this.rgwZoneCount=_.zones.length}),this.getPrometheusData(this.prometheusService.lastHourDateObject),this.multisiteSyncStatus$=this.subject.pipe((0,Pl.w)(()=>this.rgwMultisiteService.getSyncStatus().pipe((0,Nl.b)(_=>{this.loading=!1,this.replicaZonesInfo=_.dataSyncInfo,this.metadataSyncInfo=_.metadataSyncInfo,0===this.replicaZonesInfo.length&&(this.showMultisiteCard=!1,this.syncCardLoading=!1,this.loading=!1),[this.realm,this.zonegroup,this.zone]=_.primaryZoneData}),(0,a_.K)(_=>(this.showMultisiteCard=!1,this.syncCardLoading=!1,this.loading=!1,_.preventDefault(),(0,ke.of)(!0))))),(0,Gl.d)(1))}ngOnDestroy(){this.interval.unsubscribe(),this.daemonSub.unsubscribe(),this.realmSub.unsubscribe(),this.ZonegroupSub.unsubscribe(),this.ZoneSUb.unsubscribe(),this.BucketSub.unsubscribe(),this.HealthSub.unsubscribe(),this.prometheusService.unsubscribe()}getPrometheusData(_){this.queriesResults=this.prometheusService.getPrometheusQueriesData(_,Fl.p,this.queriesResults,!0)}getSyncStatus(){this.subject.next()}trackByFn(_){return _}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(ce.j),e.Y36(Al.z),e.Y36(Il.s),e.Y36(oe.b),e.Y36(de.y),e.Y36(ge.K),e.Y36(ue.g),e.Y36(Ee.o),e.Y36(Ol.Q),e.Y36(e_.o))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-overview-dashboard"]],decls:34,vars:26,consts:function(){let n;return n=" Multi-site needs to be configured in order to see the multi-site sync status. Please consult the " + "\ufffd#3\ufffd" + "" + "\ufffd/#3\ufffd" + " on how to configure and enable the multi-site functionality. ",[[1,"container-fluid"],[1,"row"],["cardTitle","Inventory","aria-label","Inventory card",1,"col-sm-3","px-3","d-flex"],["link","/rgw/daemon","title","Gateway","summaryType","simplified",3,"data",4,"ngIf"],["link","/rgw/multisite","title","Realm","summaryType","simplified",3,"data",4,"ngIf"],["link","/rgw/multisite","title","Zone Group","summaryType","simplified",3,"data",4,"ngIf"],["link","/rgw/multisite","title","Zone","summaryType","simplified",3,"data",4,"ngIf"],["link","/rgw/bucket","title","Bucket","summaryType","simplified",3,"data",4,"ngIf"],["link","/rgw/user","title","User","summaryType","simplified",3,"data",4,"ngIf"],["title","Object","summaryType","simplified",3,"data",4,"ngIf"],["cardTitle","Performance Statistics","ria-label","Performance Statistics card",1,"col-sm-6","d-flex"],[1,"ms-4","me-4","mt-0"],[3,"selectedTime"],["chartTitle","Requests/sec","dataUnits","","label","Requests/sec",3,"data"],["chartTitle","Latency","dataUnits","ms","label","GET","label2","PUT",3,"data","data2"],["chartTitle","Bandwidth","dataUnits","B","label","GET","label2","PUT",3,"data","data2"],[1,"col-lg-3"],["cardTitle","Used Capacity","aria-label","Used Capacity",1,"col-sm-2","d-flex","w-100","h-50","pb-3",3,"alignItemsCenter","justifyContentCenter"],[1,"ms-4","me-4","text-center"],["cardTitle","Average Object Size","aria-label","Avg Object Size",1,"col-sm-2","d-flex","w-100","h-50","pt-3",3,"alignItemsCenter","justifyContentCenter"],[1,"row","pt-4","pb-4"],["cardTitle","Multi-Site Sync Status"],["notConfigured",""],["class","d-flex justify-content-center",4,"ngIf"],["class","row",4,"ngIf"],["link","/rgw/daemon","title","Gateway","summaryType","simplified",3,"data"],["link","/rgw/multisite","title","Realm","summaryType","simplified",3,"data"],["link","/rgw/multisite","title","Zone Group","summaryType","simplified",3,"data"],["link","/rgw/multisite","title","Zone","summaryType","simplified",3,"data"],["link","/rgw/bucket","title","Bucket","summaryType","simplified",3,"data"],["link","/rgw/user","title","User","summaryType","simplified",3,"data"],["title","Object","summaryType","simplified",3,"data"],[1,"pe-5","ps-5"],["type","info"],n,["section","multisite"],[1,"d-flex","justify-content-center"],[3,"ngClass"],["class","row pt-2",4,"ngIf","ngIfElse"],[1,"row","pt-2"],["cardTitle","Primary Source Zone",1,"col-lg-3","d-flex","justify-content-center","align-primary-zone",3,"alignItemsCenter","justifyContentCenter"],[1,"col-lg-9"],["cardTitle","Source Zones",1,"d-flex","h-100"],[3,"realm","zonegroup","zone"],["cardType","zone","shadowClass","true","class","col-sm-9 col-lg-6 align-replica-zones d-flex pt-4","aria-label","Source Zones Card",3,"cardTitle",4,"ngFor","ngForOf","ngForTrackBy"],["cardType","zone","shadowClass","true","aria-label","Source Zones Card",1,"col-sm-9","col-lg-6","align-replica-zones","d-flex","pt-4",3,"cardTitle"],[1,"row","pb-4","ps-3","pe-3"],["cardType","syncCards","removeBorder","true","class","col-sm-9 col-lg-6","aria-label","Charts Card",3,"cardTitle","ngClass","alignItemsCenter","justifyContentCenter",4,"ngFor","ngForOf"],["cardType","syncCards","removeBorder","true","aria-label","Charts Card",1,"col-sm-9","col-lg-6",3,"cardTitle","ngClass","alignItemsCenter","justifyContentCenter"],["class","me-2 text-center",4,"ngIf"],["class","me-2",4,"ngIf"],[1,"me-2","text-center"],[3,"metadataSyncInfo"],[1,"me-2"],[3,"zone"]]},template:function(_,o){1&_&&(e.TgZ(0,"div",0)(1,"div",1)(2,"cd-card",2),e.YNc(3,ur,1,1,"cd-card-row",3),e.YNc(4,gr,1,1,"cd-card-row",4),e.YNc(5,Rr,1,1,"cd-card-row",5),e.YNc(6,Tr,1,1,"cd-card-row",6),e.YNc(7,Er,1,1,"cd-card-row",7),e.YNc(8,fr,1,1,"cd-card-row",8),e.YNc(9,pr,1,1,"cd-card-row",9),e.qZA(),e.TgZ(10,"cd-card",10)(11,"div",11)(12,"cd-dashboard-time-selector",12),e.NdJ("selectedTime",function(s){return o.getPrometheusData(s)}),e.qZA(),e._UZ(13,"cd-dashboard-area-chart",13)(14,"cd-dashboard-area-chart",14)(15,"cd-dashboard-area-chart",15),e.qZA()(),e.TgZ(16,"div",16)(17,"cd-card",17)(18,"span",18)(19,"h1"),e._uU(20),e.ALo(21,"dimlessBinary"),e.qZA()()(),e.TgZ(22,"cd-card",19)(23,"span",18)(24,"h1"),e._uU(25),e.ALo(26,"dimlessBinary"),e.qZA()()()()(),e.TgZ(27,"div",20)(28,"cd-card",21),e.YNc(29,mr,4,0,"ng-template",null,22,e.W1O),e.YNc(31,Mr,2,5,"span",23),e.YNc(32,hr,2,2,"div",24),e.ALo(33,"async"),e.qZA()()()),2&_&&(e.xp6(3),e.Q6J("ngIf",null!=o.rgwDaemonCount),e.xp6(1),e.Q6J("ngIf",null!=o.rgwRealmCount),e.xp6(1),e.Q6J("ngIf",null!=o.rgwZonegroupCount),e.xp6(1),e.Q6J("ngIf",null!=o.rgwZoneCount),e.xp6(1),e.Q6J("ngIf",null!=o.rgwBucketCount),e.xp6(1),e.Q6J("ngIf",null!=o.UserCount),e.xp6(1),e.Q6J("ngIf",null!=o.objectCount),e.xp6(4),e.Q6J("data",o.queriesResults.RGW_REQUEST_PER_SECOND),e.xp6(1),e.Q6J("data",o.queriesResults.AVG_GET_LATENCY)("data2",o.queriesResults.AVG_PUT_LATENCY),e.xp6(1),e.Q6J("data",o.queriesResults.GET_BANDWIDTH)("data2",o.queriesResults.PUT_BANDWIDTH),e.xp6(2),e.Q6J("alignItemsCenter",!0)("justifyContentCenter",!0),e.xp6(3),e.Oqu(e.lcZ(21,20,o.totalPoolUsedBytes)),e.xp6(2),e.Q6J("alignItemsCenter",!0)("justifyContentCenter",!0),e.xp6(3),e.Oqu(e.lcZ(26,22,o.averageObjectSize)),e.xp6(6),e.Q6J("ngIf",o.loading),e.xp6(1),e.Q6J("ngIf",e.lcZ(33,24,o.multisiteSyncStatus$)))},dependencies:[T.mk,T.sg,T.O5,Re.G,bl.K,hl.A,Ll.e,Wl.S,$l.M,Zl,Kl,dr,T.Ov,Ye.$],styles:["hr[_ngcontent-%COMP%]{margin-bottom:2px;margin-top:2px}.list-group-item[_ngcontent-%COMP%]{border:0}.align-replica-zones[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto;padding-left:2em;padding-right:2em}ul[_ngcontent-%COMP%]{align-items:center;display:flex;flex-direction:column;list-style-type:none}.align-primary-zone[_ngcontent-%COMP%]{padding-left:4em}.border-left[_ngcontent-%COMP%]{border-left:1px solid rgba(0,0,0,.1254901961)}"]}),t})();var Wr=c(46767);let L_=(()=>{class t{}return t.\u0275fac=function(_){return new(_||t)},t.\u0275mod=e.oAB({type:t}),t.\u0275inj=e.cJS({imports:[T.ez,et.m,a.u5,a.UX,_t.B,G.Oz,J.Bz,G.HK,G.dT,o_.b,je.xc,Sl.t,Wr.d]}),t})();const $r=[{path:"",redirectTo:"rbd",pathMatch:"full"},{path:"daemon",component:Xo,data:{breadcrumbs:"Gateways"}},{path:"user",data:{breadcrumbs:"Users"},children:[{path:"",component:ss},{path:I.MQ.CREATE,component:O_,data:{breadcrumbs:I.Qn.CREATE}},{path:`${I.MQ.EDIT}/:uid`,component:O_,data:{breadcrumbs:I.Qn.EDIT}}]},{path:"roles",data:{breadcrumbs:"Roles",resource:"api.rgw.roles@1.0",tabs:[{name:"Users",url:"/rgw/user"},{name:"Roles",url:"/rgw/roles"}]},children:[{path:"",component:j_.c},{path:I.MQ.CREATE,component:as.U,data:{breadcrumbs:I.Qn.CREATE}}]},{path:"bucket",data:{breadcrumbs:"Buckets"},children:[{path:"",component:ho},{path:I.MQ.CREATE,component:d_,data:{breadcrumbs:I.Qn.CREATE}},{path:`${I.MQ.EDIT}/:bid`,component:d_,data:{breadcrumbs:I.Qn.EDIT}}]},{path:"overview",data:{breadcrumbs:"Overview"},children:[{path:"",component:Lr}]},{path:"multisite",children:[{path:"",component:Te}]}];let Zr=(()=>{class t{}return t.\u0275fac=function(_){return new(_||t)},t.\u0275mod=e.oAB({type:t}),t.\u0275inj=e.cJS({imports:[L_,J.Bz.forChild($r)]}),t})()}}]);
\ No newline at end of file |