diff --git a/src/app/frontend/chrome/chrome.html b/src/app/frontend/chrome/chrome.html index d6fd31f41c8aa3ee3a487fcc473ced2e07fe7c47..dac10842828ae01f79f242c4d9be343a3040904b 100644 --- a/src/app/frontend/chrome/chrome.html +++ b/src/app/frontend/chrome/chrome.html @@ -17,7 +17,7 @@ limitations under the License.
- +

diff --git a/src/app/frontend/index_module.js b/src/app/frontend/index_module.js index 0d78964643dbbc8d117dc0e9ddb30f440e646a9f..e4199b65deae245df5402ab90c5145362698231b 100644 --- a/src/app/frontend/index_module.js +++ b/src/app/frontend/index_module.js @@ -23,7 +23,6 @@ import logsModule from './logs/logs_module'; import routeConfig from './index_route'; import replicaSetDetailModule from './replicasetdetail/replicasetdetail_module'; import replicaSetListModule from './replicasetlist/replicasetlist_module'; -import zerostateModule from './zerostate/zerostate_module'; export default angular.module( 'kubernetesDashboard', @@ -40,7 +39,6 @@ export default angular.module( logsModule.name, replicaSetDetailModule.name, replicaSetListModule.name, - zerostateModule.name, ]) .config(indexConfig) .config(routeConfig); diff --git a/src/app/frontend/replicasetlist/replicasetlist_stateconfig.js b/src/app/frontend/replicasetlist/replicasetlist_stateconfig.js index cf51171913688aa35f1327184477f32ec5f5adb1..35d1aa4be4bd44f752edb9985bd1a81e5e77bda2 100644 --- a/src/app/frontend/replicasetlist/replicasetlist_stateconfig.js +++ b/src/app/frontend/replicasetlist/replicasetlist_stateconfig.js @@ -12,10 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {stateName as zerostate} from 'zerostate/zerostate_state'; +import {stateName as zerostate} from './zerostate/zerostate_state'; import {stateName as replicasets} from './replicasetlist_state'; import {stateUrl as replicasetsUrl} from './replicasetlist_state'; import ReplicaSetListController from './replicasetlist_controller'; +import ZeroStateController from './zerostate/zerostate_controller'; /** * Configures states for the service view. @@ -34,6 +35,16 @@ export default function stateConfig($stateProvider) { templateUrl: 'replicasetlist/replicasetlist.html', onEnter: redirectIfNeeded, }); + $stateProvider.state(zerostate, { + views: { + '@': { + controller: ZeroStateController, + controllerAs: 'ctrl', + templateUrl: 'replicasetlist/zerostate/zerostate.html', + }, + }, + url: '/zerostate', + }); } /** diff --git a/src/app/frontend/zerostate/zerostate.html b/src/app/frontend/replicasetlist/zerostate/zerostate.html similarity index 100% rename from src/app/frontend/zerostate/zerostate.html rename to src/app/frontend/replicasetlist/zerostate/zerostate.html diff --git a/src/app/frontend/zerostate/zerostate.scss b/src/app/frontend/replicasetlist/zerostate/zerostate.scss similarity index 97% rename from src/app/frontend/zerostate/zerostate.scss rename to src/app/frontend/replicasetlist/zerostate/zerostate.scss index 8a88f535713729f47139ff58a00a8f84f0e2ddbf..f9790d6dfa91f5983d8219be2082da8e48996ce9 100644 --- a/src/app/frontend/zerostate/zerostate.scss +++ b/src/app/frontend/replicasetlist/zerostate/zerostate.scss @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -@import '../variables'; +@import '../../variables'; .kd-content { background-color: $body; diff --git a/src/app/frontend/zerostate/zerostate_controller.js b/src/app/frontend/replicasetlist/zerostate/zerostate_controller.js similarity index 100% rename from src/app/frontend/zerostate/zerostate_controller.js rename to src/app/frontend/replicasetlist/zerostate/zerostate_controller.js diff --git a/src/app/frontend/zerostate/zerostate_state.js b/src/app/frontend/replicasetlist/zerostate/zerostate_state.js similarity index 85% rename from src/app/frontend/zerostate/zerostate_state.js rename to src/app/frontend/replicasetlist/zerostate/zerostate_state.js index 8f9a63aee1f743f7c8920e4236d128cdadef17bf..607e2991700c2b59072a9741283bc12c2f589b54 100644 --- a/src/app/frontend/zerostate/zerostate_state.js +++ b/src/app/frontend/replicasetlist/zerostate/zerostate_state.js @@ -12,5 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +import {stateName as replicasets} from './../replicasetlist_state'; + /** Name of the state. Can be used in, e.g., $state.go method. */ -export const stateName = 'zero'; +export const stateName = `${replicasets}.zero`; diff --git a/src/app/frontend/zerostate/zerostate_module.js b/src/app/frontend/zerostate/zerostate_module.js deleted file mode 100644 index 2f2508b3b03609175d1e539772550f3bf32c4985..0000000000000000000000000000000000000000 --- a/src/app/frontend/zerostate/zerostate_module.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2015 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import stateConfig from './zerostate_stateconfig'; - -/** - * Angular module for the zero state view. - * - * The view is active on the first launch of the application and is used for onboarding new users. - */ -export default angular.module( - 'kubernetesDashboard.zerostate', - [ - 'ui.router', - ]) - .config(stateConfig); diff --git a/src/app/frontend/zerostate/zerostate_stateconfig.js b/src/app/frontend/zerostate/zerostate_stateconfig.js deleted file mode 100644 index 30c8b721a4635d7bdf0ab31eb8488beae8215179..0000000000000000000000000000000000000000 --- a/src/app/frontend/zerostate/zerostate_stateconfig.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2015 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import ZeroStateController from './zerostate_controller'; -import {stateName} from './zerostate_state'; - -/** - * Configures states for the zero state view. - * - * @param {!ui.router.$stateProvider} $stateProvider - * @ngInject - */ -export default function stateConfig($stateProvider) { - $stateProvider.state(stateName, { - controller: ZeroStateController, - controllerAs: 'ctrl', - url: '/zerostate', - templateUrl: 'zerostate/zerostate.html', - }); -} diff --git a/src/test/frontend/zerostate/zerostate_controller_test.js b/src/test/frontend/replicasetlist/zerostate/zerostate_controller_test.js similarity index 88% rename from src/test/frontend/zerostate/zerostate_controller_test.js rename to src/test/frontend/replicasetlist/zerostate/zerostate_controller_test.js index d03714c8e524fb225fd42ad355b62933bd5f8182..d8741bc04fdba55e45f7434f99bb3941f89af4dc 100644 --- a/src/test/frontend/zerostate/zerostate_controller_test.js +++ b/src/test/frontend/replicasetlist/zerostate/zerostate_controller_test.js @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -import ZerostateController from 'zerostate/zerostate_controller'; +import ZerostateController from 'replicasetlist/zerostate/zerostate_controller'; -describe('Main controller', () => { +describe('Zerostate controller', () => { let ctrl; beforeEach(angular.mock.inject(() => { ctrl = new ZerostateController(); }));