(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[20],{"7a66":function(e,s,a){"use strict";a.r(s);var t=function(){var e=this,s=e.$createElement,a=e._self._c||s;return a("q-scroll-area",{staticClass:"full-height full-width"},[a("div",{staticClass:"q-pa-lg "},[a("div",{staticClass:"row q-mb-md"},[a("div",{directives:[{name:"t",rawName:"v-t",value:"CPANELINTEGRATOR.HEADING_SETTINGS_TAB",expression:"'CPANELINTEGRATOR.HEADING_SETTINGS_TAB'"}],staticClass:"col text-h5"})]),a("q-card",{staticClass:"card-edit-settings",attrs:{flat:"",bordered:""}},[a("q-card-section",[a("div",{staticClass:"row q-mb-md"},[a("div",{directives:[{name:"t",rawName:"v-t",value:"CPANELINTEGRATOR.LABEL_CPANEL_HOST",expression:"'CPANELINTEGRATOR.LABEL_CPANEL_HOST'"}],staticClass:"col-2 q-my-sm"}),a("div",{staticClass:"col-5"},[a("q-input",{attrs:{outlined:"",dense:"","bg-color":"white"},on:{keyup:function(s){return!s.type.indexOf("key")&&e._k(s.keyCode,"enter",13,s.key,"Enter")?null:e.save.apply(null,arguments)}},model:{value:e.cpanelHost,callback:function(s){e.cpanelHost=s},expression:"cpanelHost"}})],1)]),a("div",{staticClass:"row q-mb-md"},[a("div",{directives:[{name:"t",rawName:"v-t",value:"CPANELINTEGRATOR.LABEL_CPANEL_PORT",expression:"'CPANELINTEGRATOR.LABEL_CPANEL_PORT'"}],staticClass:"col-2 q-my-sm"}),a("div",{staticClass:"col-5"},[a("q-input",{attrs:{outlined:"",dense:"","bg-color":"white"},on:{keyup:function(s){return!s.type.indexOf("key")&&e._k(s.keyCode,"enter",13,s.key,"Enter")?null:e.save.apply(null,arguments)}},model:{value:e.panelPort,callback:function(s){e.panelPort=s},expression:"panelPort"}})],1)]),a("div",{staticClass:"row q-mb-md"},[a("div",{directives:[{name:"t",rawName:"v-t",value:"CPANELINTEGRATOR.LABEL_CPANEL_USER",expression:"'CPANELINTEGRATOR.LABEL_CPANEL_USER'"}],staticClass:"col-2 q-my-sm"}),a("div",{staticClass:"col-5"},[a("q-input",{attrs:{outlined:"",dense:"","bg-color":"white"},on:{keyup:function(s){return!s.type.indexOf("key")&&e._k(s.keyCode,"enter",13,s.key,"Enter")?null:e.save.apply(null,arguments)}},model:{value:e.panelUser,callback:function(s){e.panelUser=s},expression:"panelUser"}})],1)]),a("div",{staticClass:"row q-mb-md"},[a("div",{directives:[{name:"t",rawName:"v-t",value:"CPANELINTEGRATOR.LABEL_CPANEL_PASS",expression:"'CPANELINTEGRATOR.LABEL_CPANEL_PASS'"}],staticClass:"col-2 q-my-sm"}),a("div",{staticClass:"col-5"},[a("q-input",{attrs:{outlined:"",dense:"","bg-color":"white",type:"password",autocomplete:"new-password"},on:{keyup:function(s){return!s.type.indexOf("key")&&e._k(s.keyCode,"enter",13,s.key,"Enter")?null:e.save.apply(null,arguments)}},model:{value:e.password,callback:function(s){e.password=s},expression:"password"}})],1)])])],1),a("div",{staticClass:"q-pt-md text-right"},[a("q-btn",{staticClass:"q-px-sm",attrs:{unelevated:"","no-caps":"",dense:"",ripple:!1,color:"primary",label:e.$t("COREWEBCLIENT.ACTION_SAVE")},on:{click:e.save}})],1)],1),a("q-inner-loading",{staticStyle:{"justify-content":"flex-start"},attrs:{showing:e.saving}},[a("q-linear-progress",{attrs:{query:""}})],1)],1)},n=[],l=a("e539"),o=a("21ac"),r=a("4245"),i=a("2698"),p="     ",c={name:"CpanelAdminSettings",data:function(){return{saving:!1,cpanelHost:"",panelPort:"",panelUser:"",cpanelHasPassword:!1,password:p,savedPass:p}},mounted:function(){this.populate()},beforeRouteLeave:function(e,s,a){this.doBeforeRouteLeave(e,s,a)},methods:{populate:function(){var e=i["a"].getCpanelSettings();this.cpanelHost=e.cpanelHost,this.panelPort=e.panelPort,this.panelUser=e.panelUser,this.savedPass=e.cpanelHasPassword?p:"",this.password=e.cpanelHasPassword?p:""},hasChanges:function(){var e=i["a"].getCpanelSettings();return this.cpanelHost!==e.cpanelHost||this.panelPort!==e.panelPort||this.panelUser!==e.panelUser||this.password!==this.savedPass},revertChanges:function(){this.populate()},save:function(){var e=this;if(!this.saving){this.saving=!0;var s={CpanelHost:this.cpanelHost,CpanelPort:this.panelPort,CpanelUser:this.panelUser};this.password!==p&&(s.CpanelPassword=this.password),l["a"].sendRequest({moduleName:"CpanelIntegrator",methodName:"UpdateSettings",parameters:s}).then((function(s){e.saving=!1,!0===s?(i["a"].saveCpanelSettings({cpanelHost:e.cpanelHost,panelPort:e.panelPort,panelUser:e.panelUser,cpanelHasPassword:""!==e.password}),e.savedPass=e.password,o["a"].showReport(e.$t("COREWEBCLIENT.REPORT_SETTINGS_UPDATE_SUCCESS"))):o["a"].showError(e.$t("COREWEBCLIENT.ERROR_SAVING_SETTINGS_FAILED"))}),(function(s){e.saving=!1,o["a"].showError(r["a"].getTextFromResponse(s,e.$t("COREWEBCLIENT.ERROR_SAVING_SETTINGS_FAILED")))}))}}}},d=c,u=a("2877"),E=a("4983"),C=a("f09f"),v=a("a370"),A=a("27f9"),N=a("9c40"),m=a("74f7"),P=a("6b1d"),L=a("eebe"),T=a.n(L),w=Object(u["a"])(d,t,n,!1,null,"6dc7e732",null);s["default"]=w.exports;T()(w,"components",{QScrollArea:E["a"],QCard:C["a"],QCardSection:v["a"],QInput:A["a"],QBtn:N["a"],QInnerLoading:m["a"],QLinearProgress:P["a"]})}}]);