Launch Instance Step - Configuration
This is one step in launch instance wizard work flow. Partially Implements: blueprint launch-instance-redesign Change-Id: Idbe4f55e7924b5aed751b1e022f4679179700b7e
This commit is contained in:
parent
61e4d5988b
commit
a3ba13bd60
@ -33,7 +33,7 @@ ADD_JS_FILES = [
|
||||
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',
|
||||
LAUNCH_INST + 'configuration/configuration.js',
|
||||
]
|
||||
|
||||
ADD_JS_SPEC_FILES = [
|
||||
@ -44,5 +44,5 @@ ADD_JS_SPEC_FILES = [
|
||||
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',
|
||||
LAUNCH_INST + 'configuration/configuration.spec.js',
|
||||
]
|
||||
|
@ -0,0 +1,4 @@
|
||||
<div ng-controller="LaunchInstanceConfigurationHelpCtrl">
|
||||
<h1>{$ title $}</h1>
|
||||
<p></p>
|
||||
</div>
|
@ -0,0 +1,57 @@
|
||||
<div ng-controller="LaunchInstanceConfigurationCtrl">
|
||||
<h1 clasa="title">{$ ::label.title $}</h1>
|
||||
|
||||
<div class="content">
|
||||
<div class="subtitle">{$ ::label.subtitle $}</div>
|
||||
|
||||
<div class="form-group customization-script-source">
|
||||
<label for="launch-instance-customization-script-source">
|
||||
{$ ::label.customizationScriptSource $}
|
||||
</label>
|
||||
<select class="form-control"
|
||||
id="launch-instance-customization-script-source"
|
||||
ng-model="model.newInstanceSpec.script_source"
|
||||
ng-options="option.value as option.text for option in scriptSourceOptions">
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group customization-script"
|
||||
ng-show="model.newInstanceSpec.script_source === scriptSourceOptions[1].value">
|
||||
<label for="launch-instance-customization-script">
|
||||
{$ ::label.customizationScript $}</label>
|
||||
<textarea class="form-control"
|
||||
id="launch-instance-customization-script"
|
||||
ng-model="model.newInstanceSpec.user_data">
|
||||
</textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group script-file"
|
||||
ng-show="model.newInstanceSpec.script_source === scriptSourceOptions[2].value">
|
||||
<label for="launch-instance_script_upload">
|
||||
{$ ::label.scriptFile $}
|
||||
</label>
|
||||
<input id="launch-instance_script_upload"
|
||||
ng-model="model.newInstanceSpec.script_upload"
|
||||
type="file">
|
||||
</div>
|
||||
|
||||
<div class="checkbox customization-script-source">
|
||||
<label>
|
||||
<input type="checkbox"
|
||||
ng-model="model.newInstanceSpec.config_drive">
|
||||
{$ ::label.configurationDrive $}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group disk-partition">
|
||||
<label for="launch-instance-disk-partition">
|
||||
{$ ::label.diskPartition $}
|
||||
</label>
|
||||
<select class="form-control"
|
||||
id="launch-instance-disk-partition"
|
||||
ng-model="model.newInstanceSpec.disk_config"
|
||||
ng-options="option.value as option.text for option in diskConfigOptions">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,47 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
var module = angular.module('hz.dashboard.launch-instance');
|
||||
|
||||
module.controller('LaunchInstanceConfigurationCtrl', [
|
||||
'$scope',
|
||||
LaunchInstanceConfigurationCtrl
|
||||
]);
|
||||
|
||||
module.controller('LaunchInstanceConfigurationHelpCtrl', [
|
||||
'$scope',
|
||||
LaunchInstanceConfigurationHelpCtrl
|
||||
]);
|
||||
|
||||
function LaunchInstanceConfigurationCtrl($scope) {
|
||||
$scope.label = {
|
||||
title: gettext('Configuration'),
|
||||
subtitle: gettext(''),
|
||||
customizationScriptSource: gettext('Customization Script Source'),
|
||||
customizationScript: gettext('Customization Script'),
|
||||
configurationDrive: gettext('Configuration Drive'),
|
||||
diskPartition: gettext('Disk Partition'),
|
||||
scriptFile: gettext('Script File')
|
||||
};
|
||||
|
||||
$scope.scriptSourceOptions = [
|
||||
{ value: 'selected', text: gettext('Select Script Source') },
|
||||
{ value: 'raw', text: gettext('Direct Input') },
|
||||
{ value: 'file', text: gettext('File') }
|
||||
];
|
||||
|
||||
$scope.model.newInstanceSpec.script_source = $scope.scriptSourceOptions[0].value;
|
||||
|
||||
$scope.diskConfigOptions = [
|
||||
{ value: 'AUTO', text: gettext('Automatic') },
|
||||
{ value: 'MANUAL', text: gettext('Manual') }
|
||||
];
|
||||
|
||||
$scope.model.newInstanceSpec.disk_config = $scope.diskConfigOptions[0].value;
|
||||
}
|
||||
|
||||
function LaunchInstanceConfigurationHelpCtrl($scope) {
|
||||
$scope.title = gettext('Configuration Help');
|
||||
}
|
||||
|
||||
})();
|
@ -0,0 +1,13 @@
|
||||
[ng-controller="LaunchInstanceConfigurationCtrl"] {
|
||||
|
||||
.customization-script-source select,
|
||||
.disk-partition select {
|
||||
width: 250px;
|
||||
}
|
||||
|
||||
.customization-script textarea {
|
||||
width: 480px;
|
||||
height: 280px;
|
||||
font-family: Menlo, Monaco, Consolas, 'Courier New';
|
||||
}
|
||||
}
|
@ -34,10 +34,10 @@
|
||||
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'
|
||||
title: gettext('Configuration'),
|
||||
templateUrl: path + 'launch-instance/configuration/configuration.html',
|
||||
helpUrl: path + 'launch-instance/configuration/configuration.help.html',
|
||||
formName: 'launchInstanceConfigurationForm'
|
||||
}
|
||||
],
|
||||
|
||||
|
@ -2,4 +2,4 @@
|
||||
@import "flavor/flavor";
|
||||
@import "network/network";
|
||||
@import "access-and-security/access-and-security";
|
||||
@import "post-creation/post-creation";
|
||||
@import "configuration/configuration";
|
||||
|
@ -1,4 +0,0 @@
|
||||
<div ng-controller="LaunchInstancePostCreationHelpCtrl">
|
||||
<h1>{$ title $}</h1>
|
||||
<p></p>
|
||||
</div>
|
@ -1,3 +0,0 @@
|
||||
<div ng-controller="LaunchInstancePostCreationCtrl">
|
||||
<h1>{$ title $}</h1>
|
||||
</div>
|
@ -1,23 +0,0 @@
|
||||
(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');
|
||||
}
|
||||
|
||||
})();
|
@ -25,7 +25,7 @@ class ServicesTests(test.JasmineTests):
|
||||
LAUNCH_INST + "/launch-instance.js",
|
||||
LAUNCH_INST + "/launch-instance.model.js",
|
||||
LAUNCH_INST + "/access-and-security/access-and-security.js",
|
||||
LAUNCH_INST + "/post-creation/post-creation.js",
|
||||
LAUNCH_INST + "/configuration/configuration.js",
|
||||
LAUNCH_INST + "/flavor/flavor.js",
|
||||
LAUNCH_INST + "/network/network.js",
|
||||
LAUNCH_INST + "/source/source.js",
|
||||
@ -35,7 +35,7 @@ class ServicesTests(test.JasmineTests):
|
||||
LAUNCH_INST + "/launch-instance.spec.js",
|
||||
LAUNCH_INST + "/launch-instance.model.spec.js",
|
||||
LAUNCH_INST + "/access-and-security/access-and-security.spec.js",
|
||||
LAUNCH_INST + "/post-creation/post-creation.spec.js",
|
||||
LAUNCH_INST + "/configuration/configuration.spec.js",
|
||||
LAUNCH_INST + "/flavor/flavor.spec.js",
|
||||
LAUNCH_INST + "/network/network.spec.js",
|
||||
LAUNCH_INST + "/source/source.spec.js",
|
||||
|
Loading…
x
Reference in New Issue
Block a user