Viewing File: /usr/local/cpanel/whostmgr/docroot/templates/cloud-cluster/main.ddec59234a0eeffd.js

"use strict";(self.webpackChunkcloud_cluster=self.webpackChunkcloud_cluster||[]).push([[179],{2852:(a,f,i)=>{var r=i(1481),e=i(6738),p=i(6895),x=i(348),d=i(5395),m=i(269),T=i(5529),_=i(1086),b=i(7221),A=i(567),g=i(4850),C=i(4642),S=i(7709),h=i(802);let O=(()=>{class t{constructor(n){this._apiClient=n,this._parseTypedResponse=s=>{if(s.hasErrors)throw new Error(s.messages[0].message);return s}}getPersonalizationData(){const n=new C.r(C.N.JsonApi,{method:"personalization_get",arguments:[new S.h("store","cloud_cluster"),new S.h("names",["stepsStatus"])]});return n.config.json=!0,this._apiClient.post(n).pipe((0,g.U)(this._parseTypedResponse),(0,g.U)(this._parseGetPersonalizationData))}_parseGetPersonalizationData(n){return n.data.personalization.stepsStatus.value?n.data.personalization.stepsStatus.value:{first:!1,second:!1,third:!1,fourth:!1}}}return t.\u0275fac=function(n){return new(n||t)(e.LFG(h.A4))},t.\u0275prov=e.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Z=(()=>{class t{constructor(n,s){this._locale=n,this._personalizationService=s,this._unconfiguredSteps=[{disabledDescription:this._locale.maketext("Ensure the server is configured to begin configuring a cloud cluster."),enabledDescription:this._locale.maketext("Ensure [asis,cPanel] is using a scalable filesystem without a single point of failure."),id:"firstStepComponent",isComplete:!1,isDisabled:!0,title:this._locale.maketext("Attach Network Storage System"),step:"first",url:"#"},{disabledDescription:this._locale.maketext("You must complete the \u2018Attach Network Storage System\u2019 step before you can add nodes."),enabledDescription:this._locale.maketext("Connect the machines that will handle service redundancy and orchestration."),id:"secondStepComponent",isComplete:!1,isDisabled:!0,title:this._locale.maketext("Add Nodes"),step:"second",url:"#"},{disabledDescription:this._locale.maketext("You must complete the \u2018Add Nodes\u2019 step before you can deploy a database."),enabledDescription:this._locale.maketext("Configure the database service, including name and number of replications."),id:"thirdStepComponent",isComplete:!1,isDisabled:!0,title:this._locale.maketext("Deploy a Database"),step:"third",url:"#"},{disabledDescription:this._locale.maketext("You must complete the \u2018Add Nodes\u2019 step before you can deploy [asis,DNS]."),enabledDescription:this._locale.maketext("Configure the [asis,DNS] service, including name and number of replications."),id:"fourthStepComponent",isComplete:!1,isDisabled:!0,title:this._locale.maketext("Deploy [asis,DNS]"),step:"fourth",url:"#"}]}get unconfiguredSteps$(){return(0,_.of)(this._unconfiguredSteps)}getConfiguredSteps(){const n=this.unconfiguredSteps$,s=this._personalizationService.getPersonalizationData();return(0,A.D)({steps:n,status:s}).pipe((0,g.U)(this._setStatus))}_setStatus(n){const s=n.steps,l=n.status;return s.forEach(u=>{"first"===u.step&&(u.isDisabled=!1),u.isComplete=l[u.step]}),s}}return t.\u0275fac=function(n){return new(n||t)(e.LFG(m.g),e.LFG(O))},t.\u0275prov=e.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();var c=i(3063);function D(t,o){1&t&&e.GkF(0)}function y(t,o){if(1&t&&(e.TgZ(0,"div"),e.YNc(1,D,1,0,"ng-container",5),e.qZA()),2&t){e.oxw();const n=e.MAs(4);e.xp6(1),e.Q6J("ngTemplateOutlet",n)}}function w(t,o){1&t&&e.GkF(0)}function k(t,o){if(1&t&&(e.TgZ(0,"div",6),e.YNc(1,w,1,0,"ng-container",5),e.qZA()),2&t){e.oxw();const n=e.MAs(6);e.xp6(1),e.Q6J("ngTemplateOutlet",n)}}const M=function(t){return{complete:t}};function P(t,o){if(1&t&&(e.TgZ(0,"a",7)(1,"div",8)(2,"div",9),e._UZ(3,"i",10),e.TgZ(4,"div")(5,"p",11)(6,"strong"),e._uU(7),e.qZA()(),e.TgZ(8,"p",12),e._uU(9),e.qZA()()()()()),2&t){const n=e.oxw();e.s9C("href",n.url,e.LSH),e.xp6(3),e.Q6J("ngClass",e.VKq(4,M,n.isComplete)),e.xp6(4),e.Oqu(n.title),e.xp6(2),e.Oqu(n.enabledDescription)}}function I(t,o){if(1&t&&(e.TgZ(0,"div",13)(1,"div",9),e._UZ(2,"i",14),e.TgZ(3,"div")(4,"p",11)(5,"strong"),e._uU(6),e.qZA()(),e.TgZ(7,"p",12),e._uU(8),e.qZA()()()()),2&t){const n=e.oxw();e.xp6(6),e.Oqu(n.title),e.xp6(2),e.Oqu(n.disabledDescription)}}let N=(()=>{class t{}return t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=e.Xpm({type:t,selectors:[["cp-cloud-setup-step"]],inputs:{disabledDescription:"disabledDescription",enabledDescription:"enabledDescription",id:["stepID","id"],isComplete:"isComplete",isDisabled:"isDisabled",title:"title",url:"url"},decls:7,vars:2,consts:[[1,"setupStep"],[4,"ngIf"],["class","disabled",4,"ngIf"],["enabledStep",""],["disabledStep",""],[4,"ngTemplateOutlet"],[1,"disabled"],[3,"href"],[1,"panel","panel-default"],[1,"wordsContainer","panel-body"],[1,"fas","fa-solid","fa-check",3,"ngClass"],[1,"stepTitle"],[1,"stepDescription"],[1,"panel","panel-default","disabledStep"],[1,"fas","fa-solid","fa-check"]],template:function(n,s){1&n&&(e.TgZ(0,"div",0),e.YNc(1,y,2,1,"div",1),e.YNc(2,k,2,1,"div",2),e.qZA(),e.YNc(3,P,10,6,"ng-template",null,3,e.W1O),e.YNc(5,I,9,2,"ng-template",null,4,e.W1O)),2&n&&(e.xp6(1),e.Q6J("ngIf",!s.isDisabled),e.xp6(1),e.Q6J("ngIf",s.isDisabled))},directives:[p.O5,p.tP,p.mk],styles:["a[_ngcontent-%COMP%], a[_ngcontent-%COMP%]:hover{text-decoration:none}i[_ngcontent-%COMP%]{background-color:gray;border-radius:100%;color:#fff;padding:.5rem;margin:1rem}.complete[_ngcontent-%COMP%]{background-color:green}.stepTitle[_ngcontent-%COMP%], .stepDescription[_ngcontent-%COMP%]{color:#000}.wordsContainer[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center}.disabledStep[_ngcontent-%COMP%]{opacity:.75}.disabledStep[_ngcontent-%COMP%]   .stepTitle[_ngcontent-%COMP%], .disabledStep[_ngcontent-%COMP%]   .stepDescription[_ngcontent-%COMP%]{color:gray}.disabledStep[_ngcontent-%COMP%]:hover{cursor:not-allowed}"]}),t})();function Y(t,o){1&t&&e.GkF(0)}const v=function(t){return{$implicit:t}};function F(t,o){if(1&t&&(e.TgZ(0,"div",6),e.YNc(1,Y,1,0,"ng-container",7),e.qZA()),2&t){const n=o.ngIf;e.oxw(3);const s=e.MAs(5);e.xp6(1),e.Q6J("ngTemplateOutlet",s)("ngTemplateOutletContext",e.VKq(2,v,n))}}function U(t,o){if(1&t&&(e.TgZ(0,"div"),e.YNc(1,F,2,4,"div",5),e.ALo(2,"async"),e.qZA()),2&t){const n=e.oxw(2);e.xp6(1),e.Q6J("ngIf",e.lcZ(2,1,n.unconfiguredSteps$))}}function E(t,o){if(1&t&&e._UZ(0,"cp-loading-spinner",8),2&t){const n=e.oxw(2);e.Q6J("id",n.spinnerID)}}function J(t,o){if(1&t&&(e.YNc(0,U,3,3,"div",3),e.ALo(1,"async"),e.YNc(2,E,1,1,"ng-template",null,4,e.W1O)),2&t){const n=e.MAs(3),s=e.oxw();e.Q6J("ngIf",e.lcZ(1,2,s.loadingError$))("ngIfElse",n)}}function z(t,o){1&t&&e.GkF(0)}function Q(t,o){if(1&t&&(e.TgZ(0,"div",9),e.YNc(1,z,1,0,"ng-container",7),e.qZA()),2&t){const n=o.ngIf;e.oxw();const s=e.MAs(5);e.xp6(1),e.Q6J("ngTemplateOutlet",s)("ngTemplateOutletContext",e.VKq(2,v,n))}}function $(t,o){if(1&t&&(e.TgZ(0,"div"),e._UZ(1,"cp-cloud-setup-step",16),e.qZA()),2&t){const n=o.$implicit;e.xp6(1),e.Q6J("disabledDescription",n.disabledDescription)("enabledDescription",n.enabledDescription)("stepID",n.id)("isComplete",n.isComplete)("isDisabled",n.isDisabled)("title",n.title)("url",n.url)}}function q(t,o){if(1&t&&(e.TgZ(0,"div",10)(1,"div",11),e._uU(2),e.qZA(),e._UZ(3,"div",12),e.qZA(),e.TgZ(4,"div",13)(5,"p",14),e._uU(6),e.qZA(),e.YNc(7,$,2,7,"div",15),e.qZA()),2&t){const n=o.$implicit,s=e.oxw();e.xp6(2),e.hij(" ",s.title," "),e.xp6(4),e.Oqu(s.welcomeMessage),e.xp6(1),e.Q6J("ngForOf",n)}}const G=[{path:"cloud-cluster-setup-steps",component:(()=>{class t{constructor(n,s,l){this._alertService=n,this._stepsService=s,this.locale=l,this.loadingError$=new T.xQ,this._setInterfaceText(),this.unconfiguredSteps$=this._stepsService.unconfiguredSteps$}get spinnerID(){return"clusterStepsSpinner"}ngOnInit(){this.stepsConfig$=this._stepsService.getConfiguredSteps().pipe((0,b.K)(n=>(this.loadingError$.next(!0),this._alertService.error(n),(0,_.of)(!1))))}_setInterfaceText(){this.welcomeMessage=this.locale.maketext("Welcome! It looks like you haven\u2019t finished setting up your cloud cluster. Complete the steps below to configure your filesystem, nodes, and services."),this.title=this.locale.maketext("Configuration Steps")}}return t.\u0275fac=function(n){return new(n||t)(e.Y36(c.c9),e.Y36(Z),e.Y36(m.g))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cp-cloud-cloud-cluster-setup-steps"]],decls:6,vars:4,consts:[["loadingOrError",""],["class","panel panel-default","id","configuredStepsPanel",4,"ngIf","ngIfElse"],["stepsTemplate",""],[4,"ngIf","ngIfElse"],["loading",""],["class","panel panel-default","id","unconfiguredStepsPanel",4,"ngIf"],["id","unconfiguredStepsPanel",1,"panel","panel-default"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"id"],["id","configuredStepsPanel",1,"panel","panel-default"],[1,"panel-heading"],[1,"widget-title","pull-left","flip"],[1,"clearfix"],[1,"panel-body"],[1,"welcomeMessage"],[4,"ngFor","ngForOf"],[3,"disabledDescription","enabledDescription","stepID","isComplete","isDisabled","title","url"]],template:function(n,s){if(1&n&&(e.YNc(0,J,4,4,"ng-template",null,0,e.W1O),e.YNc(2,Q,2,4,"div",1),e.ALo(3,"async"),e.YNc(4,q,8,3,"ng-template",null,2,e.W1O)),2&n){const l=e.MAs(1);e.xp6(2),e.Q6J("ngIf",e.lcZ(3,2,s.stepsConfig$))("ngIfElse",l)}},directives:[p.O5,p.tP,c.go,p.sg,N],pipes:[p.Ov],styles:[".setupStepsContainer[_ngcontent-%COMP%]{border:2px solid #000;width:75%}"]}),t})()},{path:"**",pathMatch:"full",redirectTo:"cloud-cluster-setup-steps"}];let L=(()=>{class t{}return t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=e.oAB({type:t}),t.\u0275inj=e.cJS({imports:[[d.Bz.forRoot(G)],d.Bz]}),t})();var R=i(2502);function W(t,o){1&t&&e.GkF(0)}function j(t,o){1&t&&e.GkF(0)}function V(t,o){if(1&t&&(e.TgZ(0,"section",12)(1,"h3",13),e._uU(2),e.qZA(),e.TgZ(3,"ul",14)(4,"li")(5,"a",15),e._UZ(6,"i",16),e.TgZ(7,"span"),e._uU(8),e.qZA()()()()()),2&t){const n=o.$implicit,s=e.oxw();e.xp6(2),e.Oqu(s.locale.maketext("Need Help?")),e.xp6(3),e.MGl("id","linkAboutTheInterface",n,""),e.s9C("title",s.locale.maketext("Need help? Click here to read more about this interface.")),e.xp6(3),e.Oqu(s.locale.maketext("About this interface"))}}const K=function(){return{$implicit:"Mobile"}};let B=(()=>{class t{constructor(n){this.locale=n,R.uZ.locale=this.locale}}return t.\u0275fac=function(n){return new(n||t)(e.Y36(m.g))},t.\u0275cmp=e.Xpm({type:t,selectors:[["cp-cloud-root"]],decls:15,vars:4,consts:[["position","top-right","id","cloudClusterAlertList"],["id","content"],[1,"row"],[1,"col-xs-12","col-lg-10"],[1,"col-md-4","hidden-xs","hidden-sm","pull-right","sticky-resource-panel"],[1,"section"],[4,"ngTemplateOutlet"],[1,"col-xs-12","col-sm-12","col-md-8","pull-left"],["id","viewContent",1,"ng-cloak","section","animate-view"],[1,"col-xs-12","hidden-lg","hidden-md"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["resourceTemplate",""],[1,"widget"],[1,"widget-title"],[1,"resource-link-list"],["href","https://go.cpanel.net/whmdocsCloudCluster","target","whm_documentation",3,"id","title"],["aria-hidden","true",1,"fas","fa-fw","fa-external-link-alt"]],template:function(n,s){if(1&n&&(e._UZ(0,"cp-alert-list",0),e.TgZ(1,"div",1)(2,"div")(3,"div",2)(4,"div",3)(5,"div",4)(6,"div",5),e.YNc(7,W,1,0,"ng-container",6),e.qZA()(),e.TgZ(8,"div",7),e._UZ(9,"router-outlet",8),e.qZA(),e.TgZ(10,"div",9)(11,"div",5),e.YNc(12,j,1,0,"ng-container",10),e.qZA()()()()()(),e.YNc(13,V,9,4,"ng-template",null,11,e.W1O)),2&n){const l=e.MAs(14);e.xp6(7),e.Q6J("ngTemplateOutlet",l),e.xp6(5),e.Q6J("ngTemplateOutlet",l)("ngTemplateOutletContext",e.DdM(3,K))}},directives:[c.hF,p.tP,d.lC],encapsulation:2}),t})();const H=window?.PAGE?.base??"",X=window?.PAGE?.securityToken??"",ee=new e.OlP("SecurityTokenInjectionToken");let te=(()=>{class t{}return t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=e.oAB({type:t,bootstrap:[B]}),t.\u0275inj=e.cJS({providers:[{provide:p.mr,useValue:H},{provide:Window,useValue:window},{provide:ee,useValue:X}],imports:[[c.CQ,x.m,h.au,L,r.b2,c.zf]]}),t})();(0,e.G48)(),r.q6().bootstrapModule(te).catch(t=>console.error(t))}},a=>{a.O(0,[736],()=>a(a.s=2852)),a.O()}]);
Back to Directory File Manager