From 6f1eec9ca75f195d8c0b49f3c3c084dc4055b85a Mon Sep 17 00:00:00 2001 From: Shaoquan Chen Date: Sun, 8 Feb 2015 19:44:06 -0800 Subject: [PATCH] Base launch instance wizard - Setting up base launch instance wizard to enable parallel development on steps in the work flow. - Adding business logic related code to openstack_dashboard project. - Using Horizon's well-defined plug-in architecture to hook launch instance to Horizon. Partially Implements: blueprint launch-instance-redesign Change-Id: Ibbbbfc7f49c58a78b0d1b29e363531d5ae1a9aab --- horizon/static/angular/wizard/wizard.js | 2 +- openstack_dashboard/enabled/_10_project.py | 38 +++++++ .../static/dashboard/dashboard.module.js | 10 ++ .../static/dashboard/dashboard.module.spec.js | 2 + .../static/dashboard/dashboard.scss | 2 + .../access-and-security.help.html | 4 + .../access-and-security.html | 3 + .../access-and-security.js | 24 ++++ .../access-and-security.scss | 0 .../access-and-security.spec.js | 2 + .../launch-instance/flavor/flavor.help.html | 4 + .../launch-instance/flavor/flavor.html | 3 + .../launch-instance/flavor/flavor.js | 24 ++++ .../launch-instance/flavor/flavor.scss | 0 .../launch-instance/flavor/flavor.spec.js | 2 + .../launch-instance/launch-instance.js | 103 ++++++++++++++++++ .../launch-instance/launch-instance.scss | 5 + .../launch-instance/launch-instance.spec.js | 2 + .../launch-instance/network/network.help.html | 4 + .../launch-instance/network/network.html | 3 + .../launch-instance/network/network.js | 24 ++++ .../launch-instance/network/network.scss | 0 .../launch-instance/network/network.spec.js | 2 + .../post-creation/post-creation.help.html | 4 + .../post-creation/post-creation.html | 3 + .../post-creation/post-creation.js | 23 ++++ .../post-creation/post-creation.scss | 0 .../post-creation/post-creation.spec.js | 2 + .../launch-instance/source/source.help.html | 4 + .../launch-instance/source/source.html | 3 + .../launch-instance/source/source.js | 24 ++++ .../launch-instance/source/source.scss | 0 .../launch-instance/source/source.spec.js | 2 + .../templates/_stylesheets.html | 11 ++ run_tests.sh | 1 + 35 files changed, 339 insertions(+), 1 deletion(-) create mode 100644 openstack_dashboard/static/dashboard/dashboard.module.js create mode 100644 openstack_dashboard/static/dashboard/dashboard.module.spec.js create mode 100644 openstack_dashboard/static/dashboard/dashboard.scss create mode 100644 openstack_dashboard/static/dashboard/launch-instance/access-and-security/access-and-security.help.html create mode 100644 openstack_dashboard/static/dashboard/launch-instance/access-and-security/access-and-security.html create mode 100644 openstack_dashboard/static/dashboard/launch-instance/access-and-security/access-and-security.js create mode 100644 openstack_dashboard/static/dashboard/launch-instance/access-and-security/access-and-security.scss create mode 100644 openstack_dashboard/static/dashboard/launch-instance/access-and-security/access-and-security.spec.js create mode 100644 openstack_dashboard/static/dashboard/launch-instance/flavor/flavor.help.html create mode 100644 openstack_dashboard/static/dashboard/launch-instance/flavor/flavor.html create mode 100644 openstack_dashboard/static/dashboard/launch-instance/flavor/flavor.js create mode 100644 openstack_dashboard/static/dashboard/launch-instance/flavor/flavor.scss create mode 100644 openstack_dashboard/static/dashboard/launch-instance/flavor/flavor.spec.js create mode 100644 openstack_dashboard/static/dashboard/launch-instance/launch-instance.js create mode 100644 openstack_dashboard/static/dashboard/launch-instance/launch-instance.scss create mode 100644 openstack_dashboard/static/dashboard/launch-instance/launch-instance.spec.js create mode 100644 openstack_dashboard/static/dashboard/launch-instance/network/network.help.html create mode 100644 openstack_dashboard/static/dashboard/launch-instance/network/network.html create mode 100644 openstack_dashboard/static/dashboard/launch-instance/network/network.js create mode 100644 openstack_dashboard/static/dashboard/launch-instance/network/network.scss create mode 100644 openstack_dashboard/static/dashboard/launch-instance/network/network.spec.js create mode 100644 openstack_dashboard/static/dashboard/launch-instance/post-creation/post-creation.help.html create mode 100644 openstack_dashboard/static/dashboard/launch-instance/post-creation/post-creation.html create mode 100644 openstack_dashboard/static/dashboard/launch-instance/post-creation/post-creation.js create mode 100644 openstack_dashboard/static/dashboard/launch-instance/post-creation/post-creation.scss create mode 100644 openstack_dashboard/static/dashboard/launch-instance/post-creation/post-creation.spec.js create mode 100644 openstack_dashboard/static/dashboard/launch-instance/source/source.help.html create mode 100644 openstack_dashboard/static/dashboard/launch-instance/source/source.html create mode 100644 openstack_dashboard/static/dashboard/launch-instance/source/source.js create mode 100644 openstack_dashboard/static/dashboard/launch-instance/source/source.scss create mode 100644 openstack_dashboard/static/dashboard/launch-instance/source/source.spec.js diff --git a/horizon/static/angular/wizard/wizard.js b/horizon/static/angular/wizard/wizard.js index ed9e9c0311..f9d38b2854 100644 --- a/horizon/static/angular/wizard/wizard.js +++ b/horizon/static/angular/wizard/wizard.js @@ -1,7 +1,7 @@ (function () { 'use strict'; - angular.module('hz.widget.wizard', []) + angular.module('hz.widget.wizard', ['ui.bootstrap']) .constant('wizardLabels', { cancel: gettext('Cancel'), diff --git a/openstack_dashboard/enabled/_10_project.py b/openstack_dashboard/enabled/_10_project.py index d695df19cd..11d1a8d381 100644 --- a/openstack_dashboard/enabled/_10_project.py +++ b/openstack_dashboard/enabled/_10_project.py @@ -1,3 +1,17 @@ +# Copyright 2015, Hewlett-Packard Development Company, L.P. +# +# 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. + # The slug of the dashboard to be added to HORIZON['dashboards']. Required. DASHBOARD = 'project' # If set to True, this dashboard will be set as the default dashboard. @@ -6,3 +20,27 @@ DEFAULT = True ADD_EXCEPTIONS = {} # A list of applications to be added to INSTALLED_APPS. ADD_INSTALLED_APPS = ['openstack_dashboard.dashboards.project'] + +ADD_ANGULAR_MODULES = ['hz.dashboard'] + +LAUNCH_INST = 'dashboard/launch-instance/' + +ADD_JS_FILES = [ + 'dashboard/dashboard.module.js', + LAUNCH_INST + 'launch-instance.js', + LAUNCH_INST + 'source/source.js', + LAUNCH_INST + 'flavor/flavor.js', + LAUNCH_INST + 'network/network.js', + LAUNCH_INST + 'access-and-security/access-and-security.js', + LAUNCH_INST + 'post-creation/post-creation.js', +] + +ADD_JS_SPEC_FILES = [ + 'dashboard/dashboard.module.spec.js', + LAUNCH_INST + 'launch-instance.spec.js', + LAUNCH_INST + 'source/source.spec.js', + LAUNCH_INST + 'flavor/flavor.spec.js', + LAUNCH_INST + 'network/network.spec.js', + LAUNCH_INST + 'access-and-security/access-and-security.spec.js', + LAUNCH_INST + 'post-creation/post-creation.spec.js', +] diff --git a/openstack_dashboard/static/dashboard/dashboard.module.js b/openstack_dashboard/static/dashboard/dashboard.module.js new file mode 100644 index 0000000000..2cc2ee824a --- /dev/null +++ b/openstack_dashboard/static/dashboard/dashboard.module.js @@ -0,0 +1,10 @@ +(function () { + 'use strict'; + + var module = angular.module('hz.dashboard', [ + 'hz.dashboard.launch-instance' + ]); + + module.constant('dashboardBasePath', '/static/dashboard/'); + +})(); diff --git a/openstack_dashboard/static/dashboard/dashboard.module.spec.js b/openstack_dashboard/static/dashboard/dashboard.module.spec.js new file mode 100644 index 0000000000..2c4b787fc8 --- /dev/null +++ b/openstack_dashboard/static/dashboard/dashboard.module.spec.js @@ -0,0 +1,2 @@ +/* jshint globalstrict: true */ +'use strict'; diff --git a/openstack_dashboard/static/dashboard/dashboard.scss b/openstack_dashboard/static/dashboard/dashboard.scss new file mode 100644 index 0000000000..80b5e93563 --- /dev/null +++ b/openstack_dashboard/static/dashboard/dashboard.scss @@ -0,0 +1,2 @@ +@import "./scss/variables"; +@import "launch-instance/launch-instance"; diff --git a/openstack_dashboard/static/dashboard/launch-instance/access-and-security/access-and-security.help.html b/openstack_dashboard/static/dashboard/launch-instance/access-and-security/access-and-security.help.html new file mode 100644 index 0000000000..3504869808 --- /dev/null +++ b/openstack_dashboard/static/dashboard/launch-instance/access-and-security/access-and-security.help.html @@ -0,0 +1,4 @@ +
+

{$ title $}

+

+
diff --git a/openstack_dashboard/static/dashboard/launch-instance/access-and-security/access-and-security.html b/openstack_dashboard/static/dashboard/launch-instance/access-and-security/access-and-security.html new file mode 100644 index 0000000000..e65cd28c83 --- /dev/null +++ b/openstack_dashboard/static/dashboard/launch-instance/access-and-security/access-and-security.html @@ -0,0 +1,3 @@ +
+

{$ title $}

+
diff --git a/openstack_dashboard/static/dashboard/launch-instance/access-and-security/access-and-security.js b/openstack_dashboard/static/dashboard/launch-instance/access-and-security/access-and-security.js new file mode 100644 index 0000000000..bf104d73c5 --- /dev/null +++ b/openstack_dashboard/static/dashboard/launch-instance/access-and-security/access-and-security.js @@ -0,0 +1,24 @@ +(function () { + 'use strict'; + + var module = angular.module('hz.dashboard.launch-instance'); + + module.controller('LaunchInstanceAccessAndSecurityCtrl', [ + '$scope', + LaunchInstanceAccessAndSecurityCtrl + ]); + + module.controller('LaunchInstanceAccessAndSecurityHelpCtrl', [ + '$scope', + LaunchInstanceAccessAndSecurityHelpCtrl + ]); + + function LaunchInstanceAccessAndSecurityCtrl($scope) { + $scope.title = gettext('Access and Security'); + } + + function LaunchInstanceAccessAndSecurityHelpCtrl($scope) { + $scope.title = gettext('Access and Security Help'); + } + +})(); diff --git a/openstack_dashboard/static/dashboard/launch-instance/access-and-security/access-and-security.scss b/openstack_dashboard/static/dashboard/launch-instance/access-and-security/access-and-security.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/openstack_dashboard/static/dashboard/launch-instance/access-and-security/access-and-security.spec.js b/openstack_dashboard/static/dashboard/launch-instance/access-and-security/access-and-security.spec.js new file mode 100644 index 0000000000..2c4b787fc8 --- /dev/null +++ b/openstack_dashboard/static/dashboard/launch-instance/access-and-security/access-and-security.spec.js @@ -0,0 +1,2 @@ +/* jshint globalstrict: true */ +'use strict'; diff --git a/openstack_dashboard/static/dashboard/launch-instance/flavor/flavor.help.html b/openstack_dashboard/static/dashboard/launch-instance/flavor/flavor.help.html new file mode 100644 index 0000000000..f68a72d7f4 --- /dev/null +++ b/openstack_dashboard/static/dashboard/launch-instance/flavor/flavor.help.html @@ -0,0 +1,4 @@ +
+

{$ title $}

+

+
diff --git a/openstack_dashboard/static/dashboard/launch-instance/flavor/flavor.html b/openstack_dashboard/static/dashboard/launch-instance/flavor/flavor.html new file mode 100644 index 0000000000..de525f33b0 --- /dev/null +++ b/openstack_dashboard/static/dashboard/launch-instance/flavor/flavor.html @@ -0,0 +1,3 @@ +
+

{$ title $}

+
diff --git a/openstack_dashboard/static/dashboard/launch-instance/flavor/flavor.js b/openstack_dashboard/static/dashboard/launch-instance/flavor/flavor.js new file mode 100644 index 0000000000..3dcb732ac7 --- /dev/null +++ b/openstack_dashboard/static/dashboard/launch-instance/flavor/flavor.js @@ -0,0 +1,24 @@ +(function () { + 'use strict'; + + var module = angular.module('hz.dashboard.launch-instance'); + + module.controller('LaunchInstanceFlavorCtrl', [ + '$scope', + LaunchInstanceFlavorCtrl + ]); + + module.controller('LaunchInstanceFlavorHelpCtrl', [ + '$scope', + LaunchInstanceFlavorHelpCtrl + ]); + + function LaunchInstanceFlavorCtrl($scope) { + $scope.title = gettext('Select a Flavor'); + } + + function LaunchInstanceFlavorHelpCtrl($scope) { + $scope.title = gettext('Flavor Help'); + } + +})(); diff --git a/openstack_dashboard/static/dashboard/launch-instance/flavor/flavor.scss b/openstack_dashboard/static/dashboard/launch-instance/flavor/flavor.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/openstack_dashboard/static/dashboard/launch-instance/flavor/flavor.spec.js b/openstack_dashboard/static/dashboard/launch-instance/flavor/flavor.spec.js new file mode 100644 index 0000000000..2c4b787fc8 --- /dev/null +++ b/openstack_dashboard/static/dashboard/launch-instance/flavor/flavor.spec.js @@ -0,0 +1,2 @@ +/* jshint globalstrict: true */ +'use strict'; diff --git a/openstack_dashboard/static/dashboard/launch-instance/launch-instance.js b/openstack_dashboard/static/dashboard/launch-instance/launch-instance.js new file mode 100644 index 0000000000..a268139979 --- /dev/null +++ b/openstack_dashboard/static/dashboard/launch-instance/launch-instance.js @@ -0,0 +1,103 @@ +(function () { + 'use strict'; + + var module = angular.module('hz.dashboard.launch-instance', []); + + module.factory('launchInstanceWorkflow', ['dashboardBasePath', function (path) { + + return { + title: gettext('Launch Instance'), + + steps: [ + { + title: gettext('Select Source'), + templateUrl: path + 'launch-instance/source/source.html', + helpUrl: path + 'launch-instance/source/source.help.html', + formName: 'launchInstanceSourceForm' + }, + { + title: gettext('Flavor'), + templateUrl: path + 'launch-instance/flavor/flavor.html', + helpUrl: path + 'launch-instance/flavor/flavor.help.html', + formName: 'launchInstanceFlavorForm' + }, + { + title: gettext('Network'), + templateUrl: path + 'launch-instance/network/network.html', + helpUrl: path + 'launch-instance/network/network.help.html', + formName: 'launchInstanceNetworkForm' + }, + { + title: gettext('Access and Security'), + templateUrl: path + 'launch-instance/access-and-security/access-and-security.html', + helpUrl: path + 'launch-instance/access-and-security/access-and-security.help.html', + formName: 'launchInstanceAccessAndSecurityForm' + }, + { + title: gettext('Post Creation'), + templateUrl: path + 'launch-instance/post-creation/post-creation.html', + helpUrl: path + 'launch-instance/post-creation/post-creation.help.html', + formName: 'launchInstancePostCreationForm' + } + ], + + btnText: { + finish: gettext('Launch Instance') + }, + + btnIcon: { + finish: 'fa fa-cloud-download' + } + }; + }]); + + // Using bootstrap-ui modal widget + module.constant('launchInstanceWizardModalSpec', { + backdrop: 'static', + controller: 'ModalContainerCtrl', + template: '', + windowClass: 'modal-dialog-wizard' + }); + + module.controller('LaunchInstanceWizardCtrl', [ + '$scope', + '$q', // temporary, should call api access services + 'launchInstanceWorkflow', + LaunchInstanceWizardCtrl + ]); + + module.controller('LaunchInstanceModalCtrl', [ + '$scope', + '$modal', + 'launchInstanceWizardModalSpec', + LaunchInstanceModalCtrl + ]); + + function LaunchInstanceWizardCtrl($scope, $q, launchInstanceWorkflow) { + $scope.workflow = launchInstanceWorkflow; + $scope.model = { + source: {}, + flavor: {}, + network: {}, + accessAndSecurity: {}, + postCreation: {} + }; + $scope.submit = function () { + return $q(function (resolve) { + // + // emulating server side process + // + setTimeout(function () { + resolve(); + }, 1000); + }); + }; + } + + function LaunchInstanceModalCtrl($scope, $modal, modalSpec) { + $scope.openLaunchInstanceWizard = function () { + $modal.open(modalSpec); + }; + } + +})(); diff --git a/openstack_dashboard/static/dashboard/launch-instance/launch-instance.scss b/openstack_dashboard/static/dashboard/launch-instance/launch-instance.scss new file mode 100644 index 0000000000..1e5ad2ed18 --- /dev/null +++ b/openstack_dashboard/static/dashboard/launch-instance/launch-instance.scss @@ -0,0 +1,5 @@ +@import "source/source"; +@import "flavor/flavor"; +@import "network/network"; +@import "access-and-security/access-and-security"; +@import "post-creation/post-creation"; diff --git a/openstack_dashboard/static/dashboard/launch-instance/launch-instance.spec.js b/openstack_dashboard/static/dashboard/launch-instance/launch-instance.spec.js new file mode 100644 index 0000000000..2c4b787fc8 --- /dev/null +++ b/openstack_dashboard/static/dashboard/launch-instance/launch-instance.spec.js @@ -0,0 +1,2 @@ +/* jshint globalstrict: true */ +'use strict'; diff --git a/openstack_dashboard/static/dashboard/launch-instance/network/network.help.html b/openstack_dashboard/static/dashboard/launch-instance/network/network.help.html new file mode 100644 index 0000000000..10d8ea282f --- /dev/null +++ b/openstack_dashboard/static/dashboard/launch-instance/network/network.help.html @@ -0,0 +1,4 @@ +
+

{$ title $}

+

+
diff --git a/openstack_dashboard/static/dashboard/launch-instance/network/network.html b/openstack_dashboard/static/dashboard/launch-instance/network/network.html new file mode 100644 index 0000000000..b1becf6cd7 --- /dev/null +++ b/openstack_dashboard/static/dashboard/launch-instance/network/network.html @@ -0,0 +1,3 @@ +
+

{$ title $}

+
diff --git a/openstack_dashboard/static/dashboard/launch-instance/network/network.js b/openstack_dashboard/static/dashboard/launch-instance/network/network.js new file mode 100644 index 0000000000..56dc94e996 --- /dev/null +++ b/openstack_dashboard/static/dashboard/launch-instance/network/network.js @@ -0,0 +1,24 @@ +(function () { + 'use strict'; + + var module = angular.module('hz.dashboard.launch-instance'); + + module.controller('LaunchInstanceNetworkCtrl', [ + '$scope', + LaunchInstanceNetworkCtrl + ]); + + module.controller('LaunchInstanceNetworkHelpCtrl', [ + '$scope', + LaunchInstanceNetworkHelpCtrl + ]); + + function LaunchInstanceNetworkCtrl($scope) { + $scope.title = gettext('Network'); + } + + function LaunchInstanceNetworkHelpCtrl($scope) { + $scope.title = gettext('Network Help'); + } + +})(); diff --git a/openstack_dashboard/static/dashboard/launch-instance/network/network.scss b/openstack_dashboard/static/dashboard/launch-instance/network/network.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/openstack_dashboard/static/dashboard/launch-instance/network/network.spec.js b/openstack_dashboard/static/dashboard/launch-instance/network/network.spec.js new file mode 100644 index 0000000000..2c4b787fc8 --- /dev/null +++ b/openstack_dashboard/static/dashboard/launch-instance/network/network.spec.js @@ -0,0 +1,2 @@ +/* jshint globalstrict: true */ +'use strict'; diff --git a/openstack_dashboard/static/dashboard/launch-instance/post-creation/post-creation.help.html b/openstack_dashboard/static/dashboard/launch-instance/post-creation/post-creation.help.html new file mode 100644 index 0000000000..ec0667389a --- /dev/null +++ b/openstack_dashboard/static/dashboard/launch-instance/post-creation/post-creation.help.html @@ -0,0 +1,4 @@ +
+

{$ title $}

+

+
diff --git a/openstack_dashboard/static/dashboard/launch-instance/post-creation/post-creation.html b/openstack_dashboard/static/dashboard/launch-instance/post-creation/post-creation.html new file mode 100644 index 0000000000..49051aea67 --- /dev/null +++ b/openstack_dashboard/static/dashboard/launch-instance/post-creation/post-creation.html @@ -0,0 +1,3 @@ +
+

{$ title $}

+
diff --git a/openstack_dashboard/static/dashboard/launch-instance/post-creation/post-creation.js b/openstack_dashboard/static/dashboard/launch-instance/post-creation/post-creation.js new file mode 100644 index 0000000000..37d22e89ce --- /dev/null +++ b/openstack_dashboard/static/dashboard/launch-instance/post-creation/post-creation.js @@ -0,0 +1,23 @@ +(function () { + 'use strict'; + + var module = angular.module('hz.dashboard.launch-instance'); + + module.controller('LaunchInstancePostCreationCtrl', [ + '$scope', + LaunchInstancePostCreationCtrl + ]); + module.controller('LaunchInstancePostCreationHelpCtrl', [ + '$scope', + LaunchInstancePostCreationHelpCtrl + ]); + + function LaunchInstancePostCreationCtrl($scope) { + $scope.title = gettext('Post Creation'); + } + + function LaunchInstancePostCreationHelpCtrl($scope) { + $scope.title = gettext('Post Creation Help'); + } + +})(); diff --git a/openstack_dashboard/static/dashboard/launch-instance/post-creation/post-creation.scss b/openstack_dashboard/static/dashboard/launch-instance/post-creation/post-creation.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/openstack_dashboard/static/dashboard/launch-instance/post-creation/post-creation.spec.js b/openstack_dashboard/static/dashboard/launch-instance/post-creation/post-creation.spec.js new file mode 100644 index 0000000000..2c4b787fc8 --- /dev/null +++ b/openstack_dashboard/static/dashboard/launch-instance/post-creation/post-creation.spec.js @@ -0,0 +1,2 @@ +/* jshint globalstrict: true */ +'use strict'; diff --git a/openstack_dashboard/static/dashboard/launch-instance/source/source.help.html b/openstack_dashboard/static/dashboard/launch-instance/source/source.help.html new file mode 100644 index 0000000000..19662be404 --- /dev/null +++ b/openstack_dashboard/static/dashboard/launch-instance/source/source.help.html @@ -0,0 +1,4 @@ +
+

{$ title $}

+

+
diff --git a/openstack_dashboard/static/dashboard/launch-instance/source/source.html b/openstack_dashboard/static/dashboard/launch-instance/source/source.html new file mode 100644 index 0000000000..35b4bf515e --- /dev/null +++ b/openstack_dashboard/static/dashboard/launch-instance/source/source.html @@ -0,0 +1,3 @@ +
+

{$ title $}

+
diff --git a/openstack_dashboard/static/dashboard/launch-instance/source/source.js b/openstack_dashboard/static/dashboard/launch-instance/source/source.js new file mode 100644 index 0000000000..bf6c67994c --- /dev/null +++ b/openstack_dashboard/static/dashboard/launch-instance/source/source.js @@ -0,0 +1,24 @@ +(function () { + 'use strict'; + + var module = angular.module('hz.dashboard.launch-instance'); + + module.controller('LaunchInstanceSourceCtrl', [ + '$scope', + LaunchInstanceSourceCtrl + ]); + + module.controller('LaunchInstanceSourceHelpCtrl', [ + '$scope', + LaunchInstanceSourceHelpCtrl + ]); + + function LaunchInstanceSourceCtrl($scope) { + $scope.title = gettext('Instance Details'); + } + + function LaunchInstanceSourceHelpCtrl($scope) { + $scope.title = gettext('Instance Details Help'); + } + +})(); diff --git a/openstack_dashboard/static/dashboard/launch-instance/source/source.scss b/openstack_dashboard/static/dashboard/launch-instance/source/source.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/openstack_dashboard/static/dashboard/launch-instance/source/source.spec.js b/openstack_dashboard/static/dashboard/launch-instance/source/source.spec.js new file mode 100644 index 0000000000..2c4b787fc8 --- /dev/null +++ b/openstack_dashboard/static/dashboard/launch-instance/source/source.spec.js @@ -0,0 +1,2 @@ +/* jshint globalstrict: true */ +'use strict'; diff --git a/openstack_dashboard/templates/_stylesheets.html b/openstack_dashboard/templates/_stylesheets.html index 1afbe9deba..ecca27a79c 100644 --- a/openstack_dashboard/templates/_stylesheets.html +++ b/openstack_dashboard/templates/_stylesheets.html @@ -1,7 +1,18 @@ +{% comment %} +We want to have separate compressed css files for horizon.scss and dashboard.scss. +The reason for it is based on the fact that IE9 has a limit on the number of css rules +that can be parsed in a single css file. The limit is 4095 = (4k - 1). This causes some +css rules getting cut off if one css file to get more than 4k rules inside. +{% endcomment %} + {% load compress %} {% compress css %} {% endcompress %} +{% compress css %} + +{% endcompress %} + diff --git a/run_tests.sh b/run_tests.sh index 7393420518..7ffc73f01e 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -158,6 +158,7 @@ function run_jshint { jshint horizon/static/horizon/js jshint horizon/static/horizon/tests jshint horizon/static/angular/ + jshint openstack_dashboard/static/dashboard/ } function warn_on_flake8_without_venv {