You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2018/06/11 16:46:28 UTC

[GitHub] dewrich closed pull request #2363: makes dashboard the default page rather than login

dewrich closed pull request #2363: makes dashboard the default page rather than login
URL: https://github.com/apache/incubator-trafficcontrol/pull/2363
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/traffic_portal/app/src/app.js b/traffic_portal/app/src/app.js
index d41d49747..b14650991 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 fb78ed958..b558f4bad 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 7338a0c42..60c80de22 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 3c7ce96a6..fd8a55c06 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',


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services