diff --git a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/keypair/import-keypair-help.controller.js b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/keypair/import-keypair-help.controller.js
deleted file mode 100644
index 23f8b92717..0000000000
--- a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/keypair/import-keypair-help.controller.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * (c) 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.
- */
-
-(function () {
- 'use strict';
-
- angular
- .module('horizon.dashboard.project.workflow.launch-instance')
- .controller('LaunchInstanceImportKeyPairHelpController',
- LaunchInstanceImportKeyPairHelpController);
-
- /**
- * @ngdoc controller
- * @name LaunchInstanceImportKeyPairHelpController
- * @description
- * The `LaunchInstanceImportKeyPairHelpController` controller provides help text
- * for the import key pair function within the Launch Instance Wizard.
- *
- */
- function LaunchInstanceImportKeyPairHelpController() {
- var ctrl = this;
-
- ctrl.title = gettext('Import Key Pair Help');
-
- var genKeyPairsMap = { genKeyPairCmd: 'ssh-keygen' };
- var keyPathsMap = { privateKeyPath: 'cloud.key', publicKeyPath: 'cloud.key.pub' };
- var windowsCmdMap = { authorizeKeysFile: '.ssh/authorized_keys' };
-
- /*eslint-disable max-len */
- var genKeyPairsText = gettext('There are two ways to generate a key pair. From a Linux system, generate the key pair with the %(genKeyPairCmd)s command:');
- var keyPathText = gettext('This command generates a pair of keys: a private key (%(privateKeyPath)s) and a public key (%(publicKeyPath)s).');
- var windowsCmd = gettext('From a Windows system, you can use PuTTYGen to create private/public keys. Use the PuTTY Key Generator to create and save the keys, then copy the public key in the red highlighted box to your %(authorizeKeysFile)s file.');
- /*eslint-enable max-len */
-
- ctrl.paragraphs = [
- interpolate(genKeyPairsText, genKeyPairsMap, true),
- 'ssh-keygen -t rsa -f cloud.key',
- interpolate(keyPathText, keyPathsMap, true),
- interpolate(windowsCmd, windowsCmdMap, true)
- ];
- }
-
-})();
diff --git a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/keypair/import-keypair.controller.js b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/keypair/import-keypair.controller.js
index 784f1ec227..8d2288232d 100644
--- a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/keypair/import-keypair.controller.js
+++ b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/keypair/import-keypair.controller.js
@@ -24,7 +24,8 @@
LaunchInstanceImportKeyPairController.$inject = [
'$modalInstance',
'horizon.app.core.openstack-service-api.nova',
- 'horizon.framework.widgets.toast.service'
+ 'horizon.framework.widgets.toast.service',
+ 'horizon.dashboard.project.workflow.launch-instance.basePath'
];
/**
@@ -33,26 +34,13 @@
* @description
* Provide a dialog for import of an existing ssh public key.
*/
- function LaunchInstanceImportKeyPairController($modalInstance, novaAPI, toastService) {
+ function LaunchInstanceImportKeyPairController($modalInstance, novaAPI, toastService, basePath) {
var ctrl = this;
ctrl.submit = submit;
ctrl.cancel = cancel;
-
- ctrl.labels = {
- wizardTitle: gettext('Launch Instance'),
- title: gettext('Import Key Pair'),
- /*eslint-disable max-len */
- help: gettext('Key Pairs are how you login to your instance after it is launched. Choose a key pair name you will recognize and paste your SSH public key into the space provided.'),
- /*eslint-enable max-len */
- keyPairName: gettext('Key Pair Name'),
- publicKey: gettext('Public Key'),
- cancel: gettext('Cancel'),
- ok: gettext('Import Key Pair'),
- required: gettext('Required')
- };
-
ctrl.model = { name: '', public_key: '' };
+ ctrl.path = basePath + 'keypair/';
//////////
diff --git a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/keypair/import-keypair.html b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/keypair/import-keypair.html
index 535cd6388f..2c9a7b9228 100644
--- a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/keypair/import-keypair.html
+++ b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/keypair/import-keypair.html
@@ -1,23 +1,27 @@
-
+
Launch Instance
-
{$ ::ctrl.labels.title $}
+
Import Key Pair
-
{$ ::ctrl.labels.help $}
+
+ Key Pairs are how you login to your instance after it is launched.
+ Choose a key pair name you will recognize and paste your SSH public key into the
+ space provided.
+
diff --git a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/keypair/keypair-help.controller.js b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/keypair/keypair-help.controller.js
deleted file mode 100644
index abe51e137e..0000000000
--- a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/keypair/keypair-help.controller.js
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * (c) 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.
- */
-
-(function () {
- 'use strict';
-
- angular
- .module('horizon.dashboard.project.workflow.launch-instance')
- .controller('LaunchInstanceKeypairHelpController', LaunchInstanceKeypairHelpController);
-
- /**
- * @ngdoc controller
- * @name horizon.dashboard.project.workflow.launch-instance.LaunchInstanceKeypairHelpController
- * @description
- * Provide help for selection of a key pair.
- */
- function LaunchInstanceKeypairHelpController() {
- var ctrl = this;
-
- ctrl.title = gettext('Key Pair Help');
-
- var genKeyPairsMap = {genKeyPairCmd: 'ssh-keygen'};
- var keyPathsMap = {
- privateKeyPath: 'cloud.key',
- publicKeyPath: 'cloud.key.pub'
- };
- var windowsCmdMap = {authorizeKeysFile: '.ssh/authorized_keys'};
-
- /*eslint-disable max-len */
- var genKeyPairsText = gettext('There are two ways to generate a key pair. From a Linux system, generate the key pair with the %(genKeyPairCmd)s command:');
-
- var keyPathText = gettext('This command generates a pair of keys: a private key (%(privateKeyPath)s) and a public key (%(publicKeyPath)s).');
-
- var windowsCmd = gettext('From a Windows system, you can use PuTTYGen to create private/public keys. Use the PuTTY Key Generator to create and save the keys, then copy the public key in the red highlighted box to your %(authorizeKeysFile)s file.');
- /*eslint-enable max-len */
-
- ctrl.paragraphs = [
- gettext('The key pair allows you to SSH into the instance.'),
- interpolate(genKeyPairsText, genKeyPairsMap, true),
- 'ssh-keygen -t rsa -f cloud.key',
- interpolate(keyPathText, keyPathsMap, true),
- interpolate(windowsCmd, windowsCmdMap, true)
- ];
- }
-
-})();
diff --git a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/keypair/keypair.controller.js b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/keypair/keypair.controller.js
index 19c1f85f4a..5a5e112c32 100644
--- a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/keypair/keypair.controller.js
+++ b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/keypair/keypair.controller.js
@@ -40,22 +40,6 @@
ctrl.createKeyPair = createKeyPair;
ctrl.importKeyPair = importKeyPair;
- ctrl.label = {
- title: gettext('Key Pair'),
- /*eslint-disable max-len */
- subtitle: gettext('A key pair allows you to SSH into your newly created instance. You may select an existing key pair, import a key pair, or generate a new key pair.'),
- /*eslint-enable max-len */
- name: gettext('Name'),
- description: gettext('Description'),
- createKeyPair: gettext('Create Key Pair'),
- importKeyPair: gettext('Import Key Pair')
- };
-
- ctrl.tableLabels = {
- fingerprint: gettext('Fingerprint'),
- public_key: gettext('Public Key')
- };
-
ctrl.tableData = {
available: launchInstanceModel.keypairs,
allocated: launchInstanceModel.newInstanceSpec.key_pair,
@@ -65,10 +49,6 @@
ctrl.tableDetails = basePath + 'keypair/keypair-details.html';
- ctrl.tableHelp = {
- noneAllocText: gettext('Select a key pair from the available key pairs below.')
- };
-
ctrl.tableLimits = {
maxAllocation: 1
};
diff --git a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/keypair/keypair.help.html b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/keypair/keypair.help.html
index 21dfe6c079..21d1296207 100644
--- a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/keypair/keypair.help.html
+++ b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/keypair/keypair.help.html
@@ -1,5 +1,18 @@
-
-
{$ ::helpCtrl.title $}
-
-
+
Key Pair Help
+
+ There are two ways to generate a key pair. From a Linux system,
+ generate the key pair with the ssh-keygen command:
+
+
+ ssh-keygen -t rsa -f cloud.key
+
+
+ This command generates a pair of keys: a private key (cloud.key)
+ and a public key (cloud.key.pub).
+
+
+ From a Windows system, you can use PuTTYGen to create private/public keys.
+ Use the PuTTY Key Generator to create and save the keys, then copy
+ the public key in the red highlighted box to your .ssh/authorized_keys
+ file.
+
+ A key pair allows you to SSH into your newly created instance.
+ You may select an existing key pair, import a key pair, or generate a new key pair.
+
@@ -31,16 +33,16 @@
-
{$ ::ctrl.label.name $}
-
{$ ::ctrl.tableLabels.fingerprint $}
+
Name
+
Fingerprint
-
- {$ ::trCtrl.helpText.noneAllocText $}
+
+ Select a key pair from the available key pairs below.
@@ -85,8 +87,8 @@
-
{$ ::ctrl.label.name $}
-
{$ ::ctrl.tableLabels.fingerprint $}
+
Name
+
Fingerprint
diff --git a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/keypair/keypair.spec.js b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/keypair/keypair.spec.js
index 48954f394a..0d41f413c5 100644
--- a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/keypair/keypair.spec.js
+++ b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/keypair/keypair.spec.js
@@ -39,11 +39,6 @@
{ launchInstanceModel: model });
}));
- it('contains its general labels', function() {
- expect(ctrl.label).toBeDefined();
- expect(Object.keys(ctrl.label).length).toBeGreaterThan(0);
- });
-
it('contains its table labels', function() {
expect(ctrl.tableData).toBeDefined();
expect(Object.keys(ctrl.tableData).length).toBeGreaterThan(0);
@@ -62,12 +57,6 @@
expect(ctrl.tableDetails).toBeDefined();
});
- it('defines table help', function() {
- expect(ctrl.tableHelp).toBeDefined();
- expect(Object.keys(ctrl.tableHelp).length).toBe(1);
- expect(ctrl.tableHelp.noneAllocText).toBeDefined();
- });
-
it('allows allocation of only one', function() {
expect(ctrl.tableLimits).toBeDefined();
expect(Object.keys(ctrl.tableLimits).length).toBe(1);
@@ -76,25 +65,6 @@
});
- describe('LaunchInstanceKeypairHelpController', function() {
- var ctrl;
-
- beforeEach(module('horizon.dashboard.project.workflow.launch-instance'));
-
- beforeEach(inject(function($controller) {
- ctrl = $controller('LaunchInstanceKeypairHelpController');
- }));
-
- it('defines the title', function() {
- expect(ctrl.title).toBeDefined();
- });
-
- it('has paragraphs', function() {
- expect(ctrl.paragraphs).toBeDefined();
- expect(ctrl.paragraphs.length).toBeGreaterThan(0);
- });
- });
-
describe('LaunchInstanceCreateKeyPairController', function() {
var ctrl;
@@ -110,10 +80,6 @@
ctrl = $controller('LaunchInstanceCreateKeyPairController');
}));
- it('contains its general labels', function() {
- expect(ctrl.labels).toBeDefined();
- });
-
it('defines a model with a empty name', function() {
expect(ctrl.model).toBeDefined();
expect(ctrl.model.name).toBe('');
@@ -141,10 +107,6 @@
ctrl = $controller('LaunchInstanceNewKeyPairController', { keypair: {} });
}));
- it('contains its general labels', function() {
- expect(ctrl.labels).toBeDefined();
- });
-
it('defines an empty keypair', function() {
expect(ctrl.keypair).toBeDefined();
});
@@ -169,10 +131,6 @@
ctrl = $controller('LaunchInstanceImportKeyPairController');
}));
- it('contains its general labels', function() {
- expect(ctrl.labels).toBeDefined();
- });
-
it('defines a model with a empty name and public key', function() {
expect(ctrl.model).toBeDefined();
expect(ctrl.model.name).toBe('');
@@ -187,26 +145,6 @@
expect(ctrl.cancel).toBeDefined();
});
});
-
- describe('LaunchInstanceImportKeyPairHelpController', function() {
- var ctrl;
-
- beforeEach(module('horizon.dashboard.project.workflow.launch-instance'));
-
- beforeEach(inject(function($controller) {
- ctrl = $controller('LaunchInstanceImportKeyPairHelpController');
- }));
-
- it('defines the title', function() {
- expect(ctrl.title).toBeDefined();
- });
-
- it('has paragraphs', function() {
- expect(ctrl.paragraphs).toBeDefined();
- expect(ctrl.paragraphs.length).toBeGreaterThan(0);
- });
- });
-
});
})();
diff --git a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/keypair/new-keypair.controller.js b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/keypair/new-keypair.controller.js
index c3f04bab12..4c4832872e 100644
--- a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/keypair/new-keypair.controller.js
+++ b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/keypair/new-keypair.controller.js
@@ -34,18 +34,6 @@
var ctrl = this;
ctrl.ok = ok;
-
- ctrl.labels = {
- wizardTitle: gettext('Launch Instance'),
- title: gettext('Private Key'),
- help: gettext('This is your new key pair. Copy this information and keep it secure.'),
- keyPairName: gettext('Key Pair Name'),
- fingerprint: gettext('Fingerprint'),
- privateKey: gettext('Private Key'),
- publicKey: gettext('Public Key'),
- ok: gettext('OK')
- };
-
ctrl.keypair = keypair;
//////////
diff --git a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/keypair/new-keypair.html b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/keypair/new-keypair.html
index cd845f7e15..a5519578ac 100644
--- a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/keypair/new-keypair.html
+++ b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/keypair/new-keypair.html
@@ -1,19 +1,21 @@
-
+
Launch Instance
-
{$ ::ctrl.labels.title $}
+
Private Key
-
{$ ::ctrl.labels.help $}
+
+ This is your new key pair. Copy this information and keep it secure.
+