Viewing File: /usr/local/cpanel/base/frontend/jupiter/domains/directives/domainListerViewDirective.min.js
define(["lodash","angular","cjt/core","cjt/util/locale","app/directives/docrootDirective","app/services/domains"],(function(e,i,t,a){"use strict";var n=i.module("cpanel.domains.domainListerView.directive",["cpanel.domains.docroot.directive"]);n.value("PAGE",PAGE),n.directive("domainListerView",(function(){var i="directives/domainListerViewDirective.ptt",n="domains/"+i;return{templateUrl:t.config.debug?t.buildFullPath(n):i,restrict:"EA",replace:!0,require:"^itemLister",link:function(e,i,t,a){e.domains=[],e.showConfigColumn=a.showConfigColumn,e.headerItems=a.getHeaderItems(),e.updateView=function(i){e.domains=i},e.scope=e,a.registerViewCallback(e.updateView.bind(e)),e.$on("$destroy",(function(){a.deregisterViewCallback(e.updateView)}))},controller:["$scope","ITEM_LISTER_CONSTANTS","DOMAIN_TYPE_CONSTANTS","PAGE","domains","alertService",function(i,t,n,o,s,r){i.isRTL=o.isRTL,i.DOMAIN_TYPE_CONSTANTS=n,i.EMAIL_ACCOUNTS_APP_EXISTS=o.EMAIL_ACCOUNTS_APP_EXISTS,i.webserverRoleAvailable=o.hasWebServerRole,i.canRedirectHTTPS=s.canRedirectHTTPS(),i.getDomains=function(){for(var t=0;t<i.domains.length;t++)i.domains[t].domain=e.escape(i.domains[t].domain),i.domains[t].homedir=e.escape(i.domains[t].homedir);return i.domains},i.actionButtonClicked=function(e,a){i.$emit(t.TABLE_ITEM_BUTTON_EVENT,{actionType:e,item:a,interactionID:a.domain})},i.itemSelected=function(e){i.$emit(t.ITEM_SELECT_EVENT,e)},i.HTTPSRedirectWarning=a.maketext("You cannot activate [asis,HTTPS] Redirect because [asis,AutoSSL] is not currently active for this domain or the [asis,SSL] certificate is not valid."),i.AliasRowWarning=a.maketext("Addon and parked domains inherit their [asis,HTTPS] redirect status from their associated subdomain."),i.AliasWarning=a.maketext("Some aliases for this domain may not have a working SSL certificate configured."),i.setSingleDomainHTTPSRedirect=function(e){var i,t;e.isHttpsRedirecting=!e.isHttpsRedirecting,e.isHttpsRedirecting?(i=a.maketext("Force [asis,HTTPS] Redirect is enabled for the “[_1]” domain.",e.domain),t=a.maketext("The system failed to enable Force [asis,HTTPS] Redirect.")):(i=a.maketext("Force [asis,HTTPS] Redirect is disabled for the “[_1]” domain.",e.domain),t=a.maketext("The system failed to disable Force [asis,HTTPS] Redirect.")),s.toggleHTTPSRedirect(e.isHttpsRedirecting,e.domain).then((function(a){if(a.status){var n=document.getElementById(e.domain+"_domain_link");if(void 0!==n){var o=e.isHttpsRedirecting?"https":"http";n.href=o+"://"+e.domain}r.add({message:i,type:"success",autoClose:1e4})}else r.add({message:t,type:"danger"})}))},i.onCreateEmailClick=function(e,i){i.is_temporary&&e.preventDefault()}}]}}))}));Back to Directory