1 (window
.webpackJsonp
=window
.webpackJsonp
||[]).push([[2],{"+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
=>{if(!l
)return;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("+gVj"),s
=e("SVse"),a
=e("EEJc"),o
=e("ajRT"),r
=e("mXUL"),d
=e("IZUe"),c
=e("gp3X"),m
=e("sb0X"),p
=e("KVJa"),h
=e("Z21x"),g
=e("sne2"),f
=e("daK0"),v
=e("LqlI"),b
=e("aexS"),C
=e("9nlD"),S
=e("Ekvf"),_
=e("F83c"),y
=e("GiVz");e
.d(n
,"a",(function(){return q
}));var R
=t
["ɵcrt"]({encapsulation
:0,styles
:[[""]],data
:{}});function w(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,6,"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,16384,null,0,u
.h
,[[3,i
.d
],u
.a
],{formControlName
:[0,"formControlName"]},null)],(function(l
,n
){l(n
,3,0,"pool"),l(n
,6,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
,6).validClass
,t
["ɵnov"](n
,6).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
]],{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 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
]],{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 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,["-- Select a pool --"]))],(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
]],{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 F(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,14,"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,16384,null,0,u
.h
,[[3,i
.d
],u
.a
],{formControlName
:[0,"formControlName"]},null),(l()(),t
["ɵand"](16777216,null,null,1,null,I
)),t
["ɵdid"](8,16384,null,0,s
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵand"](16777216,null,null,1,null,k
)),t
["ɵdid"](10,16384,null,0,s
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵand"](16777216,null,null,1,null,E
)),t
["ɵdid"](12,16384,null,0,s
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵand"](16777216,null,null,1,null,N
)),t
["ɵdid"](14,278528,null,0,s
.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
,6,0,"pool"),l(n
,8,0,null===e
.pools
),l(n
,10,0,null!==e
.pools
&&0===e
.pools
.length
),l(n
,12,0,null!==e
.pools
&&e
.pools
.length
>0),l(n
,14,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
,6).validClass
,t
["ɵnov"](n
,6).invalidClass
)}))}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 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 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,["Namespace already exists."]))],null,null)}function P(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,50,"cd-modal",[],null,null,null,a
.c
,a
.b
)),t
["ɵdid"](1,49152,null,0,o
.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,46,null,null,null,null,null,null,null)),(l()(),t
["ɵeld"](5,0,null,null,45,"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,u
.d
,[],{formGroup
:[0,"formGroup"]},null),(l()(),t
["ɵeld"](11,0,null,null,32,"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,r
.b
,r
.a
)),t
["ɵdid"](13,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"](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,w
)),t
["ɵdid"](20,16384,null,0,s
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵand"](16777216,null,null,1,null,F
)),t
["ɵdid"](22,16384,null,0,s
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵand"](16777216,null,null,1,null,T
)),t
["ɵdid"](24,16384,null,0,s
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵeld"](25,0,null,null,18,"div",[["class","form-group row"]],[[2,"has-error",null],[2,"has-success",null]],null,null,r
.b
,r
.a
)),t
["ɵdid"](26,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"](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,12,"div",[["class","cd-col-form-input"]],null,null,null,null,null)),(l()(),t
["ɵeld"](32,0,null,null,7,"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,d
.a
,[t
.ElementRef
],{autofocus
:[0,"autofocus"]},null),t
["ɵdid"](39,16384,null,0,u
.h
,[[3,i
.d
],u
.a
],{formControlName
:[0,"formControlName"]},null),(l()(),t
["ɵand"](16777216,null,null,1,null,V
)),t
["ɵdid"](41,16384,null,0,s
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵand"](16777216,null,null,1,null,D
)),t
["ɵdid"](43,16384,null,0,s
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵeld"](44,0,null,null,6,"div",[["class","modal-footer"]],null,null,null,null,null)),(l()(),t
["ɵeld"](45,0,null,null,5,"div",[["class","button-group text-right"]],null,null,null,null,null)),(l()(),t
["ɵeld"](46,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
}),c
.b
,c
.a
)),t
["ɵdid"](47,114688,null,0,m
.a
,[t
.ElementRef
],{form
:[0,"form"]},{submitAction
:"submitAction"}),(l()(),t
["ɵted"](-1,0,["Create Namespace"])),(l()(),t
["ɵeld"](49,0,null,null,1,"cd-back-button",[["name","Close"]],null,null,null,p
.b
,p
.a
)),t
["ɵdid"](50,49152,null,0,h
.a
,[s
.Location
,g
.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
,39,0,"namespace"),l(n
,41,0,e
.namespaceForm
.showError("namespace",t
["ɵnov"](n
,7),"required")),l(n
,43,0,e
.namespaceForm
.showError("namespace",t
["ɵnov"](n
,7),"namespaceExists")),l(n
,47,0,e
.namespaceForm
),l(n
,50,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
,39).validClass
,t
["ɵnov"](n
,39).invalidClass
)}))}function x(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,1,"cd-rbd-namespace-form-modal",[],null,null,null,P
,R
)),t
["ɵdid"](1,114688,null,0,f
.a
,[v
.a
,b
.a
,C
.a
,S
.a
,_
.a
,y
.a
],null,null)],(function(l
,n
){l(n
,1,0)}),null)}var q
=t
["ɵccf"]("cd-rbd-namespace-form-modal",f
.a
,x
,{},{},[])},"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("SVse"),c
=e("gp3X"),m
=e("sb0X"),p
=e("KVJa"),h
=e("Z21x"),g
=e("sne2"),f
=e("2GqK"),v
=e("F83c"),b
=e("LqlI"),C
=e("2EZI"),S
=e("kn/O");e
.d(n
,"a",(function(){return I
}));var _
=t
["ɵcrt"]({encapsulation
:0,styles
:[[""]],data
:{}});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,["This field is required."]))],null,null)}function R(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,47,"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,43,null,null,null,null,null,null,null)),(l()(),t
["ɵeld"](5,0,null,null,42,"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,29,"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,15,"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,7,"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,16384,null,0,a
.h
,[[3,s
.d
],a
.a
],{formControlName
:[0,"formControlName"]},null),(l()(),t
["ɵand"](16777216,null,0,1,null,y
)),t
["ɵdid"](40,16384,null,0,d
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵeld"](41,0,null,null,6,"div",[["class","modal-footer"]],null,null,null,null,null)),(l()(),t
["ɵeld"](42,0,null,null,5,"div",[["class","button-group text-right"]],null,null,null,null,null)),(l()(),t
["ɵeld"](43,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
}),c
.b
,c
.a
)),t
["ɵdid"](44,114688,null,0,m
.a
,[t
.ElementRef
],{form
:[0,"form"]},{submitAction
:"submitAction"}),(l()(),t
["ɵted"](-1,0,["Restore Image"])),(l()(),t
["ɵeld"](46,0,null,null,1,"cd-back-button",[["name","Cancel"]],null,null,null,p
.b
,p
.a
)),t
["ɵdid"](47,49152,null,0,h
.a
,[d
.Location
,g
.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
,38,0,"name"),l(n
,40,0,e
.restoreForm
.showError("name",t
["ɵnov"](n
,7),"required")),l(n
,44,0,e
.restoreForm
),l(n
,47,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
,38).validClass
,t
["ɵnov"](n
,38).invalidClass
)}))}function w(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,1,"cd-rbd-trash-restore-modal",[],null,null,null,R
,_
)),t
["ɵdid"](1,114688,null,0,f
.a
,[v
.a
,b
.a
,C
.a
,S
.a
],null,null)],(function(l
,n
){l(n
,1,0)}),null)}var I
=t
["ɵccf"]("cd-rbd-trash-restore-modal",f
.a
,w
,{},{},[])},"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("gp3X"),p
=e("sb0X"),h
=e("KVJa"),g
=e("Z21x"),f
=e("sne2"),v
=e("Fd71"),b
=e("LqlI"),C
=e("F83c"),S
=e("VXsX"),_
=e("9nlD"),y
=e("GiVz");e
.d(n
,"a",(function(){return E
}));var R
=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 I(l
){return t
["ɵvid"](0,[t
["ɵpid"](0,i
.TitleCasePipe
,[]),t
["ɵpid"](0,u
.a
,[]),(l()(),t
["ɵeld"](2,0,null,null,39,"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,33,null,null,null,null,null,null,null)),(l()(),t
["ɵeld"](9,0,null,null,32,"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,17,"div",[["class","modal-body"]],null,null,null,null,null)),(l()(),t
["ɵeld"](16,0,null,null,16,"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,10,"div",[["class","cd-col-form-input"]],null,null,null,null,null)),(l()(),t
["ɵeld"](23,0,null,null,7,"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,16384,null,0,r
.h
,[[3,o
.d
],r
.a
],{formControlName
:[0,"formControlName"]},null),(l()(),t
["ɵand"](16777216,null,null,1,null,w
)),t
["ɵdid"](32,16384,null,0,i
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵeld"](33,0,null,null,8,"div",[["class","modal-footer"]],null,null,null,null,null)),(l()(),t
["ɵeld"](34,0,null,null,7,"div",[["class","button-group text-right"]],null,null,null,null,null)),(l()(),t
["ɵeld"](35,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
}),m
.b
,m
.a
)),t
["ɵdid"](36,114688,null,0,p
.a
,[t
.ElementRef
],{form
:[0,"form"]},{submitAction
:"submitAction"}),(l()(),t
["ɵted"](37,0,[""," ",""])),t
["ɵppd"](38,1),t
["ɵppd"](39,1),(l()(),t
["ɵeld"](40,0,null,null,1,"cd-back-button",[["name","Close"]],null,null,null,h
.b
,h
.a
)),t
["ɵdid"](41,49152,null,0,g
.a
,[i
.Location
,f
.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
,30,0,"snapshotName"),l(n
,32,0,e
.snapshotForm
.showError("snapshotName",t
["ɵnov"](n
,11),"required")),l(n
,36,0,e
.snapshotForm
),l(n
,41,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
,30).validClass
,t
["ɵnov"](n
,30).invalidClass
);var s
=t
["ɵunv"](n
,37,0,l(n
,38,0,t
["ɵnov"](n
,0),e
.action
)),a
=t
["ɵunv"](n
,37,1,l(n
,39,0,t
["ɵnov"](n
,1),e
.resource
));l(n
,37,0,s
,a
)}))}function k(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,1,"cd-rbd-snapshot-form-modal",[],null,null,null,I
,R
)),t
["ɵdid"](1,114688,null,0,v
.a
,[b
.a
,C
.a
,S
.a
,_
.a
,y
.a
,f
.b
],null,null)],(function(l
,n
){l(n
,1,0)}),null)}var E
=t
["ɵccf"]("cd-rbd-snapshot-form-modal",v
.a
,k
,{},{},[])},"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("vCyI"),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
.hasSelection
&&(this.selectedItem
=this.selection
.first(),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";var t
=e("LvDl"),i
=(e("F83c"),e("OLbh")),u
=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("Fgil"),e("o4+5"),e("aexS"),e("VTlA"),e("kn/O"),e("EgGo")),p
=e("2JDI");class h
{}e
.d(n
,"a",(function(){return f
})),e
.d(n
,"b",(function(){return g
}));const g
=new m
.a("block/rbd");class f
{constructor(l
,n
,e
,t
,i
,u
,s
,o
,d
,m
){this.authStorageService
=l
,this.rbdService
=n
,this.dimlessBinaryPipe
=e
,this.dimlessPipe
=t
,this.modalService
=i
,this.taskWrapper
=u
,this.taskListService
=s
,this.i18n
=o
,this.urlBuilder
=d
,this.actionLabels
=m
,this.selection
=new r
.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 c
.a(this.selection
.first().pool_name
,this.selection
.first().namespace,this.selection
.first().name
).toStringEncoded();this.tableActions
=[{permission
:"create",icon
:a
.a
.add
,routerLink
:()=>this.urlBuilder
.getCreate(),canBePrimary
:l
=>!l
.hasSingleSelection
,name
:this.actionLabels
.CREATE
},{permission
:"update",icon
:a
.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
:a
.a
.copy
,routerLink
:()=>`/block/rbd/copy/${p()}`,name
:this.actionLabels
.COPY
},{permission
:"update",disable
:l
=>!l
.hasSingleSelection
||l
.first().cdExecuting
||!l
.first().parent
,icon
:a
.a
.flatten
,click
:()=>this.flattenRbdModal(),name
:this.actionLabels
.FLATTEN
},{permission
:"delete",icon
:a
.a
.destroy
,click
:()=>this.deleteRbdModal(),name
:this.actionLabels
.DELETE
,disable
:l
=>!this.selection
.first()||!this.selection
.hasSingleSelection
||this.hasClonedSnapshots(l
.first()),disableDesc
:()=>this.getDeleteDisableDesc()},{permission
:"delete",icon
:a
.a
.trash
,click
:()=>this.trashRbdModal(),name
:this.actionLabels
.TRASH
}]}createRbdFromTaskImageSpec(l
){const n
=c
.a
.fromString(l
);return this.createRbdFromTask(n
.poolName
,n
.namespace,n
.imageName
)}createRbdFromTask(l
,n
,e
){const t
=new h
;return t
.id
="-1",t
.name
=e
,t
.namespace=n
,t
.pool_name
=l
,t
}ngOnInit(){this.columns
=[{name
:this.i18n("Name"),prop
:"name",flexGrow
:2,cellTransformation
:s
.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 c
.a(n
.metadata
.dest_pool_name
,n
.metadata
.dest_namespace
,n
.metadata
.dest_image_name
).toString();break;case"rbd/clone":e
=new c
.a(n
.metadata
.child_pool_name
,n
.metadata
.child_namespace
,n
.metadata
.child_image_name
).toString();break;case"rbd/create":e
=new c
.a(n
.metadata
.pool_name
,n
.metadata
.namespace,n
.metadata
.image_name
).toString();break;default:e
=n
.metadata
.image_spec
}return e
===new c
.a(l
.pool_name
,l
.namespace,l
.name
).toString()},this.builders
)}onFetchError(){this.table
.reset(),this.viewCacheStatusList
=[{status
:o
.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 c
.a(l
,n
,e
);this.modalRef
=this.modalService
.show(u
.a
,{initialState
:{itemDescription
:"RBD",itemNames
:[t
],bodyTemplate
:this.deleteTpl
,bodyContext
:{hasSnapshots
:this.hasSnapshots(),snapshots
:this.listProtectedSnapshots()},submitActionObservable
:()=>this.taskWrapper
.wrapTaskAroundCall({task
:new d
.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(p
.a
,{initialState
:l
})}flattenRbd(l
){this.taskWrapper
.wrapTaskAroundCall({task
:new d
.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
,u
=new c
.a(t
.pool_name
,t
.pool_namespace
,t
.image_name
),s
=new c
.a(l
,n
,e
),a
={titleText
:"RBD flatten",buttonText
:"Flatten",bodyTpl
:this.flattenTpl
,bodyData
:{parent
:`${u}@${t.snap_name}`,child
:s
.toString()},onSubmit
:()=>{this.flattenRbd(s
)}};this.modalRef
=this.modalService
.show(i
.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(){const l
=this.selection
.first();return l
&&this.hasClonedSnapshots(l
)?this.i18n("This RBD has cloned snapshots. Please delete related RBDs before deleting this RBD."):""}}},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("+gVj"),o
=e("LvDl"),r
=e("IzCI");class d
{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(!o
.isUndefined(this.minBytes
)&&l
<this.minBytes
)return this.minBytes
;if(!o
.isUndefined(this.maxBytes
)&&l
>this.maxBytes
)return this.maxBytes
;if(!o
.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 c{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 m=e("mXUL"),p=e("4HWh"),h=e("p4Cf"),g=e("SVse");e("rFfW"),e("o8EM"),e.d(n,"a",(function(){return f})),e.d(n,"b",(function(){return R}));var f=t["ɵcrt"]({encapsulation:0,styles:[[".collapsible[_ngcontent-%COMP%]{cursor:pointer;-moz-user-select:none;user-select:none}"]],data:{}});function v(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,8,null,null,null,null,null,null,null)),(l()(),t["ɵeld"](1,0,null,null,7,"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,16384,null,0,a.h,[[3,i.d],a.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,8,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,8).validClass,t["ɵnov"](n,8).invalidClass])}))}function b(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,8,null,null,null,null,null,null,null)),(l()(),t["ɵeld"](1,0,null,null,7,"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,d,[t.ElementRef,i.q,r.a,u.a],{ngDataReady:[0,"ngDataReady"],defaultUnit:[1,"defaultUnit"]},null),t["ɵdid"](8,16384,null,0,a.h,[[3,i.d],a.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,8,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,8).validClass,t["ɵnov"](n,8).invalidClass])}))}function C(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,8,null,null,null,null,null,null,null)),(l()(),t["ɵeld"](1,0,null,null,7,"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,c,[u.a,i.q],{ngDataReady:[0,"ngDataReady"]},null),t["ɵdid"](8,16384,null,0,a.h,[[3,i.d],a.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,8,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,8).validClass,t["ɵnov"](n,8).invalidClass])}))}function S(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 _(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,m.b,m.a)),t["ɵdid"](1,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"](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,p.b,p.a)),t["ɵdid"](7,49152,null,0,h.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,g.NgSwitch,[],{ngSwitch:[0,"ngSwitch"]},null),(l()(),t["ɵand"](16777216,null,null,1,null,v)),t["ɵdid"](14,278528,null,0,g.NgSwitchCase,[t.ViewContainerRef,t.TemplateRef,g.NgSwitch],{ngSwitchCase:[0,"ngSwitchCase"]},null),(l()(),t["ɵand"](16777216,null,null,1,null,b)),t["ɵdid"](16,278528,null,0,g.NgSwitchCase,[t.ViewContainerRef,t.TemplateRef,g.NgSwitch],{ngSwitchCase:[0,"ngSwitchCase"]},null),(l()(),t["ɵand"](16777216,null,null,1,null,C)),t["ɵdid"](18,278528,null,0,g.NgSwitchCase,[t.ViewContainerRef,t.TemplateRef,g.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,g["ɵNgClassImpl"],g["ɵNgClassR2Impl"],[t.IterableDiffers,t.KeyValueDiffers,t.ElementRef,t.Renderer2]),t["ɵdid"](22,278528,null,0,g.NgClass,[g["ɵ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,g["ɵNgClassImpl"],g["ɵNgClassR2Impl"],[t.IterableDiffers,t.KeyValueDiffers,t.ElementRef,t.Renderer2]),t["ɵdid"](26,278528,null,0,g.NgClass,[g["ɵNgClassImpl"]],{ngClass:[0,"ngClass"]},null),t["ɵpad"](27,1),(l()(),t["ɵand"](16777216,null,null,1,null,S)),t["ɵdid"](29,16384,null,0,g.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 y(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,"h3",[["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,g["ɵNgClassImpl"],g["ɵNgClassR2Impl"],[t.IterableDiffers,t.KeyValueDiffers,t.ElementRef,t.Renderer2]),t["ɵdid"](6,278528,null,0,g.NgClass,[g["ɵ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,_)),t["ɵdid"](9,278528,null,0,g.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 R(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,a.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,y)),t["ɵdid"](8,278528,null,0,g.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("+gVj"),s=e("EEJc"),a=e("ajRT"),o=e("mXUL"),r=e("IZUe"),d=e("SVse"),c=e("gp3X"),m=e("sb0X"),p=e("KVJa"),h=e("Z21x"),g=e("sne2"),f=e("+26A"),v=e("LqlI"),b=e("XED3"),C=e("kn/O
");e.d(n,"a
",(function(){return F}));var S=t["ɵcrt
"]({encapsulation:0,styles:[[""]],data:{}});function _(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 y(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 R(l){return t["ɵvid
"](0,[(l()(),t["ɵeld
"](0,0,null,null,9,"div
",[["class","custom
-control custom
-checkbox
"]],null,null,null,null,null)),(l()(),t["ɵeld
"](1,0,null,null,6,"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,2).onChange(e.target.checked)&&i),"blur
"===n&&(i=!1!==t["ɵnov
"](l,2).onTouched()&&i),i}),null,null)),t["ɵdid
"](2,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
"](4,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
"](6,16384,null,0,i.r,[[4,i.q]],null,null),t["ɵdid
"](7,16384,null,0,u.h,[[3,i.d],u.a],{formControlName:[0,"formControlName
"]},null),(l()(),t["ɵeld
"](8,0,null,null,1,"label
",[["class","custom
-control
-label
"]],[[8,"htmlFor
",0]],null,null,null,null)),(l()(),t["ɵted
"](9,null,["",""]))],(function(l,n){l(n,4,0,t["ɵinlineInterpolate
"](1,"",n.context.$implicit.name,"")),l(n,7,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,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,7).validClass,t["ɵnov
"](n,7).invalidClass]),l(n,8,0,t["ɵinlineInterpolate
"](1,"",n.context.$implicit.name,"")),l(n,9,0,n.context.$implicit.name)}))}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,["At least one pool is required
."]))],null,null)}function I(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,1,"span
",[["class","invalid
-feedback
"]],null,null,null,null,null)),(l()(),t["ɵted
"](-1,null,["The token is invalid
."]))],null,null)}function E(l){return t["ɵvid
"](0,[(l()(),t["ɵeld
"](0,0,null,null,87,"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,["Import Bootstrap Token
"])),(l()(),t["ɵeld
"](4,0,null,1,83,null,null,null,null,null,null,null)),(l()(),t["ɵeld
"](5,0,null,null,82,"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,u.d,[],{formGroup:[0,"formGroup
"]},null),(l()(),t["ɵeld
"](11,0,null,null,69,"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,15,"div",[["class","form-group"]],[[2,"has-error",null],[2,"has-success",null]],null,null,o.b,o.a)),t["ɵdid"](19,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"](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,7,"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,26)._handleInput(e.target.value)&&i),"blur"===n&&(i=!1!==t["ɵnov"](l,26).onTouched()&&i),"compositionstart"===n&&(i=!1!==t["ɵnov"](l,26)._compositionStart()&&i),"compositionend"===n&&(i=!1!==t["ɵnov"](l,26)._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,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"](28,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"](30,16384,null,0,i.r,[[4,i.q]],null,null),t["ɵdid"](31,16384,null,0,u.h,[[3,i.d],u.a],{formControlName:[0,"formControlName"]},null),(l()(),t["ɵand"](16777216,null,0,1,null,_)),t["ɵdid"](33,16384,null,0,d.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"]},null),(l()(),t["ɵeld"](34,0,null,null,15,"div",[["class","form-group"]],[[2,"has-error",null],[2,"has-success",null]],null,null,o.b,o.a)),t["ɵdid"](35,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"](38,0,null,0,2,"label",[["class","col-form-label"],["for","direction"]],null,null,null,null,null)),(l()(),t["ɵeld"](39,0,null,null,1,"span",[],null,null,null,null,null)),(l()(),t["ɵted"](-1,null,["Direction"])),(l()(),t["ɵeld"](41,0,null,0,8,"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,42).onChange(e.target.value)&&i),"blur"===n&&(i=!1!==t["ɵnov"](l,42).onTouched()&&i),i}),null,null)),t["ɵdid"](42,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"](44,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"](46,16384,null,0,i.r,[[4,i.q]],null,null),t["ɵdid"](47,16384,null,0,u.h,[[3,i.d],u.a],{formControlName:[0,"formControlName"]},null),(l()(),t["ɵand"](16777216,null,null,1,null,y)),t["ɵdid"](49,278528,null,0,d.NgForOf,[t.ViewContainerRef,t.TemplateRef,t.IterableDiffers],{ngForOf:[0,"ngForOf"]},null),(l()(),t["ɵeld"](50,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,o.b,o.a)),t["ɵdid"](51,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"](53,16384,null,0,i.s,[[4,i.d]],null,null),t["ɵdid"](54,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"](57,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,R)),t["ɵdid"](60,278528,null,0,d.NgForOf,[t.ViewContainerRef,t.TemplateRef,t.IterableDiffers],{ngForOf:[0,"ngForOf"]},null),(l()(),t["ɵand"](16777216,null,0,1,null,w)),t["ɵdid"](62,16384,null,0,d.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"]},null),(l()(),t["ɵeld"](63,0,null,null,17,"div",[["class","form-group"]],[[2,"has-error",null],[2,"has-success",null]],null,null,o.b,o.a)),t["ɵdid"](64,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"](67,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"](69,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,70)._handleInput(e.target.value)&&i),"blur"===n&&(i=!1!==t["ɵnov"](l,70).onTouched()&&i),"compositionstart"===n&&(i=!1!==t["ɵnov"](l,70)._compositionStart()&&i),"compositionend"===n&&(i=!1!==t["ɵnov"](l,70)._compositionEnd(e.target.value)&&i),i}),null,null)),t["ɵdid"](70,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"](72,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"](74,16384,null,0,i.r,[[4,i.q]],null,null),t["ɵdid"](75,16384,null,0,u.h,[[3,i.d],u.a],{formControlName:[0,"formControlName"]},null),(l()(),t["ɵted"](-1,null,[" "])),(l()(),t["ɵand"](16777216,null,0,1,null,I)),t["ɵdid"](78,16384,null,0,d.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"]},null),(l()(),t["ɵand"](16777216,null,0,1,null,k)),t["ɵdid"](80,16384,null,0,d.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"]},null),(l()(),t["ɵeld"](81,0,null,null,6,"div",[["class","modal-footer"]],null,null,null,null,null)),(l()(),t["ɵeld"](82,0,null,null,5,"div",[["class","button-group text-right"]],null,null,null,null,null)),(l()(),t["ɵeld"](83,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}),c.b,c.a)),t["ɵdid"](84,114688,null,0,m.a,[t.ElementRef],{form:[0,"form"]},{submitAction:"submitAction"}),(l()(),t["ɵted"](-1,0,["Import"])),(l()(),t["ɵeld"](86,0,null,null,1,"cd-back-button",[["name","Close"]],null,null,null,p.b,p.a)),t["ɵdid"](87,49152,null,0,h.a,[d.Location,g.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,28,0,"siteName"),l(n,31,0,"siteName"),l(n,33,0,e.importBootstrapForm.showError("siteName",t["ɵnov"](n,7),"required")),l(n,35,0),l(n,44,0,"direction"),l(n,47,0,"direction"),l(n,49,0,e.directions),l(n,51,0,"pools"),l(n,54,0),l(n,60,0,e.pools),l(n,62,0,e.importBootstrapForm.showError("pools",t["ɵnov"](n,7),"requirePool")),l(n,64,0),l(n,72,0,"token"),l(n,75,0,"token"),l(n,78,0,e.importBootstrapForm.showError("token",t["ɵnov"](n,7),"required")),l(n,80,0,e.importBootstrapForm.showError("token",t["ɵnov"](n,7),"invalidToken")),l(n,84,0,e.importBootstrapForm),l(n,87,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,30).ngClassUntouched,t["ɵnov"](n,30).ngClassTouched,t["ɵnov"](n,30).ngClassPristine,t["ɵnov"](n,30).ngClassDirty,t["ɵnov"](n,30).ngClassValid,t["ɵnov"](n,30).ngClassInvalid,t["ɵnov"](n,30).ngClassPending,t["ɵnov"](n,31).validClass,t["ɵnov"](n,31).invalidClass),l(n,34,0,t["ɵnov"](n,35).hasErrors,t["ɵnov"](n,35).hasSuccess),l(n,41,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,50,0,t["ɵnov"](n,53).ngClassUntouched,t["ɵnov"](n,53).ngClassTouched,t["ɵnov"](n,53).ngClassPristine,t["ɵnov"](n,53).ngClassDirty,t["ɵnov"](n,53).ngClassValid,t["ɵnov"](n,53).ngClassInvalid,t["ɵnov"](n,53).ngClassPending,t["ɵnov"](n,54).hasErrors,t["ɵnov"](n,54).hasSuccess),l(n,63,0,t["ɵnov"](n,64).hasErrors,t["ɵnov"](n,64).hasSuccess),l(n,69,0,t["ɵnov"](n,74).ngClassUntouched,t["ɵnov"](n,74).ngClassTouched,t["ɵnov"](n,74).ngClassPristine,t["ɵnov"](n,74).ngClassDirty,t["ɵnov"](n,74).ngClassValid,t["ɵnov"](n,74).ngClassInvalid,t["ɵnov"](n,74).ngClassPending,t["ɵnov"](n,75).validClass,t["ɵnov"](n,75).invalidClass)}))}function N(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"cd-bootstrap-import-modal",[],null,null,null,E,S)),t["ɵdid"](1,245760,null,0,f.a,[v.a,b.a,C.a],null,null)],(function(l,n){l(n,1,0)}),null)}var F=t["ɵccf"]("cd-bootstrap-import-modal",f.a,N,{},{},[])},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,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 p(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,2,"strong",[],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 h(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,2,"strong",[],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 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,1),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,2),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,3),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,i.TitleCasePipe,[]),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"](7,0,null,null,1,"cd-table",[["identifier","name"]],null,null,null,r.b,r.a)),t["ɵdid"](8,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,8,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("gp3X"),p=e("sb0X"),h=e("KVJa"),g=e("Z21x"),f=e("sne2"),v=e("2JDI"),b=e("F83c"),C=e("LqlI"),S=e("2EZI"),_=e("kn/O");e.d(n,"a",(function(){return N}));var y=t["ɵcrt"]({encapsulation:0,styles:[[".bs-datepicker-head bs-datepicker-navigation-view{display:flex;justify-content:space-between}"]],data:{}});function R(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 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,['Wrong date format
. Please
use "YYYY-MM-DD HH:mm:ss".']))],null,null)}function I(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 k(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,["Move an image to trash"])),(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","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,30,"div",[["class","modal-body"]],null,null,null,null,null)),(l()(),t["ɵand"](16777216,null,null,1,null,R)),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,19,"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,9,"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.j,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,16384,null,0,a.h,[[3,s.d],a.a],{formControlName:[0,"formControlName"]},null),(l()(),t["ɵand"](16777216,null,0,1,null,w)),t["ɵdid"](39,16384,null,0,o.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"]},null),(l()(),t["ɵand"](16777216,null,0,1,null,I)),t["ɵdid"](41,16384,null,0,o.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.moveImage()&&t),t}),m.b,m.a)),t["ɵdid"](45,114688,null,0,p.a,[t.ElementRef],{form:[0,"form"]},{submitAction:"submitAction"}),(l()(),t["ɵted"](-1,0,["Move Image"])),(l()(),t["ɵeld"](47,0,null,null,1,"cd-back-button",[["name","Cancel"]],null,null,null,h.b,h.a)),t["ɵdid"](48,49152,null,0,g.a,[o.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.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,37,0,"expiresAt"),l(n,39,0,e.moveForm.showError("expiresAt",t["ɵnov"](n,7),"format")),l(n,41,0,e.moveForm.showError("expiresAt",t["ɵnov"](n,7),"expired")),l(n,45,0,e.moveForm),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.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,37).validClass,t["ɵnov"](n,37).invalidClass)}))}function E(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"cd-rbd-trash-move-modal",[],null,null,null,k,y)),t["ɵdid"](1,114688,null,0,v.a,[b.a,C.a,S.a,_.a],null,null)],(function(l,n){l(n,1,0)}),null)}var N=t["ɵccf"]("cd-rbd-trash-move-modal",v.a,E,{},{},[])},JBea:function(l,n,e){"use strict";e.d(n,"a",(function(){return t})),e("vCyI");class t{constructor(){}ngOnChanges(){this.selection.hasSelection&&(this.selectedItem=this.selection.first())}}},"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"),y=e("sne2"),R=e("x38r"),w=e("vCyI"),I=e("QTAa"),k=e("kvvV"),E=e("jVDg"),N=e("a0VL"),F=e("Fgil"),T=e("aexS"),V=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=>!l.hasSingleSelection||l.first().cdExecuting||!x.isUndefined(this.getCloneDisableDesc(e)),disableDesc:()=>this.getCloneDisableDesc(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){if(!l.includes("layering"))return this.i18n("Parent image must support Layering")}}class O{}class M{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:R.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:R.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 I.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 k.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 I.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 k.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 I.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 A=e("LqlI"),j=e("GiVz"),L=t["ɵcrt"]({encapsulation:0,styles:[[""]],data:{}});function $(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,$))],(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 U=e("EFGL"),X=e("aAWM"),z=e("aXbf"),W=e("o8EM"),J=e("nSDx"),Y=e("o4+5"),K=e("JBea");e.d(n,"b",(function(){return Z})),e.d(n,"c",(function(){return cl})),e.d(n,"a",(function(){return pl}));var Z=t["ɵcrt"]({encapsulation:0,styles:[[""]],data:{}});function H(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 Q(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 ll(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"]],[[1,"aria-describedby",0]],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")}),(function(l,n){l(n,1,0,t["ɵnov"](n,2).ariaDescribedby)}))}function nl(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.selectedItem.disk_usage));l(n,1,0,i)}))}function el(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"]],[[1,"aria-describedby",0]],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")}),(function(l,n){l(n,1,0,t["ɵnov"](n,2).ariaDescribedby)}))}function tl(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.selectedItem.total_disk_usage));l(n,1,0,i)}))}function il(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.selectedItem.parent.pool_namespace)}))}function ul(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,il)),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.selectedItem.parent.pool_namespace)}),(function(l,n){var e=n.component;l(n,1,0,e.selectedItem.parent.pool_name),l(n,4,0,e.selectedItem.parent.image_name,e.selectedItem.parent.snap_name)}))}function sl(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 al(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,105,"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,94,"tab",[["heading","Details"]],[[1,"id",0],[2,"active",null],[2,"tab-pane",null]],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,92,"table",[["class","table table-striped table-bordered"]],null,null,null,null,null)),(l()(),t["ɵeld"](5,0,null,null,91,"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,Q)),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,ll)),t["ɵdid"](57,16384,null,0,a.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"]},null),(l()(),t["ɵand"](16777216,null,null,1,null,nl)),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,el)),t["ɵdid"](65,16384,null,0,a.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"]},null),(l()(),t["ɵand"](16777216,null,null,1,null,tl)),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,ul)),t["ɵdid"](84,16384,null,0,a.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf"]},null),(l()(),t["ɵand"](16777216,null,null,1,null,sl)),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,0,4,"tab",[["heading","Snapshots"]],[[1,"id",0],[2,"active",null],[2,"tab-pane",null]],null,null,null,null)),t["ɵdid"](98,212992,null,0,r.b,[r.e,t.ElementRef,t.Renderer2],{heading:[0,"heading"]},null),(l()(),t["ɵeld"](99,0,null,null,2,"cd-rbd-snapshot-list",[],null,null,null,G,L)),t["ɵprd"](131584,null,h.a,h.a,[g.a,f.a]),t["ɵdid"](101,638976,null,0,M,[T.a,A.b,F.a,N.a,C.a,D.a,V.a,f.a,h.a,j.a,y.b],{snapshots:[0,"snapshots"],featuresName:[1,"featuresName"],poolName:[2,"poolName"],namespace:[3,"namespace"],rbdName:[4,"rbdName"]},null),(l()(),t["ɵeld"](102,0,null,0,3,"tab",[["heading","Configuration"]],[[1,"id",0],[2,"active",null],[2,"tab-pane",null]],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,1,"cd-rbd-configuration-table",[],null,null,null,U.b,U.a)),t["ɵdid"](105,638976,null,0,X.a,[z.a,W.a,j.a],{data:[0,"data"]},null)],(function(l,n){var e=n.component;l(n,3,0,"Details"),l(n,51,0,e.selectedItem.features_name),l(n,57,0,-1===(null==e.selectedItem.features_name?null:e.selectedItem.features_name.indexOf("fast-diff"))),l(n,59,0,-1!==(null==e.selectedItem.features_name?null:e.selectedItem.features_name.indexOf("fast-diff"))),l(n,65,0,-1===(null==e.selectedItem.features_name?null:e.selectedItem.features_name.indexOf("fast-diff"))),l(n,67,0,-1!==(null==e.selectedItem.features_name?null:e.selectedItem.features_name.indexOf("fast-diff"))),l(n,84,0,e.selectedItem.parent),l(n,86,0,!e.selectedItem.parent),l(n,98,0,"Snapshots"),l(n,101,0,e.selectedItem.snapshots,e.selectedItem.features_name,e.selectedItem.pool_name,e.selectedItem.namespace,e.selectedItem.name),l(n,103,0,"Configuration"),l(n,105,0,e.selectedItem.configuration)}),(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),l(n,10,0,e.selectedItem.name),l(n,15,0,e.selectedItem.pool_name);var i=t["ɵunv"](n,20,0,l(n,21,0,t["ɵnov"](n.parent,0),e.selectedItem.data_pool));l(n,20,0,i);var u=t["ɵunv"](n,26,0,l(n,27,0,t["ɵnov"](n.parent,1),e.selectedItem.timestamp));l(n,26,0,u);var s=t["ɵunv"](n,32,0,l(n,33,0,t["ɵnov"](n.parent,2),e.selectedItem.size));l(n,32,0,s);var a=t["ɵunv"](n,38,0,l(n,39,0,t["ɵnov"](n.parent,3),e.selectedItem.num_objs));l(n,38,0,a);var o=t["ɵunv"](n,44,0,l(n,45,0,t["ɵnov"](n.parent,2),e.selectedItem.obj_size));l(n,44,0,o);var r=t["ɵunv"](n,72,0,l(n,73,0,t["ɵnov"](n.parent,2),e.selectedItem.stripe_unit));l(n,72,0,r),l(n,78,0,e.selectedItem.stripe_count),l(n,91,0,e.selectedItem.block_name_prefix),l(n,96,0,e.selectedItem.order),l(n,97,0,t["ɵnov"](n,98).id,t["ɵnov"](n,98).active,t["ɵnov"](n,98).addClass),l(n,102,0,t["ɵnov"](n,103).id,t["ɵnov"](n,103).active,t["ɵnov"](n,103).addClass)}))}function ol(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"]],[[1,"aria-describedby",0]],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")}),(function(l,n){l(n,1,0,t["ɵnov"](n,2).ariaDescribedby)}))}function rl(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."]],[[1,"aria-describedby",0]],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.")}),(function(l,n){l(n,0,0,t["ɵnov"](n,1).ariaDescribedby)}))}function dl(l){return t["ɵvid"](0,[(l()(),t["ɵand"](16777216,null,null,1,null,ol)),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,rl))],(function(l,n){l(n,1,0,n.context.value-0,t["ɵnov"](n,2))}),null)}function cl(l){return t["ɵvid"](0,[t["ɵpid"](0,J.a,[]),t["ɵpid"](0,N.a,[a.DatePipe]),t["ɵpid"](0,F.a,[z.a]),t["ɵpid"](0,Y.a,[z.a]),t["ɵqud"](402653184,1,{poolConfigurationSourceTpl:0}),(l()(),t["ɵand"](0,[["usageNotAvailableTooltipTpl",2]],null,0,null,H)),(l()(),t["ɵand"](16777216,null,null,1,null,al)),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,dl))],(function(l,n){var e=n.component;l(n,7,0,null==e.selection?null:e.selection.hasSingleSelection)}),null)}function ml(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"cd-rbd-details",[],null,null,null,cl,Z)),t["ɵdid"](1,573440,null,0,K.a,[],null,null)],null,null)}var pl=t["ɵccf"]("cd-rbd-details",K.a,ml,{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");e("Fgil"),e("aexS"),e("aXbf"),e("kn/O");class g{constructor(){this.features=[]}}class f{constructor(){this.features=[]}}class v extends class{}{constructor(){super(...arguments),this.features=[]}}class b{constructor(){this.features=[]}}var C=function(l){return l.editing="editing",l.cloning="cloning",l.copying="copying",l}({});e.d(n,"a",(function(){return S}));class S{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=C,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()}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 v;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 b;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 g;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 f;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"]))}}},OcYo:function(l,n,e){"use strict";e.d(n,"a",(function(){return t}));class t{constructor(l,n,e){this.elementRef=l,this.renderer=n,this.toastr=e}ngOnInit(){const l=this.renderer.createElement("i");this.renderer.addClass(l,"fa"),this.renderer.addClass(l,"fa-clipboard"),this.renderer.appendChild(this.elementRef.nativeElement,l)}getInputElement(){return document.getElementById(this.cdCopy2ClipboardButton)}onClick(){try{const l=document.createElement("input");l.value=this.getInputElement().value,document.body.appendChild(l),l.select(),document.execCommand("copy"),document.body.removeChild(l),this.toastr.success("Copied text to the clipboard successfully.")}catch(l){this.toastr.error("Failed to copy text to the clipboard.")}}}},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("s7LF"),u=e("+gVj"),s=e("EEJc"),a=e("ajRT"),o=e("mXUL"),r=e("IZUe"),d=e("SVse"),c=e("gp3X"),m=e("sb0X"),p=e("KVJa"),h=e("Z21x"),g=e("sne2"),f=e("SuaG"),v=e("LqlI"),b=e("XED3"),C=e("kn/O");e.d(n,"a",(function(){return k}));var S=t["ɵcrt"]({encapsulation:0,styles:[[".form-group.ng-invalid[_ngcontent-%COMP%] .invalid-feedback[_ngcontent-%COMP%]{display:block}"]],data:{}});function _(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 y(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,9,"div",[["class","custom-control custom-checkbox"]],null,null,null,null,null)),(l()(),t["ɵeld"](1,0,null,null,6,"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,2).onChange(e.target.checked)&&i),"blur"===n&&(i=!1!==t["ɵnov"](l,2).onTouched()&&i),i}),null,null)),t["ɵdid"](2,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"](4,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"](6,16384,null,0,i.r,[[4,i.q]],null,null),t["ɵdid"](7,16384,null,0,u.h,[[3,i.d],u.a],{formControlName:[0,"formControlName"]},null),(l()(),t["ɵeld"](8,0,null,null,1,"label",[["class","custom-control-label"]],[[8,"htmlFor",0]],null,null,null,null)),(l()(),t["ɵted"](9,null,["",""]))],(function(l,n){l(n,4,0,t["ɵinlineInterpolate"](1,"",n.context.$implicit.name,"")),l(n,7,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,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,7).validClass,t["ɵnov"](n,7).invalidClass]),l(n,8,0,t["ɵinlineInterpolate"](1,"",n.context.$implicit.name,"")),l(n,9,0,n.context.$implicit.name)}))}function R(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 w(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,69,"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,["Create Bootstrap Token"])),(l()(),t["ɵeld"](4,0,null,1,65,null,null,null,null,null,null,null)),(l()(),t["ɵeld"](5,0,null,null,64,"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,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,u.d,[],{formGroup:[0,"formGroup"]},null),(l()(),t["ɵeld"](11,0,null,null,54,"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,15,"div
",[["class","form
-group
"]],[[2,"has
-error
",null],[2,"has
-success
",null]],null,null,o.b,o.a)),t["ɵdid
"](19,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
"](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,7,"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,26)._handleInput(e.target.value)&&i),"blur
"===n&&(i=!1!==t["ɵnov
"](l,26).onTouched()&&i),"compositionstart
"===n&&(i=!1!==t["ɵnov
"](l,26)._compositionStart()&&i),"compositionend
"===n&&(i=!1!==t["ɵnov
"](l,26)._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,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
"](28,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
"](30,16384,null,0,i.r,[[4,i.q]],null,null),t["ɵdid
"](31,16384,null,0,u.h,[[3,i.d],u.a],{formControlName:[0,"formControlName
"]},null),(l()(),t["ɵand
"](16777216,null,0,1,null,_)),t["ɵdid
"](33,16384,null,0,d.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf
"]},null),(l()(),t["ɵeld
"](34,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,o.b,o.a)),t["ɵdid
"](35,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
"](37,16384,null,0,i.s,[[4,i.d]],null,null),t["ɵdid
"](38,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
"](41,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,y)),t["ɵdid
"](44,278528,null,0,d.NgForOf,[t.ViewContainerRef,t.TemplateRef,t.IterableDiffers],{ngForOf:[0,"ngForOf
"]},null),(l()(),t["ɵand
"](16777216,null,0,1,null,R)),t["ɵdid
"](46,16384,null,0,d.NgIf,[t.ViewContainerRef,t.TemplateRef],{ngIf:[0,"ngIf
"]},null),(l()(),t["ɵeld
"](47,0,null,null,3,"div
",[["class","button
-group text
-right
"]],null,null,null,null,null)),(l()(),t["ɵeld
"](48,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}),c.b,c.a)),t["ɵdid
"](49,114688,null,0,m.a,[t.ElementRef],{form:[0,"form
"]},{submitAction:"submitAction
"}),(l()(),t["ɵted
"](-1,0,["Generate
"])),(l()(),t["ɵeld
"](51,0,null,null,14,"div
",[["class","form
-group
"]],[[2,"has
-error
",null],[2,"has
-success
",null]],null,null,o.b,o.a)),t["ɵdid
"](52,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
"](55,0,null,0,2,"label
",[["class","col
-form
-label
"],["for","token
"]],null,null,null,null,null)),(l()(),t["ɵeld
"](56,0,null,null,1,"span
",[],null,null,null,null,null)),(l()(),t["ɵted
"](-1,null,["Token
"])),(l()(),t["ɵeld
"](58,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,59)._handleInput(e.target.value)&&i),"blur
"===n&&(i=!1!==t["ɵnov
"](l,59).onTouched()&&i),"compositionstart
"===n&&(i=!1!==t["ɵnov
"](l,59)._compositionStart()&&i),"compositionend
"===n&&(i=!1!==t["ɵnov
"](l,59)._compositionEnd(e.target.value)&&i),i}),null,null)),t["ɵdid
"](59,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
"](61,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
"](63,16384,null,0,i.r,[[4,i.q]],null,null),t["ɵdid
"](64,16384,null,0,u.h,[[3,i.d],u.a],{formControlName:[0,"formControlName
"]},null),(l()(),t["ɵted
"](-1,null,[" "])),(l()(),t["ɵeld
"](66,0,null,null,3,"div
",[["class","modal
-footer
"]],null,null,null,null,null)),(l()(),t["ɵeld
"](67,0,null,null,2,"div
",[["class","button
-group text
-right
"]],null,null,null,null,null)),(l()(),t["ɵeld
"](68,0,null,null,1,"cd
-back
-button
",[["name
","Close
"]],null,null,null,p.b,p.a)),t["ɵdid
"](69,49152,null,0,h.a,[d.Location,g.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,28,0,"siteName
"),l(n,31,0,"siteName
"),l(n,33,0,e.createBootstrapForm.showError("siteName
",t["ɵnov
"](n,7),"required
")),l(n,35,0,"pools
"),l(n,38,0),l(n,44,0,e.pools),l(n,46,0,e.createBootstrapForm.showError("pools
",t["ɵnov
"](n,7),"requirePool
")),l(n,49,0,e.createBootstrapForm),l(n,52,0),l(n,61,0,"token
"),l(n,64,0,"token
"),l(n,69,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,30).ngClassUntouched,t["ɵnov
"](n,30).ngClassTouched,t["ɵnov
"](n,30).ngClassPristine,t["ɵnov
"](n,30).ngClassDirty,t["ɵnov
"](n,30).ngClassValid,t["ɵnov
"](n,30).ngClassInvalid,t["ɵnov
"](n,30).ngClassPending,t["ɵnov
"](n,31).validClass,t["ɵnov
"](n,31).invalidClass),l(n,34,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,38).hasErrors,t["ɵnov
"](n,38).hasSuccess),l(n,51,0,t["ɵnov
"](n,52).hasErrors,t["ɵnov
"](n,52).hasSuccess),l(n,58,0,t["ɵnov
"](n,63).ngClassUntouched,t["ɵnov
"](n,63).ngClassTouched,t["ɵnov
"](n,63).ngClassPristine,t["ɵnov
"](n,63).ngClassDirty,t["ɵnov
"](n,63).ngClassValid,t["ɵnov
"](n,63).ngClassInvalid,t["ɵnov
"](n,63).ngClassPending,t["ɵnov
"](n,64).validClass,t["ɵnov
"](n,64).invalidClass)}))}function I(l){return t["ɵvid
"](0,[(l()(),t["ɵeld
"](0,0,null,null,1,"cd
-bootstrap
-create
-modal
",[],null,null,null,w,S)),t["ɵdid
"](1,245760,null,0,f.a,[v.a,b.a,C.a],null,null)],(function(l,n){l(n,1,0)}),null)}var k=t["ɵccf
"]("cd
-bootstrap
-create
-modal
",f.a,I,{},{},[])},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=>{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
",0)}),null)}var C=e("HDdC
"),S=e("0+/T"),_=e("oxzT"),y=e("vCyI"),R=e("kvvV"),w=e("aexS"),I=e("kn/O
"),k=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 y.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=>{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(k.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 R.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"),T=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 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,V))],(function(l,n){var e=n.component;l(n,3,0,e.data,e.columns,"flex",0,"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=>{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 M=t["ɵcrt"]({encapsulation:0,styles:[[""]],data:{}});function A(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 j(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(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 $(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,null,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]],null,null,null,null)),t["ɵdid"](7,212992,null,0,B.b,[B.e,t.ElementRef,t.Renderer2],{heading:[0,"heading"]},null),(l()(),t["ɵeld"](8,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"](9,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["ɵeld"](10,0,null,0,3,"tab",[["heading","Syncing"]],[[1,"id",0],[2,"active",null],[2,"tab-pane",null]],null,null,null,null)),t["ɵdid"](11,212992,null,0,B.b,[B.e,t.ElementRef,t.Renderer2],{heading:[0,"heading"]},null),(l()(),t["ɵeld"](12,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"](13,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["ɵeld"](14,0,null,0,3,"tab",[["heading","Ready"]],[[1,"id",0],[2,"active",null],[2,"tab-pane",null]],null,null,null,null)),t["ɵdid"](15,212992,null,0,B.b,[B.e,t.ElementRef,t.Renderer2],{heading:[0,"heading"]},null),(l()(),t["ɵeld"](16,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"](17,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],["stateTmpl",2]],null,0,null,A)),(l()(),t["ɵand"](0,[[2,2],["syncTmpl",2]],null,0,null,j)),(l()(),t["ɵand"](0,[[3,2],["progressTmpl",2]],null,0,null,L))],(function(l,n){var e=n.component;l(n,7,0,"Issues"),l(n,9,0,e.image_error.data,e.image_error.columns,"flex",0),l(n,11,0,"Syncing"),l(n,13,0,e.image_syncing.data,e.image_syncing.columns,"flex",0),l(n,15,0,"Ready"),l(n,17,0,e.image_ready.data,e.image_ready.columns,"flex",0)}),(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),l(n,10,0,t["ɵnov"](n,11).id,t["ɵnov"](n,11).active,t["ɵnov"](n,11).addClass),l(n,14,0,t["ɵnov"](n,15).id,t["ɵnov"](n,15).active,t["ɵnov"](n,15).addClass)}))}var G=e("cxJu");e.d(n,"a",(function(){return W}));var U=t["ɵcrt"]({encapsulation:0,styles:[[""]],data:{}});function X(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,T)),t["ɵdid"](20,245760,null,0,N,[w.a,m.a,F.b,I.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,$,M)),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 z(l){return t["ɵvid"](0,[(l()(),t["ɵeld"](0,0,null,null,1,"cd-mirroring",[],null,null,null,X,U)),t["ɵdid"](1,245760,null,0,G.a,[w.a,m.a,F.b,g.a],null,null)],(function(l,n){l(n,1,0)}),null)}var W=t["ɵccf"]("cd-mirroring",G.a,z,{},{},[])},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
=>{if(!l
)return;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("gp3X"),m
=e("sb0X"),p
=e("KVJa"),h
=e("Z21x"),g
=e("sne2"),f
=e("L4us"),v
=e("LqlI"),b
=e("XED3"),C
=e("kn/O");e
.d(n
,"a",(function(){return P
}));var S
=t
["ɵcrt"]({encapsulation
:0,styles
:[[""]],data
:{}});function _(l
){return t
["ɵvid"](0,[(l()(),t
["ɵted"](-1,null,["Edit"]))],null,null)}function y(l
){return t
["ɵvid"](0,[(l()(),t
["ɵted"](-1,null,["Add"]))],null,null)}function R(l
){return t
["ɵvid"](0,[(l()(),t
["ɵted"](-1,null,["Edit"]))],null,null)}function w(l
){return t
["ɵvid"](0,[(l()(),t
["ɵted"](-1,null,["Add"]))],null,null)}function I(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,1,"span",[["class","invalid-feedback"]],null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["The cluster name is not valid."]))],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,["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,["The CephX ID is not valid."]))],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 monitory address is not valid."]))],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,["CephX key must be base64 encoded."]))],null,null)}function V(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,106,"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,_
)),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,y
)),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,96,null,null,null,null,null,null,null)),(l()(),t
["ɵeld"](11,0,null,null,95,"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,82,"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,R
)),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,w
)),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,17,"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,7,"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
,41)._handleInput(e
.target
.value
)&&i
),"blur"===n
&&(i
=!1!==t
["ɵnov"](l
,41).onTouched()&&i
),"compositionstart"===n
&&(i
=!1!==t
["ɵnov"](l
,41)._compositionStart()&&i
),"compositionend"===n
&&(i
=!1!==t
["ɵnov"](l
,41)._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,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"](43,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"](45,16384,null,0,a
.r
,[[4,a
.q
]],null,null),t
["ɵdid"](46,16384,null,0,o
.h
,[[3,a
.d
],o
.a
],{formControlName
:[0,"formControlName"]},null),(l()(),t
["ɵand"](16777216,null,0,1,null,I
)),t
["ɵdid"](48,16384,null,0,s
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵand"](16777216,null,0,1,null,k
)),t
["ɵdid"](50,16384,null,0,s
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵeld"](51,0,null,null,16,"div",[["class","form-group"]],[[2,"has-error",null],[2,"has-success",null]],null,null,r
.b
,r
.a
)),t
["ɵdid"](52,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"](55,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"](57,0,null,0,6,"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
,58)._handleInput(e
.target
.value
)&&i
),"blur"===n
&&(i
=!1!==t
["ɵnov"](l
,58).onTouched()&&i
),"compositionstart"===n
&&(i
=!1!==t
["ɵnov"](l
,58)._compositionStart()&&i
),"compositionend"===n
&&(i
=!1!==t
["ɵnov"](l
,58)._compositionEnd(e
.target
.value
)&&i
),i
}),null,null)),t
["ɵdid"](58,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"](60,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"](62,16384,null,0,a
.r
,[[4,a
.q
]],null,null),t
["ɵdid"](63,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"](65,16384,null,0,s
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵand"](16777216,null,0,1,null,N
)),t
["ɵdid"](67,16384,null,0,s
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵeld"](68,0,null,null,15,"div",[["class","form-group"]],[[2,"has-error",null],[2,"has-success",null]],null,null,r
.b
,r
.a
)),t
["ɵdid"](69,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"](72,0,null,0,2,"label",[["class","col-form-label"],["for","monAddr"]],null,null,null,null,null)),(l()(),t
["ɵeld"](73,0,null,null,1,"span",[],null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["Monitor Addresses"])),(l()(),t
["ɵeld"](75,0,null,0,6,"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
,76)._handleInput(e
.target
.value
)&&i
),"blur"===n
&&(i
=!1!==t
["ɵnov"](l
,76).onTouched()&&i
),"compositionstart"===n
&&(i
=!1!==t
["ɵnov"](l
,76)._compositionStart()&&i
),"compositionend"===n
&&(i
=!1!==t
["ɵnov"](l
,76)._compositionEnd(e
.target
.value
)&&i
),i
}),null,null)),t
["ɵdid"](76,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"](78,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"](80,16384,null,0,a
.r
,[[4,a
.q
]],null,null),t
["ɵdid"](81,16384,null,0,o
.h
,[[3,a
.d
],o
.a
],{formControlName
:[0,"formControlName"]},null),(l()(),t
["ɵand"](16777216,null,0,1,null,F
)),t
["ɵdid"](83,16384,null,0,s
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵeld"](84,0,null,null,15,"div",[["class","form-group"]],[[2,"has-error",null],[2,"has-success",null]],null,null,r
.b
,r
.a
)),t
["ɵdid"](85,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"](88,0,null,0,2,"label",[["class","col-form-label"],["for","key"]],null,null,null,null,null)),(l()(),t
["ɵeld"](89,0,null,null,1,"span",[],null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["CephX Key"])),(l()(),t
["ɵeld"](91,0,null,0,6,"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
,92)._handleInput(e
.target
.value
)&&i
),"blur"===n
&&(i
=!1!==t
["ɵnov"](l
,92).onTouched()&&i
),"compositionstart"===n
&&(i
=!1!==t
["ɵnov"](l
,92)._compositionStart()&&i
),"compositionend"===n
&&(i
=!1!==t
["ɵnov"](l
,92)._compositionEnd(e
.target
.value
)&&i
),i
}),null,null)),t
["ɵdid"](92,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"](94,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"](96,16384,null,0,a
.r
,[[4,a
.q
]],null,null),t
["ɵdid"](97,16384,null,0,o
.h
,[[3,a
.d
],o
.a
],{formControlName
:[0,"formControlName"]},null),(l()(),t
["ɵand"](16777216,null,0,1,null,T
)),t
["ɵdid"](99,16384,null,0,s
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵeld"](100,0,null,null,6,"div",[["class","modal-footer"]],null,null,null,null,null)),(l()(),t
["ɵeld"](101,0,null,null,5,"div",[["class","button-group text-right"]],null,null,null,null,null)),(l()(),t
["ɵeld"](102,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
}),c
.b
,c
.a
)),t
["ɵdid"](103,114688,null,0,m
.a
,[t
.ElementRef
],{form
:[0,"form"]},{submitAction
:"submitAction"}),(l()(),t
["ɵted"](-1,0,["Submit"])),(l()(),t
["ɵeld"](105,0,null,null,1,"cd-back-button",[["name","Cancel"]],null,null,null,p
.b
,p
.a
)),t
["ɵdid"](106,49152,null,0,h
.a
,[s
.Location
,g
.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
,43,0,"clusterName"),l(n
,46,0,"clusterName"),l(n
,48,0,e
.editPeerForm
.showError("clusterName",t
["ɵnov"](n
,13),"required")),l(n
,50,0,e
.editPeerForm
.showError("clusterName",t
["ɵnov"](n
,13),"invalidClusterName")),l(n
,52,0),l(n
,60,0,"clientID"),l(n
,63,0,"clientID"),l(n
,65,0,e
.editPeerForm
.showError("clientID",t
["ɵnov"](n
,13),"required")),l(n
,67,0,e
.editPeerForm
.showError("clientID",t
["ɵnov"](n
,13),"invalidClientID")),l(n
,69,0),l(n
,78,0,"monAddr"),l(n
,81,0,"monAddr"),l(n
,83,0,e
.editPeerForm
.showError("monAddr",t
["ɵnov"](n
,13),"invalidMonAddr")),l(n
,85,0),l(n
,94,0,"key"),l(n
,97,0,"key"),l(n
,99,0,e
.editPeerForm
.showError("key",t
["ɵnov"](n
,13),"invalidKey")),l(n
,103,0,e
.editPeerForm
),l(n
,106,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
,45).ngClassUntouched
,t
["ɵnov"](n
,45).ngClassTouched
,t
["ɵnov"](n
,45).ngClassPristine
,t
["ɵnov"](n
,45).ngClassDirty
,t
["ɵnov"](n
,45).ngClassValid
,t
["ɵnov"](n
,45).ngClassInvalid
,t
["ɵnov"](n
,45).ngClassPending
,t
["ɵnov"](n
,46).validClass
,t
["ɵnov"](n
,46).invalidClass
),l(n
,51,0,t
["ɵnov"](n
,52).hasErrors
,t
["ɵnov"](n
,52).hasSuccess
),l(n
,57,0,t
["ɵnov"](n
,62).ngClassUntouched
,t
["ɵnov"](n
,62).ngClassTouched
,t
["ɵnov"](n
,62).ngClassPristine
,t
["ɵnov"](n
,62).ngClassDirty
,t
["ɵnov"](n
,62).ngClassValid
,t
["ɵnov"](n
,62).ngClassInvalid
,t
["ɵnov"](n
,62).ngClassPending
,t
["ɵnov"](n
,63).validClass
,t
["ɵnov"](n
,63).invalidClass
),l(n
,68,0,t
["ɵnov"](n
,69).hasErrors
,t
["ɵnov"](n
,69).hasSuccess
),l(n
,75,0,t
["ɵnov"](n
,80).ngClassUntouched
,t
["ɵnov"](n
,80).ngClassTouched
,t
["ɵnov"](n
,80).ngClassPristine
,t
["ɵnov"](n
,80).ngClassDirty
,t
["ɵnov"](n
,80).ngClassValid
,t
["ɵnov"](n
,80).ngClassInvalid
,t
["ɵnov"](n
,80).ngClassPending
,t
["ɵnov"](n
,81).validClass
,t
["ɵnov"](n
,81).invalidClass
),l(n
,84,0,t
["ɵnov"](n
,85).hasErrors
,t
["ɵnov"](n
,85).hasSuccess
),l(n
,91,0,t
["ɵnov"](n
,96).ngClassUntouched
,t
["ɵnov"](n
,96).ngClassTouched
,t
["ɵnov"](n
,96).ngClassPristine
,t
["ɵnov"](n
,96).ngClassDirty
,t
["ɵnov"](n
,96).ngClassValid
,t
["ɵnov"](n
,96).ngClassInvalid
,t
["ɵnov"](n
,96).ngClassPending
,t
["ɵnov"](n
,97).validClass
,t
["ɵnov"](n
,97).invalidClass
)}))}function D(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,1,"cd-pool-edit-peer-modal",[],null,null,null,V
,S
)),t
["ɵdid"](1,114688,null,0,f
.a
,[v
.a
,b
.a
,C
.a
],null,null)],(function(l
,n
){l(n
,1,0)}),null)}var P
=t
["ɵccf"]("cd-pool-edit-peer-modal",f
.a
,D
,{},{},[])},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 d
}));var t
=e("mrSG"),i
=e("IheW"),u
=e("2Vo4"),s
=e("xTzq"),a
=e("lOp/"),o
=e("8Y7J"),r
=e("pL04");let d
=(()=>{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
)}}getCurrentSummary(){return this.summaryDataSource
.getValue()}subscribeSummary(l
,n
){return this.summaryData
$.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
=o
["ɵɵdefineInjectable"]({factory:function(){return new l(o
["ɵɵinject"](i
.c
),o
["ɵɵinject"](a
.a
))},token
:l
,providedIn
:r
.a
}),t
.__decorate([t
.__param(0,s
.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,s
.b
),t
.__param(2,s
.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([s
.a
,t
.__metadata("design:paramtypes",[i
.c
,a
.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 d
}));var t
=e("LvDl"),i
=e("cp0P"),u
=(e("Ekvf"),e("F83c"),e("0+/T")),s
=(e("sne2"),e("oxzT")),a
=e("mtw6"),o
=e("vCyI"),r
=(e("aexS"),e("9nlD"),e("daK0"));class d
{constructor(l
,n
,e
,i
,u
,a
,r
){this.authStorageService
=l
,this.rbdService
=n
,this.poolService
=e
,this.modalService
=i
,this.notificationService
=u
,this.i18n
=a
,this.actionLabels
=r
,this.selection
=new o
.a
,this.permission
=this.authStorageService
.getPermissions().rbdImage
,this.tableActions
=[{permission
:"create",icon
:s
.a
.add
,click
:()=>this.createModal(),name
:this.actionLabels
.CREATE
},{permission
:"delete",icon
:s
.a
.destroy
,click
:()=>this.deleteModal(),name
:this.actionLabels
.DELETE
,disable
:()=>!this.selection
.first()||!t
.isUndefined(this.getDeleteDisableDesc()),disableDesc
:()=>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(i
.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(r
.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(u
.a
,{initialState
:{itemDescription
:"Namespace",itemNames
:[`${l}/${n}`],submitAction
:()=>this.rbdService
.deleteNamespace(l
,n
).subscribe(()=>{this.notificationService
.show(a
.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();if(l
&&l
.num_images
>0)return 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
=>{if(this.peerExists
=!1,!l
)return;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("SVse"),m
=e("D4zM"),p
=e("OcYo"),h
=e("EApP"),g
=e("KVJa"),f
=e("Z21x"),v
=e("sne2"),b
=e("Sofw"),C
=e("aexS"),S
=e("LqlI"),_
=e("my5R"),y
=e("9nlD"),R
=e("GiVz");e
.d(n
,"a",(function(){return B
}));var w
=t
["ɵcrt"]({encapsulation
:0,styles
:[[""]],data
:{}});function I(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,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 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,["Passwords must have a length of 12 to 16 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 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,["User names must have a length of 8 to 64 characters and can contain alphanumeric characters, '.', '@', '-', '_' or ':'."]))],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 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,["Passwords must have a length of 12 to 16 characters and can contain alphanumeric characters, '@', '-', '_' or '/'."]))],null,null)}function P(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 x(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,102,"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,98,null,null,null,null,null,null,null)),(l()(),t
["ɵeld"](5,0,null,null,97,"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,85,"div",[["class","modal-body"]],null,null,null,null,null)),(l()(),t
["ɵeld"](12,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"](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,11,"div",[["class","cd-col-form-input"]],null,null,null,null,null)),(l()(),t
["ɵeld"](19,0,null,null,6,"input",[["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,16384,null,0,r
.h
,[[3,o
.d
],r
.a
],{formControlName
:[0,"formControlName"]},null),(l()(),t
["ɵand"](16777216,null,null,1,null,I
)),t
["ɵdid"](27,16384,null,0,c
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵand"](16777216,null,null,1,null,k
)),t
["ɵdid"](29,16384,null,0,c
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵeld"](30,0,null,null,23,"div",[["class","form-group row"]],[[2,"has-error",null],[2,"has-success",null]],null,null,d
.b
,d
.a
)),t
["ɵdid"](31,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"](34,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"](36,0,null,0,17,"div",[["class","cd-col-form-input"]],null,null,null,null,null)),(l()(),t
["ɵeld"](37,0,null,null,12,"div",[["class","input-group"]],null,null,null,null,null)),(l()(),t
["ɵeld"](38,0,null,null,6,"input",[["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
,39)._handleInput(e
.target
.value
)&&i
),"blur"===n
&&(i
=!1!==t
["ɵnov"](l
,39).onTouched()&&i
),"compositionstart"===n
&&(i
=!1!==t
["ɵnov"](l
,39)._compositionStart()&&i
),"compositionend"===n
&&(i
=!1!==t
["ɵnov"](l
,39)._compositionEnd(e
.target
.value
)&&i
),i
}),null,null)),t
["ɵdid"](39,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"](41,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"](43,16384,null,0,o
.r
,[[4,o
.q
]],null,null),t
["ɵdid"](44,16384,null,0,r
.h
,[[3,o
.d
],r
.a
],{formControlName
:[0,"formControlName"]},null),(l()(),t
["ɵeld"](45,0,null,null,4,"span",[["class","input-group-append"]],null,null,null,null,null)),(l()(),t
["ɵeld"](46,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
,47).onClick()&&i
),i
}),null,null)),t
["ɵdid"](47,81920,null,0,m
.a
,[t
.ElementRef
,t
.Renderer2
],{cdPasswordButton
:[0,"cdPasswordButton"]},null),(l()(),t
["ɵeld"](48,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
,49).onClick()&&i
),i
}),null,null)),t
["ɵdid"](49,81920,null,0,p
.a
,[t
.ElementRef
,t
.Renderer2
,h
.j
],{cdCopy2ClipboardButton
:[0,"cdCopy2ClipboardButton"]},null),(l()(),t
["ɵand"](16777216,null,null,1,null,E
)),t
["ɵdid"](51,16384,null,0,c
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵand"](16777216,null,null,1,null,N
)),t
["ɵdid"](53,16384,null,0,c
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵeld"](54,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"](55,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"](58,0,null,0,2,"label",[["class","cd-col-form-label"],["for","mutual_user"]],null,null,null,null,null)),(l()(),t
["ɵeld"](59,0,null,null,1,null,null,null,null,null,null,null)),(l()(),t
["ɵted"](-1,null,["Mutual User"])),(l()(),t
["ɵeld"](61,0,null,0,11,"div",[["class","cd-col-form-input"]],null,null,null,null,null)),(l()(),t
["ɵeld"](62,0,null,null,6,"input",[["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
,63)._handleInput(e
.target
.value
)&&i
),"blur"===n
&&(i
=!1!==t
["ɵnov"](l
,63).onTouched()&&i
),"compositionstart"===n
&&(i
=!1!==t
["ɵnov"](l
,63)._compositionStart()&&i
),"compositionend"===n
&&(i
=!1!==t
["ɵnov"](l
,63)._compositionEnd(e
.target
.value
)&&i
),i
}),null,null)),t
["ɵdid"](63,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"](65,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"](67,16384,null,0,o
.r
,[[4,o
.q
]],null,null),t
["ɵdid"](68,16384,null,0,r
.h
,[[3,o
.d
],r
.a
],{formControlName
:[0,"formControlName"]},null),(l()(),t
["ɵand"](16777216,null,null,1,null,F
)),t
["ɵdid"](70,16384,null,0,c
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵand"](16777216,null,null,1,null,T
)),t
["ɵdid"](72,16384,null,0,c
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵeld"](73,0,null,null,23,"div",[["class","form-group row"]],[[2,"has-error",null],[2,"has-success",null]],null,null,d
.b
,d
.a
)),t
["ɵdid"](74,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"](77,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"](79,0,null,0,17,"div",[["class","cd-col-form-input"]],null,null,null,null,null)),(l()(),t
["ɵeld"](80,0,null,null,12,"div",[["class","input-group"]],null,null,null,null,null)),(l()(),t
["ɵeld"](81,0,null,null,6,"input",[["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
,82)._handleInput(e
.target
.value
)&&i
),"blur"===n
&&(i
=!1!==t
["ɵnov"](l
,82).onTouched()&&i
),"compositionstart"===n
&&(i
=!1!==t
["ɵnov"](l
,82)._compositionStart()&&i
),"compositionend"===n
&&(i
=!1!==t
["ɵnov"](l
,82)._compositionEnd(e
.target
.value
)&&i
),i
}),null,null)),t
["ɵdid"](82,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"](84,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"](86,16384,null,0,o
.r
,[[4,o
.q
]],null,null),t
["ɵdid"](87,16384,null,0,r
.h
,[[3,o
.d
],r
.a
],{formControlName
:[0,"formControlName"]},null),(l()(),t
["ɵeld"](88,0,null,null,4,"span",[["class","input-group-append"]],null,null,null,null,null)),(l()(),t
["ɵeld"](89,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
,90).onClick()&&i
),i
}),null,null)),t
["ɵdid"](90,81920,null,0,m
.a
,[t
.ElementRef
,t
.Renderer2
],{cdPasswordButton
:[0,"cdPasswordButton"]},null),(l()(),t
["ɵeld"](91,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
,92).onClick()&&i
),i
}),null,null)),t
["ɵdid"](92,81920,null,0,p
.a
,[t
.ElementRef
,t
.Renderer2
,h
.j
],{cdCopy2ClipboardButton
:[0,"cdCopy2ClipboardButton"]},null),(l()(),t
["ɵand"](16777216,null,null,1,null,V
)),t
["ɵdid"](94,16384,null,0,c
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵand"](16777216,null,null,1,null,D
)),t
["ɵdid"](96,16384,null,0,c
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵeld"](97,0,null,null,5,"div",[["class","modal-footer"]],null,null,null,null,null)),(l()(),t
["ɵeld"](98,0,null,null,4,"div",[["class","button-group text-right"]],null,null,null,null,null)),(l()(),t
["ɵand"](16777216,null,null,1,null,P
)),t
["ɵdid"](100,16384,null,0,c
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵeld"](101,0,null,null,1,"cd-back-button",[["name","Cancel"]],null,null,null,g
.b
,g
.a
)),t
["ɵdid"](102,49152,null,0,f
.a
,[c
.Location
,v
.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
,25,0,"user"),l(n
,27,0,e
.discoveryForm
.showError("user",t
["ɵnov"](n
,7),"required")),l(n
,29,0,e
.discoveryForm
.showError("user",t
["ɵnov"](n
,7),"pattern")),l(n
,31,0),l(n
,41,0,"password"),l(n
,44,0,"password"),l(n
,47,0,"password"),l(n
,49,0,"password"),l(n
,51,0,e
.discoveryForm
.showError("password",t
["ɵnov"](n
,7),"required")),l(n
,53,0,e
.discoveryForm
.showError("password",t
["ɵnov"](n
,7),"pattern")),l(n
,55,0),l(n
,65,0,"mutual_user"),l(n
,68,0,"mutual_user"),l(n
,70,0,e
.discoveryForm
.showError("mutual_user",t
["ɵnov"](n
,7),"required")),l(n
,72,0,e
.discoveryForm
.showError("mutual_user",t
["ɵnov"](n
,7),"pattern")),l(n
,74,0),l(n
,84,0,"mutual_password"),l(n
,87,0,"mutual_password"),l(n
,90,0,"mutual_password"),l(n
,92,0,"mutual_password"),l(n
,94,0,e
.discoveryForm
.showError("mutual_password",t
["ɵnov"](n
,7),"required")),l(n
,96,0,e
.discoveryForm
.showError("mutual_password",t
["ɵnov"](n
,7),"pattern")),l(n
,100,0,e
.hasPermission
),l(n
,102,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
,25).validClass
,t
["ɵnov"](n
,25).invalidClass
),l(n
,30,0,t
["ɵnov"](n
,31).hasErrors
,t
["ɵnov"](n
,31).hasSuccess
),l(n
,38,0,t
["ɵnov"](n
,43).ngClassUntouched
,t
["ɵnov"](n
,43).ngClassTouched
,t
["ɵnov"](n
,43).ngClassPristine
,t
["ɵnov"](n
,43).ngClassDirty
,t
["ɵnov"](n
,43).ngClassValid
,t
["ɵnov"](n
,43).ngClassInvalid
,t
["ɵnov"](n
,43).ngClassPending
,t
["ɵnov"](n
,44).validClass
,t
["ɵnov"](n
,44).invalidClass
),l(n
,54,0,t
["ɵnov"](n
,55).hasErrors
,t
["ɵnov"](n
,55).hasSuccess
),l(n
,62,0,t
["ɵnov"](n
,67).ngClassUntouched
,t
["ɵnov"](n
,67).ngClassTouched
,t
["ɵnov"](n
,67).ngClassPristine
,t
["ɵnov"](n
,67).ngClassDirty
,t
["ɵnov"](n
,67).ngClassValid
,t
["ɵnov"](n
,67).ngClassInvalid
,t
["ɵnov"](n
,67).ngClassPending
,t
["ɵnov"](n
,68).validClass
,t
["ɵnov"](n
,68).invalidClass
),l(n
,73,0,t
["ɵnov"](n
,74).hasErrors
,t
["ɵnov"](n
,74).hasSuccess
),l(n
,81,0,t
["ɵnov"](n
,86).ngClassUntouched
,t
["ɵnov"](n
,86).ngClassTouched
,t
["ɵnov"](n
,86).ngClassPristine
,t
["ɵnov"](n
,86).ngClassDirty
,t
["ɵnov"](n
,86).ngClassValid
,t
["ɵnov"](n
,86).ngClassInvalid
,t
["ɵnov"](n
,86).ngClassPending
,t
["ɵnov"](n
,87).validClass
,t
["ɵnov"](n
,87).invalidClass
)}))}function q(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,1,"cd-iscsi-target-discovery-modal",[],null,null,null,x
,w
)),t
["ɵdid"](1,114688,null,0,b
.a
,[C
.a
,S
.a
,_
.a
,y
.a
,R
.a
],null,null)],(function(l
,n
){l(n
,1,0)}),null)}var B
=t
["ɵccf"]("cd-iscsi-target-discovery-modal",b
.a
,q
,{},{},[])},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
=>{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 d
}));var t
=e("LvDl"),i
=(e("my5R"),e("0+/T")),u
=(e("sne2"),e("uIqm"),e("x38r")),s
=e("oxzT"),a
=e("vCyI"),o
=e("kvvV"),r
=(e("+0ag"),e("G1/K"),e("aexS"),e("mSOc"),e("VTlA"),e("kn/O"),e("Sofw"));class d
{constructor(l
,n
,e
,i
,u
,o
,r
,d
,c
,m
){this.authStorageService
=l
,this.i18n
=n
,this.iscsiService
=e
,this.taskListService
=i
,this.cephReleaseNamePipe
=u
,this.notAvailablePipe
=o
,this.summaryservice
=r
,this.modalService
=d
,this.taskWrapper
=c
,this.actionLabels
=m
,this.available
=void 0,this.selection
=new a
.a
,this.targets
=[],this.icons
=s
.a
,this.builders
={"iscsi/target/create":l
=>({target_iqn
:l
.target_iqn
})},this.permission
=this.authStorageService
.getPermissions().iscsi
,this.tableActions
=[{permission
:"create",icon
:s
.a
.add
,routerLink
:()=>"/block/iscsi/targets/create",name
:this.actionLabels
.CREATE
},{permission
:"update",icon
:s
.a
.edit
,routerLink
:()=>`/block/iscsi/targets/edit/${this.selection.first().target_iqn}`,name
:this.actionLabels
.EDIT
,disable
:()=>!this.selection
.first()||!t
.isUndefined(this.getDeleteDisableDesc()),disableDesc
:()=>this.getEditDisableDesc()},{permission
:"delete",icon
:s
.a
.destroy
,click
:()=>this.deleteIscsiTargetModal(),name
:this.actionLabels
.DELETE
,disable
:()=>!this.selection
.first()||!t
.isUndefined(this.getDeleteDisableDesc()),disableDesc
:()=>this.getDeleteDisableDesc()}]}ngOnInit(){this.columns
=[{name
:this.i18n("Target"),prop
:"target_iqn",flexGrow
:2,cellTransformation
:u
.a
.executing
},{name
:this.i18n("Portals"),prop
:"cdPortals",flexGrow
:2},{name
:this.i18n("Images"),prop
:"cdImages",flexGrow
:2},{name
:this.i18n("# Sessions"),prop
:"info.num_sessions",pipe
:this.notAvailablePipe
,flexGrow
:1}],this.iscsiService
.status().subscribe(l
=>{if(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
});else{const n
=this.summaryservice
.getCurrentSummary(),e
=this.cephReleaseNamePipe
.transform(n
.version
);this.docsUrl
=`http://docs.ceph.com/docs/${e}/mgr/dashboard/#enabling-iscsi-management`,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)"):void 0}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"):void 0}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(i
.a
,{initialState
:{itemDescription
:this.i18n("iSCSI target"),itemNames
:[l
],submitActionObservable
:()=>this.taskWrapper
.wrapTaskAroundCall({task
:new o
.a("iscsi/target/delete",{target_iqn
:l
}),call
:this.iscsiService
.deleteTarget(l
)})}})}configureDiscoveryAuth(){this.modalService
.show(r
.a
,{})}}},eF8U:function(l
,n
,e
){"use strict";var t
=e("8Y7J"),i
=e("s7LF"),u
=e("+gVj"),s
=e("SVse"),a
=e("mXUL");e("jMP8"),e
.d(n
,"a",(function(){return o
})),e
.d(n
,"b",(function(){return v
}));var o
=t
["ɵcrt"]({encapsulation
:0,styles
:[[""]],data
:{}});function r(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 d(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,11,"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,16384,null,0,u
.h
,[[3,i
.d
],u
.a
],{formControlName
:[0,"formControlName"]},null),(l()(),t
["ɵeld"](7,0,null,null,2,"option",[],null,null,null,null,null)),t
["ɵdid"](8,147456,null,0,i
.v
,[t
.ElementRef
,t
.Renderer2
,[2,i
.A
]],{ngValue
:[0,"ngValue"]},null),t
["ɵdid"](9,147456,null,0,i
.F
,[t
.ElementRef
,t
.Renderer2
,[8,null]],{ngValue
:[0,"ngValue"]},null),(l()(),t
["ɵand"](16777216,null,null,1,null,r
)),t
["ɵdid"](11,278528,null,0,s
.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
,6,0,e
.setting
),l(n
,8,0,null),l(n
,9,0,null),l(n
,11,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
,6).validClass
,t
["ɵnov"](n
,6).invalidClass
])}))}function c(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,7,"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,16384,null,0,u
.h
,[[3,i
.d
],u
.a
],{formControlName
:[0,"formControlName"]},null)],(function(l
,n
){var e
=n
.component
;l(n
,4,0,e
.setting
),l(n
,7,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
,7).validClass
,t
["ɵnov"](n
,7).invalidClass
)}))}function m(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,6,"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,16384,null,0,u
.h
,[[3,i
.d
],u
.a
],{formControlName
:[0,"formControlName"]},null)],(function(l
,n
){var e
=n
.component
;l(n
,3,0,e
.setting
),l(n
,6,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
,6).validClass
,t
["ɵnov"](n
,6).invalidClass
)}))}function p(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,23,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,10,"div",[["class","custom-control custom-radio custom-control-inline"]],null,null,null,null,null)),(l()(),t
["ɵeld"](3,0,null,null,7,"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,16384,null,0,u
.h
,[[3,i
.d
],u
.a
],{formControlName
:[0,"formControlName"]},null),(l()(),t
["ɵeld"](11,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"](13,0,null,null,10,"div",[["class","custom-control custom-radio custom-control-inline"]],null,null,null,null,null)),(l()(),t
["ɵeld"](14,0,null,null,7,"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
,15)._handleInput(e
.target
.value
)&&i
),"blur"===n
&&(i
=!1!==t
["ɵnov"](l
,15).onTouched()&&i
),"compositionstart"===n
&&(i
=!1!==t
["ɵnov"](l
,15)._compositionStart()&&i
),"compositionend"===n
&&(i
=!1!==t
["ɵnov"](l
,15)._compositionEnd(e
.target
.value
)&&i
),"change"===n
&&(i
=!1!==t
["ɵnov"](l
,16).onChange()&&i
),"blur"===n
&&(i
=!1!==t
["ɵnov"](l
,16).onTouched()&&i
),i
}),null,null)),t
["ɵdid"](15,16384,null,0,i
.e
,[t
.Renderer2
,t
.ElementRef
,[2,i
.b
]],null,null),t
["ɵdid"](16,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"](18,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"](20,16384,null,0,i
.r
,[[4,i
.q
]],null,null),t
["ɵdid"](21,16384,null,0,u
.h
,[[3,i
.d
],u
.a
],{formControlName
:[0,"formControlName"]},null),(l()(),t
["ɵeld"](22,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
,10,0,e
.setting
),l(n
,16,0,e
.setting
,!1),l(n
,18,0,e
.setting
),l(n
,21,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
,10).validClass
,t
["ɵnov"](n
,10).invalidClass
),l(n
,11,0,e
.setting
+"True"),l(n
,14,0,e
.setting
+"False",t
["ɵnov"](n
,20).ngClassUntouched
,t
["ɵnov"](n
,20).ngClassTouched
,t
["ɵnov"](n
,20).ngClassPristine
,t
["ɵnov"](n
,20).ngClassDirty
,t
["ɵnov"](n
,20).ngClassValid
,t
["ɵnov"](n
,20).ngClassInvalid
,t
["ɵnov"](n
,20).ngClassPending
,t
["ɵnov"](n
,21).validClass
,t
["ɵnov"](n
,21).invalidClass
),l(n
,22,0,e
.setting
+"False")}))}function h(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,c
)),t
["ɵdid"](2,16384,null,0,s
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵand"](16777216,null,null,1,null,m
)),t
["ɵdid"](4,16384,null,0,s
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵand"](16777216,null,null,1,null,p
)),t
["ɵdid"](6,16384,null,0,s
.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 g(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 f(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 v(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
}),a
.b
,a
.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,u
.d
,[],{formGroup
:[0,"formGroup"]},null),t
["ɵdid"](5,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"](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,d
)),t
["ɵdid"](11,16384,null,0,s
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵand"](16777216,null,0,1,null,h
)),t
["ɵdid"](13,16384,null,0,s
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵand"](16777216,null,0,1,null,g
)),t
["ɵdid"](15,16384,null,0,s
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵand"](16777216,null,0,1,null,f
)),t
["ɵdid"](17,16384,null,0,s
.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 y(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 R(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,1,"cd-iscsi-target-iqn-settings-modal",[],null,null,null,y
,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
,R
,{},{},[])},"lz+O":function(l
,n
,e
){"use strict";var t
=e("8Y7J"),i
=e("s7LF"),u
=e("+gVj"),s
=e("SVse"),a
=e("EEJc"),o
=e("ajRT"),r
=e("mXUL"),d
=e("gp3X"),c
=e("sb0X"),m
=e("KVJa"),p
=e("Z21x"),h
=e("sne2"),g
=e("WxU5"),f
=e("aexS"),v
=e("F83c"),b
=e("LqlI"),C
=e("2EZI"),S
=e("Ekvf"),_
=e("kn/O");e
.d(n
,"a",(function(){return N
}));var y
=t
["ɵcrt"]({encapsulation
:0,styles
:[[""]],data
:{}});function R(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,6,"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,16384,null,0,u
.h
,[[3,i
.d
],u
.a
],{formControlName
:[0,"formControlName"]},null)],(function(l
,n
){l(n
,3,0,"poolName"),l(n
,6,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
,6).validClass
,t
["ɵnov"](n
,6).invalidClass
)}))}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
),l(n
,2,0,n
.context
.$implicit
)}),(function(l
,n
){l(n
,3,0,n
.context
.$implicit
)}))}function I(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,12,"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,16384,null,0,u
.h
,[[3,i
.d
],u
.a
],{formControlName
:[0,"formControlName"]},null),(l()(),t
["ɵeld"](7,0,null,null,3,"option",[["value",""]],null,null,null,null,null)),t
["ɵdid"](8,147456,null,0,i
.v
,[t
.ElementRef
,t
.Renderer2
,[2,i
.A
]],{value
:[0,"value"]},null),t
["ɵdid"](9,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,w
)),t
["ɵdid"](12,278528,null,0,s
.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
,6,0,"poolName"),l(n
,8,0,""),l(n
,9,0,""),l(n
,12,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
,6).validClass
,t
["ɵnov"](n
,6).invalidClass
)}))}function k(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,41,"cd-modal",[],null,null,null,a
.c
,a
.b
)),t
["ɵdid"](1,49152,null,0,o
.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,u
.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,r
.b
,r
.a
)),t
["ɵdid"](26,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"](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,R
)),t
["ɵdid"](32,16384,null,0,s
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵand"](16777216,null,0,1,null,I
)),t
["ɵdid"](34,16384,null,0,s
.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
}),d
.b
,d
.a
)),t
["ɵdid"](38,114688,null,0,c
.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,m
.b
,m
.a
)),t
["ɵdid"](41,49152,null,0,p
.a
,[s
.Location
,h
.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 E(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,1,"cd-rbd-trash-purge-modal",[],null,null,null,k
,y
)),t
["ɵdid"](1,114688,null,0,g
.a
,[f
.a
,v
.a
,b
.a
,C
.a
,S
.a
,_
.a
],null,null)],(function(l
,n
){l(n
,1,0)}),null)}var N
=t
["ɵccf"]("cd-rbd-trash-purge-modal",g
.a
,E
,{},{},[])},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("SVse"),d
=e("gp3X"),c
=e("sb0X"),m
=e("KVJa"),p
=e("Z21x"),h
=e("sne2"),g
=e("aa9H"),f
=e("LqlI"),v
=e("GiVz"),b
=e("XED3"),C
=e("kn/O");e
.d(n
,"a",(function(){return I
}));var S
=t
["ɵcrt"]({encapsulation
:0,styles
:[[""]],data
:{}});function _(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 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,["Peer clusters must be removed prior to disabling mirror."]))],null,null)}function R(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,45,"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,41,null,null,null,null,null,null,null)),(l()(),t
["ɵeld"](5,0,null,null,40,"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,27,"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,17,"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,8,"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
,29).onChange(e
.target
.value
)&&i
),"blur"===n
&&(i
=!1!==t
["ɵnov"](l
,29).onTouched()&&i
),i
}),null,null)),t
["ɵdid"](29,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"](31,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"](33,16384,null,0,i
.r
,[[4,i
.q
]],null,null),t
["ɵdid"](34,16384,null,0,a
.h
,[[3,i
.d
],a
.a
],{formControlName
:[0,"formControlName"]},null),(l()(),t
["ɵand"](16777216,null,null,1,null,_
)),t
["ɵdid"](36,278528,null,0,r
.NgForOf
,[t
.ViewContainerRef
,t
.TemplateRef
,t
.IterableDiffers
],{ngForOf
:[0,"ngForOf"]},null),(l()(),t
["ɵand"](16777216,null,0,1,null,y
)),t
["ɵdid"](38,16384,null,0,r
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵeld"](39,0,null,null,6,"div",[["class","modal-footer"]],null,null,null,null,null)),(l()(),t
["ɵeld"](40,0,null,null,5,"div",[["class","button-group text-right"]],null,null,null,null,null)),(l()(),t
["ɵeld"](41,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
}),d
.b
,d
.a
)),t
["ɵdid"](42,114688,null,0,c
.a
,[t
.ElementRef
],{form
:[0,"form"]},{submitAction
:"submitAction"}),(l()(),t
["ɵted"](-1,0,["Update"])),(l()(),t
["ɵeld"](44,0,null,null,1,"cd-back-button",[["name","Cancel"]],null,null,null,m
.b
,m
.a
)),t
["ɵdid"](45,49152,null,0,p
.a
,[r
.Location
,h
.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
,31,0,"mirrorMode"),l(n
,34,0,"mirrorMode"),l(n
,36,0,e
.mirrorModes
),l(n
,38,0,e
.editModeForm
.showError("mirrorMode",t
["ɵnov"](n
,7),"cannotDisable")),l(n
,42,0,e
.editModeForm
),l(n
,45,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
,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
,34).validClass
,t
["ɵnov"](n
,34).invalidClass
)}))}function w(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,1,"cd-pool-edit-mode-modal",[],null,null,null,R
,S
)),t
["ɵdid"](1,245760,null,0,g
.a
,[f
.a
,v
.a
,b
.a
,C
.a
],null,null)],(function(l
,n
){l(n
,1,0)}),null)}var I
=t
["ɵccf"]("cd-pool-edit-mode-modal",g
.a
,w
,{},{},[])},nhAp:function(l
,n
,e
){"use strict";var t
=e("8Y7J"),i
=e("mXUL"),u
=e("+gVj"),s
=e("s7LF"),a
=e("SVse"),o
=e("eF8U"),r
=e("jMP8"),d
=e("uYzU"),c
=e("EEJc"),m
=e("ajRT"),p
=e("gp3X"),h
=e("sb0X"),g
=e("KVJa"),f
=e("Z21x"),v
=e("sne2"),b
=e("Z4cD"),C
=e("LqlI"),S
=e("my5R");e
.d(n
,"a",(function(){return T
}));var _
=t
["ɵcrt"]({encapsulation
:0,styles
:[[""]],data
:{}});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,["This field is required."]))],null,null)}function R(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,33,"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,16,"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,12,"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,7,"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,16384,null,0,u
.h
,[[3,s
.d
],u
.a
],{formControlName
:[0,"formControlName"]},null),(l()(),t
["ɵand"](16777216,null,null,1,null,y
)),t
["ɵdid"](19,16384,null,0,a
.NgIf
,[t
.ViewContainerRef
,t
.TemplateRef
],{ngIf
:[0,"ngIf"]},null),(l()(),t
["ɵeld"](20,0,null,null,13,"div",[["class","form-group row"]],[[2,"has-error",null],[2,"has-success",null]],null,null,i
.b
,i
.a
)),t
["ɵdid"](21,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"](24,0,null,0,9,"div",[["class","col-sm-12"]],null,null,null,null,null)),(l()(),t
["ɵeld"](25,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"](27,0,null,null,6,"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
,28)._handleInput(e
.target
.value
)&&i
),"blur"===n
&&(i
=!1!==t
["ɵnov"](l
,28).onTouched()&&i
),"compositionstart"===n
&&(i
=!1!==t
["ɵnov"](l
,28)._compositionStart()&&i
),"compositionend"===n
&&(i
=!1!==t
["ɵnov"](l
,28)._compositionEnd(e
.target
.value
)&&i
),i
}),null,null)),t
["ɵdid"](28,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"](30,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"](32,16384,null,0,s
.r
,[[4,s
.q
]],null,null),t
["ɵdid"](33,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
,17,0,"lun"),l(n
,19,0,e
.settingsForm
.showError("lun",t
["ɵnov"](n
.parent
,12),"required")),l(n
,21,0),l(n
,30,0,"wwn"),l(n
,33,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
,17).validClass
,t
["ɵnov"](n
,17).invalidClass
),l(n
,20,0,t
["ɵnov"](n
,21).hasErrors
,t
["ɵnov"](n
,21).hasSuccess
),l(n
,27,0,t
["ɵnov"](n
,32).ngClassUntouched
,t
["ɵnov"](n
,32).ngClassTouched
,t
["ɵnov"](n
,32).ngClassPristine
,t
["ɵnov"](n
,32).ngClassDirty
,t
["ɵnov"](n
,32).ngClassValid
,t
["ɵnov"](n
,32).ngClassInvalid
,t
["ɵnov"](n
,32).ngClassPending
,t
["ɵnov"](n
,33).validClass
,t
["ɵnov"](n
,33).invalidClass
)}))}function w(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 I(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,o
.b
,o
.a
)),t
["ɵdid"](6,114688,null,0,r
.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 k(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,I
)),t
["ɵdid"](2,278528,null,0,a
.NgForOf
,[t
.ViewContainerRef
,t
.TemplateRef
,t
.IterableDiffers
],{ngForOf
:[0,"ngForOf"]},null),t
["ɵpid"](0,a
.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 E(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,k
)),t
["ɵdid"](2,16384,null,0,a
.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 N(l
){return t
["ɵvid"](0,[t
["ɵpid"](0,d
.a
,[]),(l()(),t
["ɵeld"](1,0,null,null,46,"cd-modal",[],null,null,null,c
.c
,c
.b
)),t
["ɵdid"](2,49152,null,0,m
.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,38,null,null,null,null,null,null,null)),(l()(),t
["ɵeld"](10,0,null,null,37,"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,24,"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,R
)),t
["ɵdid"](20,16384,null,0,a
.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,15,"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,11,"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,8,"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,16384,null,0,u
.h
,[[3,s
.d
],u
.a
],{formControlName
:[0,"formControlName"]},null),(l()(),t
["ɵand"](16777216,null,null,1,null,w
)),t
["ɵdid"](38,278528,null,0,a
.NgForOf
,[t
.ViewContainerRef
,t
.TemplateRef
,t
.IterableDiffers
],{ngForOf
:[0,"ngForOf"]},null),(l()(),t
["ɵand"](16777216,null,null,1,null,E
)),t
["ɵdid"](40,278528,null,0,a
.NgForOf
,[t
.ViewContainerRef
,t
.TemplateRef
,t
.IterableDiffers
],{ngForOf
:[0,"ngForOf"]},null),(l()(),t
["ɵeld"](41,0,null,null,6,"div",[["class","modal-footer"]],null,null,null,null,null)),(l()(),t
["ɵeld"](42,0,null,null,5,"div",[["class","button-group text-right"]],null,null,null,null,null)),(l()(),t
["ɵeld"](43,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
}),p
.b
,p
.a
)),t
["ɵdid"](44,114688,null,0,h
.a
,[t
.ElementRef
],{form
:[0,"form"]},{submitAction
:"submitAction"}),(l()(),t
["ɵted"](-1,0,["Confirm"])),(l()(),t
["ɵeld"](46,0,null,null,1,"cd-back-button",[["name","Cancel"]],null,null,null,g
.b
,g
.a
)),t
["ɵdid"](47,49152,null,0,f
.a
,[a
.Location
,v
.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
,36,0,"backstore"),l(n
,38,0,e
.backstores
),l(n
,40,0,e
.backstores
),l(n
,44,0,e
.settingsForm
),l(n
,47,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
,36).validClass
,t
["ɵnov"](n
,36).invalidClass
)}))}function F(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,1,"cd-iscsi-target-image-settings-modal",[],null,null,null,N
,_
)),t
["ɵdid"](1,114688,null,0,b
.a
,[C
.a
,S
.a
],null,null)],(function(l
,n
){l(n
,1,0)}),null)}var T
=t
["ɵccf"]("cd-iscsi-target-image-settings-modal",b
.a
,F
,{},{},[])},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
))})}}},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 R
}));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 y(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 R
=t
["ɵccf"]("cd-iscsi-target-details",c
.a
,y
,{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("gp3X"),c
=e("sb0X"),m
=e("KVJa"),p
=e("Z21x"),h
=e("SVse"),g
=e("sne2"),f
=e("puGn"),v
=e("LqlI"),b
=e("XED3"),C
=e("kn/O");e
.d(n
,"a",(function(){return R
}));var S
=t
["ɵcrt"]({encapsulation
:0,styles
:[[""]],data
:{}});function _(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,38,"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,34,null,null,null,null,null,null,null)),(l()(),t
["ɵeld"](5,0,null,null,33,"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,20,"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,13,"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,7,"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
,26)._handleInput(e
.target
.value
)&&i
),"blur"===n
&&(i
=!1!==t
["ɵnov"](l
,26).onTouched()&&i
),"compositionstart"===n
&&(i
=!1!==t
["ɵnov"](l
,26)._compositionStart()&&i
),"compositionend"===n
&&(i
=!1!==t
["ɵnov"](l
,26)._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,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"](28,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"](30,16384,null,0,s
.r
,[[4,s
.q
]],null,null),t
["ɵdid"](31,16384,null,0,a
.h
,[[3,s
.d
],a
.a
],{formControlName
:[0,"formControlName"]},null),(l()(),t
["ɵeld"](32,0,null,null,6,"div",[["class","modal-footer"]],null,null,null,null,null)),(l()(),t
["ɵeld"](33,0,null,null,5,"div",[["class","button-group text-right"]],null,null,null,null,null)),(l()(),t
["ɵeld"](34,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
}),d
.b
,d
.a
)),t
["ɵdid"](35,114688,null,0,c
.a
,[t
.ElementRef
],{form
:[0,"form"]},{submitAction
:"submitAction"}),(l()(),t
["ɵted"](-1,0,["Update"])),(l()(),t
["ɵeld"](37,0,null,null,1,"cd-back-button",[["name","Cancel"]],null,null,null,m
.b
,m
.a
)),t
["ɵdid"](38,49152,null,0,p
.a
,[h
.Location
,g
.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
,28,0,"siteName"),l(n
,31,0,"siteName"),l(n
,35,0,e
.editSiteNameForm
),l(n
,38,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
,30).ngClassUntouched
,t
["ɵnov"](n
,30).ngClassTouched
,t
["ɵnov"](n
,30).ngClassPristine
,t
["ɵnov"](n
,30).ngClassDirty
,t
["ɵnov"](n
,30).ngClassValid
,t
["ɵnov"](n
,30).ngClassInvalid
,t
["ɵnov"](n
,30).ngClassPending
,t
["ɵnov"](n
,31).validClass
,t
["ɵnov"](n
,31).invalidClass
)}))}function y(l
){return t
["ɵvid"](0,[(l()(),t
["ɵeld"](0,0,null,null,1,"cd-edit-site-mode-modal",[],null,null,null,_
,S
)),t
["ɵdid"](1,114688,null,0,f
.a
,[v
.a
,b
.a
,C
.a
],null,null)],(function(l
,n
){l(n
,1,0)}),null)}var R
=t
["ɵccf"]("cd-edit-site-mode-modal",f
.a
,y
,{},{},[])}}]);