# HG changeset patch # User Andrew Azores # Date 1506025575 14400 # Node ID b686b8d2463897a1dbf18300c27a561cb3ecc43f # Parent baa2100c95bbda163f2f96af86a279247753cd3d Remove landing state, make jvm-list default Reviewed-by: jkang Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2017-September/025129.html diff -r baa2100c95bb -r b686b8d24638 integration-test/specs/launch.spec.js --- a/integration-test/specs/launch.spec.js Wed Sep 20 13:29:27 2017 -0400 +++ b/integration-test/specs/launch.spec.js Thu Sep 21 16:26:15 2017 -0400 @@ -33,8 +33,8 @@ browser.getTitle().should.eventually.equal('Thermostat'); }); - it('should navigate to landing state', () => { - browser.getCurrentUrl().should.eventually.containEql('landing'); + it('should navigate to default state', () => { + browser.getCurrentUrl().should.eventually.containEql('jvm-list'); }); }); diff -r baa2100c95bb -r b686b8d24638 src/app/app.routing.js --- a/src/app/app.routing.js Wed Sep 20 13:29:27 2017 -0400 +++ b/src/app/app.routing.js Thu Sep 21 16:26:15 2017 -0400 @@ -54,9 +54,16 @@ let appRouter = angular.module('app.routing', componentRoutingModules); +function defaultState ($stateProvider) { + 'ngInject'; + $stateProvider.state('default', { + redirectTo: 'jvmList' + }); +} +appRouter.config(defaultState); function transitionHook ($q, $transitions, $state, authService) { 'ngInject'; - $transitions.onBefore({ to: '/' }, () => $state.target('landing')); + $transitions.onBefore({ to: '/' }, () => $state.target('jvmList')); $transitions.onEnter({}, () => { authService.refresh() }); diff -r baa2100c95bb -r b686b8d24638 src/app/app.routing.spec.js --- a/src/app/app.routing.spec.js Wed Sep 20 13:29:27 2017 -0400 +++ b/src/app/app.routing.spec.js Thu Sep 21 16:26:15 2017 -0400 @@ -127,7 +127,7 @@ transitions.onBefore.args[0][0].to.should.equal('/'); }); - it('should redirect to landing', () => { + it('should redirect to jvm-list', () => { state.target.should.not.be.called(); transitions.onBefore.args[0][1].should.be.a.Function(); let res = transitions.onBefore.args[0][1](); diff -r baa2100c95bb -r b686b8d24638 src/app/components/about/about.html --- a/src/app/components/about/about.html Wed Sep 20 13:29:27 2017 -0400 +++ b/src/app/components/about/about.html Thu Sep 21 16:26:15 2017 -0400 @@ -5,7 +5,7 @@
-

Thermostat

+

Thermostat

about.ABOUT

about.OVERVIEW

about.VERSION

diff -r baa2100c95bb -r b686b8d24638 src/app/components/auth/login/login.controller.js --- a/src/app/components/auth/login/login.controller.js Wed Sep 20 13:29:27 2017 -0400 +++ b/src/app/components/auth/login/login.controller.js Thu Sep 21 16:26:15 2017 -0400 @@ -34,7 +34,7 @@ this._authService = authService; if (authService.status()) { - $state.go('landing'); + $state.go('jvmList'); return; } @@ -46,7 +46,7 @@ login () { this._authService.rememberUser(this.rememberUser); - this._authService.login(this.username, this.password, () => this._state.go('landing')); + this._authService.login(this.username, this.password, () => this._state.go('jvmList')); } } diff -r baa2100c95bb -r b686b8d24638 src/app/components/auth/login/login.controller.spec.js --- a/src/app/components/auth/login/login.controller.spec.js Wed Sep 20 13:29:27 2017 -0400 +++ b/src/app/components/auth/login/login.controller.spec.js Thu Sep 21 16:26:15 2017 -0400 @@ -77,9 +77,9 @@ }); })); - it('should redirect to landing if already logged in', () => { + it('should redirect to jvm-list if already logged in', () => { authService.status.should.be.calledOnce(); - state.go.should.be.calledWith('landing'); + state.go.should.be.calledWith('jvmList'); }); }); diff -r baa2100c95bb -r b686b8d24638 src/app/components/auth/login/login.routing.js --- a/src/app/components/auth/login/login.routing.js Wed Sep 20 13:29:27 2017 -0400 +++ b/src/app/components/auth/login/login.routing.js Thu Sep 21 16:26:15 2017 -0400 @@ -27,7 +27,7 @@ function config ($urlRouterProvider, $stateProvider) { 'ngInject'; - $urlRouterProvider.when('', '/landing'); + $urlRouterProvider.when('', '/jvm-list'); $stateProvider.state('login', { url: '/login', diff -r baa2100c95bb -r b686b8d24638 src/app/components/auth/login/login.routing.spec.js --- a/src/app/components/auth/login/login.routing.spec.js Wed Sep 20 13:29:27 2017 -0400 +++ b/src/app/components/auth/login/login.routing.spec.js Thu Sep 21 16:26:15 2017 -0400 @@ -39,8 +39,8 @@ }); describe('urlRouterProvider', () => { - it('should redirect blank path to landing', () => { - urlRouterProvider.when.should.be.calledWith('', '/landing'); + it('should redirect blank path to jvm-list', () => { + urlRouterProvider.when.should.be.calledWith('', '/jvm-list'); }); }); diff -r baa2100c95bb -r b686b8d24638 src/app/components/jvm-info/jvm-info.html --- a/src/app/components/jvm-info/jvm-info.html Wed Sep 20 13:29:27 2017 -0400 +++ b/src/app/components/jvm-info/jvm-info.html Thu Sep 21 16:26:15 2017 -0400 @@ -1,6 +1,5 @@