From d0182f2493d3727eb85f0ebadcced9a6befcf18e Mon Sep 17 00:00:00 2001 From: Tyr Johanson Date: Tue, 28 Jul 2015 17:11:11 -0600 Subject: [PATCH] Dashboard ReOrg - hz.dashboard --> horizon.dashboard Rename all uses of 'hz.dashboard' in Angular code to 'horizon.dashboard'. There are two main reasons for this change: 1. This is consistent with the pattern used for the horizon framework (horizon.framework) 2. This aligns with the directory structure. 'horizon' is a directory name and maps to /horizon and indicates that the component is part of the horizon project. The abbreviation 'hz' is now only used for legacy code. Change-Id: Ic22d6b0819ed62b3af2656fcb167b08ac55857c2 Partial-Bug: 1478717 --- .../static/dashboard/identity/identity.module.js | 10 +++++----- .../dashboard/identity/identity.module.spec.js | 4 ++-- .../dashboard/identity/projects/projects.module.js | 6 +++--- .../identity/projects/projects.module.spec.js | 2 +- .../identity/users/table/table.controller.js | 4 ++-- .../identity/users/table/table.controller.spec.js | 6 +++--- .../static/dashboard/identity/users/users.module.js | 4 ++-- .../dashboard/identity/users/users.module.spec.js | 4 ++-- .../static/dashboard/project/images/images.module.js | 8 ++++---- .../dashboard/project/images/images.module.spec.js | 12 ++++++------ .../static/dashboard/project/project.module.js | 2 +- .../static/dashboard/project/project.module.spec.js | 2 +- .../launch-instance-workflow.service.spec.js | 2 +- openstack_dashboard/enabled/_3000_identity.py | 2 +- openstack_dashboard/static/app/app.module.js | 2 +- .../static/dashboard/dashboard.module.js | 2 +- .../static/dashboard/dashboard.module.spec.js | 4 ++-- 17 files changed, 38 insertions(+), 38 deletions(-) diff --git a/openstack_dashboard/dashboards/identity/static/dashboard/identity/identity.module.js b/openstack_dashboard/dashboards/identity/static/dashboard/identity/identity.module.js index b60834e14a..38d526ee07 100644 --- a/openstack_dashboard/dashboards/identity/static/dashboard/identity/identity.module.js +++ b/openstack_dashboard/dashboards/identity/static/dashboard/identity/identity.module.js @@ -18,16 +18,16 @@ 'use strict'; /** - * @ngdoc hz.dashboard.identity + * @ngdoc horizon.dashboard.identity * @ngModule * * @description * Dashboard module to host various identity panels. */ angular - .module('hz.dashboard.identity', [ - 'hz.dashboard.identity.users', - 'hz.dashboard.identity.projects' + .module('horizon.dashboard.identity', [ + 'horizon.dashboard.identity.users', + 'horizon.dashboard.identity.projects' ]) .config(config); @@ -35,7 +35,7 @@ function config($provide, $windowProvider) { var path = $windowProvider.$get().STATIC_URL + 'dashboard/identity/'; - $provide.constant('hz.dashboard.identity.basePath', path); + $provide.constant('horizon.dashboard.identity.basePath', path); } })(); diff --git a/openstack_dashboard/dashboards/identity/static/dashboard/identity/identity.module.spec.js b/openstack_dashboard/dashboards/identity/static/dashboard/identity/identity.module.spec.js index 83b15a2aae..7785de31ab 100644 --- a/openstack_dashboard/dashboards/identity/static/dashboard/identity/identity.module.spec.js +++ b/openstack_dashboard/dashboards/identity/static/dashboard/identity/identity.module.spec.js @@ -16,9 +16,9 @@ (function() { 'use strict'; - describe('hz.dashboard.identity', function() { + describe('horizon.dashboard.identity', function() { it('should exist', function() { - expect(angular.module('hz.dashboard.identity')).toBeDefined(); + expect(angular.module('horizon.dashboard.identity')).toBeDefined(); }); }); diff --git a/openstack_dashboard/dashboards/identity/static/dashboard/identity/projects/projects.module.js b/openstack_dashboard/dashboards/identity/static/dashboard/identity/projects/projects.module.js index f2b61a245e..1cf09af2d5 100644 --- a/openstack_dashboard/dashboards/identity/static/dashboard/identity/projects/projects.module.js +++ b/openstack_dashboard/dashboards/identity/static/dashboard/identity/projects/projects.module.js @@ -16,21 +16,21 @@ 'use strict'; /** - * @ngdoc hz.dashboard.identity.projects + * @ngdoc horizon.dashboard.identity.projects * @ng-module * @description * Provides all of the services and widgets required * to support and display the identity projects. */ angular - .module('hz.dashboard.identity.projects', []) + .module('horizon.dashboard.identity.projects', []) .config(config); config.$inject = ['$provide', '$windowProvider']; function config($provide, $windowProvider) { var path = $windowProvider.$get().STATIC_URL + 'dashboard/identity/projects/'; - $provide.constant('hz.dashboard.identity.projects.basePath', path); + $provide.constant('horizon.dashboard.identity.projects.basePath', path); } })(); diff --git a/openstack_dashboard/dashboards/identity/static/dashboard/identity/projects/projects.module.spec.js b/openstack_dashboard/dashboards/identity/static/dashboard/identity/projects/projects.module.spec.js index d0c562697a..54e2753fdc 100644 --- a/openstack_dashboard/dashboards/identity/static/dashboard/identity/projects/projects.module.spec.js +++ b/openstack_dashboard/dashboards/identity/static/dashboard/identity/projects/projects.module.spec.js @@ -17,7 +17,7 @@ describe('Identity projects module', function() { it('should exist', function() { - expect(angular.module('hz.dashboard.identity.projects')).toBeDefined(); + expect(angular.module('horizon.dashboard.identity.projects')).toBeDefined(); }); }); diff --git a/openstack_dashboard/dashboards/identity/static/dashboard/identity/users/table/table.controller.js b/openstack_dashboard/dashboards/identity/static/dashboard/identity/users/table/table.controller.js index 9979156658..e9c7e6290c 100644 --- a/openstack_dashboard/dashboards/identity/static/dashboard/identity/users/table/table.controller.js +++ b/openstack_dashboard/dashboards/identity/static/dashboard/identity/users/table/table.controller.js @@ -26,11 +26,11 @@ * Serve as the focal point for table actions. */ angular - .module('hz.dashboard.identity.users') + .module('horizon.dashboard.identity.users') .controller('identityUsersTableController', identityUsersTableController); identityUsersTableController.$inject = [ - 'hz.dashboard.identity.basePath', + 'horizon.dashboard.identity.basePath', 'horizon.framework.widgets.toast.service', 'horizon.framework.util.i18n.gettext', 'horizon.app.core.openstack-service-api.policy', diff --git a/openstack_dashboard/dashboards/identity/static/dashboard/identity/users/table/table.controller.spec.js b/openstack_dashboard/dashboards/identity/static/dashboard/identity/users/table/table.controller.spec.js index db81fe0b8e..8f38b4bf9d 100644 --- a/openstack_dashboard/dashboards/identity/static/dashboard/identity/users/table/table.controller.spec.js +++ b/openstack_dashboard/dashboards/identity/static/dashboard/identity/users/table/table.controller.spec.js @@ -49,9 +49,9 @@ beforeEach(module('horizon.framework.widgets.toast')); beforeEach(module('horizon.app.core.openstack-service-api')); - beforeEach(module('hz.dashboard')); - beforeEach(module('hz.dashboard.identity')); - beforeEach(module('hz.dashboard.identity.users')); + beforeEach(module('horizon.dashboard')); + beforeEach(module('horizon.dashboard.identity')); + beforeEach(module('horizon.dashboard.identity.users')); beforeEach(inject(function($injector) { toastService = $injector.get('horizon.framework.widgets.toast.service'); diff --git a/openstack_dashboard/dashboards/identity/static/dashboard/identity/users/users.module.js b/openstack_dashboard/dashboards/identity/static/dashboard/identity/users/users.module.js index b87353114c..e5ca1d0ec6 100644 --- a/openstack_dashboard/dashboards/identity/static/dashboard/identity/users/users.module.js +++ b/openstack_dashboard/dashboards/identity/static/dashboard/identity/users/users.module.js @@ -18,7 +18,7 @@ 'use strict'; /** - * @ngdoc hz.dashboard.identity.users + * @ngdoc horizon.dashboard.identity.users * @ngModule * * @description @@ -26,6 +26,6 @@ * to support and display the identity users panel. */ angular - .module('hz.dashboard.identity.users', []); + .module('horizon.dashboard.identity.users', []); })(); diff --git a/openstack_dashboard/dashboards/identity/static/dashboard/identity/users/users.module.spec.js b/openstack_dashboard/dashboards/identity/static/dashboard/identity/users/users.module.spec.js index 2369a1290b..95cec2361f 100644 --- a/openstack_dashboard/dashboards/identity/static/dashboard/identity/users/users.module.spec.js +++ b/openstack_dashboard/dashboards/identity/static/dashboard/identity/users/users.module.spec.js @@ -16,9 +16,9 @@ (function() { 'use strict'; - describe('hz.dashboard.identity.users', function() { + describe('horizon.dashboard.identity.users', function() { it('should exist', function() { - expect(angular.module('hz.dashboard.identity.users')).toBeDefined(); + expect(angular.module('horizon.dashboard.identity.users')).toBeDefined(); }); }); diff --git a/openstack_dashboard/dashboards/project/static/dashboard/project/images/images.module.js b/openstack_dashboard/dashboards/project/static/dashboard/project/images/images.module.js index b0ef86d9ed..b535aae453 100644 --- a/openstack_dashboard/dashboards/project/static/dashboard/project/images/images.module.js +++ b/openstack_dashboard/dashboards/project/static/dashboard/project/images/images.module.js @@ -19,14 +19,14 @@ /** * @ngdoc overview - * @ngname hz.dashboard.project.images + * @ngname horizon.dashboard.project.images * * @description * Provides the services and widgets required * to support and display the project images panel. */ angular - .module('hz.dashboard.project.images', []) + .module('horizon.dashboard.project.images', []) .config(config); config.$inject = [ @@ -35,12 +35,12 @@ ]; /** - * @name hz.dashboard.project.images.basePath + * @name horizon.dashboard.project.images.basePath * @description Base path for the project dashboard */ function config($provide, $windowProvider) { var path = $windowProvider.$get().STATIC_URL + 'dashboard/project/images/'; - $provide.constant('hz.dashboard.project.images.basePath', path); + $provide.constant('horizon.dashboard.project.images.basePath', path); } })(); diff --git a/openstack_dashboard/dashboards/project/static/dashboard/project/images/images.module.spec.js b/openstack_dashboard/dashboards/project/static/dashboard/project/images/images.module.spec.js index 0054a808e3..4bb49d7377 100644 --- a/openstack_dashboard/dashboards/project/static/dashboard/project/images/images.module.spec.js +++ b/openstack_dashboard/dashboards/project/static/dashboard/project/images/images.module.spec.js @@ -16,20 +16,20 @@ (function() { 'use strict'; - describe('hz.dashboard.project.images', function() { + describe('horizon.dashboard.project.images', function() { it('should exist', function() { - expect(angular.module('hz.dashboard.project.images')).toBeDefined(); + expect(angular.module('horizon.dashboard.project.images')).toBeDefined(); }); }); - describe('hz.dashboard.project.images.basePath constant', function () { + describe('horizon.dashboard.project.images.basePath constant', function () { var imagesBasePath, staticUrl; - beforeEach(module('hz.dashboard')); + beforeEach(module('horizon.dashboard')); beforeEach(module('horizon.dashboard.project')); - beforeEach(module('hz.dashboard.project.images')); + beforeEach(module('horizon.dashboard.project.images')); beforeEach(inject(function ($injector) { - imagesBasePath = $injector.get('hz.dashboard.project.images.basePath'); + imagesBasePath = $injector.get('horizon.dashboard.project.images.basePath'); staticUrl = $injector.get('$window').STATIC_URL; })); diff --git a/openstack_dashboard/dashboards/project/static/dashboard/project/project.module.js b/openstack_dashboard/dashboards/project/static/dashboard/project/project.module.js index 3e4c725ace..2d7470bec9 100644 --- a/openstack_dashboard/dashboards/project/static/dashboard/project/project.module.js +++ b/openstack_dashboard/dashboards/project/static/dashboard/project/project.module.js @@ -25,7 +25,7 @@ */ angular .module('horizon.dashboard.project', [ - 'hz.dashboard.project.images', + 'horizon.dashboard.project.images', 'horizon.dashboard.project.workflow' ]) .config(config); diff --git a/openstack_dashboard/dashboards/project/static/dashboard/project/project.module.spec.js b/openstack_dashboard/dashboards/project/static/dashboard/project/project.module.spec.js index 6cdc9af640..02286c167d 100644 --- a/openstack_dashboard/dashboards/project/static/dashboard/project/project.module.spec.js +++ b/openstack_dashboard/dashboards/project/static/dashboard/project/project.module.spec.js @@ -25,7 +25,7 @@ describe('horizon.dashboard.project.basePath constant', function () { var projectBasePath, staticUrl; - beforeEach(module('hz.dashboard')); + beforeEach(module('horizon.dashboard')); beforeEach(module('horizon.dashboard.project')); beforeEach(inject(function ($injector) { projectBasePath = $injector.get('horizon.dashboard.project.basePath'); diff --git a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-workflow.service.spec.js b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-workflow.service.spec.js index 97325f5260..028d7e2e79 100644 --- a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-workflow.service.spec.js +++ b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-workflow.service.spec.js @@ -22,7 +22,7 @@ beforeEach(module('horizon.app.core')); beforeEach(module('horizon.dashboard.project')); beforeEach(module(function($provide) { - // Need to mock hz.framework.workflow from 'horizon' + // Need to mock horizon.framework.workflow from 'horizon' var workflow = function(spec, decorators) { angular.forEach(decorators, function(decorator) { decorator(spec); diff --git a/openstack_dashboard/enabled/_3000_identity.py b/openstack_dashboard/enabled/_3000_identity.py index 2137f17318..07b5656bc4 100644 --- a/openstack_dashboard/enabled/_3000_identity.py +++ b/openstack_dashboard/enabled/_3000_identity.py @@ -20,7 +20,7 @@ ADD_EXCEPTIONS = {} ADD_INSTALLED_APPS = ['openstack_dashboard.dashboards.identity'] ADD_ANGULAR_MODULES = [ - 'hz.dashboard.identity', + 'horizon.dashboard.identity', ] AUTO_DISCOVER_STATIC_FILES = True diff --git a/openstack_dashboard/static/app/app.module.js b/openstack_dashboard/static/app/app.module.js index bf7539a0ad..47fe7f0061 100644 --- a/openstack_dashboard/static/app/app.module.js +++ b/openstack_dashboard/static/app/app.module.js @@ -36,7 +36,7 @@ 'horizon.app.core', 'horizon.app.tech-debt', 'horizon.auth', - 'hz.dashboard', + 'horizon.dashboard', 'horizon.framework' ]; diff --git a/openstack_dashboard/static/dashboard/dashboard.module.js b/openstack_dashboard/static/dashboard/dashboard.module.js index 1ad33f9a8e..ad97852720 100644 --- a/openstack_dashboard/static/dashboard/dashboard.module.js +++ b/openstack_dashboard/static/dashboard/dashboard.module.js @@ -2,6 +2,6 @@ 'use strict'; angular - .module('hz.dashboard', []); + .module('horizon.dashboard', []); })(); diff --git a/openstack_dashboard/static/dashboard/dashboard.module.spec.js b/openstack_dashboard/static/dashboard/dashboard.module.spec.js index 79a1a7689e..a0c4b38e92 100644 --- a/openstack_dashboard/static/dashboard/dashboard.module.spec.js +++ b/openstack_dashboard/static/dashboard/dashboard.module.spec.js @@ -16,9 +16,9 @@ (function () { 'use strict'; - describe('hz.dashboard', function () { + describe('horizon.dashboard', function () { it('should be defined', function () { - expect(angular.module('hz.dashboard')).toBeDefined(); + expect(angular.module('horizon.dashboard')).toBeDefined(); }); });