1 (window
.webpackJsonp
=window
.webpackJsonp
||[]).push([[1],{"+26A":function(l
,n
,e
){"use strict";e
.d(n
,"a",(function(){return d
}));var t
=e("s7LF"),i
=e("LvDl"),u
=e("GyhO"),s
=e("cp0P"),a
=e("NJ9Y"),o
=(e("XED3"),e("QFaf")),r
=e("kvvV");e("kn/O");class d
{constructor(l
,n
,e
){this.modalRef
=l
,this.rbdMirroringService
=n
,this.taskWrapper
=e
,this.pools
=[],this.directions
=[{key
:"rx-tx",desc
:"Bidirectional"},{key
:"rx",desc
:"Unidirectional (receive-only)"}],this.createForm()}createForm(){this.importBootstrapForm
=new o
.a({siteName
:new t
.i("",{validators
:[t
.B
.required
]}),direction
:new t
.i("rx-tx",{}),pools
:new t
.k({},{validators
:[this.validatePools()]}),token
:new t
.i("",{validators
:[t
.B
.required
,this.validateToken()]})})}ngOnInit(){this.rbdMirroringService
.getSiteName().subscribe(l
=>{this.importBootstrapForm
.get("siteName").setValue(l
.site_name
)}),this.subs
=this.rbdMirroringService
.subscribeSummary(l
=>{this.pools
=l
.content_data
.pools
.reduce((l
,n
)=>(l
.push({name
:n
.name
,mirror_mode
:n
.mirror_mode
}),l
),[]);const n
=this.importBootstrapForm
.get("pools");i
.each(this.pools
,l
=>{const e
=l
.name
,i
="disabled"===l
.mirror_mode
,u
=n
.controls
[e
];u
?i
&&u
.disabled
?u
.enable():!i
&&u
.enabled
&&(u
.disable(),u
.setValue(!0)):n
.addControl(e
,new t
.i({value
:!i
,disabled
:!i
}))})})}ngOnDestroy(){this.subs
&&this.subs
.unsubscribe()}validatePools(){return l
=>{let n
=0;return i
.each(l
.controls
,l
=>{!0===l
.value
&&++n
}),n
>0?null:{requirePool
:!0}}}validateToken(){return l
=>{try{if(JSON
.parse(atob(l
.value
)))return null}catch(n
){}return{invalidToken
:!0}}}import(){const l
=[],n
=[],e
=this.importBootstrapForm
.get("pools");i
.each(e
.controls
,(e
,t
)=>{!0===e
.value
&&(l
.push(t
),e
.disabled
||n
.push(t
))});const t
={mirror_mode
:"image"};let o
=Object(u
.a
)(this.rbdMirroringService
.setSiteName(this.importBootstrapForm
.getValue("siteName")),Object(s
.a
)(n
.map(l
=>this.rbdMirroringService
.updatePool(l
,t
))));o
=l
.reduce((l
,n
)=>Object(u
.a
)(l
,this.rbdMirroringService
.importBootstrapToken(n
,this.importBootstrapForm
.getValue("direction"),this.importBootstrapForm
.getValue("token"))),o
).pipe(Object(a
.a
)());const d
=()=>{this.rbdMirroringService
.refresh(),this.importBootstrapForm
.setErrors({cdSubmitButton
:!0})};this.taskWrapper
.wrapTaskAroundCall({task
:new r
.a("rbd/mirroring/bootstrap/import",{}),call
:o
}).subscribe(void 0,d
,()=>{d(),this.modalRef
.hide()})}}},"0BYw":function(l
,n
,e
){"use strict";var t
=e("8Y7J"),i
=e("s7LF"),u
=e("ANnk"),s
=e("f/UV"),a
=e("aexS"),o
=e("+gVj"),r
=e("SVse"),d
=e("EEJc"),c
=e("ajRT"),m
=e("mXUL"),p
=e("IZUe"),h
=e("gp3X"),g
=e("sb0X"),f
=e("KVJa"),v
=e("Z21x"),b
=e("sne2"),C
=e("daK0"),S
=e("LqlI"),_
=e("9nlD"),R
=e("Ekvf"),y
=e("F83c"),w
=e("GiVz");e
.d(n
,"a",(function(){return O
}));var k
=t
["ɵcrt"]({encapsulation
:0,styles
:[[""]],data
:{}});function I(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,7,"input",[["class","form-control"],["formControlName","pool"],["id","pool"],["name","pool"],["placeholder","Pool name..."],["type","text"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"is-valid",null],[2,"is-invalid",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],(function(l
,n
,e
){var i
=!0;return"input"===n
&&(i
=!1!==t
["ɵnov"](l
,1)._handleInput(e
.target
.value
)&&i
),"blur"===n
&&(i
=!1!==t
["ɵnov"](l
,1).onTouched()&&i
),"compositionstart"===n
&&(i
=!1!==t
["ɵnov"](l
,1)._compositionStart()&&i
),"compositionend"===n
&&(i
=!1!==t
["ɵnov"](l
,1)._compositionEnd(e
.target
.value
)&&i
),i
}),null,null)),t
["ɵdid"](1,16384,null,0,i
.e
,[t
.Renderer2
,t
.ElementRef
,[2,i
.b
]],null,null),t
["ɵprd"](1024,null,i
.p
,(function(l
){return[l
]}),[i
.e
]),t
["ɵdid"](3,671744,[[1,4]],0,i
.j
,[[3,i
.d
],[8,null],[8,null],[6,i
.p
],[2,i
.E
]],{name
:[0,"name"]},null),t
["ɵprd"](2048,null,i
.q
,null,[i
.j
]),t
["ɵdid"](5,16384,null,0,i
.r
,[[4,i
.q
]],null,null),t
["ɵdid"](6,4210688,null,0,u
.a
,[[2,s
.a
],a
.a
,t
.ElementRef
],null,null),t
["ɵdid"](7,16384,null,0,o
.h
,[[3,i
.d
],o
.a
],{formControlName
:[0,"formControlName"]},null)],(function(l
,n
){l(n
,3,0,"pool"),l(n
,7,0,"pool")}),(function(l
,n
){l(n
,0,0,t
["ɵnov"](n
,5).ngClassUntouched
,t
["ɵnov"](n
,5).ngClassTouched
,t
["ɵnov"](n
,5).ngClassPristine
,t
["ɵnov"](n
,5).ngClassDirty
,t
["ɵnov"](n
,5).ngClassValid
,t
["ɵnov"](n
,5).ngClassInvalid
,t
["ɵnov"](n
,5).ngClassPending
,t
["ɵnov"](n
,7).validClass
,t
["ɵnov"](n
,7).invalidClass
)}))}function E(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,3,"option",[],null,null,null,null,null)),t
["ɵdid"](1,147456,null,0,i
.v
,[t
.ElementRef
,t
.Renderer2
,[2,i
.A
]],{ngValue
:[0,"ngValue"]},null),t
["ɵdid"](2,147456,null,0,i
.F
,[t
.ElementRef
,t
.Renderer2
,[8,null]],{ngValue
:[0,"ngValue"]},null),(l()(),t
["ɵted"](-1,null,["Loading..."]))],(function(l
,n
){l(n
,1,0,null),l(n
,2,0,null)}),null)}function N(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,3,"option",[],null,null,null,null,null)),t
["ɵdid"](1,147456,null,0,i
.v
,[t
.ElementRef
,t
.Renderer2
,[2,i
.A
]],{ngValue
:[0,"ngValue"]},null),t
["ɵdid"](2,147456,null,0,i
.F
,[t
.ElementRef
,t
.Renderer2
,[8,null]],{ngValue
:[0,"ngValue"]},null),(l()(),t
["ɵted"](-1,null,["-- No rbd pools available --"]))],(function(l
,n
){l(n
,1,0,null),l(n
,2,0,null)}),null)}function F(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,3,"option",[],null,null,null,null,null)),t
["ɵdid"](1,147456,null,0,i
.v
,[t
.ElementRef
,t
.Renderer2
,[2,i
.A
]],{ngValue
:[0,"ngValue"]},null),t
["ɵdid"](2,147456,null,0,i
.F
,[t
.ElementRef
,t
.Renderer2
,[8,null]],{ngValue
:[0,"ngValue"]},null),(l()(),t
["ɵted"](-1,null,["-- Select a pool --"]))],(function(l
,n
){l(n
,1,0,null),l(n
,2,0,null)}),null)}function V(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,3,"option",[],null,null,null,null,null)),t
["ɵdid"](1,147456,null,0,i
.v
,[t
.ElementRef
,t
.Renderer2
,[2,i
.A
]],{value
:[0,"value"]},null),t
["ɵdid"](2,147456,null,0,i
.F
,[t
.ElementRef
,t
.Renderer2
,[8,null]],{value
:[0,"value"]},null),(l()(),t
["ɵted"](3,null,["",""]))],(function(l
,n
){l(n
,1,0,n
.context
.$implicit
.pool_name
),l(n
,2,0,n
.context
.$implicit
.pool_name
)}),(function(l
,n
){l(n
,3,0,n
.context
.$implicit
.pool_name
)}))}function T(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,15,"select",[["class","form-control custom-select"],["formControlName","pool"],["id","pool"],["name","pool"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"is-valid",null],[2,"is-invalid",null]],[[null,"change"],[null,"blur"]],(function(l
,n
,e
){var i
=!0;return"change"===n
&&(i
=!1!==t
["ɵnov"](l
,1).onChange(e
.target
.value
)&&i
),"blur"===n
&&(i
=!1!==t
["ɵnov"](l
,1).onTouched()&&i
),i
}),null,null)),t
["ɵdid"](1,16384,null,0,i
.A
,[t
.Renderer2
,t
.ElementRef
],null,null),t
["ɵprd"](1024,null,i
.p
,(function(l
){return[l
]}),[i
.A
]),t
["ɵdid"](3,671744,[[1,4]],0,i
.j
,[[3,i
.d
],[8,null],[8,null],[6,i
.p
],[2,i
.E
]],{name
:[0,"name"]},null),t
["ɵprd"](2048,null,i
.q
,null,[i
.j
]),t
["ɵdid"](5,16384,null,0,i
.r
,[[4,i
.q
]],null,null),t
["ɵdid"](6,4210688,null,0,u
.a
,[[2,s
.a
],a
.a
,t
.ElementRef
],null,null),t
["ɵdid"](7,16384,null,0,o
.h
,[[3,i
.d
],o
.a
],{formControlName
:[0,"formControlName"]},null),(l()(),t
["ɵand"](16777216,null,null,1,null,E
)),t
["ɵdid"](9,16384,null,0,r
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵand"](16777216,null,null,1,null,N
)),t
["ɵdid"](11,16384,null,0,r
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵand"](16777216,null,null,1,null,F
)),t
["ɵdid"](13,16384,null,0,r
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵand"](16777216,null,null,1,null,V
)),t
["ɵdid"](15,278528,null,0,r
.NgForOf
,[t
.ViewContainerRef
,t
.TemplateRef
,t
.IterableDiffers
],{ngForOf
:[0,"ngForOf"]},null)],(function(l
,n
){var e
=n
.component
;l(n
,3,0,"pool"),l(n
,7,0,"pool"),l(n
,9,0,null===e
.pools
),l(n
,11,0,null!==e
.pools
&&0===e
.pools
.length
),l(n
,13,0,null!==e
.pools
&&e
.pools
.length
>0),l(n
,15,0,e
.pools
)}),(function(l
,n
){l(n
,0,0,t
["ɵnov"](n
,5).ngClassUntouched
,t
["ɵnov"](n
,5).ngClassTouched
,t
["ɵnov"](n
,5).ngClassPristine
,t
["ɵnov"](n
,5).ngClassDirty
,t
["ɵnov"](n
,5).ngClassValid
,t
["ɵnov"](n
,5).ngClassInvalid
,t
["ɵnov"](n
,5).ngClassPending
,t
["ɵnov"](n
,7).validClass
,t
["ɵnov"](n
,7).invalidClass
)}))}function D(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,1,"span",[["class","invalid-feedback"]],null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["This field is required."]))],null,null)}function P(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,1,"span",[["class","invalid-feedback"]],null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["This field is required."]))],null,null)}function x(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,1,"span",[["class","invalid-feedback"]],null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["Namespace already exists."]))],null,null)}function q(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,51,"cd-modal",[],null,null,null,d
.c
,d
.b
)),t
["ɵdid"](1,49152,null,0,c
.a
,[],{modalRef
:[0,"modalRef"]},null),(l()(),t
["ɵeld"](2,0,null,0,1,null,null,null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["Create Namespace"])),(l()(),t
["ɵeld"](4,0,null,1,47,null,null,null,null,null,null,null)),(l()(),t
["ɵeld"](5,0,null,null,46,"form",[["name","namespaceForm"],["novalidate",""]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"submit"],[null,"reset"]],(function(l
,n
,e
){var i
=!0;return"submit"===n
&&(i
=!1!==t
["ɵnov"](l
,7).onSubmit(e
)&&i
),"reset"===n
&&(i
=!1!==t
["ɵnov"](l
,7).onReset()&&i
),"submit"===n
&&(i
=!1!==t
["ɵnov"](l
,10).onSubmit()&&i
),i
}),null,null)),t
["ɵdid"](6,16384,null,0,i
.G
,[],null,null),t
["ɵdid"](7,540672,[["formDir",4]],0,i
.l
,[[8,null],[8,null]],{form
:[0,"form"]},null),t
["ɵprd"](2048,null,i
.d
,null,[i
.l
]),t
["ɵdid"](9,16384,null,0,i
.s
,[[4,i
.d
]],null,null),t
["ɵdid"](10,16384,null,0,o
.d
,[],{formGroup
:[0,"formGroup"]},null),(l()(),t
["ɵeld"](11,0,null,null,33,"div",[["class","modal-body"]],null,null,null,null,null)),(l()(),t
["ɵeld"](12,0,null,null,12,"div",[["class","form-group row"]],[[2,"has-error",null],[2,"has-success",null]],null,null,m
.b
,m
.a
)),t
["ɵdid"](13,1163264,null,2,o
.c
,[t
.ElementRef
,o
.g
],null,null),t
["ɵqud"](603979776,1,{FormControlNames
:1}),t
["ɵqud"](603979776,2,{messagesBlock
:0}),(l()(),t
["ɵeld"](16,0,null,0,1,"label",[["class","cd-col-form-label required"],["for","pool"]],null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["Pool"])),(l()(),t
["ɵeld"](18,0,null,0,6,"div",[["class","cd-col-form-input"]],null,null,null,null,null)),(l()(),t
["ɵand"](16777216,null,null,1,null,I
)),t
["ɵdid"](20,16384,null,0,r
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵand"](16777216,null,null,1,null,T
)),t
["ɵdid"](22,16384,null,0,r
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵand"](16777216,null,null,1,null,D
)),t
["ɵdid"](24,16384,null,0,r
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵeld"](25,0,null,null,19,"div",[["class","form-group row"]],[[2,"has-error",null],[2,"has-success",null]],null,null,m
.b
,m
.a
)),t
["ɵdid"](26,1163264,null,2,o
.c
,[t
.ElementRef
,o
.g
],null,null),t
["ɵqud"](603979776,3,{FormControlNames
:1}),t
["ɵqud"](603979776,4,{messagesBlock
:0}),(l()(),t
["ɵeld"](29,0,null,0,1,"label",[["class","cd-col-form-label required"],["for","namespace"]],null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["Name"])),(l()(),t
["ɵeld"](31,0,null,0,13,"div",[["class","cd-col-form-input"]],null,null,null,null,null)),(l()(),t
["ɵeld"](32,0,null,null,8,"input",[["autofocus",""],["class","form-control"],["formControlName","namespace"],["id","namespace"],["name","namespace"],["placeholder","Namespace name..."],["type","text"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"is-valid",null],[2,"is-invalid",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],(function(l
,n
,e
){var i
=!0;return"input"===n
&&(i
=!1!==t
["ɵnov"](l
,33)._handleInput(e
.target
.value
)&&i
),"blur"===n
&&(i
=!1!==t
["ɵnov"](l
,33).onTouched()&&i
),"compositionstart"===n
&&(i
=!1!==t
["ɵnov"](l
,33)._compositionStart()&&i
),"compositionend"===n
&&(i
=!1!==t
["ɵnov"](l
,33)._compositionEnd(e
.target
.value
)&&i
),i
}),null,null)),t
["ɵdid"](33,16384,null,0,i
.e
,[t
.Renderer2
,t
.ElementRef
,[2,i
.b
]],null,null),t
["ɵprd"](1024,null,i
.p
,(function(l
){return[l
]}),[i
.e
]),t
["ɵdid"](35,671744,[[3,4]],0,i
.j
,[[3,i
.d
],[8,null],[8,null],[6,i
.p
],[2,i
.E
]],{name
:[0,"name"]},null),t
["ɵprd"](2048,null,i
.q
,null,[i
.j
]),t
["ɵdid"](37,16384,null,0,i
.r
,[[4,i
.q
]],null,null),t
["ɵdid"](38,4210688,null,0,p
.a
,[t
.ElementRef
],{autofocus
:[0,"autofocus"]},null),t
["ɵdid"](39,4210688,null,0,u
.a
,[[2,s
.a
],a
.a
,t
.ElementRef
],null,null),t
["ɵdid"](40,16384,null,0,o
.h
,[[3,i
.d
],o
.a
],{formControlName
:[0,"formControlName"]},null),(l()(),t
["ɵand"](16777216,null,null,1,null,P
)),t
["ɵdid"](42,16384,null,0,r
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵand"](16777216,null,null,1,null,x
)),t
["ɵdid"](44,16384,null,0,r
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵeld"](45,0,null,null,6,"div",[["class","modal-footer"]],null,null,null,null,null)),(l()(),t
["ɵeld"](46,0,null,null,5,"div",[["class","button-group text-right"]],null,null,null,null,null)),(l()(),t
["ɵeld"](47,0,null,null,2,"cd-submit-button",[],null,[[null,"submitAction"]],(function(l
,n
,e
){var t
=!0;return"submitAction"===n
&&(t
=!1!==l
.component
.submit()&&t
),t
}),h
.b
,h
.a
)),t
["ɵdid"](48,114688,null,0,g
.a
,[t
.ElementRef
],{form
:[0,"form"]},{submitAction
:"submitAction"}),(l()(),t
["ɵted"](-1,0,["Create Namespace"])),(l()(),t
["ɵeld"](50,0,null,null,1,"cd-back-button",[["name","Close"]],null,null,null,f
.b
,f
.a
)),t
["ɵdid"](51,49152,null,0,v
.a
,[r
.Location
,b
.b
],{name
:[0,"name"],back
:[1,"back"]},null)],(function(l
,n
){var e
=n
.component
;l(n
,1,0,e
.modalRef
),l(n
,7,0,e
.namespaceForm
),l(n
,10,0,e
.namespaceForm
),l(n
,13,0),l(n
,20,0,!e
.poolPermission
.read
),l(n
,22,0,e
.poolPermission
.read
),l(n
,24,0,e
.namespaceForm
.showError("pool",t
["ɵnov"](n
,7),"required")),l(n
,26,0),l(n
,35,0,"namespace"),l(n
,38,0,""),l(n
,40,0,"namespace"),l(n
,42,0,e
.namespaceForm
.showError("namespace",t
["ɵnov"](n
,7),"required")),l(n
,44,0,e
.namespaceForm
.showError("namespace",t
["ɵnov"](n
,7),"namespaceExists")),l(n
,48,0,e
.namespaceForm
),l(n
,51,0,"Close",e
.modalRef
.hide
)}),(function(l
,n
){l(n
,5,0,t
["ɵnov"](n
,9).ngClassUntouched
,t
["ɵnov"](n
,9).ngClassTouched
,t
["ɵnov"](n
,9).ngClassPristine
,t
["ɵnov"](n
,9).ngClassDirty
,t
["ɵnov"](n
,9).ngClassValid
,t
["ɵnov"](n
,9).ngClassInvalid
,t
["ɵnov"](n
,9).ngClassPending
),l(n
,12,0,t
["ɵnov"](n
,13).hasErrors
,t
["ɵnov"](n
,13).hasSuccess
),l(n
,25,0,t
["ɵnov"](n
,26).hasErrors
,t
["ɵnov"](n
,26).hasSuccess
),l(n
,32,0,t
["ɵnov"](n
,37).ngClassUntouched
,t
["ɵnov"](n
,37).ngClassTouched
,t
["ɵnov"](n
,37).ngClassPristine
,t
["ɵnov"](n
,37).ngClassDirty
,t
["ɵnov"](n
,37).ngClassValid
,t
["ɵnov"](n
,37).ngClassInvalid
,t
["ɵnov"](n
,37).ngClassPending
,t
["ɵnov"](n
,40).validClass
,t
["ɵnov"](n
,40).invalidClass
)}))}function B(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,1,"cd-rbd-namespace-form-modal",[],null,null,null,q
,k
)),t
["ɵdid"](1,114688,null,0,C
.a
,[S
.a
,a
.a
,_
.a
,R
.a
,y
.a
,w
.a
],null,null)],(function(l
,n
){l(n
,1,0)}),null)}var O
=t
["ɵccf"]("cd-rbd-namespace-form-modal",C
.a
,B
,{},{},[])},"0rTx":function(l
,n
,e
){"use strict";var t
=e("8Y7J"),i
=e("EEJc"),u
=e("ajRT"),s
=e("s7LF"),a
=e("+gVj"),o
=e("mXUL"),r
=e("IZUe"),d
=e("ANnk"),c
=e("f/UV"),m
=e("aexS"),p
=e("SVse"),h
=e("gp3X"),g
=e("sb0X"),f
=e("KVJa"),v
=e("Z21x"),b
=e("sne2"),C
=e("2GqK"),S
=e("F83c"),_
=e("LqlI"),R
=e("2EZI"),y
=e("kn/O");e
.d(n
,"a",(function(){return N
}));var w
=t
["ɵcrt"]({encapsulation
:0,styles
:[[""]],data
:{}});function k(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,1,"span",[["class","invalid-feedback"]],null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["This field is required."]))],null,null)}function I(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,48,"cd-modal",[],null,null,null,i
.c
,i
.b
)),t
["ɵdid"](1,49152,null,0,u
.a
,[],{modalRef
:[0,"modalRef"]},null),(l()(),t
["ɵeld"](2,0,null,0,1,null,null,null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["Restore Image"])),(l()(),t
["ɵeld"](4,0,null,1,44,null,null,null,null,null,null,null)),(l()(),t
["ɵeld"](5,0,null,null,43,"form",[["class","form"],["name","restoreForm"],["novalidate",""]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"submit"],[null,"reset"]],(function(l
,n
,e
){var i
=!0;return"submit"===n
&&(i
=!1!==t
["ɵnov"](l
,7).onSubmit(e
)&&i
),"reset"===n
&&(i
=!1!==t
["ɵnov"](l
,7).onReset()&&i
),"submit"===n
&&(i
=!1!==t
["ɵnov"](l
,10).onSubmit()&&i
),i
}),null,null)),t
["ɵdid"](6,16384,null,0,s
.G
,[],null,null),t
["ɵdid"](7,540672,[["formDir",4]],0,s
.l
,[[8,null],[8,null]],{form
:[0,"form"]},null),t
["ɵprd"](2048,null,s
.d
,null,[s
.l
]),t
["ɵdid"](9,16384,null,0,s
.s
,[[4,s
.d
]],null,null),t
["ɵdid"](10,16384,null,0,a
.d
,[],{formGroup
:[0,"formGroup"]},null),(l()(),t
["ɵeld"](11,0,null,null,30,"div",[["class","modal-body"]],null,null,null,null,null)),(l()(),t
["ɵeld"](12,0,null,null,12,"p",[],null,null,null,null,null)),(l()(),t
["ɵeld"](13,0,null,null,1,null,null,null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["To restore"])),(l()(),t
["ɵted"](-1,null,[" "])),(l()(),t
["ɵeld"](16,0,null,null,1,"kbd",[],null,null,null,null,null)),(l()(),t
["ɵted"](17,null,["","@",""])),(l()(),t
["ɵted"](-1,null,[", "])),(l()(),t
["ɵeld"](19,0,null,null,1,null,null,null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["type the image's new name and click"])),(l()(),t
["ɵted"](-1,null,[" "])),(l()(),t
["ɵeld"](22,0,null,null,1,"kbd",[],null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["Restore Image"])),(l()(),t
["ɵted"](-1,null,[". "])),(l()(),t
["ɵeld"](25,0,null,null,16,"div",[["class","form-group"]],[[2,"has-error",null],[2,"has-success",null]],null,null,o
.b
,o
.a
)),t
["ɵdid"](26,1163264,null,2,a
.c
,[t
.ElementRef
,a
.g
],null,null),t
["ɵqud"](603979776,1,{FormControlNames
:1}),t
["ɵqud"](603979776,2,{messagesBlock
:0}),(l()(),t
["ɵeld"](29,0,null,0,1,"label",[["class","col-form-label"],["for","name"]],null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["New Name"])),(l()(),t
["ɵeld"](31,0,null,0,8,"input",[["autocomplete","off"],["autofocus",""],["class","form-control"],["formControlName","name"],["id","name"],["name","name"],["type","text"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"is-valid",null],[2,"is-invalid",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],(function(l
,n
,e
){var i
=!0;return"input"===n
&&(i
=!1!==t
["ɵnov"](l
,32)._handleInput(e
.target
.value
)&&i
),"blur"===n
&&(i
=!1!==t
["ɵnov"](l
,32).onTouched()&&i
),"compositionstart"===n
&&(i
=!1!==t
["ɵnov"](l
,32)._compositionStart()&&i
),"compositionend"===n
&&(i
=!1!==t
["ɵnov"](l
,32)._compositionEnd(e
.target
.value
)&&i
),i
}),null,null)),t
["ɵdid"](32,16384,null,0,s
.e
,[t
.Renderer2
,t
.ElementRef
,[2,s
.b
]],null,null),t
["ɵprd"](1024,null,s
.p
,(function(l
){return[l
]}),[s
.e
]),t
["ɵdid"](34,671744,[[1,4]],0,s
.j
,[[3,s
.d
],[8,null],[8,null],[6,s
.p
],[2,s
.E
]],{name
:[0,"name"]},null),t
["ɵprd"](2048,null,s
.q
,null,[s
.j
]),t
["ɵdid"](36,16384,null,0,s
.r
,[[4,s
.q
]],null,null),t
["ɵdid"](37,4210688,null,0,r
.a
,[t
.ElementRef
],{autofocus
:[0,"autofocus"]},null),t
["ɵdid"](38,4210688,null,0,d
.a
,[[2,c
.a
],m
.a
,t
.ElementRef
],null,null),t
["ɵdid"](39,16384,null,0,a
.h
,[[3,s
.d
],a
.a
],{formControlName
:[0,"formControlName"]},null),(l()(),t
["ɵand"](16777216,null,0,1,null,k
)),t
["ɵdid"](41,16384,null,0,p
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵeld"](42,0,null,null,6,"div",[["class","modal-footer"]],null,null,null,null,null)),(l()(),t
["ɵeld"](43,0,null,null,5,"div",[["class","button-group text-right"]],null,null,null,null,null)),(l()(),t
["ɵeld"](44,0,null,null,2,"cd-submit-button",[],null,[[null,"submitAction"]],(function(l
,n
,e
){var t
=!0;return"submitAction"===n
&&(t
=!1!==l
.component
.restore()&&t
),t
}),h
.b
,h
.a
)),t
["ɵdid"](45,114688,null,0,g
.a
,[t
.ElementRef
],{form
:[0,"form"]},{submitAction
:"submitAction"}),(l()(),t
["ɵted"](-1,0,["Restore Image"])),(l()(),t
["ɵeld"](47,0,null,null,1,"cd-back-button",[["name","Cancel"]],null,null,null,f
.b
,f
.a
)),t
["ɵdid"](48,49152,null,0,v
.a
,[p
.Location
,b
.b
],{name
:[0,"name"],back
:[1,"back"]},null)],(function(l
,n
){var e
=n
.component
;l(n
,1,0,e
.modalRef
),l(n
,7,0,e
.restoreForm
),l(n
,10,0,e
.restoreForm
),l(n
,26,0),l(n
,34,0,"name"),l(n
,37,0,""),l(n
,39,0,"name"),l(n
,41,0,e
.restoreForm
.showError("name",t
["ɵnov"](n
,7),"required")),l(n
,45,0,e
.restoreForm
),l(n
,48,0,"Cancel",e
.modalRef
.hide
)}),(function(l
,n
){var e
=n
.component
;l(n
,5,0,t
["ɵnov"](n
,9).ngClassUntouched
,t
["ɵnov"](n
,9).ngClassTouched
,t
["ɵnov"](n
,9).ngClassPristine
,t
["ɵnov"](n
,9).ngClassDirty
,t
["ɵnov"](n
,9).ngClassValid
,t
["ɵnov"](n
,9).ngClassInvalid
,t
["ɵnov"](n
,9).ngClassPending
),l(n
,17,0,e
.imageSpec
,e
.imageId
),l(n
,25,0,t
["ɵnov"](n
,26).hasErrors
,t
["ɵnov"](n
,26).hasSuccess
),l(n
,31,0,t
["ɵnov"](n
,36).ngClassUntouched
,t
["ɵnov"](n
,36).ngClassTouched
,t
["ɵnov"](n
,36).ngClassPristine
,t
["ɵnov"](n
,36).ngClassDirty
,t
["ɵnov"](n
,36).ngClassValid
,t
["ɵnov"](n
,36).ngClassInvalid
,t
["ɵnov"](n
,36).ngClassPending
,t
["ɵnov"](n
,39).validClass
,t
["ɵnov"](n
,39).invalidClass
)}))}function E(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,1,"cd-rbd-trash-restore-modal",[],null,null,null,I
,w
)),t
["ɵdid"](1,114688,null,0,C
.a
,[S
.a
,_
.a
,R
.a
,y
.a
],null,null)],(function(l
,n
){l(n
,1,0)}),null)}var N
=t
["ɵccf"]("cd-rbd-trash-restore-modal",C
.a
,E
,{},{},[])},"2GqK":function(l
,n
,e
){"use strict";e
.d(n
,"a",(function(){return u
})),e("F83c"),e("2EZI");var t
=e("kvvV"),i
=e("jVDg");e("kn/O");class u
{constructor(l
,n
,e
,t
){this.rbdService
=l
,this.modalRef
=n
,this.fb
=e
,this.taskWrapper
=t
}ngOnInit(){this.imageSpec
=new i
.a(this.poolName
,this.namespace,this.imageName
).toString(),this.restoreForm
=this.fb
.group({name
:this.imageName
})}restore(){const l
=this.restoreForm
.getValue("name"),n
=new i
.a(this.poolName
,this.namespace,this.imageId
);this.taskWrapper
.wrapTaskAroundCall({task
:new t
.a("rbd/trash/restore",{image_id_spec
:n
.toString(),new_image_name
:l
}),call
:this.rbdService
.restoreTrash(n
,l
)}).subscribe(void 0,()=>{this.restoreForm
.setErrors({cdSubmitButton
:!0})},()=>{this.modalRef
.hide()})}}},"2JDI":function(l
,n
,e
){"use strict";e
.d(n
,"a",(function(){return a
}));var t
=e("wd/R"),i
=(e("F83c"),e("2EZI"),e("1Ni5")),u
=e("kvvV"),s
=e("jVDg");e("kn/O");class a
{constructor(l
,n
,e
,t
){this.rbdService
=l
,this.modalRef
=n
,this.fb
=e
,this.taskWrapper
=t
,this.minDate
=new Date
,this.bsConfig
={dateInputFormat
:"YYYY-MM-DD HH:mm:ss",containerClass
:"theme-default"},this.createForm()}createForm(){this.moveForm
=this.fb
.group({expiresAt
:["",[i
.a
.custom("format",l
=>!(""===l
||t(l
,"YYYY-MM-DD HH:mm:ss").isValid())),i
.a
.custom("expired",l
=>t().isAfter(l
))]]})}ngOnInit(){this.imageSpec
=new s
.a(this.poolName
,this.namespace,this.imageName
),this.imageSpecStr
=this.imageSpec
.toString(),this.pattern
=`${this.poolName}/${this.imageName}`}moveImage(){let l
=0;const n
=this.moveForm
.getValue("expiresAt");n
&&(l
=t(n
).diff(t(),"seconds",!0)),l
<0&&(l
=0),this.taskWrapper
.wrapTaskAroundCall({task
:new u
.a("rbd/trash/move",{image_spec
:this.imageSpecStr
}),call
:this.rbdService
.moveTrash(this.imageSpec
,l
)}).subscribe(void 0,void 0,()=>{this.modalRef
.hide()})}}},"3IYD":function(l
,n
,e
){"use strict";var t
=e("8Y7J"),i
=e("SVse"),u
=e("8xTl"),s
=e("EEJc"),a
=e("ajRT"),o
=e("s7LF"),r
=e("+gVj"),d
=e("mXUL"),c
=e("IZUe"),m
=e("ANnk"),p
=e("f/UV"),h
=e("aexS"),g
=e("gp3X"),f
=e("sb0X"),v
=e("KVJa"),b
=e("Z21x"),C
=e("sne2"),S
=e("Fd71"),_
=e("LqlI"),R
=e("F83c"),y
=e("VXsX"),w
=e("9nlD"),k
=e("GiVz");e
.d(n
,"a",(function(){return V
}));var I
=t
["ɵcrt"]({encapsulation
:0,styles
:[[""]],data
:{}});function E(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,1,"span",[["class","invalid-feedback"]],null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["This field is required."]))],null,null)}function N(l
){return t
["ɵvid"](0,[t
["ɵpid"](0,i
.TitleCasePipe
,[]),t
["ɵpid"](0,u
.a
,[]),(l()(),t
["ɵeld"](2,0,null,null,40,"cd-modal",[],null,null,null,s
.c
,s
.b
)),t
["ɵdid"](3,49152,null,0,a
.a
,[],{modalRef
:[0,"modalRef"]},null),(l()(),t
["ɵeld"](4,0,null,0,3,null,null,null,null,null,null,null)),(l()(),t
["ɵted"](5,null,[""," ",""])),t
["ɵppd"](6,1),t
["ɵppd"](7,1),(l()(),t
["ɵeld"](8,0,null,1,34,null,null,null,null,null,null,null)),(l()(),t
["ɵeld"](9,0,null,null,33,"form",[["name","snapshotForm"],["novalidate",""]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"submit"],[null,"reset"]],(function(l
,n
,e
){var i
=!0;return"submit"===n
&&(i
=!1!==t
["ɵnov"](l
,11).onSubmit(e
)&&i
),"reset"===n
&&(i
=!1!==t
["ɵnov"](l
,11).onReset()&&i
),"submit"===n
&&(i
=!1!==t
["ɵnov"](l
,14).onSubmit()&&i
),i
}),null,null)),t
["ɵdid"](10,16384,null,0,o
.G
,[],null,null),t
["ɵdid"](11,540672,[["formDir",4]],0,o
.l
,[[8,null],[8,null]],{form
:[0,"form"]},null),t
["ɵprd"](2048,null,o
.d
,null,[o
.l
]),t
["ɵdid"](13,16384,null,0,o
.s
,[[4,o
.d
]],null,null),t
["ɵdid"](14,16384,null,0,r
.d
,[],{formGroup
:[0,"formGroup"]},null),(l()(),t
["ɵeld"](15,0,null,null,18,"div",[["class","modal-body"]],null,null,null,null,null)),(l()(),t
["ɵeld"](16,0,null,null,17,"div",[["class","form-group row"]],[[2,"has-error",null],[2,"has-success",null]],null,null,d
.b
,d
.a
)),t
["ɵdid"](17,1163264,null,2,r
.c
,[t
.ElementRef
,r
.g
],null,null),t
["ɵqud"](603979776,1,{FormControlNames
:1}),t
["ɵqud"](603979776,2,{messagesBlock
:0}),(l()(),t
["ɵeld"](20,0,null,0,1,"label",[["class","cd-col-form-label required"],["for","snapshotName"]],null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["Name"])),(l()(),t
["ɵeld"](22,0,null,0,11,"div",[["class","cd-col-form-input"]],null,null,null,null,null)),(l()(),t
["ɵeld"](23,0,null,null,8,"input",[["autofocus",""],["class","form-control"],["formControlName","snapshotName"],["id","snapshotName"],["name","snapshotName"],["placeholder","Snapshot name..."],["type","text"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"is-valid",null],[2,"is-invalid",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],(function(l
,n
,e
){var i
=!0;return"input"===n
&&(i
=!1!==t
["ɵnov"](l
,24)._handleInput(e
.target
.value
)&&i
),"blur"===n
&&(i
=!1!==t
["ɵnov"](l
,24).onTouched()&&i
),"compositionstart"===n
&&(i
=!1!==t
["ɵnov"](l
,24)._compositionStart()&&i
),"compositionend"===n
&&(i
=!1!==t
["ɵnov"](l
,24)._compositionEnd(e
.target
.value
)&&i
),i
}),null,null)),t
["ɵdid"](24,16384,null,0,o
.e
,[t
.Renderer2
,t
.ElementRef
,[2,o
.b
]],null,null),t
["ɵprd"](1024,null,o
.p
,(function(l
){return[l
]}),[o
.e
]),t
["ɵdid"](26,671744,[[1,4]],0,o
.j
,[[3,o
.d
],[8,null],[8,null],[6,o
.p
],[2,o
.E
]],{name
:[0,"name"]},null),t
["ɵprd"](2048,null,o
.q
,null,[o
.j
]),t
["ɵdid"](28,16384,null,0,o
.r
,[[4,o
.q
]],null,null),t
["ɵdid"](29,4210688,null,0,c
.a
,[t
.ElementRef
],{autofocus
:[0,"autofocus"]},null),t
["ɵdid"](30,4210688,null,0,m
.a
,[[2,p
.a
],h
.a
,t
.ElementRef
],null,null),t
["ɵdid"](31,16384,null,0,r
.h
,[[3,o
.d
],r
.a
],{formControlName
:[0,"formControlName"]},null),(l()(),t
["ɵand"](16777216,null,null,1,null,E
)),t
["ɵdid"](33,16384,null,0,i
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵeld"](34,0,null,null,8,"div",[["class","modal-footer"]],null,null,null,null,null)),(l()(),t
["ɵeld"](35,0,null,null,7,"div",[["class","button-group text-right"]],null,null,null,null,null)),(l()(),t
["ɵeld"](36,0,null,null,4,"cd-submit-button",[],null,[[null,"submitAction"]],(function(l
,n
,e
){var t
=!0;return"submitAction"===n
&&(t
=!1!==l
.component
.submit()&&t
),t
}),g
.b
,g
.a
)),t
["ɵdid"](37,114688,null,0,f
.a
,[t
.ElementRef
],{form
:[0,"form"]},{submitAction
:"submitAction"}),(l()(),t
["ɵted"](38,0,[""," ",""])),t
["ɵppd"](39,1),t
["ɵppd"](40,1),(l()(),t
["ɵeld"](41,0,null,null,1,"cd-back-button",[["name","Close"]],null,null,null,v
.b
,v
.a
)),t
["ɵdid"](42,49152,null,0,b
.a
,[i
.Location
,C
.b
],{name
:[0,"name"],back
:[1,"back"]},null)],(function(l
,n
){var e
=n
.component
;l(n
,3,0,e
.modalRef
),l(n
,11,0,e
.snapshotForm
),l(n
,14,0,e
.snapshotForm
),l(n
,17,0),l(n
,26,0,"snapshotName"),l(n
,29,0,""),l(n
,31,0,"snapshotName"),l(n
,33,0,e
.snapshotForm
.showError("snapshotName",t
["ɵnov"](n
,11),"required")),l(n
,37,0,e
.snapshotForm
),l(n
,42,0,"Close",e
.modalRef
.hide
)}),(function(l
,n
){var e
=n
.component
,i
=t
["ɵunv"](n
,5,0,l(n
,6,0,t
["ɵnov"](n
,0),e
.action
)),u
=t
["ɵunv"](n
,5,1,l(n
,7,0,t
["ɵnov"](n
,1),e
.resource
));l(n
,5,0,i
,u
),l(n
,9,0,t
["ɵnov"](n
,13).ngClassUntouched
,t
["ɵnov"](n
,13).ngClassTouched
,t
["ɵnov"](n
,13).ngClassPristine
,t
["ɵnov"](n
,13).ngClassDirty
,t
["ɵnov"](n
,13).ngClassValid
,t
["ɵnov"](n
,13).ngClassInvalid
,t
["ɵnov"](n
,13).ngClassPending
),l(n
,16,0,t
["ɵnov"](n
,17).hasErrors
,t
["ɵnov"](n
,17).hasSuccess
),l(n
,23,0,t
["ɵnov"](n
,28).ngClassUntouched
,t
["ɵnov"](n
,28).ngClassTouched
,t
["ɵnov"](n
,28).ngClassPristine
,t
["ɵnov"](n
,28).ngClassDirty
,t
["ɵnov"](n
,28).ngClassValid
,t
["ɵnov"](n
,28).ngClassInvalid
,t
["ɵnov"](n
,28).ngClassPending
,t
["ɵnov"](n
,31).validClass
,t
["ɵnov"](n
,31).invalidClass
);var s
=t
["ɵunv"](n
,38,0,l(n
,39,0,t
["ɵnov"](n
,0),e
.action
)),a
=t
["ɵunv"](n
,38,1,l(n
,40,0,t
["ɵnov"](n
,1),e
.resource
));l(n
,38,0,s
,a
)}))}function F(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,1,"cd-rbd-snapshot-form-modal",[],null,null,null,N
,I
)),t
["ɵdid"](1,114688,null,0,S
.a
,[_
.a
,R
.a
,y
.a
,w
.a
,k
.a
,C
.b
],null,null)],(function(l
,n
){l(n
,1,0)}),null)}var V
=t
["ɵccf"]("cd-rbd-snapshot-form-modal",S
.a
,F
,{},{},[])},"3ris":function(l
,n
,e
){"use strict";e
.d(n
,"a",(function(){return s
}));var t
=e("yYhs"),i
=e("LvDl"),u
=(e("uIqm"),e("oxzT"));e("iExv"),e("uYzU");class s
{constructor(l
,n
,e
){this.i18n
=l
,this.iscsiBackstorePipe
=n
,this.booleanTextPipe
=e
,this.icons
=u
.a
,this.metadata
={},this.nodes
=[],this.treeOptions
={useVirtualScroll
:!0,actionMapping
:{mouse
:{click
:this.onNodeSelected
.bind(this)}}}}set content(l
){this.detailTable
=l
,l
&&l
.updateColumns()}ngOnInit(){this.columns
=[{prop
:"displayName",name
:this.i18n("Name"),flexGrow
:1,cellTemplate
:this.highlightTpl
},{prop
:"current",name
:this.i18n("Current"),flexGrow
:1,cellTemplate
:this.highlightTpl
},{prop
:"default",name
:this.i18n("Default"),flexGrow
:1,cellTemplate
:this.highlightTpl
}]}ngOnChanges(){this.selection
&&(this.selectedItem
=this.selection
,this.generateTree()),this.data
=void 0}generateTree(){const l
=i
.cloneDeep(this.selectedItem
.target_controls
);this.cephIscsiConfigVersion
>10&&i
.extend(l
,i
.cloneDeep(this.selectedItem
.auth
)),this.metadata
={root
:l
};const n
={target
:{expanded
:i
.join(this.selectedItem
.cdExecuting
?[u
.a
.large
,u
.a
.spinner
,u
.a
.spin
]:[u
.a
.large
,u
.a
.bullseye
]," ")},initiators
:{expanded
:i
.join([u
.a
.large
,u
.a
.user
]," "),leaf
:i
.join([u
.a
.user
]," ")},groups
:{expanded
:i
.join([u
.a
.large
,u
.a
.users
]," "),leaf
:i
.join([u
.a
.users
]," ")},disks
:{expanded
:i
.join([u
.a
.large
,u
.a
.disk
]," "),leaf
:i
.join([u
.a
.disk
]," ")},portals
:{expanded
:i
.join([u
.a
.large
,u
.a
.server
]," "),leaf
:i
.join([u
.a
.server
]," ")}},e
=[];i
.forEach(this.selectedItem
.disks
,l
=>{const t
="disk_"+l
.pool
+"_"+l
.image
;this.metadata
[t
]={controls
:l
.controls
,backstore
:l
.backstore
},["wwn","lun"].forEach(n
=>{n
in l
&&(this.metadata
[t
][n
]=l
[n
])}),e
.push({name
:`${l.pool}/${l.image}`,cdId
:t
,cdIcon
:n
.disks
.leaf
})});const t
=[];i
.forEach(this.selectedItem
.portals
,l
=>{t
.push({name
:`${l.host}:${l.ip}`,cdIcon
:n
.portals
.leaf
})});const s
=[];i
.forEach(this.selectedItem
.clients
,l
=>{const e
=i
.cloneDeep(l
.auth
);l
.info
&&(i
.extend(e
,l
.info
),delete e
.state
,i
.forEach(Object
.keys(l
.info
.state
),n
=>{e
[n
.toLowerCase()]=l
.info
.state
[n
]})),this.metadata
["client_"+l
.client_iqn
]=e
;const t
=[];l
.luns
.forEach(l
=>{t
.push({name
:`${l.pool}/${l.image}`,cdId
:"disk_"+l
.pool
+"_"+l
.image
,cdIcon
:n
.disks
.leaf
})});let u
="";l
.info
&&(u
=Object
.keys(l
.info
.state
).includes("LOGGED_IN")?"logged_in":"logged_out"),s
.push({name
:l
.client_iqn
,status
:u
,cdId
:"client_"+l
.client_iqn
,children
:t
,cdIcon
:n
.initiators
.leaf
})});const a
=[];i
.forEach(this.selectedItem
.groups
,l
=>{const e
=[];l
.disks
.forEach(l
=>{e
.push({name
:`${l.pool}/${l.image}`,cdId
:"disk_"+l
.pool
+"_"+l
.image
,cdIcon
:n
.disks
.leaf
})});const t
=[];l
.members
.forEach(l
=>{t
.push({name
:l
,cdId
:"client_"+l
})}),a
.push({name
:l
.group_id
,cdIcon
:n
.groups
.leaf
,children
:[{name
:"Disks",children
:e
,cdIcon
:n
.disks
.expanded
},{name
:"Initiators",children
:t
,cdIcon
:n
.initiators
.expanded
}]})}),this.nodes
=[{name
:this.selectedItem
.target_iqn
,cdId
:"root",isExpanded
:!0,cdIcon
:n
.target
.expanded
,children
:[{name
:"Disks",isExpanded
:!0,children
:e
,cdIcon
:n
.disks
.expanded
},{name
:"Portals",isExpanded
:!0,children
:t
,cdIcon
:n
.portals
.expanded
},{name
:"Initiators",isExpanded
:!0,children
:s
,cdIcon
:n
.initiators
.expanded
},{name
:"Groups",isExpanded
:!0,children
:a
,cdIcon
:n
.groups
.expanded
}]}]}format(l
){return"boolean"==typeof l
?this.booleanTextPipe
.transform(l
):l
}onNodeSelected(l
,n
){if(t
.a
.ACTIVATE(l
,n
,!0),n
.data
.cdId
){this.title
=n
.data
.name
;const l
=this.metadata
[n
.data
.cdId
]||{};"root"===n
.data
.cdId
?(this.columns
[2].isHidden
=!1,this.data
=i
.map(this.settings
.target_default_controls
,(n
,e
)=>({displayName
:e
,default:n
=this.format(n
),current
:i
.isUndefined(l
[e
])?n
:this.format(l
[e
])})),this.cephIscsiConfigVersion
>10&&["user","password","mutual_user","mutual_password"].forEach(n
=>{this.data
.push({displayName
:n
,default:null,current
:l
[n
]})})):n
.data
.cdId
.toString().startsWith("disk_")?(this.columns
[2].isHidden
=!1,this.data
=i
.map(this.settings
.disk_default_controls
[l
.backstore
],(n
,e
)=>({displayName
:e
,default:n
=this.format(n
),current
:i
.isUndefined(l
.controls
[e
])?n
:this.format(l
.controls
[e
])})),this.data
.push({displayName
:"backstore",default:this.iscsiBackstorePipe
.transform(this.settings
.default_backstore
),current
:this.iscsiBackstorePipe
.transform(l
.backstore
)}),["wwn","lun"].forEach(n
=>{n
in l
&&this.data
.push({displayName
:n
,default:void 0,current
:l
[n
]})})):(this.columns
[2].isHidden
=!0,this.data
=i
.map(l
,(l
,n
)=>({displayName
:n
,default:void 0,current
:this.format(l
)})))}else this.data
=void 0;this.detailTable
&&this.detailTable
.updateColumns()}onUpdateData(){this.tree
.treeModel
.expandAll()}}},"5GyT":function(l
,n
,e
){"use strict";e
.d(n
,"a",(function(){return v
})),e
.d(n
,"b",(function(){return f
}));var t
=e("LvDl"),i
=(e("F83c"),e("+fVR")),u
=e("OLbh"),s
=e("0+/T"),a
=(e("sne2"),e("uIqm"),e("x38r")),o
=e("oxzT"),r
=e("yJti"),d
=e("vCyI"),c
=e("kvvV"),m
=e("jVDg"),p
=(e("Fgil"),e("o4+5"),e("aexS"),e("VTlA"),e("kn/O"),e("EgGo")),h
=e("2JDI"),g
=e("u0yg");const f
=new p
.a("block/rbd");class v
extends i
.a
{constructor(l
,n
,e
,t
,i
,u
,s
,a
,r
,c
){super(),this.authStorageService
=l
,this.rbdService
=n
,this.dimlessBinaryPipe
=e
,this.dimlessPipe
=t
,this.modalService
=i
,this.taskWrapper
=u
,this.taskListService
=s
,this.i18n
=a
,this.urlBuilder
=r
,this.actionLabels
=c
,this.selection
=new d
.a
,this.builders
={"rbd/create":l
=>this.createRbdFromTask(l
.pool_name
,l
.namespace,l
.image_name
),"rbd/delete":l
=>this.createRbdFromTaskImageSpec(l
.image_spec
),"rbd/clone":l
=>this.createRbdFromTask(l
.child_pool_name
,l
.child_namespace
,l
.child_image_name
),"rbd/copy":l
=>this.createRbdFromTask(l
.dest_pool_name
,l
.dest_namespace
,l
.dest_image_name
)},this.permission
=this.authStorageService
.getPermissions().rbdImage
;const p
=()=>this.selection
.first()&&new m
.a(this.selection
.first().pool_name
,this.selection
.first().namespace,this.selection
.first().name
).toStringEncoded();this.tableActions
=[{permission
:"create",icon
:o
.a
.add
,routerLink
:()=>this.urlBuilder
.getCreate(),canBePrimary
:l
=>!l
.hasSingleSelection
,name
:this.actionLabels
.CREATE
},{permission
:"update",icon
:o
.a
.edit
,routerLink
:()=>this.urlBuilder
.getEdit(p()),name
:this.actionLabels
.EDIT
},{permission
:"create",canBePrimary
:l
=>l
.hasSingleSelection
,disable
:l
=>!l
.hasSingleSelection
||l
.first().cdExecuting
,icon
:o
.a
.copy
,routerLink
:()=>"/block/rbd/copy/"+p(),name
:this.actionLabels
.COPY
},{permission
:"update",disable
:l
=>!l
.hasSingleSelection
||l
.first().cdExecuting
||!l
.first().parent
,icon
:o
.a
.flatten
,click
:()=>this.flattenRbdModal(),name
:this.actionLabels
.FLATTEN
},{permission
:"delete",icon
:o
.a
.destroy
,click
:()=>this.deleteRbdModal(),name
:this.actionLabels
.DELETE
,disable
:l
=>this.getDeleteDisableDesc(l
)},{permission
:"delete",icon
:o
.a
.trash
,click
:()=>this.trashRbdModal(),name
:this.actionLabels
.TRASH
,disable
:l
=>!l
.first()||!l
.hasSingleSelection
||l
.first().image_format
===g
.a
.V1
}]}createRbdFromTaskImageSpec(l
){const n
=m
.a
.fromString(l
);return this.createRbdFromTask(n
.poolName
,n
.namespace,n
.imageName
)}createRbdFromTask(l
,n
,e
){const t
=new g
.b
;return t
.id
="-1",t
.unique_id
="-1",t
.name
=e
,t
.namespace=n
,t
.pool_name
=l
,t
.image_format
=g
.a
.V2
,t
}ngOnInit(){this.columns
=[{name
:this.i18n("Name"),prop
:"name",flexGrow
:2,cellTransformation
:a
.a
.executing
},{name
:this.i18n("Pool"),prop
:"pool_name",flexGrow
:2},{name
:this.i18n("Namespace"),prop
:"namespace",flexGrow
:2},{name
:this.i18n("Size"),prop
:"size",flexGrow
:1,cellClass
:"text-right",pipe
:this.dimlessBinaryPipe
},{name
:this.i18n("Objects"),prop
:"num_objs",flexGrow
:1,cellClass
:"text-right",pipe
:this.dimlessPipe
},{name
:this.i18n("Object size"),prop
:"obj_size",flexGrow
:1,cellClass
:"text-right",pipe
:this.dimlessBinaryPipe
},{name
:this.i18n("Provisioned"),prop
:"disk_usage",cellClass
:"text-center",flexGrow
:1,pipe
:this.dimlessBinaryPipe
},{name
:this.i18n("Total provisioned"),prop
:"total_disk_usage",cellClass
:"text-center",flexGrow
:1,pipe
:this.dimlessBinaryPipe
},{name
:this.i18n("Parent"),prop
:"parent",flexGrow
:2,cellTemplate
:this.parentTpl
}],this.taskListService
.init(()=>this.rbdService
.list(),l
=>this.prepareResponse(l
),l
=>this.images
=l
,()=>this.onFetchError(),l
=>["rbd/clone","rbd/copy","rbd/create","rbd/delete","rbd/edit","rbd/flatten","rbd/trash/move"].includes(l
.name
),(l
,n
)=>{let e
;switch(n
.name
){case"rbd/copy":e
=new m
.a(n
.metadata
.dest_pool_name
,n
.metadata
.dest_namespace
,n
.metadata
.dest_image_name
).toString();break;case"rbd/clone":e
=new m
.a(n
.metadata
.child_pool_name
,n
.metadata
.child_namespace
,n
.metadata
.child_image_name
).toString();break;case"rbd/create":e
=new m
.a(n
.metadata
.pool_name
,n
.metadata
.namespace,n
.metadata
.image_name
).toString();break;default:e
=n
.metadata
.image_spec
}return e
===new m
.a(l
.pool_name
,l
.namespace,l
.name
).toString()},this.builders
)}onFetchError(){this.table
.reset(),this.viewCacheStatusList
=[{status
:r
.a
.ValueException
}]}prepareResponse(l
){let n
=[];const e
={};l
.forEach(l
=>{t
.isUndefined(e
[l
.status
])&&(e
[l
.status
]=[]),e
[l
.status
].push(l
.pool_name
),n
=n
.concat(l
.value
)});const i
=[];return t
.forEach(e
,(l
,n
)=>{i
.push({status
:parseInt(n
,10),statusFor
:(l
.length
>1?"pools ":"pool ")+"<strong>"+l
.join("</strong>, <strong>")+"</strong>"})}),this.viewCacheStatusList
=i
,n
}updateSelection(l
){this.selection
=l
}deleteRbdModal(){const l
=this.selection
.first().pool_name
,n
=this.selection
.first().namespace,e
=this.selection
.first().name
,t
=new m
.a(l
,n
,e
);this.modalRef
=this.modalService
.show(s
.a
,{initialState
:{itemDescription
:"RBD",itemNames
:[t
],bodyTemplate
:this.deleteTpl
,bodyContext
:{hasSnapshots
:this.hasSnapshots(),snapshots
:this.listProtectedSnapshots()},submitActionObservable
:()=>this.taskWrapper
.wrapTaskAroundCall({task
:new c
.a("rbd/delete",{image_spec
:t
.toString()}),call
:this.rbdService
.delete(t
)})}})}trashRbdModal(){const l
={poolName
:this.selection
.first().pool_name
,namespace:this.selection
.first().namespace,imageName
:this.selection
.first().name
,hasSnapshots
:this.hasSnapshots()};this.modalRef
=this.modalService
.show(h
.a
,{initialState
:l
})}flattenRbd(l
){this.taskWrapper
.wrapTaskAroundCall({task
:new c
.a("rbd/flatten",{image_spec
:l
.toString()}),call
:this.rbdService
.flatten(l
)}).subscribe(void 0,void 0,()=>{this.modalRef
.hide()})}flattenRbdModal(){const l
=this.selection
.first().pool_name
,n
=this.selection
.first().namespace,e
=this.selection
.first().name
,t
=this.selection
.first().parent
,i
=new m
.a(t
.pool_name
,t
.pool_namespace
,t
.image_name
),s
=new m
.a(l
,n
,e
),a
={titleText
:"RBD flatten",buttonText
:"Flatten",bodyTpl
:this.flattenTpl
,bodyData
:{parent
:`${i}@${t.snap_name}`,child
:s
.toString()},onSubmit
:()=>{this.flattenRbd(s
)}};this.modalRef
=this.modalService
.show(u
.a
,{initialState
:a
})}hasSnapshots(){return(this.selection
.first().snapshots
||[]).length
>0}hasClonedSnapshots(l
){return(l
.snapshots
||[]).some(l
=>l
.children
&&l
.children
.length
>0)}listProtectedSnapshots(){return this.selection
.first().snapshots
.reduce((l
,n
)=>(n
.is_protected
&&l
.push(n
.name
),l
),[])}getDeleteDisableDesc(l
){const n
=l
.first();return n
&&this.hasClonedSnapshots(n
)?this.i18n("This RBD has cloned snapshots. Please delete related RBDs before deleting this RBD."):!l
.first()||!l
.hasSingleSelection
||this.hasClonedSnapshots(l
.first())}}},BH9v:function(l
,n
,e
){"use strict";var t
=e("8Y7J"),i
=e("s7LF"),u
=e("aXbf");class s
{constructor(l
,n
){this.control
=l
,this.formatter
=n
}setValue(l
){const n
=this.formatter
.toMilliseconds(l
);this.control
.control
.setValue(n
+" ms")}ngOnInit(){this.setValue(this.control
.value
),this.ngDataReady
&&this.ngDataReady
.subscribe(()=>this.setValue(this.control
.value
))}onUpdate(l
){this.setValue(l
)}}var a
=e("ANnk"),o
=e("f/UV"),r
=e("aexS"),d
=e("+gVj"),c
=e("LvDl"),m
=e("IzCI");class p
{constructor(l
,n
,e
,i
){this.elementRef
=l
,this.control
=n
,this.dimlessBinaryPerSecondPipe
=e
,this.formatter
=i
,this.ngModelChange
=new t
.EventEmitter
,this.el
=this.elementRef
.nativeElement
}ngOnInit(){this.setValue(this.el
.value
),this.ngDataReady
&&this.ngDataReady
.subscribe(()=>this.setValue(this.el
.value
))}setValue(l
){/^[\d.]+$/.test(l
)&&(l
+=this.defaultUnit
||"m");const n
=this.formatter
.toBytes(l
,0),e
=this.round(n
);this.el
.value
=this.dimlessBinaryPerSecondPipe
.transform(e
),null!==n
?(this.ngModelChange
.emit(this.el
.value
),this.control
.control
.setValue(this.el
.value
)):(this.ngModelChange
.emit(null),this.control
.control
.setValue(null))}round(l
){if(null!==l
&&0!==l
){if(!c
.isUndefined(this.minBytes
)&&l
<this.minBytes
)return this.minBytes
;if(!c
.isUndefined(this.maxBytes
)&&l
>this.maxBytes
)return this.maxBytes
;if(!c
.isUndefined(this.roundPower
)){const n
=Math
.round(Math
.log(l
)/Math.log(this.roundPower));return Math.pow(this.roundPower,n)}}return l}onBlur(l){this.setValue(l)}}class h{constructor(l,n){this.formatter=l,this.ngControl=n}setValue(l){const n=this.formatter.toIops(l);this.ngControl.control.setValue(n+" IOPS")}ngOnInit(){this.setValue(this.ngControl.value),this.ngDataReady&&this.ngDataReady.subscribe(()=>this.setValue(this.ngControl.value))}onUpdate(l){this.setValue(l)}}var g=e("mXUL"),f=e("4HWh"),v=e("p4Cf"),b=e("SVse");e("rFfW"),e("o8EM"),e.d(n,"a",(function(){return C})),e.d(n,"b",(function(){return I}));var C=t["ɵcrt"]({encapsulation:0,styles:[[".collapsible[_ngcontent-%COMP%]{cursor:pointer;-moz-user-select:none;user-select:none}"]],data:{}});function S(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,9,null,null,null,null,null,null,null)),(l()(),t["ɵeld"](1,0,null,null,8,"input",[["cdMilliseconds",""],["class","form-control"],["type","text"]],[[8,"id",0],[8,"name",0],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"is-valid",null],[2,"is-invalid",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],(function(l,n,e){var i=!0;return"input"===n&&(i=!1!==t["ɵnov"](l,2)._handleInput(e.target.value)&&i),"blur"===n&&(i=!1!==t["ɵnov"](l,2).onTouched()&&i),"compositionstart"===n&&(i=!1!==t["ɵnov"](l,2)._compositionStart()&&i),"compositionend"===n&&(i=!1!==t["ɵnov"](l,2)._compositionEnd(e.target.value)&&i),"blur"===n&&(i=!1!==t["ɵnov"](l,7).onUpdate(e.target.value)&&i),i}),null,null)),t["ɵdid"](2,16384,null,0,i.e,[t.Renderer2,t.ElementRef,[2,i.b]],null,null),t["ɵprd"](1024,null,i.p,(function(l){return[l]}),[i.e]),t["ɵdid"](4,671744,null,0,i.j,[[3,i.d],[8,null],[8,null],[6,i.p],[2,i.E]],{name:[0,"name"]},null),t["ɵprd"](2048,null,i.q,null,[i.j]),t["ɵdid"](6,16384,null,0,i.r,[[4,i.q]],null,null),t["ɵdid"](7,81920,null,0,s,[i.q,u.a],{ngDataReady:[0,"ngDataReady"]},null),t["ɵdid"](8,4210688,null,0,a.a,[[2,o.a],r.a,t.ElementRef],null,null),t["ɵdid"](9,16384,null,0,d.h,[[3,i.d],d.a],{formControlName:[0,"formControlName"]},null)],(function(l,n){var e=n.component;l(n,4,0,n.parent.context.$implicit.name),l(n,7,0,e.ngDataReady),l(n,9,0,n.parent.context.$implicit.name)}),(function(l,n){l(n,1,1,[n.parent.context.$implicit.name,n.parent.context.$implicit.name,t["ɵnov"](n,6).ngClassUntouched,t["ɵnov"](n,6).ngClassTouched,t["ɵnov"](n,6).ngClassPristine,t["ɵnov"](n,6).ngClassDirty,t["ɵnov"](n,6).ngClassValid,t["ɵnov"](n,6).ngClassInvalid,t["ɵnov"](n,6).ngClassPending,t["ɵnov"](n,9).validClass,t["ɵnov"](n,9).invalidClass])}))}function _(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,9,null,null,null,null,null,null,null)),(l()(),t["ɵeld"](1,0,null,null,8,"input",[["cdDimlessBinaryPerSecond",""],["class","form-control"],["defaultUnit","b"],["type","text"]],[[8,"id",0],[8,"name",0],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"is-valid",null],[2,"is-invalid",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],(function(l,n,e){var i=!0;return"input"===n&&(i=!1!==t["ɵnov"](l,2)._handleInput(e.target.value)&&i),"blur"===n&&(i=!1!==t["ɵnov"](l,2).onTouched()&&i),"compositionstart"===n&&(i=!1!==t["ɵnov"](l,2)._compositionStart()&&i),"compositionend"===n&&(i=!1!==t["ɵnov"](l,2)._compositionEnd(e.target.value)&&i),"blur"===n&&(i=!1!==t["ɵnov"](l,7).onBlur(e.target.value)&&i),i}),null,null)),t["ɵdid"](2,16384,null,0,i.e,[t.Renderer2,t.ElementRef,[2,i.b]],null,null),t["ɵprd"](1024,null,i.p,(function(l){return[l]}),[i.e]),t["ɵdid"](4,671744,null,0,i.j,[[3,i.d],[8,null],[8,null],[6,i.p],[2,i.E]],{name:[0,"name"]},null),t["ɵprd"](2048,null,i.q,null,[i.j]),t["ɵdid"](6,16384,null,0,i.r,[[4,i.q]],null,null),t["ɵdid"](7,81920,null,0,p,[t.ElementRef,i.q,m.a,u.a],{ngDataReady:[0,"ngDataReady"],defaultUnit:[1,"defaultUnit"]},null),t["ɵdid"](8,4210688,null,0,a.a,[[2,o.a],r.a,t.ElementRef],null,null),t["ɵdid"](9,16384,null,0,d.h,[[3,i.d],d.a],{formControlName:[0,"formControlName"]},null)],(function(l,n){var e=n.component;l(n,4,0,n.parent.context.$implicit.name),l(n,7,0,e.ngDataReady,"b"),l(n,9,0,n.parent.context.$implicit.name)}),(function(l,n){l(n,1,1,[n.parent.context.$implicit.name,n.parent.context.$implicit.name,t["ɵnov"](n,6).ngClassUntouched,t["ɵnov"](n,6).ngClassTouched,t["ɵnov"](n,6).ngClassPristine,t["ɵnov"](n,6).ngClassDirty,t["ɵnov"](n,6).ngClassValid,t["ɵnov"](n,6).ngClassInvalid,t["ɵnov"](n,6).ngClassPending,t["ɵnov"](n,9).validClass,t["ɵnov"](n,9).invalidClass])}))}function R(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,9,null,null,null,null,null,null,null)),(l()(),t["ɵeld"](1,0,null,null,8,"input",[["cdIops",""],["class","form-control"],["type","text"]],[[8,"id",0],[8,"name",0],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"is-valid",null],[2,"is-invalid",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],(function(l,n,e){var i=!0;return"input"===n&&(i=!1!==t["ɵnov"](l,2)._handleInput(e.target.value)&&i),"blur"===n&&(i=!1!==t["ɵnov"](l,2).onTouched()&&i),"compositionstart"===n&&(i=!1!==t["ɵnov"](l,2)._compositionStart()&&i),"compositionend"===n&&(i=!1!==t["ɵnov"](l,2)._compositionEnd(e.target.value)&&i),"blur"===n&&(i=!1!==t["ɵnov"](l,7).onUpdate(e.target.value)&&i),i}),null,null)),t["ɵdid"](2,16384,null,0,i.e,[t.Renderer2,t.ElementRef,[2,i.b]],null,null),t["ɵprd"](1024,null,i.p,(function(l){return[l]}),[i.e]),t["ɵdid"](4,671744,null,0,i.j,[[3,i.d],[8,null],[8,null],[6,i.p],[2,i.E]],{name:[0,"name"]},null),t["ɵprd"](2048,null,i.q,null,[i.j]),t["ɵdid"](6,16384,null,0,i.r,[[4,i.q]],null,null),t["ɵdid"](7,81920,null,0,h,[u.a,i.q],{ngDataReady:[0,"ngDataReady"]},null),t["ɵdid"](8,4210688,null,0,a.a,[[2,o.a],r.a,t.ElementRef],null,null),t["ɵdid"](9,16384,null,0,d.h,[[3,i.d],d.a],{formControlName:[0,"formControlName"]},null)],(function(l,n){var e=n.component;l(n,4,0,n.parent.context.$implicit.name),l(n,7,0,e.ngDataReady),l(n,9,0,n.parent.context.$implicit.name)}),(function(l,n){l(n,1,1,[n.parent.context.$implicit.name,n.parent.context.$implicit.name,t["ɵnov"](n,6).ngClassUntouched,t["ɵnov"](n,6).ngClassTouched,t["ɵnov"](n,6).ngClassPristine,t["ɵnov"](n,6).ngClassDirty,t["ɵnov"](n,6).ngClassValid,t["ɵnov"](n,6).ngClassInvalid,t["ɵnov"](n,6).ngClassPending,t["ɵnov"](n,9).validClass,t["ɵnov"](n,9).invalidClass])}))}function y(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"span",[["class","invalid-feedback"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["The mininum value is 0"]))],null,null)}function w(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,29,"div",[["class","form-group row"]],[[2,"has-error",null],[2,"has-success",null]],null,null,g.b,g.a)),t["ɵdid"](1,1163264,null,2,d.c,[t.ElementRef,d.g],null,null),t["ɵqud"](603979776,1,{FormControlNames:1}),t["ɵqud"](603979776,2,{messagesBlock:0}),(l()(),t["ɵeld"](4,0,null,0,4,"label",[["class","cd-col-form-label"]],[[8,"htmlFor",0]],null,null,null,null)),(l()(),t["ɵted"](5,null,["",""])),(l()(),t["ɵeld"](6,0,null,null,2,"cd-helper",[],null,null,null,f.b,f.a)),t["ɵdid"](7,49152,null,0,v.a,[],null,null),(l()(),t["ɵted"](8,0,["",""])),(l()(),t["ɵeld"](9,0,null,0,20,"div",[],[[8,"className",0]],null,null,null,null)),(l()(),t["ɵeld"](10,0,null,null,17,"div",[["class","input-group"]],null,null,null,null,null)),(l()(),t["ɵeld"](11,0,null,null,7,null,null,null,null,null,null,null)),t["ɵdid"](12,16384,null,0,b.NgSwitch,[],{ngSwitch:[0,"ngSwitch"]},null),(l()(),t["ɵand"](16777216,null,null,1,null,S)),t["ɵdid"](14,278528,null,0,b.NgSwitchCase,[t.ViewContainerRef,t.TemplateRef,b.NgSwitch],{ngSwitchCase:[0,"ngSwitchCase"]},null),(l()(),t["ɵand"](16777216,null,null,1,null,_)),t["ɵdid"](16,278528,null,0,b.NgSwitchCase,[t.ViewContainerRef,t.TemplateRef,b.NgSwitch],{ngSwitchCase:[0,"ngSwitchCase"]},null),(l()(),t["ɵand"](16777216,null,null,1,null,R)),t["ɵdid"](18,278528,null,0,b.NgSwitchCase,[t.ViewContainerRef,t.TemplateRef,b.NgSwitch],{ngSwitchCase:[0,"ngSwitchCase"]},null),(l()(),t["ɵeld"](19,0,null,null,8,"span",[["class","input-group-append"]],null,null,null,null,null)),(l()(),t["ɵeld"](20,0,null,null,7,"button",[["class","btn btn-light"],["data-toggle","button"],["title","Remove the local configuration value. The parent configuration value will be inherited and used instead."],["type","button"]],null,[[null,"click"]],(function(l,n,e){var t=!0;return"click"===n&&(t=!1!==l.component.reset(l.context.$implicit.name)&&t),t}),null,null)),t["ɵprd"](512,null,b["ɵNgClassImpl"],b["ɵNgClassR2Impl"],[t.IterableDiffers,t.KeyValueDiffers,t.ElementRef,t.Renderer2]),t["ɵdid"](22,278528,null,0,b.NgClass,[b["ɵNgClassImpl"]],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),t["ɵpod"](23,{active:0}),(l()(),t["ɵeld"](24,0,null,null,3,"i",[["aria-hidden","true"]],null,null,null,null,null)),t["ɵprd"](512,null,b["ɵNgClassImpl"],b["ɵNgClassR2Impl"],[t.IterableDiffers,t.KeyValueDiffers,t.ElementRef,t.Renderer2]),t["ɵdid"](26,278528,null,0,b.NgClass,[b["ɵNgClassImpl"]],{ngClass:[0,"ngClass"]},null),t["ɵpad"](27,1),(l()(),t["ɵand"](16777216,null,null,1,null,y)),t["ɵdid"](29,16384,null,0,b.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"]},null)],(function(l,n){var e=n.component;l(n,1,0),l(n,12,0,n.context.$implicit.type),l(n,14,0,e.configurationType.milliseconds),l(n,16,0,e.configurationType.bps),l(n,18,0,e.configurationType.iops);var i=l(n,23,0,e.isDisabled(n.context.$implicit.name));l(n,22,0,"btn btn-light",i);var u=l(n,27,0,e.icons.erase);l(n,26,0,u),l(n,29,0,e.form.showError("configuration."+n.context.$implicit.name,t["ɵnov"](n.parent.parent,0),"min"))}),(function(l,n){l(n,0,0,t["ɵnov"](n,1).hasErrors,t["ɵnov"](n,1).hasSuccess),l(n,4,0,n.context.$implicit.name),l(n,5,0,n.context.$implicit.displayName),l(n,8,0,n.context.$implicit.description),l(n,9,0,t["ɵinlineInterpolate"](1,"cd-col-form-input ",n.parent.context.$implicit.heading,""))}))}function k(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,9,"div",[["class","col-12"]],null,null,null,null,null)),(l()(),t["ɵeld"](1,0,null,null,5,"h4",[["class","cd-header"]],null,null,null,null,null)),(l()(),t["ɵeld"](2,0,null,null,4,"span",[["class","collapsible"]],null,[[null,"click"]],(function(l,n,e){var t=!0;return"click"===n&&(t=!1!==l.component.toggleSectionVisibility(l.context.$implicit.class)&&t),t}),null,null)),(l()(),t["ɵted"](3,null,[" "," "])),(l()(),t["ɵeld"](4,0,null,null,2,"i",[["aria-hidden","true"]],null,null,null,null,null)),t["ɵprd"](512,null,b["ɵNgClassImpl"],b["ɵNgClassR2Impl"],[t.IterableDiffers,t.KeyValueDiffers,t.ElementRef,t.Renderer2]),t["ɵdid"](6,278528,null,0,b.NgClass,[b["ɵNgClassImpl"]],{ngClass:[0,"ngClass"]},null),(l()(),t["ɵeld"](7,0,null,null,2,"div",[],[[8,"className",0],[8,"hidden",0]],null,null,null,null)),(l()(),t["ɵand"](16777216,null,null,1,null,w)),t["ɵdid"](9,278528,null,0,b.NgForOf,[t.ViewContainerRef,t.TemplateRef,t.IterableDiffers],{ngForOf:[0,"ngForOf"]},null)],(function(l,n){var e=n.component;l(n,6,0,e.sectionVisibility[n.context.$implicit.class]?e.icons.minusCircle:e.icons.addCircle),l(n,9,0,n.context.$implicit.options)}),(function(l,n){var e=n.component;l(n,3,0,n.context.$implicit.heading),l(n,7,0,t["ɵinlineInterpolate"](1,"",n.context.$implicit.class,""),!e.sectionVisibility[n.context.$implicit.class])}))}function I(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,[["cfgFormGroup",1]],null,8,"fieldset",[],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"submit"],[null,"reset"]],(function(l,n,e){var i=!0;return"submit"===n&&(i=!1!==t["ɵnov"](l,1).onSubmit(e)&&i),"reset"===n&&(i=!1!==t["ɵnov"](l,1).onReset()&&i),"submit"===n&&(i=!1!==t["ɵnov"](l,4).onSubmit()&&i),i}),null,null)),t["ɵdid"](1,540672,null,0,i.l,[[8,null],[8,null]],{form:[0,"form"]},null),t["ɵprd"](2048,null,i.d,null,[i.l]),t["ɵdid"](3,16384,null,0,i.s,[[4,i.d]],null,null),t["ɵdid"](4,16384,null,0,d.d,[],{formGroup:[0,"formGroup"]},null),(l()(),t["ɵeld"](5,0,null,null,1,"legend",[],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["RBD Configuration"])),(l()(),t["ɵand"](16777216,null,null,1,null,k)),t["ɵdid"](8,278528,null,0,b.NgForOf,[t.ViewContainerRef,t.TemplateRef,t.IterableDiffers],{ngForOf:[0,"ngForOf"]},null)],(function(l,n){var e=n.component;l(n,1,0,e.form.get("configuration")),l(n,4,0,e.form.get("configuration")),l(n,8,0,e.rbdConfigurationService.sections)}),(function(l,n){l(n,0,0,t["ɵnov"](n,3).ngClassUntouched,t["ɵnov"](n,3).ngClassTouched,t["ɵnov"](n,3).ngClassPristine,t["ɵnov"](n,3).ngClassDirty,t["ɵnov"](n,3).ngClassValid,t["ɵnov"](n,3).ngClassInvalid,t["ɵnov"](n,3).ngClassPending)}))}},E7j4:function(l,n,e){"use strict";var t=e("8Y7J"),i=e("s7LF"),u=e("ANnk"),s=e("f/UV
"),a=e("aexS
"),o=e("+gVj
"),r=e("EEJc
"),d=e("ajRT
"),c=e("mXUL
"),m=e("IZUe
"),p=e("SVse
"),h=e("gp3X
"),g=e("sb0X
"),f=e("KVJa
"),v=e("Z21x
"),b=e("sne2
"),C=e("+26A
"),S=e("LqlI
"),_=e("XED3
"),R=e("kn
/O");e.d(n,"a",(function(){return D}));var y=t["ɵcrt"]({encapsulation:0,styles:[[""]],data:{}});function w(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"span",[["class","invalid-feedback"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["This field is required."]))],null,null)}function k(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,3,"option",[],null,null,null,null,null)),t["ɵdid"](1,147456,null,0,i.v,[t.ElementRef,t.Renderer2,[2,i.A]],{value:[0,"value"]},null),t["ɵdid"](2,147456,null,0,i.F,[t.ElementRef,t.Renderer2,[8,null]],{value:[0,"value"]},null),(l()(),t["ɵted"](3,null,["",""]))],(function(l,n){l(n,1,0,n.context.$implicit.key),l(n,2,0,n.context.$implicit.key)}),(function(l,n){l(n,3,0,n.context.$implicit.desc)}))}function I(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,10,"div",[["class","custom-control custom-checkbox"]],null,null,null,null,null)),(l()(),t["ɵeld"](1,0,null,null,7,"input",[["class","custom-control-input"],["type","checkbox"]],[[8,"id",0],[8,"name",0],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"is-valid",null],[2,"is-invalid",null]],[[null,"change"],[null,"blur"]],(function(l,n,e){var i=!0;return"change"===n&&(i=!1!==t["ɵnov"](l,3).onChange(e.target.checked)&&i),"blur"===n&&(i=!1!==t["ɵnov"](l,3).onTouched()&&i),i}),null,null)),t["ɵdid"](2,4210688,null,0,u.a,[[2,s.a],a.a,t.ElementRef],null,null),t["ɵdid"](3,16384,null,0,i.c,[t.Renderer2,t.ElementRef],null,null),t["ɵprd"](1024,null,i.p,(function(l){return[l]}),[i.c]),t["ɵdid"](5,671744,[[5,4]],0,i.j,[[3,i.d],[8,null],[8,null],[6,i.p],[2,i.E]],{name:[0,"name"]},null),t["ɵprd"](2048,null,i.q,null,[i.j]),t["ɵdid"](7,16384,null,0,i.r,[[4,i.q]],null,null),t["ɵdid"](8,16384,null,0,o.h,[[3,i.d],o.a],{formControlName:[0,"formControlName"]},null),(l()(),t["ɵeld"](9,0,null,null,1,"label",[["class","custom-control-label"]],[[8,"htmlFor",0]],null,null,null,null)),(l()(),t["ɵted"](10,null,["",""]))],(function(l,n){l(n,5,0,t["ɵinlineInterpolate"](1,"",n.context.$implicit.name,"")),l(n,8,0,t["ɵinlineInterpolate"](1,"",n.context.$implicit.name,""))}),(function(l,n){l(n,1,1,[t["ɵinlineInterpolate"](1,"",n.context.$implicit.name,""),t["ɵinlineInterpolate"](1,"",n.context.$implicit.name,""),t["ɵnov"](n,7).ngClassUntouched,t["ɵnov"](n,7).ngClassTouched,t["ɵnov"](n,7).ngClassPristine,t["ɵnov"](n,7).ngClassDirty,t["ɵnov"](n,7).ngClassValid,t["ɵnov"](n,7).ngClassInvalid,t["ɵnov"](n,7).ngClassPending,t["ɵnov"](n,8).validClass,t["ɵnov"](n,8).invalidClass]),l(n,9,0,t["ɵinlineInterpolate"](1,"",n.context.$implicit.name,"")),l(n,10,0,n.context.$implicit.name)}))}function E(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"span",[["class","invalid-feedback"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["At least one pool is required."]))],null,null)}function N(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"span",[["class","invalid-feedback"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["This field is required."]))],null,null)}function F(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"span",[["class","invalid-feedback"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["The token is invalid."]))],null,null)}function V(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,89,"cd-modal",[],null,null,null,r.c,r.b)),t["ɵdid"](1,49152,null,0,d.a,[],{modalRef:[0,"modalRef"]},null),(l()(),t["ɵeld"](2,0,null,0,1,null,null,null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Import Bootstrap Token"])),(l()(),t["ɵeld"](4,0,null,1,85,null,null,null,null,null,null,null)),(l()(),t["ɵeld"](5,0,null,null,84,"form",[["class","form"],["name","importBootstrapForm"],["novalidate",""]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"submit"],[null,"reset"]],(function(l,n,e){var i=!0;return"submit"===n&&(i=!1!==t["ɵnov"](l,7).onSubmit(e)&&i),"reset"===n&&(i=!1!==t["ɵnov"](l,7).onReset()&&i),"submit"===n&&(i=!1!==t["ɵnov"](l,10).onSubmit()&&i),i}),null,null)),t["ɵdid"](6,16384,null,0,i.G,[],null,null),t["ɵdid"](7,540672,[["formDir",4]],0,i.l,[[8,null],[8,null]],{form:[0,"form"]},null),t["ɵprd"](2048,null,i.d,null,[i.l]),t["ɵdid"](9,16384,null,0,i.s,[[4,i.d]],null,null),t["ɵdid"](10,16384,null,0,o.d,[],{formGroup:[0,"formGroup"]},null),(l()(),t["ɵeld"](11,0,null,null,71,"div",[["class","modal-body"]],null,null,null,null,null)),(l()(),t["ɵeld"](12,0,null,null,5,"p",[],null,null,null,null,null)),(l()(),t["ɵeld"](13,0,null,null,4,null,null,null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["To import a bootstrap token which was created by a peer site cluster, provide the local site's name, select which pools will have mirroring enabled, provide the generated token, and click "])),(l()(),t["ɵeld"](15,0,null,null,1,"kbd",[],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Import"])),(l()(),t["ɵted"](-1,null,["."])),(l()(),t["ɵeld"](18,0,null,null,16,"div",[["class","form-group"]],[[2,"has-error",null],[2,"has-success",null]],null,null,c.b,c.a)),t["ɵdid"](19,1163264,null,2,o.c,[t.ElementRef,o.g],null,null),t["ɵqud"](603979776,1,{FormControlNames:1}),t["ɵqud"](603979776,2,{messagesBlock:0}),(l()(),t["ɵeld"](22,0,null,0,1,"label",[["class","col-form-label required"],["for","siteName"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Site Name"])),(l()(),t["ɵeld"](24,0,null,0,8,"input",[["autofocus",""],["class","form-control"],["formControlName","siteName"],["id","siteName"],["name","siteName"],["placeholder","Name..."],["type","text"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"is-valid",null],[2,"is-invalid",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],(function(l,n,e){var i=!0;return"input"===n&&(i=!1!==t["ɵnov"](l,27)._handleInput(e.target.value)&&i),"blur"===n&&(i=!1!==t["ɵnov"](l,27).onTouched()&&i),"compositionstart"===n&&(i=!1!==t["ɵnov"](l,27)._compositionStart()&&i),"compositionend"===n&&(i=!1!==t["ɵnov"](l,27)._compositionEnd(e.target.value)&&i),i}),null,null)),t["ɵdid"](25,4210688,null,0,m.a,[t.ElementRef],{autofocus:[0,"autofocus"]},null),t["ɵdid"](26,4210688,null,0,u.a,[[2,s.a],a.a,t.ElementRef],null,null),t["ɵdid"](27,16384,null,0,i.e,[t.Renderer2,t.ElementRef,[2,i.b]],null,null),t["ɵprd"](1024,null,i.p,(function(l){return[l]}),[i.e]),t["ɵdid"](29,671744,[[1,4]],0,i.j,[[3,i.d],[8,null],[8,null],[6,i.p],[2,i.E]],{name:[0,"name"]},null),t["ɵprd"](2048,null,i.q,null,[i.j]),t["ɵdid"](31,16384,null,0,i.r,[[4,i.q]],null,null),t["ɵdid"](32,16384,null,0,o.h,[[3,i.d],o.a],{formControlName:[0,"formControlName"]},null),(l()(),t["ɵand"](16777216,null,0,1,null,w)),t["ɵdid"](34,16384,null,0,p.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"]},null),(l()(),t["ɵeld"](35,0,null,null,16,"div",[["class","form-group"]],[[2,"has-error",null],[2,"has-success",null]],null,null,c.b,c.a)),t["ɵdid"](36,1163264,null,2,o.c,[t.ElementRef,o.g],null,null),t["ɵqud"](603979776,3,{FormControlNames:1}),t["ɵqud"](603979776,4,{messagesBlock:0}),(l()(),t["ɵeld"](39,0,null,0,2,"label",[["class","col-form-label"],["for","direction"]],null,null,null,null,null)),(l()(),t["ɵeld"](40,0,null,null,1,"span",[],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Direction"])),(l()(),t["ɵeld"](42,0,null,0,9,"select",[["class","form-control custom-select"],["formControlName","direction"],["id","direction"],["name","direction"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"is-valid",null],[2,"is-invalid",null]],[[null,"change"],[null,"blur"]],(function(l,n,e){var i=!0;return"change"===n&&(i=!1!==t["ɵnov"](l,44).onChange(e.target.value)&&i),"blur"===n&&(i=!1!==t["ɵnov"](l,44).onTouched()&&i),i}),null,null)),t["ɵdid"](43,4210688,null,0,u.a,[[2,s.a],a.a,t.ElementRef],null,null),t["ɵdid"](44,16384,null,0,i.A,[t.Renderer2,t.ElementRef],null,null),t["ɵprd"](1024,null,i.p,(function(l){return[l]}),[i.A]),t["ɵdid"](46,671744,[[3,4]],0,i.j,[[3,i.d],[8,null],[8,null],[6,i.p],[2,i.E]],{name:[0,"name"]},null),t["ɵprd"](2048,null,i.q,null,[i.j]),t["ɵdid"](48,16384,null,0,i.r,[[4,i.q]],null,null),t["ɵdid"](49,16384,null,0,o.h,[[3,i.d],o.a],{formControlName:[0,"formControlName"]},null),(l()(),t["ɵand"](16777216,null,null,1,null,k)),t["ɵdid"](51,278528,null,0,p.NgForOf,[t.ViewContainerRef,t.TemplateRef,t.IterableDiffers],{ngForOf:[0,"ngForOf"]},null),(l()(),t["ɵeld"](52,0,null,null,12,"div",[["class","form-group"],["formGroupName","pools"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"has-error",null],[2,"has-success",null]],null,null,c.b,c.a)),t["ɵdid"](53,212992,null,0,i.m,[[3,i.d],[8,null],[8,null]],{name:[0,"name"]},null),t["ɵprd"](2048,null,i.d,null,[i.m]),t["ɵdid"](55,16384,null,0,i.s,[[4,i.d]],null,null),t["ɵdid"](56,1163264,null,2,o.c,[t.ElementRef,o.g],null,null),t["ɵqud"](603979776,5,{FormControlNames:1}),t["ɵqud"](603979776,6,{messagesBlock:0}),(l()(),t["ɵeld"](59,0,null,0,1,"label",[["class","col-form-label required"],["for","pools"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Pools"])),(l()(),t["ɵand"](16777216,null,0,1,null,I)),t["ɵdid"](62,278528,null,0,p.NgForOf,[t.ViewContainerRef,t.TemplateRef,t.IterableDiffers],{ngForOf:[0,"ngForOf"]},null),(l()(),t["ɵand"](16777216,null,0,1,null,E)),t["ɵdid"](64,16384,null,0,p.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"]},null),(l()(),t["ɵeld"](65,0,null,null,17,"div",[["class","form-group"]],[[2,"has-error",null],[2,"has-success",null]],null,null,c.b,c.a)),t["ɵdid"](66,1163264,null,2,o.c,[t.ElementRef,o.g],null,null),t["ɵqud"](603979776,7,{FormControlNames:1}),t["ɵqud"](603979776,8,{messagesBlock:0}),(l()(),t["ɵeld"](69,0,null,0,1,"label",[["class","col-form-label required"],["for","token"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Token"])),(l()(),t["ɵeld"](71,0,null,0,7,"textarea",[["class","form-control resize-vertical"],["formControlName","token"],["id","token"],["placeholder","Generated token..."]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"is-valid",null],[2,"is-invalid",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],(function(l,n,e){var i=!0;return"input"===n&&(i=!1!==t["ɵnov"](l,72)._handleInput(e.target.value)&&i),"blur"===n&&(i=!1!==t["ɵnov"](l,72).onTouched()&&i),"compositionstart"===n&&(i=!1!==t["ɵnov"](l,72)._compositionStart()&&i),"compositionend"===n&&(i=!1!==t["ɵnov"](l,72)._compositionEnd(e.target.value)&&i),i}),null,null)),t["ɵdid"](72,16384,null,0,i.e,[t.Renderer2,t.ElementRef,[2,i.b]],null,null),t["ɵprd"](1024,null,i.p,(function(l){return[l]}),[i.e]),t["ɵdid"](74,671744,[[7,4]],0,i.j,[[3,i.d],[8,null],[8,null],[6,i.p],[2,i.E]],{name:[0,"name"]},null),t["ɵprd"](2048,null,i.q,null,[i.j]),t["ɵdid"](76,16384,null,0,i.r,[[4,i.q]],null,null),t["ɵdid"](77,16384,null,0,o.h,[[3,i.d],o.a],{formControlName:[0,"formControlName"]},null),(l()(),t["ɵted"](-1,null,[" "])),(l()(),t["ɵand"](16777216,null,0,1,null,N)),t["ɵdid"](80,16384,null,0,p.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"]},null),(l()(),t["ɵand"](16777216,null,0,1,null,F)),t["ɵdid"](82,16384,null,0,p.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"]},null),(l()(),t["ɵeld"](83,0,null,null,6,"div",[["class","modal-footer"]],null,null,null,null,null)),(l()(),t["ɵeld"](84,0,null,null,5,"div",[["class","button-group text-right"]],null,null,null,null,null)),(l()(),t["ɵeld"](85,0,null,null,2,"cd-submit-button",[],null,[[null,"submitAction"]],(function(l,n,e){var t=!0;return"submitAction"===n&&(t=!1!==l.component.import()&&t),t}),h.b,h.a)),t["ɵdid"](86,114688,null,0,g.a,[t.ElementRef],{form:[0,"form"]},{submitAction:"submitAction"}),(l()(),t["ɵted"](-1,0,["Import"])),(l()(),t["ɵeld"](88,0,null,null,1,"cd-back-button",[["name","Close"]],null,null,null,f.b,f.a)),t["ɵdid"](89,49152,null,0,v.a,[p.Location,b.b],{name:[0,"name"],back:[1,"back"]},null)],(function(l,n){var e=n.component;l(n,1,0,e.modalRef),l(n,7,0,e.importBootstrapForm),l(n,10,0,e.importBootstrapForm),l(n,19,0),l(n,25,0,""),l(n,29,0,"siteName"),l(n,32,0,"siteName"),l(n,34,0,e.importBootstrapForm.showError("siteName",t["ɵnov"](n,7),"required")),l(n,36,0),l(n,46,0,"direction"),l(n,49,0,"direction"),l(n,51,0,e.directions),l(n,53,0,"pools"),l(n,56,0),l(n,62,0,e.pools),l(n,64,0,e.importBootstrapForm.showError("pools",t["ɵnov"](n,7),"requirePool")),l(n,66,0),l(n,74,0,"token"),l(n,77,0,"token"),l(n,80,0,e.importBootstrapForm.showError("token",t["ɵnov"](n,7),"required")),l(n,82,0,e.importBootstrapForm.showError("token",t["ɵnov"](n,7),"invalidToken")),l(n,86,0,e.importBootstrapForm),l(n,89,0,"Close",e.modalRef.hide)}),(function(l,n){l(n,5,0,t["ɵnov"](n,9).ngClassUntouched,t["ɵnov"](n,9).ngClassTouched,t["ɵnov"](n,9).ngClassPristine,t["ɵnov"](n,9).ngClassDirty,t["ɵnov"](n,9).ngClassValid,t["ɵnov"](n,9).ngClassInvalid,t["ɵnov"](n,9).ngClassPending),l(n,18,0,t["ɵnov"](n,19).hasErrors,t["ɵnov"](n,19).hasSuccess),l(n,24,0,t["ɵnov"](n,31).ngClassUntouched,t["ɵnov"](n,31).ngClassTouched,t["ɵnov"](n,31).ngClassPristine,t["ɵnov"](n,31).ngClassDirty,t["ɵnov"](n,31).ngClassValid,t["ɵnov"](n,31).ngClassInvalid,t["ɵnov"](n,31).ngClassPending,t["ɵnov"](n,32).validClass,t["ɵnov"](n,32).invalidClass),l(n,35,0,t["ɵnov"](n,36).hasErrors,t["ɵnov"](n,36).hasSuccess),l(n,42,0,t["ɵnov"](n,48).ngClassUntouched,t["ɵnov"](n,48).ngClassTouched,t["ɵnov"](n,48).ngClassPristine,t["ɵnov"](n,48).ngClassDirty,t["ɵnov"](n,48).ngClassValid,t["ɵnov"](n,48).ngClassInvalid,t["ɵnov"](n,48).ngClassPending,t["ɵnov"](n,49).validClass,t["ɵnov"](n,49).invalidClass),l(n,52,0,t["ɵnov"](n,55).ngClassUntouched,t["ɵnov"](n,55).ngClassTouched,t["ɵnov"](n,55).ngClassPristine,t["ɵnov"](n,55).ngClassDirty,t["ɵnov"](n,55).ngClassValid,t["ɵnov"](n,55).ngClassInvalid,t["ɵnov"](n,55).ngClassPending,t["ɵnov"](n,56).hasErrors,t["ɵnov"](n,56).hasSuccess),l(n,65,0,t["ɵnov"](n,66).hasErrors,t["ɵnov"](n,66).hasSuccess),l(n,71,0,t["ɵnov"](n,76).ngClassUntouched,t["ɵnov"](n,76).ngClassTouched,t["ɵnov"](n,76).ngClassPristine,t["ɵnov"](n,76).ngClassDirty,t["ɵnov"](n,76).ngClassValid,t["ɵnov"](n,76).ngClassInvalid,t["ɵnov"](n,76).ngClassPending,t["ɵnov"](n,77).validClass,t["ɵnov"](n,77).invalidClass)}))}function T(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"cd-bootstrap-import-modal",[],null,null,null,V,y)),t["ɵdid"](1,245760,null,0,C.a,[S.a,_.a,R.a],null,null)],(function(l,n){l(n,1,0)}),null)}var D=t["ɵccf"]("cd-bootstrap-import-modal",C.a,T,{},{},[])},EFGL:function(l,n,e){"use strict";var t=e("8Y7J"),i=e("SVse"),u=e("IzCI"),s=e("aXbf"),a=e("dEH0"),o=e("BQkM"),r=e("25BL"),d=e("uIqm");e("aAWM"),e("o8EM"),e("GiVz"),e.d(n,"a",(function(){return c})),e.d(n,"b",(function(){return _}));var c=t["ɵcrt"]({encapsulation:0,styles:[[""]],data:{}});function m(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"span",[],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Global"]))],null,null)}function p(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"strong",[],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Image"]))],null,null)}function h(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"strong",[],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Pool"]))],null,null)}function g(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,7,"div",[],null,null,null,null,null)),t["ɵdid"](1,16384,null,0,i.NgSwitch,[],{ngSwitch:[0,"ngSwitch"]},null),(l()(),t["ɵand"](16777216,null,null,1,null,m)),t["ɵdid"](3,278528,null,0,i.NgSwitchCase,[t.ViewContainerRef,t.TemplateRef,i.NgSwitch],{ngSwitchCase:[0,"ngSwitchCase"]},null),(l()(),t["ɵand"](16777216,null,null,1,null,p)),t["ɵdid"](5,278528,null,0,i.NgSwitchCase,[t.ViewContainerRef,t.TemplateRef,i.NgSwitch],{ngSwitchCase:[0,"ngSwitchCase"]},null),(l()(),t["ɵand"](16777216,null,null,1,null,h)),t["ɵdid"](7,278528,null,0,i.NgSwitchCase,[t.ViewContainerRef,t.TemplateRef,i.NgSwitch],{ngSwitchCase:[0,"ngSwitchCase"]},null)],(function(l,n){l(n,1,0,n.context.value),l(n,3,0,"global"),l(n,5,0,"image"),l(n,7,0,"pool")}),null)}function f(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,2,"span",[],null,null,null,null,null)),(l()(),t["ɵted"](1,null,["",""])),t["ɵppd"](2,1)],null,(function(l,n){var e=t["ɵunv"](n,1,0,l(n,2,0,t["ɵnov"](n.parent.parent,0),n.parent.context.value));l(n,1,0,e)}))}function v(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,2,"span",[],null,null,null,null,null)),(l()(),t["ɵted"](1,null,["",""])),t["ɵppd"](2,1)],null,(function(l,n){var e=t["ɵunv"](n,1,0,l(n,2,0,t["ɵnov"](n.parent.parent,1),n.parent.context.value));l(n,1,0,e)}))}function b(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,2,"span",[],null,null,null,null,null)),(l()(),t["ɵted"](1,null,["",""])),t["ɵppd"](2,1)],null,(function(l,n){var e=t["ɵunv"](n,1,0,l(n,2,0,t["ɵnov"](n.parent.parent,2),n.parent.context.value));l(n,1,0,e)}))}function C(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"span",[],null,null,null,null,null)),(l()(),t["ɵted"](1,null,["",""]))],null,(function(l,n){l(n,1,0,n.parent.context.value)}))}function S(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,9,"div",[],null,null,null,null,null)),t["ɵdid"](1,16384,null,0,i.NgSwitch,[],{ngSwitch:[0,"ngSwitch"]},null),(l()(),t["ɵand"](16777216,null,null,1,null,f)),t["ɵdid"](3,278528,null,0,i.NgSwitchCase,[t.ViewContainerRef,t.TemplateRef,i.NgSwitch],{ngSwitchCase:[0,"ngSwitchCase"]},null),(l()(),t["ɵand"](16777216,null,null,1,null,v)),t["ɵdid"](5,278528,null,0,i.NgSwitchCase,[t.ViewContainerRef,t.TemplateRef,i.NgSwitch],{ngSwitchCase:[0,"ngSwitchCase"]},null),(l()(),t["ɵand"](16777216,null,null,1,null,b)),t["ɵdid"](7,278528,null,0,i.NgSwitchCase,[t.ViewContainerRef,t.TemplateRef,i.NgSwitch],{ngSwitchCase:[0,"ngSwitchCase"]},null),(l()(),t["ɵand"](16777216,null,null,1,null,C)),t["ɵdid"](9,16384,null,0,i.NgSwitchDefault,[t.ViewContainerRef,t.TemplateRef,i.NgSwitch],null,null)],(function(l,n){var e=n.component;l(n,1,0,n.context.row.type),l(n,3,0,e.typeField.bps),l(n,5,0,e.typeField.milliseconds),l(n,7,0,e.typeField.iops)}),null)}function _(l){return t["ɵvid"](0,[t["ɵpid"](0,u.a,[s.a]),t["ɵpid"](0,a.a,[]),t["ɵpid"](0,o.a,[]),t["ɵqud"](402653184,1,{configurationSourceTpl:0}),t["ɵqud"](402653184,2,{configurationValueTpl:0}),t["ɵqud"](402653184,3,{poolConfTable:0}),(l()(),t["ɵeld"](6,0,null,null,1,"cd-table",[["identifier","name"]],null,null,null,r.b,r.a)),t["ɵdid"](7,2867200,[[3,4],["poolConfTable",4]],0,d.a,[t.NgZone,t.ChangeDetectorRef],{data:[0,"data"],columns:[1,"columns"],identifier:[2,"identifier"]},null),(l()(),t["ɵand"](0,[[1,2],["configurationSourceTpl",2]],null,0,null,g)),(l()(),t["ɵand"](0,[[2,2],["configurationValueTpl",2]],null,0,null,S))],(function(l,n){var e=n.component;l(n,7,0,e.data,e.poolConfigurationColumns,"name")}),null)}},Ekvf:function(l,n,e){"use strict";e.d(n,"a",(function(){return d}));var t=e("mrSG"),i=e("IheW"),u=e("lJxs"),s=e("xTzq"),a=e("o8EM"),o=e("8Y7J"),r=e("pL04");let d=(()=>{let l=class{constructor(l,n){this.http=l,this.rbdConfigurationService=n,this.apiPath="api/pool"}create(l){return this.http.post(this.apiPath,l,{observe:"response
"})}update(l){let n;return l.hasOwnProperty("srcpool
")?(n=l.srcpool,delete l.srcpool):(n=l.pool,delete l.pool),this.http.put(`${this.apiPath}/${encodeURIComponent(n)}`,l,{observe:"response
"})}delete(l){return this.http.delete(`${this.apiPath}/${l}`,{observe:"response
"})}get(l){return this.http.get(`${this.apiPath}/${l}`)}getList(){return this.http.get(this.apiPath+"?stats
=true")}getConfiguration(l){return this.http.get(`${this.apiPath}/${l}/configuration`).pipe(Object(u.a)(l=>l.map(l=>Object.assign(l,this.rbdConfigurationService.getOptionByName(l.name)))))}getInfo(){return this.http.get(`ui-${this.apiPath}/info`)}list(l=[]){const n=l.join(",");return this.http.get(`${this.apiPath}?attrs=${n}`).toPromise().then(l=>l)}};return l.ngInjectableDef=o["ɵɵdefineInjectable
"]({factory:function(){return new l(o["ɵɵinject
"](i.c),o["ɵɵinject
"](a.a))},token:l,providedIn:r.a}),l=t.__decorate([s.a,t.__metadata("design
:paramtypes
",[i.c,a.a])],l),l})()},F83c:function(l,n,e){"use strict
";e.d(n,"a
",(function(){return m}));var t=e("mrSG
"),i=e("IheW
"),u=e("LvDl
"),s=e("lJxs
"),a=e("xTzq
"),o=e("jVDg
"),r=e("o8EM
"),d=e("8Y7J
"),c=e("pL04
");let m=(()=>{let l=class{constructor(l,n){this.http=l,this.rbdConfigurationService=n}isRBDPool(l){return-1!==u.indexOf(l.application_metadata,"rbd
")&&!l.pool_name.includes("/")}create(l){return this.http.post("api/block
/image",l,{observe:"response"})}delete(l){return this.http.delete("api/block
/image/"+l.toStringEncoded(),{observe:"response
"})}update(l,n){return this.http.put("api
/block/image/"+l.toStringEncoded(),n,{observe:"response"})}get(l){return this.http.get("api/block
/image/"+l.toStringEncoded())}list(){return this.http.get("api
/block/image").pipe(Object(s.a)(l=>l.map(l=>(l.value.map(l=>l.configuration?(l.configuration.map(l=>Object.assign(l,this.rbdConfigurationService.getOptionByName(l.name))),l):l),l))))}copy(l,n){return this.http.post(`api/block/image/${l.toStringEncoded()}/copy`,n,{observe:"response
"})}flatten(l){return this.http.post(`api/block/image/${l.toStringEncoded()}/flatten`,null,{observe:"response
"})}defaultFeatures(){return this.http.get("api
/block/image/default_features")}createSnapshot(l,n){const e={snapshot_name:n};return this.http.post(`api/block
/image/${l.toStringEncoded()}
/snap`,e,{observe:"response"})}renameSnapshot(l,n,e){const t={new_snap_name:e};return this.http.put(`api/block
/image/${l.toStringEncoded()}
/snap/${n}
`,t,{observe:"response"})}protectSnapshot(l,n,e){const t={is_protected:e};return this.http.put(`api
/block/image/${l.toStringEncoded()}/snap/${n}`,t,{observe:"response"})}rollbackSnapshot(l,n){return this.http.post(`api/block
/image/${l.toStringEncoded()}
/snap/${n}
/rollback`,null,{observe:"response"})}cloneSnapshot(l,n,e){return this.http.post(`api/block
/image/${l.toStringEncoded()}
/snap/${n}
/clone`,e,{observe:"response"})}deleteSnapshot(l,n){return this.http.delete(`api/block
/image/${l.toStringEncoded()}
/snap/${n}
`,{observe:"response"})}listTrash(){return this.http.get("api/block/image/trash/")}createNamespace(l,n){return this.http.post(`api
/block/pool/${l}/namespace`,{namespace:n},{observe:"response"})}listNamespaces(l){return this.http.get(`api
/block/pool/${l}/namespace/`)}deleteNamespace(l,n){return this.http.delete(`api/block
/pool/${l}
/namespace/${n}
`,{observe:"response"})}moveTrash(l,n){return this.http.post(`api
/block/image/${l.toStringEncoded()}/move_trash`,{delay:n},{observe:"response"})}purgeTrash(l){return this.http.post("api/block/image/trash/purge/?pool_name="+l,null,{observe:"response"})}restoreTrash(l,n){return this.http.post(`api
/block
/image/trash
/${l.toStringEncoded()}/restore
`,{new_image_name:n},{observe:"response"})}removeTrash(l,n=!1){return this.http.delete(`api
/block/image/trash/${l.toStringEncoded()}
/?force=${n}`,{observe:"response"})}};return l.ngInjectableDef=d["ɵɵdefineInjectable"]({factory:function(){return new l(d["ɵɵinject"](i.c),d["ɵɵinject"](r.a))},token:l,providedIn:c.a}),t.__decorate([t.__param(1,a.b),t.__metadata("design:type",Function),t.__metadata("design:paramtypes",[o.a,String]),t.__metadata("design:returntype",void 0)],l.prototype,"createSnapshot",null),t.__decorate([t.__param(2,a.b),t.__metadata("design:type",Function),t.__metadata("design:paramtypes",[o.a,String,String]),t.__metadata("design:returntype",void 0)],l.prototype,"renameSnapshot",null),t.__decorate([t.__param(2,a.b),t.__metadata("design:type",Function),t.__metadata("design:paramtypes",[o.a,String,Boolean]),t.__metadata("design:returntype",void 0)],l.prototype,"protectSnapshot",null),t.__decorate([t.__param(1,a.b),t.__metadata("design:type",Function),t.__metadata("design:paramtypes",[o.a,String]),t.__metadata("design:returntype",void 0)],l.prototype,"restoreTrash",null),l=t.__decorate([a.a,t.__metadata("design:paramtypes",[i.c,r.a])],l),l})()},Fd71:function(l,n,e){"use strict";e.d(n,"a",(function(){return o}));var t=e("s7LF"),i=e("XNiG"),u=(e("F83c"),e("sne2"),e("QFaf")),s=e("kvvV"),a=e("jVDg");e("9nlD"),e("VXsX");class o{constructor(l,n,e,t,i,u){this.modalRef=l,this.rbdService=n,this.taskManagerService=e,this.notificationService=t,this.i18n=i,this.actionLabels=u,this.editing=!1,this.action=this.actionLabels.CREATE,this.resource=this.i18n("RBD Snapshot"),this.createForm()}createForm(){this.snapshotForm=new u.a({snapshotName:new t.i("",{validators:[t.B.required]})})}ngOnInit(){this.onSubmit=new i.a}setSnapName(l){this.snapName=l,this.snapshotForm.get("snapshotName").setValue(l)}setEditing(l=!0){this.editing=l,this.action=this.editing?this.actionLabels.RENAME:this.actionLabels.CREATE}editAction(){const l=this.snapshotForm.getValue("snapshotName"),n=new a.a(this.poolName,this.namespace,this.imageName),e=new s.a;e.name="rbd/snap/edit",e.metadata={image_spec:n.toString(),snapshot_name:l},this.rbdService.renameSnapshot(n,this.snapName,l).toPromise().then(()=>{this.taskManagerService.subscribe(e.name,e.metadata,l=>{this.notificationService.notifyTask(l)}),this.modalRef.hide(),this.onSubmit.next(this.snapName)}).catch(()=>{this.snapshotForm.setErrors({cdSubmitButton:!0})})}createAction(){const l=this.snapshotForm.getValue("snapshotName"),n=new a.a(this.poolName,this.namespace,this.imageName),e=new s.a;e.name="rbd/snap/create",e.metadata={image_spec:n.toString(),snapshot_name:l},this.rbdService.createSnapshot(n,l).toPromise().then(()=>{this.taskManagerService.subscribe(e.name,e.metadata,l=>{this.notificationService.notifyTask(l)}),this.modalRef.hide(),this.onSubmit.next(l)}).catch(()=>{this.snapshotForm.setErrors({cdSubmitButton:!0})})}submit(){this.editing?this.editAction():this.createAction()}}},I4Qz:function(l,n,e){"use strict";var t=e("8Y7J"),i=e("EEJc"),u=e("ajRT"),s=e("s7LF"),a=e("+gVj"),o=e("SVse"),r=e("mXUL"),d=e("ienR"),c=e("z/SZ
"),m=e("ANnk
"),p=e("f
/UV"),h=e("aexS"),g=e("gp3X"),f=e("sb0X"),v=e("KVJa"),b=e("Z21x"),C=e("sne2"),S=e("2JDI"),_=e("F83c"),R=e("LqlI"),y=e("2EZI"),w=e("kn/O
");e.d(n,"a
",(function(){return T}));var k=t["ɵcrt
"]({encapsulation:0,styles:[[".bs
-datepicker
-head bs
-datepicker
-navigation
-view
{display
:flex
;justify
-content
:space
-between
}"]],data:{}});function I(l){return t["ɵvid
"](0,[(l()(),t["ɵeld
"](0,0,null,null,2,"div
",[["class","alert alert
-warning
"],["role
","alert
"]],null,null,null,null,null)),(l()(),t["ɵeld
"](1,0,null,null,1,"span
",[],null,null,null,null,null)),(l()(),t["ɵted
"](-1,null,["This image contains
snapshot(s
), which will prevent it
from being removed after moved to trash
."]))],null,null)}function E(l){return t["ɵvid
"](0,[(l()(),t["ɵeld
"](0,0,null,null,1,"span
",[["class","invalid
-feedback
"]],null,null,null,null,null)),(l()(),t["ɵted
"](-1,null,['Wrong date format. Please use "YYYY
-MM
-DD HH
:mm
:ss
".']))],null,null)}function N(l){return t["ɵvid
"](0,[(l()(),t["ɵeld
"](0,0,null,null,1,"span
",[["class","invalid
-feedback
"]],null,null,null,null,null)),(l()(),t["ɵted
"](-1,null,["Protection has already expired
. Please pick a future date or leave it empty
."]))],null,null)}function F(l){return t["ɵvid
"](0,[(l()(),t["ɵeld
"](0,0,null,null,49,"cd
-modal
",[],null,null,null,i.c,i.b)),t["ɵdid
"](1,49152,null,0,u.a,[],{modalRef:[0,"modalRef
"]},null),(l()(),t["ɵeld
"](2,0,null,0,1,null,null,null,null,null,null,null)),(l()(),t["ɵted
"](-1,null,["Move an image to trash
"])),(l()(),t["ɵeld
"](4,0,null,1,45,null,null,null,null,null,null,null)),(l()(),t["ɵeld
"](5,0,null,null,44,"form
",[["class","form
"],["name
","moveForm
"],["novalidate
",""]],[[2,"ng
-untouched
",null],[2,"ng
-touched
",null],[2,"ng
-pristine
",null],[2,"ng
-dirty
",null],[2,"ng
-valid
",null],[2,"ng
-invalid
",null],[2,"ng
-pending
",null]],[[null,"submit
"],[null,"reset
"]],(function(l,n,e){var i=!0;return"submit
"===n&&(i=!1!==t["ɵnov
"](l,7).onSubmit(e)&&i),"reset
"===n&&(i=!1!==t["ɵnov
"](l,7).onReset()&&i),"submit
"===n&&(i=!1!==t["ɵnov
"](l,10).onSubmit()&&i),i}),null,null)),t["ɵdid
"](6,16384,null,0,s.G,[],null,null),t["ɵdid
"](7,540672,[["formDir
",4]],0,s.l,[[8,null],[8,null]],{form:[0,"form
"]},null),t["ɵprd
"](2048,null,s.d,null,[s.l]),t["ɵdid
"](9,16384,null,0,s.s,[[4,s.d]],null,null),t["ɵdid
"](10,16384,null,0,a.d,[],{formGroup:[0,"formGroup
"]},null),(l()(),t["ɵeld
"](11,0,null,null,31,"div
",[["class","modal
-body
"]],null,null,null,null,null)),(l()(),t["ɵand
"](16777216,null,null,1,null,I)),t["ɵdid
"](13,16384,null,0,o.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf
"]},null),(l()(),t["ɵeld
"](14,0,null,null,7,"p
",[],null,null,null,null,null)),(l()(),t["ɵted
"](-1,null,["To
move "])),(l()(),t["ɵeld
"](16,0,null,null,1,"kbd
",[],null,null,null,null,null)),(l()(),t["ɵted
"](17,null,["",""])),(l()(),t["ɵted
"](-1,null,[" to trash
, click
"])),(l()(),t["ɵeld
"](19,0,null,null,1,"kbd
",[],null,null,null,null,null)),(l()(),t["ɵted
"](-1,null,["Move Image
"])),(l()(),t["ɵted
"](-1,null,[". Optionally
, you can pick an expiration date
."])),(l()(),t["ɵeld
"](22,0,null,null,20,"div
",[["class","form
-group
"]],[[2,"has
-error
",null],[2,"has
-success
",null]],null,null,r.b,r.a)),t["ɵdid
"](23,1163264,null,2,a.c,[t.ElementRef,a.g],null,null),t["ɵqud
"](603979776,1,{FormControlNames:1}),t["ɵqud
"](603979776,2,{messagesBlock:0}),(l()(),t["ɵeld
"](26,0,null,0,1,"label
",[["class","col
-form
-label
"],["for","expires
"]],null,null,null,null,null)),(l()(),t["ɵted
"](-1,null,["Protection expires at
"])),(l()(),t["ɵeld
"](28,16777216,null,0,10,"input
",[["bsDatepicker
",""],["class","form
-control
"],["formControlName
","expiresAt
"],["placeholder
","NOT PROTECTED
"],["type
","text
"]],[[2,"ng
-untouched
",null],[2,"ng
-touched
",null],[2,"ng
-pristine
",null],[2,"ng
-dirty
",null],[2,"ng
-valid
",null],[2,"ng
-invalid
",null],[2,"ng
-pending
",null],[2,"is
-valid
",null],[2,"is
-invalid
",null]],[[null,"input
"],[null,"blur
"],[null,"compositionstart
"],[null,"compositionend
"],[null,"change
"],[null,"keyup
.esc
"]],(function(l,n,e){var i=!0;return"input
"===n&&(i=!1!==t["ɵnov
"](l,29)._handleInput(e.target.value)&&i),"blur
"===n&&(i=!1!==t["ɵnov
"](l,29).onTouched()&&i),"compositionstart
"===n&&(i=!1!==t["ɵnov
"](l,29)._compositionStart()&&i),"compositionend
"===n&&(i=!1!==t["ɵnov
"](l,29)._compositionEnd(e.target.value)&&i),"change
"===n&&(i=!1!==t["ɵnov
"](l,31).onChange(e)&&i),"keyup
.esc
"===n&&(i=!1!==t["ɵnov
"](l,31).hide()&&i),"blur
"===n&&(i=!1!==t["ɵnov
"](l,31).onBlur()&&i),i}),null,null)),t["ɵdid
"](29,16384,null,0,s.e,[t.Renderer2,t.ElementRef,[2,s.b]],null,null),t["ɵdid
"](30,737280,null,0,d.c,[d.a,t.ElementRef,t.Renderer2,t.ViewContainerRef,c.a],{bsConfig:[0,"bsConfig
"],minDate:[1,"minDate
"]},null),t["ɵdid
"](31,16384,null,0,d.f,[d.c,d.l,t.Renderer2,t.ElementRef,t.ChangeDetectorRef],null,null),t["ɵprd
"](1024,null,s.o,(function(l){return[l]}),[d.f]),t["ɵprd
"](1024,null,s.p,(function(l,n){return[l,n]}),[s.e,d.f]),t["ɵdid
"](34,671744,[[1,4]],0,s.j,[[3,s.d],[6,s.o],[8,null],[6,s.p],[2,s.E]],{name:[0,"name
"]},null),t["ɵprd
"](2048,null,s.q,null,[s.j]),t["ɵdid
"](36,16384,null,0,s.r,[[4,s.q]],null,null),t["ɵdid
"](37,4210688,null,0,m.a,[[2,p.a],h.a,t.ElementRef],null,null),t["ɵdid
"](38,16384,null,0,a.h,[[3,s.d],a.a],{formControlName:[0,"formControlName
"]},null),(l()(),t["ɵand
"](16777216,null,0,1,null,E)),t["ɵdid
"](40,16384,null,0,o.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf
"]},null),(l()(),t["ɵand
"](16777216,null,0,1,null,N)),t["ɵdid
"](42,16384,null,0,o.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf
"]},null),(l()(),t["ɵeld
"](43,0,null,null,6,"div
",[["class","modal
-footer
"]],null,null,null,null,null)),(l()(),t["ɵeld
"](44,0,null,null,5,"div
",[["class","button
-group text
-right
"]],null,null,null,null,null)),(l()(),t["ɵeld
"](45,0,null,null,2,"cd
-submit
-button
",[],null,[[null,"submitAction
"]],(function(l,n,e){var t=!0;return"submitAction
"===n&&(t=!1!==l.component.moveImage()&&t),t}),g.b,g.a)),t["ɵdid
"](46,114688,null,0,f.a,[t.ElementRef],{form:[0,"form
"]},{submitAction:"submitAction
"}),(l()(),t["ɵted
"](-1,0,["Move Image
"])),(l()(),t["ɵeld
"](48,0,null,null,1,"cd
-back
-button
",[["name
","Cancel
"]],null,null,null,v.b,v.a)),t["ɵdid
"](49,49152,null,0,b.a,[o.Location,C.b],{name:[0,"name
"],back:[1,"back
"]},null)],(function(l,n){var e=n.component;l(n,1,0,e.modalRef),l(n,7,0,e.moveForm),l(n,10,0,e.moveForm),l(n,13,0,e.hasSnapshots),l(n,23,0),l(n,30,0,e.bsConfig,e.minDate),l(n,34,0,"expiresAt
"),l(n,38,0,"expiresAt
"),l(n,40,0,e.moveForm.showError("expiresAt
",t["ɵnov
"](n,7),"format
")),l(n,42,0,e.moveForm.showError("expiresAt
",t["ɵnov
"](n,7),"expired
")),l(n,46,0,e.moveForm),l(n,49,0,"Cancel
",e.modalRef.hide)}),(function(l,n){var e=n.component;l(n,5,0,t["ɵnov
"](n,9).ngClassUntouched,t["ɵnov
"](n,9).ngClassTouched,t["ɵnov
"](n,9).ngClassPristine,t["ɵnov
"](n,9).ngClassDirty,t["ɵnov
"](n,9).ngClassValid,t["ɵnov
"](n,9).ngClassInvalid,t["ɵnov
"](n,9).ngClassPending),l(n,17,0,e.imageSpecStr),l(n,22,0,t["ɵnov
"](n,23).hasErrors,t["ɵnov
"](n,23).hasSuccess),l(n,28,0,t["ɵnov
"](n,36).ngClassUntouched,t["ɵnov
"](n,36).ngClassTouched,t["ɵnov
"](n,36).ngClassPristine,t["ɵnov
"](n,36).ngClassDirty,t["ɵnov
"](n,36).ngClassValid,t["ɵnov
"](n,36).ngClassInvalid,t["ɵnov
"](n,36).ngClassPending,t["ɵnov
"](n,38).validClass,t["ɵnov
"](n,38).invalidClass)}))}function V(l){return t["ɵvid
"](0,[(l()(),t["ɵeld
"](0,0,null,null,1,"cd
-rbd
-trash
-move-modal
",[],null,null,null,F,k)),t["ɵdid
"](1,114688,null,0,S.a,[_.a,R.a,y.a,w.a],null,null)],(function(l,n){l(n,1,0)}),null)}var T=t["ɵccf
"]("cd
-rbd
-trash
-move-modal
",S.a,V,{},{},[])},JBea:function(l,n,e){"use strict
";e.d(n,"a
",(function(){return t})),e("lArG
");class t{constructor(){}ngOnChanges(){this.selection&&(this.rbdDashboardUrl=`rbd-details?var-Pool=${this.selection.pool_name}&var-Image=${this.selection.name}`)}}},"JIi
+":function(l,n,e){"use strict
";var t=e("8Y7J
"),i=e("978R
"),u=e("z
/SZ"),s=e("2uy1"),a=e("SVse"),o=e("pKUh"),r=e("2ZVE"),d=e("25BL"),c=e("uIqm"),m=e("NUGo"),p=e("S7zO"),h=e("VTlA"),g=e("ufoC"),f=e("mSOc"),v=e("wd/R
"),b=e("LRne
"),C=e("F83c
"),S=e("OLbh
"),_=e("0+/T"),R=e("sne2"),y=e("x38r"),w=e("vCyI"),k=e("QTAa"),I=e("kvvV"),E=e("jVDg"),N=e("a0VL"),F=e("Fgil"),V=e("aexS"),T=e("9nlD"),D=e("VXsX"),P=e("Fd71"),x=e("LvDl"),q=e("oxzT");class B{constructor(l,n,e){this.i18n=l,this.create={permission:"create",icon:q.a.add,name:n.CREATE},this.rename={permission:"update",icon:q.a.edit,name:n.RENAME},this.protect={permission:"update",icon:q.a.lock,visible:l=>l.hasSingleSelection&&!l.first().is_protected,name:n.PROTECT},this.unprotect={permission:"update",icon:q.a.unlock,visible:l=>l.hasSingleSelection&&l.first().is_protected,name:n.UNPROTECT},this.clone={permission:"create",canBePrimary:l=>l.hasSingleSelection,disable:l=>this.getCloneDisableDesc(l,e),icon:q.a.clone,name:n.CLONE},this.copy={permission:"create",canBePrimary:l=>l.hasSingleSelection,disable:l=>!l.hasSingleSelection||l.first().cdExecuting,icon:q.a.copy,name:n.COPY},this.rollback={permission:"update",icon:q.a.undo,name:n.ROLLBACK},this.deleteSnap={permission:"delete",icon:q.a.destroy,disable:l=>{const n=l.first();return!l.hasSingleSelection||n.cdExecuting||n.is_protected},name:n.DELETE},this.ordering=[this.create,this.rename,this.protect,this.unprotect,this.clone,this.copy,this.rollback,this.deleteSnap]}getCloneDisableDesc(l,n){return!(l&&l.hasSingleSelection&&!l.first().cdExecuting)||!x.includes(n,"layering")&&this.i18n("Parent image must support Layering")}}class O{}class A{constructor(l,n,e,t,i,u,s,a,o,r,d){this.authStorageService=l,this.modalService=n,this.dimlessBinaryPipe=e,this.cdDatePipe=t,this.rbdService=i,this.taskManagerService=u,this.notificationService=s,this.summaryService=a,this.taskListService=o,this.i18n=r,this.actionLabels=d,this.snapshots=[],this.selection=new w.a,this.builders={"rbd/snap/create":l=>{const n=new O;return n.name=l.snapshot_name,n}},this.permission=this.authStorageService.getPermissions().rbdImage}ngOnInit(){this.columns=[{name:this.i18n("Name"),prop:"name",cellTransformation:y.a.executing,flexGrow:2},{name:this.i18n("Size"),prop:"size",flexGrow:1,cellClass:"text-right",pipe:this.dimlessBinaryPipe},{name:this.i18n("Provisioned"),prop:"disk_usage",flexGrow:1,cellClass:"text-right",pipe:this.dimlessBinaryPipe},{name:this.i18n("State"),prop:"is_protected",flexGrow:1,cellTransformation:y.a.badge,customTemplateConfig:{map:{true:{value:this.i18n("PROTECTED"),class:"badge-success"},false:{value:this.i18n("UNPROTECTED"),class:"badge-info"}}}},{name:this.i18n("Created"),prop:"timestamp",flexGrow:1,pipe:this.cdDatePipe}]}ngOnChanges(){const l=new E.a(this.poolName,this.namespace,this.rbdName),n=new B(this.i18n,this.actionLabels,this.featuresName);n.create.click=()=>this.openCreateSnapshotModal(),n.rename.click=()=>this.openEditSnapshotModal(),n.protect.click=()=>this.toggleProtection(),n.unprotect.click=()=>this.toggleProtection();const e=()=>this.selection.first()&&`${l.toStringEncoded()}/${encodeURIComponent(this.selection.first().name)}
`;n.clone.routerLink=()=>"/block/rbd/clone/"+e(),n.copy.routerLink=()=>"/block/rbd/copy/"+e(),n.rollback.click=()=>this.rollbackModal(),n.deleteSnap.click=()=>this.deleteSnapshotModal(),this.tableActions=n.ordering,this.taskListService.init(()=>Object(b.a)(this.snapshots),null,l=>this.data=l,()=>this.data=this.snapshots,n=>["rbd/snap/create","rbd/snap/delete","rbd/snap/edit","rbd/snap/rollback"].includes(n.name)&&l.toString()===n.metadata.image_spec,(l,n)=>l.name===n.metadata.snapshot_name,this.builders)}openSnapshotModal(l,n=null){this.modalRef=this.modalService.show(P.a),this.modalRef.content.poolName=this.poolName,this.modalRef.content.imageName=this.rbdName,this.modalRef.content.namespace=this.namespace,n?this.modalRef.content.setEditing():n=`${this.rbdName}_${v().toISOString(!0)}
`,this.modalRef.content.setSnapName(n),this.modalRef.content.onSubmit.subscribe(n=>{const e=new k.a;e.name=l,e.metadata={image_name:this.rbdName,pool_name:this.poolName,snapshot_name:n},this.summaryService.addRunningTask(e),this.ngOnChanges()})}openCreateSnapshotModal(){this.openSnapshotModal("rbd/snap/create")}openEditSnapshotModal(){this.openSnapshotModal("rbd/snap/edit",this.selection.first().name)}toggleProtection(){const l=this.selection.first().name,n=this.selection.first().is_protected,e=new I.a;e.name="rbd/snap/edit";const t=new E.a(this.poolName,this.namespace,this.rbdName);e.metadata={image_spec:t.toString(),snapshot_name:l},this.rbdService.protectSnapshot(t,l,!n).toPromise().then(()=>{const l=new k.a;l.name=e.name,l.metadata=e.metadata,this.summaryService.addRunningTask(l),this.ngOnChanges(),this.taskManagerService.subscribe(e.name,e.metadata,l=>{this.notificationService.notifyTask(l)})})}_asyncTask(l,n,e){const t=new I.a;t.name=n,t.metadata={image_spec:new E.a(this.poolName,this.namespace,this.rbdName).toString(),snapshot_name:e};const i=new E.a(this.poolName,this.namespace,this.rbdName);this.rbdService[l](i,e).toPromise().then(()=>{const l=new k.a;l.name=t.name,l.metadata=t.metadata,this.summaryService.addRunningTask(l),this.modalRef.hide(),this.ngOnChanges(),this.taskManagerService.subscribe(l.name,l.metadata,l=>{this.notificationService.notifyTask(l)})}).catch(()=>{this.modalRef.content.stopLoadingSpinner()})}rollbackModal(){const l=this.selection.selected[0].name,n=new E.a(this.poolName,this.namespace,this.rbdName).toString(),e={titleText:this.i18n("RBD snapshot rollback"),buttonText:this.i18n("Rollback"),bodyTpl:this.rollbackTpl,bodyData:{snapName:`${n}
@${l}
`},onSubmit:()=>{this._asyncTask("rollbackSnapshot","rbd/snap/rollback",l)}};this.modalRef=this.modalService.show(S.a,{initialState:e})}deleteSnapshotModal(){const l=this.selection.selected[0].name;this.modalRef=this.modalService.show(_.a,{initialState:{itemDescription:this.i18n("RBD snapshot"),itemNames:[l],submitAction:()=>this._asyncTask("deleteSnapshot","rbd/snap/delete",l)}})}updateSelection(l){this.selection=l}}var M=e("LqlI"),L=e("GiVz"),j=t["ɵcrt"]({encapsulation:0,styles:[[""]],data:{}});function U(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,null,null,null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["You are about to rollback"])),(l()(),t["ɵeld"](2,0,null,null,1,"strong",[],null,null,null,null,null)),(l()(),t["ɵted"](3,null,[" ",""])),(l()(),t["ɵted"](-1,null,[".\n"]))],null,(function(l,n){l(n,3,0,n.context.$implicit.snapName)}))}function G(l){return t["ɵvid"](0,[t["ɵqud"](671088640,1,{nameTpl:0}),t["ɵqud"](402653184,2,{rollbackTpl:0}),(l()(),t["ɵeld"](2,0,null,null,3,"cd-table",[["columnMode","flex"],["selectionType","single"]],null,[[null,"updateSelection"]],(function(l,n,e){var t=!0;return"updateSelection"===n&&(t=!1!==l.component.updateSelection(e)&&t),t}),d.b,d.a)),t["ɵdid"](3,2867200,null,0,c.a,[t.NgZone,t.ChangeDetectorRef],{data:[0,"data"],columns:[1,"columns"],columnMode:[2,"columnMode"],selectionType:[3,"selectionType"]},{updateSelection:"updateSelection"}),(l()(),t["ɵeld"](4,0,null,1,1,"cd-table-actions",[["class","table-actions"]],null,null,null,m.b,m.a)),t["ɵdid"](5,114688,null,0,p.a,[],{permission:[0,"permission"],selection:[1,"selection"],tableActions:[2,"tableActions"]},null),(l()(),t["ɵand"](0,[[2,2],["rollbackTpl",2]],null,0,null,U))],(function(l,n){var e=n.component;l(n,3,0,e.data,e.columns,"flex","single"),l(n,5,0,e.permission,e.selection,e.tableActions)}),null)}var $=e("EFGL"),z=e("aAWM"),X=e("aXbf"),W=e("o8EM"),J=e("a278"),Y=e("insk"),K=e("cUpR"),Z=e("20UP"),H=e("nSDx"),Q=e("o4+5"),ll=e("JBea");e.d(n,"b",(function(){return nl})),e.d(n,"c",(function(){return gl})),e.d(n,"a",(function(){return vl}));var nl=t["ɵcrt"]({encapsulation:0,styles:[[""]],data:{}});function el(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,4,null,null,null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Only available for RBD images with "])),(l()(),t["ɵeld"](2,0,null,null,1,"strong",[],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["fast-diff"])),(l()(),t["ɵted"](-1,null,[" enabled"]))],null,null)}function tl(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,2,"span",[],null,null,null,null,null)),(l()(),t["ɵeld"](1,0,null,null,1,"span",[["class","badge badge-dark mr-2"]],null,null,null,null,null)),(l()(),t["ɵted"](2,null,["",""]))],null,(function(l,n){l(n,2,0,n.context.$implicit)}))}function il(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,3,"span",[],null,null,null,null,null)),(l()(),t["ɵeld"](1,16777216,null,null,2,"span",[["class","form-text text-muted"],["placement","right"]],null,null,null,null,null)),t["ɵdid"](2,212992,null,0,i.c,[t.ViewContainerRef,u.a,i.a,t.ElementRef,t.Renderer2,s.a],{tooltip:[0,"tooltip"],placement:[1,"placement"]},null),(l()(),t["ɵted"](-1,null,["N/A"]))],(function(l,n){l(n,2,0,t["ɵnov"](n.parent.parent,5),"right")}),null)}function ul(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,2,"span",[],null,null,null,null,null)),(l()(),t["ɵted"](1,null,[" "," "])),t["ɵppd"](2,1)],null,(function(l,n){var e=n.component,i=t["ɵunv"](n,1,0,l(n,2,0,t["ɵnov"](n.parent.parent,2),e.selection.disk_usage));l(n,1,0,i)}))}function sl(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,3,"span",[],null,null,null,null,null)),(l()(),t["ɵeld"](1,16777216,null,null,2,"span",[["class","form-text text-muted"],["placement","right"]],null,null,null,null,null)),t["ɵdid"](2,212992,null,0,i.c,[t.ViewContainerRef,u.a,i.a,t.ElementRef,t.Renderer2,s.a],{tooltip:[0,"tooltip"],placement:[1,"placement"]},null),(l()(),t["ɵted"](-1,null,["N/A"]))],(function(l,n){l(n,2,0,t["ɵnov"](n.parent.parent,5),"right")}),null)}function al(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,2,"span",[],null,null,null,null,null)),(l()(),t["ɵted"](1,null,[" "," "])),t["ɵppd"](2,1)],null,(function(l,n){var e=n.component,i=t["ɵunv"](n,1,0,l(n,2,0,t["ɵnov"](n.parent.parent,2),e.selection.total_disk_usage));l(n,1,0,i)}))}function ol(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"span",[],null,null,null,null,null)),(l()(),t["ɵted"](1,null,["/",""]))],null,(function(l,n){l(n,1,0,n.component.selection.parent.pool_namespace)}))}function rl(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,4,"span",[],null,null,null,null,null)),(l()(),t["ɵted"](1,null,["",""])),(l()(),t["ɵand"](16777216,null,null,1,null,ol)),t["ɵdid"](3,16384,null,0,a.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"]},null),(l()(),t["ɵted"](4,null,["/","@",""]))],(function(l,n){l(n,3,0,n.component.selection.parent.pool_namespace)}),(function(l,n){var e=n.component;l(n,1,0,e.selection.parent.pool_name),l(n,4,0,e.selection.parent.image_name,e.selection.parent.snap_name)}))}function dl(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"span",[],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["-"]))],null,null)}function cl(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,114,"tabset",[],[[2,"tab-container",null]],null,null,o.b,o.a)),t["ɵdid"](1,180224,null,0,r.e,[r.f,t.Renderer2,t.ElementRef],null,null),(l()(),t["ɵeld"](2,0,null,0,99,"tab",[["heading","Details"]],[[1,"id",0],[2,"active",null],[2,"tab-pane",null],[1,"role",0],[1,"aria-labelledby",0]],null,null,null,null)),t["ɵdid"](3,212992,null,0,r.b,[r.e,t.ElementRef,t.Renderer2],{heading:[0,"heading"]},null),(l()(),t["ɵeld"](4,0,null,null,97,"table",[["class","table table-striped table-bordered"]],null,null,null,null,null)),(l()(),t["ɵeld"](5,0,null,null,96,"tbody",[],null,null,null,null,null)),(l()(),t["ɵeld"](6,0,null,null,4,"tr",[],null,null,null,null,null)),(l()(),t["ɵeld"](7,0,null,null,1,"td",[["class","bold w-25"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Name"])),(l()(),t["ɵeld"](9,0,null,null,1,"td",[["class","w-75"]],null,null,null,null,null)),(l()(),t["ɵted"](10,null,["",""])),(l()(),t["ɵeld"](11,0,null,null,4,"tr",[],null,null,null,null,null)),(l()(),t["ɵeld"](12,0,null,null,1,"td",[["class","bold"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Pool"])),(l()(),t["ɵeld"](14,0,null,null,1,"td",[],null,null,null,null,null)),(l()(),t["ɵted"](15,null,["",""])),(l()(),t["ɵeld"](16,0,null,null,5,"tr",[],null,null,null,null,null)),(l()(),t["ɵeld"](17,0,null,null,1,"td",[["class","bold"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Data Pool"])),(l()(),t["ɵeld"](19,0,null,null,2,"td",[],null,null,null,null,null)),(l()(),t["ɵted"](20,null,["",""])),t["ɵppd"](21,1),(l()(),t["ɵeld"](22,0,null,null,5,"tr",[],null,null,null,null,null)),(l()(),t["ɵeld"](23,0,null,null,1,"td",[["class","bold"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Created"])),(l()(),t["ɵeld"](25,0,null,null,2,"td",[],null,null,null,null,null)),(l()(),t["ɵted"](26,null,["",""])),t["ɵppd"](27,1),(l()(),t["ɵeld"](28,0,null,null,5,"tr",[],null,null,null,null,null)),(l()(),t["ɵeld"](29,0,null,null,1,"td",[["class","bold"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Size"])),(l()(),t["ɵeld"](31,0,null,null,2,"td",[],null,null,null,null,null)),(l()(),t["ɵted"](32,null,["",""])),t["ɵppd"](33,1),(l()(),t["ɵeld"](34,0,null,null,5,"tr",[],null,null,null,null,null)),(l()(),t["ɵeld"](35,0,null,null,1,"td",[["class","bold"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Objects"])),(l()(),t["ɵeld"](37,0,null,null,2,"td",[],null,null,null,null,null)),(l()(),t["ɵted"](38,null,["",""])),t["ɵppd"](39,1),(l()(),t["ɵeld"](40,0,null,null,5,"tr",[],null,null,null,null,null)),(l()(),t["ɵeld"](41,0,null,null,1,"td",[["class","bold"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Object size"])),(l()(),t["ɵeld"](43,0,null,null,2,"td",[],null,null,null,null,null)),(l()(),t["ɵted"](44,null,["",""])),t["ɵppd"](45,1),(l()(),t["ɵeld"](46,0,null,null,5,"tr",[],null,null,null,null,null)),(l()(),t["ɵeld"](47,0,null,null,1,"td",[["class","bold"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Features"])),(l()(),t["ɵeld"](49,0,null,null,2,"td",[],null,null,null,null,null)),(l()(),t["ɵand"](16777216,null,null,1,null,tl)),t["ɵdid"](51,278528,null,0,a.NgForOf,[t.ViewContainerRef,t.TemplateRef,t.IterableDiffers],{ngForOf:[0,"ngForOf"]},null),(l()(),t["ɵeld"](52,0,null,null,7,"tr",[],null,null,null,null,null)),(l()(),t["ɵeld"](53,0,null,null,1,"td",[["class","bold"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Provisioned"])),(l()(),t["ɵeld"](55,0,null,null,4,"td",[],null,null,null,null,null)),(l()(),t["ɵand"](16777216,null,null,1,null,il)),t["ɵdid"](57,16384,null,0,a.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"]},null),(l()(),t["ɵand"](16777216,null,null,1,null,ul)),t["ɵdid"](59,16384,null,0,a.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"]},null),(l()(),t["ɵeld"](60,0,null,null,7,"tr",[],null,null,null,null,null)),(l()(),t["ɵeld"](61,0,null,null,1,"td",[["class","bold"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Total provisioned"])),(l()(),t["ɵeld"](63,0,null,null,4,"td",[],null,null,null,null,null)),(l()(),t["ɵand"](16777216,null,null,1,null,sl)),t["ɵdid"](65,16384,null,0,a.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"]},null),(l()(),t["ɵand"](16777216,null,null,1,null,al)),t["ɵdid"](67,16384,null,0,a.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"]},null),(l()(),t["ɵeld"](68,0,null,null,5,"tr",[],null,null,null,null,null)),(l()(),t["ɵeld"](69,0,null,null,1,"td",[["class","bold"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Striping unit"])),(l()(),t["ɵeld"](71,0,null,null,2,"td",[],null,null,null,null,null)),(l()(),t["ɵted"](72,null,["",""])),t["ɵppd"](73,1),(l()(),t["ɵeld"](74,0,null,null,4,"tr",[],null,null,null,null,null)),(l()(),t["ɵeld"](75,0,null,null,1,"td",[["class","bold"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Striping count"])),(l()(),t["ɵeld"](77,0,null,null,1,"td",[],null,null,null,null,null)),(l()(),t["ɵted"](78,null,["",""])),(l()(),t["ɵeld"](79,0,null,null,7,"tr",[],null,null,null,null,null)),(l()(),t["ɵeld"](80,0,null,null,1,"td",[["class","bold"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Parent"])),(l()(),t["ɵeld"](82,0,null,null,4,"td",[],null,null,null,null,null)),(l()(),t["ɵand"](16777216,null,null,1,null,rl)),t["ɵdid"](84,16384,null,0,a.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"]},null),(l()(),t["ɵand"](16777216,null,null,1,null,dl)),t["ɵdid"](86,16384,null,0,a.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"]},null),(l()(),t["ɵeld"](87,0,null,null,4,"tr",[],null,null,null,null,null)),(l()(),t["ɵeld"](88,0,null,null,1,"td",[["class","bold"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Block name prefix"])),(l()(),t["ɵeld"](90,0,null,null,1,"td",[],null,null,null,null,null)),(l()(),t["ɵted"](91,null,["",""])),(l()(),t["ɵeld"](92,0,null,null,4,"tr",[],null,null,null,null,null)),(l()(),t["ɵeld"](93,0,null,null,1,"td",[["class","bold"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Order"])),(l()(),t["ɵeld"](95,0,null,null,1,"td",[],null,null,null,null,null)),(l()(),t["ɵted"](96,null,["",""])),(l()(),t["ɵeld"](97,0,null,null,4,"tr",[],null,null,null,null,null)),(l()(),t["ɵeld"](98,0,null,null,1,"td",[["class","bold"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Format Version"])),(l()(),t["ɵeld"](100,0,null,null,1,"td",[],null,null,null,null,null)),(l()(),t["ɵted"](101,null,["",""])),(l()(),t["ɵeld"](102,0,null,0,4,"tab",[["heading","Snapshots"]],[[1,"id",0],[2,"active",null],[2,"tab-pane",null],[1,"role",0],[1,"aria-labelledby",0]],null,null,null,null)),t["ɵdid"](103,212992,null,0,r.b,[r.e,t.ElementRef,t.Renderer2],{heading:[0,"heading"]},null),(l()(),t["ɵeld"](104,0,null,null,2,"cd-rbd-snapshot-list",[],null,null,null,G,j)),t["ɵprd"](131584,null,h.a,h.a,[g.a,f.a]),t["ɵdid"](106,638976,null,0,A,[V.a,M.b,F.a,N.a,C.a,D.a,T.a,f.a,h.a,L.a,R.b],{snapshots:[0,"snapshots"],featuresName:[1,"featuresName"],poolName:[2,"poolName"],namespace:[3,"namespace"],rbdName:[4,"rbdName"]},null),(l()(),t["ɵeld"](107,0,null,0,3,"tab",[["heading","Configuration"]],[[1,"id",0],[2,"active",null],[2,"tab-pane",null],[1,"role",0],[1,"aria-labelledby",0]],null,null,null,null)),t["ɵdid"](108,212992,null,0,r.b,[r.e,t.ElementRef,t.Renderer2],{heading:[0,"heading"]},null),(l()(),t["ɵeld"](109,0,null,null,1,"cd-rbd-configuration-table",[],null,null,null,$.b,$.a)),t["ɵdid"](110,638976,null,0,z.a,[X.a,W.a,L.a],{data:[0,"data"]},null),(l()(),t["ɵeld"](111,0,null,0,3,"tab",[["heading","Performance"]],[[1,"id",0],[2,"active",null],[2,"tab-pane",null],[1,"role",0],[1,"aria-labelledby",0]],null,null,null,null)),t["ɵdid"](112,212992,null,0,r.b,[r.e,t.ElementRef,t.Renderer2],{heading:[0,"heading"]},null),(l()(),t["ɵeld"](113,0,null,null,1,"cd-grafana",[["grafanaStyle","one"],["uid","YhCYGcuZz"]],null,null,null,J.b,J.a)),t["ɵdid"](114,638976,null,0,Y.a,[K.b,Z.a,L.a],{grafanaPath:[0,"grafanaPath"],grafanaStyle:[1,"grafanaStyle"],uid:[2,"uid"]},null)],(function(l,n){var e=n.component;l(n,3,0,"Details"),l(n,51,0,e.selection.features_name),l(n,57,0,-1===(null==e.selection.features_name?null:e.selection.features_name.indexOf("fast-diff"))),l(n,59,0,-1!==(null==e.selection.features_name?null:e.selection.features_name.indexOf("fast-diff"))),l(n,65,0,-1===(null==e.selection.features_name?null:e.selection.features_name.indexOf("fast-diff"))),l(n,67,0,-1!==(null==e.selection.features_name?null:e.selection.features_name.indexOf("fast-diff"))),l(n,84,0,e.selection.parent),l(n,86,0,!e.selection.parent),l(n,103,0,"Snapshots"),l(n,106,0,e.selection.snapshots,e.selection.features_name,e.selection.pool_name,e.selection.namespace,e.selection.name),l(n,108,0,"Configuration"),l(n,110,0,e.selection.configuration),l(n,112,0,"Performance"),l(n,114,0,e.rbdDashboardUrl,"one","YhCYGcuZz")}),(function(l,n){var e=n.component;l(n,0,0,t["ɵnov"](n,1).clazz),l(n,2,0,t["ɵnov"](n,3).id,t["ɵnov"](n,3).active,t["ɵnov"](n,3).addClass,t["ɵnov"](n,3).role,t["ɵnov"](n,3).ariaLabelledby),l(n,10,0,e.selection.name),l(n,15,0,e.selection.pool_name);var i=t["ɵunv"](n,20,0,l(n,21,0,t["ɵnov"](n.parent,0),e.selection.data_pool));l(n,20,0,i);var u=t["ɵunv"](n,26,0,l(n,27,0,t["ɵnov"](n.parent,1),e.selection.timestamp));l(n,26,0,u);var s=t["ɵunv"](n,32,0,l(n,33,0,t["ɵnov"](n.parent,2),e.selection.size));l(n,32,0,s);var a=t["ɵunv"](n,38,0,l(n,39,0,t["ɵnov"](n.parent,3),e.selection.num_objs));l(n,38,0,a);var o=t["ɵunv"](n,44,0,l(n,45,0,t["ɵnov"](n.parent,2),e.selection.obj_size));l(n,44,0,o);var r=t["ɵunv"](n,72,0,l(n,73,0,t["ɵnov"](n.parent,2),e.selection.stripe_unit));l(n,72,0,r),l(n,78,0,e.selection.stripe_count),l(n,91,0,e.selection.block_name_prefix),l(n,96,0,e.selection.order),l(n,101,0,e.selection.image_format),l(n,102,0,t["ɵnov"](n,103).id,t["ɵnov"](n,103).active,t["ɵnov"](n,103).addClass,t["ɵnov"](n,103).role,t["ɵnov"](n,103).ariaLabelledby),l(n,107,0,t["ɵnov"](n,108).id,t["ɵnov"](n,108).active,t["ɵnov"](n,108).addClass,t["ɵnov"](n,108).role,t["ɵnov"](n,108).ariaLabelledby),l(n,111,0,t["ɵnov"](n,112).id,t["ɵnov"](n,112).active,t["ɵnov"](n,112).addClass,t["ɵnov"](n,112).role,t["ɵnov"](n,112).ariaLabelledby)}))}function ml(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,3,null,null,null,null,null,null,null)),(l()(),t["ɵeld"](1,16777216,null,null,2,"strong",[["tooltip","This setting overrides the global value"]],null,null,null,null,null)),t["ɵdid"](2,212992,null,0,i.c,[t.ViewContainerRef,u.a,i.a,t.ElementRef,t.Renderer2,s.a],{tooltip:[0,"tooltip"]},null),(l()(),t["ɵted"](-1,null,["Image"])),(l()(),t["ɵand"](0,null,null,0))],(function(l,n){l(n,2,0,"This setting overrides the global value")}),null)}function pl(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,16777216,null,null,2,"span",[["tooltip","This is the global value. No value for this option has been set for this image."]],null,null,null,null,null)),t["ɵdid"](1,212992,null,0,i.c,[t.ViewContainerRef,u.a,i.a,t.ElementRef,t.Renderer2,s.a],{tooltip:[0,"tooltip"]},null),(l()(),t["ɵted"](-1,null,["Global"])),(l()(),t["ɵand"](0,null,null,0))],(function(l,n){l(n,1,0,"This is the global value. No value for this option has been set for this image.")}),null)}function hl(l){return t["ɵvid"](0,[(l()(),t["ɵand"](16777216,null,null,1,null,ml)),t["ɵdid"](1,16384,null,0,a.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"],ngIfElse:[1,"ngIfElse"]},null),(l()(),t["ɵand"](0,[["global",2]],null,0,null,pl))],(function(l,n){l(n,1,0,n.context.value-0,t["ɵnov"](n,2))}),null)}function gl(l){return t["ɵvid"](0,[t["ɵpid"](0,H.a,[]),t["ɵpid"](0,N.a,[a.DatePipe]),t["ɵpid"](0,F.a,[X.a]),t["ɵpid"](0,Q.a,[X.a]),t["ɵqud"](402653184,1,{poolConfigurationSourceTpl:0}),(l()(),t["ɵand"](0,[["usageNotAvailableTooltipTpl",2]],null,0,null,el)),(l()(),t["ɵand"](16777216,null,null,1,null,cl)),t["ɵdid"](7,16384,null,0,a.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"]},null),(l()(),t["ɵand"](0,[[1,2],["poolConfigurationSourceTpl",2]],null,0,null,hl))],(function(l,n){l(n,7,0,n.component.selection)}),null)}function fl(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"cd-rbd-details",[],null,null,null,gl,nl)),t["ɵdid"](1,573440,null,0,ll.a,[],null,null)],null,null)}var vl=t["ɵccf"]("cd-rbd-details",ll.a,fl,{selection:"selection",images:"images"},{},[])},L4us:function(l,n,e){"use strict";var t=e("s7LF"),i=(e("XED3"),e("QFaf")),u=e("kvvV");e("kn/O");class s{}e.d(n,"a",(function(){return a}));class a{constructor(l,n,e){this.modalRef=l,this.rbdMirroringService=n,this.taskWrapper=e,this.bsConfig={containerClass:"theme-default"},this.createForm()}createForm(){this.editPeerForm=new i.a({clusterName:new t.i("",{validators:[t.B.required,this.validateClusterName]}),clientID:new t.i("",{validators:[t.B.required,this.validateClientID]}),monAddr:new t.i("",{validators:[this.validateMonAddr]}),key:new t.i("",{validators:[this.validateKey]})})}ngOnInit(){this.pattern=`${this.poolName}
/${this.peerUUID}
`,"edit"===this.mode&&this.rbdMirroringService.getPeer(this.poolName,this.peerUUID).subscribe(l=>{this.setResponse(l)})}validateClusterName(l){if(!l.value.match(/^[\w\-_]*$/))return{invalidClusterName:{value:l.value}}}validateClientID(l){if(!l.value.match(/^(?!client\.)[\w\-_.]*$/))return{invalidClientID:{value:l.value}}}validateMonAddr(l){if(!l.value.match(/^[,; ]*([\w.\-_\[\]]+(:[\d]+)?[,; ]*)*$/))return{invalidMonAddr:{value:l.value}}}validateKey(l){try{if(""===l.value||atob(l.value))return null}catch(n){}return{invalidKey:{value:l.value}}}setResponse(l){this.response=l,this.editPeerForm.get("clusterName").setValue(l.cluster_name),this.editPeerForm.get("clientID").setValue(l.client_id),this.editPeerForm.get("monAddr").setValue(l.mon_host),this.editPeerForm.get("key").setValue(l.key)}update(){const l=new s;let n;l.cluster_name=this.editPeerForm.getValue("clusterName"),l.client_id=this.editPeerForm.getValue("clientID"),l.mon_host=this.editPeerForm.getValue("monAddr"),l.key=this.editPeerForm.getValue("key"),n=this.taskWrapper.wrapTaskAroundCall("edit"===this.mode?{task:new u.a("rbd/mirroring/peer/edit",{pool_name:this.poolName}),call:this.rbdMirroringService.updatePeer(this.poolName,this.peerUUID,l)}:{task:new u.a("rbd/mirroring/peer/add",{pool_name:this.poolName}),call:this.rbdMirroringService.addPeer(this.poolName,l)}),n.subscribe(void 0,()=>this.editPeerForm.setErrors({cdSubmitButton:!0}),()=>{this.rbdMirroringService.refresh(),this.modalRef.hide()})}}},MyVl:function(l,n,e){"use strict";var t=e("8Y7J"),i=e("s7LF"),u=e("LvDl"),s=e("jtHE"),a=e("cp0P"),o=e("SxV6"),r=e("eIep"),d=(e("Ekvf"),e("F83c"),e("sne2"),e("oxzT")),c=e("QFaf"),m=e("PhyI"),p=e("kvvV"),h=e("jVDg"),g=(e("Fgil"),e("aexS"),e("aXbf"),e("kn/O"),e("u0yg"));class f{constructor(){this.features=[]}}class v{constructor(){this.features=[]}}var b=e("lArG");class C extends b.a{constructor(){super(...arguments),this.features=[]}}class S{constructor(){this.features=[]}}var _=function(l){return l.editing="editing",l.cloning="cloning",l.copying="copying",l}({});e.d(n,"a",(function(){return R}));class R{constructor(l,n,e,i,u,a,o,r,c,m){this.authStorageService=l,this.route=n,this.poolService=e,this.rbdService=i,this.formatter=u,this.taskWrapper=a,this.dimlessBinaryPipe=o,this.i18n=r,this.actionLabels=c,this.router=m,this.namespaces=[],this.namespacesByPoolCache={},this.pools=null,this.allPools=null,this.dataPools=null,this.allDataPools=null,this.featuresList=[],this.initializeConfigData=new t.EventEmitter,this.advancedEnabled=!1,this.rbdFormMode=_,this.defaultObjectSize="4 MiB",this.objectSizes=["4 KiB","8 KiB","16 KiB","32 KiB","64 KiB","128 KiB","256 KiB","512 KiB","1 MiB","2 MiB","4 MiB","8 MiB","16 MiB","32 MiB"],this.rbdImage=new s.a(1),this.icons=d.a,this.poolPermission=this.authStorageService.getPermissions().pool,this.resource=this.i18n("RBD"),this.features={"deep-flatten":{desc:this.i18n("Deep flatten"),requires:null,allowEnable:!1,allowDisable:!0},layering:{desc:this.i18n("Layering"),requires:null,allowEnable:!1,allowDisable:!1},"exclusive-lock":{desc:this.i18n("Exclusive lock"),requires:null,allowEnable:!0,allowDisable:!0},"object-map":{desc:this.i18n("Object map (requires exclusive-lock)"),requires:"exclusive-lock",allowEnable:!0,allowDisable:!0,initDisabled:!0},journaling:{desc:this.i18n("Journaling (requires exclusive-lock)"),requires:"exclusive-lock",allowEnable:!0,allowDisable:!0,initDisabled:!0},"fast-diff":{desc:this.i18n("Fast diff (interlocked with object-map)"),requires:"object-map",allowEnable:!0,allowDisable:!0,interlockedWith:"object-map",initDisabled:!0}},this.featuresList=this.objToArray(this.features),this.createForm()}objToArray(l){return u.map(l,(l,n)=>Object.assign(l,{key:n}))}createForm(){this.rbdForm=new c.a({parent:new i.i(""),name:new i.i("",{validators:[i.B.required,i.B.pattern(/^[^@/]+?$/)]}),pool:new i.i(null,{validators:[i.B.required]}),namespace:new i.i(null),useDataPool:new i.i(!1),dataPool:new i.i(null),size:new i.i(null,{updateOn:"blur"}),obj_size:new i.i(this.defaultObjectSize),features:new c.a(this.featuresList.reduce((l,n)=>(l[n.key]=new i.i({value:!1,disabled:!!n.initDisabled}),l),{})),stripingUnit:new i.i(null),stripingCount:new i.i(null,{updateOn:"blur"})},this.validateRbdForm(this.formatter))}disableForEdit(){this.rbdForm.get("parent").disable(),this.rbdForm.get("pool").disable(),this.rbdForm.get("namespace").disable(),this.rbdForm.get("useDataPool").disable(),this.rbdForm.get("dataPool").disable(),this.rbdForm.get("obj_size").disable(),this.rbdForm.get("stripingUnit").disable(),this.rbdForm.get("stripingCount").disable(),this.rbdImage.subscribe(l=>{l.image_format===g.a.V1&&(this.rbdForm.get("deep-flatten").disable(),this.rbdForm.get("layering").disable(),this.rbdForm.get("exclusive-lock").disable())})}disableForClone(){this.rbdForm.get("parent").disable(),this.rbdForm.get("size").disable()}disableForCopy(){this.rbdForm.get("parent").disable(),this.rbdForm.get("size").disable()}ngOnInit(){let l;this.router.url.startsWith("/block/rbd/edit")?(this.mode=this.rbdFormMode.editing,this.action=this.actionLabels.EDIT,this.disableForEdit()):this.router.url.startsWith("/block/rbd/clone")?(this.mode=this.rbdFormMode.cloning,this.disableForClone(),this.action=this.actionLabels.CLONE):this.router.url.startsWith("/block/rbd/copy")?(this.mode=this.rbdFormMode.copying,this.action=this.actionLabels.COPY,this.disableForCopy()):this.action=this.actionLabels.CREATE,function(l){l.RbdServiceGet="rbdService.get",l.PoolServiceList="poolService.list"}(l||(l={}));const n={};this.mode===this.rbdFormMode.editing||this.mode===this.rbdFormMode.cloning||this.mode===this.rbdFormMode.copying?this.route.params.subscribe(e=>{const t=h.a.fromString(decodeURIComponent(e.image_spec));e.snap&&(this.snapName=decodeURIComponent(e.snap)),n[l.RbdServiceGet]=this.rbdService.get(t)}):this.rbdService.defaultFeatures().subscribe(l=>{this.setFeatures(l)}),this.mode!==this.rbdFormMode.editing&&this.poolPermission.read&&(n[l.PoolServiceList]=this.poolService.list(["pool_name","type","flags_names","application_metadata"])),Object(a.a)(n).subscribe(n=>{if(n[l.PoolServiceList]){const e=[],t=[];for(const i of n[l.PoolServiceList])this.rbdService.isRBDPool(i)&&("replicated"===i.type?(e.push(i),t.push(i)):"erasure"===i.type&&-1!==i.flags_names.indexOf("ec_overwrites")&&t.push(i));if(this.pools=e,this.allPools=e,this.dataPools=t,this.allDataPools=t,1===this.pools.length){const l=this.pools[0].pool_name;this.rbdForm.get("pool").setValue(l),this.onPoolChange(l)}}if(n[l.RbdServiceGet]){const e=n[l.RbdServiceGet];this.setResponse(e,this.snapName),this.rbdImage.next(e)}}),u.each(this.features,l=>{this.rbdForm.get("features").get(l.key).valueChanges.subscribe(n=>this.featureFormUpdate(l.key,n))})}onPoolChange(l){const n=this.allDataPools?this.allDataPools.filter(n=>n.pool_name!==l):[];this.rbdForm.getValue("dataPool")===l&&this.rbdForm.get("dataPool").setValue(null),this.dataPools=n,this.namespaces=null,l in this.namespacesByPoolCache?this.namespaces=this.namespacesByPoolCache[l]:this.rbdService.listNamespaces(l).subscribe(n=>{n=n.map(l=>l.namespace),this.namespacesByPoolCache[l]=n,this.namespaces=n}),this.rbdForm.get("namespace").setValue(null)}onUseDataPoolChange(){this.rbdForm.getValue("useDataPool")||(this.rbdForm.get("dataPool").setValue(null),this.onDataPoolChange(null))}onDataPoolChange(l){const n=this.allPools.filter(n=>n.pool_name!==l);this.rbdForm.getValue("pool")===l&&this.rbdForm.get("pool").setValue(null),this.pools=n}validateRbdForm(l){return n=>{const e=n.get("useDataPool"),t=n.get("dataPool");let i=null;e.value&&null==t.value&&(i={required:!0}),t.setErrors(i);const u=n.get("size"),s=n.get("obj_size"),a=l.toBytes(null!=s.value?s.value:this.defaultObjectSize),o=n.get("stripingCount"),r=null!=o.value?o.value:1;let d=null;null===u.value?d={required:!0}:r*a>l.toBytes(u.value)&&(d={invalidSizeObject:!0}),u.setErrors(d);const c=n.get("stripingUnit");let m=null;null===c.value&&null!==o.value?m={required:!0}:null!==c.value&&l.toBytes(c.value)>a&&(m={invalidStripingUnit:!0}),c.setErrors(m);let p=null;return null===o.value&&null!==c.value?p={required:!0}:r<1&&(p={min:!0}),o.setErrors(p),null}}getDependendChildFeatures(l){return u.filter(this.features,n=>n.requires===l)||[]}deepBoxCheck(l,n){this.getDependendChildFeatures(l).forEach(l=>{const e=this.rbdForm.get(l.key);n?e.enable({emitEvent:!1}):(e.disable({emitEvent:!1}),e.setValue(!1,{emitEvent:!1}),this.deepBoxCheck(l.key,n));const t=this.rbdForm.get("features");this.mode===this.rbdFormMode.editing&&t.get(l.key).enabled&&((-1===this.response.features_name.indexOf(l.key)||l.allowDisable)&&(-1!==this.response.features_name.indexOf(l.key)||l.allowEnable)||t.get(l.key).disable())})}interlockCheck(l,n){const e=this.featuresList.find(n=>n.key===l);if(this.response){const l=null!=e.interlockedWith,n=this.featuresList.find(l=>l.interlockedWith===e.key),t=!!this.response.features_name.find(l=>l===e.key);if(l){if(t!==!!this.response.features_name.find(l=>l===e.interlockedWith))return}else if(n&&!!this.response.features_name.find(l=>l===n.key)!==t)return}n?u.filter(this.features,n=>n.interlockedWith===l).forEach(l=>this.rbdForm.get(l.key).setValue(!0,{emitEvent:!1})):e.interlockedWith&&this.rbdForm.get("features").get(e.interlockedWith).setValue(!1)}featureFormUpdate(l,n){if(n){const n=this.features[l].requires;if(n&&!this.rbdForm.getValue(n))return void this.rbdForm.get("features."+l).setValue(!1)}this.deepBoxCheck(l,n),this.interlockCheck(l,n)}setFeatures(l){const n=this.rbdForm.get("features");u.forIn(this.features,e=>{-1!==l.indexOf(e.key)&&n.get(e.key).setValue(!0),this.featureFormUpdate(e.key,n.get(e.key).value)})}setResponse(l,n){this.response=l;const e=new h.a(l.pool_name,l.namespace,l.name).toString();if(this.mode===this.rbdFormMode.cloning)this.rbdForm.get("parent").setValue(`${e}
@${n}
`);else if(this.mode===this.rbdFormMode.copying)n?this.rbdForm.get("parent").setValue(`${e}
@${n}
`):this.rbdForm.get("parent").setValue(""+e);else if(l.parent){const n=l.parent;this.rbdForm.get("parent").setValue(`${n.pool_name}
/${n.image_name}
@${n.snap_name}
`)}this.mode===this.rbdFormMode.editing&&this.rbdForm.get("name").setValue(l.name),this.rbdForm.get("pool").setValue(l.pool_name),this.onPoolChange(l.pool_name),this.rbdForm.get("namespace").setValue(l.namespace),l.data_pool&&(this.rbdForm.get("useDataPool").setValue(!0),this.rbdForm.get("dataPool").setValue(l.data_pool)),this.rbdForm.get("size").setValue(this.dimlessBinaryPipe.transform(l.size)),this.rbdForm.get("obj_size").setValue(this.dimlessBinaryPipe.transform(l.obj_size)),this.setFeatures(l.features_name),this.rbdForm.get("stripingUnit").setValue(this.dimlessBinaryPipe.transform(l.stripe_unit)),this.rbdForm.get("stripingCount").setValue(l.stripe_count),this.initializeConfigData.emit({initialData:this.response.configuration,sourceType:m.a.image})}createRequest(){const l=new C;return l.pool_name=this.rbdForm.getValue("pool"),l.namespace=this.rbdForm.getValue("namespace"),l.name=this.rbdForm.getValue("name"),l.size=this.formatter.toBytes(this.rbdForm.getValue("size")),l.obj_size=this.formatter.toBytes(this.rbdForm.getValue("obj_size")),u.forIn(this.features,n=>{this.rbdForm.getValue(n.key)&&l.features.push(n.key)}),l.stripe_unit=this.formatter.toBytes(this.rbdForm.getValue("stripingUnit")),l.stripe_count=this.rbdForm.getValue("stripingCount"),l.data_pool=this.rbdForm.getValue("dataPool"),l.configuration=this.getDirtyConfigurationValues(),l}createAction(){const l=this.createRequest();return this.taskWrapper.wrapTaskAroundCall({task:new p.a("rbd/create",{pool_name:l.pool_name,namespace:l.namespace,image_name:l.name}),call:this.rbdService.create(l)})}editRequest(){const l=new S;return l.name=this.rbdForm.getValue("name"),l.size=this.formatter.toBytes(this.rbdForm.getValue("size")),u.forIn(this.features,n=>{this.rbdForm.getValue(n.key)&&l.features.push(n.key)}),l.configuration=this.getDirtyConfigurationValues(),l}cloneRequest(){const l=new f;return l.child_pool_name=this.rbdForm.getValue("pool"),l.child_namespace=this.rbdForm.getValue("namespace"),l.child_image_name=this.rbdForm.getValue("name"),l.obj_size=this.formatter.toBytes(this.rbdForm.getValue("obj_size")),u.forIn(this.features,n=>{this.rbdForm.getValue(n.key)&&l.features.push(n.key)}),l.stripe_unit=this.formatter.toBytes(this.rbdForm.getValue("stripingUnit")),l.stripe_count=this.rbdForm.getValue("stripingCount"),l.data_pool=this.rbdForm.getValue("dataPool"),l.configuration=this.getDirtyConfigurationValues(!0,m.a.image),l}editAction(){const l=new h.a(this.response.pool_name,this.response.namespace,this.response.name);return this.taskWrapper.wrapTaskAroundCall({task:new p.a("rbd/edit",{image_spec:l.toString()}),call:this.rbdService.update(l,this.editRequest())})}cloneAction(){const l=this.cloneRequest(),n=new h.a(this.response.pool_name,this.response.namespace,this.response.name);return this.taskWrapper.wrapTaskAroundCall({task:new p.a("rbd/clone",{parent_image_spec:n.toString(),parent_snap_name:this.snapName,child_pool_name:l.child_pool_name,child_namespace:l.child_namespace,child_image_name:l.child_image_name}),call:this.rbdService.cloneSnapshot(n,this.snapName,l)})}copyRequest(){const l=new v;return this.snapName&&(l.snapshot_name=this.snapName),l.dest_pool_name=this.rbdForm.getValue("pool"),l.dest_namespace=this.rbdForm.getValue("namespace"),l.dest_image_name=this.rbdForm.getValue("name"),l.obj_size=this.formatter.toBytes(this.rbdForm.getValue("obj_size")),u.forIn(this.features,n=>{this.rbdForm.getValue(n.key)&&l.features.push(n.key)}),l.stripe_unit=this.formatter.toBytes(this.rbdForm.getValue("stripingUnit")),l.stripe_count=this.rbdForm.getValue("stripingCount"),l.data_pool=this.rbdForm.getValue("dataPool"),l.configuration=this.getDirtyConfigurationValues(!0,m.a.image),l}copyAction(){const l=this.copyRequest(),n=new h.a(this.response.pool_name,this.response.namespace,this.response.name);return this.taskWrapper.wrapTaskAroundCall({task:new p.a("rbd/copy",{src_image_spec:n.toString(),dest_pool_name:l.dest_pool_name,dest_namespace:l.dest_namespace,dest_image_name:l.dest_image_name}),call:this.rbdService.copy(n,l)})}submit(){this.mode||this.rbdImage.next("create"),this.rbdImage.pipe(Object(o.a)(),Object(r.a)(()=>this.mode===this.rbdFormMode.editing?this.editAction():this.mode===this.rbdFormMode.cloning?this.cloneAction():this.mode===this.rbdFormMode.copying?this.copyAction():this.createAction())).subscribe(()=>{},()=>this.rbdForm.setErrors({cdSubmitButton:!0}),()=>this.router.navigate(["/block/rbd"]))}}},PhyI:function(l,n,e){"use strict";e.d(n,"a",(function(){return t})),e.d(n,"b",(function(){return i}));var t=function(l){return l[l.global=0]="global",l[l.pool=1]="pool",l[l.image=2]="image",l}({}),i=function(l){return l[l.bps=0]="bps",l[l.iops=1]="iops",l[l.milliseconds=2]="milliseconds",l}({})},QUzE:function(l,n,e){"use strict";var t=e("8Y7J"),i=e("ANnk"),u=e("f/UV"),s=e("aexS"),a=e("s7LF"),o=e("+gVj"),r=e("EEJc"),d=e("ajRT"),c=e("mXUL"),m=e("IZUe"),p=e("SVse"),h=e("gp3X"),g=e("sb0X"),f=e("OcYo"),v=e("EApP"),b=e("GiVz"),C=e("KVJa"),S=e("Z21x"),_=e("sne2"),R=e("SuaG"),y=e("LqlI"),w=e("XED3"),k=e("kn/O");e.d(n,"a",(function(){return D}));var I=t["ɵcrt"]({encapsulation:0,styles:[[".form-group.ng-invalid[_ngcontent-%COMP%] .invalid-feedback[_ngcontent-%COMP%]{display:block}"]],data:{}});function E(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"span",[["class","invalid-feedback"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["This field is required."]))],null,null)}function N(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,10,"div",[["class","custom-control custom-checkbox"]],null,null,null,null,null)),(l()(),t["ɵeld"](1,0,null,null,7,"input",[["class","custom-control-input"],["type","checkbox"]],[[8,"id",0],[8,"name",0],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"is-valid",null],[2,"is-invalid",null]],[[null,"change"],[null,"blur"]],(function(l,n,e){var i=!0;return"change"===n&&(i=!1!==t["ɵnov"](l,3).onChange(e.target.checked)&&i),"blur"===n&&(i=!1!==t["ɵnov"](l,3).onTouched()&&i),i}),null,null)),t["ɵdid"](2,4210688,null,0,i.a,[[2,u.a],s.a,t.ElementRef],null,null),t["ɵdid"](3,16384,null,0,a.c,[t.Renderer2,t.ElementRef],null,null),t["ɵprd"](1024,null,a.p,(function(l){return[l]}),[a.c]),t["ɵdid"](5,671744,[[3,4]],0,a.j,[[3,a.d],[8,null],[8,null],[6,a.p],[2,a.E]],{name:[0,"name"]},null),t["ɵprd"](2048,null,a.q,null,[a.j]),t["ɵdid"](7,16384,null,0,a.r,[[4,a.q]],null,null),t["ɵdid"](8,16384,null,0,o.h,[[3,a.d],o.a],{formControlName:[0,"formControlName"]},null),(l()(),t["ɵeld"](9,0,null,null,1,"label",[["class","custom-control-label"]],[[8,"htmlFor",0]],null,null,null,null)),(l()(),t["ɵted"](10,null,["",""]))],(function(l,n){l(n,5,0,t["ɵinlineInterpolate"](1,"",n.context.$implicit.name,"")),l(n,8,0,t["ɵinlineInterpolate"](1,"",n.context.$implicit.name,""))}),(function(l,n){l(n,1,1,[t["ɵinlineInterpolate"](1,"",n.context.$implicit.name,""),t["ɵinlineInterpolate"](1,"",n.context.$implicit.name,""),t["ɵnov"](n,7).ngClassUntouched,t["ɵnov"](n,7).ngClassTouched,t["ɵnov"](n,7).ngClassPristine,t["ɵnov"](n,7).ngClassDirty,t["ɵnov"](n,7).ngClassValid,t["ɵnov"](n,7).ngClassInvalid,t["ɵnov"](n,7).ngClassPending,t["ɵnov"](n,8).validClass,t["ɵnov"](n,8).invalidClass]),l(n,9,0,t["ɵinlineInterpolate"](1,"",n.context.$implicit.name,"")),l(n,10,0,n.context.$implicit.name)}))}function F(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"span",[["class","invalid-feedback"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["At least one pool is required."]))],null,null)}function V(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,74,"cd-modal",[],null,null,null,r.c,r.b)),t["ɵdid"](1,49152,null,0,d.a,[],{modalRef:[0,"modalRef"]},null),(l()(),t["ɵeld"](2,0,null,0,1,null,null,null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Create Bootstrap Token"])),(l()(),t["ɵeld"](4,0,null,1,70,null,null,null,null,null,null,null)),(l()(),t["ɵeld"](5,0,null,null,69,"form",[["class","form"],["name","createBootstrapForm"],["novalidate",""]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"submit"],[null,"reset"]],(function(l,n,e){var i=!0;return"submit"===n&&(i=!1!==t["ɵnov"](l,7).onSubmit(e)&&i),"reset"===n&&(i=!1!==t["ɵnov"](l,7).onReset()&&i),"submit"===n&&(i=!1!==t["ɵnov"](l,10).onSubmit()&&i),i}),null,null)),t["ɵdid"](6,16384,null,0,a.G,[],null,null),t["ɵdid"](7,540672,[["formDir",4]],0,a.l,[[8,null],[8,null]],{form:[0,"form"]},null),t["ɵprd"](2048,null,a.d,null,[a.l]),t["ɵdid"](9,16384,null,0,a.s,[[4,a.d]],null,null),t["ɵdid"](10,16384,null,0,o.d,[],{formGroup:[0,"formGroup"]},null),(l()(),t["ɵeld"](11,0,null,null,59,"div",[["class","modal-body"]],null,null,null,null,null)),(l()(),t["ɵeld"](12,0,null,null,5,"p",[],null,null,null,null,null)),(l()(),t["ɵeld"](13,0,null,null,4,null,null,null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["To create a bootstrap token which can be imported by a peer site cluster, provide the local site's name, select which pools will have mirroring enabled, and click "])),(l()(),t["ɵeld"](15,0,null,null,1,"kbd",[],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Generate"])),(l()(),t["ɵted"](-1,null,["."])),(l()(),t["ɵeld"](18,0,null,null,16,"div",[["class","form-group"]],[[2,"has-error",null],[2,"has-success",null]],null,null,c.b,c.a)),t["ɵdid"](19,1163264,null,2,o.c,[t.ElementRef,o.g],null,null),t["ɵqud"](603979776,1,{FormControlNames:1}),t["ɵqud"](603979776,2,{messagesBlock:0}),(l()(),t["ɵeld"](22,0,null,0,1,"label",[["class","col-form-label required"],["for","siteName"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Site Name"])),(l()(),t["ɵeld"](24,0,null,0,8,"input",[["autofocus",""],["class","form-control"],["formControlName","siteName"],["id","siteName"],["name","siteName"],["placeholder","Name..."],["type","text"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"is-valid",null],[2,"is-invalid",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],(function(l,n,e){var i=!0;return"input"===n&&(i=!1!==t["ɵnov"](l,27)._handleInput(e.target.value)&&i),"blur"===n&&(i=!1!==t["ɵnov"](l,27).onTouched()&&i),"compositionstart"===n&&(i=!1!==t["ɵnov"](l,27)._compositionStart()&&i),"compositionend"===n&&(i=!1!==t["ɵnov"](l,27)._compositionEnd(e.target.value)&&i),i}),null,null)),t["ɵdid"](25,4210688,null,0,m.a,[t.ElementRef],{autofocus:[0,"autofocus"]},null),t["ɵdid"](26,4210688,null,0,i.a,[[2,u.a],s.a,t.ElementRef],null,null),t["ɵdid"](27,16384,null,0,a.e,[t.Renderer2,t.ElementRef,[2,a.b]],null,null),t["ɵprd"](1024,null,a.p,(function(l){return[l]}),[a.e]),t["ɵdid"](29,671744,[[1,4]],0,a.j,[[3,a.d],[8,null],[8,null],[6,a.p],[2,a.E]],{name:[0,"name"]},null),t["ɵprd"](2048,null,a.q,null,[a.j]),t["ɵdid"](31,16384,null,0,a.r,[[4,a.q]],null,null),t["ɵdid"](32,16384,null,0,o.h,[[3,a.d],o.a],{formControlName:[0,"formControlName"]},null),(l()(),t["ɵand"](16777216,null,0,1,null,E)),t["ɵdid"](34,16384,null,0,p.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"]},null),(l()(),t["ɵeld"](35,0,null,null,12,"div",[["class","form-group"],["formGroupName","pools"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"has-error",null],[2,"has-success",null]],null,null,c.b,c.a)),t["ɵdid"](36,212992,null,0,a.m,[[3,a.d],[8,null],[8,null]],{name:[0,"name"]},null),t["ɵprd"](2048,null,a.d,null,[a.m]),t["ɵdid"](38,16384,null,0,a.s,[[4,a.d]],null,null),t["ɵdid"](39,1163264,null,2,o.c,[t.ElementRef,o.g],null,null),t["ɵqud"](603979776,3,{FormControlNames:1}),t["ɵqud"](603979776,4,{messagesBlock:0}),(l()(),t["ɵeld"](42,0,null,0,1,"label",[["class","col-form-label required"],["for","pools"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Pools"])),(l()(),t["ɵand"](16777216,null,0,1,null,N)),t["ɵdid"](45,278528,null,0,p.NgForOf,[t.ViewContainerRef,t.TemplateRef,t.IterableDiffers],{ngForOf:[0,"ngForOf"]},null),(l()(),t["ɵand"](16777216,null,0,1,null,F)),t["ɵdid"](47,16384,null,0,p.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"]},null),(l()(),t["ɵeld"](48,0,null,null,3,"div",[["class","button-group text-right"]],null,null,null,null,null)),(l()(),t["ɵeld"](49,0,null,null,2,"cd-submit-button",[],null,[[null,"submitAction"]],(function(l,n,e){var t=!0;return"submitAction"===n&&(t=!1!==l.component.generate()&&t),t}),h.b,h.a)),t["ɵdid"](50,114688,null,0,g.a,[t.ElementRef],{form:[0,"form"]},{submitAction:"submitAction"}),(l()(),t["ɵted"](-1,0,["Generate"])),(l()(),t["ɵeld"](52,0,null,null,14,"div",[["class","form-group"]],[[2,"has-error",null],[2,"has-success",null]],null,null,c.b,c.a)),t["ɵdid"](53,1163264,null,2,o.c,[t.ElementRef,o.g],null,null),t["ɵqud"](603979776,5,{FormControlNames:1}),t["ɵqud"](603979776,6,{messagesBlock:0}),(l()(),t["ɵeld"](56,0,null,0,2,"label",[["class","col-form-label"],["for","token"]],null,null,null,null,null)),(l()(),t["ɵeld"](57,0,null,null,1,"span",[],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Token"])),(l()(),t["ɵeld"](59,0,null,0,7,"textarea",[["class","form-control resize-vertical"],["formControlName","token"],["id","token"],["placeholder","Generated token..."],["readonly",""]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"is-valid",null],[2,"is-invalid",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],(function(l,n,e){var i=!0;return"input"===n&&(i=!1!==t["ɵnov"](l,60)._handleInput(e.target.value)&&i),"blur"===n&&(i=!1!==t["ɵnov"](l,60).onTouched()&&i),"compositionstart"===n&&(i=!1!==t["ɵnov"](l,60)._compositionStart()&&i),"compositionend"===n&&(i=!1!==t["ɵnov"](l,60)._compositionEnd(e.target.value)&&i),i}),null,null)),t["ɵdid"](60,16384,null,0,a.e,[t.Renderer2,t.ElementRef,[2,a.b]],null,null),t["ɵprd"](1024,null,a.p,(function(l){return[l]}),[a.e]),t["ɵdid"](62,671744,[[5,4]],0,a.j,[[3,a.d],[8,null],[8,null],[6,a.p],[2,a.E]],{name:[0,"name"]},null),t["ɵprd"](2048,null,a.q,null,[a.j]),t["ɵdid"](64,16384,null,0,a.r,[[4,a.q]],null,null),t["ɵdid"](65,16384,null,0,o.h,[[3,a.d],o.a],{formControlName:[0,"formControlName"]},null),(l()(),t["ɵted"](-1,null,[" "])),(l()(),t["ɵeld"](67,0,null,null,3,"button",[["aria-label","Copy to Clipboard"],["cdCopy2ClipboardButton","token"],["class","btn btn-primary mb-3 float-right"],["title","Copy to Clipboard"]],null,[[null,"click"]],(function(l,n,e){var i=!0;return"click"===n&&(i=!1!==t["ɵnov"](l,68).onClick()&&i),i}),null,null)),t["ɵdid"](68,81920,null,0,f.a,[t.ElementRef,t.Renderer2,v.j,b.a],{cdCopy2ClipboardButton:[0,"cdCopy2ClipboardButton"]},null),(l()(),t["ɵeld"](69,0,null,null,1,null,null,null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Copy to Clipboard"])),(l()(),t["ɵeld"](71,0,null,null,3,"div",[["class","modal-footer"]],null,null,null,null,null)),(l()(),t["ɵeld"](72,0,null,null,2,"div",[["class","button-group text-right"]],null,null,null,null,null)),(l()(),t["ɵeld"](73,0,null,null,1,"cd-back-button",[["name","Close"]],null,null,null,C.b,C.a)),t["ɵdid"](74,49152,null,0,S.a,[p.Location,_.b],{name:[0,"name"],back:[1,"back"]},null)],(function(l,n){var e=n.component;l(n,1,0,e.modalRef),l(n,7,0,e.createBootstrapForm),l(n,10,0,e.createBootstrapForm),l(n,19,0),l(n,25,0,""),l(n,29,0,"siteName"),l(n,32,0,"siteName"),l(n,34,0,e.createBootstrapForm.showError("siteName",t["ɵnov"](n,7),"required")),l(n,36,0,"pools"),l(n,39,0),l(n,45,0,e.pools),l(n,47,0,e.createBootstrapForm.showError("pools",t["ɵnov"](n,7),"requirePool")),l(n,50,0,e.createBootstrapForm),l(n,53,0),l(n,62,0,"token"),l(n,65,0,"token"),l(n,68,0,"token"),l(n,74,0,"Close",e.modalRef.hide)}),(function(l,n){l(n,5,0,t["ɵnov"](n,9).ngClassUntouched,t["ɵnov"](n,9).ngClassTouched,t["ɵnov"](n,9).ngClassPristine,t["ɵnov"](n,9).ngClassDirty,t["ɵnov"](n,9).ngClassValid,t["ɵnov"](n,9).ngClassInvalid,t["ɵnov"](n,9).ngClassPending),l(n,18,0,t["ɵnov"](n,19).hasErrors,t["ɵnov"](n,19).hasSuccess),l(n,24,0,t["ɵnov"](n,31).ngClassUntouched,t["ɵnov"](n,31).ngClassTouched,t["ɵnov"](n,31).ngClassPristine,t["ɵnov"](n,31).ngClassDirty,t["ɵnov"](n,31).ngClassValid,t["ɵnov"](n,31).ngClassInvalid,t["ɵnov"](n,31).ngClassPending,t["ɵnov"](n,32).validClass,t["ɵnov"](n,32).invalidClass),l(n,35,0,t["ɵnov"](n,38).ngClassUntouched,t["ɵnov"](n,38).ngClassTouched,t["ɵnov"](n,38).ngClassPristine,t["ɵnov"](n,38).ngClassDirty,t["ɵnov"](n,38).ngClassValid,t["ɵnov"](n,38).ngClassInvalid,t["ɵnov"](n,38).ngClassPending,t["ɵnov"](n,39).hasErrors,t["ɵnov"](n,39).hasSuccess),l(n,52,0,t["ɵnov"](n,53).hasErrors,t["ɵnov"](n,53).hasSuccess),l(n,59,0,t["ɵnov"](n,64).ngClassUntouched,t["ɵnov"](n,64).ngClassTouched,t["ɵnov"](n,64).ngClassPristine,t["ɵnov"](n,64).ngClassDirty,t["ɵnov"](n,64).ngClassValid,t["ɵnov"](n,64).ngClassInvalid,t["ɵnov"](n,64).ngClassPending,t["ɵnov"](n,65).validClass,t["ɵnov"](n,65).invalidClass)}))}function T(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"cd-bootstrap-create-modal",[],null,null,null,V,I)),t["ɵdid"](1,245760,null,0,R.a,[y.a,w.a,k.a],null,null)],(function(l,n){l(n,1,0)}),null)}var D=t["ɵccf"]("cd-bootstrap-create-modal",R.a,T,{},{},[])},RIVN:function(l,n,e){"use strict";var t=e("8Y7J"),i=e("C6Ij"),u=e("AWcq"),s=e("NUGo"),a=e("S7zO"),o=e("SVse");class r{transform(l){return"warning"===l?"badge badge-warning":"error"===l?"badge badge-danger":"success"===l?"badge badge-success":"badge badge-info"}}var d=e("25BL"),c=e("uIqm"),m=e("XED3"),p=e("85J/");class h{constructor(l,n,e){this.rbdMirroringService=l,this.cephShortVersionPipe=n,this.i18n=e}ngOnInit(){this.columns=[{prop:"instance_id",name:this.i18n("Instance"),flexGrow:2},{prop:"id",name:this.i18n("ID"),flexGrow:2},{prop:"server_hostname",name:this.i18n("Hostname"),flexGrow:2},{prop:"version",name:this.i18n("Version"),pipe:this.cephShortVersionPipe,flexGrow:2},{prop:"health",name:this.i18n("Health"),cellTemplate:this.healthTmpl,flexGrow:1}],this.subs=this.rbdMirroringService.subscribeSummary(l=>{this.data=l.content_data.daemons})}ngOnDestroy(){this.subs.unsubscribe()}refresh(){this.rbdMirroringService.refresh()}}var g=e("GiVz"),f=t["ɵcrt"]({encapsulation:0,styles:[[""]],data:{}});function v(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,4,"span",[],null,null,null,null,null)),t["ɵprd"](512,null,o["ɵNgClassImpl"],o["ɵNgClassR2Impl"],[t.IterableDiffers,t.KeyValueDiffers,t.ElementRef,t.Renderer2]),t["ɵdid"](2,278528,null,0,o.NgClass,[o["ɵNgClassImpl"]],{ngClass:[0,"ngClass"]},null),t["ɵppd"](3,1),(l()(),t["ɵted"](4,null,["",""]))],(function(l,n){var e=t["ɵunv"](n,2,0,l(n,3,0,t["ɵnov"](n.parent,0),n.context.row.health_color));l(n,2,0,e)}),(function(l,n){l(n,4,0,n.context.value)}))}function b(l){return t["ɵvid"](0,[t["ɵpid"](0,r,[]),t["ɵqud"](402653184,1,{healthTmpl:0}),(l()(),t["ɵeld"](2,0,null,null,1,"cd-table",[["columnMode","flex"]],null,[[null,"fetchData"]],(function(l,n,e){var t=!0;return"fetchData"===n&&(t=!1!==l.component.refresh()&&t),t}),d.b,d.a)),t["ɵdid"](3,2867200,null,0,c.a,[t.NgZone,t.ChangeDetectorRef],{data:[0,"data"],columns:[1,"columns"],columnMode:[2,"columnMode"],autoReload:[3,"autoReload"]},{fetchData:"fetchData"}),(l()(),t["ɵand"](0,[[1,2],["healthTmpl",2]],null,0,null,v))],(function(l,n){var e=n.component;l(n,3,0,e.data,e.columns,"flex",-1)}),null)}var C=e("HDdC"),S=e("0+/T"),_=e("oxzT"),R=e("vCyI"),y=e("kvvV"),w=e("aexS"),k=e("kn/O"),I=e("aa9H"),E=e("L4us");class N{constructor(l,n,e,t,i){this.authStorageService=l,this.rbdMirroringService=n,this.modalService=e,this.taskWrapper=t,this.i18n=i,this.selection=new R.a,this.data=[],this.permission=this.authStorageService.getPermissions().rbdMirroring;const u={permission:"update",icon:_.a.edit,click:()=>this.editModeModal(),name:this.i18n("Edit Mode"),canBePrimary:()=>!0},s={permission:"create",icon:_.a.add,name:this.i18n("Add Peer"),click:()=>this.editPeersModal("add"),disable:()=>!this.selection.first()||"disabled"===this.selection.first().mirror_mode,visible:()=>!this.getPeerUUID(),canBePrimary:()=>!1},a={permission:"update",icon:_.a.exchange,name:this.i18n("Edit Peer"),click:()=>this.editPeersModal("edit"),visible:()=>!!this.getPeerUUID()},o={permission:"delete",icon:_.a.destroy,name:this.i18n("Delete Peer"),click:()=>this.deletePeersModal(),visible:()=>!!this.getPeerUUID()};this.tableActions=[u,s,a,o]}ngOnInit(){this.columns=[{prop:"name",name:this.i18n("Name"),flexGrow:2},{prop:"mirror_mode",name:this.i18n("Mode"),flexGrow:2},{prop:"leader_id",name:this.i18n("Leader"),flexGrow:2},{prop:"image_local_count",name:this.i18n("# Local"),flexGrow:2},{prop:"image_remote_count",name:this.i18n("# Remote"),flexGrow:2},{prop:"health",name:this.i18n("Health"),cellTemplate:this.healthTmpl,flexGrow:1}],this.subs=this.rbdMirroringService.subscribeSummary(l=>{this.data=l.content_data.pools})}ngOnDestroy(){this.subs.unsubscribe()}refresh(){this.rbdMirroringService.refresh()}editModeModal(){const l={poolName:this.selection.first().name};this.modalRef=this.modalService.show(I.a,{initialState:l})}editPeersModal(l){const n={poolName:this.selection.first().name,mode:l};"edit"===l&&(n.peerUUID=this.getPeerUUID()),this.modalRef=this.modalService.show(E.a,{initialState:n})}deletePeersModal(){const l=this.selection.first().name,n=this.getPeerUUID();this.modalRef=this.modalService.show(S.a,{initialState:{itemDescription:this.i18n("mirror peer"),itemNames:[`${l}
(${n}
)`],submitActionObservable:()=>new C.a(e=>{this.taskWrapper.wrapTaskAroundCall({task:new y.a("rbd/mirroring/peer/delete",{pool_name:l}),call:this.rbdMirroringService.deletePeer(l,n)}).subscribe(void 0,l=>e.error(l),()=>{this.rbdMirroringService.refresh(),e.complete()})})}})}getPeerUUID(){const l=this.selection.first(),n=this.data.find(n=>l&&l.name===n.name);if(n&&n.peer_uuids)return n.peer_uuids[0]}updateSelection(l){this.selection=l}}var F=e("LqlI"),V=t["ɵcrt"]({encapsulation:0,styles:[[""]],data:{}});function T(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,4,"span",[],null,null,null,null,null)),t["ɵprd"](512,null,o["ɵNgClassImpl"],o["ɵNgClassR2Impl"],[t.IterableDiffers,t.KeyValueDiffers,t.ElementRef,t.Renderer2]),t["ɵdid"](2,278528,null,0,o.NgClass,[o["ɵNgClassImpl"]],{ngClass:[0,"ngClass"]},null),t["ɵppd"](3,1),(l()(),t["ɵted"](4,null,["",""]))],(function(l,n){var e=t["ɵunv"](n,2,0,l(n,3,0,t["ɵnov"](n.parent,0),n.context.row.health_color));l(n,2,0,e)}),(function(l,n){l(n,4,0,n.context.value)}))}function D(l){return t["ɵvid"](0,[t["ɵpid"](0,r,[]),t["ɵqud"](402653184,1,{healthTmpl:0}),(l()(),t["ɵeld"](2,0,null,null,3,"cd-table",[["columnMode","flex"],["forceIdentifier","true"],["identifier","name"],["selectionType","single"]],null,[[null,"fetchData"],[null,"updateSelection"]],(function(l,n,e){var t=!0,i=l.component;return"fetchData"===n&&(t=!1!==i.refresh()&&t),"updateSelection"===n&&(t=!1!==i.updateSelection(e)&&t),t}),d.b,d.a)),t["ɵdid"](3,2867200,null,0,c.a,[t.NgZone,t.ChangeDetectorRef],{data:[0,"data"],columns:[1,"columns"],columnMode:[2,"columnMode"],autoReload:[3,"autoReload"],identifier:[4,"identifier"],forceIdentifier:[5,"forceIdentifier"],selectionType:[6,"selectionType"]},{fetchData:"fetchData",updateSelection:"updateSelection"}),(l()(),t["ɵeld"](4,0,null,1,1,"cd-table-actions",[["class","table-actions"]],null,null,null,s.b,s.a)),t["ɵdid"](5,114688,null,0,a.a,[],{permission:[0,"permission"],selection:[1,"selection"],tableActions:[2,"tableActions"]},null),(l()(),t["ɵand"](0,[[1,2],["healthTmpl",2]],null,0,null,T))],(function(l,n){var e=n.component;l(n,3,0,e.data,e.columns,"flex",-1,"name","true","single"),l(n,5,0,e.permission,e.selection,e.tableActions)}),null)}var P=e("7qid"),x=e("38Bd"),q=e("pKUh"),B=e("2ZVE");class O{constructor(l,n){this.rbdMirroringService=l,this.i18n=n,this.image_error={data:[],columns:{}},this.image_syncing={data:[],columns:{}},this.image_ready={data:[],columns:{}}}ngOnInit(){this.image_error.columns=[{prop:"pool_name",name:this.i18n("Pool"),flexGrow:2},{prop:"name",name:this.i18n("Image"),flexGrow:2},{prop:"description",name:this.i18n("Issue"),flexGrow:4},{prop:"state",name:this.i18n("State"),cellTemplate:this.stateTmpl,flexGrow:1}],this.image_syncing.columns=[{prop:"pool_name",name:this.i18n("Pool"),flexGrow:2},{prop:"name",name:this.i18n("Image"),flexGrow:2},{prop:"progress",name:this.i18n("Progress"),cellTemplate:this.progressTmpl,flexGrow:2},{prop:"state",name:this.i18n("State"),cellTemplate:this.syncTmpl,flexGrow:1}],this.image_ready.columns=[{prop:"pool_name",name:this.i18n("Pool"),flexGrow:2},{prop:"name",name:this.i18n("Image"),flexGrow:2},{prop:"description",name:this.i18n("Description"),flexGrow:4},{prop:"state",name:this.i18n("State"),cellTemplate:this.stateTmpl,flexGrow:1}],this.subs=this.rbdMirroringService.subscribeSummary(l=>{this.image_error.data=l.content_data.image_error,this.image_syncing.data=l.content_data.image_syncing,this.image_ready.data=l.content_data.image_ready})}ngOnDestroy(){this.subs.unsubscribe()}refresh(){this.rbdMirroringService.refresh()}}var A=t["ɵcrt"]({encapsulation:0,styles:[[""]],data:{}});function M(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"cd-table",[["columnMode","flex"]],null,[[null,"fetchData"]],(function(l,n,e){var t=!0;return"fetchData"===n&&(t=!1!==l.component.refresh()&&t),t}),d.b,d.a)),t["ɵdid"](1,2867200,null,0,c.a,[t.NgZone,t.ChangeDetectorRef],{data:[0,"data"],columns:[1,"columns"],columnMode:[2,"columnMode"],autoReload:[3,"autoReload"]},{fetchData:"fetchData"})],(function(l,n){var e=n.component;l(n,1,0,e.image_error.data,e.image_error.columns,"flex",-1)}),null)}function L(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"cd-table",[["columnMode","flex"]],null,[[null,"fetchData"]],(function(l,n,e){var t=!0;return"fetchData"===n&&(t=!1!==l.component.refresh()&&t),t}),d.b,d.a)),t["ɵdid"](1,2867200,null,0,c.a,[t.NgZone,t.ChangeDetectorRef],{data:[0,"data"],columns:[1,"columns"],columnMode:[2,"columnMode"],autoReload:[3,"autoReload"]},{fetchData:"fetchData"})],(function(l,n){var e=n.component;l(n,1,0,e.image_syncing.data,e.image_syncing.columns,"flex",-1)}),null)}function j(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"cd-table",[["columnMode","flex"]],null,[[null,"fetchData"]],(function(l,n,e){var t=!0;return"fetchData"===n&&(t=!1!==l.component.refresh()&&t),t}),d.b,d.a)),t["ɵdid"](1,2867200,null,0,c.a,[t.NgZone,t.ChangeDetectorRef],{data:[0,"data"],columns:[1,"columns"],columnMode:[2,"columnMode"],autoReload:[3,"autoReload"]},{fetchData:"fetchData"})],(function(l,n){var e=n.component;l(n,1,0,e.image_ready.data,e.image_ready.columns,"flex",-1)}),null)}function U(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,4,"span",[],null,null,null,null,null)),t["ɵprd"](512,null,o["ɵNgClassImpl"],o["ɵNgClassR2Impl"],[t.IterableDiffers,t.KeyValueDiffers,t.ElementRef,t.Renderer2]),t["ɵdid"](2,278528,null,0,o.NgClass,[o["ɵNgClassImpl"]],{ngClass:[0,"ngClass"]},null),t["ɵppd"](3,1),(l()(),t["ɵted"](4,null,["",""]))],(function(l,n){var e=t["ɵunv"](n,2,0,l(n,3,0,t["ɵnov"](n.parent,0),n.context.row.state_color));l(n,2,0,e)}),(function(l,n){l(n,4,0,n.context.value)}))}function G(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"span",[["class","badge badge-info"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Syncing"]))],null,null)}function $(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"progressbar",[["type","info"]],[[1,"max",0],[2,"progress",null]],null,null,P.b,P.a)),t["ɵdid"](1,49152,null,0,x.b,[x.c],{type:[0,"type"],value:[1,"value"]},null)],(function(l,n){l(n,1,0,"info",n.context.value)}),(function(l,n){l(n,0,0,t["ɵnov"](n,1).max,t["ɵnov"](n,1).addClass)}))}function z(l){return t["ɵvid"](0,[t["ɵpid"](0,r,[]),t["ɵqud"](402653184,1,{stateTmpl:0}),t["ɵqud"](402653184,2,{syncTmpl:0}),t["ɵqud"](402653184,3,{progressTmpl:0}),(l()(),t["ɵeld"](4,0,null,null,13,"tabset",[],[[2,"tab-container",null]],null,null,q.b,q.a)),t["ɵdid"](5,180224,[["tabset",4]],0,B.e,[B.f,t.Renderer2,t.ElementRef],null,null),(l()(),t["ɵeld"](6,0,null,0,3,"tab",[["heading","Issues"]],[[1,"id",0],[2,"active",null],[2,"tab-pane",null],[1,"role",0],[1,"aria-labelledby",0]],null,null,null,null)),t["ɵdid"](7,212992,null,0,B.b,[B.e,t.ElementRef,t.Renderer2],{heading:[0,"heading"]},null),(l()(),t["ɵand"](16777216,null,null,1,null,M)),t["ɵdid"](9,16384,null,0,o.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"]},null),(l()(),t["ɵeld"](10,0,null,0,3,"tab",[["heading","Syncing"]],[[1,"id",0],[2,"active",null],[2,"tab-pane",null],[1,"role",0],[1,"aria-labelledby",0]],null,null,null,null)),t["ɵdid"](11,212992,null,0,B.b,[B.e,t.ElementRef,t.Renderer2],{heading:[0,"heading"]},null),(l()(),t["ɵand"](16777216,null,null,1,null,L)),t["ɵdid"](13,16384,null,0,o.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"]},null),(l()(),t["ɵeld"](14,0,null,0,3,"tab",[["heading","Ready"]],[[1,"id",0],[2,"active",null],[2,"tab-pane",null],[1,"role",0],[1,"aria-labelledby",0]],null,null,null,null)),t["ɵdid"](15,212992,null,0,B.b,[B.e,t.ElementRef,t.Renderer2],{heading:[0,"heading"]},null),(l()(),t["ɵand"](16777216,null,null,1,null,j)),t["ɵdid"](17,16384,null,0,o.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"]},null),(l()(),t["ɵand"](0,[[1,2],["stateTmpl",2]],null,0,null,U)),(l()(),t["ɵand"](0,[[2,2],["syncTmpl",2]],null,0,null,G)),(l()(),t["ɵand"](0,[[3,2],["progressTmpl",2]],null,0,null,$))],(function(l,n){l(n,7,0,"Issues"),l(n,9,0,null==t["ɵnov"](n,5).tabs[0]?null:t["ɵnov"](n,5).tabs[0].active),l(n,11,0,"Syncing"),l(n,13,0,null==t["ɵnov"](n,5).tabs[1]?null:t["ɵnov"](n,5).tabs[1].active),l(n,15,0,"Ready"),l(n,17,0,null==t["ɵnov"](n,5).tabs[2]?null:t["ɵnov"](n,5).tabs[2].active)}),(function(l,n){l(n,4,0,t["ɵnov"](n,5).clazz),l(n,6,0,t["ɵnov"](n,7).id,t["ɵnov"](n,7).active,t["ɵnov"](n,7).addClass,t["ɵnov"](n,7).role,t["ɵnov"](n,7).ariaLabelledby),l(n,10,0,t["ɵnov"](n,11).id,t["ɵnov"](n,11).active,t["ɵnov"](n,11).addClass,t["ɵnov"](n,11).role,t["ɵnov"](n,11).ariaLabelledby),l(n,14,0,t["ɵnov"](n,15).id,t["ɵnov"](n,15).active,t["ɵnov"](n,15).addClass,t["ɵnov"](n,15).role,t["ɵnov"](n,15).ariaLabelledby)}))}var X=e("cxJu");e.d(n,"a",(function(){return K}));var W=t["ɵcrt"]({encapsulation:0,styles:[["cd-mirroring cd-table-actions.float-right ul{right:0!important;left:auto!important}"]],data:{}});function J(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"cd-view-cache",[],null,null,null,i.b,i.a)),t["ɵdid"](1,114688,null,0,u.a,[],{status:[0,"status"]},null),(l()(),t["ɵeld"](2,0,null,null,7,"div",[["class","row"]],null,null,null,null,null)),(l()(),t["ɵeld"](3,0,null,null,6,"div",[["class","col-md-12"]],null,null,null,null,null)),(l()(),t["ɵeld"](4,0,null,null,3,"span",[],null,null,null,null,null)),(l()(),t["ɵeld"](5,0,null,null,1,"strong",[],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Site Name:"])),(l()(),t["ɵted"](7,null,[" ",""])),(l()(),t["ɵeld"](8,0,null,null,1,"cd-table-actions",[["class","table-actions float-right"]],null,null,null,s.b,s.a)),t["ɵdid"](9,114688,null,0,a.a,[],{permission:[0,"permission"],selection:[1,"selection"],tableActions:[2,"tableActions"]},null),(l()(),t["ɵeld"](10,0,null,null,10,"div",[["class","row"]],null,null,null,null,null)),(l()(),t["ɵeld"](11,0,null,null,4,"div",[["class","col-sm-6"]],null,null,null,null,null)),(l()(),t["ɵeld"](12,0,null,null,1,"legend",[],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Daemons"])),(l()(),t["ɵeld"](14,0,null,null,1,"cd-mirroring-daemons",[],null,null,null,b,f)),t["ɵdid"](15,245760,null,0,h,[m.a,p.a,g.a],null,null),(l()(),t["ɵeld"](16,0,null,null,4,"div",[["class","col-sm-6"]],null,null,null,null,null)),(l()(),t["ɵeld"](17,0,null,null,1,"legend",[],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Pools"])),(l()(),t["ɵeld"](19,0,null,null,1,"cd-mirroring-pools",[],null,null,null,D,V)),t["ɵdid"](20,245760,null,0,N,[w.a,m.a,F.b,k.a,g.a],null,null),(l()(),t["ɵeld"](21,0,null,null,5,"div",[["class","row"]],null,null,null,null,null)),(l()(),t["ɵeld"](22,0,null,null,4,"div",[["class","col-md-12"]],null,null,null,null,null)),(l()(),t["ɵeld"](23,0,null,null,1,"legend",[],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Images"])),(l()(),t["ɵeld"](25,0,null,null,1,"cd-mirroring-images",[],null,null,null,z,A)),t["ɵdid"](26,245760,null,0,O,[m.a,g.a],null,null)],(function(l,n){var e=n.component;l(n,1,0,e.status),l(n,9,0,e.permission,e.selection,e.tableActions),l(n,15,0),l(n,20,0),l(n,26,0)}),(function(l,n){l(n,7,0,n.component.siteName)}))}function Y(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"cd-mirroring",[],null,null,null,J,W)),t["ɵdid"](1,245760,null,0,X.a,[w.a,m.a,F.b,g.a],null,null)],(function(l,n){l(n,1,0)}),null)}var K=t["ɵccf"]("cd-mirroring",X.a,Y,{},{},[])},Sofw:function(l,n,e){"use strict";e.d(n,"a",(function(){return a}));var t=e("s7LF"),i=(e("my5R"),e("mtw6")),u=e("QFaf"),s=e("1Ni5");e("aexS"),e("9nlD");class a{constructor(l,n,e,t,i){this.authStorageService=l,this.bsModalRef=n,this.iscsiService=e,this.notificationService=t,this.i18n=i,this.USER_REGEX=/^[\w\.:@_-]{8,64}$/,this.PASSWORD_REGEX=/^[\w@\-_\/]{12,16}$/,this.permission=this.authStorageService.getPermissions().iscsi}ngOnInit(){this.hasPermission=this.permission.update,this.createForm(),this.iscsiService.getDiscovery().subscribe(l=>{this.discoveryForm.patchValue(l)})}createForm(){this.discoveryForm=new u.a({user:new t.i({value:"",disabled:!this.hasPermission}),password:new t.i({value:"",disabled:!this.hasPermission}),mutual_user:new t.i({value:"",disabled:!this.hasPermission}),mutual_password:new t.i({value:"",disabled:!this.hasPermission})}),s.a.validateIf(this.discoveryForm.get("user"),()=>this.discoveryForm.getValue("password")||this.discoveryForm.getValue("mutual_user")||this.discoveryForm.getValue("mutual_password"),[t.B.required],[t.B.pattern(this.USER_REGEX)],[this.discoveryForm.get("password"),this.discoveryForm.get("mutual_user"),this.discoveryForm.get("mutual_password")]),s.a.validateIf(this.discoveryForm.get("password"),()=>this.discoveryForm.getValue("user")||this.discoveryForm.getValue("mutual_user")||this.discoveryForm.getValue("mutual_password"),[t.B.required],[t.B.pattern(this.PASSWORD_REGEX)],[this.discoveryForm.get("user"),this.discoveryForm.get("mutual_user"),this.discoveryForm.get("mutual_password")]),s.a.validateIf(this.discoveryForm.get("mutual_user"),()=>this.discoveryForm.getValue("mutual_password"),[t.B.required],[t.B.pattern(this.USER_REGEX)],[this.discoveryForm.get("user"),this.discoveryForm.get("password"),this.discoveryForm.get("mutual_password")]),s.a.validateIf(this.discoveryForm.get("mutual_password"),()=>this.discoveryForm.getValue("mutual_user"),[t.B.required],[t.B.pattern(this.PASSWORD_REGEX)],[this.discoveryForm.get("user"),this.discoveryForm.get("password"),this.discoveryForm.get("mutual_user")])}submitAction(){this.iscsiService.updateDiscovery(this.discoveryForm.value).subscribe(()=>{this.notificationService.show(i.a.success,this.i18n("Updated discovery authentication")),this.bsModalRef.hide()},()=>{this.discoveryForm.setErrors({cdSubmitButton:!0})})}}},SuaG:function(l,n,e){"use strict";e.d(n,"a",(function(){return c}));var t=e("s7LF"),i=e("LvDl"),u=e("GyhO"),s=e("cp0P"),a=e("vkgz"),o=e("NJ9Y"),r=(e("XED3"),e("QFaf")),d=e("kvvV");e("kn/O");class c{constructor(l,n,e){this.modalRef=l,this.rbdMirroringService=n,this.taskWrapper=e,this.pools=[],this.createForm()}createForm(){this.createBootstrapForm=new r.a({siteName:new t.i("",{validators:[t.B.required]}),pools:new t.k({},{validators:[this.validatePools()]}),token:new t.i("",{})})}ngOnInit(){this.createBootstrapForm.get("siteName").setValue(this.siteName),this.rbdMirroringService.getSiteName().subscribe(l=>{this.createBootstrapForm.get("siteName").setValue(l.site_name)}),this.subs=this.rbdMirroringService.subscribeSummary(l=>{this.pools=l.content_data.pools.reduce((l,n)=>(l.push({name:n.name,mirror_mode:n.mirror_mode}),l),[]);const n=this.createBootstrapForm.get("pools");i.each(this.pools,l=>{const e=l.name,i="disabled"===l.mirror_mode,u=n.controls[e];u?i&&u.disabled?u.enable():!i&&u.enabled&&(u.disable(),u.setValue(!0)):n.addControl(e,new t.i({value:!i,disabled:!i}))})})}ngOnDestroy(){this.subs&&this.subs.unsubscribe()}validatePools(){return l=>{let n=0;return i.each(l.controls,l=>{!0===l.value&&++n}),n>0?null:{requirePool:!0}}}generate(){this.createBootstrapForm.get("token").setValue("");let l="";const n=[],e=this.createBootstrapForm.get("pools");i.each(e.controls,(e,t)=>{!0===e.value&&(l=t,e.disabled||n.push(t))});const t={mirror_mode:"image"},r=Object(u.a)(this.rbdMirroringService.setSiteName(this.createBootstrapForm.getValue("siteName")),Object(s.a)(n.map(l=>this.rbdMirroringService.updatePool(l,t))),this.rbdMirroringService.createBootstrapToken(l).pipe(Object(a.a)(l=>this.createBootstrapForm.get("token").setValue(l.token)))).pipe(Object(o.a)()),c=()=>{this.rbdMirroringService.refresh(),this.createBootstrapForm.setErrors({cdSubmitButton:!0})};this.taskWrapper.wrapTaskAroundCall({task:new d.a("rbd/mirroring/bootstrap/create",{}),call:r}).subscribe(void 0,c,c)}}},VBM6:function(l,n,e){"use strict";var t=e("8Y7J"),i=e("EEJc"),u=e("ajRT"),s=e("SVse"),a=e("s7LF"),o=e("+gVj"),r=e("mXUL"),d=e("IZUe"),c=e("ANnk"),m=e("f/UV"),p=e("aexS"),h=e("gp3X"),g=e("sb0X"),f=e("KVJa"),v=e("Z21x"),b=e("sne2"),C=e("L4us"),S=e("LqlI"),_=e("XED3"),R=e("kn/O");e.d(n,"a",(function(){return B}));var y=t["ɵcrt"]({encapsulation:0,styles:[[""]],data:{}});function w(l){return t["ɵvid"](0,[(l()(),t["ɵted"](-1,null,["Edit"]))],null,null)}function k(l){return t["ɵvid"](0,[(l()(),t["ɵted"](-1,null,["Add"]))],null,null)}function I(l){return t["ɵvid"](0,[(l()(),t["ɵted"](-1,null,["Edit"]))],null,null)}function E(l){return t["ɵvid"](0,[(l()(),t["ɵted"](-1,null,["Add"]))],null,null)}function N(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"span",[["class","invalid-feedback"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["This field is required."]))],null,null)}function F(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"span",[["class","invalid-feedback"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["The cluster name is not valid."]))],null,null)}function V(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"span",[["class","invalid-feedback"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["This field is required."]))],null,null)}function T(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"span",[["class","invalid-feedback"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["The CephX ID is not valid."]))],null,null)}function D(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"span",[["class","invalid-feedback"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["The monitory address is not valid."]))],null,null)}function P(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"span",[["class","invalid-feedback"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["CephX key must be base64 encoded."]))],null,null)}function x(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,110,"cd-modal",[],null,null,null,i.c,i.b)),t["ɵdid"](1,49152,null,0,u.a,[],{modalRef:[0,"modalRef"]},null),(l()(),t["ɵeld"](2,0,null,0,7,null,null,null,null,null,null,null)),(l()(),t["ɵeld"](3,0,null,null,5,null,null,null,null,null,null,null)),t["ɵdid"](4,16384,null,0,s.NgSwitch,[],{ngSwitch:[0,"ngSwitch"]},null),(l()(),t["ɵand"](16777216,null,null,1,null,w)),t["ɵdid"](6,278528,null,0,s.NgSwitchCase,[t.ViewContainerRef,t.TemplateRef,s.NgSwitch],{ngSwitchCase:[0,"ngSwitchCase"]},null),(l()(),t["ɵand"](16777216,null,null,1,null,k)),t["ɵdid"](8,16384,null,0,s.NgSwitchDefault,[t.ViewContainerRef,t.TemplateRef,s.NgSwitch],null,null),(l()(),t["ɵted"](-1,null,[" pool mirror peer"])),(l()(),t["ɵeld"](10,0,null,1,100,null,null,null,null,null,null,null)),(l()(),t["ɵeld"](11,0,null,null,99,"form",[["class","form"],["name","editPeerForm"],["novalidate",""]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"submit"],[null,"reset"]],(function(l,n,e){var i=!0;return"submit"===n&&(i=!1!==t["ɵnov"](l,13).onSubmit(e)&&i),"reset"===n&&(i=!1!==t["ɵnov"](l,13).onReset()&&i),"submit"===n&&(i=!1!==t["ɵnov"](l,16).onSubmit()&&i),i}),null,null)),t["ɵdid"](12,16384,null,0,a.G,[],null,null),t["ɵdid"](13,540672,[["formDir",4]],0,a.l,[[8,null],[8,null]],{form:[0,"form"]},null),t["ɵprd"](2048,null,a.d,null,[a.l]),t["ɵdid"](15,16384,null,0,a.s,[[4,a.d]],null,null),t["ɵdid"](16,16384,null,0,o.d,[],{formGroup:[0,"formGroup"]},null),(l()(),t["ɵeld"](17,0,null,null,86,"div",[["class","modal-body"]],null,null,null,null,null)),(l()(),t["ɵeld"](18,0,null,null,14,"p",[],null,null,null,null,null)),(l()(),t["ɵeld"](19,0,null,null,13,null,null,null,null,null,null,null)),(l()(),t["ɵeld"](20,0,null,null,5,null,null,null,null,null,null,null)),t["ɵdid"](21,16384,null,0,s.NgSwitch,[],{ngSwitch:[0,"ngSwitch"]},null),(l()(),t["ɵand"](16777216,null,null,1,null,I)),t["ɵdid"](23,278528,null,0,s.NgSwitchCase,[t.ViewContainerRef,t.TemplateRef,s.NgSwitch],{ngSwitchCase:[0,"ngSwitchCase"]},null),(l()(),t["ɵand"](16777216,null,null,1,null,E)),t["ɵdid"](25,16384,null,0,s.NgSwitchDefault,[t.ViewContainerRef,t.TemplateRef,s.NgSwitch],null,null),(l()(),t["ɵted"](-1,null,[" the pool mirror peer attributes for pool "])),(l()(),t["ɵeld"](27,0,null,null,1,"kbd",[],null,null,null,null,null)),(l()(),t["ɵted"](28,null,["",""])),(l()(),t["ɵted"](-1,null,[" and click "])),(l()(),t["ɵeld"](30,0,null,null,1,"kbd",[],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Submit"])),(l()(),t["ɵted"](-1,null,["."])),(l()(),t["ɵeld"](33,0,null,null,18,"div",[["class","form-group"]],[[2,"has-error",null],[2,"has-success",null]],null,null,r.b,r.a)),t["ɵdid"](34,1163264,null,2,o.c,[t.ElementRef,o.g],null,null),t["ɵqud"](603979776,1,{FormControlNames:1}),t["ɵqud"](603979776,2,{messagesBlock:0}),(l()(),t["ɵeld"](37,0,null,0,1,"label",[["class","col-form-label required"],["for","clusterName"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Cluster Name"])),(l()(),t["ɵeld"](39,0,null,0,8,"input",[["autofocus",""],["class","form-control"],["formControlName","clusterName"],["id","clusterName"],["name","clusterName"],["placeholder","Name..."],["type","text"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"is-valid",null],[2,"is-invalid",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],(function(l,n,e){var i=!0;return"input"===n&&(i=!1!==t["ɵnov"](l,42)._handleInput(e.target.value)&&i),"blur"===n&&(i=!1!==t["ɵnov"](l,42).onTouched()&&i),"compositionstart"===n&&(i=!1!==t["ɵnov"](l,42)._compositionStart()&&i),"compositionend"===n&&(i=!1!==t["ɵnov"](l,42)._compositionEnd(e.target.value)&&i),i}),null,null)),t["ɵdid"](40,4210688,null,0,d.a,[t.ElementRef],{autofocus:[0,"autofocus"]},null),t["ɵdid"](41,4210688,null,0,c.a,[[2,m.a],p.a,t.ElementRef],null,null),t["ɵdid"](42,16384,null,0,a.e,[t.Renderer2,t.ElementRef,[2,a.b]],null,null),t["ɵprd"](1024,null,a.p,(function(l){return[l]}),[a.e]),t["ɵdid"](44,671744,[[1,4]],0,a.j,[[3,a.d],[8,null],[8,null],[6,a.p],[2,a.E]],{name:[0,"name"]},null),t["ɵprd"](2048,null,a.q,null,[a.j]),t["ɵdid"](46,16384,null,0,a.r,[[4,a.q]],null,null),t["ɵdid"](47,16384,null,0,o.h,[[3,a.d],o.a],{formControlName:[0,"formControlName"]},null),(l()(),t["ɵand"](16777216,null,0,1,null,N)),t["ɵdid"](49,16384,null,0,s.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"]},null),(l()(),t["ɵand"](16777216,null,0,1,null,F)),t["ɵdid"](51,16384,null,0,s.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"]},null),(l()(),t["ɵeld"](52,0,null,null,17,"div",[["class","form-group"]],[[2,"has-error",null],[2,"has-success",null]],null,null,r.b,r.a)),t["ɵdid"](53,1163264,null,2,o.c,[t.ElementRef,o.g],null,null),t["ɵqud"](603979776,3,{FormControlNames:1}),t["ɵqud"](603979776,4,{messagesBlock:0}),(l()(),t["ɵeld"](56,0,null,0,1,"label",[["class","col-form-label required"],["for","clientID"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["CephX ID"])),(l()(),t["ɵeld"](58,0,null,0,7,"input",[["class","form-control"],["formControlName","clientID"],["id","clientID"],["name","clientID"],["placeholder","CephX ID..."],["type","text"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"is-valid",null],[2,"is-invalid",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],(function(l,n,e){var i=!0;return"input"===n&&(i=!1!==t["ɵnov"](l,60)._handleInput(e.target.value)&&i),"blur"===n&&(i=!1!==t["ɵnov"](l,60).onTouched()&&i),"compositionstart"===n&&(i=!1!==t["ɵnov"](l,60)._compositionStart()&&i),"compositionend"===n&&(i=!1!==t["ɵnov"](l,60)._compositionEnd(e.target.value)&&i),i}),null,null)),t["ɵdid"](59,4210688,null,0,c.a,[[2,m.a],p.a,t.ElementRef],null,null),t["ɵdid"](60,16384,null,0,a.e,[t.Renderer2,t.ElementRef,[2,a.b]],null,null),t["ɵprd"](1024,null,a.p,(function(l){return[l]}),[a.e]),t["ɵdid"](62,671744,[[3,4]],0,a.j,[[3,a.d],[8,null],[8,null],[6,a.p],[2,a.E]],{name:[0,"name"]},null),t["ɵprd"](2048,null,a.q,null,[a.j]),t["ɵdid"](64,16384,null,0,a.r,[[4,a.q]],null,null),t["ɵdid"](65,16384,null,0,o.h,[[3,a.d],o.a],{formControlName:[0,"formControlName"]},null),(l()(),t["ɵand"](16777216,null,0,1,null,V)),t["ɵdid"](67,16384,null,0,s.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"]},null),(l()(),t["ɵand"](16777216,null,0,1,null,T)),t["ɵdid"](69,16384,null,0,s.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"]},null),(l()(),t["ɵeld"](70,0,null,null,16,"div",[["class","form-group"]],[[2,"has-error",null],[2,"has-success",null]],null,null,r.b,r.a)),t["ɵdid"](71,1163264,null,2,o.c,[t.ElementRef,o.g],null,null),t["ɵqud"](603979776,5,{FormControlNames:1}),t["ɵqud"](603979776,6,{messagesBlock:0}),(l()(),t["ɵeld"](74,0,null,0,2,"label",[["class","col-form-label"],["for","monAddr"]],null,null,null,null,null)),(l()(),t["ɵeld"](75,0,null,null,1,"span",[],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Monitor Addresses"])),(l()(),t["ɵeld"](77,0,null,0,7,"input",[["class","form-control"],["formControlName","monAddr"],["id","monAddr"],["name","monAddr"],["placeholder","Comma-delimited addresses..."],["type","text"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"is-valid",null],[2,"is-invalid",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],(function(l,n,e){var i=!0;return"input"===n&&(i=!1!==t["ɵnov"](l,79)._handleInput(e.target.value)&&i),"blur"===n&&(i=!1!==t["ɵnov"](l,79).onTouched()&&i),"compositionstart"===n&&(i=!1!==t["ɵnov"](l,79)._compositionStart()&&i),"compositionend"===n&&(i=!1!==t["ɵnov"](l,79)._compositionEnd(e.target.value)&&i),i}),null,null)),t["ɵdid"](78,4210688,null,0,c.a,[[2,m.a],p.a,t.ElementRef],null,null),t["ɵdid"](79,16384,null,0,a.e,[t.Renderer2,t.ElementRef,[2,a.b]],null,null),t["ɵprd"](1024,null,a.p,(function(l){return[l]}),[a.e]),t["ɵdid"](81,671744,[[5,4]],0,a.j,[[3,a.d],[8,null],[8,null],[6,a.p],[2,a.E]],{name:[0,"name"]},null),t["ɵprd"](2048,null,a.q,null,[a.j]),t["ɵdid"](83,16384,null,0,a.r,[[4,a.q]],null,null),t["ɵdid"](84,16384,null,0,o.h,[[3,a.d],o.a],{formControlName:[0,"formControlName"]},null),(l()(),t["ɵand"](16777216,null,0,1,null,D)),t["ɵdid"](86,16384,null,0,s.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"]},null),(l()(),t["ɵeld"](87,0,null,null,16,"div",[["class","form-group"]],[[2,"has-error",null],[2,"has-success",null]],null,null,r.b,r.a)),t["ɵdid"](88,1163264,null,2,o.c,[t.ElementRef,o.g],null,null),t["ɵqud"](603979776,7,{FormControlNames:1}),t["ɵqud"](603979776,8,{messagesBlock:0}),(l()(),t["ɵeld"](91,0,null,0,2,"label",[["class","col-form-label"],["for","key"]],null,null,null,null,null)),(l()(),t["ɵeld"](92,0,null,null,1,"span",[],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["CephX Key"])),(l()(),t["ɵeld"](94,0,null,0,7,"input",[["class","form-control"],["formControlName","key"],["id","key"],["name","key"],["placeholder","Base64-encoded key..."],["type","text"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"is-valid",null],[2,"is-invalid",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],(function(l,n,e){var i=!0;return"input"===n&&(i=!1!==t["ɵnov"](l,96)._handleInput(e.target.value)&&i),"blur"===n&&(i=!1!==t["ɵnov"](l,96).onTouched()&&i),"compositionstart"===n&&(i=!1!==t["ɵnov"](l,96)._compositionStart()&&i),"compositionend"===n&&(i=!1!==t["ɵnov"](l,96)._compositionEnd(e.target.value)&&i),i}),null,null)),t["ɵdid"](95,4210688,null,0,c.a,[[2,m.a],p.a,t.ElementRef],null,null),t["ɵdid"](96,16384,null,0,a.e,[t.Renderer2,t.ElementRef,[2,a.b]],null,null),t["ɵprd"](1024,null,a.p,(function(l){return[l]}),[a.e]),t["ɵdid"](98,671744,[[7,4]],0,a.j,[[3,a.d],[8,null],[8,null],[6,a.p],[2,a.E]],{name:[0,"name"]},null),t["ɵprd"](2048,null,a.q,null,[a.j]),t["ɵdid"](100,16384,null,0,a.r,[[4,a.q]],null,null),t["ɵdid"](101,16384,null,0,o.h,[[3,a.d],o.a],{formControlName:[0,"formControlName"]},null),(l()(),t["ɵand"](16777216,null,0,1,null,P)),t["ɵdid"](103,16384,null,0,s.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"]},null),(l()(),t["ɵeld"](104,0,null,null,6,"div",[["class","modal-footer"]],null,null,null,null,null)),(l()(),t["ɵeld"](105,0,null,null,5,"div",[["class","button-group text-right"]],null,null,null,null,null)),(l()(),t["ɵeld"](106,0,null,null,2,"cd-submit-button",[],null,[[null,"submitAction"]],(function(l,n,e){var t=!0;return"submitAction"===n&&(t=!1!==l.component.update()&&t),t}),h.b,h.a)),t["ɵdid"](107,114688,null,0,g.a,[t.ElementRef],{form:[0,"form"]},{submitAction:"submitAction"}),(l()(),t["ɵted"](-1,0,["Submit"])),(l()(),t["ɵeld"](109,0,null,null,1,"cd-back-button",[["name","Cancel"]],null,null,null,f.b,f.a)),t["ɵdid"](110,49152,null,0,v.a,[s.Location,b.b],{name:[0,"name"],back:[1,"back"]},null)],(function(l,n){var e=n.component;l(n,1,0,e.modalRef),l(n,4,0,e.mode),l(n,6,0,"edit"),l(n,13,0,e.editPeerForm),l(n,16,0,e.editPeerForm),l(n,21,0,e.mode),l(n,23,0,"edit"),l(n,34,0),l(n,40,0,""),l(n,44,0,"clusterName"),l(n,47,0,"clusterName"),l(n,49,0,e.editPeerForm.showError("clusterName",t["ɵnov"](n,13),"required")),l(n,51,0,e.editPeerForm.showError("clusterName",t["ɵnov"](n,13),"invalidClusterName")),l(n,53,0),l(n,62,0,"clientID"),l(n,65,0,"clientID"),l(n,67,0,e.editPeerForm.showError("clientID",t["ɵnov"](n,13),"required")),l(n,69,0,e.editPeerForm.showError("clientID",t["ɵnov"](n,13),"invalidClientID")),l(n,71,0),l(n,81,0,"monAddr"),l(n,84,0,"monAddr"),l(n,86,0,e.editPeerForm.showError("monAddr",t["ɵnov"](n,13),"invalidMonAddr")),l(n,88,0),l(n,98,0,"key"),l(n,101,0,"key"),l(n,103,0,e.editPeerForm.showError("key",t["ɵnov"](n,13),"invalidKey")),l(n,107,0,e.editPeerForm),l(n,110,0,"Cancel",e.modalRef.hide)}),(function(l,n){var e=n.component;l(n,11,0,t["ɵnov"](n,15).ngClassUntouched,t["ɵnov"](n,15).ngClassTouched,t["ɵnov"](n,15).ngClassPristine,t["ɵnov"](n,15).ngClassDirty,t["ɵnov"](n,15).ngClassValid,t["ɵnov"](n,15).ngClassInvalid,t["ɵnov"](n,15).ngClassPending),l(n,28,0,e.poolName),l(n,33,0,t["ɵnov"](n,34).hasErrors,t["ɵnov"](n,34).hasSuccess),l(n,39,0,t["ɵnov"](n,46).ngClassUntouched,t["ɵnov"](n,46).ngClassTouched,t["ɵnov"](n,46).ngClassPristine,t["ɵnov"](n,46).ngClassDirty,t["ɵnov"](n,46).ngClassValid,t["ɵnov"](n,46).ngClassInvalid,t["ɵnov"](n,46).ngClassPending,t["ɵnov"](n,47).validClass,t["ɵnov"](n,47).invalidClass),l(n,52,0,t["ɵnov"](n,53).hasErrors,t["ɵnov"](n,53).hasSuccess),l(n,58,0,t["ɵnov"](n,64).ngClassUntouched,t["ɵnov"](n,64).ngClassTouched,t["ɵnov"](n,64).ngClassPristine,t["ɵnov"](n,64).ngClassDirty,t["ɵnov"](n,64).ngClassValid,t["ɵnov"](n,64).ngClassInvalid,t["ɵnov"](n,64).ngClassPending,t["ɵnov"](n,65).validClass,t["ɵnov"](n,65).invalidClass),l(n,70,0,t["ɵnov"](n,71).hasErrors,t["ɵnov"](n,71).hasSuccess),l(n,77,0,t["ɵnov"](n,83).ngClassUntouched,t["ɵnov"](n,83).ngClassTouched,t["ɵnov"](n,83).ngClassPristine,t["ɵnov"](n,83).ngClassDirty,t["ɵnov"](n,83).ngClassValid,t["ɵnov"](n,83).ngClassInvalid,t["ɵnov"](n,83).ngClassPending,t["ɵnov"](n,84).validClass,t["ɵnov"](n,84).invalidClass),l(n,87,0,t["ɵnov"](n,88).hasErrors,t["ɵnov"](n,88).hasSuccess),l(n,94,0,t["ɵnov"](n,100).ngClassUntouched,t["ɵnov"](n,100).ngClassTouched,t["ɵnov"](n,100).ngClassPristine,t["ɵnov"](n,100).ngClassDirty,t["ɵnov"](n,100).ngClassValid,t["ɵnov"](n,100).ngClassInvalid,t["ɵnov"](n,100).ngClassPending,t["ɵnov"](n,101).validClass,t["ɵnov"](n,101).invalidClass)}))}function q(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"cd-pool-edit-peer-modal",[],null,null,null,x,y)),t["ɵdid"](1,114688,null,0,C.a,[S.a,_.a,R.a],null,null)],(function(l,n){l(n,1,0)}),null)}var B=t["ɵccf"]("cd-pool-edit-peer-modal",C.a,q,{},{},[])},WkyA:function(l,n,e){"use strict";e.d(n,"a",(function(){return t}));class t{constructor(){}}},WxU5:function(l,n,e){"use strict";e.d(n,"a",(function(){return i})),e("Ekvf"),e("F83c"),e("2EZI");var t=e("kvvV");e("aexS"),e("kn/O");class i{constructor(l,n,e,t,i,u){this.authStorageService=l,this.rbdService=n,this.modalRef=e,this.fb=t,this.poolService=i,this.taskWrapper=u,this.poolPermission=this.authStorageService.getPermissions().pool}createForm(){this.purgeForm=this.fb.group({poolName:""})}ngOnInit(){this.poolPermission.read&&this.poolService.list(["pool_name","application_metadata"]).then(l=>{this.pools=l.filter(l=>l.application_metadata.includes("rbd")).map(l=>l.pool_name)}),this.createForm()}purge(){const l=this.purgeForm.getValue("poolName")||"";this.taskWrapper.wrapTaskAroundCall({task:new t.a("rbd/trash/purge",{pool_name:l}),call:this.rbdService.purgeTrash(l)}).subscribe(void 0,()=>{this.purgeForm.setErrors({cdSubmitButton:!0})},()=>{this.modalRef.hide()})}}},XED3:function(l,n,e){"use strict";e.d(n,"a",(function(){return c}));var t=e("mrSG"),i=e("IheW"),u=e("2Vo4"),s=e("pLZG"),a=e("xTzq"),o=e("lOp/"),r=e("8Y7J"),d=e("pL04");let c=(()=>{let l=class{constructor(l,n){this.http=l,this.timerService=n,this.REFRESH_INTERVAL=3e4,this.summaryDataSource=new u.a(null),this.summaryData$=this.summaryDataSource.asObservable()}startPolling(){return this.timerService.get(()=>this.retrieveSummaryObservable(),this.REFRESH_INTERVAL).subscribe(this.retrieveSummaryObserver())}refresh(){return this.retrieveSummaryObservable().subscribe(this.retrieveSummaryObserver())}retrieveSummaryObservable(){return this.http.get("api/block/mirroring/summary")}retrieveSummaryObserver(){return l=>{this.summaryDataSource.next(l)}}subscribeSummary(l,n){return this.summaryData$.pipe(Object(s.a)(l=>!!l)).subscribe(l,n)}getPool(l){return this.http.get("api/block/mirroring/pool/"+l)}updatePool(l,n){return this.http.put("api/block/mirroring/pool/"+l,n,{observe:"response"})}getSiteName(){return this.http.get("api/block/mirroring/site_name")}setSiteName(l){return this.http.put("api/block/mirroring/site_name",{site_name:l},{observe:"response"})}createBootstrapToken(l){return this.http.post(`api
/block
/mirroring/pool/${l}/bootstrap
/token`,{})}importBootstrapToken(l,n,e){return this.http.post(`api/block
/mirroring/pool/${l}/bootstrap
/peer`,{direction:n,token:e},{observe:"response"})}getPeer(l,n){return this.http.get(`api/block
/mirroring/pool/${l}/peer/${n}`)}addPeer(l,n){return this.http.post(`api/block
/mirroring/pool/${l}/peer`,n,{observe:"response"})}updatePeer(l,n,e){return this.http.put(`api
/block/mirroring/pool/${l}
/peer/${n}
`,e,{observe:"response"})}deletePeer(l,n){return this.http.delete(`api
/block/mirroring/pool/${l}
/peer/${n}
`,{observe:"response"})}};return l.ngInjectableDef=r["ɵɵdefineInjectable"]({factory:function(){return new l(r["ɵɵinject"](i.c),r["ɵɵinject"](o.a))},token:l,providedIn:d.a}),t.__decorate([t.__param(0,a.b),t.__metadata("design:type",Function),t.__metadata("design:paramtypes",[String]),t.__metadata("design:returntype",void 0)],l.prototype,"setSiteName",null),t.__decorate([t.__param(1,a.b),t.__param(2,a.b),t.__metadata("design:type",Function),t.__metadata("design:paramtypes",[String,String,String]),t.__metadata("design:returntype",void 0)],l.prototype,"importBootstrapToken",null),l=t.__decorate([a.a,t.__metadata("design:paramtypes",[i.c,o.a])],l),l})()},Z4cD:function(l,n,e){"use strict";e.d(n,"a",(function(){return s}));var t=e("s7LF"),i=e("LvDl"),u=(e("my5R"),e("QFaf"));class s{constructor(l,n){this.modalRef=l,this.iscsiService=n}ngOnInit(){const l={backstore:new t.i(this.imagesSettings[this.image].backstore),lun:new t.i(this.imagesSettings[this.image].lun),wwn:new t.i(this.imagesSettings[this.image].wwn)};i.forEach(this.backstores,n=>{const e=this.imagesSettings[this.image][n]||{};i.forIn(this.disk_default_controls[n],(n,i)=>{l[i]=new t.i(e[i])})}),this.settingsForm=new u.a(l)}getDiskControlLimits(l,n){return this.disk_controls_limits?this.disk_controls_limits[l][n]:{type:"int"}}save(){const l=this.settingsForm.controls.backstore.value,n=this.settingsForm.controls.lun.value,e=this.settingsForm.controls.wwn.value,t={};i.forIn(this.settingsForm.controls,(n,e)=>{""!==n.value&&null!==n.value&&e in this.disk_default_controls[this.settingsForm.value.backstore]&&(t[e]=n.value,i.forEach(this.backstores,t=>{t!==l&&e in(this.imagesSettings[this.image][t]||{})&&(this.imagesSettings[this.image][t][e]=n.value)}))}),this.imagesSettings[this.image].backstore=l,this.imagesSettings[this.image].lun=n,this.imagesSettings[this.image].wwn=e,this.imagesSettings[this.image][l]=t,this.imagesSettings=Object.assign({},this.imagesSettings),this.control.updateValueAndValidity({emitEvent:!1}),this.modalRef.hide()}}},Z5tW:function(l,n,e){"use strict";e.d(n,"a",(function(){return r}));var t=e("cp0P"),i=(e("Ekvf"),e("F83c"),e("0+/T")),u=(e("sne2"),e("oxzT")),s=e("mtw6"),a=e("vCyI"),o=(e("aexS"),e("9nlD"),e("daK0"));class r{constructor(l,n,e,t,i,s,o){this.authStorageService=l,this.rbdService=n,this.poolService=e,this.modalService=t,this.notificationService=i,this.i18n=s,this.actionLabels=o,this.selection=new a.a,this.permission=this.authStorageService.getPermissions().rbdImage,this.tableActions=[{permission:"create",icon:u.a.add,click:()=>this.createModal(),name:this.actionLabels.CREATE},{permission:"delete",icon:u.a.destroy,click:()=>this.deleteModal(),name:this.actionLabels.DELETE,disable:()=>this.getDeleteDisableDesc()}]}ngOnInit(){this.columns=[{name:this.i18n("Namespace"),prop:"namespace",flexGrow:1},{name:this.i18n("Pool"),prop:"pool",flexGrow:1},{name:this.i18n("Total images"),prop:"num_images",flexGrow:1}],this.refresh()}refresh(){this.poolService.list(["pool_name","type","application_metadata"]).then(l=>{l=l.filter(l=>this.rbdService.isRBDPool(l)&&"replicated"===l.type);const n=[];l.forEach(l=>{n.push(this.rbdService.listNamespaces(l.pool_name))}),n.length>0?Object(t.a)(n).subscribe(n=>{const e=[];for(let t=0;t<n.length;t++){const i=l[t].pool_name;n[t].forEach(l=>{e.push({id:`${i}
/${l.namespace}
`,pool:i,namespace:l.namespace,num_images:l.num_images})})}this.namespaces=e}):this.namespaces=[]})}updateSelection(l){this.selection=l}createModal(){this.modalRef=this.modalService.show(o.a),this.modalRef.content.onSubmit.subscribe(()=>{this.refresh()})}deleteModal(){const l=this.selection.first().pool,n=this.selection.first().namespace;this.modalRef=this.modalService.show(i.a,{initialState:{itemDescription:"Namespace",itemNames:[`${l}
/${n}`],submitAction:()=>this.rbdService.deleteNamespace(l,n).subscribe(()=>{this.notificationService.show(s.a.success,this.i18n("Deleted namespace '{{pool}}/{{namespace}}'",{pool:l,namespace:n})),this.modalRef.hide(),this.refresh()},()=>{this.modalRef.content.stopLoadingSpinner()})}})}getDeleteDisableDesc(){const l=this.selection.first();return!l||l.num_images>0&&this.i18n("Namespace contains images")}}},a6qe:function(l,n,e){"use strict";e.d(n,"a",(function(){return s}));var t=e("s7LF"),i=e("LvDl"),u=(e("my5R"),e("QFaf"));class s{constructor(l,n){this.modalRef=l,this.iscsiService=n}ngOnInit(){const l={};i.forIn(this.target_default_controls,(n,e)=>{l[e]=new t.i(this.target_controls.value[e])}),this.settingsForm=new u.a(l)}save(){const l={};i.forIn(this.settingsForm.controls,(n,e)=>{""!==n.value&&null!==n.value&&(l[e]=n.value)}),this.target_controls.setValue(l),this.modalRef.hide()}getTargetControlLimits(l){return this.target_controls_limits?this.target_controls_limits[l]:["Yes","No"].includes(this.target_default_controls[l])?{type:"bool"}:{type:"int"}}}},aAWM:function(l,n,e){"use strict";e("uIqm");var t=e("PhyI");class i{transform(l){return{0:"global",1:"pool",2:"image"}[l]}}e("aXbf"),e("o8EM"),e.d(n,"a",(function(){return u}));class u{constructor(l,n,e){this.formatterService=l,this.rbdConfigurationService=n,this.i18n=e,this.sourceField=t.a,this.typeField=t.b}ngOnInit(){this.poolConfigurationColumns=[{prop:"displayName",name:this.i18n("Name")},{prop:"description",name:this.i18n("Description")},{prop:"name",name:this.i18n("Key")},{prop:"source",name:this.i18n("Source"),cellTemplate:this.configurationSourceTpl,pipe:new i},{prop:"value",name:this.i18n("Value"),cellTemplate:this.configurationValueTpl}]}ngOnChanges(){this.data&&(this.data=this.data.filter(l=>this.rbdConfigurationService.getOptionFields().map(l=>l.name).includes(l.name)))}}},aa9H:function(l,n,e){"use strict";var t=e("s7LF"),i=(e("XED3"),e("QFaf")),u=e("kvvV");e("kn/O");class s{}e.d(n,"a",(function(){return a}));class a{constructor(l,n,e,t){this.modalRef=l,this.i18n=n,this.rbdMirroringService=e,this.taskWrapper=t,this.bsConfig={containerClass:"theme-default"},this.peerExists=!1,this.mirrorModes=[{id:"disabled",name:this.i18n("Disabled")},{id:"pool",name:this.i18n("Pool")},{id:"image",name:this.i18n("Image")}],this.createForm()}createForm(){this.editModeForm=new i.a({mirrorMode:new t.i("",{validators:[t.B.required,this.validateMode.bind(this)]})})}ngOnInit(){this.pattern=""+this.poolName,this.rbdMirroringService.getPool(this.poolName).subscribe(l=>{this.setResponse(l)}),this.subs=this.rbdMirroringService.subscribeSummary(l=>{this.peerExists=!1;const n=l.content_data.pools.find(l=>this.poolName===l.name);this.peerExists=n&&n.peer_uuids.length})}ngOnDestroy(){this.subs.unsubscribe()}validateMode(l){return"disabled"===l.value&&this.peerExists?{cannotDisable:{value:l.value}}:null}setResponse(l){this.editModeForm.get("mirrorMode").setValue(l.mirror_mode)}update(){const l=new s;l.mirror_mode=this.editModeForm.getValue("mirrorMode"),this.taskWrapper.wrapTaskAroundCall({task:new u.a("rbd/mirroring/pool/edit",{pool_name:this.poolName}),call:this.rbdMirroringService.updatePool(this.poolName,l)}).subscribe(void 0,()=>this.editModeForm.setErrors({cdSubmitButton:!0}),()=>{this.rbdMirroringService.refresh(),this.modalRef.hide()})}}},bUo2:function(l,n,e){"use strict";var t=e("8Y7J"),i=e("gp3X"),u=e("sb0X"),s=e("EEJc"),a=e("ajRT"),o=e("s7LF"),r=e("+gVj"),d=e("mXUL"),c=e("ANnk"),m=e("f/UV"),p=e("aexS"),h=e("SVse"),g=e("D4zM"),f=e("OcYo"),v=e("EApP"),b=e("GiVz"),C=e("KVJa"),S=e("Z21x"),_=e("sne2"),R=e("Sofw"),y=e("LqlI"),w=e("my5R"),k=e("9nlD");e.d(n,"a",(function(){return A}));var I=t["ɵcrt"]({encapsulation:0,styles:[[""]],data:{}});function E(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"span",[["class","invalid-feedback"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["This field is required."]))],null,null)}function N(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"span",[["class","invalid-feedback"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["User names must have a length of 8 to 64 characters and can contain alphanumeric characters, '.', '@', '-', '_
' or ':'."]))],null,null)}function F(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"span",[["class","invalid-feedback"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["This field is required."]))],null,null)}function V(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"span",[["class","invalid-feedback"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Passwords must have a length of 12 to 16 characters and can contain alphanumeric characters, '@', '-', '_
' or '/'."]))],null,null)}function T(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"span",[["class","invalid-feedback"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["This field is required."]))],null,null)}function D(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"span",[["class","invalid-feedback"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["User names must have a length of 8 to 64 characters and can contain alphanumeric characters, '.', '@', '-', '_
' or ':'."]))],null,null)}function P(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"span",[["class","invalid-feedback"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["This field is required."]))],null,null)}function x(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"span",[["class","invalid-feedback"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Passwords must have a length of 12 to 16 characters and can contain alphanumeric characters, '@', '-', '_
' or '/'."]))],null,null)}function q(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,2,"cd-submit-button",[],null,[[null,"submitAction"]],(function(l,n,e){var t=!0;return"submitAction"===n&&(t=!1!==l.component.submitAction()&&t),t}),i.b,i.a)),t["ɵdid"](1,114688,null,0,u.a,[t.ElementRef],{form:[0,"form"]},{submitAction:"submitAction"}),(l()(),t["ɵted"](-1,0,["Submit"]))],(function(l,n){l(n,1,0,n.component.discoveryForm)}),null)}function B(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,106,"cd-modal",[],null,null,null,s.c,s.b)),t["ɵdid"](1,49152,null,0,a.a,[],{modalRef:[0,"modalRef"]},null),(l()(),t["ɵeld"](2,0,null,0,1,null,null,null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Discovery Authentication"])),(l()(),t["ɵeld"](4,0,null,1,102,null,null,null,null,null,null,null)),(l()(),t["ɵeld"](5,0,null,null,101,"form",[["name","discoveryForm"],["novalidate",""]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"submit"],[null,"reset"]],(function(l,n,e){var i=!0;return"submit"===n&&(i=!1!==t["ɵnov"](l,7).onSubmit(e)&&i),"reset"===n&&(i=!1!==t["ɵnov"](l,7).onReset()&&i),"submit"===n&&(i=!1!==t["ɵnov"](l,10).onSubmit()&&i),i}),null,null)),t["ɵdid"](6,16384,null,0,o.G,[],null,null),t["ɵdid"](7,540672,[["formDir",4]],0,o.l,[[8,null],[8,null]],{form:[0,"form"]},null),t["ɵprd"](2048,null,o.d,null,[o.l]),t["ɵdid"](9,16384,null,0,o.s,[[4,o.d]],null,null),t["ɵdid"](10,16384,null,0,r.d,[],{formGroup:[0,"formGroup"]},null),(l()(),t["ɵeld"](11,0,null,null,89,"div",[["class","modal-body"]],null,null,null,null,null)),(l()(),t["ɵeld"](12,0,null,null,18,"div",[["class","form-group row"]],[[2,"has-error",null],[2,"has-success",null]],null,null,d.b,d.a)),t["ɵdid"](13,1163264,null,2,r.c,[t.ElementRef,r.g],null,null),t["ɵqud"](603979776,1,{FormControlNames:1}),t["ɵqud"](603979776,2,{messagesBlock:0}),(l()(),t["ɵeld"](16,0,null,0,1,"label",[["class","cd-col-form-label"],["for","user"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["User"])),(l()(),t["ɵeld"](18,0,null,0,12,"div",[["class","cd-col-form-input"]],null,null,null,null,null)),(l()(),t["ɵeld"](19,0,null,null,7,"input",[["autocomplete","off"],["class","form-control"],["formControlName","user"],["id","user"],["type","text"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"is-valid",null],[2,"is-invalid",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],(function(l,n,e){var i=!0;return"input"===n&&(i=!1!==t["ɵnov"](l,20)._handleInput(e.target.value)&&i),"blur"===n&&(i=!1!==t["ɵnov"](l,20).onTouched()&&i),"compositionstart"===n&&(i=!1!==t["ɵnov"](l,20)._compositionStart()&&i),"compositionend"===n&&(i=!1!==t["ɵnov"](l,20)._compositionEnd(e.target.value)&&i),i}),null,null)),t["ɵdid"](20,16384,null,0,o.e,[t.Renderer2,t.ElementRef,[2,o.b]],null,null),t["ɵprd"](1024,null,o.p,(function(l){return[l]}),[o.e]),t["ɵdid"](22,671744,[[1,4]],0,o.j,[[3,o.d],[8,null],[8,null],[6,o.p],[2,o.E]],{name:[0,"name"]},null),t["ɵprd"](2048,null,o.q,null,[o.j]),t["ɵdid"](24,16384,null,0,o.r,[[4,o.q]],null,null),t["ɵdid"](25,4210688,null,0,c.a,[[2,m.a],p.a,t.ElementRef],null,null),t["ɵdid"](26,16384,null,0,r.h,[[3,o.d],r.a],{formControlName:[0,"formControlName"]},null),(l()(),t["ɵand"](16777216,null,null,1,null,E)),t["ɵdid"](28,16384,null,0,h.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"]},null),(l()(),t["ɵand"](16777216,null,null,1,null,N)),t["ɵdid"](30,16384,null,0,h.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"]},null),(l()(),t["ɵeld"](31,0,null,null,24,"div",[["class","form-group row"]],[[2,"has-error",null],[2,"has-success",null]],null,null,d.b,d.a)),t["ɵdid"](32,1163264,null,2,r.c,[t.ElementRef,r.g],null,null),t["ɵqud"](603979776,3,{FormControlNames:1}),t["ɵqud"](603979776,4,{messagesBlock:0}),(l()(),t["ɵeld"](35,0,null,0,1,"label",[["class","cd-col-form-label"],["for","password"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Password"])),(l()(),t["ɵeld"](37,0,null,0,18,"div",[["class","cd-col-form-input"]],null,null,null,null,null)),(l()(),t["ɵeld"](38,0,null,null,13,"div",[["class","input-group"]],null,null,null,null,null)),(l()(),t["ɵeld"](39,0,null,null,7,"input",[["autocomplete","new-password"],["class","form-control"],["formControlName","password"],["id","password"],["type","password"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"is-valid",null],[2,"is-invalid",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],(function(l,n,e){var i=!0;return"input"===n&&(i=!1!==t["ɵnov"](l,40)._handleInput(e.target.value)&&i),"blur"===n&&(i=!1!==t["ɵnov"](l,40).onTouched()&&i),"compositionstart"===n&&(i=!1!==t["ɵnov"](l,40)._compositionStart()&&i),"compositionend"===n&&(i=!1!==t["ɵnov"](l,40)._compositionEnd(e.target.value)&&i),i}),null,null)),t["ɵdid"](40,16384,null,0,o.e,[t.Renderer2,t.ElementRef,[2,o.b]],null,null),t["ɵprd"](1024,null,o.p,(function(l){return[l]}),[o.e]),t["ɵdid"](42,671744,[[3,4]],0,o.j,[[3,o.d],[8,null],[8,null],[6,o.p],[2,o.E]],{name:[0,"name"]},null),t["ɵprd"](2048,null,o.q,null,[o.j]),t["ɵdid"](44,16384,null,0,o.r,[[4,o.q]],null,null),t["ɵdid"](45,4210688,null,0,c.a,[[2,m.a],p.a,t.ElementRef],null,null),t["ɵdid"](46,16384,null,0,r.h,[[3,o.d],r.a],{formControlName:[0,"formControlName"]},null),(l()(),t["ɵeld"](47,0,null,null,4,"span",[["class","input-group-append"]],null,null,null,null,null)),(l()(),t["ɵeld"](48,0,null,null,1,"button",[["cdPasswordButton","password"],["class","btn btn-light"],["type","button"]],null,[[null,"click"]],(function(l,n,e){var i=!0;return"click"===n&&(i=!1!==t["ɵnov"](l,49).onClick()&&i),i}),null,null)),t["ɵdid"](49,81920,null,0,g.a,[t.ElementRef,t.Renderer2],{cdPasswordButton:[0,"cdPasswordButton"]},null),(l()(),t["ɵeld"](50,0,null,null,1,"button",[["cdCopy2ClipboardButton","password"],["class","btn btn-light"],["type","button"]],null,[[null,"click"]],(function(l,n,e){var i=!0;return"click"===n&&(i=!1!==t["ɵnov"](l,51).onClick()&&i),i}),null,null)),t["ɵdid"](51,81920,null,0,f.a,[t.ElementRef,t.Renderer2,v.j,b.a],{cdCopy2ClipboardButton:[0,"cdCopy2ClipboardButton"]},null),(l()(),t["ɵand"](16777216,null,null,1,null,F)),t["ɵdid"](53,16384,null,0,h.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"]},null),(l()(),t["ɵand"](16777216,null,null,1,null,V)),t["ɵdid"](55,16384,null,0,h.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"]},null),(l()(),t["ɵeld"](56,0,null,null,19,"div",[["class","form-group row"]],[[2,"has-error",null],[2,"has-success",null]],null,null,d.b,d.a)),t["ɵdid"](57,1163264,null,2,r.c,[t.ElementRef,r.g],null,null),t["ɵqud"](603979776,5,{FormControlNames:1}),t["ɵqud"](603979776,6,{messagesBlock:0}),(l()(),t["ɵeld"](60,0,null,0,2,"label",[["class","cd-col-form-label"],["for","mutual_user"]],null,null,null,null,null)),(l()(),t["ɵeld"](61,0,null,null,1,null,null,null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Mutual User"])),(l()(),t["ɵeld"](63,0,null,0,12,"div",[["class","cd-col-form-input"]],null,null,null,null,null)),(l()(),t["ɵeld"](64,0,null,null,7,"input",[["autocomplete","off"],["class","form-control"],["formControlName","mutual_user"],["id","mutual_user"],["type","text"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"is-valid",null],[2,"is-invalid",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],(function(l,n,e){var i=!0;return"input"===n&&(i=!1!==t["ɵnov"](l,65)._handleInput(e.target.value)&&i),"blur"===n&&(i=!1!==t["ɵnov"](l,65).onTouched()&&i),"compositionstart"===n&&(i=!1!==t["ɵnov"](l,65)._compositionStart()&&i),"compositionend"===n&&(i=!1!==t["ɵnov"](l,65)._compositionEnd(e.target.value)&&i),i}),null,null)),t["ɵdid"](65,16384,null,0,o.e,[t.Renderer2,t.ElementRef,[2,o.b]],null,null),t["ɵprd"](1024,null,o.p,(function(l){return[l]}),[o.e]),t["ɵdid"](67,671744,[[5,4]],0,o.j,[[3,o.d],[8,null],[8,null],[6,o.p],[2,o.E]],{name:[0,"name"]},null),t["ɵprd"](2048,null,o.q,null,[o.j]),t["ɵdid"](69,16384,null,0,o.r,[[4,o.q]],null,null),t["ɵdid"](70,4210688,null,0,c.a,[[2,m.a],p.a,t.ElementRef],null,null),t["ɵdid"](71,16384,null,0,r.h,[[3,o.d],r.a],{formControlName:[0,"formControlName"]},null),(l()(),t["ɵand"](16777216,null,null,1,null,T)),t["ɵdid"](73,16384,null,0,h.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"]},null),(l()(),t["ɵand"](16777216,null,null,1,null,D)),t["ɵdid"](75,16384,null,0,h.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"]},null),(l()(),t["ɵeld"](76,0,null,null,24,"div",[["class","form-group row"]],[[2,"has-error",null],[2,"has-success",null]],null,null,d.b,d.a)),t["ɵdid"](77,1163264,null,2,r.c,[t.ElementRef,r.g],null,null),t["ɵqud"](603979776,7,{FormControlNames:1}),t["ɵqud"](603979776,8,{messagesBlock:0}),(l()(),t["ɵeld"](80,0,null,0,1,"label",[["class","cd-col-form-label"],["for","mutual_password"]],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Mutual Password"])),(l()(),t["ɵeld"](82,0,null,0,18,"div",[["class","cd-col-form-input"]],null,null,null,null,null)),(l()(),t["ɵeld"](83,0,null,null,13,"div",[["class","input-group"]],null,null,null,null,null)),(l()(),t["ɵeld"](84,0,null,null,7,"input",[["autocomplete","new-password"],["class","form-control"],["formControlName","mutual_password"],["id","mutual_password"],["type","password"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"is-valid",null],[2,"is-invalid",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],(function(l,n,e){var i=!0;return"input"===n&&(i=!1!==t["ɵnov"](l,85)._handleInput(e.target.value)&&i),"blur"===n&&(i=!1!==t["ɵnov"](l,85).onTouched()&&i),"compositionstart"===n&&(i=!1!==t["ɵnov"](l,85)._compositionStart()&&i),"compositionend"===n&&(i=!1!==t["ɵnov"](l,85)._compositionEnd(e.target.value)&&i),i}),null,null)),t["ɵdid"](85,16384,null,0,o.e,[t.Renderer2,t.ElementRef,[2,o.b]],null,null),t["ɵprd"](1024,null,o.p,(function(l){return[l]}),[o.e]),t["ɵdid"](87,671744,[[7,4]],0,o.j,[[3,o.d],[8,null],[8,null],[6,o.p],[2,o.E]],{name:[0,"name"]},null),t["ɵprd"](2048,null,o.q,null,[o.j]),t["ɵdid"](89,16384,null,0,o.r,[[4,o.q]],null,null),t["ɵdid"](90,4210688,null,0,c.a,[[2,m.a],p.a,t.ElementRef],null,null),t["ɵdid"](91,16384,null,0,r.h,[[3,o.d],r.a],{formControlName:[0,"formControlName"]},null),(l()(),t["ɵeld"](92,0,null,null,4,"span",[["class","input-group-append"]],null,null,null,null,null)),(l()(),t["ɵeld"](93,0,null,null,1,"button",[["cdPasswordButton","mutual_password"],["class","btn btn-light"],["type","button"]],null,[[null,"click"]],(function(l,n,e){var i=!0;return"click"===n&&(i=!1!==t["ɵnov"](l,94).onClick()&&i),i}),null,null)),t["ɵdid"](94,81920,null,0,g.a,[t.ElementRef,t.Renderer2],{cdPasswordButton:[0,"cdPasswordButton"]},null),(l()(),t["ɵeld"](95,0,null,null,1,"button",[["cdCopy2ClipboardButton","mutual_password"],["class","btn btn-light"],["type","button"]],null,[[null,"click"]],(function(l,n,e){var i=!0;return"click"===n&&(i=!1!==t["ɵnov"](l,96).onClick()&&i),i}),null,null)),t["ɵdid"](96,81920,null,0,f.a,[t.ElementRef,t.Renderer2,v.j,b.a],{cdCopy2ClipboardButton:[0,"cdCopy2ClipboardButton"]},null),(l()(),t["ɵand"](16777216,null,null,1,null,P)),t["ɵdid"](98,16384,null,0,h.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"]},null),(l()(),t["ɵand"](16777216,null,null,1,null,x)),t["ɵdid"](100,16384,null,0,h.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"]},null),(l()(),t["ɵeld"](101,0,null,null,5,"div",[["class","modal-footer"]],null,null,null,null,null)),(l()(),t["ɵeld"](102,0,null,null,4,"div",[["class","button-group text-right"]],null,null,null,null,null)),(l()(),t["ɵand"](16777216,null,null,1,null,q)),t["ɵdid"](104,16384,null,0,h.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"]},null),(l()(),t["ɵeld"](105,0,null,null,1,"cd-back-button",[["name","Cancel"]],null,null,null,C.b,C.a)),t["ɵdid"](106,49152,null,0,S.a,[h.Location,_.b],{name:[0,"name"],back:[1,"back"]},null)],(function(l,n){var e=n.component;l(n,1,0,e.bsModalRef),l(n,7,0,e.discoveryForm),l(n,10,0,e.discoveryForm),l(n,13,0),l(n,22,0,"user"),l(n,26,0,"user"),l(n,28,0,e.discoveryForm.showError("user",t["ɵnov"](n,7),"required")),l(n,30,0,e.discoveryForm.showError("user",t["ɵnov"](n,7),"pattern")),l(n,32,0),l(n,42,0,"password"),l(n,46,0,"password"),l(n,49,0,"password"),l(n,51,0,"password"),l(n,53,0,e.discoveryForm.showError("password",t["ɵnov"](n,7),"required")),l(n,55,0,e.discoveryForm.showError("password",t["ɵnov"](n,7),"pattern")),l(n,57,0),l(n,67,0,"mutual_user"),l(n,71,0,"mutual_user"),l(n,73,0,e.discoveryForm.showError("mutual_user",t["ɵnov"](n,7),"required")),l(n,75,0,e.discoveryForm.showError("mutual_user",t["ɵnov"](n,7),"pattern")),l(n,77,0),l(n,87,0,"mutual_password"),l(n,91,0,"mutual_password"),l(n,94,0,"mutual_password"),l(n,96,0,"mutual_password"),l(n,98,0,e.discoveryForm.showError("mutual_password",t["ɵnov"](n,7),"required")),l(n,100,0,e.discoveryForm.showError("mutual_password",t["ɵnov"](n,7),"pattern")),l(n,104,0,e.hasPermission),l(n,106,0,"Cancel",e.bsModalRef.hide)}),(function(l,n){l(n,5,0,t["ɵnov"](n,9).ngClassUntouched,t["ɵnov"](n,9).ngClassTouched,t["ɵnov"](n,9).ngClassPristine,t["ɵnov"](n,9).ngClassDirty,t["ɵnov"](n,9).ngClassValid,t["ɵnov"](n,9).ngClassInvalid,t["ɵnov"](n,9).ngClassPending),l(n,12,0,t["ɵnov"](n,13).hasErrors,t["ɵnov"](n,13).hasSuccess),l(n,19,0,t["ɵnov"](n,24).ngClassUntouched,t["ɵnov"](n,24).ngClassTouched,t["ɵnov"](n,24).ngClassPristine,t["ɵnov"](n,24).ngClassDirty,t["ɵnov"](n,24).ngClassValid,t["ɵnov"](n,24).ngClassInvalid,t["ɵnov"](n,24).ngClassPending,t["ɵnov"](n,26).validClass,t["ɵnov"](n,26).invalidClass),l(n,31,0,t["ɵnov"](n,32).hasErrors,t["ɵnov"](n,32).hasSuccess),l(n,39,0,t["ɵnov"](n,44).ngClassUntouched,t["ɵnov"](n,44).ngClassTouched,t["ɵnov"](n,44).ngClassPristine,t["ɵnov"](n,44).ngClassDirty,t["ɵnov"](n,44).ngClassValid,t["ɵnov"](n,44).ngClassInvalid,t["ɵnov"](n,44).ngClassPending,t["ɵnov"](n,46).validClass,t["ɵnov"](n,46).invalidClass),l(n,56,0,t["ɵnov"](n,57).hasErrors,t["ɵnov"](n,57).hasSuccess),l(n,64,0,t["ɵnov"](n,69).ngClassUntouched,t["ɵnov"](n,69).ngClassTouched,t["ɵnov"](n,69).ngClassPristine,t["ɵnov"](n,69).ngClassDirty,t["ɵnov"](n,69).ngClassValid,t["ɵnov"](n,69).ngClassInvalid,t["ɵnov"](n,69).ngClassPending,t["ɵnov"](n,71).validClass,t["ɵnov"](n,71).invalidClass),l(n,76,0,t["ɵnov"](n,77).hasErrors,t["ɵnov"](n,77).hasSuccess),l(n,84,0,t["ɵnov"](n,89).ngClassUntouched,t["ɵnov"](n,89).ngClassTouched,t["ɵnov"](n,89).ngClassPristine,t["ɵnov"](n,89).ngClassDirty,t["ɵnov"](n,89).ngClassValid,t["ɵnov"](n,89).ngClassInvalid,t["ɵnov"](n,89).ngClassPending,t["ɵnov"](n,91).validClass,t["ɵnov"](n,91).invalidClass)}))}function O(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"cd-iscsi-target-discovery-modal",[],null,null,null,B,I)),t["ɵdid"](1,114688,null,0,R.a,[p.a,y.a,w.a,k.a,b.a],null,null)],(function(l,n){l(n,1,0)}),null)}var A=t["ɵccf"]("cd-iscsi-target-discovery-modal",R.a,O,{},{},[])},chpi:function(l,n,e){"use strict";e.d(n,"a",(function(){return h}));var t=e("LvDl"),i=e("wd/R
"),u=(e("F83c
"),e("0+/T")),s=(e("sne2"),e("uIqm"),e("x38r")),a=e("oxzT"),o=e("yJti"),r=e("vCyI"),d=e("kvvV"),c=e("jVDg"),m=(e("a0VL"),e("aexS"),e("VTlA"),e("kn/O
"),e("WxU5
")),p=e("2GqK
");class h{constructor(l,n,e,t,i,u,s,o){this.authStorageService=l,this.rbdService=n,this.modalService=e,this.cdDatePipe=t,this.taskListService=i,this.taskWrapper=u,this.i18n=s,this.actionLabels=o,this.icons=a.a,this.executingTasks=[],this.selection=new r.a,this.disablePurgeBtn=!0,this.permission=this.authStorageService.getPermissions().rbdImage,this.tableActions=[{permission:"update
",icon:a.a.undo,click:()=>this.restoreModal(),name:this.actionLabels.RESTORE},{permission:"delete",icon:a.a.destroy,click:()=>this.deleteModal(),name:this.actionLabels.DELETE}]}ngOnInit(){this.columns=[{name:this.i18n("ID
"),prop:"id
",flexGrow:1,cellTransformation:s.a.executing},{name:this.i18n("Name
"),prop:"name
",flexGrow:1},{name:this.i18n("Pool
"),prop:"pool_name
",flexGrow:1},{name:this.i18n("Namespace
"),prop:"namespace",flexGrow:1},{name:this.i18n("Status
"),prop:"deferment_end_time
",flexGrow:1,cellTemplate:this.expiresTpl},{name:this.i18n("Deleted At
"),prop:"deletion_time
",flexGrow:1,pipe:this.cdDatePipe}],this.taskListService.init(()=>this.rbdService.listTrash(),l=>this.prepareResponse(l),l=>this.images=l,()=>this.onFetchError(),l=>["rbd
/trash/remove
","rbd
/trash/restore
"].includes(l.name),(l,n)=>new c.a(l.pool_name,l.namespace,l.id).toString()===n.metadata.image_id_spec,void 0)}prepareResponse(l){let n=[];const e={};l.forEach(l=>{t.isUndefined(e[l.status])&&(e[l.status]=[]),e[l.status].push(l.pool_name),n=n.concat(l.value),this.disablePurgeBtn=!n.length});const u=[];return t.forEach(e,(l,n)=>{u.push({status:parseInt(n,10),statusFor:(l.length>1?"pools
":"pool
")+"<strong
>"+l.join("</strong>, <strong>")+"</strong>"})}),this.viewCacheStatusList=u,n.forEach(l=>{l.cdIsExpired=i().isAfter(l.deferment_end_time)}),n}onFetchError(){this.table.reset(),this.viewCacheStatusList=[{status:o.a.ValueException}]}updateSelection(l){this.selection=l}restoreModal(){const l={poolName:this.selection.first().pool_name,namespace:this.selection.first().namespace,imageName:this.selection.first().name,imageId:this.selection.first().id};this.modalRef=this.modalService.show(p.a,{initialState:l})}deleteModal(){const l=this.selection.first().pool_name,n=this.selection.first().namespace,e=this.selection.first().id,t=this.selection.first().deferment_end_time,i=new c.a(l,n,e);this.modalRef=this.modalService.show(u.a,{initialState:{itemDescription:"RBD
",itemNames:[i],bodyTemplate:this.deleteTpl,bodyContext:{$implicit:t},submitActionObservable:()=>this.taskWrapper.wrapTaskAroundCall({task:new d.a("rbd
/trash/remove
",{image_id_spec:i.toString()}),call:this.rbdService.removeTrash(i,!0)})}})}isExpired(l){return i().isAfter(l)}purgeModal(){this.modalService.show(m.a)}}},cxJu:function(l,n,e){"use strict
";e.d(n,"a
",(function(){return r}));var t=e("quSY
"),i=(e("XED3
"),e("oxzT
")),u=e("vCyI
"),s=(e("aexS
"),e("SuaG
")),a=e("+26A
"),o=e("puGn
");class r{constructor(l,n,e,s){this.authStorageService=l,this.rbdMirroringService=n,this.modalService=e,this.i18n=s,this.selection=new u.a,this.peersExist=!0,this.subs=new t.a,this.permission=this.authStorageService.getPermissions().rbdMirroring;const a={permission:"update
",icon:i.a.edit,click:()=>this.editSiteNameModal(),name:this.i18n("Edit Site Name
"),canBePrimary:()=>!0,disable:()=>!1},o={permission:"update
",icon:i.a.upload,click:()=>this.createBootstrapModal(),name:this.i18n("Create Bootstrap Token
"),disable:()=>!1},r={permission:"update
",icon:i.a.download,click:()=>this.importBootstrapModal(),name:this.i18n("Import Bootstrap Token
"),disable:()=>this.peersExist};this.tableActions=[a,o,r]}ngOnInit(){this.subs.add(this.rbdMirroringService.startPolling()),this.subs.add(this.rbdMirroringService.subscribeSummary(l=>{this.status=l.content_data.status,this.siteName=l.site_name,this.peersExist=!!l.content_data.pools.find(l=>l.peer_uuids.length>0)}))}ngOnDestroy(){this.subs.unsubscribe()}editSiteNameModal(){this.modalRef=this.modalService.show(o.a,{initialState:{siteName:this.siteName}})}createBootstrapModal(){this.modalRef=this.modalService.show(s.a,{initialState:{siteName:this.siteName}})}importBootstrapModal(){this.modalRef=this.modalService.show(a.a,{initialState:{siteName:this.siteName}})}}},daK0:function(l,n,e){"use strict
";e.d(n,"a
",(function(){return o}));var t=e("s7LF
"),i=e("XNiG
"),u=(e("Ekvf
"),e("F83c
"),e("mtw6
")),s=e("QFaf
"),a=e("kvvV
");e("aexS
"),e("9nlD
");class o{constructor(l,n,e,t,i,u){this.modalRef=l,this.authStorageService=n,this.notificationService=e,this.poolService=t,this.rbdService=i,this.i18n=u,this.pools=null,this.editing=!1,this.poolPermission=this.authStorageService.getPermissions().pool,this.createForm()}createForm(){this.namespaceForm=new s.a({pool:new t.i(""),namespace:new t.i("")},this.validator(),this.asyncValidator())}validator(){return l=>{const n=l.get("pool
"),e=l.get("namespace");let t=null;n.value||(t={required:!0}),n.setErrors(t);let i=null;return e.value||(i={required:!0}),e.setErrors(i),null}}asyncValidator(){return l=>new Promise(n=>{const e=l.get("pool
"),t=l.get("namespace");this.rbdService.listNamespaces(e.value).subscribe(l=>{if(l.some(l=>l.namespace===t.value)){const l={namespaceExists:!0};t.setErrors(l),n(l)}else n(null)})})}ngOnInit(){this.onSubmit=new i.a,this.poolPermission.read&&this.poolService.list(["pool_name
","type
","application_metadata
"]).then(l=>{const n=[];for(const e of l)this.rbdService.isRBDPool(e)&&"replicated
"===e.type&&n.push(e);if(this.pools=n,1===this.pools.length){const l=this.pools[0].pool_name;this.namespaceForm.get("pool
").setValue(l)}})}submit(){const l=this.namespaceForm.getValue("pool
"),n=this.namespaceForm.getValue("namespace"),e=new a.a;e.name="rbd
/namespace/create",e.metadata={pool:l,namespace:n},this.rbdService.createNamespace(l,n).toPromise().then(()=>{this.notificationService.show(u.a.success,this.i18n("Created
namespace '{{pool}}/{{namespace}}'",{pool:l,namespace:n})),this.modalRef.hide(),this.onSubmit.next()}).catch(()=>{this.namespaceForm.setErrors({cdSubmitButton:!0})})}}},"e
/kN
":function(l,n,e){"use strict
";e.d(n,"a
",(function(){return c}));var t=e("LvDl
"),i=(e("my5R
"),e("+fVR
")),u=e("0+/T"),s=(e("sne2"),e("uIqm"),e("x38r")),a=e("oxzT"),o=e("vCyI"),r=e("kvvV"),d=(e("FFMq"),e("G1/K
"),e("aexS
"),e("VTlA
"),e("kn
/O"),e("Sofw"));class c extends i.a{constructor(l,n,e,t,i,u,s,r,d){super(),this.authStorageService=l,this.i18n=n,this.iscsiService=e,this.joinPipe=t,this.taskListService=i,this.notAvailablePipe=u,this.modalService=s,this.taskWrapper=r,this.actionLabels=d,this.available=void 0,this.selection=new o.a,this.targets=[],this.icons=a.a,this.builders={"iscsi/target
/create":l=>({target_iqn:l.target_iqn})},this.permission=this.authStorageService.getPermissions().iscsi,this.tableActions=[{permission:"create",icon:a.a.add,routerLink:()=>"/block
/iscsi/targets
/create",name:this.actionLabels.CREATE},{permission:"update",icon:a.a.edit,routerLink:()=>"/block
/iscsi/targets
/edit/"+this.selection.first().target_iqn,name:this.actionLabels.EDIT,disable:()=>this.getEditDisableDesc()},{permission:"delete",icon:a.a.destroy,click:()=>this.deleteIscsiTargetModal(),name:this.actionLabels.DELETE,disable:()=>this.getDeleteDisableDesc()}]}ngOnInit(){this.columns=[{name:this.i18n("Target
"),prop:"target_iqn
",flexGrow:2,cellTransformation:s.a.executing},{name:this.i18n("Portals
"),prop:"cdPortals
",pipe:this.joinPipe,flexGrow:2},{name:this.i18n("Images
"),prop:"cdImages
",pipe:this.joinPipe,flexGrow:2},{name:this.i18n("# Sessions
"),prop:"info
.num_sessions
",pipe:this.notAvailablePipe,flexGrow:1}],this.iscsiService.status().subscribe(l=>{this.available=l.available,l.available?(this.iscsiService.version().subscribe(l=>{this.cephIscsiConfigVersion=l.ceph_iscsi_config_version,this.taskListService.init(()=>this.iscsiService.listTargets(),l=>this.prepareResponse(l),l=>this.targets=l,()=>this.onFetchError(),this.taskFilter,this.itemFilter,this.builders)}),this.iscsiService.settings().subscribe(l=>{this.settings=l})):this.status=l.message})}ngOnDestroy(){this.summaryDataSubscription&&this.summaryDataSubscription.unsubscribe()}getEditDisableDesc(){const l=this.selection.first();return l&&l.cdExecuting?l.cdExecuting:l&&t.isUndefined(l.info)?this.i18n("Unavailable
gateway(s
)"):!l}getDeleteDisableDesc(){const l=this.selection.first();return l&&l.cdExecuting?l.cdExecuting:l&&t.isUndefined(l.info)?this.i18n("Unavailable
gateway(s
)"):l&&l.info&&l.info.num_sessions?this.i18n("Target has active sessions
"):!l}prepareResponse(l){return l.forEach(l=>{l.cdPortals=l.portals.map(l=>`${l.host}:${l.ip}`),l.cdImages=l.disks.map(l=>`${l.pool}/${l.image}`)}),l}onFetchError(){this.table.reset()}itemFilter(l,n){return l.target_iqn===n.metadata.target_iqn}taskFilter(l){return["iscsi
/target
/create","iscsi/target
/edit","iscsi/target
/delete"].includes(l.name)}updateSelection(l){this.selection=l}deleteIscsiTargetModal(){const l=this.selection.first().target_iqn;this.modalRef=this.modalService.show(u.a,{initialState:{itemDescription:this.i18n("iSCSI target"),itemNames:[l],submitActionObservable:()=>this.taskWrapper.wrapTaskAroundCall({task:new r.a("iscsi/target
/delete",{target_iqn:l}),call:this.iscsiService.deleteTarget(l)})}})}configureDiscoveryAuth(){this.modalService.show(d.a,{})}}},eF8U:function(l,n,e){"use strict";var t=e("8Y7J"),i=e("s7LF"),u=e("ANnk"),s=e("f/UV
"),a=e("aexS
"),o=e("+gVj
"),r=e("SVse
"),d=e("mXUL
");e("jMP8
"),e.d(n,"a
",(function(){return c})),e.d(n,"b
",(function(){return S}));var c=t["ɵcrt
"]({encapsulation:0,styles:[[""]],data:{}});function m(l){return t["ɵvid
"](0,[(l()(),t["ɵeld
"](0,0,null,null,3,"option
",[],null,null,null,null,null)),t["ɵdid
"](1,147456,null,0,i.v,[t.ElementRef,t.Renderer2,[2,i.A]],{ngValue:[0,"ngValue
"]},null),t["ɵdid
"](2,147456,null,0,i.F,[t.ElementRef,t.Renderer2,[8,null]],{ngValue:[0,"ngValue
"]},null),(l()(),t["ɵted
"](3,null,["",""]))],(function(l,n){l(n,1,0,n.context.$implicit),l(n,2,0,n.context.$implicit)}),(function(l,n){l(n,3,0,n.context.$implicit)}))}function p(l){return t["ɵvid
"](0,[(l()(),t["ɵeld
"](0,0,null,null,12,"select
",[["class","form
-control custom
-select
"]],[[8,"id
",0],[8,"name
",0],[2,"ng
-untouched
",null],[2,"ng
-touched
",null],[2,"ng
-pristine
",null],[2,"ng
-dirty
",null],[2,"ng
-valid
",null],[2,"ng
-invalid
",null],[2,"ng
-pending
",null],[2,"is
-valid
",null],[2,"is
-invalid
",null]],[[null,"change
"],[null,"blur
"]],(function(l,n,e){var i=!0;return"change
"===n&&(i=!1!==t["ɵnov
"](l,1).onChange(e.target.value)&&i),"blur
"===n&&(i=!1!==t["ɵnov
"](l,1).onTouched()&&i),i}),null,null)),t["ɵdid
"](1,16384,null,0,i.A,[t.Renderer2,t.ElementRef],null,null),t["ɵprd
"](1024,null,i.p,(function(l){return[l]}),[i.A]),t["ɵdid
"](3,671744,[[1,4]],0,i.j,[[3,i.d],[8,null],[8,null],[6,i.p],[2,i.E]],{name:[0,"name
"]},null),t["ɵprd
"](2048,null,i.q,null,[i.j]),t["ɵdid
"](5,16384,null,0,i.r,[[4,i.q]],null,null),t["ɵdid
"](6,4210688,null,0,u.a,[[2,s.a],a.a,t.ElementRef],null,null),t["ɵdid
"](7,16384,null,0,o.h,[[3,i.d],o.a],{formControlName:[0,"formControlName
"]},null),(l()(),t["ɵeld
"](8,0,null,null,2,"option
",[],null,null,null,null,null)),t["ɵdid
"](9,147456,null,0,i.v,[t.ElementRef,t.Renderer2,[2,i.A]],{ngValue:[0,"ngValue
"]},null),t["ɵdid
"](10,147456,null,0,i.F,[t.ElementRef,t.Renderer2,[8,null]],{ngValue:[0,"ngValue
"]},null),(l()(),t["ɵand
"](16777216,null,null,1,null,m)),t["ɵdid
"](12,278528,null,0,r.NgForOf,[t.ViewContainerRef,t.TemplateRef,t.IterableDiffers],{ngForOf:[0,"ngForOf
"]},null)],(function(l,n){var e=n.component;l(n,3,0,e.setting),l(n,7,0,e.setting),l(n,9,0,null),l(n,10,0,null),l(n,12,0,e.limits.values)}),(function(l,n){var e=n.component;l(n,0,1,[t["ɵinlineInterpolate
"](1,"",e.setting,""),t["ɵinlineInterpolate
"](1,"",e.setting,""),t["ɵnov
"](n,5).ngClassUntouched,t["ɵnov
"](n,5).ngClassTouched,t["ɵnov
"](n,5).ngClassPristine,t["ɵnov
"](n,5).ngClassDirty,t["ɵnov
"](n,5).ngClassValid,t["ɵnov
"](n,5).ngClassInvalid,t["ɵnov
"](n,5).ngClassPending,t["ɵnov
"](n,7).validClass,t["ɵnov
"](n,7).invalidClass])}))}function h(l){return t["ɵvid
"](0,[(l()(),t["ɵeld
"](0,0,null,null,8,"input
",[["class","form
-control
"],["type
","number
"]],[[2,"ng
-untouched
",null],[2,"ng
-touched
",null],[2,"ng
-pristine
",null],[2,"ng
-dirty
",null],[2,"ng
-valid
",null],[2,"ng
-invalid
",null],[2,"ng
-pending
",null],[2,"is
-valid
",null],[2,"is
-invalid
",null]],[[null,"input
"],[null,"blur
"],[null,"compositionstart
"],[null,"compositionend
"],[null,"change
"]],(function(l,n,e){var i=!0;return"input
"===n&&(i=!1!==t["ɵnov
"](l,1)._handleInput(e.target.value)&&i),"blur
"===n&&(i=!1!==t["ɵnov
"](l,1).onTouched()&&i),"compositionstart
"===n&&(i=!1!==t["ɵnov
"](l,1)._compositionStart()&&i),"compositionend
"===n&&(i=!1!==t["ɵnov
"](l,1)._compositionEnd(e.target.value)&&i),"change
"===n&&(i=!1!==t["ɵnov
"](l,2).onChange(e.target.value)&&i),"input
"===n&&(i=!1!==t["ɵnov
"](l,2).onChange(e.target.value)&&i),"blur
"===n&&(i=!1!==t["ɵnov
"](l,2).onTouched()&&i),i}),null,null)),t["ɵdid
"](1,16384,null,0,i.e,[t.Renderer2,t.ElementRef,[2,i.b]],null,null),t["ɵdid
"](2,16384,null,0,i.w,[t.Renderer2,t.ElementRef],null,null),t["ɵprd
"](1024,null,i.p,(function(l,n){return[l,n]}),[i.e,i.w]),t["ɵdid
"](4,671744,[[1,4]],0,i.j,[[3,i.d],[8,null],[8,null],[6,i.p],[2,i.E]],{name:[0,"name
"]},null),t["ɵprd
"](2048,null,i.q,null,[i.j]),t["ɵdid
"](6,16384,null,0,i.r,[[4,i.q]],null,null),t["ɵdid
"](7,4210688,null,0,u.a,[[2,s.a],a.a,t.ElementRef],null,null),t["ɵdid
"](8,16384,null,0,o.h,[[3,i.d],o.a],{formControlName:[0,"formControlName
"]},null)],(function(l,n){var e=n.component;l(n,4,0,e.setting),l(n,8,0,e.setting)}),(function(l,n){l(n,0,0,t["ɵnov
"](n,6).ngClassUntouched,t["ɵnov
"](n,6).ngClassTouched,t["ɵnov
"](n,6).ngClassPristine,t["ɵnov
"](n,6).ngClassDirty,t["ɵnov
"](n,6).ngClassValid,t["ɵnov
"](n,6).ngClassInvalid,t["ɵnov
"](n,6).ngClassPending,t["ɵnov
"](n,8).validClass,t["ɵnov
"](n,8).invalidClass)}))}function g(l){return t["ɵvid
"](0,[(l()(),t["ɵeld
"](0,0,null,null,7,"input
",[["class","form
-control
"],["type
","text
"]],[[2,"ng
-untouched
",null],[2,"ng
-touched
",null],[2,"ng
-pristine
",null],[2,"ng
-dirty
",null],[2,"ng
-valid
",null],[2,"ng
-invalid
",null],[2,"ng
-pending
",null],[2,"is
-valid
",null],[2,"is
-invalid
",null]],[[null,"input
"],[null,"blur
"],[null,"compositionstart
"],[null,"compositionend
"]],(function(l,n,e){var i=!0;return"input
"===n&&(i=!1!==t["ɵnov
"](l,1)._handleInput(e.target.value)&&i),"blur
"===n&&(i=!1!==t["ɵnov
"](l,1).onTouched()&&i),"compositionstart
"===n&&(i=!1!==t["ɵnov
"](l,1)._compositionStart()&&i),"compositionend
"===n&&(i=!1!==t["ɵnov
"](l,1)._compositionEnd(e.target.value)&&i),i}),null,null)),t["ɵdid
"](1,16384,null,0,i.e,[t.Renderer2,t.ElementRef,[2,i.b]],null,null),t["ɵprd
"](1024,null,i.p,(function(l){return[l]}),[i.e]),t["ɵdid
"](3,671744,[[1,4]],0,i.j,[[3,i.d],[8,null],[8,null],[6,i.p],[2,i.E]],{name:[0,"name
"]},null),t["ɵprd
"](2048,null,i.q,null,[i.j]),t["ɵdid
"](5,16384,null,0,i.r,[[4,i.q]],null,null),t["ɵdid
"](6,4210688,null,0,u.a,[[2,s.a],a.a,t.ElementRef],null,null),t["ɵdid
"](7,16384,null,0,o.h,[[3,i.d],o.a],{formControlName:[0,"formControlName
"]},null)],(function(l,n){var e=n.component;l(n,3,0,e.setting),l(n,7,0,e.setting)}),(function(l,n){l(n,0,0,t["ɵnov
"](n,5).ngClassUntouched,t["ɵnov
"](n,5).ngClassTouched,t["ɵnov
"](n,5).ngClassPristine,t["ɵnov
"](n,5).ngClassDirty,t["ɵnov
"](n,5).ngClassValid,t["ɵnov
"](n,5).ngClassInvalid,t["ɵnov
"](n,5).ngClassPending,t["ɵnov
"](n,7).validClass,t["ɵnov
"](n,7).invalidClass)}))}function f(l){return t["ɵvid
"](0,[(l()(),t["ɵeld
"](0,0,null,null,25,null,null,null,null,null,null,null)),(l()(),t["ɵeld
"](1,0,null,null,0,"br
",[],null,null,null,null,null)),(l()(),t["ɵeld
"](2,0,null,null,11,"div
",[["class","custom
-control custom
-radio custom
-control
-inline
"]],null,null,null,null,null)),(l()(),t["ɵeld
"](3,0,null,null,8,"input
",[["class","custom
-control
-input
"],["type
","radio
"]],[[8,"id
",0],[2,"ng
-untouched
",null],[2,"ng
-touched
",null],[2,"ng
-pristine
",null],[2,"ng
-dirty
",null],[2,"ng
-valid
",null],[2,"ng
-invalid
",null],[2,"ng
-pending
",null],[2,"is
-valid
",null],[2,"is
-invalid
",null]],[[null,"input
"],[null,"blur
"],[null,"compositionstart
"],[null,"compositionend
"],[null,"change
"]],(function(l,n,e){var i=!0;return"input
"===n&&(i=!1!==t["ɵnov
"](l,4)._handleInput(e.target.value)&&i),"blur
"===n&&(i=!1!==t["ɵnov
"](l,4).onTouched()&&i),"compositionstart
"===n&&(i=!1!==t["ɵnov
"](l,4)._compositionStart()&&i),"compositionend
"===n&&(i=!1!==t["ɵnov
"](l,4)._compositionEnd(e.target.value)&&i),"change
"===n&&(i=!1!==t["ɵnov
"](l,5).onChange()&&i),"blur
"===n&&(i=!1!==t["ɵnov
"](l,5).onTouched()&&i),i}),null,null)),t["ɵdid
"](4,16384,null,0,i.e,[t.Renderer2,t.ElementRef,[2,i.b]],null,null),t["ɵdid
"](5,212992,null,0,i.x,[t.Renderer2,t.ElementRef,i.D,t.Injector],{formControlName:[0,"formControlName
"],value:[1,"value
"]},null),t["ɵprd
"](1024,null,i.p,(function(l,n){return[l,n]}),[i.e,i.x]),t["ɵdid
"](7,671744,[[1,4]],0,i.j,[[3,i.d],[8,null],[8,null],[6,i.p],[2,i.E]],{name:[0,"name
"]},null),t["ɵprd
"](2048,null,i.q,null,[i.j]),t["ɵdid
"](9,16384,null,0,i.r,[[4,i.q]],null,null),t["ɵdid
"](10,4210688,null,0,u.a,[[2,s.a],a.a,t.ElementRef],null,null),t["ɵdid
"](11,16384,null,0,o.h,[[3,i.d],o.a],{formControlName:[0,"formControlName
"]},null),(l()(),t["ɵeld
"](12,0,null,null,1,"label
",[["class","custom
-control
-label
"]],[[8,"htmlFor
",0]],null,null,null,null)),(l()(),t["ɵted
"](-1,null,["Yes
"])),(l()(),t["ɵeld
"](14,0,null,null,11,"div
",[["class","custom
-control custom
-radio custom
-control
-inline
"]],null,null,null,null,null)),(l()(),t["ɵeld
"](15,0,null,null,8,"input
",[["class","custom
-control
-input
"],["type
","radio
"]],[[8,"id
",0],[2,"ng
-untouched
",null],[2,"ng
-touched
",null],[2,"ng
-pristine
",null],[2,"ng
-dirty
",null],[2,"ng
-valid
",null],[2,"ng
-invalid
",null],[2,"ng
-pending
",null],[2,"is
-valid
",null],[2,"is
-invalid
",null]],[[null,"input
"],[null,"blur
"],[null,"compositionstart
"],[null,"compositionend
"],[null,"change
"]],(function(l,n,e){var i=!0;return"input
"===n&&(i=!1!==t["ɵnov
"](l,16)._handleInput(e.target.value)&&i),"blur
"===n&&(i=!1!==t["ɵnov
"](l,16).onTouched()&&i),"compositionstart
"===n&&(i=!1!==t["ɵnov
"](l,16)._compositionStart()&&i),"compositionend
"===n&&(i=!1!==t["ɵnov
"](l,16)._compositionEnd(e.target.value)&&i),"change
"===n&&(i=!1!==t["ɵnov
"](l,17).onChange()&&i),"blur
"===n&&(i=!1!==t["ɵnov
"](l,17).onTouched()&&i),i}),null,null)),t["ɵdid
"](16,16384,null,0,i.e,[t.Renderer2,t.ElementRef,[2,i.b]],null,null),t["ɵdid
"](17,212992,null,0,i.x,[t.Renderer2,t.ElementRef,i.D,t.Injector],{formControlName:[0,"formControlName
"],value:[1,"value
"]},null),t["ɵprd
"](1024,null,i.p,(function(l,n){return[l,n]}),[i.e,i.x]),t["ɵdid
"](19,671744,[[1,4]],0,i.j,[[3,i.d],[8,null],[8,null],[6,i.p],[2,i.E]],{name:[0,"name
"]},null),t["ɵprd
"](2048,null,i.q,null,[i.j]),t["ɵdid
"](21,16384,null,0,i.r,[[4,i.q]],null,null),t["ɵdid
"](22,4210688,null,0,u.a,[[2,s.a],a.a,t.ElementRef],null,null),t["ɵdid
"](23,16384,null,0,o.h,[[3,i.d],o.a],{formControlName:[0,"formControlName
"]},null),(l()(),t["ɵeld
"](24,0,null,null,1,"label
",[["class","custom
-control
-label
"]],[[8,"htmlFor
",0]],null,null,null,null)),(l()(),t["ɵted
"](-1,null,["No
"]))],(function(l,n){var e=n.component;l(n,5,0,e.setting,!0),l(n,7,0,e.setting),l(n,11,0,e.setting),l(n,17,0,e.setting,!1),l(n,19,0,e.setting),l(n,23,0,e.setting)}),(function(l,n){var e=n.component;l(n,3,0,e.setting+"True
",t["ɵnov
"](n,9).ngClassUntouched,t["ɵnov
"](n,9).ngClassTouched,t["ɵnov
"](n,9).ngClassPristine,t["ɵnov
"](n,9).ngClassDirty,t["ɵnov
"](n,9).ngClassValid,t["ɵnov
"](n,9).ngClassInvalid,t["ɵnov
"](n,9).ngClassPending,t["ɵnov
"](n,11).validClass,t["ɵnov
"](n,11).invalidClass),l(n,12,0,e.setting+"True
"),l(n,15,0,e.setting+"False
",t["ɵnov
"](n,21).ngClassUntouched,t["ɵnov
"](n,21).ngClassTouched,t["ɵnov
"](n,21).ngClassPristine,t["ɵnov
"](n,21).ngClassDirty,t["ɵnov
"](n,21).ngClassValid,t["ɵnov
"](n,21).ngClassInvalid,t["ɵnov
"](n,21).ngClassPending,t["ɵnov
"](n,23).validClass,t["ɵnov
"](n,23).invalidClass),l(n,24,0,e.setting+"False
")}))}function v(l){return t["ɵvid
"](0,[(l()(),t["ɵeld
"](0,0,null,null,6,"span
",[],null,null,null,null,null)),(l()(),t["ɵand
"](16777216,null,null,1,null,h)),t["ɵdid
"](2,16384,null,0,r.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf
"]},null),(l()(),t["ɵand
"](16777216,null,null,1,null,g)),t["ɵdid
"](4,16384,null,0,r.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf
"]},null),(l()(),t["ɵand
"](16777216,null,null,1,null,f)),t["ɵdid
"](6,16384,null,0,r.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf
"]},null)],(function(l,n){var e=n.component;l(n,2,0,"int"===e.limits.type),l(n,4,0,"str
"===e.limits.type),l(n,6,0,"bool
"===e.limits.type)}),null)}function b(l){return t["ɵvid
"](0,[(l()(),t["ɵeld
"](0,0,null,null,2,"span
",[["class","invalid
-feedback
"]],null,null,null,null,null)),(l()(),t["ɵeld
"](1,0,null,null,1,null,null,null,null,null,null,null)),(l()(),t["ɵted
"](2,null,["Must be greater than or equal to
","."]))],null,(function(l,n){l(n,2,0,n.component.limits.min)}))}function C(l){return t["ɵvid
"](0,[(l()(),t["ɵeld
"](0,0,null,null,2,"span
",[["class","invalid
-feedback
"]],null,null,null,null,null)),(l()(),t["ɵeld
"](1,0,null,null,1,null,null,null,null,null,null,null)),(l()(),t["ɵted
"](2,null,["Must be less than or equal to
","."]))],null,(function(l,n){l(n,2,0,n.component.limits.max)}))}function S(l){return t["ɵvid
"](0,[(l()(),t["ɵeld
"](0,0,null,null,17,"div
",[["class","form
-group
"]],[[2,"ng
-untouched
",null],[2,"ng
-touched
",null],[2,"ng
-pristine
",null],[2,"ng
-dirty
",null],[2,"ng
-valid
",null],[2,"ng
-invalid
",null],[2,"ng
-pending
",null],[2,"has
-error
",null],[2,"has
-success
",null]],[[null,"submit
"],[null,"reset
"]],(function(l,n,e){var i=!0;return"submit
"===n&&(i=!1!==t["ɵnov
"](l,1).onSubmit(e)&&i),"reset
"===n&&(i=!1!==t["ɵnov
"](l,1).onReset()&&i),"submit
"===n&&(i=!1!==t["ɵnov
"](l,4).onSubmit()&&i),i}),d.b,d.a)),t["ɵdid
"](1,540672,null,0,i.l,[[8,null],[8,null]],{form:[0,"form
"]},null),t["ɵprd
"](2048,null,i.d,null,[i.l]),t["ɵdid
"](3,16384,null,0,i.s,[[4,i.d]],null,null),t["ɵdid
"](4,16384,null,0,o.d,[],{formGroup:[0,"formGroup
"]},null),t["ɵdid
"](5,1163264,null,2,o.c,[t.ElementRef,o.g],null,null),t["ɵqud
"](603979776,1,{FormControlNames:1}),t["ɵqud
"](603979776,2,{messagesBlock:0}),(l()(),t["ɵeld
"](8,0,null,0,1,"label
",[["class","col
-form
-label
"]],[[8,"htmlFor
",0]],null,null,null,null)),(l()(),t["ɵted
"](9,null,["",""])),(l()(),t["ɵand
"](16777216,null,0,1,null,p)),t["ɵdid
"](11,16384,null,0,r.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf
"]},null),(l()(),t["ɵand
"](16777216,null,0,1,null,v)),t["ɵdid
"](13,16384,null,0,r.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf
"]},null),(l()(),t["ɵand
"](16777216,null,0,1,null,b)),t["ɵdid
"](15,16384,null,0,r.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf
"]},null),(l()(),t["ɵand
"](16777216,null,0,1,null,C)),t["ɵdid
"](17,16384,null,0,r.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf
"]},null)],(function(l,n){var e=n.component;l(n,1,0,e.settingsForm),l(n,4,0,e.settingsForm),l(n,5,0),l(n,11,0,"enum"===e.limits.type),l(n,13,0,"enum"!==e.limits.type),l(n,15,0,e.settingsForm.showError(e.setting,e.formDir,"min
")),l(n,17,0,e.settingsForm.showError(e.setting,e.formDir,"max
"))}),(function(l,n){var e=n.component;l(n,0,0,t["ɵnov
"](n,3).ngClassUntouched,t["ɵnov
"](n,3).ngClassTouched,t["ɵnov
"](n,3).ngClassPristine,t["ɵnov
"](n,3).ngClassDirty,t["ɵnov
"](n,3).ngClassValid,t["ɵnov
"](n,3).ngClassInvalid,t["ɵnov
"](n,3).ngClassPending,t["ɵnov
"](n,5).hasErrors,t["ɵnov
"](n,5).hasSuccess),l(n,8,0,t["ɵinlineInterpolate
"](1,"",e.setting,"")),l(n,9,0,e.setting)}))}},gr3l:function(l,n,e){"use strict
";e.d(n,"a
",(function(){return h}));var t=e("s7LF
"),i=e("LvDl
"),u=e("cp0P
"),s=(e("my5R
"),e("F83c
"),e("DNAf
")),a=e("a96k
"),o=(e("sne2
"),e("oxzT
")),r=e("QFaf
"),d=e("1Ni5
"),c=e("kvvV
"),m=(e("kn
/O"),e("Z4cD")),p=e("a6qe");class h{constructor(l,n,e,t,i,u,a,r){this.iscsiService=l,this.modalService=n,this.rbdService=e,this.router=t,this.route=i,this.i18n=u,this.taskWrapper=a,this.actionLabels=r,this.api_version=0,this.minimum_gateways=1,this.icons=o.a,this.isEdit=!1,this.portalsSelections=[],this.imagesInitiatorSelections=[],this.groupDiskSelections=[],this.groupMembersSelections=[],this.imagesSettings={},this.messages={portals:new s.a({noOptions:this.i18n("There are no portals available.")},this.i18n),images:new s.a({noOptions:this.i18n("There are no images available.")},this.i18n),initiatorImage:new s.a({noOptions:this.i18n("There are no images available. Please make sure you add an image to the target.")},this.i18n),groupInitiator:new s.a({noOptions:this.i18n("There are no initiators available. Please make sure you add an initiator to the target.")},this.i18n)},this.IQN_REGEX=/^iqn
\.(19|20)\d
\d
-(0[1-9]|1[0-2])\.\D
{2,3}(\.[A
-Za
-z0
-9-]+)+(:[A
-Za
-z0
-9-\.]+)*$/,this.USER_REGEX=/^[\w
\.:@_
-]{8,64}$/,this.PASSWORD_REGEX=/^[\w
@\-_
\/]{12,16}$/,this.resource
=this.i18n("target")}ngOnInit(){const l
=[this.iscsiService
.listTargets(),this.rbdService
.list(),this.iscsiService
.portals(),this.iscsiService
.settings(),this.iscsiService
.version()];this.router
.url
.startsWith("/block/iscsi/targets/edit")&&(this.isEdit
=!0,this.route
.params
.subscribe(n
=>{this.target_iqn
=decodeURIComponent(n
.target_iqn
),l
.push(this.iscsiService
.getTarget(this.target_iqn
))})),this.action
=this.isEdit
?this.actionLabels
.EDIT
:this.actionLabels
.CREATE
,Object(u
.a
)(l
).subscribe(l
=>{const n
=i(l
[0]).filter(l
=>l
.target_iqn
!==this.target_iqn
).flatMap(l
=>l
.disks
).map(l
=>`${l.pool}/${l.image}`).value();"api_version"in l
[3]&&(this.api_version
=l
[3].api_version
),this.minimum_gateways
=l
[3].config
.minimum_gateways
,this.target_default_controls
=l
[3].target_default_controls
,this.target_controls_limits
=l
[3].target_controls_limits
,this.disk_default_controls
=l
[3].disk_default_controls
,this.disk_controls_limits
=l
[3].disk_controls_limits
,this.backstores
=l
[3].backstores
,this.default_backstore
=l
[3].default_backstore
,this.unsupported_rbd_features
=l
[3].unsupported_rbd_features
,this.required_rbd_features
=l
[3].required_rbd_features
,this.imagesAll
=i(l
[1]).flatMap(l
=>l
.value
).filter(l
=>!l
.namespace&&-1===n
.indexOf(`${l.pool_name}/${l.name}`)&&0!==this.getValidBackstores(l
).length
).value(),this.imagesSelections
=this.imagesAll
.map(l
=>new a
.a(!1,`${l.pool_name}/${l.name}`,""));const e
=[];l
[2].forEach(l
=>{l
.ip_addresses
.forEach(n
=>{e
.push(new a
.a(!1,l
.name
+":"+n
,""))})}),this.portalsSelections
=[...e
],this.cephIscsiConfigVersion
=l
[4].ceph_iscsi_config_version
,this.createForm(),l
[5]&&this.resolveModel(l
[5])})}createForm(){if(this.targetForm
=new r
.a({target_iqn
:new t
.i("iqn.2001-07.com.ceph:"+Date
.now(),{validators
:[t
.B
.required
,t
.B
.pattern(this.IQN_REGEX
)]}),target_controls
:new t
.i({}),portals
:new t
.i([],{validators
:[d
.a
.custom("minGateways",l
=>i
.uniq(l
.map(l
=>l
.split(":")[0])).length
<Math
.max(1,this.minimum_gateways
))]}),disks
:new t
.i([],{validators
:[d
.a
.custom("dupLunId",l
=>{const n
=this.getLunIds(l
);return n
.length
!==i
.uniq(n
).length
}),d
.a
.custom("dupWwn",l
=>{const n
=this.getWwns(l
);return n
.length
!==i
.uniq(n
).length
})]}),initiators
:new t
.f([]),groups
:new t
.f([]),acl_enabled
:new t
.i(!1)}),this.cephIscsiConfigVersion
>10){const l
=new r
.a({user
:new t
.i(""),password
:new t
.i(""),mutual_user
:new t
.i(""),mutual_password
:new t
.i("")});this.setAuthValidator(l
),this.targetForm
.addControl("auth",l
)}}resolveModel(l
){this.targetForm
.patchValue({target_iqn
:l
.target_iqn
,target_controls
:l
.target_controls
,acl_enabled
:l
.acl_enabled
}),this.cephIscsiConfigVersion
>10&&this.targetForm
.patchValue({auth
:l
.auth
});const n
=[];i
.forEach(l
.portals
,l
=>{n
.push(`${l.host}:${l.ip}`)}),this.targetForm
.patchValue({portals
:n
});const e
=[];i
.forEach(l
.disks
,l
=>{const n
=`${l.pool}/${l.image}`;e
.push(n
),this.imagesSettings
[n
]={backstore
:l
.backstore
},this.imagesSettings
[n
][l
.backstore
]=l
.controls
,"lun"in l
&&(this.imagesSettings
[n
].lun
=l
.lun
),"wwn"in l
&&(this.imagesSettings
[n
].wwn
=l
.wwn
),this.onImageSelection({option
:{name
:n
,selected
:!0}})}),this.targetForm
.patchValue({disks
:e
}),i
.forEach(l
.clients
,l
=>{const n
=this.addInitiator();l
.luns
=i
.map(l
.luns
,l
=>`${l.pool}/${l.image}`),n
.patchValue(l
)}),i
.forEach(l
.groups
,l
=>{const n
=this.addGroup();l
.disks
=i
.map(l
.disks
,l
=>`${l.pool}/${l.image}`),n
.patchValue(l
),i
.forEach(l
.members
,l
=>{this.onGroupMemberSelection({option
:new a
.a(!0,l
,"")})})})}hasAdvancedSettings(l
){return Object
.values(l
).length
>0}get portals(){return this.targetForm
.get("portals")}onPortalSelection(){this.portals
.setValue(this.portals
.value
)}removePortal(l
,n
){return this.portalsSelections
.forEach(l
=>{l
.name
===n
&&(l
.selected
=!1)}),this.portals
.value
.splice(l
,1),this.portals
.setValue(this.portals
.value
),!1}get disks(){return this.targetForm
.get("disks")}removeImage(l
,n
){return this.imagesSelections
.forEach(l
=>{l
.name
===n
&&(l
.selected
=!1)}),this.disks
.value
.splice(l
,1),this.removeImageRefs(n
),this.targetForm
.get("disks").updateValueAndValidity({emitEvent
:!1}),!1}removeImageRefs(l
){this.initiators
.controls
.forEach(n
=>{const e
=n
.value
.luns
.filter(n
=>n
!==l
);n
.get("luns").setValue(e
)}),this.groups
.controls
.forEach(n
=>{const e
=n
.value
.disks
.filter(n
=>n
!==l
);n
.get("disks").setValue(e
)}),i
.forEach(this.imagesInitiatorSelections
,(n
,e
)=>{this.imagesInitiatorSelections
[e
]=n
.filter(n
=>n
.name
!==l
)}),i
.forEach(this.groupDiskSelections
,(n
,e
)=>{this.groupDiskSelections
[e
]=n
.filter(n
=>n
.name
!==l
)})}getDefaultBackstore(l
){let n
=this.default_backstore
;const e
=this.getImageById(l
);return this.validFeatures(e
,this.default_backstore
)||this.backstores
.forEach(l
=>{l
!==this.default_backstore
&&this.validFeatures(e
,l
)&&(n
=l
)}),n
}isLunIdInUse(l
,n
){const e
=this.disks
.value
.filter(l
=>l
!==n
);return this.getLunIds(e
).includes(l
)}getLunIds(l
){return i
.map(l
,l
=>this.imagesSettings
[l
].lun
)}nextLunId(l
){const n
=this.disks
.value
.filter(n
=>n
!==l
),e
=this.getLunIds(n
);let t
=0;for(;e
.includes(t
);)t
++;return t
}getWwns(l
){return i
.map(l
,l
=>this.imagesSettings
[l
].wwn
).filter(l
=>i
.isString(l
)&&""!==l
)}onImageSelection(l
){const n
=l
.option
;if(n
.selected
){if(this.imagesSettings
[n
.name
])this.isLunIdInUse(this.imagesSettings
[n
.name
].lun
,n
.name
)&&(this.imagesSettings
[n
.name
].lun
=this.nextLunId(n
.name
));else{const l
=this.getDefaultBackstore(n
.name
);this.imagesSettings
[n
.name
]={backstore
:l
,lun
:this.nextLunId(n
.name
)},this.imagesSettings
[n
.name
][l
]={}}i
.forEach(this.imagesInitiatorSelections
,(l
,e
)=>{l
.push(new a
.a(!1,n
.name
,"")),this.imagesInitiatorSelections
[e
]=[...l
]}),i
.forEach(this.groupDiskSelections
,(l
,e
)=>{l
.push(new a
.a(!1,n
.name
,"")),this.groupDiskSelections
[e
]=[...l
]})}else this.removeImageRefs(n
.name
);this.targetForm
.get("disks").updateValueAndValidity({emitEvent
:!1})}get initiators(){return this.targetForm
.get("initiators")}addInitiator(){const l
=new r
.a({client_iqn
:new t
.i("",{validators
:[t
.B
.required
,d
.a
.custom("notUnique",l
=>{const n
=this.initiators
.controls
.reduce((function(l
,n
){return l
.concat(n
.value
.client_iqn
)}),[]);return n
.indexOf(l
)!==n
.lastIndexOf(l
)}),t
.B
.pattern(this.IQN_REGEX
)]}),auth
:new r
.a({user
:new t
.i(""),password
:new t
.i(""),mutual_user
:new t
.i(""),mutual_password
:new t
.i("")}),luns
:new t
.i([]),cdIsInGroup
:new t
.i(!1)});this.setAuthValidator(l
),this.initiators
.push(l
),i
.forEach(this.groupMembersSelections
,(l
,n
)=>{l
.push(new a
.a(!1,"","")),this.groupMembersSelections
[n
]=[...l
]});const n
=i
.map(this.targetForm
.getValue("disks"),l
=>new a
.a(!1,l
,""));return this.imagesInitiatorSelections
.push(n
),l
}setAuthValidator(l
){d
.a
.validateIf(l
.get("user"),()=>l
.getValue("password")||l
.getValue("mutual_user")||l
.getValue("mutual_password"),[t
.B
.required
],[t
.B
.pattern(this.USER_REGEX
)],[l
.get("password"),l
.get("mutual_user"),l
.get("mutual_password")]),d
.a
.validateIf(l
.get("password"),()=>l
.getValue("user")||l
.getValue("mutual_user")||l
.getValue("mutual_password"),[t
.B
.required
],[t
.B
.pattern(this.PASSWORD_REGEX
)],[l
.get("user"),l
.get("mutual_user"),l
.get("mutual_password")]),d
.a
.validateIf(l
.get("mutual_user"),()=>l
.getValue("mutual_password"),[t
.B
.required
],[t
.B
.pattern(this.USER_REGEX
)],[l
.get("user"),l
.get("password"),l
.get("mutual_password")]),d
.a
.validateIf(l
.get("mutual_password"),()=>l
.getValue("mutual_user"),[t
.B
.required
],[t
.B
.pattern(this.PASSWORD_REGEX
)],[l
.get("user"),l
.get("password"),l
.get("mutual_user")])}removeInitiator(l
){const n
=this.initiators
.value
[l
];this.initiators
.removeAt(l
),i
.forEach(this.groupMembersSelections
,(n
,e
)=>{n
.splice(l
,1),this.groupMembersSelections
[e
]=[...n
]}),this.groups
.controls
.forEach(l
=>{const e
=l
.value
.members
.filter(l
=>l
!==n
.client_iqn
);l
.get("members").setValue(e
)}),this.imagesInitiatorSelections
.splice(l
,1)}updatedInitiatorSelector(){this.initiators
.controls
.forEach(l
=>{l
.get("client_iqn").updateValueAndValidity({emitEvent
:!1})}),i
.forEach(this.groupMembersSelections
,(l
,n
)=>{i
.forEach(l
,(l
,n
)=>{const e
=l
.name
;l
.name
=this.initiators
.controls
[n
].value
.client_iqn
,this.groups
.controls
.forEach(n
=>{const t
=n
.value
.members
,i
=t
.indexOf(e
);-1!==i
&&(t
[i
]=l
.name
),n
.get("members").setValue(t
)})}),this.groupMembersSelections
[n
]=[...this.groupMembersSelections
[n
]]})}removeInitiatorImage(l
,n
,e
,t
){const i
=l
.getValue("luns");return i
.splice(n
,1),l
.patchValue({luns
:i
}),this.imagesInitiatorSelections
[e
].forEach(l
=>{l
.name
===t
&&(l
.selected
=!1)}),!1}get groups(){return this.targetForm
.get("groups")}addGroup(){const l
=new r
.a({group_id
:new t
.i("",{validators
:[t
.B
.required
]}),members
:new t
.i([]),disks
:new t
.i([])});this.groups
.push(l
);const n
=i
.map(this.targetForm
.getValue("disks"),l
=>new a
.a(!1,l
,""));this.groupDiskSelections
.push(n
);const e
=i
.map(this.initiators
.value
,l
=>new a
.a(!1,l
.client_iqn
,"",!l
.cdIsInGroup
));return this.groupMembersSelections
.push(e
),l
}removeGroup(l
){this.groups
.removeAt(l
),this.groupDiskSelections
.splice(l
,1)}onGroupMemberSelection(l
){const n
=l
.option
;let e
;this.initiators
.controls
.forEach((l
,t
)=>{l
.value
.client_iqn
===n
.name
&&(l
.patchValue({luns
:[]}),l
.get("cdIsInGroup").setValue(n
.selected
),e
=t
)}),i
.forEach(this.groupMembersSelections
,l
=>{l
[e
].enabled
=!n
.selected
})}removeGroupInitiator(l
,n
,e
){const t
=l
.getValue("members")[n
];l
.getValue("members").splice(n
,1),this.groupMembersSelections
[e
].forEach(l
=>{l
.name
===t
&&(l
.selected
=!1)}),this.groupMembersSelections
[e
]=[...this.groupMembersSelections
[e
]],this.onGroupMemberSelection({option
:new a
.a(!1,t
,"")})}removeGroupDisk(l
,n
,e
){const t
=l
.getValue("disks")[n
];l
.getValue("disks").splice(n
,1),this.groupDiskSelections
[e
].forEach(l
=>{l
.name
===t
&&(l
.selected
=!1)}),this.groupDiskSelections
[e
]=[...this.groupDiskSelections
[e
]]}submit(){const l
=i
.cloneDeep(this.targetForm
.value
),n
={target_iqn
:this.targetForm
.getValue("target_iqn"),target_controls
:this.targetForm
.getValue("target_controls"),acl_enabled
:this.targetForm
.getValue("acl_enabled"),portals
:[],disks
:[],clients
:[],groups
:[]};if(this.cephIscsiConfigVersion
>10){const l
=this.targetForm
.get("auth");l
.getValue("user")||l
.get("user").setValue(""),l
.getValue("password")||l
.get("password").setValue(""),l
.getValue("mutual_user")||l
.get("mutual_user").setValue(""),l
.getValue("mutual_password")||l
.get("mutual_password").setValue("");const e
=this.targetForm
.getValue("acl_enabled");n
.auth
={user
:e
?"":l
.getValue("user"),password
:e
?"":l
.getValue("password"),mutual_user
:e
?"":l
.getValue("mutual_user"),mutual_password
:e
?"":l
.getValue("mutual_password")}}let e
;l
.disks
.forEach(l
=>{const e
=l
.split("/"),t
=this.imagesSettings
[l
].backstore
;n
.disks
.push({pool
:e
[0],image
:e
[1],backstore
:t
,controls
:this.imagesSettings
[l
][t
],lun
:this.imagesSettings
[l
].lun
,wwn
:this.imagesSettings
[l
].wwn
})}),l
.portals
.forEach(l
=>{const e
=l
.indexOf(":");n
.portals
.push({host
:l
.substring(0,e
),ip
:l
.substring(e
+1)})}),n
.acl_enabled
&&(l
.initiators
.forEach(l
=>{l
.auth
.user
||(l
.auth
.user
=""),l
.auth
.password
||(l
.auth
.password
=""),l
.auth
.mutual_user
||(l
.auth
.mutual_user
=""),l
.auth
.mutual_password
||(l
.auth
.mutual_password
=""),delete l
.cdIsInGroup
;const n
=[];l
.luns
.forEach(l
=>{const e
=l
.split("/");n
.push({pool
:e
[0],image
:e
[1]})}),l
.luns
=n
}),n
.clients
=l
.initiators
),n
.acl_enabled
&&(l
.groups
.forEach(l
=>{const n
=[];l
.disks
.forEach(l
=>{const e
=l
.split("/");n
.push({pool
:e
[0],image
:e
[1]})}),l
.disks
=n
}),n
.groups
=l
.groups
),this.isEdit
?(n
.new_target_iqn
=n
.target_iqn
,n
.target_iqn
=this.target_iqn
,e
=this.taskWrapper
.wrapTaskAroundCall({task
:new c
.a("iscsi/target/edit",{target_iqn
:n
.target_iqn
}),call
:this.iscsiService
.updateTarget(this.target_iqn
,n
)})):e
=this.taskWrapper
.wrapTaskAroundCall({task
:new c
.a("iscsi/target/create",{target_iqn
:n
.target_iqn
}),call
:this.iscsiService
.createTarget(n
)}),e
.subscribe(void 0,()=>{this.targetForm
.setErrors({cdSubmitButton
:!0})},()=>this.router
.navigate(["/block/iscsi/targets"]))}targetSettingsModal(){const l
={target_controls
:this.targetForm
.get("target_controls"),target_default_controls
:this.target_default_controls
,target_controls_limits
:this.target_controls_limits
};this.modalRef
=this.modalService
.show(p
.a
,{initialState
:l
})}imageSettingsModal(l
){const n
={imagesSettings
:this.imagesSettings
,image
:l
,api_version
:this.api_version
,disk_default_controls
:this.disk_default_controls
,disk_controls_limits
:this.disk_controls_limits
,backstores
:this.getValidBackstores(this.getImageById(l
)),control
:this.targetForm
.get("disks")};this.modalRef
=this.modalService
.show(m
.a
,{initialState
:n
})}validFeatures(l
,n
){const e
=l
.features
,t
=this.required_rbd_features
[n
];return(e
&t
)===t
&&0==(e
&this.unsupported_rbd_features
[n
])}getImageById(l
){return this.imagesAll
.find(n
=>l
===`${n.pool_name}/${n.name}`)}getValidBackstores(l
){return this.backstores
.filter(n
=>this.validFeatures(l
,n
))}}},jMP8:function(l
,n
,e
){"use strict";e
.d(n
,"a",(function(){return i
}));var t
=e("s7LF");e("QFaf");class i
{ngOnInit(){const l
=[];"min"in this.limits
&&l
.push(t
.B
.min(this.limits
.min
)),"max"in this.limits
&&l
.push(t
.B
.max(this.limits
.max
)),this.settingsForm
.get(this.setting
).setValidators(l
)}}},"k/xb":function(l
,n
,e
){"use strict";e
.d(n
,"a",(function(){return i
})),e
.d(n
,"b",(function(){return S
})),e
.d(n
,"c",(function(){return u
})),e
.d(n
,"d",(function(){return s
})),e
.d(n
,"j",(function(){return a
})),e
.d(n
,"k",(function(){return o
})),e
.d(n
,"l",(function(){return r
})),e
.d(n
,"m",(function(){return d
})),e
.d(n
,"n",(function(){return c
})),e
.d(n
,"o",(function(){return m
})),e
.d(n
,"p",(function(){return p
})),e
.d(n
,"q",(function(){return h
})),e
.d(n
,"e",(function(){return g
})),e
.d(n
,"f",(function(){return f
})),e
.d(n
,"g",(function(){return v
})),e
.d(n
,"h",(function(){return b
})),e
.d(n
,"i",(function(){return C
}));var t
=e("sne2");e("Vhfg"),e("gr3l"),e("e/kN"),e("roDX"),e("cxJu"),e("MyVl"),e("5GyT"),e("Z5tW"),e("WkyA"),e("chpi");class i
{}const u
={breadcrumbs
:"Images"},s
={breadcrumbs
:"Namespaces"},a
={breadcrumbs
:"Trash"},o
={breadcrumbs
:"Overall Performance"},r
={breadcrumbs
:t
.a
.CREATE
},d
={breadcrumbs
:t
.a
.EDIT
},c
={breadcrumbs
:t
.a
.CLONE
},m
={breadcrumbs
:t
.a
.COPY
},p
={breadcrumbs
:t
.a
.COPY
},h
={breadcrumbs
:"Mirroring"},g
={breadcrumbs
:"iSCSI"},f
={breadcrumbs
:"Overview"},v
={breadcrumbs
:"Targets"},b
={breadcrumbs
:t
.a
.CREATE
},C
={breadcrumbs
:t
.a
.EDIT
};class S
{}},kccj:function(l
,n
,e
){"use strict";e
.d(n
,"a",(function(){return t
}));class t
{}},l7Jr:function(l
,n
,e
){"use strict";var t
=e("8Y7J"),i
=e("mXUL"),u
=e("+gVj"),s
=e("eF8U"),a
=e("jMP8"),o
=e("EEJc"),r
=e("ajRT"),d
=e("s7LF"),c
=e("SVse"),m
=e("gp3X"),p
=e("sb0X"),h
=e("KVJa"),g
=e("Z21x"),f
=e("sne2"),v
=e("a6qe"),b
=e("LqlI"),C
=e("my5R");e
.d(n
,"a",(function(){return w
}));var S
=t
["ɵcrt"]({encapsulation
:0,styles
:[[""]],data
:{}});function _(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,6,"div",[["class","form-group row"]],[[2,"has-error",null],[2,"has-success",null]],null,null,i
.b
,i
.a
)),t
["ɵdid"](1,1163264,null,2,u
.c
,[t
.ElementRef
,u
.g
],null,null),t
["ɵqud"](603979776,1,{FormControlNames
:1}),t
["ɵqud"](603979776,2,{messagesBlock
:0}),(l()(),t
["ɵeld"](4,0,null,0,2,"div",[["class","col-sm-12"]],null,null,null,null,null)),(l()(),t
["ɵeld"](5,0,null,null,1,"cd-iscsi-setting",[],null,null,null,s
.b
,s
.a
)),t
["ɵdid"](6,114688,null,0,a
.a
,[],{settingsForm
:[0,"settingsForm"],formDir
:[1,"formDir"],setting
:[2,"setting"],limits
:[3,"limits"]},null)],(function(l
,n
){var e
=n
.component
;l(n
,1,0),l(n
,6,0,e
.settingsForm
,t
["ɵnov"](n
.parent
,7),n
.context
.$implicit
.key
,e
.getTargetControlLimits(n
.context
.$implicit
.key
))}),(function(l
,n
){l(n
,0,0,t
["ɵnov"](n
,1).hasErrors
,t
["ɵnov"](n
,1).hasSuccess
)}))}function R(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,23,"cd-modal",[],null,null,null,o
.c
,o
.b
)),t
["ɵdid"](1,49152,null,0,r
.a
,[],{modalRef
:[0,"modalRef"]},null),(l()(),t
["ɵeld"](2,0,null,0,1,null,null,null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["Advanced Settings"])),(l()(),t
["ɵeld"](4,0,null,1,19,null,null,null,null,null,null,null)),(l()(),t
["ɵeld"](5,0,null,null,18,"form",[["name","settingsForm"],["novalidate",""]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"submit"],[null,"reset"]],(function(l
,n
,e
){var i
=!0;return"submit"===n
&&(i
=!1!==t
["ɵnov"](l
,7).onSubmit(e
)&&i
),"reset"===n
&&(i
=!1!==t
["ɵnov"](l
,7).onReset()&&i
),"submit"===n
&&(i
=!1!==t
["ɵnov"](l
,10).onSubmit()&&i
),i
}),null,null)),t
["ɵdid"](6,16384,null,0,d
.G
,[],null,null),t
["ɵdid"](7,540672,[["formDir",4]],0,d
.l
,[[8,null],[8,null]],{form
:[0,"form"]},null),t
["ɵprd"](2048,null,d
.d
,null,[d
.l
]),t
["ɵdid"](9,16384,null,0,d
.s
,[[4,d
.d
]],null,null),t
["ɵdid"](10,16384,null,0,u
.d
,[],{formGroup
:[0,"formGroup"]},null),(l()(),t
["ɵeld"](11,0,null,null,5,"div",[["class","modal-body"]],null,null,null,null,null)),(l()(),t
["ɵeld"](12,0,null,null,1,"p",[["class","alert-warning"]],null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["Changing these parameters from their default values is usually not necessary."])),(l()(),t
["ɵand"](16777216,null,null,2,null,_
)),t
["ɵdid"](15,278528,null,0,c
.NgForOf
,[t
.ViewContainerRef
,t
.TemplateRef
,t
.IterableDiffers
],{ngForOf
:[0,"ngForOf"]},null),t
["ɵpid"](0,c
.KeyValuePipe
,[t
.KeyValueDiffers
]),(l()(),t
["ɵeld"](17,0,null,null,6,"div",[["class","modal-footer"]],null,null,null,null,null)),(l()(),t
["ɵeld"](18,0,null,null,5,"div",[["class","button-group text-right"]],null,null,null,null,null)),(l()(),t
["ɵeld"](19,0,null,null,2,"cd-submit-button",[],null,[[null,"submitAction"]],(function(l
,n
,e
){var t
=!0;return"submitAction"===n
&&(t
=!1!==l
.component
.save()&&t
),t
}),m
.b
,m
.a
)),t
["ɵdid"](20,114688,null,0,p
.a
,[t
.ElementRef
],{form
:[0,"form"]},{submitAction
:"submitAction"}),(l()(),t
["ɵted"](-1,0,["Confirm"])),(l()(),t
["ɵeld"](22,0,null,null,1,"cd-back-button",[["name","Cancel"]],null,null,null,h
.b
,h
.a
)),t
["ɵdid"](23,49152,null,0,g
.a
,[c
.Location
,f
.b
],{name
:[0,"name"],back
:[1,"back"]},null)],(function(l
,n
){var e
=n
.component
;l(n
,1,0,e
.modalRef
),l(n
,7,0,e
.settingsForm
),l(n
,10,0,e
.settingsForm
),l(n
,15,0,t
["ɵunv"](n
,15,0,t
["ɵnov"](n
,16).transform(e
.settingsForm
.controls
))),l(n
,20,0,e
.settingsForm
),l(n
,23,0,"Cancel",e
.modalRef
.hide
)}),(function(l
,n
){l(n
,5,0,t
["ɵnov"](n
,9).ngClassUntouched
,t
["ɵnov"](n
,9).ngClassTouched
,t
["ɵnov"](n
,9).ngClassPristine
,t
["ɵnov"](n
,9).ngClassDirty
,t
["ɵnov"](n
,9).ngClassValid
,t
["ɵnov"](n
,9).ngClassInvalid
,t
["ɵnov"](n
,9).ngClassPending
)}))}function y(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,1,"cd-iscsi-target-iqn-settings-modal",[],null,null,null,R
,S
)),t
["ɵdid"](1,114688,null,0,v
.a
,[b
.a
,C
.a
],null,null)],(function(l
,n
){l(n
,1,0)}),null)}var w
=t
["ɵccf"]("cd-iscsi-target-iqn-settings-modal",v
.a
,y
,{},{},[])},lArG:function(l
,n
,e
){"use strict";e
.d(n
,"a",(function(){return t
}));class t
{}},"lz+O":function(l
,n
,e
){"use strict";var t
=e("8Y7J"),i
=e("s7LF"),u
=e("ANnk"),s
=e("f/UV"),a
=e("aexS"),o
=e("+gVj"),r
=e("SVse"),d
=e("EEJc"),c
=e("ajRT"),m
=e("mXUL"),p
=e("gp3X"),h
=e("sb0X"),g
=e("KVJa"),f
=e("Z21x"),v
=e("sne2"),b
=e("WxU5"),C
=e("F83c"),S
=e("LqlI"),_
=e("2EZI"),R
=e("Ekvf"),y
=e("kn/O");e
.d(n
,"a",(function(){return V
}));var w
=t
["ɵcrt"]({encapsulation
:0,styles
:[[""]],data
:{}});function k(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,7,"input",[["class","form-control"],["formControlName","poolName"],["placeholder","Pool name..."],["type","text"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"is-valid",null],[2,"is-invalid",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],(function(l
,n
,e
){var i
=!0;return"input"===n
&&(i
=!1!==t
["ɵnov"](l
,1)._handleInput(e
.target
.value
)&&i
),"blur"===n
&&(i
=!1!==t
["ɵnov"](l
,1).onTouched()&&i
),"compositionstart"===n
&&(i
=!1!==t
["ɵnov"](l
,1)._compositionStart()&&i
),"compositionend"===n
&&(i
=!1!==t
["ɵnov"](l
,1)._compositionEnd(e
.target
.value
)&&i
),i
}),null,null)),t
["ɵdid"](1,16384,null,0,i
.e
,[t
.Renderer2
,t
.ElementRef
,[2,i
.b
]],null,null),t
["ɵprd"](1024,null,i
.p
,(function(l
){return[l
]}),[i
.e
]),t
["ɵdid"](3,671744,[[1,4]],0,i
.j
,[[3,i
.d
],[8,null],[8,null],[6,i
.p
],[2,i
.E
]],{name
:[0,"name"]},null),t
["ɵprd"](2048,null,i
.q
,null,[i
.j
]),t
["ɵdid"](5,16384,null,0,i
.r
,[[4,i
.q
]],null,null),t
["ɵdid"](6,4210688,null,0,u
.a
,[[2,s
.a
],a
.a
,t
.ElementRef
],null,null),t
["ɵdid"](7,16384,null,0,o
.h
,[[3,i
.d
],o
.a
],{formControlName
:[0,"formControlName"]},null)],(function(l
,n
){l(n
,3,0,"poolName"),l(n
,7,0,"poolName")}),(function(l
,n
){l(n
,0,0,t
["ɵnov"](n
,5).ngClassUntouched
,t
["ɵnov"](n
,5).ngClassTouched
,t
["ɵnov"](n
,5).ngClassPristine
,t
["ɵnov"](n
,5).ngClassDirty
,t
["ɵnov"](n
,5).ngClassValid
,t
["ɵnov"](n
,5).ngClassInvalid
,t
["ɵnov"](n
,5).ngClassPending
,t
["ɵnov"](n
,7).validClass
,t
["ɵnov"](n
,7).invalidClass
)}))}function I(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,3,"option",[],null,null,null,null,null)),t
["ɵdid"](1,147456,null,0,i
.v
,[t
.ElementRef
,t
.Renderer2
,[2,i
.A
]],{value
:[0,"value"]},null),t
["ɵdid"](2,147456,null,0,i
.F
,[t
.ElementRef
,t
.Renderer2
,[8,null]],{value
:[0,"value"]},null),(l()(),t
["ɵted"](3,null,["",""]))],(function(l
,n
){l(n
,1,0,n
.context
.$implicit
),l(n
,2,0,n
.context
.$implicit
)}),(function(l
,n
){l(n
,3,0,n
.context
.$implicit
)}))}function E(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,13,"select",[["class","form-control custom-select"],["formControlName","poolName"],["id","poolName"],["name","poolName"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"is-valid",null],[2,"is-invalid",null]],[[null,"change"],[null,"blur"]],(function(l
,n
,e
){var i
=!0;return"change"===n
&&(i
=!1!==t
["ɵnov"](l
,1).onChange(e
.target
.value
)&&i
),"blur"===n
&&(i
=!1!==t
["ɵnov"](l
,1).onTouched()&&i
),i
}),null,null)),t
["ɵdid"](1,16384,null,0,i
.A
,[t
.Renderer2
,t
.ElementRef
],null,null),t
["ɵprd"](1024,null,i
.p
,(function(l
){return[l
]}),[i
.A
]),t
["ɵdid"](3,671744,[[1,4]],0,i
.j
,[[3,i
.d
],[8,null],[8,null],[6,i
.p
],[2,i
.E
]],{name
:[0,"name"]},null),t
["ɵprd"](2048,null,i
.q
,null,[i
.j
]),t
["ɵdid"](5,16384,null,0,i
.r
,[[4,i
.q
]],null,null),t
["ɵdid"](6,4210688,null,0,u
.a
,[[2,s
.a
],a
.a
,t
.ElementRef
],null,null),t
["ɵdid"](7,16384,null,0,o
.h
,[[3,i
.d
],o
.a
],{formControlName
:[0,"formControlName"]},null),(l()(),t
["ɵeld"](8,0,null,null,3,"option",[["value",""]],null,null,null,null,null)),t
["ɵdid"](9,147456,null,0,i
.v
,[t
.ElementRef
,t
.Renderer2
,[2,i
.A
]],{value
:[0,"value"]},null),t
["ɵdid"](10,147456,null,0,i
.F
,[t
.ElementRef
,t
.Renderer2
,[8,null]],{value
:[0,"value"]},null),(l()(),t
["ɵted"](-1,null,["All"])),(l()(),t
["ɵand"](16777216,null,null,1,null,I
)),t
["ɵdid"](13,278528,null,0,r
.NgForOf
,[t
.ViewContainerRef
,t
.TemplateRef
,t
.IterableDiffers
],{ngForOf
:[0,"ngForOf"]},null)],(function(l
,n
){var e
=n
.component
;l(n
,3,0,"poolName"),l(n
,7,0,"poolName"),l(n
,9,0,""),l(n
,10,0,""),l(n
,13,0,e
.pools
)}),(function(l
,n
){l(n
,0,0,t
["ɵnov"](n
,5).ngClassUntouched
,t
["ɵnov"](n
,5).ngClassTouched
,t
["ɵnov"](n
,5).ngClassPristine
,t
["ɵnov"](n
,5).ngClassDirty
,t
["ɵnov"](n
,5).ngClassValid
,t
["ɵnov"](n
,5).ngClassInvalid
,t
["ɵnov"](n
,5).ngClassPending
,t
["ɵnov"](n
,7).validClass
,t
["ɵnov"](n
,7).invalidClass
)}))}function N(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,41,"cd-modal",[],null,null,null,d
.c
,d
.b
)),t
["ɵdid"](1,49152,null,0,c
.a
,[],{modalRef
:[0,"modalRef"]},null),(l()(),t
["ɵeld"](2,0,null,0,1,null,null,null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["Purge Trash"])),(l()(),t
["ɵeld"](4,0,null,1,37,null,null,null,null,null,null,null)),(l()(),t
["ɵeld"](5,0,null,null,36,"form",[["class","form"],["name","purgeForm"],["novalidate",""]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"submit"],[null,"reset"]],(function(l
,n
,e
){var i
=!0;return"submit"===n
&&(i
=!1!==t
["ɵnov"](l
,7).onSubmit(e
)&&i
),"reset"===n
&&(i
=!1!==t
["ɵnov"](l
,7).onReset()&&i
),"submit"===n
&&(i
=!1!==t
["ɵnov"](l
,10).onSubmit()&&i
),i
}),null,null)),t
["ɵdid"](6,16384,null,0,i
.G
,[],null,null),t
["ɵdid"](7,540672,[["formDir",4]],0,i
.l
,[[8,null],[8,null]],{form
:[0,"form"]},null),t
["ɵprd"](2048,null,i
.d
,null,[i
.l
]),t
["ɵdid"](9,16384,null,0,i
.s
,[[4,i
.d
]],null,null),t
["ɵdid"](10,16384,null,0,o
.d
,[],{formGroup
:[0,"formGroup"]},null),(l()(),t
["ɵeld"](11,0,null,null,23,"div",[["class","modal-body"]],null,null,null,null,null)),(l()(),t
["ɵeld"](12,0,null,null,12,"p",[],null,null,null,null,null)),(l()(),t
["ɵeld"](13,0,null,null,1,null,null,null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["To purge, select one or"])),(l()(),t
["ɵted"](-1,null,[" "])),(l()(),t
["ɵeld"](16,0,null,null,1,"kbd",[],null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["All"])),(l()(),t
["ɵted"](-1,null,[" "])),(l()(),t
["ɵeld"](19,0,null,null,1,null,null,null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["pools and click"])),(l()(),t
["ɵted"](-1,null,[" "])),(l()(),t
["ɵeld"](22,0,null,null,1,"kbd",[],null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["Purge Trash"])),(l()(),t
["ɵted"](-1,null,[". "])),(l()(),t
["ɵeld"](25,0,null,null,9,"div",[["class","form-group"]],[[2,"has-error",null],[2,"has-success",null]],null,null,m
.b
,m
.a
)),t
["ɵdid"](26,1163264,null,2,o
.c
,[t
.ElementRef
,o
.g
],null,null),t
["ɵqud"](603979776,1,{FormControlNames
:1}),t
["ɵqud"](603979776,2,{messagesBlock
:0}),(l()(),t
["ɵeld"](29,0,null,0,1,"label",[["class","col-form-label mx-auto"]],null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["Pool:"])),(l()(),t
["ɵand"](16777216,null,0,1,null,k
)),t
["ɵdid"](32,16384,null,0,r
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵand"](16777216,null,0,1,null,E
)),t
["ɵdid"](34,16384,null,0,r
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵeld"](35,0,null,null,6,"div",[["class","modal-footer"]],null,null,null,null,null)),(l()(),t
["ɵeld"](36,0,null,null,5,"div",[["class","button-group text-right"]],null,null,null,null,null)),(l()(),t
["ɵeld"](37,0,null,null,2,"cd-submit-button",[["id","purgeFormButton"]],null,[[null,"submitAction"]],(function(l
,n
,e
){var t
=!0;return"submitAction"===n
&&(t
=!1!==l
.component
.purge()&&t
),t
}),p
.b
,p
.a
)),t
["ɵdid"](38,114688,null,0,h
.a
,[t
.ElementRef
],{form
:[0,"form"]},{submitAction
:"submitAction"}),(l()(),t
["ɵted"](-1,0,["Purge Trash"])),(l()(),t
["ɵeld"](40,0,null,null,1,"cd-back-button",[["name","Cancel"]],null,null,null,g
.b
,g
.a
)),t
["ɵdid"](41,49152,null,0,f
.a
,[r
.Location
,v
.b
],{name
:[0,"name"],back
:[1,"back"]},null)],(function(l
,n
){var e
=n
.component
;l(n
,1,0,e
.modalRef
),l(n
,7,0,e
.purgeForm
),l(n
,10,0,e
.purgeForm
),l(n
,26,0),l(n
,32,0,!e
.poolPermission
.read
),l(n
,34,0,e
.poolPermission
.read
),l(n
,38,0,e
.purgeForm
),l(n
,41,0,"Cancel",e
.modalRef
.hide
)}),(function(l
,n
){l(n
,5,0,t
["ɵnov"](n
,9).ngClassUntouched
,t
["ɵnov"](n
,9).ngClassTouched
,t
["ɵnov"](n
,9).ngClassPristine
,t
["ɵnov"](n
,9).ngClassDirty
,t
["ɵnov"](n
,9).ngClassValid
,t
["ɵnov"](n
,9).ngClassInvalid
,t
["ɵnov"](n
,9).ngClassPending
),l(n
,25,0,t
["ɵnov"](n
,26).hasErrors
,t
["ɵnov"](n
,26).hasSuccess
)}))}function F(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,1,"cd-rbd-trash-purge-modal",[],null,null,null,N
,w
)),t
["ɵdid"](1,114688,null,0,b
.a
,[a
.a
,C
.a
,S
.a
,_
.a
,R
.a
,y
.a
],null,null)],(function(l
,n
){l(n
,1,0)}),null)}var V
=t
["ɵccf"]("cd-rbd-trash-purge-modal",b
.a
,F
,{},{},[])},my5R:function(l
,n
,e
){"use strict";e
.d(n
,"a",(function(){return o
}));var t
=e("mrSG"),i
=e("IheW"),u
=e("xTzq"),s
=e("8Y7J"),a
=e("pL04");let o
=(()=>{let l
=class{constructor(l
){this.http
=l
}listTargets(){return this.http
.get("api/iscsi/target")}getTarget(l
){return this.http
.get("api/iscsi/target/"+l
)}updateTarget(l
,n
){return this.http
.put("api/iscsi/target/"+l
,n
,{observe
:"response"})}status(){return this.http
.get("ui-api/iscsi/status")}settings(){return this.http
.get("ui-api/iscsi/settings")}version(){return this.http
.get("ui-api/iscsi/version")}portals(){return this.http
.get("ui-api/iscsi/portals")}createTarget(l
){return this.http
.post("api/iscsi/target",l
,{observe
:"response"})}deleteTarget(l
){return this.http
.delete("api/iscsi/target/"+l
,{observe
:"response"})}getDiscovery(){return this.http
.get("api/iscsi/discoveryauth")}updateDiscovery(l
){return this.http
.put("api/iscsi/discoveryauth",l
)}overview(){return this.http
.get("ui-api/iscsi/overview")}};return l
.ngInjectableDef
=s
["ɵɵdefineInjectable"]({factory:function(){return new l(s
["ɵɵinject"](i
.c
))},token
:l
,providedIn
:a
.a
}),l
=t
.__decorate([u
.a
,t
.__metadata("design:paramtypes",[i
.c
])],l
),l
})()},nP0W:function(l
,n
,e
){"use strict";var t
=e("8Y7J"),i
=e("s7LF"),u
=e("EEJc"),s
=e("ajRT"),a
=e("+gVj"),o
=e("mXUL"),r
=e("ANnk"),d
=e("f/UV"),c
=e("aexS"),m
=e("SVse"),p
=e("gp3X"),h
=e("sb0X"),g
=e("KVJa"),f
=e("Z21x"),v
=e("sne2"),b
=e("aa9H"),C
=e("LqlI"),S
=e("GiVz"),_
=e("XED3"),R
=e("kn/O");e
.d(n
,"a",(function(){return N
}));var y
=t
["ɵcrt"]({encapsulation
:0,styles
:[[""]],data
:{}});function w(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,3,"option",[],null,null,null,null,null)),t
["ɵdid"](1,147456,null,0,i
.v
,[t
.ElementRef
,t
.Renderer2
,[2,i
.A
]],{value
:[0,"value"]},null),t
["ɵdid"](2,147456,null,0,i
.F
,[t
.ElementRef
,t
.Renderer2
,[8,null]],{value
:[0,"value"]},null),(l()(),t
["ɵted"](3,null,["",""]))],(function(l
,n
){l(n
,1,0,n
.context
.$implicit
.id
),l(n
,2,0,n
.context
.$implicit
.id
)}),(function(l
,n
){l(n
,3,0,n
.context
.$implicit
.name
)}))}function k(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,1,"span",[["class","invalid-feedback"]],null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["Peer clusters must be removed prior to disabling mirror."]))],null,null)}function I(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,46,"cd-modal",[],null,null,null,u
.c
,u
.b
)),t
["ɵdid"](1,49152,null,0,s
.a
,[],{modalRef
:[0,"modalRef"]},null),(l()(),t
["ɵeld"](2,0,null,0,1,null,null,null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["Edit pool mirror mode"])),(l()(),t
["ɵeld"](4,0,null,1,42,null,null,null,null,null,null,null)),(l()(),t
["ɵeld"](5,0,null,null,41,"form",[["class","form"],["name","editModeForm"],["novalidate",""]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"submit"],[null,"reset"]],(function(l
,n
,e
){var i
=!0;return"submit"===n
&&(i
=!1!==t
["ɵnov"](l
,7).onSubmit(e
)&&i
),"reset"===n
&&(i
=!1!==t
["ɵnov"](l
,7).onReset()&&i
),"submit"===n
&&(i
=!1!==t
["ɵnov"](l
,10).onSubmit()&&i
),i
}),null,null)),t
["ɵdid"](6,16384,null,0,i
.G
,[],null,null),t
["ɵdid"](7,540672,[["formDir",4]],0,i
.l
,[[8,null],[8,null]],{form
:[0,"form"]},null),t
["ɵprd"](2048,null,i
.d
,null,[i
.l
]),t
["ɵdid"](9,16384,null,0,i
.s
,[[4,i
.d
]],null,null),t
["ɵdid"](10,16384,null,0,a
.d
,[],{formGroup
:[0,"formGroup"]},null),(l()(),t
["ɵeld"](11,0,null,null,28,"div",[["class","modal-body"]],null,null,null,null,null)),(l()(),t
["ɵeld"](12,0,null,null,8,"p",[],null,null,null,null,null)),(l()(),t
["ɵeld"](13,0,null,null,7,null,null,null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["To edit the mirror mode for pool "])),(l()(),t
["ɵeld"](15,0,null,null,1,"kbd",[],null,null,null,null,null)),(l()(),t
["ɵted"](16,null,["",""])),(l()(),t
["ɵted"](-1,null,[", select a new mode from the list and click "])),(l()(),t
["ɵeld"](18,0,null,null,1,"kbd",[],null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["Update"])),(l()(),t
["ɵted"](-1,null,["."])),(l()(),t
["ɵeld"](21,0,null,null,18,"div",[["class","form-group"]],[[2,"has-error",null],[2,"has-success",null]],null,null,o
.b
,o
.a
)),t
["ɵdid"](22,1163264,null,2,a
.c
,[t
.ElementRef
,a
.g
],null,null),t
["ɵqud"](603979776,1,{FormControlNames
:1}),t
["ɵqud"](603979776,2,{messagesBlock
:0}),(l()(),t
["ɵeld"](25,0,null,0,2,"label",[["class","col-form-label"],["for","mirrorMode"]],null,null,null,null,null)),(l()(),t
["ɵeld"](26,0,null,null,1,"span",[],null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["Mode"])),(l()(),t
["ɵeld"](28,0,null,0,9,"select",[["class","form-control custom-select"],["formControlName","mirrorMode"],["id","mirrorMode"],["name","mirrorMode"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"is-valid",null],[2,"is-invalid",null]],[[null,"change"],[null,"blur"]],(function(l
,n
,e
){var i
=!0;return"change"===n
&&(i
=!1!==t
["ɵnov"](l
,30).onChange(e
.target
.value
)&&i
),"blur"===n
&&(i
=!1!==t
["ɵnov"](l
,30).onTouched()&&i
),i
}),null,null)),t
["ɵdid"](29,4210688,null,0,r
.a
,[[2,d
.a
],c
.a
,t
.ElementRef
],null,null),t
["ɵdid"](30,16384,null,0,i
.A
,[t
.Renderer2
,t
.ElementRef
],null,null),t
["ɵprd"](1024,null,i
.p
,(function(l
){return[l
]}),[i
.A
]),t
["ɵdid"](32,671744,[[1,4]],0,i
.j
,[[3,i
.d
],[8,null],[8,null],[6,i
.p
],[2,i
.E
]],{name
:[0,"name"]},null),t
["ɵprd"](2048,null,i
.q
,null,[i
.j
]),t
["ɵdid"](34,16384,null,0,i
.r
,[[4,i
.q
]],null,null),t
["ɵdid"](35,16384,null,0,a
.h
,[[3,i
.d
],a
.a
],{formControlName
:[0,"formControlName"]},null),(l()(),t
["ɵand"](16777216,null,null,1,null,w
)),t
["ɵdid"](37,278528,null,0,m
.NgForOf
,[t
.ViewContainerRef
,t
.TemplateRef
,t
.IterableDiffers
],{ngForOf
:[0,"ngForOf"]},null),(l()(),t
["ɵand"](16777216,null,0,1,null,k
)),t
["ɵdid"](39,16384,null,0,m
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵeld"](40,0,null,null,6,"div",[["class","modal-footer"]],null,null,null,null,null)),(l()(),t
["ɵeld"](41,0,null,null,5,"div",[["class","button-group text-right"]],null,null,null,null,null)),(l()(),t
["ɵeld"](42,0,null,null,2,"cd-submit-button",[],null,[[null,"submitAction"]],(function(l
,n
,e
){var t
=!0;return"submitAction"===n
&&(t
=!1!==l
.component
.update()&&t
),t
}),p
.b
,p
.a
)),t
["ɵdid"](43,114688,null,0,h
.a
,[t
.ElementRef
],{form
:[0,"form"]},{submitAction
:"submitAction"}),(l()(),t
["ɵted"](-1,0,["Update"])),(l()(),t
["ɵeld"](45,0,null,null,1,"cd-back-button",[["name","Cancel"]],null,null,null,g
.b
,g
.a
)),t
["ɵdid"](46,49152,null,0,f
.a
,[m
.Location
,v
.b
],{name
:[0,"name"],back
:[1,"back"]},null)],(function(l
,n
){var e
=n
.component
;l(n
,1,0,e
.modalRef
),l(n
,7,0,e
.editModeForm
),l(n
,10,0,e
.editModeForm
),l(n
,22,0),l(n
,32,0,"mirrorMode"),l(n
,35,0,"mirrorMode"),l(n
,37,0,e
.mirrorModes
),l(n
,39,0,e
.editModeForm
.showError("mirrorMode",t
["ɵnov"](n
,7),"cannotDisable")),l(n
,43,0,e
.editModeForm
),l(n
,46,0,"Cancel",e
.modalRef
.hide
)}),(function(l
,n
){var e
=n
.component
;l(n
,5,0,t
["ɵnov"](n
,9).ngClassUntouched
,t
["ɵnov"](n
,9).ngClassTouched
,t
["ɵnov"](n
,9).ngClassPristine
,t
["ɵnov"](n
,9).ngClassDirty
,t
["ɵnov"](n
,9).ngClassValid
,t
["ɵnov"](n
,9).ngClassInvalid
,t
["ɵnov"](n
,9).ngClassPending
),l(n
,16,0,e
.poolName
),l(n
,21,0,t
["ɵnov"](n
,22).hasErrors
,t
["ɵnov"](n
,22).hasSuccess
),l(n
,28,0,t
["ɵnov"](n
,34).ngClassUntouched
,t
["ɵnov"](n
,34).ngClassTouched
,t
["ɵnov"](n
,34).ngClassPristine
,t
["ɵnov"](n
,34).ngClassDirty
,t
["ɵnov"](n
,34).ngClassValid
,t
["ɵnov"](n
,34).ngClassInvalid
,t
["ɵnov"](n
,34).ngClassPending
,t
["ɵnov"](n
,35).validClass
,t
["ɵnov"](n
,35).invalidClass
)}))}function E(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,1,"cd-pool-edit-mode-modal",[],null,null,null,I
,y
)),t
["ɵdid"](1,245760,null,0,b
.a
,[C
.a
,S
.a
,_
.a
,R
.a
],null,null)],(function(l
,n
){l(n
,1,0)}),null)}var N
=t
["ɵccf"]("cd-pool-edit-mode-modal",b
.a
,E
,{},{},[])},nhAp:function(l
,n
,e
){"use strict";var t
=e("8Y7J"),i
=e("mXUL"),u
=e("+gVj"),s
=e("s7LF"),a
=e("ANnk"),o
=e("f/UV"),r
=e("aexS"),d
=e("SVse"),c
=e("eF8U"),m
=e("jMP8"),p
=e("uYzU"),h
=e("EEJc"),g
=e("ajRT"),f
=e("gp3X"),v
=e("sb0X"),b
=e("KVJa"),C
=e("Z21x"),S
=e("sne2"),_
=e("Z4cD"),R
=e("LqlI"),y
=e("my5R");e
.d(n
,"a",(function(){return P
}));var w
=t
["ɵcrt"]({encapsulation
:0,styles
:[[""]],data
:{}});function k(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,1,"span",[["class","invalid-feedback"]],null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["This field is required."]))],null,null)}function I(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,35,"span",[],null,null,null,null,null)),(l()(),t
["ɵeld"](1,0,null,null,1,"legend",[["class","cd-header"]],null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["Identifier"])),(l()(),t
["ɵeld"](3,0,null,null,17,"div",[["class","form-group row"]],[[2,"has-error",null],[2,"has-success",null]],null,null,i
.b
,i
.a
)),t
["ɵdid"](4,1163264,null,2,u
.c
,[t
.ElementRef
,u
.g
],null,null),t
["ɵqud"](603979776,1,{FormControlNames
:1}),t
["ɵqud"](603979776,2,{messagesBlock
:0}),(l()(),t
["ɵeld"](7,0,null,0,13,"div",[["class","col-sm-12"]],null,null,null,null,null)),(l()(),t
["ɵeld"](8,0,null,null,1,"label",[["class","col-form-label required"],["for","lun"]],null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["lun"])),(l()(),t
["ɵeld"](10,0,null,null,8,"input",[["class","form-control"],["formControlName","lun"],["id","lun"],["name","lun"],["type","number"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"is-valid",null],[2,"is-invalid",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"],[null,"change"]],(function(l
,n
,e
){var i
=!0;return"input"===n
&&(i
=!1!==t
["ɵnov"](l
,11)._handleInput(e
.target
.value
)&&i
),"blur"===n
&&(i
=!1!==t
["ɵnov"](l
,11).onTouched()&&i
),"compositionstart"===n
&&(i
=!1!==t
["ɵnov"](l
,11)._compositionStart()&&i
),"compositionend"===n
&&(i
=!1!==t
["ɵnov"](l
,11)._compositionEnd(e
.target
.value
)&&i
),"change"===n
&&(i
=!1!==t
["ɵnov"](l
,12).onChange(e
.target
.value
)&&i
),"input"===n
&&(i
=!1!==t
["ɵnov"](l
,12).onChange(e
.target
.value
)&&i
),"blur"===n
&&(i
=!1!==t
["ɵnov"](l
,12).onTouched()&&i
),i
}),null,null)),t
["ɵdid"](11,16384,null,0,s
.e
,[t
.Renderer2
,t
.ElementRef
,[2,s
.b
]],null,null),t
["ɵdid"](12,16384,null,0,s
.w
,[t
.Renderer2
,t
.ElementRef
],null,null),t
["ɵprd"](1024,null,s
.p
,(function(l
,n
){return[l
,n
]}),[s
.e
,s
.w
]),t
["ɵdid"](14,671744,[[1,4]],0,s
.j
,[[3,s
.d
],[8,null],[8,null],[6,s
.p
],[2,s
.E
]],{name
:[0,"name"]},null),t
["ɵprd"](2048,null,s
.q
,null,[s
.j
]),t
["ɵdid"](16,16384,null,0,s
.r
,[[4,s
.q
]],null,null),t
["ɵdid"](17,4210688,null,0,a
.a
,[[2,o
.a
],r
.a
,t
.ElementRef
],null,null),t
["ɵdid"](18,16384,null,0,u
.h
,[[3,s
.d
],u
.a
],{formControlName
:[0,"formControlName"]},null),(l()(),t
["ɵand"](16777216,null,null,1,null,k
)),t
["ɵdid"](20,16384,null,0,d
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵeld"](21,0,null,null,14,"div",[["class","form-group row"]],[[2,"has-error",null],[2,"has-success",null]],null,null,i
.b
,i
.a
)),t
["ɵdid"](22,1163264,null,2,u
.c
,[t
.ElementRef
,u
.g
],null,null),t
["ɵqud"](603979776,3,{FormControlNames
:1}),t
["ɵqud"](603979776,4,{messagesBlock
:0}),(l()(),t
["ɵeld"](25,0,null,0,10,"div",[["class","col-sm-12"]],null,null,null,null,null)),(l()(),t
["ɵeld"](26,0,null,null,1,"label",[["class","col-form-label"],["for","wwn"]],null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["wwn"])),(l()(),t
["ɵeld"](28,0,null,null,7,"input",[["class","form-control"],["formControlName","wwn"],["id","wwn"],["name","wwn"],["type","text"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"is-valid",null],[2,"is-invalid",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],(function(l
,n
,e
){var i
=!0;return"input"===n
&&(i
=!1!==t
["ɵnov"](l
,29)._handleInput(e
.target
.value
)&&i
),"blur"===n
&&(i
=!1!==t
["ɵnov"](l
,29).onTouched()&&i
),"compositionstart"===n
&&(i
=!1!==t
["ɵnov"](l
,29)._compositionStart()&&i
),"compositionend"===n
&&(i
=!1!==t
["ɵnov"](l
,29)._compositionEnd(e
.target
.value
)&&i
),i
}),null,null)),t
["ɵdid"](29,16384,null,0,s
.e
,[t
.Renderer2
,t
.ElementRef
,[2,s
.b
]],null,null),t
["ɵprd"](1024,null,s
.p
,(function(l
){return[l
]}),[s
.e
]),t
["ɵdid"](31,671744,[[3,4]],0,s
.j
,[[3,s
.d
],[8,null],[8,null],[6,s
.p
],[2,s
.E
]],{name
:[0,"name"]},null),t
["ɵprd"](2048,null,s
.q
,null,[s
.j
]),t
["ɵdid"](33,16384,null,0,s
.r
,[[4,s
.q
]],null,null),t
["ɵdid"](34,4210688,null,0,a
.a
,[[2,o
.a
],r
.a
,t
.ElementRef
],null,null),t
["ɵdid"](35,16384,null,0,u
.h
,[[3,s
.d
],u
.a
],{formControlName
:[0,"formControlName"]},null)],(function(l
,n
){var e
=n
.component
;l(n
,4,0),l(n
,14,0,"lun"),l(n
,18,0,"lun"),l(n
,20,0,e
.settingsForm
.showError("lun",t
["ɵnov"](n
.parent
,12),"required")),l(n
,22,0),l(n
,31,0,"wwn"),l(n
,35,0,"wwn")}),(function(l
,n
){l(n
,3,0,t
["ɵnov"](n
,4).hasErrors
,t
["ɵnov"](n
,4).hasSuccess
),l(n
,10,0,t
["ɵnov"](n
,16).ngClassUntouched
,t
["ɵnov"](n
,16).ngClassTouched
,t
["ɵnov"](n
,16).ngClassPristine
,t
["ɵnov"](n
,16).ngClassDirty
,t
["ɵnov"](n
,16).ngClassValid
,t
["ɵnov"](n
,16).ngClassInvalid
,t
["ɵnov"](n
,16).ngClassPending
,t
["ɵnov"](n
,18).validClass
,t
["ɵnov"](n
,18).invalidClass
),l(n
,21,0,t
["ɵnov"](n
,22).hasErrors
,t
["ɵnov"](n
,22).hasSuccess
),l(n
,28,0,t
["ɵnov"](n
,33).ngClassUntouched
,t
["ɵnov"](n
,33).ngClassTouched
,t
["ɵnov"](n
,33).ngClassPristine
,t
["ɵnov"](n
,33).ngClassDirty
,t
["ɵnov"](n
,33).ngClassValid
,t
["ɵnov"](n
,33).ngClassInvalid
,t
["ɵnov"](n
,33).ngClassPending
,t
["ɵnov"](n
,35).validClass
,t
["ɵnov"](n
,35).invalidClass
)}))}function E(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,4,"option",[],null,null,null,null,null)),t
["ɵdid"](1,147456,null,0,s
.v
,[t
.ElementRef
,t
.Renderer2
,[2,s
.A
]],{value
:[0,"value"]},null),t
["ɵdid"](2,147456,null,0,s
.F
,[t
.ElementRef
,t
.Renderer2
,[8,null]],{value
:[0,"value"]},null),(l()(),t
["ɵted"](3,null,["",""])),t
["ɵppd"](4,1)],(function(l
,n
){l(n
,1,0,n
.context
.$implicit
),l(n
,2,0,n
.context
.$implicit
)}),(function(l
,n
){var e
=t
["ɵunv"](n
,3,0,l(n
,4,0,t
["ɵnov"](n
.parent
,0),n
.context
.$implicit
));l(n
,3,0,e
)}))}function N(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,6,"div",[["class","form-group row"]],[[2,"has-error",null],[2,"has-success",null]],null,null,i
.b
,i
.a
)),t
["ɵdid"](1,1163264,null,2,u
.c
,[t
.ElementRef
,u
.g
],null,null),t
["ɵqud"](603979776,7,{FormControlNames
:1}),t
["ɵqud"](603979776,8,{messagesBlock
:0}),(l()(),t
["ɵeld"](4,0,null,0,2,"div",[["class","col-sm-12"]],null,null,null,null,null)),(l()(),t
["ɵeld"](5,0,null,null,1,"cd-iscsi-setting",[],null,null,null,c
.b
,c
.a
)),t
["ɵdid"](6,114688,null,0,m
.a
,[],{settingsForm
:[0,"settingsForm"],formDir
:[1,"formDir"],setting
:[2,"setting"],limits
:[3,"limits"]},null)],(function(l
,n
){var e
=n
.component
;l(n
,1,0),l(n
,6,0,e
.settingsForm
,t
["ɵnov"](n
.parent
.parent
.parent
,12),n
.context
.$implicit
.key
,e
.getDiskControlLimits(n
.parent
.parent
.context
.$implicit
,n
.context
.$implicit
.key
))}),(function(l
,n
){l(n
,0,0,t
["ɵnov"](n
,1).hasErrors
,t
["ɵnov"](n
,1).hasSuccess
)}))}function F(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,3,null,null,null,null,null,null,null)),(l()(),t
["ɵand"](16777216,null,null,2,null,N
)),t
["ɵdid"](2,278528,null,0,d
.NgForOf
,[t
.ViewContainerRef
,t
.TemplateRef
,t
.IterableDiffers
],{ngForOf
:[0,"ngForOf"]},null),t
["ɵpid"](0,d
.KeyValuePipe
,[t
.KeyValueDiffers
]),(l()(),t
["ɵand"](0,null,null,0))],(function(l
,n
){var e
=n
.component
;l(n
,2,0,t
["ɵunv"](n
,2,0,t
["ɵnov"](n
,3).transform(e
.disk_default_controls
[n
.parent
.context
.$implicit
])))}),null)}function V(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,2,null,null,null,null,null,null,null)),(l()(),t
["ɵand"](16777216,null,null,1,null,F
)),t
["ɵdid"](2,16384,null,0,d
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵand"](0,null,null,0))],(function(l
,n
){l(n
,2,0,n
.component
.settingsForm
.value
.backstore
===n
.context
.$implicit
)}),null)}function T(l
){return t
["ɵvid"](0,[t
["ɵpid"](0,p
.a
,[]),(l()(),t
["ɵeld"](1,0,null,null,47,"cd-modal",[],null,null,null,h
.c
,h
.b
)),t
["ɵdid"](2,49152,null,0,g
.a
,[],{modalRef
:[0,"modalRef"]},null),(l()(),t
["ɵeld"](3,0,null,0,5,null,null,null,null,null,null,null)),(l()(),t
["ɵeld"](4,0,null,null,1,null,null,null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["Configure"])),(l()(),t
["ɵted"](-1,null,[" "])),(l()(),t
["ɵeld"](7,0,null,null,1,"small",[],null,null,null,null,null)),(l()(),t
["ɵted"](8,null,["",""])),(l()(),t
["ɵeld"](9,0,null,1,39,null,null,null,null,null,null,null)),(l()(),t
["ɵeld"](10,0,null,null,38,"form",[["class","form"],["name","settingsForm"],["novalidate",""]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"submit"],[null,"reset"]],(function(l
,n
,e
){var i
=!0;return"submit"===n
&&(i
=!1!==t
["ɵnov"](l
,12).onSubmit(e
)&&i
),"reset"===n
&&(i
=!1!==t
["ɵnov"](l
,12).onReset()&&i
),"submit"===n
&&(i
=!1!==t
["ɵnov"](l
,15).onSubmit()&&i
),i
}),null,null)),t
["ɵdid"](11,16384,null,0,s
.G
,[],null,null),t
["ɵdid"](12,540672,[["formDir",4]],0,s
.l
,[[8,null],[8,null]],{form
:[0,"form"]},null),t
["ɵprd"](2048,null,s
.d
,null,[s
.l
]),t
["ɵdid"](14,16384,null,0,s
.s
,[[4,s
.d
]],null,null),t
["ɵdid"](15,16384,null,0,u
.d
,[],{formGroup
:[0,"formGroup"]},null),(l()(),t
["ɵeld"](16,0,null,null,25,"div",[["class","modal-body"]],null,null,null,null,null)),(l()(),t
["ɵeld"](17,0,null,null,1,"p",[["class","alert-warning"]],null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["Changing these parameters from their default values is usually not necessary."])),(l()(),t
["ɵand"](16777216,null,null,1,null,I
)),t
["ɵdid"](20,16384,null,0,d
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵeld"](21,0,null,null,1,"legend",[["class","cd-header"]],null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["Settings"])),(l()(),t
["ɵeld"](23,0,null,null,16,"div",[["class","form-group row"]],[[2,"has-error",null],[2,"has-success",null]],null,null,i
.b
,i
.a
)),t
["ɵdid"](24,1163264,null,2,u
.c
,[t
.ElementRef
,u
.g
],null,null),t
["ɵqud"](603979776,5,{FormControlNames
:1}),t
["ɵqud"](603979776,6,{messagesBlock
:0}),(l()(),t
["ɵeld"](27,0,null,0,12,"div",[["class","col-sm-12"]],null,null,null,null,null)),(l()(),t
["ɵeld"](28,0,null,null,1,"label",[["class","col-form-label"]],null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["Backstore"])),(l()(),t
["ɵeld"](30,0,null,null,9,"select",[["class","form-control custom-select"],["formControlName","backstore"],["id","backstore"],["name","backstore"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"is-valid",null],[2,"is-invalid",null]],[[null,"change"],[null,"blur"]],(function(l
,n
,e
){var i
=!0;return"change"===n
&&(i
=!1!==t
["ɵnov"](l
,31).onChange(e
.target
.value
)&&i
),"blur"===n
&&(i
=!1!==t
["ɵnov"](l
,31).onTouched()&&i
),i
}),null,null)),t
["ɵdid"](31,16384,null,0,s
.A
,[t
.Renderer2
,t
.ElementRef
],null,null),t
["ɵprd"](1024,null,s
.p
,(function(l
){return[l
]}),[s
.A
]),t
["ɵdid"](33,671744,[[5,4]],0,s
.j
,[[3,s
.d
],[8,null],[8,null],[6,s
.p
],[2,s
.E
]],{name
:[0,"name"]},null),t
["ɵprd"](2048,null,s
.q
,null,[s
.j
]),t
["ɵdid"](35,16384,null,0,s
.r
,[[4,s
.q
]],null,null),t
["ɵdid"](36,4210688,null,0,a
.a
,[[2,o
.a
],r
.a
,t
.ElementRef
],null,null),t
["ɵdid"](37,16384,null,0,u
.h
,[[3,s
.d
],u
.a
],{formControlName
:[0,"formControlName"]},null),(l()(),t
["ɵand"](16777216,null,null,1,null,E
)),t
["ɵdid"](39,278528,null,0,d
.NgForOf
,[t
.ViewContainerRef
,t
.TemplateRef
,t
.IterableDiffers
],{ngForOf
:[0,"ngForOf"]},null),(l()(),t
["ɵand"](16777216,null,null,1,null,V
)),t
["ɵdid"](41,278528,null,0,d
.NgForOf
,[t
.ViewContainerRef
,t
.TemplateRef
,t
.IterableDiffers
],{ngForOf
:[0,"ngForOf"]},null),(l()(),t
["ɵeld"](42,0,null,null,6,"div",[["class","modal-footer"]],null,null,null,null,null)),(l()(),t
["ɵeld"](43,0,null,null,5,"div",[["class","button-group text-right"]],null,null,null,null,null)),(l()(),t
["ɵeld"](44,0,null,null,2,"cd-submit-button",[],null,[[null,"submitAction"]],(function(l
,n
,e
){var t
=!0;return"submitAction"===n
&&(t
=!1!==l
.component
.save()&&t
),t
}),f
.b
,f
.a
)),t
["ɵdid"](45,114688,null,0,v
.a
,[t
.ElementRef
],{form
:[0,"form"]},{submitAction
:"submitAction"}),(l()(),t
["ɵted"](-1,0,["Confirm"])),(l()(),t
["ɵeld"](47,0,null,null,1,"cd-back-button",[["name","Cancel"]],null,null,null,b
.b
,b
.a
)),t
["ɵdid"](48,49152,null,0,C
.a
,[d
.Location
,S
.b
],{name
:[0,"name"],back
:[1,"back"]},null)],(function(l
,n
){var e
=n
.component
;l(n
,2,0,e
.modalRef
),l(n
,12,0,e
.settingsForm
),l(n
,15,0,e
.settingsForm
),l(n
,20,0,e
.api_version
>=1),l(n
,24,0),l(n
,33,0,"backstore"),l(n
,37,0,"backstore"),l(n
,39,0,e
.backstores
),l(n
,41,0,e
.backstores
),l(n
,45,0,e
.settingsForm
),l(n
,48,0,"Cancel",e
.modalRef
.hide
)}),(function(l
,n
){l(n
,8,0,n
.component
.image
),l(n
,10,0,t
["ɵnov"](n
,14).ngClassUntouched
,t
["ɵnov"](n
,14).ngClassTouched
,t
["ɵnov"](n
,14).ngClassPristine
,t
["ɵnov"](n
,14).ngClassDirty
,t
["ɵnov"](n
,14).ngClassValid
,t
["ɵnov"](n
,14).ngClassInvalid
,t
["ɵnov"](n
,14).ngClassPending
),l(n
,23,0,t
["ɵnov"](n
,24).hasErrors
,t
["ɵnov"](n
,24).hasSuccess
),l(n
,30,0,t
["ɵnov"](n
,35).ngClassUntouched
,t
["ɵnov"](n
,35).ngClassTouched
,t
["ɵnov"](n
,35).ngClassPristine
,t
["ɵnov"](n
,35).ngClassDirty
,t
["ɵnov"](n
,35).ngClassValid
,t
["ɵnov"](n
,35).ngClassInvalid
,t
["ɵnov"](n
,35).ngClassPending
,t
["ɵnov"](n
,37).validClass
,t
["ɵnov"](n
,37).invalidClass
)}))}function D(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,1,"cd-iscsi-target-image-settings-modal",[],null,null,null,T
,w
)),t
["ɵdid"](1,114688,null,0,_
.a
,[R
.a
,y
.a
],null,null)],(function(l
,n
){l(n
,1,0)}),null)}var P
=t
["ɵccf"]("cd-iscsi-target-image-settings-modal",_
.a
,D
,{},{},[])},o8EM:function(l
,n
,e
){"use strict";e
.d(n
,"a",(function(){return s
}));var t
=e("PhyI"),i
=e("8Y7J"),u
=e("GiVz");let s
=(()=>{class l
{constructor(l
){this.i18n
=l
,this.sections
=[{heading
:this.i18n("Quality of Service"),class:"quality-of-service",options
:[{name
:"rbd_qos_bps_limit",displayName
:this.i18n("BPS Limit"),description
:this.i18n("The desired limit of IO bytes per second."),type
:t
.b
.bps
},{name
:"rbd_qos_iops_limit",displayName
:this.i18n("IOPS Limit"),description
:this.i18n("The desired limit of IO operations per second."),type
:t
.b
.iops
},{name
:"rbd_qos_read_bps_limit",displayName
:this.i18n("Read BPS Limit"),description
:this.i18n("The desired limit of read bytes per second."),type
:t
.b
.bps
},{name
:"rbd_qos_read_iops_limit",displayName
:this.i18n("Read IOPS Limit"),description
:this.i18n("The desired limit of read operations per second."),type
:t
.b
.iops
},{name
:"rbd_qos_write_bps_limit",displayName
:this.i18n("Write BPS Limit"),description
:this.i18n("The desired limit of write bytes per second."),type
:t
.b
.bps
},{name
:"rbd_qos_write_iops_limit",displayName
:this.i18n("Write IOPS Limit"),description
:this.i18n("The desired limit of write operations per second."),type
:t
.b
.iops
},{name
:"rbd_qos_bps_burst",displayName
:this.i18n("BPS Burst"),description
:this.i18n("The desired burst limit of IO bytes."),type
:t
.b
.bps
},{name
:"rbd_qos_iops_burst",displayName
:this.i18n("IOPS Burst"),description
:this.i18n("The desired burst limit of IO operations."),type
:t
.b
.iops
},{name
:"rbd_qos_read_bps_burst",displayName
:this.i18n("Read BPS Burst"),description
:this.i18n("The desired burst limit of read bytes."),type
:t
.b
.bps
},{name
:"rbd_qos_read_iops_burst",displayName
:this.i18n("Read IOPS Burst"),description
:this.i18n("The desired burst limit of read operations."),type
:t
.b
.iops
},{name
:"rbd_qos_write_bps_burst",displayName
:this.i18n("Write BPS Burst"),description
:this.i18n("The desired burst limit of write bytes."),type
:t
.b
.bps
},{name
:"rbd_qos_write_iops_burst",displayName
:this.i18n("Write IOPS Burst"),description
:this.i18n("The desired burst limit of write operations."),type
:t
.b
.iops
}]}]}static getOptionsFromSections(l
){return l
.map(l
=>l
.options
).reduce((l
,n
)=>l
.concat(n
))}filterConfigOptionsByName(n
){return l
.getOptionsFromSections(this.sections
).filter(l
=>l
.name
===n
)}getOptionValueByName(l
,n
,e
=""){const t
=this.filterConfigOptionsByName(l
);return 1===t
.length
?t
.pop()[n
]:e
}getWritableSections(){return this.sections
.map(l
=>(l
.options
=l
.options
.filter(l
=>!l
.readOnly
),l
))}getOptionFields(){return l
.getOptionsFromSections(this.sections
)}getWritableOptionFields(){return l
.getOptionsFromSections(this.getWritableSections())}getOptionByName(l
){return this.filterConfigOptionsByName(l
).pop()}getDisplayName(l
){return this.getOptionValueByName(l
,"displayName")}getDescription(l
){return this.getOptionValueByName(l
,"description")}}return l
.ngInjectableDef
=i
["ɵɵdefineInjectable"]({factory:function(){return new l(i
["ɵɵinject"](u
.a
))},token
:l
,providedIn
:"root"}),l
})()},puGn:function(l
,n
,e
){"use strict";e
.d(n
,"a",(function(){return s
}));var t
=e("s7LF"),i
=(e("XED3"),e("QFaf")),u
=e("kvvV");e("kn/O");class s
{constructor(l
,n
,e
){this.modalRef
=l
,this.rbdMirroringService
=n
,this.taskWrapper
=e
,this.createForm()}createForm(){this.editSiteNameForm
=new i
.a({siteName
:new t
.i("",{})})}ngOnInit(){this.editSiteNameForm
.get("siteName").setValue(this.siteName
),this.rbdMirroringService
.getSiteName().subscribe(l
=>{this.editSiteNameForm
.get("siteName").setValue(l
.site_name
)})}update(){this.taskWrapper
.wrapTaskAroundCall({task
:new u
.a("rbd/mirroring/site_name/edit",{}),call
:this.rbdMirroringService
.setSiteName(this.editSiteNameForm
.getValue("siteName"))}).subscribe(void 0,()=>this.editSiteNameForm
.setErrors({cdSubmitButton
:!0}),()=>{this.rbdMirroringService
.refresh(),this.modalRef
.hide()})}}},rFfW:function(l
,n
,e
){"use strict";e
.d(n
,"a",(function(){return o
}));var t
=e("8Y7J"),i
=e("s7LF"),u
=e("oxzT"),s
=e("QFaf"),a
=e("PhyI");e("aXbf"),e("o8EM");class o
{constructor(l
,n
){this.formatterService
=l
,this.rbdConfigurationService
=n
,this.changes
=new t
.EventEmitter
,this.icons
=u
.a
,this.ngDataReady
=new t
.EventEmitter
,this.configurationType
=a
.b
,this.sectionVisibility
={}}ngOnInit(){const l
=this.createConfigurationFormGroup();this.form
.addControl("configuration",l
),l
.valueChanges
.subscribe(()=>{this.changes
.emit(this.getDirtyValues
.bind(this))}),this.initializeData
&&this.initializeData
.subscribe(l
=>{this.initialData
=l
.initialData
;const n
=l
.sourceType
;this.rbdConfigurationService
.getWritableOptionFields().forEach(e
=>{const t
=l
.initialData
.filter(l
=>l
.name
===e
.name
).pop();t
&&t
.source
===n
&&this.form
.get("configuration."+e
.name
).setValue(t
.value
)}),this.ngDataReady
.emit()}),this.rbdConfigurationService
.getWritableSections().forEach(l
=>this.sectionVisibility
[l
.class]=!1)}getDirtyValues(l
=!1,n
){if(l
&&!n
)throw new Error("ProgrammingError: If local values shall be included, a proper localFieldType argument has to be provided, too");const e
={};return this.rbdConfigurationService
.getWritableOptionFields().forEach(t
=>{const i
=this.form
.get("configuration").get(t
.name
);this.initialData
&&this.initialData
[t
.name
]===i
.value
||(i
.dirty
||l
&&i
.source
===n
)&&(e
[t
.name
]=null===i
.value
?i
.value
:t
.type
===a
.b
.bps
?this.formatterService
.toBytes(i
.value
):t
.type
===a
.b
.milliseconds
?this.formatterService
.toMilliseconds(i
.value
):t
.type
===a
.b
.iops
?this.formatterService
.toIops(i
.value
):i
.value
)}),e
}createConfigurationFormGroup(){const l
=new s
.a({});return this.rbdConfigurationService
.getWritableOptionFields().forEach(n
=>{let e
;if(n
.type
!==a
.b
.milliseconds
&&n
.type
!==a
.b
.iops
&&n
.type
!==a
.b
.bps
)throw new Error(`Type ${n.type} is unknown, you may need to add it to RbdConfiguration class`);e
=new i
.i(0,i
.B
.min(0)),l
.addControl(n
.name
,e
)}),l
}reset(l
){const n
=this.form
.get("configuration").get(l
);n
.disabled
?(n
.setValue(n
.previousValue
||0),n
.enable(),n
.previousValue
||n
.markAsPristine()):(n
.previousValue
=n
.value
,n
.setValue(null),n
.markAsDirty(),n
.disable())}isDisabled(l
){return this.form
.get("configuration").get(l
).disabled
}toggleSectionVisibility(l
){this.sectionVisibility
[l
]=!this.sectionVisibility
[l
]}}},roDX:function(l
,n
,e
){"use strict";e
.d(n
,"a",(function(){return i
})),e("my5R");var t
=e("x38r");e("o4+5"),e("uYzU");class i
{constructor(l
,n
,e
,t
){this.iscsiService
=l
,this.dimlessPipe
=n
,this.iscsiBackstorePipe
=e
,this.i18n
=t
,this.gateways
=[],this.images
=[]}ngOnInit(){this.gatewaysColumns
=[{name
:this.i18n("Name"),prop
:"name"},{name
:this.i18n("State"),prop
:"state",flexGrow
:1,cellTransformation
:t
.a
.badge
,customTemplateConfig
:{map
:{up
:{class:"badge-success"},down
:{class:"badge-danger"}}}},{name
:this.i18n("# Targets"),prop
:"num_targets"},{name
:this.i18n("# Sessions"),prop
:"num_sessions"}],this.imagesColumns
=[{name
:this.i18n("Pool"),prop
:"pool"},{name
:this.i18n("Image"),prop
:"image"},{name
:this.i18n("Backstore"),prop
:"backstore",pipe
:this.iscsiBackstorePipe
},{name
:this.i18n("Read Bytes"),prop
:"stats_history.rd_bytes",cellTemplate
:this.iscsiSparklineTpl
},{name
:this.i18n("Write Bytes"),prop
:"stats_history.wr_bytes",cellTemplate
:this.iscsiSparklineTpl
},{name
:this.i18n("Read Ops"),prop
:"stats.rd",pipe
:this.dimlessPipe
,cellTemplate
:this.iscsiPerSecondTpl
},{name
:this.i18n("Write Ops"),prop
:"stats.wr",pipe
:this.dimlessPipe
,cellTemplate
:this.iscsiPerSecondTpl
},{name
:this.i18n("A/O Since"),prop
:"optimized_since",cellTemplate
:this.iscsiRelativeDateTpl
}]}refresh(){this.iscsiService
.overview().subscribe(l
=>{this.gateways
=l
.gateways
,this.images
=l
.images
,this.images
.map(l
=>(l
.stats_history
&&(l
.stats_history
.rd_bytes
=l
.stats_history
.rd_bytes
.map(l
=>l
[1]),l
.stats_history
.wr_bytes
=l
.stats_history
.wr_bytes
.map(l
=>l
[1])),l
.cdIsBinary
=!0,l
))})}}},u0yg:function(l
,n
,e
){"use strict";e
.d(n
,"b",(function(){return t
})),e
.d(n
,"a",(function(){return i
}));class t
{}var i=function(l
){return l
[l
.V1
=1]="V1",l
[l
.V2
=2]="V2",l
}({})},u2XS:function(l
,n
,e
){"use strict";var t
=e("8Y7J"),i
=e("SVse"),u
=e("25BL"),s
=e("uIqm"),a
=e("LOMR"),o
=e("MP8s"),r
=e("fxL3"),d
=e("gk6K"),c
=e("3ris"),m
=e("GiVz"),p
=e("uYzU"),h
=e("iExv");e
.d(n
,"b",(function(){return g
})),e
.d(n
,"c",(function(){return _
})),e
.d(n
,"a",(function(){return y
}));var g
=t
["ɵcrt"]({encapsulation
:0,styles
:[[""]],data
:{}});function f(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,0,"i",[],[[8,"className",0]],null,null,null,null)),(l()(),t
["ɵeld"](1,0,null,null,1,"span",[],null,null,null,null,null)),(l()(),t
["ɵted"](2,null,["",""])),(l()(),t
["ɵted"](-1,null,[" "])),(l()(),t
["ɵeld"](4,0,null,null,6,"span",[["class","badge"]],null,null,null,null,null)),t
["ɵprd"](512,null,i
["ɵNgClassImpl"],i
["ɵNgClassR2Impl"],[t
.IterableDiffers
,t
.KeyValueDiffers
,t
.ElementRef
,t
.Renderer2
]),t
["ɵdid"](6,278528,null,0,i
.NgClass
,[i
["ɵNgClassImpl"]],{klass
:[0,"klass"],ngClass
:[1,"ngClass"]},null),t
["ɵpad"](7,1),t
["ɵpad"](8,1),t
["ɵpod"](9,{"badge-success":0,"badge-danger":1}),(l()(),t
["ɵted"](10,null,[" "," "]))],(function(l
,n
){var e
=l(n
,9,0,l(n
,7,0,"logged_in").includes(n
.context
.$implicit
.data
.status
),l(n
,8,0,"logged_out").includes(n
.context
.$implicit
.data
.status
));l(n
,6,0,"badge",e
)}),(function(l
,n
){l(n
,0,0,n
.context
.$implicit
.data
.cdIcon
),l(n
,2,0,n
.context
.$implicit
.data
.name
),l(n
,10,0,n
.context
.$implicit
.data
.status
)}))}function v(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,4,"div",[["class","col-6 metadata"]],null,null,null,null,null)),(l()(),t
["ɵeld"](1,0,null,null,1,"legend",[],null,null,null,null,null)),(l()(),t
["ɵted"](2,null,["",""])),(l()(),t
["ɵeld"](3,0,null,null,1,"cd-table",[["columnMode","flex"]],null,null,null,u
.b
,u
.a
)),t
["ɵdid"](4,2867200,[[2,4],["detailTable",4]],0,s
.a
,[t
.NgZone
,t
.ChangeDetectorRef
],{data
:[0,"data"],columns
:[1,"columns"],columnMode
:[2,"columnMode"],limit
:[3,"limit"]},null)],(function(l
,n
){var e
=n
.component
;l(n
,4,0,e
.data
,e
.columns
,"flex",0)}),(function(l
,n
){l(n
,2,0,n
.component
.title
)}))}function b(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,1,"span",[],null,null,null,null,null)),(l()(),t
["ɵted"](1,null,["",""]))],null,(function(l
,n
){l(n
,1,0,n
.parent
.context
.value
)}))}function C(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,1,"strong",[],null,null,null,null,null)),(l()(),t
["ɵted"](1,null,["",""]))],null,(function(l
,n
){l(n
,1,0,n
.parent
.context
.value
)}))}function S(l
){return t
["ɵvid"](0,[(l()(),t
["ɵand"](16777216,null,null,1,null,b
)),t
["ɵdid"](1,16384,null,0,i
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵand"](16777216,null,null,1,null,C
)),t
["ɵdid"](3,16384,null,0,i
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵand"](0,null,null,0))],(function(l
,n
){l(n
,1,0,void 0===n
.context
.row
.default||n
.context
.row
.default===n
.context
.row
.current
),l(n
,3,0,void 0!==n
.context
.row
.default&&n
.context
.row
.default!==n
.context
.row
.current
)}),null)}function _(l
){return t
["ɵvid"](0,[t
["ɵqud"](402653184,1,{highlightTpl
:0}),t
["ɵqud"](671088640,2,{content
:0}),t
["ɵqud"](671088640,3,{tree
:0}),(l()(),t
["ɵeld"](3,0,null,null,13,"div",[["class","row"]],null,null,null,null,null)),(l()(),t
["ɵeld"](4,0,null,null,10,"div",[["class","col-6"]],null,null,null,null,null)),(l()(),t
["ɵeld"](5,0,null,null,1,"legend",[],null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["iSCSI Topology"])),(l()(),t
["ɵeld"](7,0,null,null,7,"tree-root",[],null,[[null,"updateData"],["body","keydown"],["body","mousedown"]],(function(l
,n
,e
){var i
=!0,u
=l
.component
;return"body:keydown"===n
&&(i
=!1!==t
["ɵnov"](l
,9).onKeydown(e
)&&i
),"body:mousedown"===n
&&(i
=!1!==t
["ɵnov"](l
,9).onMousedown(e
)&&i
),"updateData"===n
&&(i
=!1!==u
.onUpdateData()&&i
),i
}),a
.b
,a
.a
)),t
["ɵprd"](131584,null,o
.a
,o
.a
,[]),t
["ɵdid"](9,573440,[[3,4],["tree",4]],4,r
.a
,[o
.a
,d
.a
],{nodes
:[0,"nodes"],options
:[1,"options"]},{updateData
:"updateData"}),t
["ɵqud"](603979776,4,{loadingTemplate
:0}),t
["ɵqud"](603979776,5,{treeNodeTemplate
:0}),t
["ɵqud"](603979776,6,{treeNodeWrapperTemplate
:0}),t
["ɵqud"](603979776,7,{treeNodeFullTemplate
:0}),(l()(),t
["ɵand"](0,[[5,2],["treeNodeTemplate",2]],null,0,null,f
)),(l()(),t
["ɵand"](16777216,null,null,1,null,v
)),t
["ɵdid"](16,16384,null,0,i
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵand"](0,[[1,2],["highlightTpl",2]],null,0,null,S
))],(function(l
,n
){var e
=n
.component
;l(n
,9,0,e
.nodes
,e
.treeOptions
),l(n
,16,0,e
.data
)}),null)}function R(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,1,"cd-iscsi-target-details",[],null,null,null,_
,g
)),t
["ɵdid"](1,638976,null,0,c
.a
,[m
.a
,p
.a
,h
.a
],null,null)],(function(l
,n
){l(n
,1,0)}),null)}var y
=t
["ɵccf"]("cd-iscsi-target-details",c
.a
,R
,{selection
:"selection",settings
:"settings",cephIscsiConfigVersion
:"cephIscsiConfigVersion"},{},[])},xvu0:function(l
,n
,e
){"use strict";var t
=e("8Y7J"),i
=e("EEJc"),u
=e("ajRT"),s
=e("s7LF"),a
=e("+gVj"),o
=e("mXUL"),r
=e("IZUe"),d
=e("ANnk"),c
=e("f/UV"),m
=e("aexS"),p
=e("gp3X"),h
=e("sb0X"),g
=e("KVJa"),f
=e("Z21x"),v
=e("SVse"),b
=e("sne2"),C
=e("puGn"),S
=e("LqlI"),_
=e("XED3"),R
=e("kn/O");e
.d(n
,"a",(function(){return I
}));var y
=t
["ɵcrt"]({encapsulation
:0,styles
:[[""]],data
:{}});function w(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,39,"cd-modal",[],null,null,null,i
.c
,i
.b
)),t
["ɵdid"](1,49152,null,0,u
.a
,[],{modalRef
:[0,"modalRef"]},null),(l()(),t
["ɵeld"](2,0,null,0,1,null,null,null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["Edit site name"])),(l()(),t
["ɵeld"](4,0,null,1,35,null,null,null,null,null,null,null)),(l()(),t
["ɵeld"](5,0,null,null,34,"form",[["class","form"],["name","editSiteNameForm"],["novalidate",""]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"submit"],[null,"reset"]],(function(l
,n
,e
){var i
=!0;return"submit"===n
&&(i
=!1!==t
["ɵnov"](l
,7).onSubmit(e
)&&i
),"reset"===n
&&(i
=!1!==t
["ɵnov"](l
,7).onReset()&&i
),"submit"===n
&&(i
=!1!==t
["ɵnov"](l
,10).onSubmit()&&i
),i
}),null,null)),t
["ɵdid"](6,16384,null,0,s
.G
,[],null,null),t
["ɵdid"](7,540672,[["formDir",4]],0,s
.l
,[[8,null],[8,null]],{form
:[0,"form"]},null),t
["ɵprd"](2048,null,s
.d
,null,[s
.l
]),t
["ɵdid"](9,16384,null,0,s
.s
,[[4,s
.d
]],null,null),t
["ɵdid"](10,16384,null,0,a
.d
,[],{formGroup
:[0,"formGroup"]},null),(l()(),t
["ɵeld"](11,0,null,null,21,"div",[["class","modal-body"]],null,null,null,null,null)),(l()(),t
["ɵeld"](12,0,null,null,5,"p",[],null,null,null,null,null)),(l()(),t
["ɵeld"](13,0,null,null,4,null,null,null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["Edit the site name and click "])),(l()(),t
["ɵeld"](15,0,null,null,1,"kbd",[],null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["Update"])),(l()(),t
["ɵted"](-1,null,["."])),(l()(),t
["ɵeld"](18,0,null,null,14,"div",[["class","form-group"]],[[2,"has-error",null],[2,"has-success",null]],null,null,o
.b
,o
.a
)),t
["ɵdid"](19,1163264,null,2,a
.c
,[t
.ElementRef
,a
.g
],null,null),t
["ɵqud"](603979776,1,{FormControlNames
:1}),t
["ɵqud"](603979776,2,{messagesBlock
:0}),(l()(),t
["ɵeld"](22,0,null,0,1,"label",[["class","col-form-label required"],["for","siteName"]],null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["Site Name"])),(l()(),t
["ɵeld"](24,0,null,0,8,"input",[["autofocus",""],["class","form-control"],["formControlName","siteName"],["id","siteName"],["name","siteName"],["placeholder","Name..."],["type","text"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null],[2,"is-valid",null],[2,"is-invalid",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],(function(l
,n
,e
){var i
=!0;return"input"===n
&&(i
=!1!==t
["ɵnov"](l
,27)._handleInput(e
.target
.value
)&&i
),"blur"===n
&&(i
=!1!==t
["ɵnov"](l
,27).onTouched()&&i
),"compositionstart"===n
&&(i
=!1!==t
["ɵnov"](l
,27)._compositionStart()&&i
),"compositionend"===n
&&(i
=!1!==t
["ɵnov"](l
,27)._compositionEnd(e
.target
.value
)&&i
),i
}),null,null)),t
["ɵdid"](25,4210688,null,0,r
.a
,[t
.ElementRef
],{autofocus
:[0,"autofocus"]},null),t
["ɵdid"](26,4210688,null,0,d
.a
,[[2,c
.a
],m
.a
,t
.ElementRef
],null,null),t
["ɵdid"](27,16384,null,0,s
.e
,[t
.Renderer2
,t
.ElementRef
,[2,s
.b
]],null,null),t
["ɵprd"](1024,null,s
.p
,(function(l
){return[l
]}),[s
.e
]),t
["ɵdid"](29,671744,[[1,4]],0,s
.j
,[[3,s
.d
],[8,null],[8,null],[6,s
.p
],[2,s
.E
]],{name
:[0,"name"]},null),t
["ɵprd"](2048,null,s
.q
,null,[s
.j
]),t
["ɵdid"](31,16384,null,0,s
.r
,[[4,s
.q
]],null,null),t
["ɵdid"](32,16384,null,0,a
.h
,[[3,s
.d
],a
.a
],{formControlName
:[0,"formControlName"]},null),(l()(),t
["ɵeld"](33,0,null,null,6,"div",[["class","modal-footer"]],null,null,null,null,null)),(l()(),t
["ɵeld"](34,0,null,null,5,"div",[["class","button-group text-right"]],null,null,null,null,null)),(l()(),t
["ɵeld"](35,0,null,null,2,"cd-submit-button",[],null,[[null,"submitAction"]],(function(l
,n
,e
){var t
=!0;return"submitAction"===n
&&(t
=!1!==l
.component
.update()&&t
),t
}),p
.b
,p
.a
)),t
["ɵdid"](36,114688,null,0,h
.a
,[t
.ElementRef
],{form
:[0,"form"]},{submitAction
:"submitAction"}),(l()(),t
["ɵted"](-1,0,["Update"])),(l()(),t
["ɵeld"](38,0,null,null,1,"cd-back-button",[["name","Cancel"]],null,null,null,g
.b
,g
.a
)),t
["ɵdid"](39,49152,null,0,f
.a
,[v
.Location
,b
.b
],{name
:[0,"name"],back
:[1,"back"]},null)],(function(l
,n
){var e
=n
.component
;l(n
,1,0,e
.modalRef
),l(n
,7,0,e
.editSiteNameForm
),l(n
,10,0,e
.editSiteNameForm
),l(n
,19,0),l(n
,25,0,""),l(n
,29,0,"siteName"),l(n
,32,0,"siteName"),l(n
,36,0,e
.editSiteNameForm
),l(n
,39,0,"Cancel",e
.modalRef
.hide
)}),(function(l
,n
){l(n
,5,0,t
["ɵnov"](n
,9).ngClassUntouched
,t
["ɵnov"](n
,9).ngClassTouched
,t
["ɵnov"](n
,9).ngClassPristine
,t
["ɵnov"](n
,9).ngClassDirty
,t
["ɵnov"](n
,9).ngClassValid
,t
["ɵnov"](n
,9).ngClassInvalid
,t
["ɵnov"](n
,9).ngClassPending
),l(n
,18,0,t
["ɵnov"](n
,19).hasErrors
,t
["ɵnov"](n
,19).hasSuccess
),l(n
,24,0,t
["ɵnov"](n
,31).ngClassUntouched
,t
["ɵnov"](n
,31).ngClassTouched
,t
["ɵnov"](n
,31).ngClassPristine
,t
["ɵnov"](n
,31).ngClassDirty
,t
["ɵnov"](n
,31).ngClassValid
,t
["ɵnov"](n
,31).ngClassInvalid
,t
["ɵnov"](n
,31).ngClassPending
,t
["ɵnov"](n
,32).validClass
,t
["ɵnov"](n
,32).invalidClass
)}))}function k(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,1,"cd-edit-site-mode-modal",[],null,null,null,w
,y
)),t
["ɵdid"](1,114688,null,0,C
.a
,[S
.a
,_
.a
,R
.a
],null,null)],(function(l
,n
){l(n
,1,0)}),null)}var I
=t
["ɵccf"]("cd-edit-site-mode-modal",C
.a
,k
,{},{},[])}}]);