summaryrefslogtreecommitdiffstats
path: root/src/pybind/mgr/dashboard/frontend/dist/en-US/281.0d0cd268ddc6a6760dd4.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
commit19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch)
tree42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /src/pybind/mgr/dashboard/frontend/dist/en-US/281.0d0cd268ddc6a6760dd4.js
parentInitial commit. (diff)
downloadceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.tar.xz
ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.zip
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/pybind/mgr/dashboard/frontend/dist/en-US/281.0d0cd268ddc6a6760dd4.js')
-rw-r--r--src/pybind/mgr/dashboard/frontend/dist/en-US/281.0d0cd268ddc6a6760dd4.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pybind/mgr/dashboard/frontend/dist/en-US/281.0d0cd268ddc6a6760dd4.js b/src/pybind/mgr/dashboard/frontend/dist/en-US/281.0d0cd268ddc6a6760dd4.js
new file mode 100644
index 000000000..84a069270
--- /dev/null
+++ b/src/pybind/mgr/dashboard/frontend/dist/en-US/281.0d0cd268ddc6a6760dd4.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkceph_dashboard=self.webpackChunkceph_dashboard||[]).push([[281],{59281:(si,Oe,r)=>{r.r(Oe),r.d(Oe,{RgwModule:()=>e_,RoutedRgwModule:()=>ii});var f=r(12057),a=r(24751),w=r(6283),M=r(38549),Ue=r(37496),A=r(79512),N_=r(44466),O_=r(66265),U_=r(23815),u=r.n(U_),Y=r(35758),Me=r(95152),We=r(33394),Ze=r(64762),$e=r(58497),me=r(25917),he=r(19773),W_=r(96736),Z_=r(5304),ge=r(20523),$_=r(93523),e=r(74788);let O=class{constructor(o,_){this.http=o,this.rgwDaemonService=_,this.url="api/rgw/user"}list(){return this.enumerate().pipe((0,he.zg)(o=>o.length>0?(0,Y.D)(o.map(_=>this.get(_))):(0,me.of)([])))}enumerate(){return this.rgwDaemonService.request(o=>this.http.get(this.url,{params:o}))}enumerateEmail(){return this.rgwDaemonService.request(o=>this.http.get(`${this.url}/get_emails`,{params:o}))}get(o){return this.rgwDaemonService.request(_=>this.http.get(`${this.url}/${o}`,{params:_}))}getQuota(o){return this.rgwDaemonService.request(_=>this.http.get(`${this.url}/${o}/quota`,{params:_}))}create(o){return this.rgwDaemonService.request(_=>(u().keys(o).forEach(n=>{_=_.append(n,o[n])}),this.http.post(this.url,null,{params:_})))}update(o,_){return this.rgwDaemonService.request(n=>(u().keys(_).forEach(i=>{n=n.append(i,_[i])}),this.http.put(`${this.url}/${o}`,null,{params:n})))}updateQuota(o,_){return this.rgwDaemonService.request(n=>(u().keys(_).forEach(i=>{n=n.append(i,_[i])}),this.http.put(`${this.url}/${o}/quota`,null,{params:n})))}delete(o){return this.rgwDaemonService.request(_=>this.http.delete(`${this.url}/${o}`,{params:_}))}createSubuser(o,_){return this.rgwDaemonService.request(n=>(u().keys(_).forEach(i=>{n=n.append(i,_[i])}),this.http.post(`${this.url}/${o}/subuser`,null,{params:n})))}deleteSubuser(o,_){return this.rgwDaemonService.request(n=>this.http.delete(`${this.url}/${o}/subuser/${_}`,{params:n}))}addCapability(o,_,n){return this.rgwDaemonService.request(i=>(i=(i=i.append("type",_)).append("perm",n),this.http.post(`${this.url}/${o}/capability`,null,{params:i})))}deleteCapability(o,_,n){return this.rgwDaemonService.request(i=>(i=(i=i.append("type",_)).append("perm",n),this.http.delete(`${this.url}/${o}/capability`,{params:i})))}addS3Key(o,_){return this.rgwDaemonService.request(n=>(n=n.append("key_type","s3"),u().keys(_).forEach(i=>{n=n.append(i,_[i])}),this.http.post(`${this.url}/${o}/key`,null,{params:n})))}deleteS3Key(o,_){return this.rgwDaemonService.request(n=>(n=(n=n.append("key_type","s3")).append("access_key",_),this.http.delete(`${this.url}/${o}/key`,{params:n})))}exists(o){return this.get(o).pipe((0,W_.h)(!0),(0,Z_.K)(_=>(u().isFunction(_.preventDefault)&&_.preventDefault(),(0,me.of)(!1))))}emailExists(o){return o=decodeURIComponent(o),this.enumerateEmail().pipe((0,he.zg)(_=>{const n=u().indexOf(_,o);return(0,me.of)(-1!==n)}))}};O.\u0275fac=function(o){return new(o||O)(e.LFG($e.eN),e.LFG(ge.b))},O.\u0275prov=e.Yz7({token:O,factory:O.\u0275fac,providedIn:"root"}),O=(0,Ze.gn)([$_.o,(0,Ze.w6)("design:paramtypes",[$e.eN,ge.b])],O);var D=r(65862),Ae=r(18001),Ie=r(93614),m=r(77205),ve=r(97161),k=(()=>{return(t=k||(k={})).ENABLED="Enabled",t.DISABLED="Disabled",k;var t})(),B=(()=>{return(t=B||(B={})).ENABLED="Enabled",t.SUSPENDED="Suspended",B;var t})(),J=r(62862),Fe=r(63622),V=r(41582),H=r(56310),q=r(87925),X=r(94276),j=r(82945),h_=r(18372),ee=r(30839),K=r(10545);function I_(t,o){1&t&&(e.TgZ(0,"div",9),e.TgZ(1,"label",35),e.SDv(2,36),e.qZA(),e.TgZ(3,"div",12),e._UZ(4,"input",37),e.qZA(),e.qZA())}function v_(t,o){1&t&&(e.TgZ(0,"span",38),e.SDv(1,39),e.qZA())}function F_(t,o){1&t&&(e.TgZ(0,"span",38),e.SDv(1,40),e.qZA())}function L_(t,o){1&t&&(e.TgZ(0,"span",38),e.SDv(1,41),e.qZA())}function D_(t,o){1&t&&(e.TgZ(0,"span",38),e.SDv(1,42),e.qZA())}function x_(t,o){1&t&&(e.TgZ(0,"span",38),e.SDv(1,43),e.qZA())}function y_(t,o){1&t&&(e.TgZ(0,"span",38),e.SDv(1,44),e.qZA())}function q_(t,o){1&t&&(e.TgZ(0,"span",38),e.SDv(1,45),e.qZA())}function w_(t,o){1&t&&(e.TgZ(0,"span",38),e.SDv(1,46),e.qZA())}function k_(t,o){1&t&&(e.TgZ(0,"option",47),e.SDv(1,48),e.qZA()),2&t&&e.Q6J("ngValue",null)}function B_(t,o){1&t&&(e.TgZ(0,"option",47),e.SDv(1,49),e.qZA()),2&t&&e.Q6J("ngValue",null)}function H_(t,o){if(1&t&&(e.TgZ(0,"option",50),e._uU(1),e.qZA()),2&t){const _=o.$implicit;e.Q6J("value",_),e.xp6(1),e.Oqu(_)}}function X_(t,o){1&t&&(e.TgZ(0,"span",38),e.SDv(1,51),e.qZA())}function K_(t,o){1&t&&(e.TgZ(0,"option",47),e.SDv(1,53),e.qZA()),2&t&&e.Q6J("ngValue",null)}function z_(t,o){1&t&&(e.TgZ(0,"option",47),e.SDv(1,54),e.qZA()),2&t&&e.Q6J("ngValue",null)}function Q_(t,o){if(1&t&&(e.TgZ(0,"option",50),e._uU(1),e.qZA()),2&t){const _=o.$implicit;e.Q6J("value",_.name),e.xp6(1),e.Oqu(_.description)}}function Y_(t,o){1&t&&(e.TgZ(0,"span",38),e.SDv(1,55),e.qZA())}function J_(t,o){if(1&t&&(e.TgZ(0,"select",52),e.YNc(1,K_,2,1,"option",18),e.YNc(2,z_,2,1,"option",18),e.YNc(3,Q_,2,2,"option",19),e.qZA(),e.YNc(4,Y_,2,0,"span",14)),2&t){e.oxw();const _=e.MAs(2),n=e.oxw();e.xp6(1),e.Q6J("ngIf",null===n.placementTargets),e.xp6(1),e.Q6J("ngIf",null!==n.placementTargets),e.xp6(1),e.Q6J("ngForOf",n.placementTargets),e.xp6(1),e.Q6J("ngIf",n.bucketForm.showError("placement-target",_,"required"))}}function V_(t,o){1&t&&(e.ynx(0),e._UZ(1,"input",56),e.BQk())}function j_(t,o){if(1&t){const _=e.EpF();e.TgZ(0,"fieldset"),e.TgZ(1,"legend",25),e.SDv(2,57),e.qZA(),e.TgZ(3,"div",9),e.TgZ(4,"div",27),e.TgZ(5,"div",28),e.TgZ(6,"input",58),e.NdJ("change",function(){return e.CHM(_),e.oxw(2).setMfaDeleteValidators()}),e.qZA(),e.TgZ(7,"label",59),e.SDv(8,60),e.qZA(),e.TgZ(9,"cd-helper"),e.TgZ(10,"span"),e.SDv(11,61),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()}}function et(t,o){1&t&&(e.TgZ(0,"span",38),e.SDv(1,70),e.qZA())}function _t(t,o){if(1&t&&(e.TgZ(0,"div",9),e.TgZ(1,"label",67),e.SDv(2,68),e.qZA(),e.TgZ(3,"div",12),e._UZ(4,"input",69),e.YNc(5,et,2,0,"span",14),e.qZA(),e.qZA()),2&t){e.oxw(2);const _=e.MAs(2),n=e.oxw();e.xp6(5),e.Q6J("ngIf",n.bucketForm.showError("mfa-token-serial",_,"required"))}}function tt(t,o){1&t&&(e.TgZ(0,"span",38),e.SDv(1,74),e.qZA())}function nt(t,o){if(1&t&&(e.TgZ(0,"div",9),e.TgZ(1,"label",71),e.SDv(2,72),e.qZA(),e.TgZ(3,"div",12),e._UZ(4,"input",73),e.YNc(5,tt,2,0,"span",14),e.qZA(),e.qZA()),2&t){e.oxw(2);const _=e.MAs(2),n=e.oxw();e.xp6(5),e.Q6J("ngIf",n.bucketForm.showError("mfa-token-pin",_,"required"))}}function ot(t,o){if(1&t){const _=e.EpF();e.TgZ(0,"fieldset"),e.TgZ(1,"legend",25),e.SDv(2,62),e.qZA(),e.TgZ(3,"div",9),e.TgZ(4,"div",27),e.TgZ(5,"div",28),e.TgZ(6,"input",63),e.NdJ("change",function(){return e.CHM(_),e.oxw(2).setMfaDeleteValidators()}),e.qZA(),e.TgZ(7,"label",64),e.SDv(8,65),e.qZA(),e.TgZ(9,"cd-helper"),e.TgZ(10,"span"),e.SDv(11,66),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.YNc(12,_t,6,1,"div",8),e.YNc(13,nt,6,1,"div",8),e.qZA()}if(2&t){const _=e.oxw(2);e.xp6(12),e.Q6J("ngIf",_.areMfaCredentialsRequired()),e.xp6(1),e.Q6J("ngIf",_.areMfaCredentialsRequired())}}function it(t,o){1&t&&(e.TgZ(0,"div",9),e.TgZ(1,"label",75),e.SDv(2,76),e.qZA(),e.TgZ(3,"div",12),e.TgZ(4,"select",77),e.TgZ(5,"option",78),e.SDv(6,79),e.qZA(),e.TgZ(7,"option",80),e.SDv(8,81),e.qZA(),e.qZA(),e.qZA(),e.qZA())}function st(t,o){1&t&&(e.TgZ(0,"span",38),e.SDv(1,86),e.qZA())}function at(t,o){1&t&&(e.TgZ(0,"span",38),e.SDv(1,87),e.qZA())}function rt(t,o){if(1&t&&(e.TgZ(0,"div",9),e.TgZ(1,"label",82),e.ynx(2),e.SDv(3,83),e.BQk(),e.TgZ(4,"cd-helper"),e.SDv(5,84),e.qZA(),e.qZA(),e.TgZ(6,"div",12),e._UZ(7,"input",85),e.YNc(8,st,2,0,"span",14),e.YNc(9,at,2,0,"span",14),e.qZA(),e.qZA()),2&t){e.oxw();const _=e.MAs(2),n=e.oxw();e.xp6(8),e.Q6J("ngIf",n.bucketForm.showError("lock_retention_period_days",_,"pattern")),e.xp6(1),e.Q6J("ngIf",n.bucketForm.showError("lock_retention_period_days",_,"lockDays"))}}const Le=function(t){return{required:t}};function lt(t,o){if(1&t){const _=e.EpF();e.TgZ(0,"div",1),e.TgZ(1,"form",2,3),e.TgZ(3,"div",4),e.TgZ(4,"div",5),e.SDv(5,6),e.ALo(6,"titlecase"),e.ALo(7,"upperFirst"),e.qZA(),e.TgZ(8,"div",7),e.YNc(9,I_,5,0,"div",8),e.TgZ(10,"div",9),e.TgZ(11,"label",10),e.SDv(12,11),e.qZA(),e.TgZ(13,"div",12),e._UZ(14,"input",13),e.YNc(15,v_,2,0,"span",14),e.YNc(16,F_,2,0,"span",14),e.YNc(17,L_,2,0,"span",14),e.YNc(18,D_,2,0,"span",14),e.YNc(19,x_,2,0,"span",14),e.YNc(20,y_,2,0,"span",14),e.YNc(21,q_,2,0,"span",14),e.YNc(22,w_,2,0,"span",14),e.qZA(),e.qZA(),e.TgZ(23,"div",9),e.TgZ(24,"label",15),e.SDv(25,16),e.qZA(),e.TgZ(26,"div",12),e.TgZ(27,"select",17),e.YNc(28,k_,2,1,"option",18),e.YNc(29,B_,2,1,"option",18),e.YNc(30,H_,2,2,"option",19),e.qZA(),e.YNc(31,X_,2,0,"span",14),e.qZA(),e.qZA(),e.TgZ(32,"div",9),e.TgZ(33,"label",20),e.SDv(34,21),e.qZA(),e.TgZ(35,"div",12),e.YNc(36,J_,5,4,"ng-template",null,22,e.W1O),e.YNc(38,V_,2,0,"ng-container",23),e.qZA(),e.qZA(),e.YNc(39,j_,12,0,"fieldset",24),e.YNc(40,ot,14,2,"fieldset",24),e.TgZ(41,"fieldset"),e.TgZ(42,"legend",25),e.SDv(43,26),e.qZA(),e.TgZ(44,"div",9),e.TgZ(45,"div",27),e.TgZ(46,"div",28),e._UZ(47,"input",29),e.TgZ(48,"label",30),e.SDv(49,31),e.qZA(),e.TgZ(50,"cd-helper"),e.TgZ(51,"span"),e.SDv(52,32),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.YNc(53,it,9,0,"div",8),e.YNc(54,rt,10,2,"div",8),e.qZA(),e.qZA(),e.TgZ(55,"div",33),e.TgZ(56,"cd-form-button-panel",34),e.NdJ("submitActionEvent",function(){return e.CHM(_),e.oxw().submit()}),e.ALo(57,"titlecase"),e.ALo(58,"upperFirst"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()}if(2&t){const _=e.MAs(2),n=e.MAs(37),i=e.oxw();e.xp6(1),e.Q6J("formGroup",i.bucketForm),e.xp6(6),e.pQV(e.lcZ(6,29,i.action))(e.lcZ(7,31,i.resource)),e.QtT(5),e.xp6(2),e.Q6J("ngIf",i.editing),e.xp6(2),e.Q6J("ngClass",e.VKq(37,Le,!i.editing)),e.xp6(3),e.Q6J("readonly",i.editing)("autofocus",!i.editing),e.xp6(1),e.Q6J("ngIf",i.bucketForm.showError("bid",_,"required")),e.xp6(1),e.Q6J("ngIf",i.bucketForm.showError("bid",_,"bucketNameInvalid")),e.xp6(1),e.Q6J("ngIf",i.bucketForm.showError("bid",_,"bucketNameNotAllowed")),e.xp6(1),e.Q6J("ngIf",i.bucketForm.showError("bid",_,"containsUpperCase")),e.xp6(1),e.Q6J("ngIf",i.bucketForm.showError("bid",_,"lowerCaseOrNumber")),e.xp6(1),e.Q6J("ngIf",i.bucketForm.showError("bid",_,"ipAddress")),e.xp6(1),e.Q6J("ngIf",i.bucketForm.showError("bid",_,"onlyLowerCaseAndNumbers")),e.xp6(1),e.Q6J("ngIf",i.bucketForm.showError("bid",_,"shouldBeInRange")),e.xp6(5),e.Q6J("autofocus",i.editing),e.xp6(1),e.Q6J("ngIf",null===i.owners),e.xp6(1),e.Q6J("ngIf",null!==i.owners),e.xp6(1),e.Q6J("ngForOf",i.owners),e.xp6(1),e.Q6J("ngIf",i.bucketForm.showError("owner",_,"required")),e.xp6(2),e.Q6J("ngClass",e.VKq(39,Le,!i.editing)),e.xp6(5),e.Q6J("ngIf",i.editing)("ngIfElse",n),e.xp6(1),e.Q6J("ngIf",i.editing),e.xp6(1),e.Q6J("ngIf",i.editing),e.xp6(13),e.Q6J("ngIf",i.bucketForm.getValue("lock_enabled")),e.xp6(1),e.Q6J("ngIf",i.bucketForm.getValue("lock_enabled")),e.xp6(2),e.Q6J("form",i.bucketForm)("submitText",e.lcZ(57,33,i.action)+" "+e.lcZ(58,35,i.resource))}}let De=(()=>{class t extends Ie.E{constructor(_,n,i,s,c,d,E,g){super(),this.route=_,this.router=n,this.formBuilder=i,this.rgwBucketService=s,this.rgwSiteService=c,this.rgwUserService=d,this.notificationService=E,this.actionLabels=g,this.editing=!1,this.owners=null,this.placementTargets=[],this.isVersioningAlreadyEnabled=!1,this.isMfaDeleteAlreadyEnabled=!1,this.icons=D.P,this.editing=this.router.url.startsWith(`/rgw/bucket/${A.MQ.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 _=this,n=m.h.custom("lockDays",()=>{if(!_.bucketForm||!u().get(_.bucketForm.getRawValue(),"lock_enabled"))return!1;const i=Number(_.bucketForm.getValue("lock_retention_period_days"));return!Number.isInteger(i)||0===i});this.bucketForm=this.formBuilder.group({id:[null],bid:[null,[a.kI.required],this.editing?[]:[m.h.bucketName(),m.h.bucketExistence(!1,this.rgwBucketService)]],owner:[null,[a.kI.required]],"placement-target":[null,this.editing?[]:[a.kI.required]],versioning:[null],"mfa-delete":[null],"mfa-token-serial":[""],"mfa-token-pin":[""],lock_enabled:[{value:!1,disabled:this.editing}],lock_mode:["COMPLIANCE"],lock_retention_period_days:[0,[m.h.number(!1),n]]})}ngOnInit(){const _={owners:this.rgwUserService.enumerate()};this.editing||(_.getPlacementTargets=this.rgwSiteService.get("placement-targets")),this.route.params.subscribe(n=>{if(n.hasOwnProperty("bid")){const i=decodeURIComponent(n.bid);_.getBid=this.rgwBucketService.get(i)}(0,Y.D)(_).subscribe(i=>{if(this.owners=i.owners.sort(),i.getPlacementTargets){const s=i.getPlacementTargets;this.zonegroup=s.zonegroup,u().forEach(s.placement_targets,c=>{c.description=`${c.name} (${"pool"}: ${c.data_pool})`,this.placementTargets.push(c)}),1===this.placementTargets.length&&this.bucketForm.get("placement-target").setValue(this.placementTargets[0].name)}if(i.getBid){const s=i.getBid,c=u().clone(this.bucketForm.getRawValue());let d=u().pick(s,u().keys(c));d.lock_retention_period_days=this.rgwBucketService.getLockDays(s),d["placement-target"]=s.placement_rule,d.versioning=s.versioning===B.ENABLED,d["mfa-delete"]=s.mfa_delete===k.ENABLED,d=u().merge(c,d),this.bucketForm.setValue(d),this.editing&&(this.isVersioningAlreadyEnabled=this.isVersioningEnabled,this.isMfaDeleteAlreadyEnabled=this.isMfaDeleteEnabled,this.setMfaDeleteValidators(),d.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 _=this.bucketForm.value;if(this.editing){const n=this.getVersioningStatus(),i=this.getMfaDeleteStatus();this.rgwBucketService.update(_.bid,_.id,_.owner,n,i,_["mfa-token-serial"],_["mfa-token-pin"],_.lock_mode,_.lock_retention_period_days).subscribe(()=>{this.notificationService.show(Ae.k.success,"Updated Object Gateway bucket '" + _.bid + "'."),this.goToListView()},()=>{this.bucketForm.setErrors({cdSubmitButton:!0})})}else this.rgwBucketService.create(_.bid,_.owner,this.zonegroup,_["placement-target"],_.lock_enabled,_.lock_mode,_.lock_retention_period_days).subscribe(()=>{this.notificationService.show(Ae.k.success,"Created Object Gateway bucket '" + _.bid + "'"),this.goToListView()},()=>{this.bucketForm.setErrors({cdSubmitButton:!0})})}areMfaCredentialsRequired(){return this.isMfaDeleteEnabled!==this.isMfaDeleteAlreadyEnabled||this.isMfaDeleteAlreadyEnabled&&this.isVersioningEnabled!==this.isVersioningAlreadyEnabled}setMfaDeleteValidators(){const _=this.bucketForm.get("mfa-token-serial"),n=this.bucketForm.get("mfa-token-pin");this.areMfaCredentialsRequired()?(_.setValidators(a.kI.required),n.setValidators(a.kI.required)):(_.setValidators(null),n.setValidators(null)),_.updateValueAndValidity(),n.updateValueAndValidity()}getVersioningStatus(){return this.isVersioningEnabled?B.ENABLED:B.SUSPENDED}getMfaDeleteStatus(){return this.isMfaDeleteEnabled?k.ENABLED:k.DISABLED}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(w.gz),e.Y36(w.F0),e.Y36(J.O),e.Y36(Me.o),e.Y36(We.I),e.Y36(O),e.Y36(ve.g),e.Y36(A.p4))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-bucket-form"]],features:[e.qOj],decls:1,vars:1,consts:function(){let o,_,n,i,s,c,d,E,g,C,b,P,G,N,p,U,W,Z,$,h,I,v,F,T,x,y,S,_e,te,ne,oe,ie,se,ae,re,le,ce,de,ue,Re;return o="" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",_="Name",n="Name...",i="Owner",s="Placement target",c="Locking",d="Enabled",E="Enables locking for the objects in the bucket. Locking can only be enabled while creating a bucket.",g="Id",C="This field is required.",b="Bucket names can only contain lowercase letters, numbers, periods and hyphens.",P="The chosen name is already in use.",G="Bucket names must not contain uppercase characters or underscores.",N="Each label must start and end with a lowercase letter or a number.",p="Bucket names cannot be formatted as IP address.",U="Bucket labels cannot be empty and can only contain lowercase letters, numbers and hyphens.",W="Bucket names must be 3 to 63 characters long.",Z="Loading...",$="-- Select a user --",h="This field is required.",I="Loading...",v="-- Select a placement target --",F="This field is required.",T="Versioning",x="Enabled",y="Enables versioning for the objects in the bucket.",S="Multi-Factor Authentication",_e="Delete enabled",te="Enables MFA (multi-factor authentication) Delete, which requires additional authentication for changing the bucket versioning state.",ne="Token Serial Number",oe="This field is required.",ie="Token PIN",se="This field is required.",ae="Mode",re="Compliance",le="Governance",ce="Days",de="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.",ue="The entered value must be a positive integer.",Re="Retention Days must be a positive integer.",[["class","cd-col-form",4,"cdFormLoading"],[1,"cd-col-form"],["name","bucketForm","novalidate","",3,"formGroup"],["frm","ngForm"],[1,"card"],[1,"card-header"],o,[1,"card-body"],["class","form-group row",4,"ngIf"],[1,"form-group","row"],["for","bid",1,"cd-col-form-label",3,"ngClass"],_,[1,"cd-col-form-input"],["id","bid","name","bid","type","text","placeholder",n,"formControlName","bid",1,"form-control",3,"readonly","autofocus"],["class","invalid-feedback",4,"ngIf"],["for","owner",1,"cd-col-form-label","required"],i,["id","owner","name","owner","formControlName","owner",1,"form-control",3,"autofocus"],[3,"ngValue",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],["for","placement-target",1,"cd-col-form-label",3,"ngClass"],s,["placementTargetSelect",""],[4,"ngIf","ngIfElse"],[4,"ngIf"],[1,"cd-header"],c,[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"],d,E,[1,"card-footer"],["wrappingClass","text-right",3,"form","submitText","submitActionEvent"],["for","id",1,"cd-col-form-label"],g,["id","id","name","id","type","text","formControlName","id","readonly","",1,"form-control"],[1,"invalid-feedback"],C,b,P,G,N,p,U,W,[3,"ngValue"],Z,$,[3,"value"],h,["id","placement-target","name","placement-target","formControlName","placement-target",1,"form-control"],I,v,F,["id","placement-target","name","placement-target","formControlName","placement-target","type","text","readonly","",1,"form-control"],T,["type","checkbox","id","versioning","name","versioning","formControlName","versioning",1,"custom-control-input",3,"change"],["for","versioning",1,"custom-control-label"],x,y,S,["type","checkbox","id","mfa-delete","name","mfa-delete","formControlName","mfa-delete",1,"custom-control-input",3,"change"],["for","mfa-delete",1,"custom-control-label"],_e,te,["for","mfa-token-serial",1,"cd-col-form-label"],ne,["type","text","id","mfa-token-serial","name","mfa-token-serial","formControlName","mfa-token-serial",1,"form-control"],oe,["for","mfa-token-pin",1,"cd-col-form-label"],ie,["type","text","id","mfa-token-pin","name","mfa-token-pin","formControlName","mfa-token-pin",1,"form-control"],se,["for","lock_mode",1,"cd-col-form-label"],ae,["formControlName","lock_mode","name","lock_mode","id","lock_mode",1,"form-control"],["value","COMPLIANCE"],re,["value","GOVERNANCE"],le,["for","lock_retention_period_days",1,"cd-col-form-label"],ce,de,["type","number","id","lock_retention_period_days","formControlName","lock_retention_period_days","min","0",1,"form-control"],ue,Re]},template:function(_,n){1&_&&e.YNc(0,lt,59,41,"div",0),2&_&&e.Q6J("cdFormLoading",n.loading)},directives:[Fe.y,a._Y,a.JL,V.V,a.sg,f.O5,H.P,f.mk,q.o,a.Fj,X.b,a.JJ,a.u,j.U,a.EJ,f.sg,a.Wl,h_.S,ee.p,a.YN,a.Kr,a.wV,a.qQ],pipes:[f.rS,K.m],styles:[""]}),t})();var xe=r(18891),be=r(68136),ye=r(30982),z=r(35905),Pe=r(68774),qe=r(47557),we=r(66369),Q=r(51847),Ee=r(74937),Te=r(63285),ke=r(94928),ct=r(96102),Be=r(68962);function dt(t,o){1&t&&(e.TgZ(0,"td"),e.SDv(1,24),e.qZA())}function ut(t,o){if(1&t&&(e.TgZ(0,"td"),e._uU(1),e.ALo(2,"dimless"),e.qZA()),2&t){const _=e.oxw(3);e.xp6(1),e.hij(" ",e.lcZ(2,1,_.selection.bucket_quota.max_size)," ")}}function Rt(t,o){1&t&&(e.TgZ(0,"td"),e.SDv(1,25),e.qZA())}function gt(t,o){if(1&t&&(e.TgZ(0,"td"),e._uU(1),e.qZA()),2&t){const _=e.oxw(3);e.xp6(1),e.hij(" ",_.selection.bucket_quota.max_objects," ")}}function Et(t,o){if(1&t&&(e.TgZ(0,"div"),e.TgZ(1,"legend"),e.SDv(2,20),e.qZA(),e.TgZ(3,"table",1),e.TgZ(4,"tbody"),e.TgZ(5,"tr"),e.TgZ(6,"td",2),e.SDv(7,21),e.qZA(),e.TgZ(8,"td",4),e._uU(9),e.ALo(10,"booleanText"),e.qZA(),e.qZA(),e.TgZ(11,"tr"),e.TgZ(12,"td",5),e.SDv(13,22),e.qZA(),e.YNc(14,dt,2,0,"td",0),e.YNc(15,ut,3,3,"td",0),e.qZA(),e.TgZ(16,"tr"),e.TgZ(17,"td",5),e.SDv(18,23),e.qZA(),e.YNc(19,Rt,2,0,"td",0),e.YNc(20,gt,2,1,"td",0),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&t){const _=e.oxw(2);e.xp6(9),e.Oqu(e.lcZ(10,5,_.selection.bucket_quota.enabled)),e.xp6(5),e.Q6J("ngIf",_.selection.bucket_quota.max_size<=-1),e.xp6(1),e.Q6J("ngIf",_.selection.bucket_quota.max_size>-1),e.xp6(4),e.Q6J("ngIf",_.selection.bucket_quota.max_objects<=-1),e.xp6(1),e.Q6J("ngIf",_.selection.bucket_quota.max_objects>-1)}}function Tt(t,o){if(1&t&&(e.ynx(0),e.TgZ(1,"tr"),e.TgZ(2,"td",5),e.SDv(3,26),e.qZA(),e.TgZ(4,"td"),e._uU(5),e.qZA(),e.qZA(),e.TgZ(6,"tr"),e.TgZ(7,"td",5),e.SDv(8,27),e.qZA(),e.TgZ(9,"td"),e._uU(10),e.qZA(),e.qZA(),e.BQk()),2&t){const _=e.oxw(2);e.xp6(5),e.Oqu(_.selection.lock_mode),e.xp6(5),e.Oqu(_.selection.lock_retention_period_days)}}function St(t,o){if(1&t&&(e.ynx(0),e.TgZ(1,"table",1),e.TgZ(2,"tbody"),e.TgZ(3,"tr"),e.TgZ(4,"td",2),e.SDv(5,3),e.qZA(),e.TgZ(6,"td",4),e._uU(7),e.qZA(),e.qZA(),e.TgZ(8,"tr"),e.TgZ(9,"td",5),e.SDv(10,6),e.qZA(),e.TgZ(11,"td"),e._uU(12),e.qZA(),e.qZA(),e.TgZ(13,"tr"),e.TgZ(14,"td",5),e.SDv(15,7),e.qZA(),e.TgZ(16,"td"),e._uU(17),e.qZA(),e.qZA(),e.TgZ(18,"tr"),e.TgZ(19,"td",5),e.SDv(20,8),e.qZA(),e.TgZ(21,"td"),e._uU(22),e.qZA(),e.qZA(),e.TgZ(23,"tr"),e.TgZ(24,"td",5),e.SDv(25,9),e.qZA(),e.TgZ(26,"td"),e._uU(27),e.qZA(),e.qZA(),e.TgZ(28,"tr"),e.TgZ(29,"td",5),e.SDv(30,10),e.qZA(),e.TgZ(31,"td"),e._uU(32),e.qZA(),e.qZA(),e.TgZ(33,"tr"),e.TgZ(34,"td",5),e.SDv(35,11),e.qZA(),e.TgZ(36,"td"),e._uU(37),e.qZA(),e.qZA(),e.TgZ(38,"tr"),e.TgZ(39,"td",5),e.SDv(40,12),e.qZA(),e.TgZ(41,"td"),e._uU(42),e.qZA(),e.qZA(),e.TgZ(43,"tr"),e.TgZ(44,"td",5),e.SDv(45,13),e.qZA(),e.TgZ(46,"td"),e._uU(47),e.qZA(),e.qZA(),e.TgZ(48,"tr"),e.TgZ(49,"td",5),e.SDv(50,14),e.qZA(),e.TgZ(51,"td"),e._uU(52),e.ALo(53,"cdDate"),e.qZA(),e.qZA(),e.TgZ(54,"tr"),e.TgZ(55,"td",5),e.SDv(56,15),e.qZA(),e.TgZ(57,"td"),e._uU(58),e.qZA(),e.qZA(),e.TgZ(59,"tr"),e.TgZ(60,"td",5),e.SDv(61,16),e.qZA(),e.TgZ(62,"td"),e._uU(63),e.qZA(),e.qZA(),e.TgZ(64,"tr"),e.TgZ(65,"td",5),e.SDv(66,17),e.qZA(),e.TgZ(67,"td"),e._uU(68),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.YNc(69,Et,21,7,"div",0),e.TgZ(70,"legend"),e.SDv(71,18),e.qZA(),e.TgZ(72,"table",1),e.TgZ(73,"tbody"),e.TgZ(74,"tr"),e.TgZ(75,"td",2),e.SDv(76,19),e.qZA(),e.TgZ(77,"td",4),e._uU(78),e.ALo(79,"booleanText"),e.qZA(),e.qZA(),e.YNc(80,Tt,11,2,"ng-container",0),e.qZA(),e.qZA(),e.BQk()),2&t){const _=e.oxw();e.xp6(7),e.Oqu(_.selection.bid),e.xp6(5),e.Oqu(_.selection.id),e.xp6(5),e.Oqu(_.selection.owner),e.xp6(5),e.Oqu(_.selection.index_type),e.xp6(5),e.Oqu(_.selection.placement_rule),e.xp6(5),e.Oqu(_.selection.marker),e.xp6(5),e.Oqu(_.selection.max_marker),e.xp6(5),e.Oqu(_.selection.ver),e.xp6(5),e.Oqu(_.selection.master_ver),e.xp6(5),e.Oqu(e.lcZ(53,16,_.selection.mtime)),e.xp6(6),e.Oqu(_.selection.zonegroup),e.xp6(5),e.Oqu(_.selection.versioning),e.xp6(5),e.Oqu(_.selection.mfa_delete),e.xp6(1),e.Q6J("ngIf",_.selection.bucket_quota),e.xp6(9),e.Oqu(e.lcZ(79,18,_.selection.lock_enabled)),e.xp6(2),e.Q6J("ngIf",_.selection.lock_enabled)}}let ft=(()=>{class t{constructor(_){this.rgwBucketService=_}ngOnChanges(){this.selection&&this.rgwBucketService.get(this.selection.bid).subscribe(_=>{_.lock_retention_period_days=this.rgwBucketService.getLockDays(_),this.selection=_})}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(Me.o))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-bucket-details"]],inputs:{selection:"selection"},features:[e.TTD],decls:1,vars:1,consts:function(){let o,_,n,i,s,c,d,E,g,C,b,P,G,N,p,U,W,Z,$,h,I,v,F;return o="Name",_="ID",n="Owner",i="Index type",s="Placement rule",c="Marker",d="Maximum marker",E="Version",g="Master version",C="Modification time",b="Zonegroup",P="Versioning",G="MFA Delete",N="Locking",p="Enabled",U="Bucket quota",W="Enabled",Z="Maximum size",$="Maximum objects",h="Unlimited",I="Unlimited",v="Mode",F="Days",[[4,"ngIf"],[1,"table","table-striped","table-bordered"],[1,"bold","w-25"],o,[1,"w-75"],[1,"bold"],_,n,i,s,c,d,E,g,C,b,P,G,N,p,U,W,Z,$,h,I,v,F]},template:function(_,n){1&_&&e.YNc(0,St,81,20,"ng-container",0),2&_&&e.Q6J("ngIf",n.selection)},directives:[f.O5],pipes:[ct.N,Be.T,we.n],styles:["table[_ngcontent-%COMP%]{table-layout:fixed}table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{word-wrap:break-word}"]}),t})();var He=r(60251);const Ct=["bucketSizeTpl"],pt=["bucketObjectTpl"];function Mt(t,o){if(1&t&&e._UZ(0,"cd-usage-bar",8),2&t){const _=e.oxw().row;e.Q6J("total",_.bucket_quota.max_size)("used",_.bucket_size)}}function mt(t,o){1&t&&e.SDv(0,9)}function At(t,o){if(1&t&&(e.YNc(0,Mt,1,2,"cd-usage-bar",6),e.YNc(1,mt,1,0,"ng-template",null,7,e.W1O)),2&t){const _=o.row,n=e.MAs(2);e.Q6J("ngIf",_.bucket_quota.max_size>0&&_.bucket_quota.enabled)("ngIfElse",n)}}function bt(t,o){if(1&t&&e._UZ(0,"cd-usage-bar",12),2&t){const _=e.oxw().row;e.Q6J("total",_.bucket_quota.max_objects)("used",_.num_objects)("isBinary",!1)}}function Pt(t,o){1&t&&e.SDv(0,13)}function Gt(t,o){if(1&t&&(e.YNc(0,bt,1,3,"cd-usage-bar",10),e.YNc(1,Pt,1,0,"ng-template",null,11,e.W1O)),2&t){const _=o.row,n=e.MAs(2);e.Q6J("ngIf",_.bucket_quota.max_objects>0&&_.bucket_quota.enabled)("ngIfElse",n)}}let Ot=(()=>{class t extends be.o{constructor(_,n,i,s,c,d,E,g){super(g),this.authStorageService=_,this.dimlessBinaryPipe=n,this.dimlessPipe=i,this.rgwBucketService=s,this.modalService=c,this.urlBuilder=d,this.actionLabels=E,this.ngZone=g,this.columns=[],this.buckets=[],this.selection=new Pe.r}ngOnInit(){this.permission=this.authStorageService.getPermissions().rgw,this.columns=[{name:"Name",prop:"bid",flexGrow:2},{name:"Owner",prop:"owner",flexGrow:2.5},{name:"Used Capacity",prop:"bucket_size",flexGrow:.6,pipe:this.dimlessBinaryPipe},{name:"Capacity Limit %",prop:"size_usage",cellTemplate:this.bucketSizeTpl,flexGrow:.8},{name:"Objects",prop:"num_objects",flexGrow:.6,pipe:this.dimlessPipe},{name:"Object Limit %",prop:"object_usage",cellTemplate:this.bucketObjectTpl,flexGrow:.8}];const _=()=>this.selection.first()&&`${encodeURIComponent(this.selection.first().bid)}`;this.tableActions=[{permission:"create",icon:D.P.add,routerLink:()=>this.urlBuilder.getCreate(),name:this.actionLabels.CREATE,canBePrimary:c=>!c.hasSelection},{permission:"update",icon:D.P.edit,routerLink:()=>this.urlBuilder.getEdit(_()),name:this.actionLabels.EDIT},{permission:"delete",icon:D.P.destroy,click:()=>this.deleteAction(),disable:()=>!this.selection.hasSelection,name:this.actionLabels.DELETE,canBePrimary:c=>c.hasMultiSelection}],this.setTableRefreshTimeout()}transformBucketData(){u().forEach(this.buckets,_=>{const n=_.bucket_quota.max_size,i=_.bucket_quota.max_objects;_.bucket_size=0,_.num_objects=0,u().isEmpty(_.usage)||(_.bucket_size=_.usage["rgw.main"].size_actual,_.num_objects=_.usage["rgw.main"].num_objects),_.size_usage=n>0?_.bucket_size/n:void 0,_.object_usage=i>0?_.num_objects/i:void 0})}getBucketList(_){this.setTableRefreshTimeout(),this.rgwBucketService.list(!0).subscribe(n=>{this.buckets=n,this.transformBucketData()},()=>{_.error()})}updateSelection(_){this.selection=_}deleteAction(){this.modalService.show(ye.M,{itemDescription:this.selection.hasSingleSelection?"bucket":"buckets",itemNames:this.selection.selected.map(_=>_.bid),submitActionObservable:()=>new xe.y(_=>{(0,Y.D)(this.selection.selected.map(n=>this.rgwBucketService.delete(n.bid))).subscribe({error:n=>{_.error(n),this.table.refreshBtn()},complete:()=>{_.complete(),this.table.refreshBtn()}})})})}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(Ee.j),e.Y36(qe.$),e.Y36(we.n),e.Y36(Me.o),e.Y36(Te.Z),e.Y36(Q.F),e.Y36(A.p4),e.Y36(e.R0b))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-bucket-list"]],viewQuery:function(_,n){if(1&_&&(e.Gf(z.a,7),e.Gf(Ct,7),e.Gf(pt,7)),2&_){let i;e.iGM(i=e.CRH())&&(n.table=i.first),e.iGM(i=e.CRH())&&(n.bucketSizeTpl=i.first),e.iGM(i=e.CRH())&&(n.bucketObjectTpl=i.first)}},features:[e._Bn([{provide:Q.F,useValue:new Q.F("rgw/bucket")}]),e.qOj],decls:8,vars:9,consts:function(){let o,_;return o="No Limit",_="No Limit",[["columnMode","flex","selectionType","multiClick","identifier","bid",3,"autoReload","data","columns","hasDetails","status","setExpandedRow","updateSelection","fetchData"],["table",""],[1,"table-actions",3,"permission","selection","tableActions"],["cdTableDetail","",3,"selection"],["bucketSizeTpl",""],["bucketObjectTpl",""],[3,"total","used",4,"ngIf","ngIfElse"],["noSizeQuota",""],[3,"total","used"],o,[3,"total","used","isBinary",4,"ngIf","ngIfElse"],["noObjectQuota",""],[3,"total","used","isBinary"],_]},template:function(_,n){1&_&&(e.TgZ(0,"cd-table",0,1),e.NdJ("setExpandedRow",function(s){return n.setExpandedRow(s)})("updateSelection",function(s){return n.updateSelection(s)})("fetchData",function(s){return n.getBucketList(s)}),e._UZ(2,"cd-table-actions",2),e._UZ(3,"cd-rgw-bucket-details",3),e.qZA(),e.YNc(4,At,3,2,"ng-template",null,4,e.W1O),e.YNc(6,Gt,3,2,"ng-template",null,5,e.W1O)),2&_&&(e.Q6J("autoReload",!1)("data",n.buckets)("columns",n.columns)("hasDetails",!0)("status",n.tableStatus),e.xp6(2),e.Q6J("permission",n.permission)("selection",n.selection)("tableActions",n.tableActions),e.xp6(1),e.Q6J("selection",n.expandedRow))},directives:[z.a,ke.K,ft,f.O5,He.O],styles:[""]}),t})();var Ut=r(58111),Xe=r(59376),Wt=r(61350),Zt=r(98056),Ke=r(76317);function $t(t,o){if(1&t){const _=e.EpF();e.TgZ(0,"cd-table-key-value",11),e.NdJ("fetchData",function(){return e.CHM(_),e.oxw(2).getMetaData()}),e.qZA()}if(2&t){const _=e.oxw(2);e.Q6J("data",_.metadata)}}function ht(t,o){if(1&t&&e._UZ(0,"cd-table-performance-counter",12),2&t){const _=e.oxw(2);e.Q6J("serviceId",_.serviceMapId)}}function It(t,o){if(1&t&&e._UZ(0,"cd-grafana",15),2&t){const _=e.oxw(3);e.Q6J("grafanaPath","rgw-instance-detail?var-rgw_servers=rgw."+_.serviceId)}}function vt(t,o){1&t&&(e.TgZ(0,"li",13),e.TgZ(1,"a",4),e.SDv(2,14),e.qZA(),e.YNc(3,It,1,1,"ng-template",6),e.qZA())}function Ft(t,o){if(1&t&&(e.ynx(0),e.TgZ(1,"ul",1,2),e.TgZ(3,"li",3),e.TgZ(4,"a",4),e.SDv(5,5),e.qZA(),e.YNc(6,$t,1,1,"ng-template",6),e.qZA(),e.TgZ(7,"li",7),e.TgZ(8,"a",4),e.SDv(9,8),e.qZA(),e.YNc(10,ht,1,1,"ng-template",6),e.qZA(),e.YNc(11,vt,4,0,"li",9),e.qZA(),e._UZ(12,"div",10),e.BQk()),2&t){const _=e.MAs(2),n=e.oxw();e.xp6(11),e.Q6J("ngIf",n.grafanaPermission.read),e.xp6(1),e.Q6J("ngbNavOutlet",_)}}let Lt=(()=>{class t{constructor(_,n){this.rgwDaemonService=_,this.authStorageService=n,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(){u().isEmpty(this.serviceId)||this.rgwDaemonService.get(this.serviceId).subscribe(_=>{this.metadata=_.rgw_metadata})}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(ge.b),e.Y36(Ee.j))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-daemon-details"]],inputs:{selection:"selection"},features:[e.TTD],decls:1,vars:1,consts:function(){let o,_,n;return o="Details",_="Performance Counters",n="Performance Details",[[4,"ngIf"],["ngbNav","","cdStatefulTab","rgw-daemon-details",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem","details"],["ngbNavLink",""],o,["ngbNavContent",""],["ngbNavItem","performance-counters"],_,["ngbNavItem","performance-details",4,"ngIf"],[3,"ngbNavOutlet"],[3,"data","fetchData"],["serviceType","rgw",3,"serviceId"],["ngbNavItem","performance-details"],n,["uid","x5ARzZtmk","grafanaStyle","one",3,"grafanaPath"]]},template:function(_,n){1&_&&e.YNc(0,Ft,13,2,"ng-container",0),2&_&&e.Q6J("ngIf",n.selection)},directives:[f.O5,M.Pz,Xe.m,M.nv,M.Vx,M.uN,M.tO,Wt.b,Zt.p,Ke.F],styles:[""]}),t})();function Dt(t,o){if(1&t){const _=e.EpF();e.TgZ(0,"cd-table",8),e.NdJ("setExpandedRow",function(i){return e.CHM(_),e.oxw().setExpandedRow(i)})("fetchData",function(i){return e.CHM(_),e.oxw().getDaemonList(i)}),e._UZ(1,"cd-rgw-daemon-details",9),e.qZA()}if(2&t){const _=e.oxw();e.Q6J("data",_.daemons)("columns",_.columns)("hasDetails",!0),e.xp6(1),e.Q6J("selection",_.expandedRow)}}function xt(t,o){1&t&&e._UZ(0,"cd-grafana",11),2&t&&e.Q6J("grafanaPath","rgw-overview?")}function yt(t,o){1&t&&(e.TgZ(0,"li",2),e.TgZ(1,"a",3),e.SDv(2,10),e.qZA(),e.YNc(3,xt,1,1,"ng-template",5),e.qZA())}function qt(t,o){1&t&&e._UZ(0,"cd-grafana",13),2&t&&e.Q6J("grafanaPath","radosgw-sync-overview?")}function wt(t,o){1&t&&(e.TgZ(0,"li",2),e.TgZ(1,"a",3),e.SDv(2,12),e.qZA(),e.YNc(3,qt,1,1,"ng-template",5),e.qZA())}let kt=(()=>{class t extends be.o{constructor(_,n,i,s){super(),this.rgwDaemonService=_,this.authStorageService=n,this.cephShortVersionPipe=i,this.rgwSiteService=s,this.columns=[],this.daemons=[],this.updateDaemons=c=>{this.daemons=c}}ngOnInit(){this.grafanaPermission=this.authStorageService.getPermissions().grafana,this.columns=[{name:"ID",prop:"id",flexGrow:2},{name:"Hostname",prop:"server_hostname",flexGrow:2},{name:"Zone",prop:"zone_name",flexGrow:2},{name:"Zone Group",prop:"zonegroup_name",flexGrow:2},{name:"Realm",prop:"realm_name",flexGrow:2},{name:"Version",prop:"version",flexGrow:1,pipe:this.cephShortVersionPipe}],this.rgwSiteService.get("realms").subscribe(_=>this.isMultiSite=_.length>0)}getDaemonList(_){this.rgwDaemonService.list().subscribe(this.updateDaemons,()=>{_.error()})}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(ge.b),e.Y36(Ee.j),e.Y36(Ut.F),e.Y36(We.I))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-daemon-list"]],features:[e.qOj],decls:9,vars:3,consts:function(){let o,_,n;return o="Daemons List",_="Overall Performance",n="Sync Performance",[["ngbNav","",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem",""],["ngbNavLink",""],o,["ngbNavContent",""],["ngbNavItem","",4,"ngIf"],[3,"ngbNavOutlet"],["columnMode","flex",3,"data","columns","hasDetails","setExpandedRow","fetchData"],["cdTableDetail","",3,"selection"],_,["uid","WAkugZpiz","grafanaStyle","two",3,"grafanaPath"],n,["uid","rgw-sync-overview","grafanaStyle","two",3,"grafanaPath"]]},template:function(_,n){if(1&_&&(e.TgZ(0,"ul",0,1),e.TgZ(2,"li",2),e.TgZ(3,"a",3),e.SDv(4,4),e.qZA(),e.YNc(5,Dt,2,4,"ng-template",5),e.qZA(),e.YNc(6,yt,4,0,"li",6),e.YNc(7,wt,4,0,"li",6),e.qZA(),e._UZ(8,"div",7)),2&_){const i=e.MAs(1);e.xp6(6),e.Q6J("ngIf",n.grafanaPermission.read),e.xp6(1),e.Q6J("ngIf",n.grafanaPermission.read&&n.isMultiSite),e.xp6(1),e.Q6J("ngbNavOutlet",i)}},directives:[M.Pz,M.nv,M.Vx,M.uN,f.O5,M.tO,z.a,Lt,Ke.F],styles:[""]}),t})();var Bt=r(58071),Ge=r(28211),Se=(()=>{return(t=Se||(Se={})).USERS="users",t.BUCKETS="buckets",t.METADATA="metadata",t.USAGE="usage",t.ZONE="zone",Se;var t})();let ze=(()=>{class t{static getAll(){return Object.values(t.capabilities)}}return t.capabilities=Se,t})();var fe=r(60312);function Ht(t,o){1&t&&e._UZ(0,"input",22),2&t&&e.Q6J("readonly",!0)}function Xt(t,o){1&t&&(e.TgZ(0,"option",17),e.SDv(1,25),e.qZA()),2&t&&e.Q6J("ngValue",null)}function Kt(t,o){if(1&t&&(e.TgZ(0,"option",26),e._uU(1),e.qZA()),2&t){const _=o.$implicit;e.Q6J("value",_),e.xp6(1),e.Oqu(_)}}function zt(t,o){if(1&t&&(e.TgZ(0,"select",23),e.YNc(1,Xt,2,1,"option",24),e.YNc(2,Kt,2,2,"option",19),e.qZA()),2&t){const _=e.oxw();e.xp6(1),e.Q6J("ngIf",null!==_.types),e.xp6(1),e.Q6J("ngForOf",_.types)}}function Qt(t,o){1&t&&(e.TgZ(0,"span",27),e.SDv(1,28),e.qZA())}function Yt(t,o){if(1&t&&(e.TgZ(0,"option",26),e._uU(1),e.qZA()),2&t){const _=o.$implicit;e.Q6J("value",_),e.xp6(1),e.hij(" ",_," ")}}function Jt(t,o){1&t&&(e.TgZ(0,"span",27),e.SDv(1,29),e.qZA())}const Vt=function(t){return{required:t}},jt=function(){return["read","write","*"]};let en=(()=>{class t{constructor(_,n,i){this.formBuilder=_,this.activeModal=n,this.actionLabels=i,this.submitAction=new e.vpe,this.editing=!0,this.types=[],this.resource="capability",this.createForm()}createForm(){this.formGroup=this.formBuilder.group({type:[null,[a.kI.required]],perm:[null,[a.kI.required]]})}setEditing(_=!0){this.editing=_,this.action=this.editing?this.actionLabels.EDIT:this.actionLabels.ADD}setValues(_,n){this.formGroup.setValue({type:_,perm:n})}setCapabilities(_){const n=[];_.forEach(i=>{n.push(i.type)}),this.types=[],ze.getAll().forEach(i=>{-1===u().indexOf(n,i)&&this.types.push(i)})}onSubmit(){this.submitAction.emit(this.formGroup.value),this.activeModal.close()}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(J.O),e.Y36(M.Kz),e.Y36(A.p4))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-user-capability-modal"]],outputs:{submitAction:"submitAction"},decls:29,vars:24,consts:function(){let o,_,n,i,s,c,d;return o="" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",_="Type",n="Permission",i="-- Select a permission --",s="-- Select a type --",c="This field is required.",d="This field is required.",[[3,"modalRef"],[1,"modal-title"],o,[1,"modal-content"],["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","type",1,"cd-col-form-label",3,"ngClass"],_,[1,"cd-col-form-input"],["id","type","class","form-control","type","text","formControlName","type",3,"readonly",4,"ngIf"],["id","type","class","form-control","formControlName","type","autofocus","",4,"ngIf"],["class","invalid-feedback",4,"ngIf"],["for","perm",1,"cd-col-form-label","required"],n,["id","perm","formControlName","perm",1,"form-control"],[3,"ngValue"],i,[3,"value",4,"ngFor","ngForOf"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],["id","type","type","text","formControlName","type",1,"form-control",3,"readonly"],["id","type","formControlName","type","autofocus","",1,"form-control"],[3,"ngValue",4,"ngIf"],s,[3,"value"],[1,"invalid-feedback"],c,d]},template:function(_,n){if(1&_&&(e.TgZ(0,"cd-modal",0),e.ynx(1,1),e.SDv(2,2),e.ALo(3,"titlecase"),e.ALo(4,"upperFirst"),e.BQk(),e.ynx(5,3),e.TgZ(6,"form",4,5),e.TgZ(8,"div",6),e.TgZ(9,"div",7),e.TgZ(10,"label",8),e.SDv(11,9),e.qZA(),e.TgZ(12,"div",10),e.YNc(13,Ht,1,1,"input",11),e.YNc(14,zt,3,2,"select",12),e.YNc(15,Qt,2,0,"span",13),e.qZA(),e.qZA(),e.TgZ(16,"div",7),e.TgZ(17,"label",14),e.SDv(18,15),e.qZA(),e.TgZ(19,"div",10),e.TgZ(20,"select",16),e.TgZ(21,"option",17),e.SDv(22,18),e.qZA(),e.YNc(23,Yt,2,2,"option",19),e.qZA(),e.YNc(24,Jt,2,0,"span",13),e.qZA(),e.qZA(),e.qZA(),e.TgZ(25,"div",20),e.TgZ(26,"cd-form-button-panel",21),e.NdJ("submitActionEvent",function(){return n.onSubmit()}),e.ALo(27,"titlecase"),e.ALo(28,"upperFirst"),e.qZA(),e.qZA(),e.qZA(),e.BQk(),e.qZA()),2&_){const i=e.MAs(7);e.Q6J("modalRef",n.activeModal),e.xp6(4),e.pQV(e.lcZ(3,13,n.action))(e.lcZ(4,15,n.resource)),e.QtT(2),e.xp6(2),e.Q6J("formGroup",n.formGroup),e.xp6(4),e.Q6J("ngClass",e.VKq(21,Vt,!n.editing)),e.xp6(3),e.Q6J("ngIf",n.editing),e.xp6(1),e.Q6J("ngIf",!n.editing),e.xp6(1),e.Q6J("ngIf",n.formGroup.showError("type",i,"required")),e.xp6(6),e.Q6J("ngValue",null),e.xp6(2),e.Q6J("ngForOf",e.DdM(23,jt)),e.xp6(1),e.Q6J("ngIf",n.formGroup.showError("perm",i,"required")),e.xp6(2),e.Q6J("form",n.formGroup)("submitText",e.lcZ(27,17,n.action)+" "+e.lcZ(28,19,n.resource))}},directives:[fe.z,a._Y,a.JL,V.V,a.sg,H.P,f.mk,f.O5,q.o,a.EJ,X.b,a.JJ,a.u,a.YN,a.Kr,f.sg,ee.p,a.Fj,j.U],pipes:[f.rS,K.m],styles:[""]}),t})();var Ce=r(4416),pe=r(58039);function _n(t,o){1&t&&e._UZ(0,"input",17),2&t&&e.Q6J("readonly",!0)}function tn(t,o){1&t&&(e.TgZ(0,"option",21),e.SDv(1,22),e.qZA()),2&t&&e.Q6J("ngValue",null)}function nn(t,o){if(1&t&&(e.TgZ(0,"option",23),e._uU(1),e.qZA()),2&t){const _=o.$implicit;e.Q6J("value",_),e.xp6(1),e.Oqu(_)}}function on(t,o){if(1&t&&(e.TgZ(0,"select",18),e.YNc(1,tn,2,1,"option",19),e.YNc(2,nn,2,2,"option",20),e.qZA()),2&t){const _=e.oxw();e.xp6(1),e.Q6J("ngIf",null!==_.userCandidates),e.xp6(1),e.Q6J("ngForOf",_.userCandidates)}}function sn(t,o){1&t&&(e.TgZ(0,"span",24),e.SDv(1,25),e.qZA())}function an(t,o){1&t&&(e.TgZ(0,"div",7),e.TgZ(1,"div",26),e.TgZ(2,"div",27),e._UZ(3,"input",28),e.TgZ(4,"label",29),e.SDv(5,30),e.qZA(),e.qZA(),e.qZA(),e.qZA())}function rn(t,o){1&t&&(e.TgZ(0,"span",24),e.SDv(1,38),e.qZA())}const Ne=function(t){return{required:t}};function ln(t,o){if(1&t&&(e.TgZ(0,"div",7),e.TgZ(1,"label",31),e.SDv(2,32),e.qZA(),e.TgZ(3,"div",10),e.TgZ(4,"div",33),e._UZ(5,"input",34),e.TgZ(6,"span",35),e._UZ(7,"button",36),e._UZ(8,"cd-copy-2-clipboard-button",37),e.qZA(),e.qZA(),e.YNc(9,rn,2,0,"span",13),e.qZA(),e.qZA()),2&t){const _=e.oxw(),n=e.MAs(7);e.xp6(1),e.Q6J("ngClass",e.VKq(3,Ne,!_.viewing)),e.xp6(4),e.Q6J("readonly",_.viewing),e.xp6(4),e.Q6J("ngIf",_.formGroup.showError("access_key",n,"required"))}}function cn(t,o){1&t&&(e.TgZ(0,"span",24),e.SDv(1,44),e.qZA())}function dn(t,o){if(1&t&&(e.TgZ(0,"div",7),e.TgZ(1,"label",39),e.SDv(2,40),e.qZA(),e.TgZ(3,"div",10),e.TgZ(4,"div",33),e._UZ(5,"input",41),e.TgZ(6,"span",35),e._UZ(7,"button",42),e._UZ(8,"cd-copy-2-clipboard-button",43),e.qZA(),e.qZA(),e.YNc(9,cn,2,0,"span",13),e.qZA(),e.qZA()),2&t){const _=e.oxw(),n=e.MAs(7);e.xp6(1),e.Q6J("ngClass",e.VKq(3,Ne,!_.viewing)),e.xp6(4),e.Q6J("readonly",_.viewing),e.xp6(4),e.Q6J("ngIf",_.formGroup.showError("secret_key",n,"required"))}}let Qe=(()=>{class t{constructor(_,n,i){this.formBuilder=_,this.activeModal=n,this.actionLabels=i,this.submitAction=new e.vpe,this.viewing=!0,this.userCandidates=[],this.resource="S3 Key",this.createForm()}createForm(){this.formGroup=this.formBuilder.group({user:[null,[a.kI.required]],generate_key:[!0],access_key:[null,[m.h.requiredIf({generate_key:!1})]],secret_key:[null,[m.h.requiredIf({generate_key:!1})]]})}setViewing(_=!0){this.viewing=_,this.action=this.viewing?this.actionLabels.SHOW:this.actionLabels.CREATE}setValues(_,n,i){this.formGroup.setValue({user:_,generate_key:u().isEmpty(n),access_key:n,secret_key:i})}setUserCandidates(_){this.userCandidates=_}onSubmit(){this.submitAction.emit(this.formGroup.value),this.activeModal.close()}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(J.O),e.Y36(M.Kz),e.Y36(A.p4))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-user-s3-key-modal"]],outputs:{submitAction:"submitAction"},decls:23,vars:24,consts:function(){let o,_,n,i,s,c,d,E,g;return o="" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",_="Username",n="-- Select a username --",i="This field is required.",s="Auto-generate key",c="Access key",d="This field is required.",E="Secret key",g="This field is required.",[[3,"modalRef"],[1,"modal-title"],o,[1,"modal-content"],["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","user",1,"cd-col-form-label",3,"ngClass"],_,[1,"cd-col-form-input"],["id","user","class","form-control","type","text","formControlName","user",3,"readonly",4,"ngIf"],["id","user","class","form-control","formControlName","user","autofocus","",4,"ngIf"],["class","invalid-feedback",4,"ngIf"],["class","form-group row",4,"ngIf"],[1,"modal-footer"],[3,"form","submitText","showSubmit","submitActionEvent"],["id","user","type","text","formControlName","user",1,"form-control",3,"readonly"],["id","user","formControlName","user","autofocus","",1,"form-control"],[3,"ngValue",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[3,"ngValue"],n,[3,"value"],[1,"invalid-feedback"],i,[1,"cd-col-form-offset"],[1,"custom-control","custom-checkbox"],["id","generate_key","type","checkbox","formControlName","generate_key",1,"custom-control-input"],["for","generate_key",1,"custom-control-label"],s,["for","access_key",1,"cd-col-form-label",3,"ngClass"],c,[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"],d,["for","secret_key",1,"cd-col-form-label",3,"ngClass"],E,["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"],g]},template:function(_,n){if(1&_&&(e.TgZ(0,"cd-modal",0),e.ynx(1,1),e.SDv(2,2),e.ALo(3,"titlecase"),e.ALo(4,"upperFirst"),e.BQk(),e.ynx(5,3),e.TgZ(6,"form",4,5),e.TgZ(8,"div",6),e.TgZ(9,"div",7),e.TgZ(10,"label",8),e.SDv(11,9),e.qZA(),e.TgZ(12,"div",10),e.YNc(13,_n,1,1,"input",11),e.YNc(14,on,3,2,"select",12),e.YNc(15,sn,2,0,"span",13),e.qZA(),e.qZA(),e.YNc(16,an,6,0,"div",14),e.YNc(17,ln,10,5,"div",14),e.YNc(18,dn,10,5,"div",14),e.qZA(),e.TgZ(19,"div",15),e.TgZ(20,"cd-form-button-panel",16),e.NdJ("submitActionEvent",function(){return n.onSubmit()}),e.ALo(21,"titlecase"),e.ALo(22,"upperFirst"),e.qZA(),e.qZA(),e.qZA(),e.BQk(),e.qZA()),2&_){const i=e.MAs(7);e.Q6J("modalRef",n.activeModal),e.xp6(4),e.pQV(e.lcZ(3,14,n.action))(e.lcZ(4,16,n.resource)),e.QtT(2),e.xp6(2),e.Q6J("formGroup",n.formGroup),e.xp6(4),e.Q6J("ngClass",e.VKq(22,Ne,!n.viewing)),e.xp6(3),e.Q6J("ngIf",n.viewing),e.xp6(1),e.Q6J("ngIf",!n.viewing),e.xp6(1),e.Q6J("ngIf",n.formGroup.showError("user",i,"required")),e.xp6(1),e.Q6J("ngIf",!n.viewing),e.xp6(1),e.Q6J("ngIf",!n.formGroup.getValue("generate_key")),e.xp6(1),e.Q6J("ngIf",!n.formGroup.getValue("generate_key")),e.xp6(2),e.Q6J("form",n.formGroup)("submitText",e.lcZ(21,18,n.action)+" "+e.lcZ(22,20,n.resource))("showSubmit",!n.viewing)}},directives:[fe.z,a._Y,a.JL,V.V,a.sg,H.P,f.mk,f.O5,ee.p,q.o,a.Fj,X.b,a.JJ,a.u,a.EJ,j.U,f.sg,a.YN,a.Kr,a.Wl,Ce.C,pe.s],pipes:[f.rS,K.m],styles:[""]}),t})();class un{}function Rn(t,o){1&t&&(e.TgZ(0,"span",29),e.SDv(1,30),e.qZA())}function gn(t,o){1&t&&(e.TgZ(0,"span",29),e.SDv(1,31),e.qZA())}function En(t,o){if(1&t&&(e.TgZ(0,"option",32),e._uU(1),e.qZA()),2&t){const _=o.$implicit;e.Q6J("value",_),e.xp6(1),e.hij(" ",_," ")}}function Tn(t,o){1&t&&(e.TgZ(0,"span",29),e.SDv(1,33),e.qZA())}function Sn(t,o){1&t&&(e.TgZ(0,"span",29),e.SDv(1,48),e.qZA())}function fn(t,o){if(1&t&&(e.TgZ(0,"div",7),e.TgZ(1,"label",41),e.SDv(2,42),e.qZA(),e.TgZ(3,"div",10),e.TgZ(4,"div",43),e._UZ(5,"input",44),e.TgZ(6,"span",45),e._UZ(7,"button",46),e._UZ(8,"cd-copy-2-clipboard-button",47),e.qZA(),e.qZA(),e.YNc(9,Sn,2,0,"span",15),e.qZA(),e.qZA()),2&t){const _=e.oxw(2),n=e.MAs(7);e.xp6(9),e.Q6J("ngIf",_.formGroup.showError("secret_key",n,"required"))}}function Cn(t,o){if(1&t&&(e.TgZ(0,"fieldset"),e.TgZ(1,"legend"),e.SDv(2,34),e.qZA(),e.TgZ(3,"div",7),e.TgZ(4,"div",35),e.TgZ(5,"div",36),e._UZ(6,"input",37),e.TgZ(7,"label",38),e.SDv(8,39),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.YNc(9,fn,10,1,"div",40),e.qZA()),2&t){const _=e.oxw();e.xp6(9),e.Q6J("ngIf",!_.editing&&!_.formGroup.getValue("generate_secret"))}}const pn=function(t){return{required:t}},Mn=function(){return["read","write"]};let mn=(()=>{class t{constructor(_,n,i){this.formBuilder=_,this.bsModalRef=n,this.actionLabels=i,this.submitAction=new e.vpe,this.editing=!0,this.subusers=[],this.resource="Subuser",this.createForm()}createForm(){this.formGroup=this.formBuilder.group({uid:[null],subuid:[null,[a.kI.required,this.subuserValidator()]],perm:[null,[a.kI.required]],generate_secret:[!0],secret_key:[null,[m.h.requiredIf({generate_secret:!1})]]})}subuserValidator(){const _=this;return n=>_.editing||(0,m.P)(n.value)?null:_.subusers.some(s=>u().isEqual(_.getSubuserName(s.id),n.value))?{subuserIdExists:!0}:null}getSubuserName(_){if(u().isEmpty(_))return _;const n=_.match(/([^:]+)(:(.+))?/);return u().isUndefined(n[3])?n[1]:n[3]}setEditing(_=!0){this.editing=_,this.action=this.editing?this.actionLabels.EDIT:this.actionLabels.CREATE}setValues(_,n="",i=""){this.formGroup.setValue({uid:_,subuid:this.getSubuserName(n),perm:i,generate_secret:!0,secret_key:null})}setSubusers(_){this.subusers=_}onSubmit(){const _=this.formGroup.value,n=new un;n.id=`${_.uid}:${_.subuid}`,n.permissions=_.perm,n.generate_secret=_.generate_secret,n.secret_key=_.secret_key,this.submitAction.emit(n),this.bsModalRef.close()}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(J.O),e.Y36(M.Kz),e.Y36(A.p4))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-user-subuser-modal"]],outputs:{submitAction:"submitAction"},decls:39,vars:26,consts:function(){let o,_,n,i,s,c,d,E,g,C,b,P,G,N;return o="" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",_="Username",n="Subuser",i="Permission",s="-- Select a permission --",c="read, write",d="full",E="This field is required.",g="The chosen subuser ID is already in use.",C="This field is required.",b="Swift key",P="Auto-generate secret",G="Secret key",N="This field is required.",[[3,"modalRef"],[1,"modal-title"],o,[1,"modal-content"],["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","uid",1,"cd-col-form-label"],_,[1,"cd-col-form-input"],["id","uid","type","text","formControlName","uid",1,"form-control",3,"readonly"],["for","subuid",1,"cd-col-form-label",3,"ngClass"],n,["id","subuid","type","text","formControlName","subuid","autofocus","",1,"form-control",3,"readonly"],["class","invalid-feedback",4,"ngIf"],["for","perm",1,"cd-col-form-label","required"],i,["id","perm","formControlName","perm",1,"form-control"],[3,"ngValue"],s,[3,"value",4,"ngFor","ngForOf"],["value","read-write"],c,["value","full-control"],d,[4,"ngIf"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],E,g,[3,"value"],C,b,[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"],P,["class","form-group row",4,"ngIf"],["for","secret_key",1,"cd-col-form-label","required"],G,[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"],N]},template:function(_,n){if(1&_&&(e.TgZ(0,"cd-modal",0),e.ynx(1,1),e.SDv(2,2),e.ALo(3,"titlecase"),e.ALo(4,"upperFirst"),e.BQk(),e.ynx(5,3),e.TgZ(6,"form",4,5),e.TgZ(8,"div",6),e.TgZ(9,"div",7),e.TgZ(10,"label",8),e.SDv(11,9),e.qZA(),e.TgZ(12,"div",10),e._UZ(13,"input",11),e.qZA(),e.qZA(),e.TgZ(14,"div",7),e.TgZ(15,"label",12),e.SDv(16,13),e.qZA(),e.TgZ(17,"div",10),e._UZ(18,"input",14),e.YNc(19,Rn,2,0,"span",15),e.YNc(20,gn,2,0,"span",15),e.qZA(),e.qZA(),e.TgZ(21,"div",7),e.TgZ(22,"label",16),e.SDv(23,17),e.qZA(),e.TgZ(24,"div",10),e.TgZ(25,"select",18),e.TgZ(26,"option",19),e.SDv(27,20),e.qZA(),e.YNc(28,En,2,2,"option",21),e.TgZ(29,"option",22),e.SDv(30,23),e.qZA(),e.TgZ(31,"option",24),e.SDv(32,25),e.qZA(),e.qZA(),e.YNc(33,Tn,2,0,"span",15),e.qZA(),e.qZA(),e.YNc(34,Cn,10,1,"fieldset",26),e.qZA(),e.TgZ(35,"div",27),e.TgZ(36,"cd-form-button-panel",28),e.NdJ("submitActionEvent",function(){return n.onSubmit()}),e.ALo(37,"titlecase"),e.ALo(38,"upperFirst"),e.qZA(),e.qZA(),e.qZA(),e.BQk(),e.qZA()),2&_){const i=e.MAs(7);e.Q6J("modalRef",n.bsModalRef),e.xp6(4),e.pQV(e.lcZ(3,15,n.action))(e.lcZ(4,17,n.resource)),e.QtT(2),e.xp6(2),e.Q6J("formGroup",n.formGroup),e.xp6(7),e.Q6J("readonly",!0),e.xp6(2),e.Q6J("ngClass",e.VKq(23,pn,!n.editing)),e.xp6(3),e.Q6J("readonly",n.editing),e.xp6(1),e.Q6J("ngIf",n.formGroup.showError("subuid",i,"required")),e.xp6(1),e.Q6J("ngIf",n.formGroup.showError("subuid",i,"subuserIdExists")),e.xp6(6),e.Q6J("ngValue",null),e.xp6(2),e.Q6J("ngForOf",e.DdM(25,Mn)),e.xp6(5),e.Q6J("ngIf",n.formGroup.showError("perm",i,"required")),e.xp6(1),e.Q6J("ngIf",!n.editing),e.xp6(2),e.Q6J("form",n.formGroup)("submitText",e.lcZ(37,19,n.action)+" "+e.lcZ(38,21,n.resource))}},directives:[fe.z,a._Y,a.JL,V.V,a.sg,H.P,q.o,a.Fj,X.b,a.JJ,a.u,f.mk,j.U,f.O5,a.EJ,a.YN,a.Kr,f.sg,ee.p,a.Wl,Ce.C,pe.s],pipes:[f.rS,K.m],styles:[""]}),t})();var An=r(13472);let Ye=(()=>{class t{constructor(_,n){this.activeModal=_,this.actionLabels=n,this.resource="Swift Key",this.action=this.actionLabels.SHOW}setValues(_,n){this.user=_,this.secret_key=n}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(M.Kz),e.Y36(A.p4))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-user-swift-key-modal"]],decls:24,vars:11,consts:function(){let o,_,n;return o="" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",_="Username",n="Secret key",[[3,"modalRef"],[1,"modal-title"],o,[1,"modal-content"],[1,"modal-body"],["novalidate",""],[1,"form-group","row"],["for","user",1,"cd-col-form-label"],_,[1,"cd-col-form-input"],["id","user","name","user","type","text",1,"form-control",3,"readonly","ngModel","ngModelChange"],["for","secret_key",1,"cd-col-form-label"],n,[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(_,n){1&_&&(e.TgZ(0,"cd-modal",0),e.ynx(1,1),e.SDv(2,2),e.ALo(3,"titlecase"),e.ALo(4,"upperFirst"),e.BQk(),e.ynx(5,3),e.TgZ(6,"div",4),e.TgZ(7,"form",5),e.TgZ(8,"div",6),e.TgZ(9,"label",7),e.SDv(10,8),e.qZA(),e.TgZ(11,"div",9),e.TgZ(12,"input",10),e.NdJ("ngModelChange",function(s){return n.user=s}),e.qZA(),e.qZA(),e.qZA(),e.TgZ(13,"div",6),e.TgZ(14,"label",11),e.SDv(15,12),e.qZA(),e.TgZ(16,"div",9),e.TgZ(17,"div",13),e.TgZ(18,"input",14),e.NdJ("ngModelChange",function(s){return n.secret_key=s}),e.qZA(),e.TgZ(19,"span",15),e._UZ(20,"button",16),e._UZ(21,"cd-copy-2-clipboard-button",17),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(22,"div",18),e.TgZ(23,"cd-back-button",19),e.NdJ("backAction",function(){return n.activeModal.close()}),e.qZA(),e.qZA(),e.BQk(),e.qZA()),2&_&&(e.Q6J("modalRef",n.activeModal),e.xp6(4),e.pQV(e.lcZ(3,7,n.action))(e.lcZ(4,9,n.resource)),e.QtT(2),e.xp6(8),e.Q6J("readonly",!0)("ngModel",n.user),e.xp6(6),e.Q6J("ngModel",n.secret_key)("readonly",!0))},directives:[fe.z,a._Y,a.JL,a.F,H.P,q.o,a.Fj,X.b,a.JJ,a.On,Ce.C,pe.s,An.W],pipes:[f.rS,K.m],styles:[""]}),t})();var bn=r(17932);function Pn(t,o){1&t&&(e.TgZ(0,"span",49),e.SDv(1,50),e.qZA())}function Gn(t,o){1&t&&(e.TgZ(0,"span",49),e.SDv(1,51),e.qZA())}function Nn(t,o){1&t&&(e.TgZ(0,"span",49),e.SDv(1,52),e.qZA())}function On(t,o){1&t&&(e.TgZ(0,"span",49),e.SDv(1,56),e.qZA())}function Un(t,o){1&t&&(e.TgZ(0,"span",49),e.SDv(1,57),e.qZA())}function Wn(t,o){if(1&t&&(e.TgZ(0,"div",8),e.TgZ(1,"label",53),e.SDv(2,54),e.qZA(),e.TgZ(3,"div",11),e._UZ(4,"input",55),e.YNc(5,On,2,0,"span",13),e.YNc(6,Un,2,0,"span",13),e.qZA(),e.qZA()),2&t){e.oxw();const _=e.MAs(2),n=e.oxw();e.xp6(4),e.Q6J("readonly",n.editing),e.xp6(1),e.Q6J("ngIf",n.userForm.showError("tenant",_,"pattern")),e.xp6(1),e.Q6J("ngIf",n.userForm.showError("tenant",_,"notUnique"))}}function Zn(t,o){1&t&&(e.TgZ(0,"span",49),e.SDv(1,58),e.qZA())}function $n(t,o){1&t&&(e.TgZ(0,"span",49),e.SDv(1,59),e.qZA())}function hn(t,o){1&t&&(e.TgZ(0,"span",49),e.SDv(1,60),e.qZA())}function In(t,o){1&t&&(e.TgZ(0,"span",49),e.SDv(1,63),e.qZA())}function vn(t,o){1&t&&(e.TgZ(0,"span",49),e.SDv(1,64),e.qZA())}function Fn(t,o){if(1&t&&(e.TgZ(0,"div",8),e._UZ(1,"label",61),e.TgZ(2,"div",11),e._UZ(3,"input",62),e.YNc(4,In,2,0,"span",13),e.YNc(5,vn,2,0,"span",13),e.qZA(),e.qZA()),2&t){e.oxw();const _=e.MAs(2),n=e.oxw();e.xp6(4),e.Q6J("ngIf",n.userForm.showError("max_buckets",_,"required")),e.xp6(1),e.Q6J("ngIf",n.userForm.showError("max_buckets",_,"min"))}}function Ln(t,o){1&t&&(e.TgZ(0,"span",49),e.SDv(1,76),e.qZA())}function Dn(t,o){if(1&t&&(e.TgZ(0,"div",8),e.TgZ(1,"label",69),e.SDv(2,70),e.qZA(),e.TgZ(3,"div",11),e.TgZ(4,"div",71),e._UZ(5,"input",72),e.TgZ(6,"span",73),e._UZ(7,"button",74),e._UZ(8,"cd-copy-2-clipboard-button",75),e.qZA(),e.qZA(),e.YNc(9,Ln,2,0,"span",13),e.qZA(),e.qZA()),2&t){e.oxw(2);const _=e.MAs(2),n=e.oxw();e.xp6(9),e.Q6J("ngIf",n.userForm.showError("access_key",_,"required"))}}function xn(t,o){1&t&&(e.TgZ(0,"span",49),e.SDv(1,82),e.qZA())}function yn(t,o){if(1&t&&(e.TgZ(0,"div",8),e.TgZ(1,"label",77),e.SDv(2,78),e.qZA(),e.TgZ(3,"div",11),e.TgZ(4,"div",71),e._UZ(5,"input",79),e.TgZ(6,"span",73),e._UZ(7,"button",80),e._UZ(8,"cd-copy-2-clipboard-button",81),e.qZA(),e.qZA(),e.YNc(9,xn,2,0,"span",13),e.qZA(),e.qZA()),2&t){e.oxw(2);const _=e.MAs(2),n=e.oxw();e.xp6(9),e.Q6J("ngIf",n.userForm.showError("secret_key",_,"required"))}}function qn(t,o){if(1&t&&(e.TgZ(0,"fieldset"),e.TgZ(1,"legend"),e.SDv(2,65),e.qZA(),e.TgZ(3,"div",8),e.TgZ(4,"div",14),e.TgZ(5,"div",15),e._UZ(6,"input",66),e.TgZ(7,"label",67),e.SDv(8,68),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.YNc(9,Dn,10,1,"div",19),e.YNc(10,yn,10,1,"div",19),e.qZA()),2&t){const _=e.oxw(2);e.xp6(9),e.Q6J("ngIf",!_.editing&&!_.userForm.getValue("generate_key")),e.xp6(1),e.Q6J("ngIf",!_.editing&&!_.userForm.getValue("generate_key"))}}function wn(t,o){1&t&&(e.TgZ(0,"span",92),e.TgZ(1,"span",93),e.SDv(2,94),e.qZA(),e.qZA())}const L=function(t){return[t]};function kn(t,o){if(1&t){const _=e.EpF();e.TgZ(0,"span"),e.TgZ(1,"div",71),e.TgZ(2,"div",95),e.TgZ(3,"span",96),e._UZ(4,"i"),e.qZA(),e.qZA(),e._UZ(5,"input",97),e.TgZ(6,"div",98),e.TgZ(7,"span",96),e._UZ(8,"i"),e.qZA(),e.qZA(),e._UZ(9,"input",97),e.TgZ(10,"span",73),e.TgZ(11,"button",99),e.NdJ("click",function(){const s=e.CHM(_).index;return e.oxw(3).showSubuserModal(s)}),e._UZ(12,"i",89),e.qZA(),e.TgZ(13,"button",100),e.NdJ("click",function(){const s=e.CHM(_).index;return e.oxw(3).deleteSubuser(s)}),e._UZ(14,"i",89),e.qZA(),e.qZA(),e.qZA(),e._UZ(15,"span",93),e.qZA()}if(2&t){const _=o.$implicit,n=e.oxw(3);e.xp6(4),e.Tol(n.icons.user),e.xp6(1),e.s9C("value",_.id),e.xp6(3),e.Tol(n.icons.share),e.xp6(1),e.s9C("value","full-control"===_.permissions?"full":_.permissions),e.xp6(3),e.Q6J("ngClass",e.VKq(10,L,n.icons.edit)),e.xp6(2),e.Q6J("ngClass",e.VKq(12,L,n.icons.destroy))}}function Bn(t,o){if(1&t){const _=e.EpF();e.TgZ(0,"fieldset"),e.TgZ(1,"legend"),e.SDv(2,83),e.qZA(),e.TgZ(3,"div",84),e.TgZ(4,"div",14),e.YNc(5,wn,3,0,"span",85),e.YNc(6,kn,16,14,"span",86),e.TgZ(7,"div",84),e.TgZ(8,"div",87),e.TgZ(9,"button",88),e.NdJ("click",function(){return e.CHM(_),e.oxw(2).showSubuserModal()}),e._UZ(10,"i",89),e.ynx(11),e.SDv(12,90),e.ALo(13,"titlecase"),e.ALo(14,"upperFirst"),e.BQk(),e.qZA(),e.qZA(),e.qZA(),e._UZ(15,"span",91),e.qZA(),e.qZA(),e.qZA()}if(2&t){const _=e.oxw(2);e.xp6(5),e.Q6J("ngIf",0===_.subusers.length),e.xp6(1),e.Q6J("ngForOf",_.subusers),e.xp6(4),e.Q6J("ngClass",e.VKq(9,L,_.icons.add)),e.xp6(4),e.pQV(e.lcZ(13,5,_.actionLabels.CREATE))(e.lcZ(14,7,_.subuserLabel)),e.QtT(12)}}function Hn(t,o){1&t&&(e.TgZ(0,"span",92),e.TgZ(1,"span",93),e.SDv(2,106),e.qZA(),e.qZA())}function Xn(t,o){if(1&t){const _=e.EpF();e.TgZ(0,"span"),e.TgZ(1,"div",71),e.TgZ(2,"div",95),e.TgZ(3,"div",96),e._UZ(4,"i"),e.qZA(),e.qZA(),e._UZ(5,"input",97),e.TgZ(6,"span",73),e.TgZ(7,"button",107),e.NdJ("click",function(){const s=e.CHM(_).index;return e.oxw(3).showS3KeyModal(s)}),e._UZ(8,"i",89),e.qZA(),e.TgZ(9,"button",108),e.NdJ("click",function(){const s=e.CHM(_).index;return e.oxw(3).deleteS3Key(s)}),e._UZ(10,"i",89),e.qZA(),e.qZA(),e.qZA(),e._UZ(11,"span",93),e.qZA()}if(2&t){const _=o.$implicit,n=e.oxw(3);e.xp6(4),e.Tol(n.icons.key),e.xp6(1),e.s9C("value",_.user),e.xp6(3),e.Q6J("ngClass",e.VKq(6,L,n.icons.show)),e.xp6(2),e.Q6J("ngClass",e.VKq(8,L,n.icons.destroy))}}function Kn(t,o){1&t&&(e.TgZ(0,"span",92),e.TgZ(1,"span",93),e.SDv(2,109),e.qZA(),e.qZA())}function zn(t,o){if(1&t){const _=e.EpF();e.TgZ(0,"span"),e.TgZ(1,"div",71),e.TgZ(2,"div",95),e.TgZ(3,"span",96),e._UZ(4,"i"),e.qZA(),e.qZA(),e._UZ(5,"input",97),e.TgZ(6,"span",73),e.TgZ(7,"button",110),e.NdJ("click",function(){const s=e.CHM(_).index;return e.oxw(3).showSwiftKeyModal(s)}),e._UZ(8,"i",89),e.qZA(),e.qZA(),e.qZA(),e._UZ(9,"span",93),e.qZA()}if(2&t){const _=o.$implicit,n=e.oxw(3);e.xp6(4),e.Tol(n.icons.key),e.xp6(1),e.s9C("value",_.user),e.xp6(3),e.Q6J("ngClass",e.VKq(5,L,n.icons.show))}}function Qn(t,o){if(1&t){const _=e.EpF();e.TgZ(0,"fieldset"),e.TgZ(1,"legend"),e.SDv(2,101),e.qZA(),e.TgZ(3,"div",8),e.TgZ(4,"label",61),e.SDv(5,102),e.qZA(),e.TgZ(6,"div",11),e.YNc(7,Hn,3,0,"span",85),e.YNc(8,Xn,12,10,"span",86),e.TgZ(9,"div",84),e.TgZ(10,"div",87),e.TgZ(11,"button",103),e.NdJ("click",function(){return e.CHM(_),e.oxw(2).showS3KeyModal()}),e._UZ(12,"i",89),e.ynx(13),e.SDv(14,104),e.ALo(15,"titlecase"),e.ALo(16,"upperFirst"),e.BQk(),e.qZA(),e.qZA(),e.qZA(),e._UZ(17,"span",91),e.qZA(),e._UZ(18,"hr"),e.qZA(),e.TgZ(19,"div",8),e.TgZ(20,"label",61),e.SDv(21,105),e.qZA(),e.TgZ(22,"div",11),e.YNc(23,Kn,3,0,"span",85),e.YNc(24,zn,10,7,"span",86),e.qZA(),e.qZA(),e.qZA()}if(2&t){const _=e.oxw(2);e.xp6(7),e.Q6J("ngIf",0===_.s3Keys.length),e.xp6(1),e.Q6J("ngForOf",_.s3Keys),e.xp6(4),e.Q6J("ngClass",e.VKq(11,L,_.icons.add)),e.xp6(4),e.pQV(e.lcZ(15,7,_.actionLabels.CREATE))(e.lcZ(16,9,_.s3keyLabel)),e.QtT(14),e.xp6(7),e.Q6J("ngIf",0===_.swiftKeys.length),e.xp6(1),e.Q6J("ngForOf",_.swiftKeys)}}function Yn(t,o){1&t&&(e.TgZ(0,"span",92),e.TgZ(1,"span",93),e.SDv(2,114),e.qZA(),e.qZA())}function Jn(t,o){if(1&t){const _=e.EpF();e.TgZ(0,"span"),e.TgZ(1,"div",71),e.TgZ(2,"span",95),e.TgZ(3,"div",96),e._UZ(4,"i"),e.qZA(),e.qZA(),e._UZ(5,"input",97),e.TgZ(6,"span",73),e.TgZ(7,"button",115),e.NdJ("click",function(){const s=e.CHM(_).index;return e.oxw(3).showCapabilityModal(s)}),e._UZ(8,"i",89),e.qZA(),e.TgZ(9,"button",116),e.NdJ("click",function(){const s=e.CHM(_).index;return e.oxw(3).deleteCapability(s)}),e._UZ(10,"i",89),e.qZA(),e.qZA(),e.qZA(),e._UZ(11,"span",93),e.qZA()}if(2&t){const _=o.$implicit,n=e.oxw(3);e.xp6(4),e.Tol(n.icons.share),e.xp6(1),e.hYB("value","",_.type,":",_.perm,""),e.xp6(3),e.Q6J("ngClass",e.VKq(7,L,n.icons.edit)),e.xp6(2),e.Q6J("ngClass",e.VKq(9,L,n.icons.destroy))}}function Vn(t,o){if(1&t){const _=e.EpF();e.TgZ(0,"fieldset"),e.TgZ(1,"legend"),e.SDv(2,111),e.qZA(),e.TgZ(3,"div",8),e.TgZ(4,"div",14),e.YNc(5,Yn,3,0,"span",85),e.YNc(6,Jn,12,11,"span",86),e.TgZ(7,"div",84),e.TgZ(8,"div",87),e.TgZ(9,"button",112),e.NdJ("click",function(){return e.CHM(_),e.oxw(2).showCapabilityModal()}),e.ALo(10,"pipeFunction"),e.ALo(11,"pipeFunction"),e._UZ(12,"i",89),e.ynx(13),e.SDv(14,113),e.ALo(15,"titlecase"),e.ALo(16,"upperFirst"),e.BQk(),e.qZA(),e.qZA(),e.qZA(),e._UZ(17,"span",91),e.qZA(),e.qZA(),e.qZA()}if(2&t){const _=e.oxw(2);e.xp6(5),e.Q6J("ngIf",0===_.capabilities.length),e.xp6(1),e.Q6J("ngForOf",_.capabilities),e.xp6(3),e.Q6J("disabled",e.xi3(10,7,_.capabilities,_.hasAllCapabilities))("disableTooltip",!e.xi3(11,10,_.capabilities,_.hasAllCapabilities)),e.xp6(3),e.Q6J("ngClass",e.VKq(17,L,_.icons.add)),e.xp6(4),e.pQV(e.lcZ(15,13,_.actionLabels.ADD))(e.lcZ(16,15,_.capabilityLabel)),e.QtT(14)}}function jn(t,o){1&t&&(e.TgZ(0,"div",8),e.TgZ(1,"div",14),e.TgZ(2,"div",15),e._UZ(3,"input",117),e.TgZ(4,"label",118),e.SDv(5,119),e.qZA(),e.qZA(),e.qZA(),e.qZA())}function eo(t,o){1&t&&(e.TgZ(0,"span",49),e.SDv(1,123),e.qZA())}function _o(t,o){1&t&&(e.TgZ(0,"span",49),e.SDv(1,124),e.qZA())}function to(t,o){if(1&t&&(e.TgZ(0,"div",8),e.TgZ(1,"label",120),e.SDv(2,121),e.qZA(),e.TgZ(3,"div",11),e._UZ(4,"input",122),e.YNc(5,eo,2,0,"span",13),e.YNc(6,_o,2,0,"span",13),e.qZA(),e.qZA()),2&t){e.oxw();const _=e.MAs(2),n=e.oxw();e.xp6(5),e.Q6J("ngIf",n.userForm.showError("user_quota_max_size",_,"required")),e.xp6(1),e.Q6J("ngIf",n.userForm.showError("user_quota_max_size",_,"quotaMaxSize"))}}function no(t,o){1&t&&(e.TgZ(0,"div",8),e.TgZ(1,"div",14),e.TgZ(2,"div",15),e._UZ(3,"input",125),e.TgZ(4,"label",126),e.SDv(5,127),e.qZA(),e.qZA(),e.qZA(),e.qZA())}function oo(t,o){1&t&&(e.TgZ(0,"span",49),e.SDv(1,131),e.qZA())}function io(t,o){1&t&&(e.TgZ(0,"span",49),e.SDv(1,132),e.qZA())}function so(t,o){if(1&t&&(e.TgZ(0,"div",8),e.TgZ(1,"label",128),e.SDv(2,129),e.qZA(),e.TgZ(3,"div",11),e._UZ(4,"input",130),e.YNc(5,oo,2,0,"span",13),e.YNc(6,io,2,0,"span",13),e.qZA(),e.qZA()),2&t){e.oxw();const _=e.MAs(2),n=e.oxw();e.xp6(5),e.Q6J("ngIf",n.userForm.showError("user_quota_max_objects",_,"required")),e.xp6(1),e.Q6J("ngIf",n.userForm.showError("user_quota_max_objects",_,"min"))}}function ao(t,o){1&t&&(e.TgZ(0,"div",8),e.TgZ(1,"div",14),e.TgZ(2,"div",15),e._UZ(3,"input",133),e.TgZ(4,"label",134),e.SDv(5,135),e.qZA(),e.qZA(),e.qZA(),e.qZA())}function ro(t,o){1&t&&(e.TgZ(0,"span",49),e.SDv(1,139),e.qZA())}function lo(t,o){1&t&&(e.TgZ(0,"span",49),e.SDv(1,140),e.qZA())}function co(t,o){if(1&t&&(e.TgZ(0,"div",8),e.TgZ(1,"label",136),e.SDv(2,137),e.qZA(),e.TgZ(3,"div",11),e._UZ(4,"input",138),e.YNc(5,ro,2,0,"span",13),e.YNc(6,lo,2,0,"span",13),e.qZA(),e.qZA()),2&t){e.oxw();const _=e.MAs(2),n=e.oxw();e.xp6(5),e.Q6J("ngIf",n.userForm.showError("bucket_quota_max_size",_,"required")),e.xp6(1),e.Q6J("ngIf",n.userForm.showError("bucket_quota_max_size",_,"quotaMaxSize"))}}function uo(t,o){1&t&&(e.TgZ(0,"div",8),e.TgZ(1,"div",14),e.TgZ(2,"div",15),e._UZ(3,"input",141),e.TgZ(4,"label",142),e.SDv(5,143),e.qZA(),e.qZA(),e.qZA(),e.qZA())}function Ro(t,o){1&t&&(e.TgZ(0,"span",49),e.SDv(1,147),e.qZA())}function go(t,o){1&t&&(e.TgZ(0,"span",49),e.SDv(1,148),e.qZA())}function Eo(t,o){if(1&t&&(e.TgZ(0,"div",8),e.TgZ(1,"label",144),e.SDv(2,145),e.qZA(),e.TgZ(3,"div",11),e._UZ(4,"input",146),e.YNc(5,Ro,2,0,"span",13),e.YNc(6,go,2,0,"span",13),e.qZA(),e.qZA()),2&t){e.oxw();const _=e.MAs(2),n=e.oxw();e.xp6(5),e.Q6J("ngIf",n.userForm.showError("bucket_quota_max_objects",_,"required")),e.xp6(1),e.Q6J("ngIf",n.userForm.showError("bucket_quota_max_objects",_,"min"))}}const Je=function(t){return{required:t}};function To(t,o){if(1&t){const _=e.EpF();e.TgZ(0,"div",1),e.TgZ(1,"form",2,3),e.TgZ(3,"div",4),e.TgZ(4,"div",5),e.SDv(5,6),e.ALo(6,"titlecase"),e.ALo(7,"upperFirst"),e.qZA(),e.TgZ(8,"div",7),e.TgZ(9,"div",8),e.TgZ(10,"label",9),e.SDv(11,10),e.qZA(),e.TgZ(12,"div",11),e._UZ(13,"input",12),e.YNc(14,Pn,2,0,"span",13),e.YNc(15,Gn,2,0,"span",13),e.YNc(16,Nn,2,0,"span",13),e.qZA(),e.qZA(),e.TgZ(17,"div",8),e.TgZ(18,"div",14),e.TgZ(19,"div",15),e.TgZ(20,"input",16),e.NdJ("click",function(){return e.CHM(_),e.oxw().updateFieldsWhenTenanted()}),e.qZA(),e.TgZ(21,"label",17),e.SDv(22,18),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.YNc(23,Wn,7,3,"div",19),e.TgZ(24,"div",8),e.TgZ(25,"label",20),e.SDv(26,21),e.qZA(),e.TgZ(27,"div",11),e._UZ(28,"input",22),e.YNc(29,Zn,2,0,"span",13),e.qZA(),e.qZA(),e.TgZ(30,"div",8),e.TgZ(31,"label",23),e.SDv(32,24),e.qZA(),e.TgZ(33,"div",11),e._UZ(34,"input",25),e.YNc(35,$n,2,0,"span",13),e.YNc(36,hn,2,0,"span",13),e.qZA(),e.qZA(),e.TgZ(37,"div",8),e.TgZ(38,"label",26),e.SDv(39,27),e.qZA(),e.TgZ(40,"div",11),e.TgZ(41,"select",28),e.NdJ("change",function(i){return e.CHM(_),e.oxw().onMaxBucketsModeChange(i.target.value)}),e.TgZ(42,"option",29),e.SDv(43,30),e.qZA(),e.TgZ(44,"option",31),e.SDv(45,32),e.qZA(),e.TgZ(46,"option",33),e.SDv(47,34),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.YNc(48,Fn,6,2,"div",19),e.TgZ(49,"div",8),e.TgZ(50,"div",14),e.TgZ(51,"div",15),e._UZ(52,"input",35),e.TgZ(53,"label",36),e.SDv(54,37),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.YNc(55,qn,11,2,"fieldset",38),e.YNc(56,Bn,16,11,"fieldset",38),e.YNc(57,Qn,25,13,"fieldset",38),e.YNc(58,Vn,18,19,"fieldset",38),e.TgZ(59,"fieldset"),e.TgZ(60,"legend"),e.SDv(61,39),e.qZA(),e.TgZ(62,"div",8),e.TgZ(63,"div",14),e.TgZ(64,"div",15),e._UZ(65,"input",40),e.TgZ(66,"label",41),e.SDv(67,42),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.YNc(68,jn,6,0,"div",19),e.YNc(69,to,7,2,"div",19),e.YNc(70,no,6,0,"div",19),e.YNc(71,so,7,2,"div",19),e.qZA(),e.TgZ(72,"fieldset"),e.TgZ(73,"legend"),e.SDv(74,43),e.qZA(),e.TgZ(75,"div",8),e.TgZ(76,"div",14),e.TgZ(77,"div",15),e._UZ(78,"input",44),e.TgZ(79,"label",45),e.SDv(80,46),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.YNc(81,ao,6,0,"div",19),e.YNc(82,co,7,2,"div",19),e.YNc(83,uo,6,0,"div",19),e.YNc(84,Eo,7,2,"div",19),e.qZA(),e.qZA(),e.TgZ(85,"div",47),e.TgZ(86,"cd-form-button-panel",48),e.NdJ("submitActionEvent",function(){return e.CHM(_),e.oxw().onSubmit()}),e.ALo(87,"titlecase"),e.ALo(88,"upperFirst"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()}if(2&t){const _=e.MAs(2),n=e.oxw();e.xp6(1),e.Q6J("formGroup",n.userForm),e.xp6(6),e.pQV(e.lcZ(6,29,n.action))(e.lcZ(7,31,n.resource)),e.QtT(5),e.xp6(3),e.Q6J("ngClass",e.VKq(37,Je,!n.editing)),e.xp6(3),e.Q6J("readonly",n.editing),e.xp6(1),e.Q6J("ngIf",n.userForm.showError("user_id",_,"required")),e.xp6(1),e.Q6J("ngIf",n.userForm.showError("user_id",_,"pattern")),e.xp6(1),e.Q6J("ngIf",!n.userForm.getValue("show_tenant")&&n.userForm.showError("user_id",_,"notUnique")),e.xp6(4),e.Q6J("readonly",!0),e.xp6(3),e.Q6J("ngIf",n.userForm.getValue("show_tenant")),e.xp6(2),e.Q6J("ngClass",e.VKq(39,Je,!n.editing)),e.xp6(4),e.Q6J("ngIf",n.userForm.showError("display_name",_,"required")),e.xp6(6),e.Q6J("ngIf",n.userForm.showError("email",_,"email")),e.xp6(1),e.Q6J("ngIf",n.userForm.showError("email",_,"notUnique")),e.xp6(12),e.Q6J("ngIf",1==n.userForm.get("max_buckets_mode").value),e.xp6(7),e.Q6J("ngIf",!n.editing),e.xp6(1),e.Q6J("ngIf",n.editing),e.xp6(1),e.Q6J("ngIf",n.editing),e.xp6(1),e.Q6J("ngIf",n.editing),e.xp6(10),e.Q6J("ngIf",n.userForm.controls.user_quota_enabled.value),e.xp6(1),e.Q6J("ngIf",n.userForm.controls.user_quota_enabled.value&&!n.userForm.getValue("user_quota_max_size_unlimited")),e.xp6(1),e.Q6J("ngIf",n.userForm.controls.user_quota_enabled.value),e.xp6(1),e.Q6J("ngIf",n.userForm.controls.user_quota_enabled.value&&!n.userForm.getValue("user_quota_max_objects_unlimited")),e.xp6(10),e.Q6J("ngIf",n.userForm.controls.bucket_quota_enabled.value),e.xp6(1),e.Q6J("ngIf",n.userForm.controls.bucket_quota_enabled.value&&!n.userForm.getValue("bucket_quota_max_size_unlimited")),e.xp6(1),e.Q6J("ngIf",n.userForm.controls.bucket_quota_enabled.value),e.xp6(1),e.Q6J("ngIf",n.userForm.controls.bucket_quota_enabled.value&&!n.userForm.getValue("bucket_quota_max_objects_unlimited")),e.xp6(2),e.Q6J("form",n.userForm)("submitText",e.lcZ(87,33,n.action)+" "+e.lcZ(88,35,n.resource))}}let Ve=(()=>{class t extends Ie.E{constructor(_,n,i,s,c,d,E){super(),this.formBuilder=_,this.route=n,this.router=i,this.rgwUserService=s,this.modalService=c,this.notificationService=d,this.actionLabels=E,this.editing=!1,this.submitObservables=[],this.icons=D.P,this.subusers=[],this.s3Keys=[],this.swiftKeys=[],this.capabilities=[],this.showTenant=!1,this.previousTenant=null,this.resource="user",this.subuserLabel="subuser",this.s3keyLabel="S3 Key",this.capabilityLabel="capability",this.editing=this.router.url.startsWith(`/rgw/user/${A.MQ.EDIT}`),this.action=this.editing?this.actionLabels.EDIT:this.actionLabels.CREATE,this.createForm()}createForm(){this.userForm=this.formBuilder.group({user_id:[null,[a.kI.required,a.kI.pattern(/^[a-zA-Z0-9!@#%^&*()_-]+$/)],this.editing?[]:[m.h.unique(this.rgwUserService.exists,this.rgwUserService,()=>this.userForm.getValue("tenant"))]],show_tenant:[this.editing],tenant:[null,[a.kI.pattern(/^[a-zA-Z0-9!@#%^&*()_-]+$/)],this.editing?[]:[m.h.unique(this.rgwUserService.exists,this.rgwUserService,()=>this.userForm.getValue("user_id"),!0)]],display_name:[null,[a.kI.required]],email:[null,[m.h.email],[m.h.unique(this.rgwUserService.emailExists,this.rgwUserService)]],max_buckets_mode:[1],max_buckets:[1e3,[m.h.requiredIf({max_buckets_mode:"1"}),m.h.number(!1)]],suspended:[!1],generate_key:[!0],access_key:[null,[m.h.requiredIf({generate_key:!1})]],secret_key:[null,[m.h.requiredIf({generate_key:!1})]],user_quota_enabled:[!1],user_quota_max_size_unlimited:[!0],user_quota_max_size:[null,[m.h.composeIf({user_quota_enabled:!0,user_quota_max_size_unlimited:!1},[a.kI.required,this.quotaMaxSizeValidator])]],user_quota_max_objects_unlimited:[!0],user_quota_max_objects:[null,[m.h.requiredIf({user_quota_enabled:!0,user_quota_max_objects_unlimited:!1})]],bucket_quota_enabled:[!1],bucket_quota_max_size_unlimited:[!0],bucket_quota_max_size:[null,[m.h.composeIf({bucket_quota_enabled:!0,bucket_quota_max_size_unlimited:!1},[a.kI.required,this.quotaMaxSizeValidator])]],bucket_quota_max_objects_unlimited:[!0],bucket_quota_max_objects:[null,[m.h.requiredIf({bucket_quota_enabled:!0,bucket_quota_max_objects_unlimited:!1})]]})}ngOnInit(){this.route.params.subscribe(_=>{if(!_.hasOwnProperty("uid"))return void this.loadingReady();const n=decodeURIComponent(_.uid),i=[];i.push(this.rgwUserService.get(n)),i.push(this.rgwUserService.getQuota(n)),(0,Y.D)(i).subscribe(s=>{const c=u().clone(this.userForm.value);let d=u().pick(s[0],u().keys(this.userForm.value));switch(d.max_buckets){case-1:d.max_buckets_mode=-1,d.max_buckets="";break;case 0:d.max_buckets_mode=0,d.max_buckets="";break;default:d.max_buckets_mode=1}["user","bucket"].forEach(g=>{const C=s[1][g+"_quota"];d[g+"_quota_enabled"]=C.enabled,C.max_size<0?(d[g+"_quota_max_size_unlimited"]=!0,d[g+"_quota_max_size"]=null):(d[g+"_quota_max_size_unlimited"]=!1,d[g+"_quota_max_size"]=`${C.max_size} B`),C.max_objects<0?(d[g+"_quota_max_objects_unlimited"]=!0,d[g+"_quota_max_objects"]=null):(d[g+"_quota_max_objects_unlimited"]=!1,d[g+"_quota_max_objects"]=C.max_objects)}),d=u().merge(c,d),this.userForm.setValue(d),this.subusers=s[0].subusers,this.s3Keys=s[0].keys,this.swiftKeys=s[0].swift_keys;const E={"read, write":"*"};s[0].caps.forEach(g=>{g.perm in E&&(g.perm=E[g.perm])}),this.capabilities=s[0].caps,this.loadingReady()},()=>{this.loadingError()})})}goToListView(){this.router.navigate(["/rgw/user"])}onSubmit(){let _;if(this.userForm.pristine)return void this.goToListView();const n=this.getUID();if(this.editing){if(this._isGeneralDirty()){const i=this._getUpdateArgs();this.submitObservables.push(this.rgwUserService.update(n,i))}_="Updated Object Gateway user '" + n + "'"}else{const i=this._getCreateArgs();this.submitObservables.push(this.rgwUserService.create(i)),_="Created Object Gateway user '" + n + "'"}if(this._isUserQuotaDirty()){const i=this._getUserQuotaArgs();this.submitObservables.push(this.rgwUserService.updateQuota(n,i))}if(this._isBucketQuotaDirty()){const i=this._getBucketQuotaArgs();this.submitObservables.push(this.rgwUserService.updateQuota(n,i))}(0,Bt.z)(...this.submitObservables).subscribe({error:()=>{this.userForm.setErrors({cdSubmitButton:!0})},complete:()=>{this.notificationService.show(Ae.k.success,_),this.goToListView()}})}updateFieldsWhenTenanted(){this.showTenant=this.userForm.getValue("show_tenant"),this.showTenant?(this.userForm.get("user_id").markAsTouched(),this.previousTenant=this.userForm.get("tenant").value,this.userForm.get("tenant").patchValue(null)):(this.userForm.get("user_id").markAsUntouched(),this.userForm.get("tenant").patchValue(this.previousTenant))}getUID(){var _;let n=this.userForm.getValue("user_id");const i=null===(_=this.userForm)||void 0===_?void 0:_.getValue("tenant");return i&&i.length>0&&(n=`${this.userForm.getValue("tenant")}$${n}`),n}quotaMaxSizeValidator(_){return(0,m.P)(_.value)?null:null===RegExp("^(\\d+(\\.\\d+)?)\\s*(B|K(B|iB)?|M(B|iB)?|G(B|iB)?|T(B|iB)?)?$","i").exec(_.value)||(new Ge.H).toBytes(_.value)<1024?{quotaMaxSize:!0}:null}setSubuser(_,n){const i={"full-control":"full","read-write":"readwrite"},s=this.getUID();this.submitObservables.push(this.rgwUserService.createSubuser(s,{subuser:_.id,access:_.permissions in i?i[_.permissions]:_.permissions,key_type:"swift",secret_key:_.secret_key,generate_secret:_.generate_secret?"true":"false"})),u().isNumber(n)?this.subusers[n]=_:(this.subusers.push(_),this.swiftKeys.push({user:_.id,secret_key:_.generate_secret?"Apply your changes first...":_.secret_key})),this.userForm.markAsDirty()}deleteSubuser(_){const n=this.subusers[_];this.submitObservables.push(this.rgwUserService.deleteSubuser(this.getUID(),n.id)),this.s3Keys=this.s3Keys.filter(i=>i.user!==n.id),this.swiftKeys=this.swiftKeys.filter(i=>i.user!==n.id),this.subusers.splice(_,1),this.userForm.markAsDirty()}setCapability(_,n){const i=this.getUID();if(u().isNumber(n)){const s=this.capabilities[n];this.submitObservables.push(this.rgwUserService.deleteCapability(i,s.type,s.perm)),this.submitObservables.push(this.rgwUserService.addCapability(i,_.type,_.perm)),this.capabilities[n]=_}else this.submitObservables.push(this.rgwUserService.addCapability(i,_.type,_.perm)),this.capabilities=[...this.capabilities,_];this.userForm.markAsDirty()}deleteCapability(_){const n=this.capabilities[_];this.submitObservables.push(this.rgwUserService.deleteCapability(this.getUID(),n.type,n.perm)),this.capabilities.splice(_,1),this.capabilities=[...this.capabilities],this.userForm.markAsDirty()}hasAllCapabilities(_){return!u().difference(ze.getAll(),u().map(_,"type")).length}setS3Key(_,n){if(!u().isNumber(n)){const i=_.user.match(/([^:]+)(:(.+))?/),s=i[1],c={subuser:i[2]?i[3]:"",generate_key:_.generate_key?"true":"false"};"false"===c.generate_key&&(u().isNil(_.access_key)||(c.access_key=_.access_key),u().isNil(_.secret_key)||(c.secret_key=_.secret_key)),this.submitObservables.push(this.rgwUserService.addS3Key(s,c)),this.s3Keys.push({user:_.user,access_key:_.generate_key?"Apply your changes first...":_.access_key,secret_key:_.generate_key?"Apply your changes first...":_.secret_key})}this.userForm.markAsDirty()}deleteS3Key(_){const n=this.s3Keys[_];this.submitObservables.push(this.rgwUserService.deleteS3Key(this.getUID(),n.access_key)),this.s3Keys.splice(_,1),this.userForm.markAsDirty()}showSubuserModal(_){const n=this.getUID(),i=this.modalService.show(mn);if(u().isNumber(_)){const s=this.subusers[_];i.componentInstance.setEditing(),i.componentInstance.setValues(n,s.id,s.permissions)}else i.componentInstance.setEditing(!1),i.componentInstance.setValues(n),i.componentInstance.setSubusers(this.subusers);i.componentInstance.submitAction.subscribe(s=>{this.setSubuser(s,_)})}showS3KeyModal(_){const n=this.modalService.show(Qe);if(u().isNumber(_)){const i=this.s3Keys[_];n.componentInstance.setViewing(),n.componentInstance.setValues(i.user,i.access_key,i.secret_key)}else{const i=this._getS3KeyUserCandidates();n.componentInstance.setViewing(!1),n.componentInstance.setUserCandidates(i),n.componentInstance.submitAction.subscribe(s=>{this.setS3Key(s)})}}showSwiftKeyModal(_){const n=this.modalService.show(Ye),i=this.swiftKeys[_];n.componentInstance.setValues(i.user,i.secret_key)}showCapabilityModal(_){const n=this.modalService.show(en);if(u().isNumber(_)){const i=this.capabilities[_];n.componentInstance.setEditing(),n.componentInstance.setValues(i.type,i.perm)}else n.componentInstance.setEditing(!1),n.componentInstance.setCapabilities(this.capabilities);n.componentInstance.submitAction.subscribe(i=>{this.setCapability(i,_)})}_isGeneralDirty(){return["display_name","email","max_buckets_mode","max_buckets","suspended"].some(_=>this.userForm.get(_).dirty)}_isUserQuotaDirty(){return["user_quota_enabled","user_quota_max_size_unlimited","user_quota_max_size","user_quota_max_objects_unlimited","user_quota_max_objects"].some(_=>this.userForm.get(_).dirty)}_isBucketQuotaDirty(){return["bucket_quota_enabled","bucket_quota_max_size_unlimited","bucket_quota_max_size","bucket_quota_max_objects_unlimited","bucket_quota_max_objects"].some(_=>this.userForm.get(_).dirty)}_getCreateArgs(){const _={uid:this.getUID(),display_name:this.userForm.getValue("display_name"),suspended:this.userForm.getValue("suspended"),email:"",max_buckets:this.userForm.getValue("max_buckets"),generate_key:this.userForm.getValue("generate_key"),access_key:"",secret_key:""},n=this.userForm.getValue("email");u().isString(n)&&n.length>0&&u().merge(_,{email:n}),this.userForm.getValue("generate_key")||u().merge(_,{generate_key:!1,access_key:this.userForm.getValue("access_key"),secret_key:this.userForm.getValue("secret_key")});const s=parseInt(this.userForm.getValue("max_buckets_mode"),10);return u().includes([-1,0],s)&&u().merge(_,{max_buckets:s}),_}_getUpdateArgs(){const _={},n=["display_name","email","max_buckets","suspended"];for(const s of n)_[s]=this.userForm.getValue(s);const i=parseInt(this.userForm.getValue("max_buckets_mode"),10);return u().includes([-1,0],i)&&(_.max_buckets=i),_}_getUserQuotaArgs(){const _={quota_type:"user",enabled:this.userForm.getValue("user_quota_enabled"),max_size_kb:-1,max_objects:-1};if(!this.userForm.getValue("user_quota_max_size_unlimited")){const n=(new Ge.H).toBytes(this.userForm.getValue("user_quota_max_size"));_.max_size_kb=(n/1024).toFixed(0)}return this.userForm.getValue("user_quota_max_objects_unlimited")||(_.max_objects=this.userForm.getValue("user_quota_max_objects")),_}_getBucketQuotaArgs(){const _={quota_type:"bucket",enabled:this.userForm.getValue("bucket_quota_enabled"),max_size_kb:-1,max_objects:-1};if(!this.userForm.getValue("bucket_quota_max_size_unlimited")){const n=(new Ge.H).toBytes(this.userForm.getValue("bucket_quota_max_size"));_.max_size_kb=(n/1024).toFixed(0)}return this.userForm.getValue("bucket_quota_max_objects_unlimited")||(_.max_objects=this.userForm.getValue("bucket_quota_max_objects")),_}_getS3KeyUserCandidates(){let _=[];const n=this.getUID();return u().isString(n)&&!u().isEmpty(n)&&_.push(n),this.subusers.forEach(i=>{_.push(i.id)}),this.s3Keys.forEach(i=>{_.push(i.user)}),_=u().uniq(_),_}onMaxBucketsModeChange(_){"1"===_&&(this.userForm.get("max_buckets").valid||this.userForm.patchValue({max_buckets:1e3}))}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(J.O),e.Y36(w.gz),e.Y36(w.F0),e.Y36(O),e.Y36(Te.Z),e.Y36(ve.g),e.Y36(A.p4))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-user-form"]],features:[e.qOj],decls:1,vars:1,consts:function(){let o,_,n,i,s,c,d,E,g,C,b,P,G,N,p,U,W,Z,$,h,I,v,F,T,x,y,S,_e,te,ne,oe,ie,se,ae,re,le,ce,de,ue,Re,R,__,t_,n_,o_,i_,s_,a_,r_,l_,c_,d_,u_,R_,g_,E_,T_,S_,f_,C_,p_,M_,m_,A_,b_,P_,G_;return o="" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",_="User ID",n="Show Tenant",i="Full name",s="Email address",c="Max. buckets",d="Disabled",E="Unlimited",g="Custom",C="Suspended",b="User quota",P="Enabled",G="Bucket quota",N="Enabled",p="This field is required.",U="The value is not valid.",W="The chosen user ID is already in use.",Z="Tenant",$="The value is not valid.",h="The chosen user ID exists in this tenant.",I="This field is required.",v="This is not a valid email address.",F="The chosen email address is already in use.",T="This field is required.",x="The entered value must be >= 1.",y="S3 key",S="Auto-generate key",_e="Access key",te="This field is required.",ne="Secret key",oe="This field is required.",ie="Subusers",se="" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",ae="There are no subusers.",re="Edit",le="Delete",ce="Keys",de="S3",ue="" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",Re="Swift",R="There are no keys.",__="Show",t_="Delete",n_="There are no keys.",o_="Show",i_="Capabilities",s_="All capabilities are already added.",a_="" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",r_="There are no capabilities.",l_="Edit",c_="Delete",d_="Unlimited size",u_="Max. size",R_="This field is required.",g_="The value is not valid.",E_="Unlimited objects",T_="Max. objects",S_="This field is required.",f_="The entered value must be >= 0.",C_="Unlimited size",p_="Max. size",M_="This field is required.",m_="The value is not valid.",A_="Unlimited objects",b_="Max. objects",P_="This field is required.",G_="The entered value must be >= 0.",[["class","cd-col-form",4,"cdFormLoading"],[1,"cd-col-form"],["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"card"],[1,"card-header"],o,[1,"card-body"],[1,"form-group","row"],["for","user_id",1,"cd-col-form-label",3,"ngClass"],_,[1,"cd-col-form-input"],["id","user_id","type","text","formControlName","user_id",1,"form-control",3,"readonly"],["class","invalid-feedback",4,"ngIf"],[1,"cd-col-form-offset"],[1,"custom-control","custom-checkbox"],["id","show_tenant","type","checkbox","formControlName","show_tenant",1,"custom-control-input",3,"readonly","click"],["for","show_tenant",1,"custom-control-label"],n,["class","form-group row",4,"ngIf"],["for","display_name",1,"cd-col-form-label",3,"ngClass"],i,["id","display_name","type","text","formControlName","display_name",1,"form-control"],["for","email",1,"cd-col-form-label"],s,["id","email","type","text","formControlName","email",1,"form-control"],["for","max_buckets_mode",1,"cd-col-form-label"],c,["formControlName","max_buckets_mode","name","max_buckets_mode","id","max_buckets_mode",1,"form-control",3,"change"],["value","-1"],d,["value","0"],E,["value","1"],g,["id","suspended","type","checkbox","formControlName","suspended",1,"custom-control-input"],["for","suspended",1,"custom-control-label"],C,[4,"ngIf"],b,["id","user_quota_enabled","type","checkbox","formControlName","user_quota_enabled",1,"custom-control-input"],["for","user_quota_enabled",1,"custom-control-label"],P,G,["id","bucket_quota_enabled","type","checkbox","formControlName","bucket_quota_enabled",1,"custom-control-input"],["for","bucket_quota_enabled",1,"custom-control-label"],N,[1,"card-footer"],["wrappingClass","text-right",3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],p,U,W,["for","tenant",1,"cd-col-form-label"],Z,["id","tenant","type","text","formControlName","tenant","autofocus","",1,"form-control",3,"readonly"],$,h,I,v,F,[1,"cd-col-form-label"],["id","max_buckets","type","number","formControlName","max_buckets","min","1",1,"form-control"],T,x,y,["id","generate_key","type","checkbox","formControlName","generate_key",1,"custom-control-input"],["for","generate_key",1,"custom-control-label"],S,["for","access_key",1,"cd-col-form-label","required"],_e,[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"],te,["for","secret_key",1,"cd-col-form-label","required"],ne,["id","secret_key","type","password","formControlName","secret_key",1,"form-control"],["type","button","cdPasswordButton","secret_key",1,"btn","btn-light"],["source","secret_key"],oe,ie,[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"],se,[1,"help-block"],[1,"no-border"],[1,"form-text","text-muted"],ae,[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","ngbTooltip",re,1,"btn","btn-light","tc_showSubuserButton",3,"click"],["type","button","ngbTooltip",le,1,"btn","btn-light","tc_deleteSubuserButton",3,"click"],ce,de,["type","button",1,"btn","btn-light","float-right","tc_addS3KeyButton",3,"click"],ue,Re,R,["type","button","ngbTooltip",__,1,"btn","btn-light","tc_showS3KeyButton",3,"click"],["type","button","ngbTooltip",t_,1,"btn","btn-light","tc_deleteS3KeyButton",3,"click"],n_,["type","button","ngbTooltip",o_,1,"btn","btn-light","tc_showSwiftKeyButton",3,"click"],i_,["type","button","ngbTooltip",s_,"triggers","pointerenter:pointerleave",1,"btn","btn-light","float-right","tc_addCapButton",3,"disabled","disableTooltip","click"],a_,r_,["type","button","ngbTooltip",l_,1,"btn","btn-light","tc_editCapButton",3,"click"],["type","button","ngbTooltip",c_,1,"btn","btn-light","tc_deleteCapButton",3,"click"],["id","user_quota_max_size_unlimited","type","checkbox","formControlName","user_quota_max_size_unlimited",1,"custom-control-input"],["for","user_quota_max_size_unlimited",1,"custom-control-label"],d_,["for","user_quota_max_size",1,"cd-col-form-label","required"],u_,["id","user_quota_max_size","type","text","formControlName","user_quota_max_size","cdDimlessBinary","",1,"form-control"],R_,g_,["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"],E_,["for","user_quota_max_objects",1,"cd-col-form-label","required"],T_,["id","user_quota_max_objects","type","number","formControlName","user_quota_max_objects","min","0",1,"form-control"],S_,f_,["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"],C_,["for","bucket_quota_max_size",1,"cd-col-form-label","required"],p_,["id","bucket_quota_max_size","type","text","formControlName","bucket_quota_max_size","cdDimlessBinary","",1,"form-control"],M_,m_,["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"],A_,["for","bucket_quota_max_objects",1,"cd-col-form-label","required"],b_,["id","bucket_quota_max_objects","type","number","formControlName","bucket_quota_max_objects","min","0",1,"form-control"],P_,G_]},template:function(_,n){1&_&&e.YNc(0,To,89,41,"div",0),2&_&&e.Q6J("cdFormLoading",n.loading)},directives:[Fe.y,a._Y,a.JL,V.V,a.sg,H.P,f.mk,q.o,a.Fj,X.b,a.JJ,a.u,f.O5,a.Wl,a.EJ,a.YN,a.Kr,ee.p,j.U,a.wV,a.qQ,Ce.C,pe.s,f.sg,M._L,bn.Q],pipes:[f.rS,K.m,Ue.i],styles:[""]}),t})();var je=r(99466),So=r(78877),fo=r(86969);const Co=["accessKeyTpl"],po=["secretKeyTpl"];function Mo(t,o){if(1&t&&(e.TgZ(0,"tr"),e.TgZ(1,"td",15),e.SDv(2,20),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.qZA()),2&t){const _=e.oxw(4);e.xp6(4),e.Oqu(_.user.email)}}function mo(t,o){if(1&t&&(e.TgZ(0,"div"),e._uU(1),e.qZA()),2&t){const _=o.$implicit;e.xp6(1),e.AsE(" ",_.id," (",_.permissions,") ")}}function Ao(t,o){if(1&t&&(e.TgZ(0,"tr"),e.TgZ(1,"td",15),e.SDv(2,21),e.qZA(),e.TgZ(3,"td"),e.YNc(4,mo,2,2,"div",22),e.qZA(),e.qZA()),2&t){const _=e.oxw(4);e.xp6(4),e.Q6J("ngForOf",_.user.subusers)}}function bo(t,o){if(1&t&&(e.TgZ(0,"div"),e._uU(1),e.qZA()),2&t){const _=o.$implicit;e.xp6(1),e.AsE(" ",_.type," (",_.perm,") ")}}function Po(t,o){if(1&t&&(e.TgZ(0,"tr"),e.TgZ(1,"td",15),e.SDv(2,23),e.qZA(),e.TgZ(3,"td"),e.YNc(4,bo,2,2,"div",22),e.qZA(),e.qZA()),2&t){const _=e.oxw(4);e.xp6(4),e.Q6J("ngForOf",_.user.caps)}}function Go(t,o){if(1&t&&(e.TgZ(0,"tr"),e.TgZ(1,"td",15),e.SDv(2,24),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.ALo(5,"join"),e.qZA(),e.qZA()),2&t){const _=e.oxw(4);e.xp6(4),e.Oqu(e.lcZ(5,1,_.user.mfa_ids))}}function No(t,o){1&t&&(e.TgZ(0,"td"),e._uU(1,"-"),e.qZA())}function Oo(t,o){1&t&&(e.TgZ(0,"td"),e.SDv(1,29),e.qZA())}function Uo(t,o){if(1&t&&(e.TgZ(0,"td"),e._uU(1),e.ALo(2,"dimlessBinary"),e.qZA()),2&t){const _=e.oxw(5);e.xp6(1),e.hij(" ",e.lcZ(2,1,_.user.user_quota.max_size)," ")}}function Wo(t,o){1&t&&(e.TgZ(0,"td"),e._uU(1,"-"),e.qZA())}function Zo(t,o){1&t&&(e.TgZ(0,"td"),e.SDv(1,30),e.qZA())}function $o(t,o){if(1&t&&(e.TgZ(0,"td"),e._uU(1),e.qZA()),2&t){const _=e.oxw(5);e.xp6(1),e.hij(" ",_.user.user_quota.max_objects," ")}}function ho(t,o){if(1&t&&(e.TgZ(0,"div"),e.TgZ(1,"legend"),e.SDv(2,25),e.qZA(),e.TgZ(3,"table",9),e.TgZ(4,"tbody"),e.TgZ(5,"tr"),e.TgZ(6,"td",10),e.SDv(7,26),e.qZA(),e.TgZ(8,"td",12),e._uU(9),e.ALo(10,"booleanText"),e.qZA(),e.qZA(),e.TgZ(11,"tr"),e.TgZ(12,"td",15),e.SDv(13,27),e.qZA(),e.YNc(14,No,2,0,"td",0),e.YNc(15,Oo,2,0,"td",0),e.YNc(16,Uo,3,3,"td",0),e.qZA(),e.TgZ(17,"tr"),e.TgZ(18,"td",15),e.SDv(19,28),e.qZA(),e.YNc(20,Wo,2,0,"td",0),e.YNc(21,Zo,2,0,"td",0),e.YNc(22,$o,2,1,"td",0),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&t){const _=e.oxw(4);e.xp6(9),e.Oqu(e.lcZ(10,7,_.user.user_quota.enabled)),e.xp6(5),e.Q6J("ngIf",!_.user.user_quota.enabled),e.xp6(1),e.Q6J("ngIf",_.user.user_quota.enabled&&_.user.user_quota.max_size<=-1),e.xp6(1),e.Q6J("ngIf",_.user.user_quota.enabled&&_.user.user_quota.max_size>-1),e.xp6(4),e.Q6J("ngIf",!_.user.user_quota.enabled),e.xp6(1),e.Q6J("ngIf",_.user.user_quota.enabled&&_.user.user_quota.max_objects<=-1),e.xp6(1),e.Q6J("ngIf",_.user.user_quota.enabled&&_.user.user_quota.max_objects>-1)}}function Io(t,o){1&t&&(e.TgZ(0,"td"),e._uU(1,"-"),e.qZA())}function vo(t,o){1&t&&(e.TgZ(0,"td"),e.SDv(1,35),e.qZA())}function Fo(t,o){if(1&t&&(e.TgZ(0,"td"),e._uU(1),e.ALo(2,"dimlessBinary"),e.qZA()),2&t){const _=e.oxw(5);e.xp6(1),e.hij(" ",e.lcZ(2,1,_.user.bucket_quota.max_size)," ")}}function Lo(t,o){1&t&&(e.TgZ(0,"td"),e._uU(1,"-"),e.qZA())}function Do(t,o){1&t&&(e.TgZ(0,"td"),e.SDv(1,36),e.qZA())}function xo(t,o){if(1&t&&(e.TgZ(0,"td"),e._uU(1),e.qZA()),2&t){const _=e.oxw(5);e.xp6(1),e.hij(" ",_.user.bucket_quota.max_objects," ")}}function yo(t,o){if(1&t&&(e.TgZ(0,"div"),e.TgZ(1,"legend"),e.SDv(2,31),e.qZA(),e.TgZ(3,"table",9),e.TgZ(4,"tbody"),e.TgZ(5,"tr"),e.TgZ(6,"td",10),e.SDv(7,32),e.qZA(),e.TgZ(8,"td",12),e._uU(9),e.ALo(10,"booleanText"),e.qZA(),e.qZA(),e.TgZ(11,"tr"),e.TgZ(12,"td",15),e.SDv(13,33),e.qZA(),e.YNc(14,Io,2,0,"td",0),e.YNc(15,vo,2,0,"td",0),e.YNc(16,Fo,3,3,"td",0),e.qZA(),e.TgZ(17,"tr"),e.TgZ(18,"td",15),e.SDv(19,34),e.qZA(),e.YNc(20,Lo,2,0,"td",0),e.YNc(21,Do,2,0,"td",0),e.YNc(22,xo,2,1,"td",0),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&t){const _=e.oxw(4);e.xp6(9),e.Oqu(e.lcZ(10,7,_.user.bucket_quota.enabled)),e.xp6(5),e.Q6J("ngIf",!_.user.bucket_quota.enabled),e.xp6(1),e.Q6J("ngIf",_.user.bucket_quota.enabled&&_.user.bucket_quota.max_size<=-1),e.xp6(1),e.Q6J("ngIf",_.user.bucket_quota.enabled&&_.user.bucket_quota.max_size>-1),e.xp6(4),e.Q6J("ngIf",!_.user.bucket_quota.enabled),e.xp6(1),e.Q6J("ngIf",_.user.bucket_quota.enabled&&_.user.bucket_quota.max_objects<=-1),e.xp6(1),e.Q6J("ngIf",_.user.bucket_quota.enabled&&_.user.bucket_quota.max_objects>-1)}}function qo(t,o){if(1&t&&(e.TgZ(0,"div"),e.TgZ(1,"table",9),e.TgZ(2,"tbody"),e.TgZ(3,"tr"),e.TgZ(4,"td",10),e.SDv(5,11),e.qZA(),e.TgZ(6,"td",12),e._uU(7),e.qZA(),e.qZA(),e.TgZ(8,"tr"),e.TgZ(9,"td",10),e.SDv(10,13),e.qZA(),e.TgZ(11,"td",12),e._uU(12),e.qZA(),e.qZA(),e.TgZ(13,"tr"),e.TgZ(14,"td",10),e.SDv(15,14),e.qZA(),e.TgZ(16,"td",12),e._uU(17),e.qZA(),e.qZA(),e.TgZ(18,"tr"),e.TgZ(19,"td",15),e.SDv(20,16),e.qZA(),e.TgZ(21,"td"),e._uU(22),e.qZA(),e.qZA(),e.YNc(23,Mo,5,1,"tr",0),e.TgZ(24,"tr"),e.TgZ(25,"td",15),e.SDv(26,17),e.qZA(),e.TgZ(27,"td"),e._uU(28),e.ALo(29,"booleanText"),e.qZA(),e.qZA(),e.TgZ(30,"tr"),e.TgZ(31,"td",15),e.SDv(32,18),e.qZA(),e.TgZ(33,"td"),e._uU(34),e.ALo(35,"booleanText"),e.qZA(),e.qZA(),e.TgZ(36,"tr"),e.TgZ(37,"td",15),e.SDv(38,19),e.qZA(),e.TgZ(39,"td"),e._uU(40),e.ALo(41,"map"),e.qZA(),e.qZA(),e.YNc(42,Ao,5,1,"tr",0),e.YNc(43,Po,5,1,"tr",0),e.YNc(44,Go,6,3,"tr",0),e.qZA(),e.qZA(),e.YNc(45,ho,23,9,"div",0),e.YNc(46,yo,23,9,"div",0),e.qZA()),2&t){const _=e.oxw(3);e.xp6(7),e.Oqu(_.user.tenant),e.xp6(5),e.Oqu(_.user.user_id),e.xp6(5),e.Oqu(_.user.uid),e.xp6(5),e.Oqu(_.user.display_name),e.xp6(1),e.Q6J("ngIf",null==_.user.email?null:_.user.email.length),e.xp6(5),e.Oqu(e.lcZ(29,13,_.user.suspended)),e.xp6(6),e.Oqu(e.lcZ(35,15,"true"===_.user.system)),e.xp6(6),e.Oqu(e.xi3(41,17,_.user.max_buckets,_.maxBucketsMap)),e.xp6(2),e.Q6J("ngIf",_.user.subusers&&_.user.subusers.length),e.xp6(1),e.Q6J("ngIf",_.user.caps&&_.user.caps.length),e.xp6(1),e.Q6J("ngIf",null==_.user.mfa_ids?null:_.user.mfa_ids.length),e.xp6(1),e.Q6J("ngIf",_.user.user_quota),e.xp6(1),e.Q6J("ngIf",_.user.bucket_quota)}}function wo(t,o){if(1&t&&e.YNc(0,qo,47,20,"div",0),2&t){const _=e.oxw(2);e.Q6J("ngIf",_.user)}}const ko=function(t){return[t]};function Bo(t,o){if(1&t){const _=e.EpF();e.TgZ(0,"cd-table",39),e.NdJ("updateSelection",function(i){return e.CHM(_),e.oxw(3).updateKeysSelection(i)}),e.TgZ(1,"div",40),e.TgZ(2,"div",41),e.TgZ(3,"button",42),e.NdJ("click",function(){return e.CHM(_),e.oxw(3).showKeyModal()}),e._UZ(4,"i",43),e.ynx(5),e.SDv(6,44),e.BQk(),e.qZA(),e.qZA(),e.qZA(),e.qZA()}if(2&t){const _=e.oxw(3);e.Q6J("data",_.keys)("columns",_.keysColumns),e.xp6(3),e.Q6J("disabled",!_.keysSelection.hasSingleSelection),e.xp6(1),e.Q6J("ngClass",e.VKq(4,ko,_.icons.show))}}function Ho(t,o){1&t&&(e.TgZ(0,"li",37),e.TgZ(1,"a",4),e.SDv(2,38),e.qZA(),e.YNc(3,Bo,7,6,"ng-template",6),e.qZA())}function Xo(t,o){if(1&t&&(e.ynx(0),e.TgZ(1,"ul",1,2),e.TgZ(3,"li",3),e.TgZ(4,"a",4),e.SDv(5,5),e.qZA(),e.YNc(6,wo,1,1,"ng-template",6),e.qZA(),e.YNc(7,Ho,4,0,"li",7),e.qZA(),e._UZ(8,"div",8),e.BQk()),2&t){const _=e.MAs(2),n=e.oxw();e.xp6(7),e.Q6J("ngIf",n.keys.length),e.xp6(1),e.Q6J("ngbNavOutlet",_)}}let Ko=(()=>{class t{constructor(_,n){this.rgwUserService=_,this.modalService=n,this.keys=[],this.keysColumns=[],this.keysSelection=new Pe.r,this.icons=D.P}ngOnInit(){this.keysColumns=[{name:"Username",prop:"username",flexGrow:1},{name:"Type",prop:"type",flexGrow:1}],this.maxBucketsMap={"-1":"Disabled",0:"Unlimited"}}ngOnChanges(){this.selection&&(this.user=this.selection,this.user.subusers=u().sortBy(this.user.subusers,"id"),this.user.caps=u().sortBy(this.user.caps,"type"),this.rgwUserService.getQuota(this.user.uid).subscribe(_=>{u().extend(this.user,_)}),this.keys=[],this.user.keys&&this.user.keys.forEach(_=>{this.keys.push({id:this.keys.length+1,type:"S3",username:_.user,ref:_})}),this.user.swift_keys&&this.user.swift_keys.forEach(_=>{this.keys.push({id:this.keys.length+1,type:"Swift",username:_.user,ref:_})}),this.keys=u().sortBy(this.keys,"user"))}updateKeysSelection(_){this.keysSelection=_}showKeyModal(){const _=this.keysSelection.first(),n=this.modalService.show("S3"===_.type?Qe:Ye);switch(_.type){case"S3":n.componentInstance.setViewing(),n.componentInstance.setValues(_.ref.user,_.ref.access_key,_.ref.secret_key);break;case"Swift":n.componentInstance.setValues(_.ref.user,_.ref.secret_key)}}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(O),e.Y36(Te.Z))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-user-details"]],viewQuery:function(_,n){if(1&_&&(e.Gf(Co,5),e.Gf(po,5)),2&_){let i;e.iGM(i=e.CRH())&&(n.accessKeyTpl=i.first),e.iGM(i=e.CRH())&&(n.secretKeyTpl=i.first)}},inputs:{selection:"selection"},features:[e.TTD],decls:1,vars:1,consts:function(){let o,_,n,i,s,c,d,E,g,C,b,P,G,N,p,U,W,Z,$,h,I,v,F,T,x,y;return o="Details",_="Tenant",n="User ID",i="Username",s="Full name",c="Suspended",d="System",E="Maximum buckets",g="Email address",C="Subusers",b="Capabilities",P="MFAs(Id)",G="User quota",N="Enabled",p="Maximum size",U="Maximum objects",W="Unlimited",Z="Unlimited",$="Bucket quota",h="Enabled",I="Maximum size",v="Maximum objects",F="Unlimited",T="Unlimited",x="Keys",y="Show",[[4,"ngIf"],["ngbNav","","cdStatefulTab","rgw-user-details",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem","details"],["ngbNavLink",""],o,["ngbNavContent",""],["ngbNavItem","keys",4,"ngIf"],[3,"ngbNavOutlet"],[1,"table","table-striped","table-bordered"],[1,"bold","w-25"],_,[1,"w-75"],n,i,[1,"bold"],s,c,d,E,g,C,[4,"ngFor","ngForOf"],b,P,G,N,p,U,W,Z,$,h,I,v,F,T,["ngbNavItem","keys"],x,["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"],y]},template:function(_,n){1&_&&e.YNc(0,Xo,9,2,"ng-container",0),2&_&&e.Q6J("ngIf",n.selection)},directives:[f.O5,M.Pz,Xe.m,M.nv,M.Vx,M.uN,M.tO,f.sg,z.a,q.o,f.mk],pipes:[Be.T,So.b,fo.A,qe.$],styles:[""]}),t})();const zo=["userSizeTpl"],Qo=["userObjectTpl"];function Yo(t,o){if(1&t&&e._UZ(0,"cd-usage-bar",8),2&t){const _=e.oxw().row;e.Q6J("total",_.user_quota.max_size)("used",_.stats.size_actual)}}function Jo(t,o){1&t&&e.SDv(0,9)}function Vo(t,o){if(1&t&&(e.YNc(0,Yo,1,2,"cd-usage-bar",6),e.YNc(1,Jo,1,0,"ng-template",null,7,e.W1O)),2&t){const _=o.row,n=e.MAs(2);e.Q6J("ngIf",_.user_quota.max_size>0&&_.user_quota.enabled)("ngIfElse",n)}}function jo(t,o){if(1&t&&e._UZ(0,"cd-usage-bar",12),2&t){const _=e.oxw().row;e.Q6J("total",_.user_quota.max_objects)("used",_.stats.num_objects)("isBinary",!1)}}function ei(t,o){1&t&&e.SDv(0,13)}function _i(t,o){if(1&t&&(e.YNc(0,jo,1,3,"cd-usage-bar",10),e.YNc(1,ei,1,0,"ng-template",null,11,e.W1O)),2&t){const _=o.row,n=e.MAs(2);e.Q6J("ngIf",_.user_quota.max_objects>0&&_.user_quota.enabled)("ngIfElse",n)}}let ni=(()=>{class t extends be.o{constructor(_,n,i,s,c,d){super(d),this.authStorageService=_,this.rgwUserService=n,this.modalService=i,this.urlBuilder=s,this.actionLabels=c,this.ngZone=d,this.columns=[],this.users=[],this.selection=new Pe.r}ngOnInit(){this.permission=this.authStorageService.getPermissions().rgw,this.columns=[{name:"Username",prop:"uid",flexGrow:1},{name:"Tenant",prop:"tenant",flexGrow:1},{name:"Full name",prop:"display_name",flexGrow:1},{name:"Email address",prop:"email",flexGrow:1},{name:"Suspended",prop:"suspended",flexGrow:1,cellClass:"text-center",cellTransformation:je.e.checkIcon},{name:"Max. buckets",prop:"max_buckets",flexGrow:1,cellTransformation:je.e.map,customTemplateConfig:{"-1":"Disabled",0:"Unlimited"}},{name:"Capacity Limit %",prop:"size_usage",cellTemplate:this.userSizeTpl,flexGrow:.8},{name:"Object Limit %",prop:"object_usage",cellTemplate:this.userObjectTpl,flexGrow:.8}];const _=()=>this.selection.first()&&`${encodeURIComponent(this.selection.first().uid)}`;this.tableActions=[{permission:"create",icon:D.P.add,routerLink:()=>this.urlBuilder.getCreate(),name:this.actionLabels.CREATE,canBePrimary:c=>!c.hasSelection},{permission:"update",icon:D.P.edit,routerLink:()=>this.urlBuilder.getEdit(_()),name:this.actionLabels.EDIT},{permission:"delete",icon:D.P.destroy,click:()=>this.deleteAction(),disable:()=>!this.selection.hasSelection,name:this.actionLabels.DELETE,canBePrimary:c=>c.hasMultiSelection}],this.setTableRefreshTimeout()}getUserList(_){this.setTableRefreshTimeout(),this.rgwUserService.list().subscribe(n=>{this.users=n},()=>{_.error()})}updateSelection(_){this.selection=_}deleteAction(){this.modalService.show(ye.M,{itemDescription:this.selection.hasSingleSelection?"user":"users",itemNames:this.selection.selected.map(_=>_.uid),submitActionObservable:()=>new xe.y(_=>{(0,Y.D)(this.selection.selected.map(n=>this.rgwUserService.delete(n.uid))).subscribe({error:n=>{_.error(n),this.table.refreshBtn()},complete:()=>{_.complete(),this.table.refreshBtn()}})})})}}return t.\u0275fac=function(_){return new(_||t)(e.Y36(Ee.j),e.Y36(O),e.Y36(Te.Z),e.Y36(Q.F),e.Y36(A.p4),e.Y36(e.R0b))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cd-rgw-user-list"]],viewQuery:function(_,n){if(1&_&&(e.Gf(z.a,7),e.Gf(zo,7),e.Gf(Qo,7)),2&_){let i;e.iGM(i=e.CRH())&&(n.table=i.first),e.iGM(i=e.CRH())&&(n.userSizeTpl=i.first),e.iGM(i=e.CRH())&&(n.userObjectTpl=i.first)}},features:[e._Bn([{provide:Q.F,useValue:new Q.F("rgw/user")}]),e.qOj],decls:8,vars:9,consts:function(){let o,_;return o="No Limit",_="No Limit",[["columnMode","flex","selectionType","multiClick","identifier","uid",3,"autoReload","data","columns","hasDetails","status","setExpandedRow","updateSelection","fetchData"],["table",""],[1,"table-actions",3,"permission","selection","tableActions"],["cdTableDetail","",3,"selection"],["userSizeTpl",""],["userObjectTpl",""],[3,"total","used",4,"ngIf","ngIfElse"],["noSizeQuota",""],[3,"total","used"],o,[3,"total","used","isBinary",4,"ngIf","ngIfElse"],["noObjectQuota",""],[3,"total","used","isBinary"],_]},template:function(_,n){1&_&&(e.TgZ(0,"cd-table",0,1),e.NdJ("setExpandedRow",function(s){return n.setExpandedRow(s)})("updateSelection",function(s){return n.updateSelection(s)})("fetchData",function(s){return n.getUserList(s)}),e._UZ(2,"cd-table-actions",2),e._UZ(3,"cd-rgw-user-details",3),e.qZA(),e.YNc(4,Vo,3,2,"ng-template",null,4,e.W1O),e.YNc(6,_i,3,2,"ng-template",null,5,e.W1O)),2&_&&(e.Q6J("autoReload",!1)("data",n.users)("columns",n.columns)("hasDetails",!0)("status",n.tableStatus),e.xp6(2),e.Q6J("permission",n.permission)("selection",n.selection)("tableActions",n.tableActions),e.xp6(1),e.Q6J("selection",n.expandedRow))},directives:[z.a,ke.K,Ko,f.O5,He.O],styles:[""]}),t})(),e_=(()=>{class t{}return t.\u0275fac=function(_){return new(_||t)},t.\u0275mod=e.oAB({type:t}),t.\u0275inj=e.cJS({imports:[[f.ez,N_.m,a.u5,a.UX,O_.B,M.Oz,w.Bz,M.HK,Ue.b]]}),t})();const oi=[{path:""},{path:"daemon",component:kt,data:{breadcrumbs:"Daemons"}},{path:"user",data:{breadcrumbs:"Users"},children:[{path:"",component:ni},{path:A.MQ.CREATE,component:Ve,data:{breadcrumbs:A.Qn.CREATE}},{path:`${A.MQ.EDIT}/:uid`,component:Ve,data:{breadcrumbs:A.Qn.EDIT}}]},{path:"bucket",data:{breadcrumbs:"Buckets"},children:[{path:"",component:Ot},{path:A.MQ.CREATE,component:De,data:{breadcrumbs:A.Qn.CREATE}},{path:`${A.MQ.EDIT}/:bid`,component:De,data:{breadcrumbs:A.Qn.EDIT}}]}];let ii=(()=>{class t{}return t.\u0275fac=function(_){return new(_||t)},t.\u0275mod=e.oAB({type:t}),t.\u0275inj=e.cJS({imports:[[e_,w.Bz.forChild(oi)]]}),t})()}}]); \ No newline at end of file