{"version":3,"sources":["app.module.js","common/layout/footer.directive.js","common/layout/header.directive.js","common/layout/navigation-menu.directive.js","common/services/account.service.js","common/services/apps.service.js","common/services/keep-alive.service.js","common/services/logger.service.js","common/services/login.service.js","common/services/request-wrapper.service.js","common/services/routing.service.js","common/services/state.service.js","common/services/usage-tracker.service.js","core/account/account.controller.js","core/forgot-password/forgot-password.controller.js","core/environment/environment.controller.js","core/apps/apps.controller.js","core/start/start.controller.js","core/login/login.controller.js","core/usage-tracker/usage-tracker-chart.directive.js","core/usage-tracker/usage-tracker.controller.js","core/logout/logout.controller.js","app.config.js","app.run.js","app.settings.js","bootstrap.js"],"names":[],"mappings":"AAAA;AACA;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC/EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC/FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AChGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC1EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACnFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC9HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACpKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACtFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"app.min.js","sourcesContent":["angular.module('dashboardApp', ['ngRoute', 'ngCookies', 'daterangepicker']);\r\n","(function() {\r\n \"use strict\";\r\n\r\n angular.module(\"dashboardApp\").directive(\"imsFooter\", Directive);\r\n\r\n Directive.$inject = [\r\n 'AppSettings'\r\n ];\r\n\r\n\r\n\r\n function Directive (\r\n AppSettings\r\n ) {\r\n\r\n\r\n function link($scope, element) {\r\n\r\n //$scope.year = new Date().getFullYear();\r\n\r\n }\r\n\r\n\r\n\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n scope: {\r\n },\r\n templateUrl: AppSettings.paths.html + '/common/layout/footer.template.html',\r\n link: link\r\n };\r\n\r\n\r\n\r\n }\r\n\r\n\r\n})();\r\n","(function() {\r\n \"use strict\";\r\n\r\n angular.module(\"dashboardApp\").directive(\"imsHeader\", Directive);\r\n\r\n Directive.$inject = [\r\n '$location',\r\n '$timeout',\r\n '$window',\r\n 'AppSettings'\r\n ];\r\n\r\n\r\n\r\n function Directive(\r\n $location,\r\n $timeout,\r\n $window,\r\n AppSettings\r\n ) {\r\n\r\n\r\n function link($scope, element) {\r\n\r\n $scope.title = null;\r\n $scope.showBanner = true;\r\n\r\n\r\n $scope.goBack = function() {\r\n $window.history.back();\r\n };\r\n\r\n\r\n $scope.$on('$locationChangeStart', onLocationChange);\r\n\r\n\r\n\r\n function onLocationChange() {\r\n $timeout(function() {\r\n var path = $location.path();\r\n\r\n if (path.indexOf('/apps') === 0) {\r\n $scope.title = 'Application List';\r\n $scope.showBanner = false;\r\n\r\n } else if (path.indexOf('/account') === 0) {\r\n $scope.title = 'Account Manager';\r\n $scope.showBanner = false;\r\n\r\n } else if (path.indexOf('/usage-tracker') === 0) {\r\n $scope.title = 'Usage Tracker';\r\n $scope.showBanner = false;\r\n\r\n } else {\r\n $scope.title = 'Nexxus Performance';\r\n $scope.showBanner = true;\r\n }\r\n\r\n $(document).prop('title', $scope.title);\r\n\r\n });\r\n\r\n }\r\n\r\n\r\n\r\n onLocationChange();\r\n\r\n }\r\n\r\n\r\n\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n scope: {\r\n },\r\n templateUrl: AppSettings.paths.html + '/common/layout/header.template.html',\r\n link: link\r\n };\r\n\r\n\r\n\r\n }\r\n\r\n\r\n})();\r\n","(function() {\r\n \"use strict\";\r\n\r\n angular.module(\"dashboardApp\").directive(\"imsNavigationMenu\", Directive);\r\n\r\n Directive.$inject = [\r\n '$document',\r\n '$timeout',\r\n 'AppSettings'\r\n ];\r\n\r\n\r\n\r\n function Directive(\r\n $document,\r\n $timeout,\r\n AppSettings\r\n ) {\r\n\r\n\r\n function link($scope, element) {\r\n\r\n $scope.visible = false;\r\n\r\n\r\n $scope.toggleNavigationMenu = function() {\r\n $scope.visible = !$scope.visible;\r\n };\r\n\r\n\r\n element.find('.menu-item').on('click', function() {\r\n $timeout(function(){\r\n $scope.visible = false;\r\n });\r\n });\r\n\r\n\r\n $document.mouseup(function(e) {\r\n if (elementHasTarget(e) && !isClickOnScrollbar(e)) {\r\n $timeout(function() {\r\n $scope.visible = false;\r\n });\r\n }\r\n });\r\n\r\n\r\n function elementHasTarget(e) {\r\n return !element.is(e.target) && element.has(e.target).length === 0;\r\n }\r\n\r\n function isClickOnScrollbar(e) {\r\n // TODO: This is not checking for clicks on the scrollbar\r\n // but for clicks on the HTML document. FIX\r\n return e.target.toString().indexOf(\"HTMLHtmlElement\") > -1;\r\n }\r\n\r\n\r\n\r\n function init() {\r\n }\r\n\r\n\r\n init();\r\n\r\n\r\n }\r\n\r\n\r\n\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n scope: {\r\n },\r\n templateUrl: AppSettings.paths.html + '/common/layout/navigation-menu.template.html',\r\n link: link\r\n };\r\n\r\n\r\n\r\n }\r\n\r\n\r\n})();\r\n","(function() {\r\n 'use strict';\r\n\r\n angular.module('dashboardApp').service('Account', Service);\r\n\r\n Service.$inject = [\r\n 'AppSettings',\r\n 'RequestWrapper'\r\n ];\r\n\r\n\r\n function Service(\r\n AppSettings,\r\n RequestWrapper\r\n ) {\r\n\r\n\r\n this.updatePassword = function(oldPassword, newPassword) {\r\n var params = {\r\n oldPassword: oldPassword,\r\n newPassword: newPassword\r\n };\r\n var request = {\r\n url: AppSettings.paths.api + 'Account/UpdatePassword',\r\n data: $.param(params),\r\n method: 'POST',\r\n headers: {'Content-Type': 'application/x-www-form-urlencoded'}\r\n };\r\n\r\n return RequestWrapper.send(request);\r\n };\r\n\r\n\r\n }\r\n\r\n})();\r\n","(function() {\r\n 'use strict';\r\n\r\n angular.module('dashboardApp').service('Apps', Service);\r\n\r\n Service.$inject = [\r\n 'AppSettings',\r\n 'RequestWrapper'\r\n ];\r\n\r\n\r\n function Service(\r\n AppSettings,\r\n RequestWrapper\r\n ) {\r\n\r\n\r\n\r\n this.list = function() {\r\n var request = {\r\n url: AppSettings.paths.api + 'Application/List'\r\n };\r\n\r\n return RequestWrapper.send(request);\r\n };\r\n\r\n\r\n }\r\n\r\n})();\r\n","(function() {\r\n 'use strict';\r\n\r\n angular.module('dashboardApp').service('KeepAlive', Service);\r\n\r\n Service.$inject = [\r\n 'Login',\r\n 'Routing'\r\n ];\r\n\r\n\r\n function Service(\r\n Login,\r\n Routing\r\n ) {\r\n\r\n\r\n\r\n\r\n this.run = function() {\r\n var delay = 5 * 60 * 1000;\r\n\r\n function repeat() {\r\n Login.check().then(function(success) {\r\n if (success) {\r\n $timeout(repeat, delay);\r\n } else {\r\n Routing.start();\r\n }\r\n });\r\n }\r\n\r\n repeat();\r\n\r\n };\r\n\r\n\r\n }\r\n\r\n})();\r\n","(function() {\r\n 'use strict';\r\n\r\n angular.module('dashboardApp').service('Logger', Service);\r\n\r\n Service.$inject = [ ];\r\n\r\n\r\n function Service() {\r\n\r\n var debug = true;\r\n\r\n\r\n this.log = function (message) {\r\n if (debug && console) {\r\n console.log(message);\r\n }\r\n };\r\n\r\n\r\n\r\n this.error = function (message) {\r\n if (debug && console) {\r\n console.error(message);\r\n }\r\n };\r\n\r\n\r\n\r\n\r\n }\r\n\r\n})();\r\n","(function() {\r\n 'use strict';\r\n\r\n angular.module('dashboardApp').service('Login', Service);\r\n\r\n Service.$inject = [\r\n '$q',\r\n 'AppSettings',\r\n 'RequestWrapper'\r\n ];\r\n\r\n\r\n function Service(\r\n $q,\r\n AppSettings,\r\n RequestWrapper\r\n ) {\r\n\r\n\r\n this.check = function() {\r\n var request = {\r\n url: AppSettings.paths.api + 'Login/Check'\r\n };\r\n\r\n return RequestWrapper.getBooleanResponse(request);\r\n };\r\n\r\n\r\n\r\n this.authenticate = function(userName, password, impersonatedBy) {\r\n var params = {\r\n userName: userName,\r\n password: password,\r\n impersonatedBy: impersonatedBy\r\n };\r\n var request = {\r\n url: AppSettings.paths.api + 'Login/Authenticate',\r\n data: $.param(params),\r\n method: 'POST',\r\n headers: {'Content-Type': 'application/x-www-form-urlencoded'}\r\n };\r\n\r\n return RequestWrapper.getBooleanResponse(request);\r\n };\r\n\r\n\r\n\r\n this.logout = function() {\r\n var request = {\r\n url: AppSettings.paths.api + 'Login/Logout'\r\n };\r\n\r\n return RequestWrapper.send(request);\r\n };\r\n\r\n\r\n\r\n this.resetPassword = function(email) {\r\n var params = {\r\n userName: email\r\n };\r\n\r\n var request = {\r\n url: AppSettings.paths.api + 'Login/ResetPassword',\r\n data: $.param(params),\r\n method: 'POST',\r\n headers: {'Content-Type': 'application/x-www-form-urlencoded'}\r\n };\r\n\r\n return RequestWrapper.getBooleanResponse(request);\r\n };\r\n\r\n\r\n\r\n\r\n\r\n }\r\n\r\n})();\r\n","(function() {\r\n \"use strict\";\r\n\r\n angular.module(\"dashboardApp\").service(\"RequestWrapper\", Service);\r\n Service.$inject = [\r\n \"$http\",\r\n \"$q\",\r\n \"$timeout\",\r\n \"$window\"\r\n ];\r\n\r\n\r\n function Service(\r\n $http,\r\n $q,\r\n $timeout,\r\n $window\r\n ) {\r\n\r\n var service = this;\r\n\r\n this.send = function(request, version) {\r\n var url = request.url;\r\n var data = request.data;\r\n var method = request.method || 'GET';\r\n var timeout = request.timeout;\r\n var headers = request.headers;\r\n\r\n if (!url) {\r\n throw('Mandatory \"url\" property not found.');\r\n }\r\n\r\n var deferred = $q.defer();\r\n\r\n var config = {\r\n url: url\r\n };\r\n if (data) {\r\n if (method === 'POST') {\r\n config.data = data;\r\n } else {\r\n config.params = data;\r\n }\r\n }\r\n if (method) {\r\n config.method = method;\r\n }\r\n if (headers) {\r\n config.headers = headers;\r\n }\r\n if (timeout) {\r\n config.timeout = timeout;\r\n }\r\n if (version) {\r\n config.headers = config.headers || {};\r\n config.headers['X-Data-Version'] = version;\r\n }\r\n\r\n $http(config).success(function(data) {\r\n deferred.resolve(data);\r\n }).error(function(data, status) {\r\n deferred.reject({\r\n data: data,\r\n status: status\r\n });\r\n });\r\n\r\n return deferred.promise;\r\n };\r\n\r\n\r\n\r\n this.getBooleanResponse = function(request) {\r\n var deferred = $q.defer();\r\n\r\n service.send(request).then(function(response) {\r\n if (response.result) {\r\n deferred.resolve(true);\r\n } else {\r\n deferred.resolve(false);\r\n }\r\n }).catch(function(response) {\r\n deferred.resolve(false);\r\n });\r\n\r\n return deferred.promise;\r\n };\r\n\r\n\r\n\r\n\r\n\r\n }\r\n\r\n})();\r\n","(function() {\r\n 'use strict';\r\n\r\n angular.module('dashboardApp').service('Routing', Service);\r\n\r\n Service.$inject = [\r\n '$location',\r\n '$window'\r\n ];\r\n\r\n\r\n function Service(\r\n $location,\r\n $window\r\n ) {\r\n\r\n\r\n this.start = function () {\r\n $location.path('/start').replace();\r\n };\r\n\r\n\r\n\r\n this.login = function () {\r\n $location.path('/login').replace();\r\n };\r\n\r\n\r\n\r\n this.apps = function () {\r\n $location.path('/apps').replace();\r\n };\r\n\r\n\r\n this.oAuthDispatcher = function () {\r\n var redirectUrl = $location.$$protocol + '://' + $location.$$host + '/oauth-dispatcher/api/OAuth/Login';\r\n $window.location = redirectUrl;\r\n };\r\n\r\n\r\n\r\n }\r\n\r\n})();\r\n","(function() {\r\n 'use strict';\r\n\r\n angular.module('dashboardApp').service('State', Service);\r\n\r\n Service.$inject = [\r\n ];\r\n\r\n\r\n function Service(\r\n ) {\r\n\r\n var service = this;\r\n\r\n\r\n\r\n\r\n }\r\n\r\n})();\r\n","(function() {\r\n 'use strict';\r\n\r\n angular.module('dashboardApp').service('UsageTracker', Service);\r\n\r\n Service.$inject = [\r\n\r\n 'AppSettings',\r\n 'RequestWrapper'\r\n ];\r\n\r\n\r\n function Service(\r\n AppSettings,\r\n RequestWrapper\r\n ) {\r\n\r\n\r\n\r\n this.userList = function() {\r\n var request = {\r\n url: AppSettings.paths.api + 'UsageTracker/UserList'\r\n };\r\n\r\n return RequestWrapper.send(request);\r\n };\r\n\r\n\r\n this.usageData = function(userId, appId, startDate, endDate) {\r\n var params = {\r\n userId: userId,\r\n appId: appId,\r\n startDate: startDate,\r\n endDate: endDate\r\n };\r\n\r\n var request = {\r\n url: AppSettings.paths.api + 'UsageTracker/UsageData?' + $.param(params)\r\n };\r\n\r\n return RequestWrapper.send(request);\r\n };\r\n\r\n\r\n\r\n this.loginCounts = function(userId, appId, startDate, endDate) {\r\n var params = {\r\n userId: userId,\r\n appId: appId,\r\n startDate: startDate,\r\n endDate: endDate\r\n };\r\n\r\n var request = {\r\n url: AppSettings.paths.api + 'UsageTracker/LoginCounts?' + $.param(params)\r\n };\r\n\r\n return RequestWrapper.send(request);\r\n };\r\n\r\n\r\n\r\n this.export = function(userId, appId, startDate, endDate) {\r\n var params = {\r\n userId: userId,\r\n appId: appId,\r\n startDate: startDate,\r\n endDate: endDate\r\n };\r\n\r\n var url = AppSettings.paths.api + 'UsageTracker/Export?' + $.param(params);\r\n\r\n\t window.open(url, '_export');\r\n };\r\n\r\n\r\n\r\n\r\n\r\n }\r\n\r\n})();\r\n","(function() {\r\n /* globals $, angular */\r\n 'use strict';\r\n\r\n angular.module('dashboardApp').controller('accountController', Controller);\r\n Controller.$inject = [\r\n 'Login',\r\n 'Account',\r\n 'Routing'\r\n ];\r\n\r\n function Controller (\r\n Login,\r\n Account,\r\n Routing\r\n ) {\r\n\r\n var vm = this;\r\n\r\n vm.showProgress = false;\r\n vm.error = null;\r\n vm.success = null;\r\n\r\n vm.oldPassword = null;\r\n vm.newPassword = null;\r\n vm.newPassword2 = null;\r\n\r\n\r\n\r\n vm.onSubmit = function() {\r\n vm.error = null;\r\n vm.success = null;\r\n\r\n if (!vm.oldPassword) {\r\n vm.error = \"Please enter the current password\";\r\n return;\r\n }\r\n if (!vm.newPassword) {\r\n vm.error = \"The new password cannot be empty\";\r\n return;\r\n }\r\n if (vm.newPassword !== vm.newPassword2) {\r\n vm.error = \"The new password and the confirmation do not match.\";\r\n return;\r\n }\r\n\r\n vm.showProgress = true;\r\n\r\n Account.updatePassword(\r\n vm.oldPassword,\r\n vm.newPassword\r\n ).then(function(response) {\r\n vm.showProgress = false;\r\n\r\n if (response.result) {\r\n vm.success = \"Password changed successfully.\";\r\n vm.oldPassword = null;\r\n vm.newPassword = null;\r\n vm.newPassword2 = null;\r\n\r\n } else {\r\n vm.error = 'Password change failed. ' + response.message;\r\n }\r\n\r\n }).catch(function() {\r\n vm.error = 'Unknown failure.';\r\n });\r\n };\r\n\r\n\r\n\r\n vm.onCancel = function() {\r\n Routing.apps();\r\n };\r\n\r\n\r\n\r\n //----------- initialization ------------------\r\n\r\n function init() {\r\n Login.check().then(function(success) {\r\n if (!success) {\r\n Routing.login();\r\n }\r\n });\r\n }\r\n\r\n\r\n init();\r\n\r\n\r\n }\r\n\r\n\r\n\r\n})();\r\n","(function() {\r\n /* globals $, angular */\r\n 'use strict';\r\n\r\n angular.module('dashboardApp').controller('forgotPasswordController', Controller);\r\n Controller.$inject = [\r\n 'Login',\r\n 'Routing'\r\n ];\r\n\r\n function Controller (\r\n Login,\r\n Routing\r\n ) {\r\n\r\n var vm = this;\r\n\r\n vm.showProgress = false;\r\n vm.error = null;\r\n vm.success = null;\r\n\r\n vm.email = null;\r\n\r\n\r\n\r\n vm.onSubmit = function() {\r\n vm.error = null;\r\n vm.success = null;\r\n\r\n if (!vm.email) {\r\n vm.error = \"Please enter your email address\";\r\n return;\r\n }\r\n\r\n vm.showProgress = true;\r\n\r\n Login.resetPassword(vm.email).then(function(success) {\r\n vm.showProgress = false;\r\n\r\n if (success) {\r\n vm.success = \"A message containing your new password has been sent to the email address indicated.\";\r\n vm.email = null;\r\n\r\n } else {\r\n vm.error = 'Password reset failed. Please make sure you entered the correct email address.';\r\n }\r\n\r\n }).catch(function() {\r\n vm.error = 'Unknown failure.';\r\n });\r\n };\r\n\r\n\r\n\r\n vm.onCancel = function() {\r\n Routing.start();\r\n };\r\n\r\n\r\n\r\n //----------- initialization ------------------\r\n\r\n function init() {\r\n }\r\n\r\n\r\n init();\r\n\r\n\r\n }\r\n\r\n\r\n\r\n})();\r\n","(function() {\r\n /* globals $, angular */\r\n 'use strict';\r\n\r\n angular.module('dashboardApp').controller('environmentController', Controller);\r\n Controller.$inject = [\r\n '$cookies',\r\n '$timeout',\r\n 'Routing'\r\n ];\r\n\r\n function Controller (\r\n $cookies,\r\n $timeout,\r\n Routing\r\n ) {\r\n\r\n var vm = this;\r\n var OFFICE_SOFTWARE_COOKIE_NAME = \"office-software\";\r\n vm.showInstructions = false;\r\n\r\n vm.officeSoftwareOptions = [\r\n { value: 'ms-office2007', text: 'MS Office 2007 or older' },\r\n { value: 'ms-office2010', text: 'MS Office 2010 or newer' }\r\n ];\r\n\r\n vm.officeSoftware = _.find(\r\n vm.officeSoftwareOptions,\r\n { value: $cookies.get(OFFICE_SOFTWARE_COOKIE_NAME) }\r\n ) || vm.officeSoftwareOptions[0];\r\n\r\n\r\n vm.onOfficeChange = function() {\r\n vm.checkShowInstructions();\r\n };\r\n\r\n vm.checkShowInstructions = function() {\r\n vm.showInstructions = false;\r\n if(vm.officeSoftware.value == 'ms-office2010')\r\n {\r\n vm.showInstructions = true;\r\n }\r\n };\r\n\r\n vm.message = '';\r\n\r\n vm.onSubmit = function() {\r\n if (vm.officeSoftware) {\r\n var expDate = new Date();\r\n expDate.setDate(expDate.getDate() + 365);\r\n\r\n $cookies.put(OFFICE_SOFTWARE_COOKIE_NAME, vm.officeSoftware.value, {path: '/', expires: expDate});\r\n vm.message = 'Your selection has been saved.';\r\n\r\n $timeout(function () {\r\n vm.message = '';\r\n }, 2000);\r\n }\r\n };\r\n\r\n\r\n\r\n vm.onCancel = function() {\r\n Routing.start();\r\n };\r\n\r\n\r\n\r\n //----------- initialization ------------------\r\n\r\n function init() {\r\n vm.checkShowInstructions();\r\n }\r\n\r\n\r\n init();\r\n\r\n\r\n }\r\n\r\n\r\n\r\n})();\r\n","(function() {\r\n /* globals $, angular */\r\n 'use strict';\r\n\r\n angular.module('dashboardApp').controller('appsController', Controller);\r\n Controller.$inject = [\r\n 'Login',\r\n 'Apps',\r\n 'Routing'\r\n ];\r\n\r\n function Controller (\r\n Login,\r\n Apps,\r\n Routing\r\n ) {\r\n\r\n var vm = this;\r\n\r\n vm.showProgress = true;\r\n vm.showError = false;\r\n\r\n vm.data = null;\r\n\r\n vm.onAppClick = function() {\r\n vm.showProgress = true;\r\n };\r\n\r\n\r\n\r\n function getAppList() {\r\n vm.showProgress = true;\r\n vm.showError = false;\r\n\r\n Apps.list().then(function(response) {\r\n vm.showProgress = false;\r\n vm.showError = false;\r\n vm.data = response;\r\n\r\n }).catch(function() {\r\n vm.showProgress = false;\r\n vm.showError = true;\r\n\r\n });\r\n }\r\n\r\n\r\n\r\n //----------- initialization ------------------\r\n\r\n function init() {\r\n Login.check().then(function(success) {\r\n if (success) {\r\n getAppList();\r\n } else {\r\n Routing.login();\r\n }\r\n });\r\n }\r\n\r\n\r\n init();\r\n\r\n\r\n }\r\n\r\n\r\n\r\n})();\r\n","(function() {\r\n /* globals $, angular */\r\n 'use strict';\r\n\r\n angular.module('dashboardApp').controller('startController', Controller);\r\n Controller.$inject = [\r\n 'Login',\r\n 'Routing',\r\n '$cookies',\r\n '$location',\r\n ];\r\n\r\n function Controller (\r\n Login,\r\n Routing,\r\n $cookies,\r\n $location\r\n ) {\r\n\r\n var vm = this;\r\n\r\n vm.showProgress = true;\r\n vm.showError = false;\r\n\r\n\r\n\r\n //----------- initialization ------------------\r\n\r\n function init() {\r\n //alert('start -> init');\r\n // TO BE REMOVED after decommissioning the old web servers\r\n // Some apps have a Home button, which redirects to /irp/\r\n // We want to redirect further to oAuthDispatcher, which will take care to redirect to old or new IRP\r\n var isRedirectedFromOldServer = $cookies.get('redirect-from');\r\n if(isRedirectedFromOldServer == \"1\")\r\n {\r\n // Clean the cookie\r\n $cookies.remove('redirect-from', { path: '/' });\r\n // Redirect to OAuthDispatcher\r\n Routing.oAuthDispatcher();\r\n }\r\n else\r\n {\r\n // check if there's an open session\r\n Login.check().then(function(success) {\r\n if (success) {\r\n Routing.apps();\r\n } else {\r\n Routing.login();\r\n }\r\n\r\n });\r\n }\r\n }\r\n\r\n\r\n init();\r\n\r\n\r\n }\r\n\r\n\r\n\r\n})();\r\n","(function() {\r\n /* globals $, angular */\r\n 'use strict';\r\n\r\n angular.module('dashboardApp').controller('loginController', Controller);\r\n Controller.$inject = [\r\n '$cookies',\r\n '$routeParams',\r\n 'Login',\r\n 'Routing',\r\n '$location',\r\n ];\r\n\r\n function Controller (\r\n $cookies,\r\n $routeParams,\r\n Login,\r\n Routing,\r\n $location\r\n ) {\r\n\r\n var vm = this;\r\n\r\n vm.showLogin = true;\r\n vm.showProgress = false;\r\n vm.error = null;\r\n\r\n vm.userName = null;\r\n vm.password = null;\r\n vm.rememberMe = false;\r\n\r\n\r\n\r\n vm.onSubmit = function() {\r\n vm.showLogin = false;\r\n vm.showProgress = true;\r\n vm.error = null;\r\n\r\n setRememberMe();\r\n\r\n Login.authenticate(vm.userName, vm.password, '').then(function(success) {\r\n if (success) {\r\n Routing.apps();\r\n } else {\r\n vm.showLogin = true;\r\n vm.showProgress = false;\r\n vm.error = 'Login failed';\r\n }\r\n });\r\n };\r\n\r\n\r\n function getRememberMe() {\r\n var userName = $cookies.get('rememberMe');\r\n if (userName) {\r\n vm.userName = userName;\r\n vm.rememberMe = true;\r\n }\r\n }\r\n\r\n function setRememberMe() {\r\n function oneYear() {\r\n var result = new Date();\r\n result.setDate(result.getDate() + 365);\r\n return result;\r\n }\r\n\r\n var options = {\r\n path: '/',\r\n expires: oneYear()\r\n };\r\n\r\n if (vm.rememberMe) {\r\n $cookies.put('rememberMe', vm.userName, options);\r\n } else {\r\n $cookies.put('rememberMe', undefined, options);\r\n // $cookies.remove('rememeberMe', { path: '/' });\r\n }\r\n }\r\n\r\n\r\n function autoLogin(){\r\n // Check for auto-login parameters\r\n if ($routeParams.email && $routeParams.hash){\r\n // Login\r\n vm.userName = $routeParams.email;\r\n vm.password = $routeParams.hash;\r\n \r\n vm.showLogin = false;\r\n vm.showProgress = true;\r\n vm.error = null;\r\n\r\n $routeParams.email = \" \";\r\n $routeParams.hash = \" \";\r\n\r\n Login.authenticate(vm.userName, vm.password, $routeParams.impersonatedBy).then(function (success) {\r\n if (success) {\r\n $location.search({});\r\n // Redirect to app list\r\n Routing.apps();\r\n } else { \r\n vm.showLogin = true;\r\n vm.showProgress = false;\r\n vm.error = 'Login failed';\r\n }\r\n });\r\n }\r\n }\r\n\r\n\r\n //----------- initialization ------------------\r\n\r\n function init() {\r\n autoLogin();\r\n getRememberMe();\r\n }\r\n\r\n\r\n init();\r\n\r\n\r\n }\r\n\r\n\r\n\r\n})();\r\n","(function() {\r\n /* globals $, angular */\r\n 'use strict';\r\n\r\n angular.module(\"dashboardApp\").directive(\"imsUsageTrackerChart\", Directive);\r\n\r\n Directive.$inject = [\r\n ];\r\n\r\n\r\n\r\n function Directive(\r\n ) {\r\n\r\n\r\n function link(scope, element) {\r\n\r\n scope.chartData = null;\r\n\r\n\r\n function drawChart(data) {\r\n var categories = [];\r\n var series = { name: 'Logins', data: [] };\r\n\r\n _.forEach(data, function(row) {\r\n categories.push(row.date);\r\n series.data.push(row.value);\r\n });\r\n\r\n $(element).highcharts({\r\n chart: {\r\n type: 'column'\r\n },\r\n title: null,\r\n plotOptions: {\r\n series: {\r\n dataLabels: {\r\n align: 'center',\r\n enabled: true\r\n }\r\n }\r\n },\r\n xAxis: {\r\n categories: categories\r\n },\r\n yAxis: [\r\n {\r\n title: { text: 'Count' }\r\n }\r\n ],\r\n series: [series]\r\n });\r\n\r\n }\r\n\r\n\r\n function init() {\r\n scope.$watch('loginCounts', function(data) {\r\n if (data) {\r\n drawChart(data);\r\n }\r\n });\r\n }\r\n\r\n\r\n init();\r\n\r\n }\r\n\r\n\r\n\r\n return {\r\n restrict: 'E',\r\n replace: true,\r\n scope: {\r\n loginCounts: '='\r\n },\r\n template: '
',\r\n link: link\r\n };\r\n\r\n\r\n\r\n }\r\n\r\n\r\n})();\r\n","(function() {\r\n /* globals $, angular */\r\n 'use strict';\r\n\r\n angular.module('dashboardApp').controller('usageTrackerController', Controller);\r\n Controller.$inject = [\r\n '$q',\r\n '$scope', \r\n 'Login',\r\n 'Apps',\r\n 'UsageTracker',\r\n 'Routing'\r\n ];\r\n\r\n function Controller (\r\n $q,\r\n $scope,\r\n Login,\r\n Apps,\r\n UsageTracker,\r\n Routing\r\n ) {\r\n\r\n var vm = this;\r\n var defaultApp = {id: -1, name: '[All]'};\r\n var defaultUser = {id: -1, name: '[All]'};\r\n var today = new Date();\r\n var dtFormat = \"YYYY-MM-DD\";\r\n \r\n\r\n vm.showProgress = true;\r\n vm.showError = false;\r\n\r\n vm.apps = [ defaultApp ];\r\n vm.app = vm.apps[0];\r\n\r\n vm.users = [ defaultUser ];\r\n vm.user = vm.users[0];\r\n\r\n vm.onSubmit = loadData;\r\n\r\n vm.usageData = null;\r\n vm.loginCounts = null;\r\n\r\n vm.date = {\r\n startDate: moment().subtract(14, 'days'),\r\n endDate: moment()\r\n };\r\n\r\n vm.datePickerOptions = {\r\n locale: { \r\n format: dtFormat\r\n },\r\n ranges: { \r\n 'Last 30 Days': [moment().subtract(29, 'days'), moment()],\r\n 'Last 90 Days': [moment().subtract(89, 'days'), moment()],\r\n 'Last 6 Months': [moment().subtract(6, 'months'), moment()],\r\n 'Last 1 Year': [moment().subtract(1, 'years'), moment()]\r\n },\r\n opens: 'left',\r\n showDropdowns: true,\r\n linkedCalendars: false,\r\n showCustomRangeLabel: false,\r\n alwaysShowCalendars: true\r\n };\r\n\r\n\r\n vm.export = function() {\r\n\t UsageTracker.export(\r\n\t\t vm.user.id,\r\n\t\t vm.app.id,\r\n\t\t vm.date.startDate.format(dtFormat),\r\n\t\t vm.date.endDate.format(dtFormat)\r\n\t );\r\n };\r\n\r\n\r\n function loadFilters() {\r\n vm.showProgress = true;\r\n vm.showError = false;\r\n\r\n var promises = [\r\n Apps.list(),\r\n UsageTracker.userList()\r\n ];\r\n\r\n $q.all(promises).then(function(responses) {\r\n parseFilters(responses[0], responses[1]);\r\n\r\n }, function() {\r\n vm.showProgress = false;\r\n vm.showError = true;\r\n });\r\n }\r\n\r\n\r\n\r\n function parseFilters(apps, users) {\r\n vm.apps = [ defaultApp ].concat(apps);\r\n vm.users = [ defaultUser ].concat(users);\r\n vm.showProgress = false;\r\n }\r\n\r\n\r\n\r\n function loadData() {\r\n vm.showProgress = true;\r\n vm.showError = false;\r\n\r\n var promises = [\r\n UsageTracker.usageData(\r\n vm.user.id,\r\n vm.app.id,\r\n vm.date.startDate.format(dtFormat),\r\n vm.date.endDate.format(dtFormat)\r\n ),\r\n UsageTracker.loginCounts(\r\n vm.user.id,\r\n vm.app.id,\r\n vm.date.startDate.format(dtFormat),\r\n vm.date.endDate.format(dtFormat)\r\n )\r\n ];\r\n\r\n $q.all(promises).then(function(responses) {\r\n vm.showProgress = false;\r\n processData(responses[0], responses[1]);\r\n\r\n }, function() {\r\n vm.showProgress = false;\r\n vm.showError = true;\r\n });\r\n }\r\n\r\n\r\n\r\n function processData(usageData, loginCounts) {\r\n vm.usageData = usageData;\r\n vm.loginCounts = loginCounts;\r\n }\r\n\r\n\r\n\r\n //----------- initialization ------------------\r\n\r\n function init() {\r\n Login.check().then(function(success) {\r\n if (success) {\r\n loadFilters();\r\n } else {\r\n Routing.login();\r\n }\r\n });\r\n }\r\n\r\n\r\n init();\r\n\r\n\r\n }\r\n\r\n\r\n\r\n})();\r\n","(function() {\r\n /* globals $, angular */\r\n 'use strict';\r\n\r\n angular.module('dashboardApp').controller('logoutController', Controller);\r\n Controller.$inject = [\r\n '$cookies',\r\n 'Login',\r\n 'Routing'\r\n ];\r\n\r\n function Controller (\r\n $cookies,\r\n Login,\r\n Routing\r\n ) {\r\n\r\n\r\n\r\n function logout() {\r\n \r\n Login.logout().then(function() {\r\n Routing.start();\r\n }).catch(function() {\r\n Routing.login();\r\n });\r\n }\r\n\r\n logout();\r\n \r\n }\r\n\r\n\r\n\r\n})();\r\n","(function () {\r\n /* globals $, angular */\r\n \"use strict\";\r\n\r\n angular.module(\"dashboardApp\").config(Config);\r\n\r\n Config.$inject = ['$routeProvider'];\r\n\r\n function Config($routeProvider) {\r\n\r\n\r\n $routeProvider.when('/start', {\r\n templateUrl: 'ui/build/html/core/start/start.view.html',\r\n controller: \"startController\",\r\n controllerAs: \"vm\"\r\n });\r\n\r\n\r\n\r\n $routeProvider.when('/login', {\r\n templateUrl: 'ui/build/html/core/login/login.view.html',\r\n controller: \"loginController\",\r\n controllerAs: \"vm\"\r\n });\r\n\r\n\r\n\r\n $routeProvider.when('/logout', {\r\n templateUrl: 'ui/build/html/core/logout/logout.view.html',\r\n controller: \"logoutController\",\r\n controllerAs: \"vm\"\r\n });\r\n\r\n\r\n\r\n $routeProvider.when('/apps', {\r\n templateUrl: 'ui/build/html/core/apps/apps.view.html',\r\n controller: \"appsController\",\r\n controllerAs: \"vm\"\r\n });\r\n\r\n\r\n\r\n $routeProvider.when('/forgot-password', {\r\n templateUrl: 'ui/build/html/core/forgot-password/forgot-password.view.html',\r\n controller: \"forgotPasswordController\",\r\n controllerAs: \"vm\"\r\n });\r\n\r\n\r\n\r\n $routeProvider.when('/account', {\r\n templateUrl: 'ui/build/html/core/account/account.view.html',\r\n controller: \"accountController\",\r\n controllerAs: \"vm\"\r\n });\r\n\r\n\r\n\r\n $routeProvider.when('/usage-tracker', {\r\n templateUrl: 'ui/build/html/core/usage-tracker/usage-tracker.view.html',\r\n controller: \"usageTrackerController\",\r\n controllerAs: \"vm\"\r\n });\r\n\r\n\r\n\r\n $routeProvider.when('/environment', {\r\n templateUrl: 'ui/build/html/core/environment/environment.view.html',\r\n controller: \"environmentController\",\r\n controllerAs: \"vm\"\r\n });\r\n\r\n\r\n $routeProvider.when('/info', {\r\n templateUrl: 'ui/build/html/core/info/info.view.html'\r\n });\r\n\r\n\r\n\r\n\r\n $routeProvider.otherwise('/start');\r\n\r\n\r\n }\r\n})();\r\n","(function() {\r\n /* globals $, angular */\r\n 'use strict';\r\n\r\n angular.module('dashboardApp').run(Run);\r\n\r\n Run.$inject = [\r\n '$window'\r\n ];\r\n\r\n\r\n function Run(\r\n $window\r\n ) {\r\n\r\n // $location.path('/start').replace();\r\n\r\n $window.com = $window.com || {};\r\n $window.com.imshealth = $window.com.imshealth || {};\r\n\r\n }\r\n\r\n\r\n})();\r\n","(function () {\r\n /* globals $, angular */\r\n 'use strict';\r\n\r\n angular.module('dashboardApp').factory('AppSettings', Settings);\r\n\r\n function Settings() {\r\n return {\r\n\r\n paths: {\r\n api: 'api/',\r\n html: 'ui/build/html'\r\n }\r\n\r\n };\r\n }\r\n})();","(function() {\r\n /* globals $, angular, Highcharts */\r\n 'use strict';\r\n\r\n var start = function() {\r\n angular.element(document).ready(function() {\r\n angular.bootstrap(document, ['dashboardApp']);\r\n });\r\n };\r\n\r\n\r\n var initCharting = function() {\r\n Highcharts.setOptions({\r\n legend: {\r\n itemStyle: {\r\n fontWeight: 'normal' // see http://api.highcharts.com/highcharts#legend.itemStyle\r\n }\r\n },\r\n tooltip: {\r\n enabled: window.navigator.userAgent.toLowerCase().indexOf('ipad') === -1\r\n },\r\n plotOptions: {\r\n series: {\r\n animation: false\r\n }\r\n },\r\n lang: {\r\n thousandsSep: ','\r\n },\r\n credits: { enabled: false }\r\n });\r\n };\r\n\r\n\r\n\r\n $(function() {\r\n initCharting();\r\n start();\r\n });\r\n\r\n\r\n\r\n})();\r\n"]}