diff --git a/dashboard/src/js/index.js b/dashboard/src/js/index.js index 6c34375c6..de48b4def 100644 --- a/dashboard/src/js/index.js +++ b/dashboard/src/js/index.js @@ -1,6 +1,7 @@ 'use strict'; /* global angular:false */ +/* global window, localStorage, document */ /* global $:false */ /* global async */ /* global ERROR,ISTATES,HSTATES,RSTATES,APP_TYPES,NOTIFICATION_TYPES */ @@ -484,36 +485,6 @@ app.directive('ngClickSelect', function () { }; }); -// handles various states and triggers a href or configure/repair view -// used by attaching to controller $scope -// if $scope.appPostInstallConfirm.show(app); exists it will be called if not yet confirmed -function onAppClick(app, $event, isOperator, $scope) { - function stopEvent() { - $event.originalEvent.stopPropagation(); - $event.originalEvent.preventDefault(); - } - - if (app.installationState !== ISTATES.INSTALLED) { - if (app.installationState === ISTATES.ERROR && isOperator) $scope.showAppConfigure(app, 'repair'); - return stopEvent(); - } - - // app.health can also be null to indicate insufficient data - if (!app.health) return stopEvent(); - if (app.runState === RSTATES.STOPPED) return stopEvent(); - if (app.runState === RSTATES.STOPPED) return stopEvent(); - - if (app.health === HSTATES.UNHEALTHY || app.health === HSTATES.ERROR || app.health === HSTATES.DEAD) { - if (isOperator) $scope.showAppConfigure(app, 'repair'); - return stopEvent(); - } - - if (app.pendingPostInstallConfirmation && $scope.appPostInstallConfirm) { - $scope.appPostInstallConfirm.show(app); - return stopEvent(); - } -} - app.directive('ngClickReveal', function () { return { restrict: 'A', diff --git a/dashboard/src/views/user-settings.js b/dashboard/src/views/user-settings.js index e89dc86c4..416bdf577 100644 --- a/dashboard/src/views/user-settings.js +++ b/dashboard/src/views/user-settings.js @@ -2,6 +2,7 @@ /* global angular */ /* global Clipboard */ +/* global window */ /* global $, TASK_TYPES */ angular.module('Application').controller('UserSettingsController', ['$scope', '$location', '$translate', '$timeout', 'Client', function ($scope, $location, $translate, $timeout, Client) {