Viewing File: /usr/local/cpanel/whostmgr/docroot/templates/configure_cpanel_analytics/index.cmb.min.js
define("app/services/analyticsService",["angular","cjt/io/whm-v1-request","cjt/io/whm-v1","cjt/services/APIService","cjt/services/whm/nvDataService"],(function(e,i){"use strict";e.module("whm.configureAnalytics.analyticsService",["cjt2.services.api","cjt2.services.whm.nvdata"]).factory("analyticsService",["$q","APIService","nvDataService",function(t,a,r){var n=function(){this.apiService=new a};return e.extend(n.prototype,{setInterfaceAnalytics:function(e){var t=new i.Class;return t.initialize("","participate_in_analytics",{enabled:e?1:0}),this.apiService.deferred(t).promise}}),new n}])})),define("app/views/mainController",["angular","cjt/util/locale","ngSanitize","uiBootstrap","cjt/directives/toggleSwitchDirective","cjt/services/alertService","app/services/analyticsService"],(function(e,i){"use strict";function t(e,i,t,a){this.analyticsService=i,this.alertService=t,this.$q=a,this.isUserChoiceEnabled=e.isUserChoiceEnabled,this.isEnabledForCurrentUser=e.isEnabledForUser,this.defaultToOn=e.defaultToOn,this.isRootUser=e.isRootUser,this.isCollapsed=!0}return e.module("whm.configureAnalytics.mainController",["ngSanitize","ui.bootstrap.collapse","whm.configureAnalytics.analyticsService","cjt2.directives.toggleSwitch","cjt2.services.alert"]).controller("mainController",["PAGE","analyticsService","alertService","$q",t]),e.extend(t.prototype,{toggleInterfaceAnalytics:function(){var e=this;return this.isUserChoiceEnabled=!this.isUserChoiceEnabled,this.analyticsService.setInterfaceAnalytics(this.isUserChoiceEnabled).catch((function(t){return e.isUserChoiceEnabled?e.alertService.add({message:i.maketext("The system failed to enable Interface Analytics participation: [_1]",t),type:"danger",closeable:!0,id:"interface-analytics-enable-failed"}):e.alertService.add({message:i.maketext("The system failed to disable Interface Analytics participation: [_1]",t),type:"danger",closeable:!0,id:"interface-analytics-disable-failed"}),e.isUserChoiceEnabled=!e.isUserChoiceEnabled,e.$q.reject(t)}))},toggleIsCollapsed:function(){this.isCollapsed=!this.isCollapsed}}),t})),define("app/index",["angular","cjt/util/parse","cjt/modules","ngRoute","ngSanitize","uiBootstrap"],(function(e,i){"use strict";return function(){require(["cjt/bootstrap","cjt/directives/alertList","app/views/mainController"],(function(i){var t=e.module("whm.configureAnalytics",["cjt2.config.whm.configProvider","ngRoute","ui.bootstrap","cjt2.directives.alertList","whm.configureAnalytics.mainController"]);t.config(["$routeProvider","$locationProvider",function(e,i){e.when("/main",{controller:"mainController",controllerAs:"vm",templateUrl:"configure_cpanel_analytics/views/mainView.ptt"}),e.otherwise({redirectTo:"/main"})}]),t.value("PAGE",window.PAGE),i("#content","whm.configureAnalytics")}))}}));
Back to Directory
File Manager