]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/dist/en-US/6.115992dc55f8e1abedbc.js
import ceph 16.2.7
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / dist / en-US / 6.115992dc55f8e1abedbc.js
diff --git a/ceph/src/pybind/mgr/dashboard/frontend/dist/en-US/6.115992dc55f8e1abedbc.js b/ceph/src/pybind/mgr/dashboard/frontend/dist/en-US/6.115992dc55f8e1abedbc.js
deleted file mode 100644 (file)
index 1a0986f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{OkK6:function(e,t,c){"use strict";c.r(t),c.d(t,"RgwModule",(function(){return ja})),c.d(t,"RoutedRgwModule",(function(){return Va}));var a=c("SVse"),i=c("s7LF"),s=c("iInd"),b=c("G0yt"),o=c("zWsK"),n=c("sne2"),r=c("PCNd"),l=c("G6Q+"),u=c("LvDl"),d=c.n(u),f=c("cp0P"),m=c("LRne"),p=c("PqYM"),g=c("lJxs"),h=c("aGrj"),y=c("mrSG"),S=c("IheW"),_=c("CqXF"),R=c("JIr8"),k=c("9xzX"),v=c("xTzq"),w=c("8Y7J");let z=(()=>{let e=class{constructor(e,t){this.http=e,this.rgwDaemonService=t,this.url="api/rgw/bucket"}list(){return this.rgwDaemonService.request(e=>(e=e.append("stats","true"),this.http.get(this.url,{params:e})))}get(e){return this.rgwDaemonService.request(t=>this.http.get(`${this.url}/${e}`,{params:t}))}create(e,t,c,a,i,s,b){return this.rgwDaemonService.request(o=>this.http.post(this.url,null,{params:new S.e({fromObject:{bucket:e,uid:t,zonegroup:c,placement_target:a,lock_enabled:String(i),lock_mode:s,lock_retention_period_days:b,daemon_name:o.get("daemon_name")}})}))}update(e,t,c,a,i,s,b,o,n){return this.rgwDaemonService.request(r=>(r=(r=(r=(r=(r=(r=(r=(r=r.append("bucket_id",t)).append("uid",c)).append("versioning_state",a)).append("mfa_delete",i)).append("mfa_token_serial",s)).append("mfa_token_pin",b)).append("lock_mode",o)).append("lock_retention_period_days",n),this.http.put(`${this.url}/${e}`,null,{params:r})))}delete(e,t=!0){return this.rgwDaemonService.request(c=>(c=c.append("purge_objects",t?"true":"false"),this.http.delete(`${this.url}/${e}`,{params:c})))}exists(e){return this.get(e).pipe(Object(_.a)(!0),Object(R.a)(e=>(d.a.isFunction(e.preventDefault)&&e.preventDefault(),Object(m.a)(!1))))}getLockDays(e){return e.lock_retention_period_years>0?Math.floor(365.242*e.lock_retention_period_years):e.lock_retention_period_days||0}};return e.\u0275fac=function(t){return new(t||e)(w.dc(S.b),w.dc(k.a))},e.\u0275prov=w.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e=Object(y.b)([v.a,Object(y.d)("design:paramtypes",[S.b,k.a])],e),e})(),I=(()=>{let e=class{constructor(e,t){this.http=e,this.rgwDaemonService=t,this.url="api/rgw/site"}get(e){return this.rgwDaemonService.request(t=>(e&&(t=t.append("query",e)),this.http.get(this.url,{params:t})))}};return e.\u0275fac=function(t){return new(t||e)(w.dc(S.b),w.dc(k.a))},e.\u0275prov=w.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e=Object(y.b)([v.a,Object(y.d)("design:paramtypes",[S.b,k.a])],e),e})();var x=c("P8lu"),M=c("oxzT"),$=c("mtw6"),q=c("spCT"),N=c("2EZI"),T=c("1Ni5"),E=c("9nlD"),A=function(e){return e.ENABLED="Enabled",e.DISABLED="Disabled",e}({}),C=function(e){return e.ENABLED="Enabled",e.SUSPENDED="Suspended",e}({}),F=c("zc8c"),W=c("NwgZ"),O=c("ocLN"),D=c("ANnk"),j=c("f69J"),P=c("IZUe"),V=c("p4Cf"),B=c("6+kj"),L=c("8xTl");function U(e,t){1&e&&(w.Sb(0,"div",9),w.Sb(1,"label",36),w.Wb(2,37),w.Rb(),w.Sb(3,"div",12),w.Nb(4,"input",38),w.Rb(),w.Rb())}function G(e,t){1&e&&(w.Sb(0,"span",39),w.Wb(1,40),w.Rb())}function K(e,t){1&e&&(w.Sb(0,"span",39),w.Wb(1,41),w.Rb())}function Q(e,t){1&e&&(w.Sb(0,"span",39),w.Wb(1,42),w.Rb())}function J(e,t){1&e&&(w.Sb(0,"span",39),w.Wb(1,43),w.Rb())}function Z(e,t){1&e&&(w.Sb(0,"span",39),w.Wb(1,44),w.Rb())}function X(e,t){1&e&&(w.Sb(0,"span",39),w.Wb(1,45),w.Rb())}function Y(e,t){1&e&&(w.Sb(0,"span",39),w.Wb(1,46),w.Rb())}function H(e,t){1&e&&(w.Sb(0,"span",39),w.Wb(1,47),w.Rb())}function ee(e,t){1&e&&(w.Sb(0,"option",48),w.Wb(1,49),w.Rb()),2&e&&w.pc("ngValue",null)}function te(e,t){1&e&&(w.Sb(0,"option",48),w.Wb(1,50),w.Rb()),2&e&&w.pc("ngValue",null)}function ce(e,t){if(1&e&&(w.Sb(0,"option",51),w.Oc(1),w.Rb()),2&e){const e=t.$implicit;w.pc("value",e),w.yb(1),w.Pc(e)}}function ae(e,t){1&e&&(w.Sb(0,"span",39),w.Wb(1,52),w.Rb())}function ie(e,t){1&e&&(w.Sb(0,"option",48),w.Wb(1,54),w.Rb()),2&e&&w.pc("ngValue",null)}function se(e,t){1&e&&(w.Sb(0,"option",48),w.Wb(1,55),w.Rb()),2&e&&w.pc("ngValue",null)}function be(e,t){if(1&e&&(w.Sb(0,"option",51),w.Oc(1),w.Rb()),2&e){const e=t.$implicit;w.pc("value",e.name),w.yb(1),w.Pc(e.description)}}function oe(e,t){1&e&&(w.Sb(0,"span",39),w.Wb(1,56),w.Rb())}function ne(e,t){if(1&e&&(w.Sb(0,"select",53),w.Mc(1,ie,2,1,"option",19),w.Mc(2,se,2,1,"option",19),w.Mc(3,be,2,2,"option",20),w.Rb(),w.Mc(4,oe,2,0,"span",15)),2&e){w.ic();const e=w.Ac(2),t=w.ic();w.yb(1),w.pc("ngIf",null===t.placementTargets),w.yb(1),w.pc("ngIf",null!==t.placementTargets),w.yb(1),w.pc("ngForOf",t.placementTargets),w.yb(1),w.pc("ngIf",t.bucketForm.showError("placement-target",e,"required"))}}function re(e,t){1&e&&(w.Qb(0),w.Nb(1,"input",57),w.Pb())}function le(e,t){if(1&e){const e=w.Tb();w.Sb(0,"fieldset"),w.Sb(1,"legend",26),w.Wb(2,58),w.Rb(),w.Sb(3,"div",9),w.Sb(4,"div",28),w.Sb(5,"div",29),w.Sb(6,"input",59),w.gc("change",(function(){return w.Dc(e),w.ic(2).setMfaDeleteValidators()})),w.Rb(),w.Sb(7,"label",60),w.Wb(8,61),w.Rb(),w.Sb(9,"cd-helper"),w.Sb(10,"span"),w.Wb(11,62),w.Rb(),w.Rb(),w.Rb(),w.Rb(),w.Rb(),w.Rb()}}function ue(e,t){1&e&&(w.Sb(0,"span",39),w.Wb(1,71),w.Rb())}function de(e,t){if(1&e&&(w.Sb(0,"div",9),w.Sb(1,"label",68),w.Wb(2,69),w.Rb(),w.Sb(3,"div",12),w.Nb(4,"input",70),w.Mc(5,ue,2,0,"span",15),w.Rb(),w.Rb()),2&e){w.ic(2);const e=w.Ac(2),t=w.ic();w.yb(5),w.pc("ngIf",t.bucketForm.showError("mfa-token-serial",e,"required"))}}function fe(e,t){1&e&&(w.Sb(0,"span",39),w.Wb(1,75),w.Rb())}function me(e,t){if(1&e&&(w.Sb(0,"div",9),w.Sb(1,"label",72),w.Wb(2,73),w.Rb(),w.Sb(3,"div",12),w.Nb(4,"input",74),w.Mc(5,fe,2,0,"span",15),w.Rb(),w.Rb()),2&e){w.ic(2);const e=w.Ac(2),t=w.ic();w.yb(5),w.pc("ngIf",t.bucketForm.showError("mfa-token-pin",e,"required"))}}function pe(e,t){if(1&e){const e=w.Tb();w.Sb(0,"fieldset"),w.Sb(1,"legend",26),w.Wb(2,63),w.Rb(),w.Sb(3,"div",9),w.Sb(4,"div",28),w.Sb(5,"div",29),w.Sb(6,"input",64),w.gc("change",(function(){return w.Dc(e),w.ic(2).setMfaDeleteValidators()})),w.Rb(),w.Sb(7,"label",65),w.Wb(8,66),w.Rb(),w.Sb(9,"cd-helper"),w.Sb(10,"span"),w.Wb(11,67),w.Rb(),w.Rb(),w.Rb(),w.Rb(),w.Rb(),w.Mc(12,de,6,1,"div",8),w.Mc(13,me,6,1,"div",8),w.Rb()}if(2&e){const e=w.ic(2);w.yb(12),w.pc("ngIf",e.areMfaCredentialsRequired()),w.yb(1),w.pc("ngIf",e.areMfaCredentialsRequired())}}function ge(e,t){1&e&&(w.Sb(0,"div",9),w.Sb(1,"label",76),w.Wb(2,77),w.Rb(),w.Sb(3,"div",12),w.Sb(4,"select",78),w.Sb(5,"option",79),w.Wb(6,80),w.Rb(),w.Sb(7,"option",81),w.Wb(8,82),w.Rb(),w.Rb(),w.Rb(),w.Rb())}function he(e,t){1&e&&(w.Sb(0,"span",39),w.Wb(1,87),w.Rb())}function ye(e,t){1&e&&(w.Sb(0,"span",39),w.Wb(1,88),w.Rb())}function Se(e,t){if(1&e&&(w.Sb(0,"div",9),w.Sb(1,"label",83),w.Qb(2),w.Wb(3,84),w.Pb(),w.Sb(4,"cd-helper"),w.Wb(5,85),w.Rb(),w.Rb(),w.Sb(6,"div",12),w.Nb(7,"input",86),w.Mc(8,he,2,0,"span",15),w.Mc(9,ye,2,0,"span",15),w.Rb(),w.Rb()),2&e){w.ic();const e=w.Ac(2),t=w.ic();w.yb(8),w.pc("ngIf",t.bucketForm.showError("lock_retention_period_days",e,"pattern")),w.yb(1),w.pc("ngIf",t.bucketForm.showError("lock_retention_period_days",e,"lockDays"))}}const _e=function(e){return{required:e}};function Re(e,t){if(1&e){const e=w.Tb();w.Sb(0,"div",1),w.Sb(1,"form",2,3),w.Sb(3,"div",4),w.Sb(4,"div",5),w.Wb(5,6),w.jc(6,"titlecase"),w.jc(7,"upperFirst"),w.Rb(),w.Sb(8,"div",7),w.Mc(9,U,5,0,"div",8),w.Sb(10,"div",9),w.Sb(11,"label",10),w.Wb(12,11),w.Rb(),w.Sb(13,"div",12),w.Sb(14,"input",13),w.Yb(15,14),w.Rb(),w.Mc(16,G,2,0,"span",15),w.Mc(17,K,2,0,"span",15),w.Mc(18,Q,2,0,"span",15),w.Mc(19,J,2,0,"span",15),w.Mc(20,Z,2,0,"span",15),w.Mc(21,X,2,0,"span",15),w.Mc(22,Y,2,0,"span",15),w.Mc(23,H,2,0,"span",15),w.Rb(),w.Rb(),w.Sb(24,"div",9),w.Sb(25,"label",16),w.Wb(26,17),w.Rb(),w.Sb(27,"div",12),w.Sb(28,"select",18),w.Mc(29,ee,2,1,"option",19),w.Mc(30,te,2,1,"option",19),w.Mc(31,ce,2,2,"option",20),w.Rb(),w.Mc(32,ae,2,0,"span",15),w.Rb(),w.Rb(),w.Sb(33,"div",9),w.Sb(34,"label",21),w.Wb(35,22),w.Rb(),w.Sb(36,"div",12),w.Mc(37,ne,5,4,"ng-template",null,23,w.Nc),w.Mc(39,re,2,0,"ng-container",24),w.Rb(),w.Rb(),w.Mc(40,le,12,0,"fieldset",25),w.Mc(41,pe,14,2,"fieldset",25),w.Sb(42,"fieldset"),w.Sb(43,"legend",26),w.Wb(44,27),w.Rb(),w.Sb(45,"div",9),w.Sb(46,"div",28),w.Sb(47,"div",29),w.Nb(48,"input",30),w.Sb(49,"label",31),w.Wb(50,32),w.Rb(),w.Sb(51,"cd-helper"),w.Sb(52,"span"),w.Wb(53,33),w.Rb(),w.Rb(),w.Rb(),w.Rb(),w.Rb(),w.Mc(54,ge,9,0,"div",8),w.Mc(55,Se,10,2,"div",8),w.Rb(),w.Rb(),w.Sb(56,"div",34),w.Sb(57,"cd-form-button-panel",35),w.gc("submitActionEvent",(function(){return w.Dc(e),w.ic().submit()})),w.jc(58,"titlecase"),w.jc(59,"upperFirst"),w.Rb(),w.Rb(),w.Rb(),w.Rb(),w.Rb()}if(2&e){const e=w.Ac(2),t=w.Ac(38),c=w.ic();w.yb(1),w.pc("formGroup",c.bucketForm),w.yb(6),w.ac(w.kc(6,29,c.action))(w.kc(7,31,c.resource)),w.Xb(5),w.yb(2),w.pc("ngIf",c.editing),w.yb(2),w.pc("ngClass",w.uc(37,_e,!c.editing)),w.yb(3),w.pc("readonly",c.editing)("autofocus",!c.editing),w.yb(2),w.pc("ngIf",c.bucketForm.showError("bid",e,"required")),w.yb(1),w.pc("ngIf",c.bucketForm.showError("bid",e,"bucketNameInvalid")),w.yb(1),w.pc("ngIf",c.bucketForm.showError("bid",e,"bucketNameExists")),w.yb(1),w.pc("ngIf",c.bucketForm.showError("bid",e,"containsUpperCase")),w.yb(1),w.pc("ngIf",c.bucketForm.showError("bid",e,"lowerCaseOrNumber")),w.yb(1),w.pc("ngIf",c.bucketForm.showError("bid",e,"ipAddress")),w.yb(1),w.pc("ngIf",c.bucketForm.showError("bid",e,"onlyLowerCaseAndNumbers")),w.yb(1),w.pc("ngIf",c.bucketForm.showError("bid",e,"shouldBeInRange")),w.yb(5),w.pc("autofocus",c.editing),w.yb(1),w.pc("ngIf",null===c.owners),w.yb(1),w.pc("ngIf",null!==c.owners),w.yb(1),w.pc("ngForOf",c.owners),w.yb(1),w.pc("ngIf",c.bucketForm.showError("owner",e,"required")),w.yb(2),w.pc("ngClass",w.uc(39,_e,!c.editing)),w.yb(5),w.pc("ngIf",c.editing)("ngIfElse",t),w.yb(1),w.pc("ngIf",c.editing),w.yb(1),w.pc("ngIf",c.editing),w.yb(13),w.pc("ngIf",c.bucketForm.getValue("lock_enabled")),w.yb(1),w.pc("ngIf",c.bucketForm.getValue("lock_enabled")),w.yb(2),w.pc("form",c.bucketForm)("submitText",w.kc(58,33,c.action)+" "+w.kc(59,35,c.resource))}}let ke=(()=>{class e extends q.a{constructor(e,t,c,a,i,s,b,o){super(),this.route=e,this.router=t,this.formBuilder=c,this.rgwBucketService=a,this.rgwSiteService=i,this.rgwUserService=s,this.notificationService=b,this.actionLabels=o,this.editing=!1,this.owners=null,this.placementTargets=[],this.isVersioningAlreadyEnabled=!1,this.isMfaDeleteAlreadyEnabled=!1,this.icons=M.a,this.editing=this.router.url.startsWith("/rgw/bucket/"+n.e.EDIT),this.action=this.editing?this.actionLabels.EDIT:this.actionLabels.CREATE,this.resource="bucket",this.createForm()}get isVersioningEnabled(){return this.bucketForm.getValue("versioning")}get isMfaDeleteEnabled(){return this.bucketForm.getValue("mfa-delete")}createForm(){const e=this,t=T.a.custom("lockDays",()=>{if(!e.bucketForm||!d.a.get(e.bucketForm.getRawValue(),"lock_enabled"))return!1;const t=Number(e.bucketForm.getValue("lock_retention_period_days"));return!Number.isInteger(t)||0===t});this.bucketForm=this.formBuilder.group({id:[null],bid:[null,[i.A.required],this.editing?[]:[this.bucketNameValidator()]],owner:[null,[i.A.required]],"placement-target":[null,this.editing?[]:[i.A.required]],versioning:[null],"mfa-delete":[null],"mfa-token-serial":[""],"mfa-token-pin":[""],lock_enabled:[{value:!1,disabled:this.editing}],lock_mode:["COMPLIANCE"],lock_retention_period_days:[0,[T.a.number(!1),t]]})}ngOnInit(){const e={owners:this.rgwUserService.enumerate()};this.editing||(e.getPlacementTargets=this.rgwSiteService.get("placement-targets")),this.route.params.subscribe(t=>{if(t.hasOwnProperty("bid")){const c=decodeURIComponent(t.bid);e.getBid=this.rgwBucketService.get(c)}Object(f.a)(e).subscribe(e=>{if(this.owners=e.owners.sort(),e.getPlacementTargets){const t=e.getPlacementTargets;this.zonegroup=t.zonegroup,d.a.forEach(t.placement_targets,e=>{e.description=`${e.name} (${"pool"}: ${e.data_pool})`,this.placementTargets.push(e)}),1===this.placementTargets.length&&this.bucketForm.get("placement-target").setValue(this.placementTargets[0].name)}if(e.getBid){const t=e.getBid,c=d.a.clone(this.bucketForm.getRawValue());let a=d.a.pick(t,d.a.keys(c));a.lock_retention_period_days=this.rgwBucketService.getLockDays(t),a["placement-target"]=t.placement_rule,a.versioning=t.versioning===C.ENABLED,a["mfa-delete"]=t.mfa_delete===A.ENABLED,a=d.a.merge(c,a),this.bucketForm.setValue(a),this.editing&&(this.isVersioningAlreadyEnabled=this.isVersioningEnabled,this.isMfaDeleteAlreadyEnabled=this.isMfaDeleteEnabled,this.setMfaDeleteValidators(),a.lock_enabled&&this.bucketForm.controls.versioning.disable())}this.loadingReady()})})}goToListView(){this.router.navigate(["/rgw/bucket"])}submit(){if(this.bucketForm.pristine)return void this.goToListView();const e=this.bucketForm.value;if(this.editing){const t=this.getVersioningStatus(),c=this.getMfaDeleteStatus();this.rgwBucketService.update(e.bid,e.id,e.owner,t,c,e["mfa-token-serial"],e["mfa-token-pin"],e.lock_mode,e.lock_retention_period_days).subscribe(()=>{this.notificationService.show($.a.success,"Updated Object Gateway bucket '" + e.bid + "'."),this.goToListView()},()=>{this.bucketForm.setErrors({cdSubmitButton:!0})})}else this.rgwBucketService.create(e.bid,e.owner,this.zonegroup,e["placement-target"],e.lock_enabled,e.lock_mode,e.lock_retention_period_days).subscribe(()=>{this.notificationService.show($.a.success,"Created Object Gateway bucket '" + e.bid + "'"),this.goToListView()},()=>{this.bucketForm.setErrors({cdSubmitButton:!0})})}bucketNameValidator(){return e=>{if(e.pristine||""===e.value)return Object(m.a)(null);const t=[];let c;return t.push(()=>{const e=this.bucketForm.get("bid").value;let t=!0;return(/^((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.test(e)||/^(?:[a-f0-9]{1,4}:){7}[a-f0-9]{1,4}$/i.test(e))&&(c="ipAddress",t=!1),t}),t.push(e=>!!d.a.inRange(e.length,3,64)||(c="shouldBeInRange",!1)),t.push(e=>{const t=d.a.split(e,".");return d.a.every(t,t=>t!==d.a.toLower(t)||t.includes("_")?(c="containsUpperCase",!1):/^\S*$/.test(e)&&/[0-9a-z-]/.test(t)?d.a.every([0,t.length-1],e=>(c="lowerCaseOrNumber",/[a-z]/.test(t[e])||d.a.isInteger(d.a.parseInt(t[e])))):(c="onlyLowerCaseAndNumbers",!1))}),d.a.every(t,t=>t(e.value))?Object(p.a)().pipe(Object(h.a)(this.rgwBucketService.exists.call(this.rgwBucketService,e.value)),Object(g.a)(e=>e?{bucketNameExists:!0}:null)):Object(p.a)().pipe(Object(g.a)(()=>{switch(c){case"onlyLowerCaseAndNumbers":return{onlyLowerCaseAndNumbers:!0};case"shouldBeInRange":return{shouldBeInRange:!0};case"ipAddress":return{ipAddress:!0};case"containsUpperCase":return{containsUpperCase:!0};case"lowerCaseOrNumber":return{lowerCaseOrNumber:!0};default:return{bucketNameInvalid:!0}}}))}}areMfaCredentialsRequired(){return this.isMfaDeleteEnabled!==this.isMfaDeleteAlreadyEnabled||this.isMfaDeleteAlreadyEnabled&&this.isVersioningEnabled!==this.isVersioningAlreadyEnabled}setMfaDeleteValidators(){const e=this.bucketForm.get("mfa-token-serial"),t=this.bucketForm.get("mfa-token-pin");this.areMfaCredentialsRequired()?(e.setValidators(i.A.required),t.setValidators(i.A.required)):(e.setValidators(null),t.setValidators(null)),e.updateValueAndValidity(),t.updateValueAndValidity()}getVersioningStatus(){return this.isVersioningEnabled?C.ENABLED:C.SUSPENDED}getMfaDeleteStatus(){return this.isMfaDeleteEnabled?A.ENABLED:A.DISABLED}}return e.\u0275fac=function(t){return new(t||e)(w.Mb(s.a),w.Mb(s.e),w.Mb(N.a),w.Mb(z),w.Mb(I),w.Mb(x.a),w.Mb(E.a),w.Mb(n.b))},e.\u0275cmp=w.Gb({type:e,selectors:[["cd-rgw-bucket-form"]],features:[w.vb],decls:1,vars:1,consts:function(){return[["class","cd-col-form",4,"cdFormLoading"],[1,"cd-col-form"],["name","bucketForm","novalidate","",3,"formGroup"],["frm","ngForm"],[1,"card"],[1,"card-header"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"card-body"],["class","form-group row",4,"ngIf"],[1,"form-group","row"],["for","bid",1,"cd-col-form-label",3,"ngClass"],"Name",[1,"cd-col-form-input"],["id","bid","name","bid","type","text","formControlName","bid",1,"form-control",3,"readonly","autofocus",6,"placeholder"],["placeholder","Name..."],["class","invalid-feedback",4,"ngIf"],["for","owner",1,"cd-col-form-label","required"],"Owner",["id","owner","name","owner","formControlName","owner",1,"form-control","custom-select",3,"autofocus"],[3,"ngValue",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],["for","placement-target",1,"cd-col-form-label",3,"ngClass"],"Placement target",["placementTargetSelect",""],[4,"ngIf","ngIfElse"],[4,"ngIf"],[1,"cd-header"],"Locking",[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"],"Enabled","Enables locking for the objects in the bucket. Locking can only be enabled while creating a bucket.",[1,"card-footer"],["wrappingClass","text-right",3,"form","submitText","submitActionEvent"],["for","id",1,"cd-col-form-label"],"Id",["id","id","name","id","type","text","formControlName","id","readonly","",1,"form-control"],[1,"invalid-feedback"],"This field is required.","The value is not valid.","The chosen name is already in use.","Bucket names must not contain uppercase characters or underscores.","Each label must start and end with a lowercase letter or a number.","Bucket names cannot be formatted as IP address.","Bucket names can only contain lowercase letters, numbers, and hyphens.","Bucket names must be 3 to 63 characters long.",[3,"ngValue"],"Loading...","-- Select a user --",[3,"value"],"This field is required.",["id","placement-target","name","placement-target","formControlName","placement-target",1,"form-control","custom-select"],"Loading...","-- Select a placement target --","This field is required.",["id","placement-target","name","placement-target","formControlName","placement-target","type","text","readonly","",1,"form-control"],"Versioning",["type","checkbox","id","versioning","name","versioning","formControlName","versioning",1,"custom-control-input",3,"change"],["for","versioning",1,"custom-control-label"],"Enabled","Enables versioning for the objects in the bucket.","Multi-Factor Authentication",["type","checkbox","id","mfa-delete","name","mfa-delete","formControlName","mfa-delete",1,"custom-control-input",3,"change"],["for","mfa-delete",1,"custom-control-label"],"Delete enabled","Enables MFA (multi-factor authentication) Delete, which requires additional authentication for changing the bucket versioning state.",["for","mfa-token-serial",1,"cd-col-form-label"],"Token Serial Number",["type","text","id","mfa-token-serial","name","mfa-token-serial","formControlName","mfa-token-serial",1,"form-control"],"This field is required.",["for","mfa-token-pin",1,"cd-col-form-label"],"Token PIN",["type","text","id","mfa-token-pin","name","mfa-token-pin","formControlName","mfa-token-pin",1,"form-control"],"This field is required.",["for","lock_mode",1,"cd-col-form-label"],"Mode",["formControlName","lock_mode","name","lock_mode","id","lock_mode",1,"form-control","custom-select"],["value","COMPLIANCE"],"Compliance",["value","GOVERNANCE"],"Governance",["for","lock_retention_period_days",1,"cd-col-form-label"],"Days","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.",["type","number","id","lock_retention_period_days","formControlName","lock_retention_period_days","min","0",1,"form-control"],"The entered value must be a positive integer.","Retention Days must be a positive integer."]},template:function(e,t){1&e&&w.Mc(0,Re,60,41,"div",0),2&e&&w.pc("cdFormLoading",t.loading)},directives:[F.a,i.C,i.r,W.a,i.k,a.r,O.a,a.p,D.a,i.d,j.a,i.q,i.i,P.a,i.z,a.q,i.b,V.a,B.a,i.u,i.B,i.v],pipes:[a.A,L.a],styles:[""]}),e})();var ve=c("HDdC"),we=c("+fVR"),ze=c("0+/T"),Ie=c("uIqm"),xe=c("vCyI"),Me=c("Fgil"),$e=c("o4+5"),qe=c("aexS"),Ne=c("JK/P"),Te=c("EgGo"),Ee=c("S7zO"),Ae=c("a0VL"),Ce=c("iExv");function Fe(e,t){1&e&&(w.Sb(0,"td"),w.Wb(1,24),w.Rb())}function We(e,t){if(1&e&&(w.Sb(0,"td"),w.Oc(1),w.jc(2,"dimless"),w.Rb()),2&e){const e=w.ic(3);w.yb(1),w.Qc(" ",w.kc(2,1,e.selection.bucket_quota.max_size)," ")}}function Oe(e,t){1&e&&(w.Sb(0,"td"),w.Wb(1,25),w.Rb())}function De(e,t){if(1&e&&(w.Sb(0,"td"),w.Oc(1),w.Rb()),2&e){const e=w.ic(3);w.yb(1),w.Qc(" ",e.selection.bucket_quota.max_objects," ")}}function je(e,t){if(1&e&&(w.Sb(0,"div"),w.Sb(1,"legend"),w.Wb(2,20),w.Rb(),w.Sb(3,"table",1),w.Sb(4,"tbody"),w.Sb(5,"tr"),w.Sb(6,"td",2),w.Wb(7,21),w.Rb(),w.Sb(8,"td",4),w.Oc(9),w.jc(10,"booleanText"),w.Rb(),w.Rb(),w.Sb(11,"tr"),w.Sb(12,"td",5),w.Wb(13,22),w.Rb(),w.Mc(14,Fe,2,0,"td",0),w.Mc(15,We,3,3,"td",0),w.Rb(),w.Sb(16,"tr"),w.Sb(17,"td",5),w.Wb(18,23),w.Rb(),w.Mc(19,Oe,2,0,"td",0),w.Mc(20,De,2,1,"td",0),w.Rb(),w.Rb(),w.Rb(),w.Rb()),2&e){const e=w.ic(2);w.yb(9),w.Pc(w.kc(10,5,e.selection.bucket_quota.enabled)),w.yb(5),w.pc("ngIf",e.selection.bucket_quota.max_size<=-1),w.yb(1),w.pc("ngIf",e.selection.bucket_quota.max_size>-1),w.yb(4),w.pc("ngIf",e.selection.bucket_quota.max_objects<=-1),w.yb(1),w.pc("ngIf",e.selection.bucket_quota.max_objects>-1)}}function Pe(e,t){if(1&e&&(w.Qb(0),w.Sb(1,"tr"),w.Sb(2,"td",5),w.Wb(3,26),w.Rb(),w.Sb(4,"td"),w.Oc(5),w.Rb(),w.Rb(),w.Sb(6,"tr"),w.Sb(7,"td",5),w.Wb(8,27),w.Rb(),w.Sb(9,"td"),w.Oc(10),w.Rb(),w.Rb(),w.Pb()),2&e){const e=w.ic(2);w.yb(5),w.Pc(e.selection.lock_mode),w.yb(5),w.Pc(e.selection.lock_retention_period_days)}}function Ve(e,t){if(1&e&&(w.Qb(0),w.Sb(1,"table",1),w.Sb(2,"tbody"),w.Sb(3,"tr"),w.Sb(4,"td",2),w.Wb(5,3),w.Rb(),w.Sb(6,"td",4),w.Oc(7),w.Rb(),w.Rb(),w.Sb(8,"tr"),w.Sb(9,"td",5),w.Wb(10,6),w.Rb(),w.Sb(11,"td"),w.Oc(12),w.Rb(),w.Rb(),w.Sb(13,"tr"),w.Sb(14,"td",5),w.Wb(15,7),w.Rb(),w.Sb(16,"td"),w.Oc(17),w.Rb(),w.Rb(),w.Sb(18,"tr"),w.Sb(19,"td",5),w.Wb(20,8),w.Rb(),w.Sb(21,"td"),w.Oc(22),w.Rb(),w.Rb(),w.Sb(23,"tr"),w.Sb(24,"td",5),w.Wb(25,9),w.Rb(),w.Sb(26,"td"),w.Oc(27),w.Rb(),w.Rb(),w.Sb(28,"tr"),w.Sb(29,"td",5),w.Wb(30,10),w.Rb(),w.Sb(31,"td"),w.Oc(32),w.Rb(),w.Rb(),w.Sb(33,"tr"),w.Sb(34,"td",5),w.Wb(35,11),w.Rb(),w.Sb(36,"td"),w.Oc(37),w.Rb(),w.Rb(),w.Sb(38,"tr"),w.Sb(39,"td",5),w.Wb(40,12),w.Rb(),w.Sb(41,"td"),w.Oc(42),w.Rb(),w.Rb(),w.Sb(43,"tr"),w.Sb(44,"td",5),w.Wb(45,13),w.Rb(),w.Sb(46,"td"),w.Oc(47),w.Rb(),w.Rb(),w.Sb(48,"tr"),w.Sb(49,"td",5),w.Wb(50,14),w.Rb(),w.Sb(51,"td"),w.Oc(52),w.jc(53,"cdDate"),w.Rb(),w.Rb(),w.Sb(54,"tr"),w.Sb(55,"td",5),w.Wb(56,15),w.Rb(),w.Sb(57,"td"),w.Oc(58),w.Rb(),w.Rb(),w.Sb(59,"tr"),w.Sb(60,"td",5),w.Wb(61,16),w.Rb(),w.Sb(62,"td"),w.Oc(63),w.Rb(),w.Rb(),w.Sb(64,"tr"),w.Sb(65,"td",5),w.Wb(66,17),w.Rb(),w.Sb(67,"td"),w.Oc(68),w.Rb(),w.Rb(),w.Rb(),w.Rb(),w.Mc(69,je,21,7,"div",0),w.Sb(70,"legend"),w.Wb(71,18),w.Rb(),w.Sb(72,"table",1),w.Sb(73,"tbody"),w.Sb(74,"tr"),w.Sb(75,"td",2),w.Wb(76,19),w.Rb(),w.Sb(77,"td",4),w.Oc(78),w.jc(79,"booleanText"),w.Rb(),w.Rb(),w.Mc(80,Pe,11,2,"ng-container",0),w.Rb(),w.Rb(),w.Pb()),2&e){const e=w.ic();w.yb(7),w.Pc(e.selection.bid),w.yb(5),w.Pc(e.selection.id),w.yb(5),w.Pc(e.selection.owner),w.yb(5),w.Pc(e.selection.index_type),w.yb(5),w.Pc(e.selection.placement_rule),w.yb(5),w.Pc(e.selection.marker),w.yb(5),w.Pc(e.selection.max_marker),w.yb(5),w.Pc(e.selection.ver),w.yb(5),w.Pc(e.selection.master_ver),w.yb(5),w.Pc(w.kc(53,16,e.selection.mtime)),w.yb(6),w.Pc(e.selection.zonegroup),w.yb(5),w.Pc(e.selection.versioning),w.yb(5),w.Pc(e.selection.mfa_delete),w.yb(1),w.pc("ngIf",e.selection.bucket_quota),w.yb(9),w.Pc(w.kc(79,18,e.selection.lock_enabled)),w.yb(2),w.pc("ngIf",e.selection.lock_enabled)}}let Be=(()=>{class e{constructor(e){this.rgwBucketService=e}ngOnChanges(){this.selection&&this.rgwBucketService.get(this.selection.bid).subscribe(e=>{e.lock_retention_period_days=this.rgwBucketService.getLockDays(e),this.selection=e})}}return e.\u0275fac=function(t){return new(t||e)(w.Mb(z))},e.\u0275cmp=w.Gb({type:e,selectors:[["cd-rgw-bucket-details"]],inputs:{selection:"selection"},features:[w.wb],decls:1,vars:1,consts:function(){return[[4,"ngIf"],[1,"table","table-striped","table-bordered"],[1,"bold","w-25"],"Name",[1,"w-75"],[1,"bold"],"ID","Owner","Index type","Placement rule","Marker","Maximum marker","Version","Master version","Modification time","Zonegroup","Versioning","MFA Delete","Locking","Enabled","Bucket quota","Enabled","Maximum size","Maximum objects","Unlimited","Unlimited","Mode","Days"]},template:function(e,t){1&e&&w.Mc(0,Ve,81,20,"ng-container",0),2&e&&w.pc("ngIf",t.selection)},directives:[a.r],pipes:[Ae.a,Ce.a,$e.a],styles:["table[_ngcontent-%COMP%]{table-layout:fixed}table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{word-wrap:break-word}"]}),e})();var Le=c("GgAd");const Ue=["bucketSizeTpl"],Ge=["bucketObjectTpl"];function Ke(e,t){if(1&e&&w.Nb(0,"cd-usage-bar",8),2&e){const e=w.ic().row;w.pc("total",e.bucket_quota.max_size)("used",e.bucket_size)}}function Qe(e,t){1&e&&w.Wb(0,9)}function Je(e,t){if(1&e&&(w.Mc(0,Ke,1,2,"cd-usage-bar",6),w.Mc(1,Qe,1,0,"ng-template",null,7,w.Nc)),2&e){const e=t.row,c=w.Ac(2);w.pc("ngIf",e.bucket_quota.max_size>0&&e.bucket_quota.enabled)("ngIfElse",c)}}function Ze(e,t){if(1&e&&w.Nb(0,"cd-usage-bar",12),2&e){const e=w.ic().row;w.pc("total",e.bucket_quota.max_objects)("used",e.num_objects)("isBinary",!1)}}function Xe(e,t){1&e&&w.Wb(0,13)}function Ye(e,t){if(1&e&&(w.Mc(0,Ze,1,3,"cd-usage-bar",10),w.Mc(1,Xe,1,0,"ng-template",null,11,w.Nc)),2&e){const e=t.row,c=w.Ac(2);w.pc("ngIf",e.bucket_quota.max_objects>0&&e.bucket_quota.enabled)("ngIfElse",c)}}let He=(()=>{class e extends we.a{constructor(e,t,c,a,i,s,b,o){super(o),this.authStorageService=e,this.dimlessBinaryPipe=t,this.dimlessPipe=c,this.rgwBucketService=a,this.modalService=i,this.urlBuilder=s,this.actionLabels=b,this.ngZone=o,this.columns=[],this.buckets=[],this.selection=new xe.a}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 e=()=>this.selection.first()&&""+encodeURIComponent(this.selection.first().bid);this.tableActions=[{permission:"create",icon:M.a.add,routerLink:()=>this.urlBuilder.getCreate(),name:this.actionLabels.CREATE,canBePrimary:e=>!e.hasSelection},{permission:"update",icon:M.a.edit,routerLink:()=>this.urlBuilder.getEdit(e()),name:this.actionLabels.EDIT},{permission:"delete",icon:M.a.destroy,click:()=>this.deleteAction(),disable:()=>!this.selection.hasSelection,name:this.actionLabels.DELETE,canBePrimary:e=>e.hasMultiSelection}],this.setTableRefreshTimeout()}transformBucketData(){d.a.forEach(this.buckets,e=>{const t=e.bucket_quota.max_size,c=e.bucket_quota.max_objects;e.bucket_size=0,e.num_objects=0,d.a.isEmpty(e.usage)||(e.bucket_size=e.usage["rgw.main"].size_actual,e.num_objects=e.usage["rgw.main"].num_objects),e.size_usage=t>0?e.bucket_size/t:void 0,e.object_usage=c>0?e.num_objects/c:void 0})}getBucketList(e){this.setTableRefreshTimeout(),this.rgwBucketService.list().subscribe(e=>{this.buckets=e,this.transformBucketData()},()=>{e.error()})}updateSelection(e){this.selection=e}deleteAction(){this.modalService.show(ze.a,{itemDescription:this.selection.hasSingleSelection?"bucket":"buckets",itemNames:this.selection.selected.map(e=>e.bid),submitActionObservable:()=>new ve.a(e=>{Object(f.a)(this.selection.selected.map(e=>this.rgwBucketService.delete(e.bid))).subscribe({error:t=>{e.error(t),this.table.refreshBtn()},complete:()=>{e.complete(),this.table.refreshBtn()}})})})}}return e.\u0275fac=function(t){return new(t||e)(w.Mb(qe.a),w.Mb(Me.a),w.Mb($e.a),w.Mb(z),w.Mb(Ne.a),w.Mb(Te.a),w.Mb(n.b),w.Mb(w.A))},e.\u0275cmp=w.Gb({type:e,selectors:[["cd-rgw-bucket-list"]],viewQuery:function(e,t){var c;1&e&&(w.Jc(Ie.a,!0),w.Jc(Ue,!0),w.Jc(Ge,!0)),2&e&&(w.zc(c=w.hc())&&(t.table=c.first),w.zc(c=w.hc())&&(t.bucketSizeTpl=c.first),w.zc(c=w.hc())&&(t.bucketObjectTpl=c.first))},features:[w.xb([{provide:Te.a,useValue:new Te.a("rgw/bucket")}]),w.vb],decls:8,vars:9,consts:function(){return[["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"],"No Limit",[3,"total","used","isBinary",4,"ngIf","ngIfElse"],["noObjectQuota",""],[3,"total","used","isBinary"],"No Limit"]},template:function(e,t){1&e&&(w.Sb(0,"cd-table",0,1),w.gc("setExpandedRow",(function(e){return t.setExpandedRow(e)}))("updateSelection",(function(e){return t.updateSelection(e)}))("fetchData",(function(e){return t.getBucketList(e)})),w.Nb(2,"cd-table-actions",2),w.Nb(3,"cd-rgw-bucket-details",3),w.Rb(),w.Mc(4,Je,3,2,"ng-template",null,4,w.Nc),w.Mc(6,Ye,3,2,"ng-template",null,5,w.Nc)),2&e&&(w.pc("autoReload",!1)("data",t.buckets)("columns",t.columns)("hasDetails",!0)("status",t.tableStatus),w.yb(2),w.pc("permission",t.permission)("selection",t.selection)("tableActions",t.tableActions),w.yb(1),w.pc("selection",t.expandedRow))},directives:[Ie.a,Ee.a,Be,a.r,Le.a],styles:[""]}),e})();var et=c("IzEk"),tt=c("85J/"),ct=c("JP8w"),at=c("FSuO"),it=c("b5OY"),st=c("insk");function bt(e,t){if(1&e){const e=w.Tb();w.Sb(0,"cd-table-key-value",11),w.gc("fetchData",(function(){return w.Dc(e),w.ic(2).getMetaData()})),w.Rb()}if(2&e){const e=w.ic(2);w.pc("data",e.metadata)}}function ot(e,t){if(1&e&&w.Nb(0,"cd-table-performance-counter",12),2&e){const e=w.ic(2);w.pc("serviceId",e.serviceMapId)}}function nt(e,t){if(1&e&&w.Nb(0,"cd-grafana",15),2&e){const e=w.ic(3);w.pc("grafanaPath","rgw-instance-detail?var-rgw_servers=rgw."+e.serviceId)}}function rt(e,t){1&e&&(w.Sb(0,"li",13),w.Sb(1,"a",4),w.Wb(2,14),w.Rb(),w.Mc(3,nt,1,1,"ng-template",6),w.Rb())}function lt(e,t){if(1&e&&(w.Qb(0),w.Sb(1,"ul",1,2),w.Sb(3,"li",3),w.Sb(4,"a",4),w.Wb(5,5),w.Rb(),w.Mc(6,bt,1,1,"ng-template",6),w.Rb(),w.Sb(7,"li",7),w.Sb(8,"a",4),w.Wb(9,8),w.Rb(),w.Mc(10,ot,1,1,"ng-template",6),w.Rb(),w.Mc(11,rt,4,0,"li",9),w.Rb(),w.Nb(12,"div",10),w.Pb()),2&e){const e=w.Ac(2),t=w.ic();w.yb(11),w.pc("ngIf",t.grafanaPermission.read),w.yb(1),w.pc("ngbNavOutlet",e)}}let ut=(()=>{class e{constructor(e,t){this.rgwDaemonService=e,this.authStorageService=t,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(){d.a.isEmpty(this.serviceId)||this.rgwDaemonService.get(this.serviceId).subscribe(e=>{this.metadata=e.rgw_metadata})}}return e.\u0275fac=function(t){return new(t||e)(w.Mb(k.a),w.Mb(qe.a))},e.\u0275cmp=w.Gb({type:e,selectors:[["cd-rgw-daemon-details"]],inputs:{selection:"selection"},features:[w.wb],decls:1,vars:1,consts:function(){return[[4,"ngIf"],["ngbNav","","cdStatefulTab","rgw-daemon-details",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem","details"],["ngbNavLink",""],"Details",["ngbNavContent",""],["ngbNavItem","performance-counters"],"Performance Counters",["ngbNavItem","performance-details",4,"ngIf"],[3,"ngbNavOutlet"],[3,"data","fetchData"],["serviceType","rgw",3,"serviceId"],["ngbNavItem","performance-details"],"Performance Details",["uid","x5ARzZtmk","grafanaStyle","one",3,"grafanaPath"]]},template:function(e,t){1&e&&w.Mc(0,lt,13,2,"ng-container",0),2&e&&w.pc("ngIf",t.selection)},directives:[a.r,b.p,ct.a,b.r,b.s,b.q,b.u,at.a,it.a,st.a],styles:[""]}),e})();function dt(e,t){if(1&e){const e=w.Tb();w.Sb(0,"cd-table",8),w.gc("setExpandedRow",(function(t){return w.Dc(e),w.ic().setExpandedRow(t)}))("fetchData",(function(t){return w.Dc(e),w.ic().getDaemonList(t)})),w.Nb(1,"cd-rgw-daemon-details",9),w.Rb()}if(2&e){const e=w.ic();w.pc("data",e.daemons)("columns",e.columns)("hasDetails",!0),w.yb(1),w.pc("selection",e.expandedRow)}}function ft(e,t){1&e&&w.Nb(0,"cd-grafana",11),2&e&&w.pc("grafanaPath","rgw-overview?")}function mt(e,t){1&e&&(w.Sb(0,"li",2),w.Sb(1,"a",3),w.Wb(2,10),w.Rb(),w.Mc(3,ft,1,1,"ng-template",5),w.Rb())}function pt(e,t){1&e&&w.Nb(0,"cd-grafana",13),2&e&&w.pc("grafanaPath","radosgw-sync-overview?")}function gt(e,t){1&e&&(w.Sb(0,"li",2),w.Sb(1,"a",3),w.Wb(2,12),w.Rb(),w.Mc(3,pt,1,1,"ng-template",5),w.Rb())}let ht=(()=>{class e extends we.a{constructor(e,t,c,a){super(),this.rgwDaemonService=e,this.authStorageService=t,this.cephShortVersionPipe=c,this.rgwSiteService=a,this.columns=[],this.daemons=[]}ngOnInit(){this.grafanaPermission=this.authStorageService.getPermissions().grafana,this.columns=[{name:"ID",prop:"id",flexGrow:2},{name:"Hostname",prop:"server_hostname",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(e=>this.isMultiSite=e.length>0)}getDaemonList(e){this.rgwDaemonService.daemons$.pipe(Object(et.a)(1)).subscribe(e=>{this.daemons=e},()=>{e.error()})}}return e.\u0275fac=function(t){return new(t||e)(w.Mb(k.a),w.Mb(qe.a),w.Mb(tt.a),w.Mb(I))},e.\u0275cmp=w.Gb({type:e,selectors:[["cd-rgw-daemon-list"]],features:[w.vb],decls:9,vars:3,consts:function(){return[["ngbNav","",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem",""],["ngbNavLink",""],"Daemons List",["ngbNavContent",""],["ngbNavItem","",4,"ngIf"],[3,"ngbNavOutlet"],["columnMode","flex",3,"data","columns","hasDetails","setExpandedRow","fetchData"],["cdTableDetail","",3,"selection"],"Overall Performance",["uid","WAkugZpiz","grafanaStyle","two",3,"grafanaPath"],"Sync Performance",["uid","rgw-sync-overview","grafanaStyle","two",3,"grafanaPath"]]},template:function(e,t){if(1&e&&(w.Sb(0,"ul",0,1),w.Sb(2,"li",2),w.Sb(3,"a",3),w.Wb(4,4),w.Rb(),w.Mc(5,dt,2,4,"ng-template",5),w.Rb(),w.Mc(6,mt,4,0,"li",6),w.Mc(7,gt,4,0,"li",6),w.Rb(),w.Nb(8,"div",7)),2&e){const e=w.Ac(1);w.yb(6),w.pc("ngIf",t.grafanaPermission.read),w.yb(1),w.pc("ngIf",t.grafanaPermission.read&&t.isMultiSite),w.yb(1),w.pc("ngbNavOutlet",e)}},directives:[b.p,b.r,b.s,b.q,a.r,b.u,Ie.a,ut,st.a],styles:[""]}),e})();var yt=c("GyhO"),St=c("aXbf"),_t=function(e){return e.USERS="users",e.BUCKETS="buckets",e.METADATA="metadata",e.USAGE="usage",e.ZONE="zone",e}({});let Rt=(()=>{class e{static getAll(){return Object.values(e.capabilities)}}return e.capabilities=_t,e})();var kt=c("ajRT");function vt(e,t){1&e&&w.Nb(0,"input",22),2&e&&w.pc("readonly",!0)}function wt(e,t){1&e&&(w.Sb(0,"option",17),w.Wb(1,25),w.Rb()),2&e&&w.pc("ngValue",null)}function zt(e,t){if(1&e&&(w.Sb(0,"option",26),w.Oc(1),w.Rb()),2&e){const e=t.$implicit;w.pc("value",e),w.yb(1),w.Pc(e)}}function It(e,t){if(1&e&&(w.Sb(0,"select",23),w.Mc(1,wt,2,1,"option",24),w.Mc(2,zt,2,2,"option",19),w.Rb()),2&e){const e=w.ic();w.yb(1),w.pc("ngIf",null!==e.types),w.yb(1),w.pc("ngForOf",e.types)}}function xt(e,t){1&e&&(w.Sb(0,"span",27),w.Wb(1,28),w.Rb())}function Mt(e,t){if(1&e&&(w.Sb(0,"option",26),w.Oc(1),w.Rb()),2&e){const e=t.$implicit;w.pc("value",e),w.yb(1),w.Qc(" ",e," ")}}function $t(e,t){1&e&&(w.Sb(0,"span",27),w.Wb(1,29),w.Rb())}const qt=function(e){return{required:e}},Nt=function(){return["read","write","*"]};let Tt=(()=>{class e{constructor(e,t,c){this.formBuilder=e,this.activeModal=t,this.actionLabels=c,this.submitAction=new w.o,this.editing=!0,this.types=[],this.resource="capability",this.createForm()}createForm(){this.formGroup=this.formBuilder.group({type:[null,[i.A.required]],perm:[null,[i.A.required]]})}setEditing(e=!0){this.editing=e,this.action=this.editing?this.actionLabels.EDIT:this.actionLabels.ADD}setValues(e,t){this.formGroup.setValue({type:e,perm:t})}setCapabilities(e){const t=[];e.forEach(e=>{t.push(e.type)}),this.types=[],Rt.getAll().forEach(e=>{-1===d.a.indexOf(t,e)&&this.types.push(e)})}onSubmit(){this.submitAction.emit(this.formGroup.value),this.activeModal.close()}}return e.\u0275fac=function(t){return new(t||e)(w.Mb(N.a),w.Mb(b.a),w.Mb(n.b))},e.\u0275cmp=w.Gb({type:e,selectors:[["cd-rgw-user-capability-modal"]],outputs:{submitAction:"submitAction"},decls:29,vars:24,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"modal-content"],["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","type",1,"cd-col-form-label",3,"ngClass"],"Type",[1,"cd-col-form-input"],["id","type","class","form-control","type","text","formControlName","type",3,"readonly",4,"ngIf"],["id","type","class","form-control custom-select","formControlName","type","autofocus","",4,"ngIf"],["class","invalid-feedback",4,"ngIf"],["for","perm",1,"cd-col-form-label","required"],"Permission",["id","perm","formControlName","perm",1,"form-control","custom-select"],[3,"ngValue"],"-- Select a permission --",[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-control","custom-select"],[3,"ngValue",4,"ngIf"],"-- Select a type --",[3,"value"],[1,"invalid-feedback"],"This field is required.","This field is required."]},template:function(e,t){if(1&e&&(w.Sb(0,"cd-modal",0),w.Qb(1,1),w.Wb(2,2),w.jc(3,"titlecase"),w.jc(4,"upperFirst"),w.Pb(),w.Qb(5,3),w.Sb(6,"form",4,5),w.Sb(8,"div",6),w.Sb(9,"div",7),w.Sb(10,"label",8),w.Wb(11,9),w.Rb(),w.Sb(12,"div",10),w.Mc(13,vt,1,1,"input",11),w.Mc(14,It,3,2,"select",12),w.Mc(15,xt,2,0,"span",13),w.Rb(),w.Rb(),w.Sb(16,"div",7),w.Sb(17,"label",14),w.Wb(18,15),w.Rb(),w.Sb(19,"div",10),w.Sb(20,"select",16),w.Sb(21,"option",17),w.Wb(22,18),w.Rb(),w.Mc(23,Mt,2,2,"option",19),w.Rb(),w.Mc(24,$t,2,0,"span",13),w.Rb(),w.Rb(),w.Rb(),w.Sb(25,"div",20),w.Sb(26,"cd-form-button-panel",21),w.gc("submitActionEvent",(function(){return t.onSubmit()})),w.jc(27,"titlecase"),w.jc(28,"upperFirst"),w.Rb(),w.Rb(),w.Rb(),w.Pb(),w.Rb()),2&e){const e=w.Ac(7);w.pc("modalRef",t.activeModal),w.yb(4),w.ac(w.kc(3,13,t.action))(w.kc(4,15,t.resource)),w.Xb(2),w.yb(2),w.pc("formGroup",t.formGroup),w.yb(4),w.pc("ngClass",w.uc(21,qt,!t.editing)),w.yb(3),w.pc("ngIf",t.editing),w.yb(1),w.pc("ngIf",!t.editing),w.yb(1),w.pc("ngIf",t.formGroup.showError("type",e,"required")),w.yb(6),w.pc("ngValue",null),w.yb(2),w.pc("ngForOf",w.tc(23,Nt)),w.yb(1),w.pc("ngIf",t.formGroup.showError("perm",e,"required")),w.yb(2),w.pc("form",t.formGroup)("submitText",w.kc(27,17,t.action)+" "+w.kc(28,19,t.resource))}},directives:[kt.a,i.C,i.r,W.a,i.k,O.a,a.p,a.r,D.a,i.z,j.a,i.q,i.i,i.u,i.B,a.q,B.a,i.d,P.a],pipes:[a.A,L.a],styles:[""]}),e})();var Et=c("D4zM"),At=c("cEzo");function Ct(e,t){1&e&&w.Nb(0,"input",17),2&e&&w.pc("readonly",!0)}function Ft(e,t){1&e&&(w.Sb(0,"option",21),w.Wb(1,22),w.Rb()),2&e&&w.pc("ngValue",null)}function Wt(e,t){if(1&e&&(w.Sb(0,"option",23),w.Oc(1),w.Rb()),2&e){const e=t.$implicit;w.pc("value",e),w.yb(1),w.Pc(e)}}function Ot(e,t){if(1&e&&(w.Sb(0,"select",18),w.Mc(1,Ft,2,1,"option",19),w.Mc(2,Wt,2,2,"option",20),w.Rb()),2&e){const e=w.ic();w.yb(1),w.pc("ngIf",null!==e.userCandidates),w.yb(1),w.pc("ngForOf",e.userCandidates)}}function Dt(e,t){1&e&&(w.Sb(0,"span",24),w.Wb(1,25),w.Rb())}function jt(e,t){1&e&&(w.Sb(0,"div",7),w.Sb(1,"div",26),w.Sb(2,"div",27),w.Nb(3,"input",28),w.Sb(4,"label",29),w.Wb(5,30),w.Rb(),w.Rb(),w.Rb(),w.Rb())}function Pt(e,t){1&e&&(w.Sb(0,"span",24),w.Wb(1,38),w.Rb())}const Vt=function(e){return{required:e}};function Bt(e,t){if(1&e&&(w.Sb(0,"div",7),w.Sb(1,"label",31),w.Wb(2,32),w.Rb(),w.Sb(3,"div",10),w.Sb(4,"div",33),w.Nb(5,"input",34),w.Sb(6,"span",35),w.Nb(7,"button",36),w.Nb(8,"cd-copy-2-clipboard-button",37),w.Rb(),w.Rb(),w.Mc(9,Pt,2,0,"span",13),w.Rb(),w.Rb()),2&e){const e=w.ic(),t=w.Ac(7);w.yb(1),w.pc("ngClass",w.uc(3,Vt,!e.viewing)),w.yb(4),w.pc("readonly",e.viewing),w.yb(4),w.pc("ngIf",e.formGroup.showError("access_key",t,"required"))}}function Lt(e,t){1&e&&(w.Sb(0,"span",24),w.Wb(1,44),w.Rb())}function Ut(e,t){if(1&e&&(w.Sb(0,"div",7),w.Sb(1,"label",39),w.Wb(2,40),w.Rb(),w.Sb(3,"div",10),w.Sb(4,"div",33),w.Nb(5,"input",41),w.Sb(6,"span",35),w.Nb(7,"button",42),w.Nb(8,"cd-copy-2-clipboard-button",43),w.Rb(),w.Rb(),w.Mc(9,Lt,2,0,"span",13),w.Rb(),w.Rb()),2&e){const e=w.ic(),t=w.Ac(7);w.yb(1),w.pc("ngClass",w.uc(3,Vt,!e.viewing)),w.yb(4),w.pc("readonly",e.viewing),w.yb(4),w.pc("ngIf",e.formGroup.showError("secret_key",t,"required"))}}let Gt=(()=>{class e{constructor(e,t,c){this.formBuilder=e,this.activeModal=t,this.actionLabels=c,this.submitAction=new w.o,this.viewing=!0,this.userCandidates=[],this.resource="S3 Key",this.createForm()}createForm(){this.formGroup=this.formBuilder.group({user:[null,[i.A.required]],generate_key:[!0],access_key:[null,[T.a.requiredIf({generate_key:!1})]],secret_key:[null,[T.a.requiredIf({generate_key:!1})]]})}setViewing(e=!0){this.viewing=e,this.action=this.viewing?this.actionLabels.SHOW:this.actionLabels.CREATE}setValues(e,t,c){this.formGroup.setValue({user:e,generate_key:d.a.isEmpty(t),access_key:t,secret_key:c})}setUserCandidates(e){this.userCandidates=e}onSubmit(){this.submitAction.emit(this.formGroup.value),this.activeModal.close()}}return e.\u0275fac=function(t){return new(t||e)(w.Mb(N.a),w.Mb(b.a),w.Mb(n.b))},e.\u0275cmp=w.Gb({type:e,selectors:[["cd-rgw-user-s3-key-modal"]],outputs:{submitAction:"submitAction"},decls:23,vars:24,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"modal-content"],["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","user",1,"cd-col-form-label",3,"ngClass"],"Username",[1,"cd-col-form-input"],["id","user","class","form-control","type","text","formControlName","user",3,"readonly",4,"ngIf"],["id","user","class","form-control custom-select","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","custom-select"],[3,"ngValue",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[3,"ngValue"],"-- Select a username --",[3,"value"],[1,"invalid-feedback"],"This field is required.",[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"],"Auto-generate key",["for","access_key",1,"cd-col-form-label",3,"ngClass"],"Access key",[1,"input-group"],["id","access_key","type","password","formControlName","access_key",1,"form-control",3,"readonly"],[1,"input-group-append"],["type","button","cdPasswordButton","access_key",1,"btn","btn-light"],["source","access_key"],"This field is required.",["for","secret_key",1,"cd-col-form-label",3,"ngClass"],"Secret key",["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"],"This field is required."]},template:function(e,t){if(1&e&&(w.Sb(0,"cd-modal",0),w.Qb(1,1),w.Wb(2,2),w.jc(3,"titlecase"),w.jc(4,"upperFirst"),w.Pb(),w.Qb(5,3),w.Sb(6,"form",4,5),w.Sb(8,"div",6),w.Sb(9,"div",7),w.Sb(10,"label",8),w.Wb(11,9),w.Rb(),w.Sb(12,"div",10),w.Mc(13,Ct,1,1,"input",11),w.Mc(14,Ot,3,2,"select",12),w.Mc(15,Dt,2,0,"span",13),w.Rb(),w.Rb(),w.Mc(16,jt,6,0,"div",14),w.Mc(17,Bt,10,5,"div",14),w.Mc(18,Ut,10,5,"div",14),w.Rb(),w.Sb(19,"div",15),w.Sb(20,"cd-form-button-panel",16),w.gc("submitActionEvent",(function(){return t.onSubmit()})),w.jc(21,"titlecase"),w.jc(22,"upperFirst"),w.Rb(),w.Rb(),w.Rb(),w.Pb(),w.Rb()),2&e){const e=w.Ac(7);w.pc("modalRef",t.activeModal),w.yb(4),w.ac(w.kc(3,14,t.action))(w.kc(4,16,t.resource)),w.Xb(2),w.yb(2),w.pc("formGroup",t.formGroup),w.yb(4),w.pc("ngClass",w.uc(22,Vt,!t.viewing)),w.yb(3),w.pc("ngIf",t.viewing),w.yb(1),w.pc("ngIf",!t.viewing),w.yb(1),w.pc("ngIf",t.formGroup.showError("user",e,"required")),w.yb(1),w.pc("ngIf",!t.viewing),w.yb(1),w.pc("ngIf",!t.formGroup.getValue("generate_key")),w.yb(1),w.pc("ngIf",!t.formGroup.getValue("generate_key")),w.yb(2),w.pc("form",t.formGroup)("submitText",w.kc(21,18,t.action)+" "+w.kc(22,20,t.resource))("showSubmit",!t.viewing)}},directives:[kt.a,i.C,i.r,W.a,i.k,O.a,a.p,a.r,B.a,D.a,i.d,j.a,i.q,i.i,i.z,P.a,a.q,i.u,i.B,i.b,Et.a,At.a],pipes:[a.A,L.a],styles:[""]}),e})();class Kt{}function Qt(e,t){1&e&&(w.Sb(0,"span",29),w.Wb(1,30),w.Rb())}function Jt(e,t){1&e&&(w.Sb(0,"span",29),w.Wb(1,31),w.Rb())}function Zt(e,t){if(1&e&&(w.Sb(0,"option",32),w.Oc(1),w.Rb()),2&e){const e=t.$implicit;w.pc("value",e),w.yb(1),w.Qc(" ",e," ")}}function Xt(e,t){1&e&&(w.Sb(0,"span",29),w.Wb(1,33),w.Rb())}function Yt(e,t){1&e&&(w.Sb(0,"span",29),w.Wb(1,48),w.Rb())}function Ht(e,t){if(1&e&&(w.Sb(0,"div",7),w.Sb(1,"label",41),w.Wb(2,42),w.Rb(),w.Sb(3,"div",10),w.Sb(4,"div",43),w.Nb(5,"input",44),w.Sb(6,"span",45),w.Nb(7,"button",46),w.Nb(8,"cd-copy-2-clipboard-button",47),w.Rb(),w.Rb(),w.Mc(9,Yt,2,0,"span",15),w.Rb(),w.Rb()),2&e){const e=w.ic(2),t=w.Ac(7);w.yb(9),w.pc("ngIf",e.formGroup.showError("secret_key",t,"required"))}}function ec(e,t){if(1&e&&(w.Sb(0,"fieldset"),w.Sb(1,"legend"),w.Wb(2,34),w.Rb(),w.Sb(3,"div",7),w.Sb(4,"div",35),w.Sb(5,"div",36),w.Nb(6,"input",37),w.Sb(7,"label",38),w.Wb(8,39),w.Rb(),w.Rb(),w.Rb(),w.Rb(),w.Mc(9,Ht,10,1,"div",40),w.Rb()),2&e){const e=w.ic();w.yb(9),w.pc("ngIf",!e.editing&&!e.formGroup.getValue("generate_secret"))}}const tc=function(e){return{required:e}},cc=function(){return["read","write"]};let ac=(()=>{class e{constructor(e,t,c){this.formBuilder=e,this.bsModalRef=t,this.actionLabels=c,this.submitAction=new w.o,this.editing=!0,this.subusers=[],this.resource="Subuser",this.createForm()}createForm(){this.formGroup=this.formBuilder.group({uid:[null],subuid:[null,[i.A.required,this.subuserValidator()]],perm:[null,[i.A.required]],generate_secret:[!0],secret_key:[null,[T.a.requiredIf({generate_secret:!1})]]})}subuserValidator(){const e=this;return t=>e.editing||Object(T.b)(t.value)?null:e.subusers.some(c=>d.a.isEqual(e.getSubuserName(c.id),t.value))?{subuserIdExists:!0}:null}getSubuserName(e){if(d.a.isEmpty(e))return e;const t=e.match(/([^:]+)(:(.+))?/);return d.a.isUndefined(t[3])?t[1]:t[3]}setEditing(e=!0){this.editing=e,this.action=this.editing?this.actionLabels.EDIT:this.actionLabels.CREATE}setValues(e,t="",c=""){this.formGroup.setValue({uid:e,subuid:this.getSubuserName(t),perm:c,generate_secret:!0,secret_key:null})}setSubusers(e){this.subusers=e}onSubmit(){const e=this.formGroup.value,t=new Kt;t.id=`${e.uid}:${e.subuid}`,t.permissions=e.perm,t.generate_secret=e.generate_secret,t.secret_key=e.secret_key,this.submitAction.emit(t),this.bsModalRef.close()}}return e.\u0275fac=function(t){return new(t||e)(w.Mb(N.a),w.Mb(b.a),w.Mb(n.b))},e.\u0275cmp=w.Gb({type:e,selectors:[["cd-rgw-user-subuser-modal"]],outputs:{submitAction:"submitAction"},decls:39,vars:26,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"modal-content"],["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","uid",1,"cd-col-form-label"],"Username",[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"],"Subuser",["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"],"Permission",["id","perm","formControlName","perm",1,"form-control","custom-select"],[3,"ngValue"],"-- Select a permission --",[3,"value",4,"ngFor","ngForOf"],["value","read-write"],"read, write",["value","full-control"],"full",[4,"ngIf"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],"This field is required.","The chosen subuser ID is already in use.",[3,"value"],"This field is required.","Swift key",[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"],"Auto-generate secret",["class","form-group row",4,"ngIf"],["for","secret_key",1,"cd-col-form-label","required"],"Secret key",[1,"input-group"],["id","secret_key","type","password","formControlName","secret_key",1,"form-control"],[1,"input-group-append"],["type","button","cdPasswordButton","secret_key",1,"btn","btn-light"],["source","secret_key"],"This field is required."]},template:function(e,t){if(1&e&&(w.Sb(0,"cd-modal",0),w.Qb(1,1),w.Wb(2,2),w.jc(3,"titlecase"),w.jc(4,"upperFirst"),w.Pb(),w.Qb(5,3),w.Sb(6,"form",4,5),w.Sb(8,"div",6),w.Sb(9,"div",7),w.Sb(10,"label",8),w.Wb(11,9),w.Rb(),w.Sb(12,"div",10),w.Nb(13,"input",11),w.Rb(),w.Rb(),w.Sb(14,"div",7),w.Sb(15,"label",12),w.Wb(16,13),w.Rb(),w.Sb(17,"div",10),w.Nb(18,"input",14),w.Mc(19,Qt,2,0,"span",15),w.Mc(20,Jt,2,0,"span",15),w.Rb(),w.Rb(),w.Sb(21,"div",7),w.Sb(22,"label",16),w.Wb(23,17),w.Rb(),w.Sb(24,"div",10),w.Sb(25,"select",18),w.Sb(26,"option",19),w.Wb(27,20),w.Rb(),w.Mc(28,Zt,2,2,"option",21),w.Sb(29,"option",22),w.Wb(30,23),w.Rb(),w.Sb(31,"option",24),w.Wb(32,25),w.Rb(),w.Rb(),w.Mc(33,Xt,2,0,"span",15),w.Rb(),w.Rb(),w.Mc(34,ec,10,1,"fieldset",26),w.Rb(),w.Sb(35,"div",27),w.Sb(36,"cd-form-button-panel",28),w.gc("submitActionEvent",(function(){return t.onSubmit()})),w.jc(37,"titlecase"),w.jc(38,"upperFirst"),w.Rb(),w.Rb(),w.Rb(),w.Pb(),w.Rb()),2&e){const e=w.Ac(7);w.pc("modalRef",t.bsModalRef),w.yb(4),w.ac(w.kc(3,15,t.action))(w.kc(4,17,t.resource)),w.Xb(2),w.yb(2),w.pc("formGroup",t.formGroup),w.yb(7),w.pc("readonly",!0),w.yb(2),w.pc("ngClass",w.uc(23,tc,!t.editing)),w.yb(3),w.pc("readonly",t.editing),w.yb(1),w.pc("ngIf",t.formGroup.showError("subuid",e,"required")),w.yb(1),w.pc("ngIf",t.formGroup.showError("subuid",e,"subuserIdExists")),w.yb(6),w.pc("ngValue",null),w.yb(2),w.pc("ngForOf",w.tc(25,cc)),w.yb(5),w.pc("ngIf",t.formGroup.showError("perm",e,"required")),w.yb(1),w.pc("ngIf",!t.editing),w.yb(2),w.pc("form",t.formGroup)("submitText",w.kc(37,19,t.action)+" "+w.kc(38,21,t.resource))}},directives:[kt.a,i.C,i.r,W.a,i.k,O.a,D.a,i.d,j.a,i.q,i.i,a.p,P.a,a.r,i.z,i.u,i.B,a.q,B.a,i.b,Et.a,At.a],pipes:[a.A,L.a],styles:[""]}),e})();var ic=c("Z21x");let sc=(()=>{class e{constructor(e,t){this.activeModal=e,this.actionLabels=t,this.resource="Swift Key",this.action=this.actionLabels.SHOW}setValues(e,t){this.user=e,this.secret_key=t}}return e.\u0275fac=function(t){return new(t||e)(w.Mb(b.a),w.Mb(n.b))},e.\u0275cmp=w.Gb({type:e,selectors:[["cd-rgw-user-swift-key-modal"]],decls:24,vars:11,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + " ",[1,"modal-content"],[1,"modal-body"],["novalidate",""],[1,"form-group","row"],["for","user",1,"cd-col-form-label"],"Username",[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"],"Secret key",[1,"input-group"],["id","secret_key","name","secret_key","type","password",1,"form-control",3,"ngModel","readonly","ngModelChange"],[1,"input-group-append"],["type","button","cdPasswordButton","secret_key",1,"btn","btn-light"],["source","secret_key"],[1,"modal-footer"],[3,"backAction"]]},template:function(e,t){1&e&&(w.Sb(0,"cd-modal",0),w.Qb(1,1),w.Wb(2,2),w.jc(3,"titlecase"),w.jc(4,"upperFirst"),w.Pb(),w.Qb(5,3),w.Sb(6,"div",4),w.Sb(7,"form",5),w.Sb(8,"div",6),w.Sb(9,"label",7),w.Wb(10,8),w.Rb(),w.Sb(11,"div",9),w.Sb(12,"input",10),w.gc("ngModelChange",(function(e){return t.user=e})),w.Rb(),w.Rb(),w.Rb(),w.Sb(13,"div",6),w.Sb(14,"label",11),w.Wb(15,12),w.Rb(),w.Sb(16,"div",9),w.Sb(17,"div",13),w.Sb(18,"input",14),w.gc("ngModelChange",(function(e){return t.secret_key=e})),w.Rb(),w.Sb(19,"span",15),w.Nb(20,"button",16),w.Nb(21,"cd-copy-2-clipboard-button",17),w.Rb(),w.Rb(),w.Rb(),w.Rb(),w.Rb(),w.Rb(),w.Sb(22,"div",18),w.Sb(23,"cd-back-button",19),w.gc("backAction",(function(){return t.activeModal.close()})),w.Rb(),w.Rb(),w.Pb(),w.Rb()),2&e&&(w.pc("modalRef",t.activeModal),w.yb(4),w.ac(w.kc(3,7,t.action))(w.kc(4,9,t.resource)),w.Xb(2),w.yb(8),w.pc("readonly",!0)("ngModel",t.user),w.yb(6),w.pc("ngModel",t.secret_key)("readonly",!0))},directives:[kt.a,i.C,i.r,i.s,O.a,D.a,i.d,j.a,i.q,i.t,Et.a,At.a,ic.a],pipes:[a.A,L.a],styles:[""]}),e})();var bc=c("EmSq");function oc(e,t){1&e&&(w.Sb(0,"span",49),w.Wb(1,50),w.Rb())}function nc(e,t){1&e&&(w.Sb(0,"span",49),w.Wb(1,51),w.Rb())}function rc(e,t){1&e&&(w.Sb(0,"span",49),w.Wb(1,52),w.Rb())}function lc(e,t){1&e&&(w.Sb(0,"span",49),w.Wb(1,56),w.Rb())}function uc(e,t){1&e&&(w.Sb(0,"span",49),w.Wb(1,57),w.Rb())}function dc(e,t){if(1&e&&(w.Sb(0,"div",8),w.Sb(1,"label",53),w.Wb(2,54),w.Rb(),w.Sb(3,"div",11),w.Nb(4,"input",55),w.Mc(5,lc,2,0,"span",13),w.Mc(6,uc,2,0,"span",13),w.Rb(),w.Rb()),2&e){w.ic();const e=w.Ac(2),t=w.ic();w.yb(4),w.pc("readonly",t.editing),w.yb(1),w.pc("ngIf",t.userForm.showError("tenant",e,"pattern")),w.yb(1),w.pc("ngIf",t.userForm.showError("tenant",e,"notUnique"))}}function fc(e,t){1&e&&(w.Sb(0,"span",49),w.Wb(1,58),w.Rb())}function mc(e,t){1&e&&(w.Sb(0,"span",49),w.Wb(1,59),w.Rb())}function pc(e,t){1&e&&(w.Sb(0,"span",49),w.Wb(1,60),w.Rb())}function gc(e,t){1&e&&(w.Sb(0,"span",49),w.Wb(1,63),w.Rb())}function hc(e,t){1&e&&(w.Sb(0,"span",49),w.Wb(1,64),w.Rb())}function yc(e,t){if(1&e&&(w.Sb(0,"div",8),w.Nb(1,"label",61),w.Sb(2,"div",11),w.Nb(3,"input",62),w.Mc(4,gc,2,0,"span",13),w.Mc(5,hc,2,0,"span",13),w.Rb(),w.Rb()),2&e){w.ic();const e=w.Ac(2),t=w.ic();w.yb(4),w.pc("ngIf",t.userForm.showError("max_buckets",e,"required")),w.yb(1),w.pc("ngIf",t.userForm.showError("max_buckets",e,"min"))}}function Sc(e,t){1&e&&(w.Sb(0,"span",49),w.Wb(1,76),w.Rb())}function _c(e,t){if(1&e&&(w.Sb(0,"div",8),w.Sb(1,"label",69),w.Wb(2,70),w.Rb(),w.Sb(3,"div",11),w.Sb(4,"div",71),w.Nb(5,"input",72),w.Sb(6,"span",73),w.Nb(7,"button",74),w.Nb(8,"cd-copy-2-clipboard-button",75),w.Rb(),w.Rb(),w.Mc(9,Sc,2,0,"span",13),w.Rb(),w.Rb()),2&e){w.ic(2);const e=w.Ac(2),t=w.ic();w.yb(9),w.pc("ngIf",t.userForm.showError("access_key",e,"required"))}}function Rc(e,t){1&e&&(w.Sb(0,"span",49),w.Wb(1,82),w.Rb())}function kc(e,t){if(1&e&&(w.Sb(0,"div",8),w.Sb(1,"label",77),w.Wb(2,78),w.Rb(),w.Sb(3,"div",11),w.Sb(4,"div",71),w.Nb(5,"input",79),w.Sb(6,"span",73),w.Nb(7,"button",80),w.Nb(8,"cd-copy-2-clipboard-button",81),w.Rb(),w.Rb(),w.Mc(9,Rc,2,0,"span",13),w.Rb(),w.Rb()),2&e){w.ic(2);const e=w.Ac(2),t=w.ic();w.yb(9),w.pc("ngIf",t.userForm.showError("secret_key",e,"required"))}}function vc(e,t){if(1&e&&(w.Sb(0,"fieldset"),w.Sb(1,"legend"),w.Wb(2,65),w.Rb(),w.Sb(3,"div",8),w.Sb(4,"div",14),w.Sb(5,"div",15),w.Nb(6,"input",66),w.Sb(7,"label",67),w.Wb(8,68),w.Rb(),w.Rb(),w.Rb(),w.Rb(),w.Mc(9,_c,10,1,"div",19),w.Mc(10,kc,10,1,"div",19),w.Rb()),2&e){const e=w.ic(2);w.yb(9),w.pc("ngIf",!e.editing&&!e.userForm.getValue("generate_key")),w.yb(1),w.pc("ngIf",!e.editing&&!e.userForm.getValue("generate_key"))}}function wc(e,t){1&e&&(w.Sb(0,"span",92),w.Sb(1,"span",93),w.Wb(2,94),w.Rb(),w.Rb())}const zc=function(e){return[e]};function Ic(e,t){if(1&e){const e=w.Tb();w.Sb(0,"span"),w.Sb(1,"div",71),w.Sb(2,"div",95),w.Sb(3,"span",96),w.Nb(4,"i"),w.Rb(),w.Rb(),w.Nb(5,"input",97),w.Sb(6,"div",98),w.Sb(7,"span",96),w.Nb(8,"i"),w.Rb(),w.Rb(),w.Nb(9,"input",97),w.Sb(10,"span",73),w.Sb(11,"button",99),w.Yb(12,100),w.gc("click",(function(){w.Dc(e);const c=t.index;return w.ic(3).showSubuserModal(c)})),w.Nb(13,"i",89),w.Rb(),w.Sb(14,"button",101),w.Yb(15,102),w.gc("click",(function(){w.Dc(e);const c=t.index;return w.ic(3).deleteSubuser(c)})),w.Nb(16,"i",89),w.Rb(),w.Rb(),w.Rb(),w.Nb(17,"span",93),w.Rb()}if(2&e){const e=t.$implicit,c=w.ic(3);w.yb(4),w.Ab(c.icons.user),w.yb(1),w.qc("value",e.id),w.yb(3),w.Ab(c.icons.share),w.yb(1),w.qc("value","full-control"===e.permissions?"full":e.permissions),w.yb(4),w.pc("ngClass",w.uc(10,zc,c.icons.edit)),w.yb(3),w.pc("ngClass",w.uc(12,zc,c.icons.destroy))}}function xc(e,t){if(1&e){const e=w.Tb();w.Sb(0,"fieldset"),w.Sb(1,"legend"),w.Wb(2,83),w.Rb(),w.Sb(3,"div",84),w.Sb(4,"div",14),w.Mc(5,wc,3,0,"span",85),w.Mc(6,Ic,18,14,"span",86),w.Sb(7,"div",84),w.Sb(8,"div",87),w.Sb(9,"button",88),w.gc("click",(function(){return w.Dc(e),w.ic(2).showSubuserModal()})),w.Nb(10,"i",89),w.Qb(11),w.Wb(12,90),w.jc(13,"titlecase"),w.jc(14,"upperFirst"),w.Pb(),w.Rb(),w.Rb(),w.Rb(),w.Nb(15,"span",91),w.Rb(),w.Rb(),w.Rb()}if(2&e){const e=w.ic(2);w.yb(5),w.pc("ngIf",0===e.subusers.length),w.yb(1),w.pc("ngForOf",e.subusers),w.yb(4),w.pc("ngClass",w.uc(9,zc,e.icons.add)),w.yb(4),w.ac(w.kc(13,5,e.actionLabels.CREATE))(w.kc(14,7,e.subuserLabel)),w.Xb(12)}}function Mc(e,t){1&e&&(w.Sb(0,"span",92),w.Sb(1,"span",93),w.Wb(2,108),w.Rb(),w.Rb())}function $c(e,t){if(1&e){const e=w.Tb();w.Sb(0,"span"),w.Sb(1,"div",71),w.Sb(2,"div",95),w.Sb(3,"div",96),w.Nb(4,"i"),w.Rb(),w.Rb(),w.Nb(5,"input",97),w.Sb(6,"span",73),w.Sb(7,"button",109),w.Yb(8,110),w.gc("click",(function(){w.Dc(e);const c=t.index;return w.ic(3).showS3KeyModal(c)})),w.Nb(9,"i",89),w.Rb(),w.Sb(10,"button",111),w.Yb(11,112),w.gc("click",(function(){w.Dc(e);const c=t.index;return w.ic(3).deleteS3Key(c)})),w.Nb(12,"i",89),w.Rb(),w.Rb(),w.Rb(),w.Nb(13,"span",93),w.Rb()}if(2&e){const e=t.$implicit,c=w.ic(3);w.yb(4),w.Ab(c.icons.key),w.yb(1),w.qc("value",e.user),w.yb(4),w.pc("ngClass",w.uc(6,zc,c.icons.show)),w.yb(3),w.pc("ngClass",w.uc(8,zc,c.icons.destroy))}}function qc(e,t){1&e&&(w.Sb(0,"span",92),w.Sb(1,"span",93),w.Wb(2,113),w.Rb(),w.Rb())}function Nc(e,t){if(1&e){const e=w.Tb();w.Sb(0,"span"),w.Sb(1,"div",71),w.Sb(2,"div",95),w.Sb(3,"span",96),w.Nb(4,"i"),w.Rb(),w.Rb(),w.Nb(5,"input",97),w.Sb(6,"span",73),w.Sb(7,"button",114),w.Yb(8,115),w.gc("click",(function(){w.Dc(e);const c=t.index;return w.ic(3).showSwiftKeyModal(c)})),w.Nb(9,"i",89),w.Rb(),w.Rb(),w.Rb(),w.Nb(10,"span",93),w.Rb()}if(2&e){const e=t.$implicit,c=w.ic(3);w.yb(4),w.Ab(c.icons.key),w.yb(1),w.qc("value",e.user),w.yb(4),w.pc("ngClass",w.uc(5,zc,c.icons.show))}}function Tc(e,t){if(1&e){const e=w.Tb();w.Sb(0,"fieldset"),w.Sb(1,"legend"),w.Wb(2,103),w.Rb(),w.Sb(3,"div",8),w.Sb(4,"label",61),w.Wb(5,104),w.Rb(),w.Sb(6,"div",11),w.Mc(7,Mc,3,0,"span",85),w.Mc(8,$c,14,10,"span",86),w.Sb(9,"div",84),w.Sb(10,"div",87),w.Sb(11,"button",105),w.gc("click",(function(){return w.Dc(e),w.ic(2).showS3KeyModal()})),w.Nb(12,"i",89),w.Qb(13),w.Wb(14,106),w.jc(15,"titlecase"),w.jc(16,"upperFirst"),w.Pb(),w.Rb(),w.Rb(),w.Rb(),w.Nb(17,"span",91),w.Rb(),w.Nb(18,"hr"),w.Rb(),w.Sb(19,"div",8),w.Sb(20,"label",61),w.Wb(21,107),w.Rb(),w.Sb(22,"div",11),w.Mc(23,qc,3,0,"span",85),w.Mc(24,Nc,11,7,"span",86),w.Rb(),w.Rb(),w.Rb()}if(2&e){const e=w.ic(2);w.yb(7),w.pc("ngIf",0===e.s3Keys.length),w.yb(1),w.pc("ngForOf",e.s3Keys),w.yb(4),w.pc("ngClass",w.uc(11,zc,e.icons.add)),w.yb(4),w.ac(w.kc(15,7,e.actionLabels.CREATE))(w.kc(16,9,e.s3keyLabel)),w.Xb(14),w.yb(7),w.pc("ngIf",0===e.swiftKeys.length),w.yb(1),w.pc("ngForOf",e.swiftKeys)}}function Ec(e,t){1&e&&(w.Sb(0,"span",92),w.Sb(1,"span",93),w.Wb(2,120),w.Rb(),w.Rb())}function Ac(e,t){if(1&e){const e=w.Tb();w.Sb(0,"span"),w.Sb(1,"div",71),w.Sb(2,"span",95),w.Sb(3,"div",96),w.Nb(4,"i"),w.Rb(),w.Rb(),w.Nb(5,"input",97),w.Sb(6,"span",73),w.Sb(7,"button",121),w.Yb(8,122),w.gc("click",(function(){w.Dc(e);const c=t.index;return w.ic(3).showCapabilityModal(c)})),w.Nb(9,"i",89),w.Rb(),w.Sb(10,"button",123),w.Yb(11,124),w.gc("click",(function(){w.Dc(e);const c=t.index;return w.ic(3).deleteCapability(c)})),w.Nb(12,"i",89),w.Rb(),w.Rb(),w.Rb(),w.Nb(13,"span",93),w.Rb()}if(2&e){const e=t.$implicit,c=w.ic(3);w.yb(4),w.Ab(c.icons.share),w.yb(1),w.sc("value","",e.type,":",e.perm,""),w.yb(4),w.pc("ngClass",w.uc(7,zc,c.icons.edit)),w.yb(3),w.pc("ngClass",w.uc(9,zc,c.icons.destroy))}}function Cc(e,t){if(1&e){const e=w.Tb();w.Sb(0,"fieldset"),w.Sb(1,"legend"),w.Wb(2,116),w.Rb(),w.Sb(3,"div",8),w.Sb(4,"div",14),w.Mc(5,Ec,3,0,"span",85),w.Mc(6,Ac,14,11,"span",86),w.Sb(7,"div",84),w.Sb(8,"div",87),w.Sb(9,"button",117),w.Yb(10,118),w.gc("click",(function(){return w.Dc(e),w.ic(2).showCapabilityModal()})),w.jc(11,"pipeFunction"),w.jc(12,"pipeFunction"),w.Nb(13,"i",89),w.Qb(14),w.Wb(15,119),w.jc(16,"titlecase"),w.jc(17,"upperFirst"),w.Pb(),w.Rb(),w.Rb(),w.Rb(),w.Nb(18,"span",91),w.Rb(),w.Rb(),w.Rb()}if(2&e){const e=w.ic(2);w.yb(5),w.pc("ngIf",0===e.capabilities.length),w.yb(1),w.pc("ngForOf",e.capabilities),w.yb(3),w.pc("disabled",w.lc(11,7,e.capabilities,e.hasAllCapabilities))("disableTooltip",!w.lc(12,10,e.capabilities,e.hasAllCapabilities)),w.yb(4),w.pc("ngClass",w.uc(17,zc,e.icons.add)),w.yb(4),w.ac(w.kc(16,13,e.actionLabels.ADD))(w.kc(17,15,e.capabilityLabel)),w.Xb(15)}}function Fc(e,t){1&e&&(w.Sb(0,"div",8),w.Sb(1,"div",14),w.Sb(2,"div",15),w.Nb(3,"input",125),w.Sb(4,"label",126),w.Wb(5,127),w.Rb(),w.Rb(),w.Rb(),w.Rb())}function Wc(e,t){1&e&&(w.Sb(0,"span",49),w.Wb(1,131),w.Rb())}function Oc(e,t){1&e&&(w.Sb(0,"span",49),w.Wb(1,132),w.Rb())}function Dc(e,t){if(1&e&&(w.Sb(0,"div",8),w.Sb(1,"label",128),w.Wb(2,129),w.Rb(),w.Sb(3,"div",11),w.Nb(4,"input",130),w.Mc(5,Wc,2,0,"span",13),w.Mc(6,Oc,2,0,"span",13),w.Rb(),w.Rb()),2&e){w.ic();const e=w.Ac(2),t=w.ic();w.yb(5),w.pc("ngIf",t.userForm.showError("user_quota_max_size",e,"required")),w.yb(1),w.pc("ngIf",t.userForm.showError("user_quota_max_size",e,"quotaMaxSize"))}}function jc(e,t){1&e&&(w.Sb(0,"div",8),w.Sb(1,"div",14),w.Sb(2,"div",15),w.Nb(3,"input",133),w.Sb(4,"label",134),w.Wb(5,135),w.Rb(),w.Rb(),w.Rb(),w.Rb())}function Pc(e,t){1&e&&(w.Sb(0,"span",49),w.Wb(1,139),w.Rb())}function Vc(e,t){1&e&&(w.Sb(0,"span",49),w.Wb(1,140),w.Rb())}function Bc(e,t){if(1&e&&(w.Sb(0,"div",8),w.Sb(1,"label",136),w.Wb(2,137),w.Rb(),w.Sb(3,"div",11),w.Nb(4,"input",138),w.Mc(5,Pc,2,0,"span",13),w.Mc(6,Vc,2,0,"span",13),w.Rb(),w.Rb()),2&e){w.ic();const e=w.Ac(2),t=w.ic();w.yb(5),w.pc("ngIf",t.userForm.showError("user_quota_max_objects",e,"required")),w.yb(1),w.pc("ngIf",t.userForm.showError("user_quota_max_objects",e,"min"))}}function Lc(e,t){1&e&&(w.Sb(0,"div",8),w.Sb(1,"div",14),w.Sb(2,"div",15),w.Nb(3,"input",141),w.Sb(4,"label",142),w.Wb(5,143),w.Rb(),w.Rb(),w.Rb(),w.Rb())}function Uc(e,t){1&e&&(w.Sb(0,"span",49),w.Wb(1,147),w.Rb())}function Gc(e,t){1&e&&(w.Sb(0,"span",49),w.Wb(1,148),w.Rb())}function Kc(e,t){if(1&e&&(w.Sb(0,"div",8),w.Sb(1,"label",144),w.Wb(2,145),w.Rb(),w.Sb(3,"div",11),w.Nb(4,"input",146),w.Mc(5,Uc,2,0,"span",13),w.Mc(6,Gc,2,0,"span",13),w.Rb(),w.Rb()),2&e){w.ic();const e=w.Ac(2),t=w.ic();w.yb(5),w.pc("ngIf",t.userForm.showError("bucket_quota_max_size",e,"required")),w.yb(1),w.pc("ngIf",t.userForm.showError("bucket_quota_max_size",e,"quotaMaxSize"))}}function Qc(e,t){1&e&&(w.Sb(0,"div",8),w.Sb(1,"div",14),w.Sb(2,"div",15),w.Nb(3,"input",149),w.Sb(4,"label",150),w.Wb(5,151),w.Rb(),w.Rb(),w.Rb(),w.Rb())}function Jc(e,t){1&e&&(w.Sb(0,"span",49),w.Wb(1,155),w.Rb())}function Zc(e,t){1&e&&(w.Sb(0,"span",49),w.Wb(1,156),w.Rb())}function Xc(e,t){if(1&e&&(w.Sb(0,"div",8),w.Sb(1,"label",152),w.Wb(2,153),w.Rb(),w.Sb(3,"div",11),w.Nb(4,"input",154),w.Mc(5,Jc,2,0,"span",13),w.Mc(6,Zc,2,0,"span",13),w.Rb(),w.Rb()),2&e){w.ic();const e=w.Ac(2),t=w.ic();w.yb(5),w.pc("ngIf",t.userForm.showError("bucket_quota_max_objects",e,"required")),w.yb(1),w.pc("ngIf",t.userForm.showError("bucket_quota_max_objects",e,"min"))}}const Yc=function(e){return{required:e}};function Hc(e,t){if(1&e){const e=w.Tb();w.Sb(0,"div",1),w.Sb(1,"form",2,3),w.Sb(3,"div",4),w.Sb(4,"div",5),w.Wb(5,6),w.jc(6,"titlecase"),w.jc(7,"upperFirst"),w.Rb(),w.Sb(8,"div",7),w.Sb(9,"div",8),w.Sb(10,"label",9),w.Wb(11,10),w.Rb(),w.Sb(12,"div",11),w.Nb(13,"input",12),w.Mc(14,oc,2,0,"span",13),w.Mc(15,nc,2,0,"span",13),w.Mc(16,rc,2,0,"span",13),w.Rb(),w.Rb(),w.Sb(17,"div",8),w.Sb(18,"div",14),w.Sb(19,"div",15),w.Sb(20,"input",16),w.gc("click",(function(){return w.Dc(e),w.ic().updateFieldsWhenTenanted()})),w.Rb(),w.Sb(21,"label",17),w.Wb(22,18),w.Rb(),w.Rb(),w.Rb(),w.Rb(),w.Mc(23,dc,7,3,"div",19),w.Sb(24,"div",8),w.Sb(25,"label",20),w.Wb(26,21),w.Rb(),w.Sb(27,"div",11),w.Nb(28,"input",22),w.Mc(29,fc,2,0,"span",13),w.Rb(),w.Rb(),w.Sb(30,"div",8),w.Sb(31,"label",23),w.Wb(32,24),w.Rb(),w.Sb(33,"div",11),w.Nb(34,"input",25),w.Mc(35,mc,2,0,"span",13),w.Mc(36,pc,2,0,"span",13),w.Rb(),w.Rb(),w.Sb(37,"div",8),w.Sb(38,"label",26),w.Wb(39,27),w.Rb(),w.Sb(40,"div",11),w.Sb(41,"select",28),w.gc("change",(function(t){return w.Dc(e),w.ic().onMaxBucketsModeChange(t.target.value)})),w.Sb(42,"option",29),w.Wb(43,30),w.Rb(),w.Sb(44,"option",31),w.Wb(45,32),w.Rb(),w.Sb(46,"option",33),w.Wb(47,34),w.Rb(),w.Rb(),w.Rb(),w.Rb(),w.Mc(48,yc,6,2,"div",19),w.Sb(49,"div",8),w.Sb(50,"div",14),w.Sb(51,"div",15),w.Nb(52,"input",35),w.Sb(53,"label",36),w.Wb(54,37),w.Rb(),w.Rb(),w.Rb(),w.Rb(),w.Mc(55,vc,11,2,"fieldset",38),w.Mc(56,xc,16,11,"fieldset",38),w.Mc(57,Tc,25,13,"fieldset",38),w.Mc(58,Cc,19,19,"fieldset",38),w.Sb(59,"fieldset"),w.Sb(60,"legend"),w.Wb(61,39),w.Rb(),w.Sb(62,"div",8),w.Sb(63,"div",14),w.Sb(64,"div",15),w.Nb(65,"input",40),w.Sb(66,"label",41),w.Wb(67,42),w.Rb(),w.Rb(),w.Rb(),w.Rb(),w.Mc(68,Fc,6,0,"div",19),w.Mc(69,Dc,7,2,"div",19),w.Mc(70,jc,6,0,"div",19),w.Mc(71,Bc,7,2,"div",19),w.Rb(),w.Sb(72,"fieldset"),w.Sb(73,"legend"),w.Wb(74,43),w.Rb(),w.Sb(75,"div",8),w.Sb(76,"div",14),w.Sb(77,"div",15),w.Nb(78,"input",44),w.Sb(79,"label",45),w.Wb(80,46),w.Rb(),w.Rb(),w.Rb(),w.Rb(),w.Mc(81,Lc,6,0,"div",19),w.Mc(82,Kc,7,2,"div",19),w.Mc(83,Qc,6,0,"div",19),w.Mc(84,Xc,7,2,"div",19),w.Rb(),w.Rb(),w.Sb(85,"div",47),w.Sb(86,"cd-form-button-panel",48),w.gc("submitActionEvent",(function(){return w.Dc(e),w.ic().onSubmit()})),w.jc(87,"titlecase"),w.jc(88,"upperFirst"),w.Rb(),w.Rb(),w.Rb(),w.Rb(),w.Rb()}if(2&e){const e=w.Ac(2),t=w.ic();w.yb(1),w.pc("formGroup",t.userForm),w.yb(6),w.ac(w.kc(6,29,t.action))(w.kc(7,31,t.resource)),w.Xb(5),w.yb(3),w.pc("ngClass",w.uc(37,Yc,!t.editing)),w.yb(3),w.pc("readonly",t.editing),w.yb(1),w.pc("ngIf",t.userForm.showError("user_id",e,"required")),w.yb(1),w.pc("ngIf",t.userForm.showError("user_id",e,"pattern")),w.yb(1),w.pc("ngIf",!t.userForm.getValue("show_tenant")&&t.userForm.showError("user_id",e,"notUnique")),w.yb(4),w.pc("readonly",!0),w.yb(3),w.pc("ngIf",t.userForm.getValue("show_tenant")),w.yb(2),w.pc("ngClass",w.uc(39,Yc,!t.editing)),w.yb(4),w.pc("ngIf",t.userForm.showError("display_name",e,"required")),w.yb(6),w.pc("ngIf",t.userForm.showError("email",e,"email")),w.yb(1),w.pc("ngIf",t.userForm.showError("email",e,"notUnique")),w.yb(12),w.pc("ngIf",1==t.userForm.get("max_buckets_mode").value),w.yb(7),w.pc("ngIf",!t.editing),w.yb(1),w.pc("ngIf",t.editing),w.yb(1),w.pc("ngIf",t.editing),w.yb(1),w.pc("ngIf",t.editing),w.yb(10),w.pc("ngIf",t.userForm.controls.user_quota_enabled.value),w.yb(1),w.pc("ngIf",t.userForm.controls.user_quota_enabled.value&&!t.userForm.getValue("user_quota_max_size_unlimited")),w.yb(1),w.pc("ngIf",t.userForm.controls.user_quota_enabled.value),w.yb(1),w.pc("ngIf",t.userForm.controls.user_quota_enabled.value&&!t.userForm.getValue("user_quota_max_objects_unlimited")),w.yb(10),w.pc("ngIf",t.userForm.controls.bucket_quota_enabled.value),w.yb(1),w.pc("ngIf",t.userForm.controls.bucket_quota_enabled.value&&!t.userForm.getValue("bucket_quota_max_size_unlimited")),w.yb(1),w.pc("ngIf",t.userForm.controls.bucket_quota_enabled.value),w.yb(1),w.pc("ngIf",t.userForm.controls.bucket_quota_enabled.value&&!t.userForm.getValue("bucket_quota_max_objects_unlimited")),w.yb(2),w.pc("form",t.userForm)("submitText",w.kc(87,33,t.action)+" "+w.kc(88,35,t.resource))}}let ea=(()=>{class e extends q.a{constructor(e,t,c,a,i,s,b){super(),this.formBuilder=e,this.route=t,this.router=c,this.rgwUserService=a,this.modalService=i,this.notificationService=s,this.actionLabels=b,this.editing=!1,this.submitObservables=[],this.icons=M.a,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/"+n.e.EDIT),this.action=this.editing?this.actionLabels.EDIT:this.actionLabels.CREATE,this.createForm()}createForm(){this.userForm=this.formBuilder.group({user_id:[null,[i.A.required,i.A.pattern(/^[a-zA-Z0-9!@#%^&*()_-]+$/)],this.editing?[]:[T.a.unique(this.rgwUserService.exists,this.rgwUserService,()=>this.userForm.getValue("tenant"))]],show_tenant:[this.editing],tenant:[null,[i.A.pattern(/^[a-zA-Z0-9!@#%^&*()_-]+$/)],this.editing?[]:[T.a.unique(this.rgwUserService.exists,this.rgwUserService,()=>this.userForm.getValue("user_id"),!0)]],display_name:[null,[i.A.required]],email:[null,[T.a.email],[T.a.unique(this.rgwUserService.emailExists,this.rgwUserService)]],max_buckets_mode:[1],max_buckets:[1e3,[T.a.requiredIf({max_buckets_mode:"1"}),T.a.number(!1),i.A.min(1)]],suspended:[!1],generate_key:[!0],access_key:[null,[T.a.requiredIf({generate_key:!1})]],secret_key:[null,[T.a.requiredIf({generate_key:!1})]],user_quota_enabled:[!1],user_quota_max_size_unlimited:[!0],user_quota_max_size:[null,[T.a.composeIf({user_quota_enabled:!0,user_quota_max_size_unlimited:!1},[i.A.required,this.quotaMaxSizeValidator])]],user_quota_max_objects_unlimited:[!0],user_quota_max_objects:[null,[i.A.min(0),T.a.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,[T.a.composeIf({bucket_quota_enabled:!0,bucket_quota_max_size_unlimited:!1},[i.A.required,this.quotaMaxSizeValidator])]],bucket_quota_max_objects_unlimited:[!0],bucket_quota_max_objects:[null,[i.A.min(0),T.a.requiredIf({bucket_quota_enabled:!0,bucket_quota_max_objects_unlimited:!1})]]})}ngOnInit(){this.route.params.subscribe(e=>{if(!e.hasOwnProperty("uid"))return void this.loadingReady();const t=decodeURIComponent(e.uid),c=[];c.push(this.rgwUserService.get(t)),c.push(this.rgwUserService.getQuota(t)),Object(f.a)(c).subscribe(e=>{const t=d.a.clone(this.userForm.value);let c=d.a.pick(e[0],d.a.keys(this.userForm.value));switch(c.max_buckets){case-1:c.max_buckets_mode=-1,c.max_buckets="";break;case 0:c.max_buckets_mode=0,c.max_buckets="";break;default:c.max_buckets_mode=1}["user","bucket"].forEach(t=>{const a=e[1][t+"_quota"];c[t+"_quota_enabled"]=a.enabled,a.max_size<0?(c[t+"_quota_max_size_unlimited"]=!0,c[t+"_quota_max_size"]=null):(c[t+"_quota_max_size_unlimited"]=!1,c[t+"_quota_max_size"]=a.max_size+" B"),a.max_objects<0?(c[t+"_quota_max_objects_unlimited"]=!0,c[t+"_quota_max_objects"]=null):(c[t+"_quota_max_objects_unlimited"]=!1,c[t+"_quota_max_objects"]=a.max_objects)}),c=d.a.merge(t,c),this.userForm.setValue(c),this.subusers=e[0].subusers,this.s3Keys=e[0].keys,this.swiftKeys=e[0].swift_keys;const a={"read, write":"*"};e[0].caps.forEach(e=>{e.perm in a&&(e.perm=a[e.perm])}),this.capabilities=e[0].caps,this.loadingReady()},()=>{this.loadingError()})})}goToListView(){this.router.navigate(["/rgw/user"])}onSubmit(){let e;if(this.userForm.pristine)return void this.goToListView();const t=this.getUID();if(this.editing){if(this._isGeneralDirty()){const e=this._getUpdateArgs();this.submitObservables.push(this.rgwUserService.update(t,e))}e="Updated Object Gateway user '" + t + "'"}else{const c=this._getCreateArgs();this.submitObservables.push(this.rgwUserService.create(c)),e="Created Object Gateway user '" + t + "'"}if(this._isUserQuotaDirty()){const e=this._getUserQuotaArgs();this.submitObservables.push(this.rgwUserService.updateQuota(t,e))}if(this._isBucketQuotaDirty()){const e=this._getBucketQuotaArgs();this.submitObservables.push(this.rgwUserService.updateQuota(t,e))}Object(yt.a)(...this.submitObservables).subscribe({error:()=>{this.userForm.setErrors({cdSubmitButton:!0})},complete:()=>{this.notificationService.show($.a.success,e),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(){var e;let t=this.userForm.getValue("user_id");const c=null===(e=this.userForm)||void 0===e?void 0:e.getValue("tenant");return c&&c.length>0&&(t=`${this.userForm.getValue("tenant")}$${t}`),t}quotaMaxSizeValidator(e){return Object(T.b)(e.value)?null:null===RegExp("^(\\d+(\\.\\d+)?)\\s*(B|K(B|iB)?|M(B|iB)?|G(B|iB)?|T(B|iB)?)?$","i").exec(e.value)||(new St.a).toBytes(e.value)<1024?{quotaMaxSize:!0}:null}setSubuser(e,t){const c={"full-control":"full","read-write":"readwrite"},a=this.getUID();this.submitObservables.push(this.rgwUserService.createSubuser(a,{subuser:e.id,access:e.permissions in c?c[e.permissions]:e.permissions,key_type:"swift",secret_key:e.secret_key,generate_secret:e.generate_secret?"true":"false"})),d.a.isNumber(t)?this.subusers[t]=e:(this.subusers.push(e),this.swiftKeys.push({user:e.id,secret_key:e.generate_secret?"Apply your changes first...":e.secret_key})),this.userForm.markAsDirty()}deleteSubuser(e){const t=this.subusers[e];this.submitObservables.push(this.rgwUserService.deleteSubuser(this.getUID(),t.id)),this.s3Keys=this.s3Keys.filter(e=>e.user!==t.id),this.swiftKeys=this.swiftKeys.filter(e=>e.user!==t.id),this.subusers.splice(e,1),this.userForm.markAsDirty()}setCapability(e,t){const c=this.getUID();if(d.a.isNumber(t)){const a=this.capabilities[t];this.submitObservables.push(this.rgwUserService.deleteCapability(c,a.type,a.perm)),this.submitObservables.push(this.rgwUserService.addCapability(c,e.type,e.perm)),this.capabilities[t]=e}else this.submitObservables.push(this.rgwUserService.addCapability(c,e.type,e.perm)),this.capabilities=[...this.capabilities,e];this.userForm.markAsDirty()}deleteCapability(e){const t=this.capabilities[e];this.submitObservables.push(this.rgwUserService.deleteCapability(this.getUID(),t.type,t.perm)),this.capabilities.splice(e,1),this.capabilities=[...this.capabilities],this.userForm.markAsDirty()}hasAllCapabilities(e){return!d.a.difference(Rt.getAll(),d.a.map(e,"type")).length}setS3Key(e,t){if(d.a.isNumber(t));else{const t=e.user.match(/([^:]+)(:(.+))?/),c=t[1],a={subuser:t[2]?t[3]:"",generate_key:e.generate_key?"true":"false"};"false"===a.generate_key&&(d.a.isNil(e.access_key)||(a.access_key=e.access_key),d.a.isNil(e.secret_key)||(a.secret_key=e.secret_key)),this.submitObservables.push(this.rgwUserService.addS3Key(c,a)),this.s3Keys.push({user:e.user,access_key:e.generate_key?"Apply your changes first...":e.access_key,secret_key:e.generate_key?"Apply your changes first...":e.secret_key})}this.userForm.markAsDirty()}deleteS3Key(e){const t=this.s3Keys[e];this.submitObservables.push(this.rgwUserService.deleteS3Key(this.getUID(),t.access_key)),this.s3Keys.splice(e,1),this.userForm.markAsDirty()}showSubuserModal(e){const t=this.getUID(),c=this.modalService.show(ac);if(d.a.isNumber(e)){const a=this.subusers[e];c.componentInstance.setEditing(),c.componentInstance.setValues(t,a.id,a.permissions)}else c.componentInstance.setEditing(!1),c.componentInstance.setValues(t),c.componentInstance.setSubusers(this.subusers);c.componentInstance.submitAction.subscribe(t=>{this.setSubuser(t,e)})}showS3KeyModal(e){const t=this.modalService.show(Gt);if(d.a.isNumber(e)){const c=this.s3Keys[e];t.componentInstance.setViewing(),t.componentInstance.setValues(c.user,c.access_key,c.secret_key)}else{const e=this._getS3KeyUserCandidates();t.componentInstance.setViewing(!1),t.componentInstance.setUserCandidates(e),t.componentInstance.submitAction.subscribe(e=>{this.setS3Key(e)})}}showSwiftKeyModal(e){const t=this.modalService.show(sc),c=this.swiftKeys[e];t.componentInstance.setValues(c.user,c.secret_key)}showCapabilityModal(e){const t=this.modalService.show(Tt);if(d.a.isNumber(e)){const c=this.capabilities[e];t.componentInstance.setEditing(),t.componentInstance.setValues(c.type,c.perm)}else t.componentInstance.setEditing(!1),t.componentInstance.setCapabilities(this.capabilities);t.componentInstance.submitAction.subscribe(t=>{this.setCapability(t,e)})}_isGeneralDirty(){return["display_name","email","max_buckets_mode","max_buckets","suspended"].some(e=>this.userForm.get(e).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(e=>this.userForm.get(e).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(e=>this.userForm.get(e).dirty)}_getCreateArgs(){const e={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:""},t=this.userForm.getValue("email");d.a.isString(t)&&t.length>0&&d.a.merge(e,{email:t}),this.userForm.getValue("generate_key")||d.a.merge(e,{generate_key:!1,access_key:this.userForm.getValue("access_key"),secret_key:this.userForm.getValue("secret_key")});const c=parseInt(this.userForm.getValue("max_buckets_mode"),10);return d.a.includes([-1,0],c)&&d.a.merge(e,{max_buckets:c}),e}_getUpdateArgs(){const e={},t=["display_name","email","max_buckets","suspended"];for(const a of t)e[a]=this.userForm.getValue(a);const c=parseInt(this.userForm.getValue("max_buckets_mode"),10);return d.a.includes([-1,0],c)&&(e.max_buckets=c),e}_getUserQuotaArgs(){const e={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 t=(new St.a).toBytes(this.userForm.getValue("user_quota_max_size"));e.max_size_kb=(t/1024).toFixed(0)}return this.userForm.getValue("user_quota_max_objects_unlimited")||(e.max_objects=this.userForm.getValue("user_quota_max_objects")),e}_getBucketQuotaArgs(){const e={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 t=(new St.a).toBytes(this.userForm.getValue("bucket_quota_max_size"));e.max_size_kb=(t/1024).toFixed(0)}return this.userForm.getValue("bucket_quota_max_objects_unlimited")||(e.max_objects=this.userForm.getValue("bucket_quota_max_objects")),e}_getS3KeyUserCandidates(){let e=[];const t=this.getUID();return d.a.isString(t)&&!d.a.isEmpty(t)&&e.push(t),this.subusers.forEach(t=>{e.push(t.id)}),this.s3Keys.forEach(t=>{e.push(t.user)}),e=d.a.uniq(e),e}onMaxBucketsModeChange(e){"1"===e&&(this.userForm.get("max_buckets").valid||this.userForm.patchValue({max_buckets:1e3}))}}return e.\u0275fac=function(t){return new(t||e)(w.Mb(N.a),w.Mb(s.a),w.Mb(s.e),w.Mb(x.a),w.Mb(Ne.a),w.Mb(E.a),w.Mb(n.b))},e.\u0275cmp=w.Gb({type:e,selectors:[["cd-rgw-user-form"]],features:[w.vb],decls:1,vars:1,consts:function(){return[["class","cd-col-form",4,"cdFormLoading"],[1,"cd-col-form"],["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"card"],[1,"card-header"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"card-body"],[1,"form-group","row"],["for","user_id",1,"cd-col-form-label",3,"ngClass"],"User ID",[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"],"Show Tenant",["class","form-group row",4,"ngIf"],["for","display_name",1,"cd-col-form-label",3,"ngClass"],"Full name",["id","display_name","type","text","formControlName","display_name",1,"form-control"],["for","email",1,"cd-col-form-label"],"Email address",["id","email","type","text","formControlName","email",1,"form-control"],["for","max_buckets_mode",1,"cd-col-form-label"],"Max. buckets",["formControlName","max_buckets_mode","name","max_buckets_mode","id","max_buckets_mode",1,"form-control","custom-select",3,"change"],["value","-1"],"Disabled",["value","0"],"Unlimited",["value","1"],"Custom",["id","suspended","type","checkbox","formControlName","suspended",1,"custom-control-input"],["for","suspended",1,"custom-control-label"],"Suspended",[4,"ngIf"],"User quota",["id","user_quota_enabled","type","checkbox","formControlName","user_quota_enabled",1,"custom-control-input"],["for","user_quota_enabled",1,"custom-control-label"],"Enabled","Bucket quota",["id","bucket_quota_enabled","type","checkbox","formControlName","bucket_quota_enabled",1,"custom-control-input"],["for","bucket_quota_enabled",1,"custom-control-label"],"Enabled",[1,"card-footer"],["wrappingClass","text-right",3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],"This field is required.","The value is not valid.","The chosen user ID is already in use.",["for","tenant",1,"cd-col-form-label"],"Tenant",["id","tenant","type","text","formControlName","tenant","autofocus","",1,"form-control",3,"readonly"],"The value is not valid.","The chosen user ID exists in this tenant.","This field is required.","This is not a valid email address.","The chosen email address is already in use.",[1,"cd-col-form-label"],["id","max_buckets","type","number","formControlName","max_buckets","min","1",1,"form-control"],"This field is required.","The entered value must be >= 1.","S3 key",["id","generate_key","type","checkbox","formControlName","generate_key",1,"custom-control-input"],["for","generate_key",1,"custom-control-label"],"Auto-generate key",["for","access_key",1,"cd-col-form-label","required"],"Access key",[1,"input-group"],["id","access_key","type","password","formControlName","access_key",1,"form-control"],[1,"input-group-append"],["type","button","cdPasswordButton","access_key",1,"btn","btn-light"],["source","access_key"],"This field is required.",["for","secret_key",1,"cd-col-form-label","required"],"Secret key",["id","secret_key","type","password","formControlName","secret_key",1,"form-control"],["type","button","cdPasswordButton","secret_key",1,"btn","btn-light"],["source","secret_key"],"This field is required.","Subusers",[1,"row"],["class","no-border",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"col-12"],["type","button",1,"btn","btn-light","float-right","tc_addSubuserButton",3,"click"],[3,"ngClass"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"help-block"],[1,"no-border"],[1,"form-text","text-muted"],"There are no subusers.",[1,"input-group-prepend"],[1,"input-group-text"],["type","text","readonly","",1,"cd-form-control",3,"value"],[1,"input-group-prepend","border-left-0","border-right-0"],["type","button",1,"btn","btn-light","tc_showSubuserButton",3,"click",6,"ngbTooltip"],["ngbTooltip","Edit"],["type","button",1,"btn","btn-light","tc_deleteSubuserButton",3,"click",6,"ngbTooltip"],["ngbTooltip","Delete"],"Keys","S3",["type","button",1,"btn","btn-light","float-right","tc_addS3KeyButton",3,"click"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "","Swift","There are no keys.",["type","button",1,"btn","btn-light","tc_showS3KeyButton",3,"click",6,"ngbTooltip"],["ngbTooltip","Show"],["type","button",1,"btn","btn-light","tc_deleteS3KeyButton",3,"click",6,"ngbTooltip"],["ngbTooltip","Delete"],"There are no keys.",["type","button",1,"btn","btn-light","tc_showSwiftKeyButton",3,"click",6,"ngbTooltip"],["ngbTooltip","Show"],"Capabilities",["type","button","triggers","pointerenter:pointerleave",1,"btn","btn-light","float-right","tc_addCapButton",3,"disabled","disableTooltip","click",6,"ngbTooltip"],["ngbTooltip","All capabilities are already added."],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "","There are no capabilities.",["type","button",1,"btn","btn-light","tc_editCapButton",3,"click",6,"ngbTooltip"],["ngbTooltip","Edit"],["type","button",1,"btn","btn-light","tc_deleteCapButton",3,"click",6,"ngbTooltip"],["ngbTooltip","Delete"],["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"],"Unlimited size",["for","user_quota_max_size",1,"cd-col-form-label","required"],"Max. size",["id","user_quota_max_size","type","text","formControlName","user_quota_max_size","cdDimlessBinary","",1,"form-control"],"This field is required.","The value is not valid.",["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"],"Unlimited objects",["for","user_quota_max_objects",1,"cd-col-form-label","required"],"Max. objects",["id","user_quota_max_objects","type","number","formControlName","user_quota_max_objects",1,"form-control"],"This field is required.","The entered value must be >= 0.",["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"],"Unlimited size",["for","bucket_quota_max_size",1,"cd-col-form-label","required"],"Max. size",["id","bucket_quota_max_size","type","text","formControlName","bucket_quota_max_size","cdDimlessBinary","",1,"form-control"],"This field is required.","The value is not valid.",["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"],"Unlimited objects",["for","bucket_quota_max_objects",1,"cd-col-form-label","required"],"Max. objects",["id","bucket_quota_max_objects","type","number","formControlName","bucket_quota_max_objects",1,"form-control"],"This field is required.","The entered value must be >= 0."]},template:function(e,t){1&e&&w.Mc(0,Hc,89,41,"div",0),2&e&&w.pc("cdFormLoading",t.loading)},directives:[F.a,i.C,i.r,W.a,i.k,O.a,a.p,D.a,i.d,j.a,i.q,i.i,a.r,i.b,i.z,i.u,i.B,B.a,P.a,i.v,Et.a,At.a,a.q,b.D,bc.a],pipes:[a.A,L.a,o.b],styles:[""]}),e})();var ta=c("x38r"),ca=c("TJUb");const aa=["accessKeyTpl"],ia=["secretKeyTpl"];function sa(e,t){if(1&e&&(w.Sb(0,"tr"),w.Sb(1,"td",15),w.Wb(2,20),w.Rb(),w.Sb(3,"td"),w.Oc(4),w.Rb(),w.Rb()),2&e){const e=w.ic(4);w.yb(4),w.Pc(e.user.email)}}function ba(e,t){if(1&e&&(w.Sb(0,"div"),w.Oc(1),w.Rb()),2&e){const e=t.$implicit;w.yb(1),w.Rc(" ",e.id," (",e.permissions,") ")}}function oa(e,t){if(1&e&&(w.Sb(0,"tr"),w.Sb(1,"td",15),w.Wb(2,21),w.Rb(),w.Sb(3,"td"),w.Mc(4,ba,2,2,"div",22),w.Rb(),w.Rb()),2&e){const e=w.ic(4);w.yb(4),w.pc("ngForOf",e.user.subusers)}}function na(e,t){if(1&e&&(w.Sb(0,"div"),w.Oc(1),w.Rb()),2&e){const e=t.$implicit;w.yb(1),w.Rc(" ",e.type," (",e.perm,") ")}}function ra(e,t){if(1&e&&(w.Sb(0,"tr"),w.Sb(1,"td",15),w.Wb(2,23),w.Rb(),w.Sb(3,"td"),w.Mc(4,na,2,2,"div",22),w.Rb(),w.Rb()),2&e){const e=w.ic(4);w.yb(4),w.pc("ngForOf",e.user.caps)}}function la(e,t){1&e&&(w.Sb(0,"td"),w.Oc(1,"-"),w.Rb())}function ua(e,t){1&e&&(w.Sb(0,"td"),w.Wb(1,28),w.Rb())}function da(e,t){if(1&e&&(w.Sb(0,"td"),w.Oc(1),w.jc(2,"dimlessBinary"),w.Rb()),2&e){const e=w.ic(5);w.yb(1),w.Qc(" ",w.kc(2,1,e.user.user_quota.max_size)," ")}}function fa(e,t){1&e&&(w.Sb(0,"td"),w.Oc(1,"-"),w.Rb())}function ma(e,t){1&e&&(w.Sb(0,"td"),w.Wb(1,29),w.Rb())}function pa(e,t){if(1&e&&(w.Sb(0,"td"),w.Oc(1),w.Rb()),2&e){const e=w.ic(5);w.yb(1),w.Qc(" ",e.user.user_quota.max_objects," ")}}function ga(e,t){if(1&e&&(w.Sb(0,"div"),w.Sb(1,"legend"),w.Wb(2,24),w.Rb(),w.Sb(3,"table",9),w.Sb(4,"tbody"),w.Sb(5,"tr"),w.Sb(6,"td",10),w.Wb(7,25),w.Rb(),w.Sb(8,"td",12),w.Oc(9),w.jc(10,"booleanText"),w.Rb(),w.Rb(),w.Sb(11,"tr"),w.Sb(12,"td",15),w.Wb(13,26),w.Rb(),w.Mc(14,la,2,0,"td",0),w.Mc(15,ua,2,0,"td",0),w.Mc(16,da,3,3,"td",0),w.Rb(),w.Sb(17,"tr"),w.Sb(18,"td",15),w.Wb(19,27),w.Rb(),w.Mc(20,fa,2,0,"td",0),w.Mc(21,ma,2,0,"td",0),w.Mc(22,pa,2,1,"td",0),w.Rb(),w.Rb(),w.Rb(),w.Rb()),2&e){const e=w.ic(4);w.yb(9),w.Pc(w.kc(10,7,e.user.user_quota.enabled)),w.yb(5),w.pc("ngIf",!e.user.user_quota.enabled),w.yb(1),w.pc("ngIf",e.user.user_quota.enabled&&e.user.user_quota.max_size<=-1),w.yb(1),w.pc("ngIf",e.user.user_quota.enabled&&e.user.user_quota.max_size>-1),w.yb(4),w.pc("ngIf",!e.user.user_quota.enabled),w.yb(1),w.pc("ngIf",e.user.user_quota.enabled&&e.user.user_quota.max_objects<=-1),w.yb(1),w.pc("ngIf",e.user.user_quota.enabled&&e.user.user_quota.max_objects>-1)}}function ha(e,t){1&e&&(w.Sb(0,"td"),w.Oc(1,"-"),w.Rb())}function ya(e,t){1&e&&(w.Sb(0,"td"),w.Wb(1,34),w.Rb())}function Sa(e,t){if(1&e&&(w.Sb(0,"td"),w.Oc(1),w.jc(2,"dimlessBinary"),w.Rb()),2&e){const e=w.ic(5);w.yb(1),w.Qc(" ",w.kc(2,1,e.user.bucket_quota.max_size)," ")}}function _a(e,t){1&e&&(w.Sb(0,"td"),w.Oc(1,"-"),w.Rb())}function Ra(e,t){1&e&&(w.Sb(0,"td"),w.Wb(1,35),w.Rb())}function ka(e,t){if(1&e&&(w.Sb(0,"td"),w.Oc(1),w.Rb()),2&e){const e=w.ic(5);w.yb(1),w.Qc(" ",e.user.bucket_quota.max_objects," ")}}function va(e,t){if(1&e&&(w.Sb(0,"div"),w.Sb(1,"legend"),w.Wb(2,30),w.Rb(),w.Sb(3,"table",9),w.Sb(4,"tbody"),w.Sb(5,"tr"),w.Sb(6,"td",10),w.Wb(7,31),w.Rb(),w.Sb(8,"td",12),w.Oc(9),w.jc(10,"booleanText"),w.Rb(),w.Rb(),w.Sb(11,"tr"),w.Sb(12,"td",15),w.Wb(13,32),w.Rb(),w.Mc(14,ha,2,0,"td",0),w.Mc(15,ya,2,0,"td",0),w.Mc(16,Sa,3,3,"td",0),w.Rb(),w.Sb(17,"tr"),w.Sb(18,"td",15),w.Wb(19,33),w.Rb(),w.Mc(20,_a,2,0,"td",0),w.Mc(21,Ra,2,0,"td",0),w.Mc(22,ka,2,1,"td",0),w.Rb(),w.Rb(),w.Rb(),w.Rb()),2&e){const e=w.ic(4);w.yb(9),w.Pc(w.kc(10,7,e.user.bucket_quota.enabled)),w.yb(5),w.pc("ngIf",!e.user.bucket_quota.enabled),w.yb(1),w.pc("ngIf",e.user.bucket_quota.enabled&&e.user.bucket_quota.max_size<=-1),w.yb(1),w.pc("ngIf",e.user.bucket_quota.enabled&&e.user.bucket_quota.max_size>-1),w.yb(4),w.pc("ngIf",!e.user.bucket_quota.enabled),w.yb(1),w.pc("ngIf",e.user.bucket_quota.enabled&&e.user.bucket_quota.max_objects<=-1),w.yb(1),w.pc("ngIf",e.user.bucket_quota.enabled&&e.user.bucket_quota.max_objects>-1)}}function wa(e,t){if(1&e&&(w.Sb(0,"div"),w.Sb(1,"table",9),w.Sb(2,"tbody"),w.Sb(3,"tr"),w.Sb(4,"td",10),w.Wb(5,11),w.Rb(),w.Sb(6,"td",12),w.Oc(7),w.Rb(),w.Rb(),w.Sb(8,"tr"),w.Sb(9,"td",10),w.Wb(10,13),w.Rb(),w.Sb(11,"td",12),w.Oc(12),w.Rb(),w.Rb(),w.Sb(13,"tr"),w.Sb(14,"td",10),w.Wb(15,14),w.Rb(),w.Sb(16,"td",12),w.Oc(17),w.Rb(),w.Rb(),w.Sb(18,"tr"),w.Sb(19,"td",15),w.Wb(20,16),w.Rb(),w.Sb(21,"td"),w.Oc(22),w.Rb(),w.Rb(),w.Mc(23,sa,5,1,"tr",0),w.Sb(24,"tr"),w.Sb(25,"td",15),w.Wb(26,17),w.Rb(),w.Sb(27,"td"),w.Oc(28),w.jc(29,"booleanText"),w.Rb(),w.Rb(),w.Sb(30,"tr"),w.Sb(31,"td",15),w.Wb(32,18),w.Rb(),w.Sb(33,"td"),w.Oc(34),w.jc(35,"booleanText"),w.Rb(),w.Rb(),w.Sb(36,"tr"),w.Sb(37,"td",15),w.Wb(38,19),w.Rb(),w.Sb(39,"td"),w.Oc(40),w.jc(41,"map"),w.Rb(),w.Rb(),w.Mc(42,oa,5,1,"tr",0),w.Mc(43,ra,5,1,"tr",0),w.Rb(),w.Rb(),w.Mc(44,ga,23,9,"div",0),w.Mc(45,va,23,9,"div",0),w.Rb()),2&e){const e=w.ic(3);w.yb(7),w.Pc(e.user.tenant),w.yb(5),w.Pc(e.user.user_id),w.yb(5),w.Pc(e.user.uid),w.yb(5),w.Pc(e.user.display_name),w.yb(1),w.pc("ngIf",null==e.user.email?null:e.user.email.length),w.yb(5),w.Pc(w.kc(29,12,e.user.suspended)),w.yb(6),w.Pc(w.kc(35,14,"true"===e.user.system)),w.yb(6),w.Pc(w.lc(41,16,e.user.max_buckets,e.maxBucketsMap)),w.yb(2),w.pc("ngIf",e.user.subusers&&e.user.subusers.length),w.yb(1),w.pc("ngIf",e.user.caps&&e.user.caps.length),w.yb(1),w.pc("ngIf",e.user.user_quota),w.yb(1),w.pc("ngIf",e.user.bucket_quota)}}function za(e,t){if(1&e&&w.Mc(0,wa,46,19,"div",0),2&e){const e=w.ic(2);w.pc("ngIf",e.user)}}const Ia=function(e){return[e]};function xa(e,t){if(1&e){const e=w.Tb();w.Sb(0,"cd-table",38),w.gc("updateSelection",(function(t){return w.Dc(e),w.ic(3).updateKeysSelection(t)})),w.Sb(1,"div",39),w.Sb(2,"div",40),w.Sb(3,"button",41),w.gc("click",(function(){return w.Dc(e),w.ic(3).showKeyModal()})),w.Nb(4,"i",42),w.Qb(5),w.Wb(6,43),w.Pb(),w.Rb(),w.Rb(),w.Rb(),w.Rb()}if(2&e){const e=w.ic(3);w.pc("data",e.keys)("columns",e.keysColumns),w.yb(3),w.pc("disabled",!e.keysSelection.hasSingleSelection),w.yb(1),w.pc("ngClass",w.uc(4,Ia,e.icons.show))}}function Ma(e,t){1&e&&(w.Sb(0,"li",36),w.Sb(1,"a",4),w.Wb(2,37),w.Rb(),w.Mc(3,xa,7,6,"ng-template",6),w.Rb())}function $a(e,t){if(1&e&&(w.Qb(0),w.Sb(1,"ul",1,2),w.Sb(3,"li",3),w.Sb(4,"a",4),w.Wb(5,5),w.Rb(),w.Mc(6,za,1,1,"ng-template",6),w.Rb(),w.Mc(7,Ma,4,0,"li",7),w.Rb(),w.Nb(8,"div",8),w.Pb()),2&e){const e=w.Ac(2),t=w.ic();w.yb(7),w.pc("ngIf",t.keys.length),w.yb(1),w.pc("ngbNavOutlet",e)}}let qa=(()=>{class e{constructor(e,t){this.rgwUserService=e,this.modalService=t,this.keys=[],this.keysColumns=[],this.keysSelection=new xe.a,this.icons=M.a}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=d.a.sortBy(this.user.subusers,"id"),this.user.caps=d.a.sortBy(this.user.caps,"type"),this.rgwUserService.getQuota(this.user.uid).subscribe(e=>{d.a.extend(this.user,e)}),this.keys=[],this.user.keys&&this.user.keys.forEach(e=>{this.keys.push({id:this.keys.length+1,type:"S3",username:e.user,ref:e})}),this.user.swift_keys&&this.user.swift_keys.forEach(e=>{this.keys.push({id:this.keys.length+1,type:"Swift",username:e.user,ref:e})}),this.keys=d.a.sortBy(this.keys,"user"))}updateKeysSelection(e){this.keysSelection=e}showKeyModal(){const e=this.keysSelection.first(),t=this.modalService.show("S3"===e.type?Gt:sc);switch(e.type){case"S3":t.componentInstance.setViewing(),t.componentInstance.setValues(e.ref.user,e.ref.access_key,e.ref.secret_key);break;case"Swift":t.componentInstance.setValues(e.ref.user,e.ref.secret_key)}}}return e.\u0275fac=function(t){return new(t||e)(w.Mb(x.a),w.Mb(Ne.a))},e.\u0275cmp=w.Gb({type:e,selectors:[["cd-rgw-user-details"]],viewQuery:function(e,t){var c;1&e&&(w.Tc(aa,!0),w.Tc(ia,!0)),2&e&&(w.zc(c=w.hc())&&(t.accessKeyTpl=c.first),w.zc(c=w.hc())&&(t.secretKeyTpl=c.first))},inputs:{selection:"selection"},features:[w.wb],decls:1,vars:1,consts:function(){return[[4,"ngIf"],["ngbNav","","cdStatefulTab","rgw-user-details",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem","details"],["ngbNavLink",""],"Details",["ngbNavContent",""],["ngbNavItem","keys",4,"ngIf"],[3,"ngbNavOutlet"],[1,"table","table-striped","table-bordered"],[1,"bold","w-25"],"Tenant",[1,"w-75"],"User ID","Username",[1,"bold"],"Full name","Suspended","System","Maximum buckets","Email address","Subusers",[4,"ngFor","ngForOf"],"Capabilities","User quota","Enabled","Maximum size","Maximum objects","Unlimited","Unlimited","Bucket quota","Enabled","Maximum size","Maximum objects","Unlimited","Unlimited",["ngbNavItem","keys"],"Keys",["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"],"Show"]},template:function(e,t){1&e&&w.Mc(0,$a,9,2,"ng-container",0),2&e&&w.pc("ngIf",t.selection)},directives:[a.r,b.p,ct.a,b.r,b.s,b.q,b.u,a.q,Ie.a,D.a,a.p],pipes:[Ce.a,ca.a,Me.a],styles:[""]}),e})();const Na=["userSizeTpl"],Ta=["userObjectTpl"];function Ea(e,t){if(1&e&&w.Nb(0,"cd-usage-bar",8),2&e){const e=w.ic().row;w.pc("total",e.user_quota.max_size)("used",e.stats.size_actual)}}function Aa(e,t){1&e&&w.Wb(0,9)}function Ca(e,t){if(1&e&&(w.Mc(0,Ea,1,2,"cd-usage-bar",6),w.Mc(1,Aa,1,0,"ng-template",null,7,w.Nc)),2&e){const e=t.row,c=w.Ac(2);w.pc("ngIf",e.user_quota.max_size>0&&e.user_quota.enabled)("ngIfElse",c)}}function Fa(e,t){if(1&e&&w.Nb(0,"cd-usage-bar",12),2&e){const e=w.ic().row;w.pc("total",e.user_quota.max_objects)("used",e.stats.num_objects)("isBinary",!1)}}function Wa(e,t){1&e&&w.Wb(0,13)}function Oa(e,t){if(1&e&&(w.Mc(0,Fa,1,3,"cd-usage-bar",10),w.Mc(1,Wa,1,0,"ng-template",null,11,w.Nc)),2&e){const e=t.row,c=w.Ac(2);w.pc("ngIf",e.user_quota.max_objects>0&&e.user_quota.enabled)("ngIfElse",c)}}let Da=(()=>{class e extends we.a{constructor(e,t,c,a,i,s){super(s),this.authStorageService=e,this.rgwUserService=t,this.modalService=c,this.urlBuilder=a,this.actionLabels=i,this.ngZone=s,this.columns=[],this.users=[],this.selection=new xe.a}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:ta.a.checkIcon},{name:"Max. buckets",prop:"max_buckets",flexGrow:1,cellTransformation:ta.a.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 e=()=>this.selection.first()&&""+encodeURIComponent(this.selection.first().uid);this.tableActions=[{permission:"create",icon:M.a.add,routerLink:()=>this.urlBuilder.getCreate(),name:this.actionLabels.CREATE,canBePrimary:e=>!e.hasSelection},{permission:"update",icon:M.a.edit,routerLink:()=>this.urlBuilder.getEdit(e()),name:this.actionLabels.EDIT},{permission:"delete",icon:M.a.destroy,click:()=>this.deleteAction(),disable:()=>!this.selection.hasSelection,name:this.actionLabels.DELETE,canBePrimary:e=>e.hasMultiSelection}],this.setTableRefreshTimeout()}getUserList(e){this.setTableRefreshTimeout(),this.rgwUserService.list().subscribe(e=>{this.users=e},()=>{e.error()})}updateSelection(e){this.selection=e}deleteAction(){this.modalService.show(ze.a,{itemDescription:this.selection.hasSingleSelection?"user":"users",itemNames:this.selection.selected.map(e=>e.uid),submitActionObservable:()=>new ve.a(e=>{Object(f.a)(this.selection.selected.map(e=>this.rgwUserService.delete(e.uid))).subscribe({error:t=>{e.error(t),this.table.refreshBtn()},complete:()=>{e.complete(),this.table.refreshBtn()}})})})}}return e.\u0275fac=function(t){return new(t||e)(w.Mb(qe.a),w.Mb(x.a),w.Mb(Ne.a),w.Mb(Te.a),w.Mb(n.b),w.Mb(w.A))},e.\u0275cmp=w.Gb({type:e,selectors:[["cd-rgw-user-list"]],viewQuery:function(e,t){var c;1&e&&(w.Jc(Ie.a,!0),w.Jc(Na,!0),w.Jc(Ta,!0)),2&e&&(w.zc(c=w.hc())&&(t.table=c.first),w.zc(c=w.hc())&&(t.userSizeTpl=c.first),w.zc(c=w.hc())&&(t.userObjectTpl=c.first))},features:[w.xb([{provide:Te.a,useValue:new Te.a("rgw/user")}]),w.vb],decls:8,vars:9,consts:function(){return[["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"],"No Limit",[3,"total","used","isBinary",4,"ngIf","ngIfElse"],["noObjectQuota",""],[3,"total","used","isBinary"],"No Limit"]},template:function(e,t){1&e&&(w.Sb(0,"cd-table",0,1),w.gc("setExpandedRow",(function(e){return t.setExpandedRow(e)}))("updateSelection",(function(e){return t.updateSelection(e)}))("fetchData",(function(e){return t.getUserList(e)})),w.Nb(2,"cd-table-actions",2),w.Nb(3,"cd-rgw-user-details",3),w.Rb(),w.Mc(4,Ca,3,2,"ng-template",null,4,w.Nc),w.Mc(6,Oa,3,2,"ng-template",null,5,w.Nc)),2&e&&(w.pc("autoReload",!1)("data",t.users)("columns",t.columns)("hasDetails",!0)("status",t.tableStatus),w.yb(2),w.pc("permission",t.permission)("selection",t.selection)("tableActions",t.tableActions),w.yb(1),w.pc("selection",t.expandedRow))},directives:[Ie.a,Ee.a,qa,a.r,Le.a],styles:[""]}),e})(),ja=(()=>{class e{}return e.\u0275mod=w.Kb({type:e}),e.\u0275inj=w.Jb({factory:function(t){return new(t||e)},imports:[[a.c,r.a,i.m,i.x,l.a,b.t,s.i,b.F,o.a]]}),e})();const Pa=[{path:""},{path:"daemon",component:ht,data:{breadcrumbs:"Daemons"}},{path:"user",data:{breadcrumbs:"Users"},children:[{path:"",component:Da},{path:n.e.CREATE,component:ea,data:{breadcrumbs:n.a.CREATE}},{path:n.e.EDIT+"/:uid",component:ea,data:{breadcrumbs:n.a.EDIT}}]},{path:"bucket",data:{breadcrumbs:"Buckets"},children:[{path:"",component:He},{path:n.e.CREATE,component:ke,data:{breadcrumbs:n.a.CREATE}},{path:n.e.EDIT+"/:bid",component:ke,data:{breadcrumbs:n.a.EDIT}}]}];let Va=(()=>{class e{}return e.\u0275mod=w.Kb({type:e}),e.\u0275inj=w.Jb({factory:function(t){return new(t||e)},imports:[[ja,s.i.forChild(Pa)]]}),e})()}}]);
\ No newline at end of file