You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by de...@apache.org on 2018/06/11 16:46:35 UTC

[incubator-trafficcontrol] branch master updated: makes dashboard the default page rather than login

This is an automated email from the ASF dual-hosted git repository.

dewrich pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git


The following commit(s) were added to refs/heads/master by this push:
     new a9f9efc  makes dashboard the default page rather than login
a9f9efc is described below

commit a9f9efcc1c25b70546f5f1a6ffe2ff6e3ff01b69
Author: Jeremy Mitchell <mi...@gmail.com>
AuthorDate: Fri Jun 1 15:26:11 2018 -0600

    makes dashboard the default page rather than login
---
 traffic_portal/app/src/app.js                             | 4 ++--
 traffic_portal/app/src/common/api/AuthService.js          | 2 +-
 traffic_portal/app/src/modules/private/dashboard/index.js | 2 +-
 traffic_portal/app/src/modules/public/login/index.js      | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/traffic_portal/app/src/app.js b/traffic_portal/app/src/app.js
index d41d497..b146509 100644
--- a/traffic_portal/app/src/app.js
+++ b/traffic_portal/app/src/app.js
@@ -429,13 +429,13 @@ trafficPortal.factory('authInterceptor', function ($rootScope, $q, $window, $loc
             if (rejection.status === 401) {
                 $rootScope.$broadcast('trafficPortal::exit');
                 userModel.resetUser();
-                if (url == '/' || $location.search().redirect) {
+                if (url == '/login' || $location.search().redirect) {
                     messageModel.setMessages(alerts, false);
                 } else {
                     $timeout(function () {
                         messageModel.setMessages(alerts, true);
                         // forward the to the login page with ?redirect=page/they/were/trying/to/reach
-                        $location.url('/').search({ redirect: encodeURIComponent(url) });
+                        $location.url('/login').search({ redirect: encodeURIComponent(url) });
                     }, 200);
                 }
             } else if (rejection.status === 403 || rejection.status === 404) {
diff --git a/traffic_portal/app/src/common/api/AuthService.js b/traffic_portal/app/src/common/api/AuthService.js
index fb78ed9..b558f4b 100644
--- a/traffic_portal/app/src/common/api/AuthService.js
+++ b/traffic_portal/app/src/common/api/AuthService.js
@@ -30,7 +30,7 @@ var AuthService = function($rootScope, $http, $state, $location, $q, $state, htt
                         $location.search('redirect', null); // remove the redirect query param
                         $location.url(redirect);
                     } else {
-                        $location.url('/dashboard');
+                        $location.url('/');
                     }
                 },
                 function(fault) {
diff --git a/traffic_portal/app/src/modules/private/dashboard/index.js b/traffic_portal/app/src/modules/private/dashboard/index.js
index 7338a0c..60c80de 100644
--- a/traffic_portal/app/src/modules/private/dashboard/index.js
+++ b/traffic_portal/app/src/modules/private/dashboard/index.js
@@ -22,7 +22,7 @@ module.exports = angular.module('trafficPortal.private.dashboard', [])
     .config(function($stateProvider, $urlRouterProvider) {
         $stateProvider
             .state('trafficPortal.private.dashboard', {
-                url: 'dashboard',
+                url: '',
                 abstract: true,
                 views: {
                     privateContent: {
diff --git a/traffic_portal/app/src/modules/public/login/index.js b/traffic_portal/app/src/modules/public/login/index.js
index 3c7ce96..fd8a55c 100644
--- a/traffic_portal/app/src/modules/public/login/index.js
+++ b/traffic_portal/app/src/modules/public/login/index.js
@@ -22,7 +22,7 @@ module.exports = angular.module('trafficPortal.public.login', [])
     .config(function($stateProvider, $urlRouterProvider) {
         $stateProvider
             .state('trafficPortal.public.login', {
-                url: '',
+                url: 'login',
                 views: {
                     publicContent: {
                         templateUrl: 'modules/public/login/login.tpl.html',

-- 
To stop receiving notification emails like this one, please contact
dewrich@apache.org.