Viewing File: /usr/local/cpanel/whostmgr/docroot/templates/ssl-tls-configuration/main.min.js

"use strict";(self.webpackChunkssl_tls_configuration=self.webpackChunkssl_tls_configuration||[]).push([[792],{7448:(p,S,l)=>{var u=l(345),e=l(9953),y=l(611),k=l(8658),a=l(6805),r=l(2166),T=l(6381);const f=new e.nKC("AppConfigInjectionToken"),L=window.PAGE;var C=l(1413);class _{constructor(o,t,s=""){this.label=o,this.value=t,this.description=s}}var v=l(6802),d=l(949),g=l(6354),b=l(8141),x=l(4355);let m=(()=>{class i{constructor(t,s,n){this._apiClient=t,this._alert=s,this._appConfig=n,this.getCurrentSSLDefaultKeyType$=new C.B}getSSLDefaultKeyTypeOptions(){return this._appConfig.sslDefaultKeyTypeOptions.map((t=>new _(t.label,t.type)))}getSSLDefaultKeyType(){return this._appConfig.sslDefaultKeyType}getCurrentSSLDefaultKeyType(){const t=this._apiCall("get_tweaksetting",{key:"ssl_default_key_type"});return this._post(t).pipe((0,g.T)((s=>s.status?s.data.tweaksetting.value:s))).subscribe(this.getCurrentSSLDefaultKeyType$.next.bind(this.getCurrentSSLDefaultKeyType$)),this.getCurrentSSLDefaultKeyType$}setCurrentSSLDefaultKeyType(t){const s=this._apiCall("set_tweaksetting",{key:"ssl_default_key_type",value:t});return this._post(s).pipe((0,g.T)((n=>(n.status&&this.getCurrentSSLDefaultKeyType$.next(t),n))))}_post(t){return this._apiClient.post(t).pipe((0,b.M)(this._handleMessages.bind(this)))}_apiCall(t,s){const n=s?Object.keys(s).map((c=>new v.e(c,s[c]))):[];return new d.m(d.R.JsonApi,{method:t,arguments:n})}_handleMessages(t){return t.errors.forEach((s=>{this._alert.error(s.message),(0,e.naY)()&&console.error(s.message)})),t.warnings.forEach((s=>{this._alert.warn(s.message),(0,e.naY)()&&console.warn(s.message)})),t.infoMessages.forEach((s=>{this._alert.info(s.message),(0,e.naY)()&&console.log(s.message)})),t}static#e=this.ɵfac=function(s){return new(s||i)(e.KVO(x.gB),e.KVO(a.uE),e.KVO(f))};static#t=this.ɵprov=e.jDH({token:i,factory:i.ɵfac,providedIn:"root"})}return i})();var h=l(177);const F=["*"];let $=(()=>{class i{constructor(t){this._appConfig=t,this._baseUrl=`${window.location.origin}${t.cpSecurityToken}`}ngOnInit(){const t=!!this.href.match(/^\//);this.target=t?"_self":this.id,this.parsedHREF=t?`${this._baseUrl}${this.href}`:this.href,this.iconClass=this.iconClass?this.iconClass:"fas fa-fw fa-external-link-alt"}static#e=this.ɵfac=function(s){return new(s||i)(e.rXU(f))};static#t=this.ɵcmp=e.VBU({type:i,selectors:[["cp-tls-resource-panel-link"]],inputs:{href:"href",id:"id",title:"title",iconClass:"iconClass"},ngContentSelectors:F,decls:4,vars:5,consts:[[3,"id","href","title","target"],["aria-hidden","true",1,"fas",3,"ngClass"]],template:function(s,n){1&s&&(e.NAR(),e.j41(0,"li")(1,"a",0),e.nrm(2,"i",1),e.SdG(3),e.k0s()()),2&s&&(e.R7$(),e.Y8G("id",n.id)("href",n.parsedHREF,e.B4B)("title",n.title)("target",n.target),e.R7$(),e.Y8G("ngClass",n.iconClass))},dependencies:[h.YU],encapsulation:2})}return i})();function R(i,o){1&i&&e.nrm(0,"cp-loading-spinner",3)}function w(i,o){1&i&&e.eu8(0)}function K(i,o){if(1&i&&(e.j41(0,"span",34),e.EFF(1),e.k0s()),2&i){const t=e.XpG(3);e.Y8G("title",t.currentLabelDescription),e.R7$(),e.JRh(t.locale.maketext("Current"))}}function D(i,o){if(1&i&&e.nrm(0,"span",35),2&i){const t=e.XpG().$implicit;e.Y8G("innerHtml",t.description,e.npT)}}function A(i,o){if(1&i&&(e.j41(0,"div",30)(1,"label"),e.nrm(2,"input",31),e.EFF(3),e.k0s(),e.DNE(4,K,2,2,"span",32)(5,D,1,1,"span",33),e.k0s()),2&i){const t=o.$implicit,s=e.XpG(2);e.R7$(2),e.Y8G("formControl",s.defaultSSLKeyType)("value",t.value),e.BMQ("value",t.value),e.R7$(),e.SpI(" ",t.label," "),e.R7$(),e.Y8G("ngIf",s.showCurrentLabel(t.value)),e.R7$(),e.Y8G("ngIf",s.showAllHelp)}}function I(i,o){if(1&i&&(e.j41(0,"cp-callout",36),e.nrm(1,"p",37),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.Y8G("innerHtml",t.locale.maketext("When you change this setting, the server will replace [output,strong,all] [asis,AutoSSL]-issued certificates that use a different key type."),e.npT)}}function E(i,o){1&i&&e.nrm(0,"i",38)}function G(i,o){1&i&&e.eu8(0)}function j(i,o){if(1&i){const t=e.RV6();e.j41(0,"div",4)(1,"p",5),e.EFF(2),e.k0s(),e.j41(3,"div",6)(4,"div",7)(5,"div",8)(6,"div",9),e.DNE(7,w,1,0,"ng-container",10),e.k0s()(),e.j41(8,"div",11)(9,"form",12)(10,"div",13)(11,"div",14)(12,"div",15),e.EFF(13),e.k0s(),e.j41(14,"div",16)(15,"button",17),e.bIt("click",(function(){e.eBV(t);const n=e.XpG();return e.Njj(n.toggleHelp())})),e.EFF(16),e.nrm(17,"i",18),e.k0s()(),e.nrm(18,"div",19),e.k0s(),e.j41(19,"div",20)(20,"section")(21,"div",21)(22,"div",6)(23,"div",22)(24,"cp-form-label",23)(25,"p"),e.EFF(26),e.k0s()()()(),e.j41(27,"div",6)(28,"div",22),e.DNE(29,A,6,6,"div",24),e.k0s()()(),e.DNE(30,I,2,1,"cp-callout",25),e.k0s()(),e.j41(31,"div",26)(32,"div")(33,"cp-action-button",27),e.bIt("click",(function(){e.eBV(t);const n=e.XpG();return e.Njj(n.submit())})),e.DNE(34,E,1,0,"i",28),e.EFF(35),e.k0s()()()()()(),e.j41(36,"div",29)(37,"div",9),e.DNE(38,G,1,0,"ng-container",10),e.k0s()()()()()}if(2&i){const t=e.XpG(),s=e.sdS(5);e.R7$(2),e.SpI(" ",t.locale.maketext("Configure [asis,SSL/TLS] related configurations.")," "),e.R7$(5),e.Y8G("ngTemplateOutlet",s),e.R7$(2),e.Y8G("formGroup",t.sslTypeForm),e.R7$(4),e.SpI(" ",t.sectionTitle," "),e.R7$(3),e.SpI(" ",t.toggleHelpLabel," "),e.R7$(8),e.Y8G("labelText",t.locale.maketext("Default [asis,SSL/TLS] Key Type"))("showInfoBlock",t.showAllHelp),e.R7$(2),e.SpI(" ",t.locale.maketext("The type of key that the system will create by default for [asis,SSL/TLS] certificates and signing requests.")," "),e.R7$(3),e.Y8G("ngForOf",t.sslDefaultKeyTypeOptions),e.R7$(),e.Y8G("ngIf",t.showWarning),e.R7$(3),e.FS9("title",t.locale.maketext("Click here to save these settings.")),e.Y8G("buttonState",t.saveButtonState),e.R7$(),e.Y8G("ngIf",!t.saving),e.R7$(),e.SpI(" ",t.locale.maketext("Save")," "),e.R7$(3),e.Y8G("ngTemplateOutlet",s)}}function H(i,o){if(1&i&&(e.j41(0,"section",39)(1,"h3",40),e.EFF(2),e.k0s(),e.j41(3,"ul")(4,"cp-tls-resource-panel-link",41),e.EFF(5),e.k0s(),e.j41(6,"cp-tls-resource-panel-link",42),e.EFF(7),e.k0s(),e.j41(8,"cp-tls-resource-panel-link",43),e.EFF(9),e.k0s(),e.j41(10,"cp-tls-resource-panel-link",44),e.EFF(11),e.k0s(),e.j41(12,"cp-tls-resource-panel-link",45),e.EFF(13),e.k0s(),e.j41(14,"cp-tls-resource-panel-link",46),e.EFF(15),e.k0s()()(),e.j41(16,"section",39)(17,"h3",40),e.EFF(18),e.k0s(),e.j41(19,"ul")(20,"cp-tls-resource-panel-link",47),e.EFF(21),e.k0s()()()),2&i){const t=e.XpG();e.R7$(2),e.JRh(t.locale.maketext("I want to:")),e.R7$(2),e.FS9("title",t.locale.maketext("Click here to configure [asis, AutoSSL].")),e.R7$(),e.SpI(" ",t.locale.maketext("Configure [asis,AutoSSL]")," "),e.R7$(),e.FS9("title",t.locale.maketext("Click here to configure Webdisk [asis,SSL] Ciphers.")),e.R7$(),e.SpI(" ",t.locale.maketext("Configure Webdisk SSL Ciphers")," "),e.R7$(),e.FS9("title",t.locale.maketext("Click here to configure Apache [asis,SSL] Ciphers.")),e.R7$(),e.SpI(" ",t.locale.maketext("Configure Apache [asis,SSL] Ciphers")," "),e.R7$(),e.FS9("title",t.locale.maketext("Click here to configure Web Services [asis,SSL] Ciphers.")),e.R7$(),e.SpI(" ",t.locale.maketext("Configure Web Services [asis,SSL] Ciphers")," "),e.R7$(),e.FS9("title",t.locale.maketext("Click here to manage [asis,SSL] hosts.")),e.R7$(),e.SpI(" ",t.locale.maketext("Manage [asis,SSL] Hosts")," "),e.R7$(),e.FS9("title",t.locale.maketext("Click here to manage [asis,SSL] storage.")),e.R7$(),e.SpI(" ",t.locale.maketext("Manage [asis,SSL] Storage")," "),e.R7$(3),e.JRh(t.locale.maketext("Need Help?")),e.R7$(2),e.FS9("title",t.locale.maketext("Need help? Click here to read more about this interface.")),e.R7$(),e.SpI(" ",t.locale.maketext("About This Interface")," ")}}let Y=(()=>{class i{constructor(t,s,n,c){this.locale=t,this.configurationService=s,this._alert=n,this._appConfig=c,this.sectionTitle=this.locale.maketext("SSL/TLS Configuration"),this.showAllHelp=!1,this.keyDescriptions=c.sslDefaultKeyTypeDescriptions,this.defaultLabelDescription=this.locale.maketext("This is the default setting for new systems."),this.currentLabelDescription=this.locale.maketext("This is the current setting that the system utilizes.")}get defaultSSLKeyType(){return this.sslTypeForm.get("defaultSSLKeyType")}get toggleHelpLabel(){return this.locale.maketext(this.showAllHelp?"Hide Help Text":"Show Help Text")}get loading(){return!this.defaultSSLKeyType.value||""===this.defaultSSLKeyType.value}get saveButtonState(){return this.saving?a.kj.loading:a.kj.enabled}get saving(){return this._saving}get showWarning(){return this.hasChanged(this.defaultSSLKeyType)&&this.currentDefaultKeyType!==this.defaultSSLKeyType.value}toggleHelp(){this.showAllHelp=!this.showAllHelp}hasChanged(t){return t.dirty||t.touched}showDefaultLabel(t){return!!t&&t===this.unsetDefaultKeyType}showCurrentLabel(t){return!!t&&t===this.currentDefaultKeyType}getKeyTypeByValue(t){return this.sslDefaultKeyTypeOptions.find((s=>{if(s.value===t)return!0}))}submit(){this._saving=!0;const t=this.defaultSSLKeyType.value,s=this.getKeyTypeByValue(t);this.configurationService.setCurrentSSLDefaultKeyType(t).subscribe((()=>{this._alert.success(this.locale.maketext("The system updated the default [asis,SSL/TLS] key type to “[_1]”.",s.label)),this.defaultSSLKeyType.value===t&&(this.sslTypeForm.markAsPristine(),this.sslTypeForm.markAsUntouched()),this._saving=!1}))}ngOnInit(){this.sslTypeForm=new r.J3({defaultSSLKeyType:new r.hs}),this.sslDefaultKeyTypeOptions=this.configurationService.getSSLDefaultKeyTypeOptions().map(this._addKeyDescription.bind(this)),this.unsetDefaultKeyType=this.configurationService.getSSLDefaultKeyType(),this.configurationService.getCurrentSSLDefaultKeyType().subscribe((t=>{this.defaultSSLKeyType.setValue(t),this.currentDefaultKeyType=t}))}_addKeyDescription(t){return t.description=this.keyDescriptions[t.value],t.value.match(/ecdsa/)&&(t.description+=" ",t.description+=this.locale.maketext("[asis,ECDSA] is recommended for systems running [output,acronym,LSWS,LiteSpeed Web Servers].")),t}static#e=this.ɵfac=function(s){return new(s||i)(e.rXU(T.h),e.rXU(m),e.rXU(a.uE),e.rXU(f))};static#t=this.ɵcmp=e.VBU({type:i,selectors:[["cp-tls-root"]],decls:6,vars:2,consts:[["mainContent",""],["resourceTemplate",""],["id","loadingSpinner",4,"ngIf","ngIfElse"],["id","loadingSpinner"],["id","content"],[1,"description"],[1,"row"],[1,"col-xs-12","col-lg-8"],[1,"col-md-4","hidden-xs","hidden-sm","pull-right","flip"],[1,"section"],[4,"ngTemplateOutlet"],[1,"col-xs-12","col-sm-12","col-md-8","pull-left","flip"],["id","sslTLSConfigurations","name","sslTLSConfigurations",3,"formGroup"],[1,"panel","panel-default"],[1,"panel-heading"],[1,"widget-title","pull-left","flip"],[1,"pull-right","flip"],["type","button","id","lnkshowHideHelp",1,"btn","btn-default","btn-xs",3,"click"],[1,"far","fa-question-circle","form-info-sign"],[1,"clearfix"],[1,"panel-body"],["id","defaultSSLTypeGroup",1,"form-group"],[1,"col-xs-12"],["id","defaultSSLKeyTypeLabel","for","defaultSSLKeyType",3,"labelText","showInfoBlock"],["class","radio",4,"ngFor","ngForOf"],["id","defaultSSLKeyTypeWarning","callout-type","warning",4,"ngIf"],[1,"panel-footer"],["id","btnUpdateSSLDefaultType","name","submitButton",3,"click","buttonState","title"],["class","fas fa-save","aria-hidden","true",4,"ngIf"],[1,"col-xs-12","hidden-lg","hidden-md"],[1,"radio"],["type","radio","name","defaultSSLKeyType",3,"formControl","value"],["class","label label-success",3,"title",4,"ngIf"],["class","help-block",3,"innerHtml",4,"ngIf"],[1,"label","label-success",3,"title"],[1,"help-block",3,"innerHtml"],["id","defaultSSLKeyTypeWarning","callout-type","warning"],[3,"innerHtml"],["aria-hidden","true",1,"fas","fa-save"],[1,"widget"],[1,"widget-title"],["id","linkConfigureAutoSSL","iconClass","fas fa-wrench","href","/scripts12/autossl",3,"title"],["id","linkConfigureWebdiskCiphers","iconClass","fas fa-wrench","href","/scripts2/cpdavdconfiguration",3,"title"],["id","linkConfigureApacheCiphers","iconClass","fas fa-wrench","href","/scripts2/globalapachesetup?find=SSL",3,"title"],["id","linkConfigureWebServiceCiphers","iconClass","fas fa-wrench","href","/scripts2/cpsrvdconfiguration",3,"title"],["id","linkConfigureInstallSSL","iconClass","fas fa-wrench","href","/scripts2/installssl",3,"title"],["id","linkConfigureSSLStorage","iconClass","fas fa-wrench","href","/scripts2/sslmanager",3,"title"],["id","linkAboutTheInterface","href","https://go.cpanel.net/whmdocsSSLTLSConfiguration",3,"title"]],template:function(s,n){if(1&s&&(e.nrm(0,"cp-alert-list"),e.DNE(1,R,1,0,"cp-loading-spinner",2)(2,j,39,15,"ng-template",null,0,e.C5r)(4,H,22,16,"ng-template",null,1,e.C5r)),2&s){const c=e.sdS(3);e.R7$(),e.Y8G("ngIf",n.loading)("ngIfElse",c)}},dependencies:[h.Sq,h.bT,h.T3,a.Wp,r.qT,r.me,r.Fm,r.BC,r.cb,r.l_,r.j4,a.C7,a.NB,a.Ab,a.GV,$],encapsulation:2})}return i})(),B=(()=>{class i{static#e=this.ɵfac=function(s){return new(s||i)};static#t=this.ɵmod=e.$C({type:i,bootstrap:[Y]});static#s=this.ɵinj=e.G2t({providers:[m,a.uE,{provide:f,useValue:L}],imports:[u.Bb,a.rY,r.X1,r.YN,a.Zi,y.q1,a.pt,a.ys,a.sb,a.jM,k.B]})}return i})();(0,e.SmG)(),u.sG().bootstrapModule(B).catch((i=>console.error(i)))}},p=>{p.O(0,[502],(()=>p(p.s=7448))),p.O()}]);
Back to Directory File Manager