Fix workflow display and markup
This patch aligns the workflow markup with Horizon so that it can correctly inherit styles, works with the theme swap patch, and performs better with accessibility tools. Also noted that "BayModel" and "Bay Model" were used all over. We should settle on the correct term, "Baymodel". Closes-Bug: 1554527 Change-Id: I2cadcfbb338903c379b40ebc4a39d844065fdb12
This commit is contained in:
parent
4dcac4da77
commit
cd7870b3f8
@ -20,4 +20,4 @@ PANEL_GROUP = 'containers'
|
||||
PANEL_DASHBOARD = 'project'
|
||||
|
||||
# Python panel class of the PANEL to be added.
|
||||
ADD_PANEL = 'magnum_ui.content.baymodels.panel.BayModels'
|
||||
ADD_PANEL = 'magnum_ui.content.baymodels.panel.Baymodels'
|
||||
|
@ -31,7 +31,7 @@ def change_to_id(obj):
|
||||
|
||||
|
||||
@urls.register
|
||||
class BayModel(generic.View):
|
||||
class Baymodel(generic.View):
|
||||
"""API for retrieving a single baymodel"""
|
||||
url_regex = r'containers/baymodels/(?P<baymodel_id>[^/]+)$'
|
||||
|
||||
@ -42,23 +42,23 @@ class BayModel(generic.View):
|
||||
|
||||
|
||||
@urls.register
|
||||
class BayModels(generic.View):
|
||||
"""API for Magnum BayModels"""
|
||||
class Baymodels(generic.View):
|
||||
"""API for Magnum Baymodels"""
|
||||
url_regex = r'containers/baymodels/$'
|
||||
|
||||
@rest_utils.ajax()
|
||||
def get(self, request):
|
||||
"""Get a list of the BayModels for a project.
|
||||
"""Get a list of the Baymodels for a project.
|
||||
|
||||
The returned result is an object with property 'items' and each
|
||||
item under this is a BayModel.
|
||||
item under this is a Baymodel.
|
||||
"""
|
||||
result = magnum.baymodel_list(request)
|
||||
return {'items': [change_to_id(n.to_dict()) for n in result]}
|
||||
|
||||
@rest_utils.ajax(data_required=True)
|
||||
def delete(self, request):
|
||||
"""Delete one or more BayModels by id.
|
||||
"""Delete one or more Baymodels by id.
|
||||
|
||||
Returns HTTP 204 (no content) on successful deletion.
|
||||
"""
|
||||
@ -67,9 +67,9 @@ class BayModels(generic.View):
|
||||
|
||||
@rest_utils.ajax(data_required=True)
|
||||
def post(self, request):
|
||||
"""Create a new BayModel.
|
||||
"""Create a new Baymodel.
|
||||
|
||||
Returns the new BayModel object on success.
|
||||
Returns the new Baymodel object on success.
|
||||
"""
|
||||
new_baymodel = magnum.baymodel_create(request, **request.DATA)
|
||||
return rest_utils.CreatedResponse(
|
||||
|
@ -16,6 +16,6 @@ from django.utils.translation import ugettext_lazy as _
|
||||
import horizon
|
||||
|
||||
|
||||
class BayModels(horizon.Panel):
|
||||
name = _("Bay Models")
|
||||
class Baymodels(horizon.Panel):
|
||||
name = _("Baymodels")
|
||||
slug = "baymodels"
|
||||
|
@ -23,9 +23,9 @@
|
||||
* Provides all of the actions for baymodels.
|
||||
*/
|
||||
angular.module('horizon.dashboard.containers.baymodels.actions', ['horizon.framework', 'horizon.dashboard.containers'])
|
||||
.run(registerBayModelActions);
|
||||
.run(registerBaymodelActions);
|
||||
|
||||
registerBayModelActions.$inject = [
|
||||
registerBaymodelActions.$inject = [
|
||||
'horizon.framework.conf.resource-type-registry.service',
|
||||
'horizon.framework.util.i18n.gettext',
|
||||
'horizon.dashboard.containers.baymodels.create.service',
|
||||
@ -34,11 +34,11 @@
|
||||
'horizon.dashboard.containers.baymodels.resourceType',
|
||||
];
|
||||
|
||||
function registerBayModelActions(
|
||||
function registerBaymodelActions(
|
||||
registry,
|
||||
gettext,
|
||||
createBayModelService,
|
||||
deleteBayModelService,
|
||||
createBaymodelService,
|
||||
deleteBaymodelService,
|
||||
createBayService,
|
||||
resourceType)
|
||||
{
|
||||
@ -52,29 +52,29 @@
|
||||
}
|
||||
})
|
||||
.append({
|
||||
id: 'deleteBayModelAction',
|
||||
service: deleteBayModelService,
|
||||
id: 'deleteBaymodelAction',
|
||||
service: deleteBaymodelService,
|
||||
template: {
|
||||
type: 'delete',
|
||||
text: gettext('Delete BayModel')
|
||||
text: gettext('Delete Baymodel')
|
||||
}
|
||||
});
|
||||
|
||||
baymodelResourceType.batchActions
|
||||
.append({
|
||||
id: 'createBayModelAction',
|
||||
service: createBayModelService,
|
||||
id: 'createBaymodelAction',
|
||||
service: createBaymodelService,
|
||||
template: {
|
||||
type: 'create',
|
||||
text: gettext('Create BayModel')
|
||||
text: gettext('Create Baymodel')
|
||||
}
|
||||
})
|
||||
.append({
|
||||
id: 'batchDeleteBayModelAction',
|
||||
service: deleteBayModelService,
|
||||
id: 'batchDeleteBaymodelAction',
|
||||
service: deleteBaymodelService,
|
||||
template: {
|
||||
type: 'delete-selected',
|
||||
text: gettext('Delete BayModels')
|
||||
text: gettext('Delete Baymodels')
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -29,7 +29,7 @@
|
||||
angular
|
||||
.module('horizon.dashboard.containers.baymodels', ['horizon.dashboard.containers.baymodels.actions'])
|
||||
.constant('horizon.dashboard.containers.baymodels.events', events())
|
||||
.constant('horizon.dashboard.containers.baymodels.resourceType', 'OS::Magnum::BayModel');
|
||||
.constant('horizon.dashboard.containers.baymodels.resourceType', 'OS::Magnum::Baymodel');
|
||||
|
||||
/**
|
||||
* @ngdoc constant
|
||||
|
@ -27,15 +27,15 @@
|
||||
|
||||
function baymodelModel(magnum) {
|
||||
var model = {
|
||||
newBayModelSpec: {},
|
||||
newBaymodelSpec: {},
|
||||
|
||||
// API methods
|
||||
init: init,
|
||||
createBayModel: createBayModel
|
||||
createBaymodel: createBaymodel
|
||||
};
|
||||
|
||||
function initNewBayModelSpec() {
|
||||
model.newBayModelSpec = {
|
||||
function initNewBaymodelSpec() {
|
||||
model.newBaymodelSpec = {
|
||||
name: null,
|
||||
coe: "",
|
||||
public: null,
|
||||
@ -64,16 +64,16 @@
|
||||
}
|
||||
|
||||
function init() {
|
||||
// Reset the new BayModel spec
|
||||
initNewBayModelSpec();
|
||||
// Reset the new Baymodel spec
|
||||
initNewBaymodelSpec();
|
||||
}
|
||||
|
||||
function createBayModel() {
|
||||
var finalSpec = angular.copy(model.newBayModelSpec);
|
||||
function createBaymodel() {
|
||||
var finalSpec = angular.copy(model.newBaymodelSpec);
|
||||
|
||||
cleanNullProperties(finalSpec);
|
||||
|
||||
return magnum.createBayModel(finalSpec);
|
||||
return magnum.createBaymodel(finalSpec);
|
||||
}
|
||||
|
||||
function cleanNullProperties(finalSpec) {
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
function baymodelWorkflow(basePath, dashboardWorkflow, gettext) {
|
||||
return dashboardWorkflow({
|
||||
title: gettext('Create Bay Model'),
|
||||
title: gettext('Create Baymodel'),
|
||||
|
||||
steps: [
|
||||
{
|
||||
@ -63,7 +63,7 @@
|
||||
},
|
||||
|
||||
btnIcon: {
|
||||
finish: 'fa fa-cloud-download'
|
||||
finish: 'fa fa-check'
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -43,7 +43,7 @@
|
||||
|
||||
var scope;
|
||||
var message = {
|
||||
success: gettext('BayModel %s was successfully created.')
|
||||
success: gettext('Baymodel %s was successfully created.')
|
||||
};
|
||||
|
||||
var service = {
|
||||
@ -79,7 +79,7 @@
|
||||
}
|
||||
|
||||
function submit(){
|
||||
return model.createBayModel().then(success);
|
||||
return model.createBaymodel().then(success);
|
||||
}
|
||||
|
||||
function success(response) {
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
/**
|
||||
* @ngdoc controller
|
||||
* @name createBayModelInfoController
|
||||
* @name createBaymodelInfoController
|
||||
* @ngController
|
||||
*
|
||||
* @description
|
||||
@ -27,9 +27,9 @@
|
||||
*/
|
||||
angular
|
||||
.module('horizon.dashboard.containers.baymodels')
|
||||
.controller('createBayModelInfoController', createBayModelInfoController);
|
||||
.controller('createBaymodelInfoController', createBaymodelInfoController);
|
||||
|
||||
createBayModelInfoController.$inject = [
|
||||
createBaymodelInfoController.$inject = [
|
||||
'$q',
|
||||
'$scope',
|
||||
'horizon.dashboard.containers.basePath',
|
||||
@ -37,7 +37,7 @@
|
||||
'horizon.framework.util.i18n.gettext'
|
||||
];
|
||||
|
||||
function createBayModelInfoController($q, $scope, basePath, magnum, gettext) {
|
||||
function createBaymodelInfoController($q, $scope, basePath, magnum, gettext) {
|
||||
var ctrl = this;
|
||||
ctrl.coes = [{name: "", label: gettext("Choose a Container Orchestration Engine")},
|
||||
{name: "swarm", label: gettext("Docker Swarm")},
|
||||
@ -64,16 +64,16 @@
|
||||
{name:"rexray", label: gettext("Rexray")}]};
|
||||
|
||||
$scope.changeCoes = function(){
|
||||
if($scope.model.newBayModelSpec.coe){
|
||||
$scope.model.newBayModelSpec.network_drivers = ctrl.supportedNetworkDrivers[$scope.model.newBayModelSpec.coe];
|
||||
$scope.model.newBayModelSpec.network_driver = ctrl.supportedNetworkDrivers[$scope.model.newBayModelSpec.coe][0].name;
|
||||
$scope.model.newBayModelSpec.volume_drivers = ctrl.supportedVolumeDrivers[$scope.model.newBayModelSpec.coe];
|
||||
$scope.model.newBayModelSpec.volume_driver = ctrl.supportedVolumeDrivers[$scope.model.newBayModelSpec.coe][0].name;
|
||||
if($scope.model.newBaymodelSpec.coe){
|
||||
$scope.model.newBaymodelSpec.network_drivers = ctrl.supportedNetworkDrivers[$scope.model.newBaymodelSpec.coe];
|
||||
$scope.model.newBaymodelSpec.network_driver = ctrl.supportedNetworkDrivers[$scope.model.newBaymodelSpec.coe][0].name;
|
||||
$scope.model.newBaymodelSpec.volume_drivers = ctrl.supportedVolumeDrivers[$scope.model.newBaymodelSpec.coe];
|
||||
$scope.model.newBaymodelSpec.volume_driver = ctrl.supportedVolumeDrivers[$scope.model.newBaymodelSpec.coe][0].name;
|
||||
}else{
|
||||
$scope.model.newBayModelSpec.network_drivers = ctrl.supportedNetworkDrivers.initial;
|
||||
$scope.model.newBayModelSpec.network_driver = ctrl.supportedNetworkDrivers.initial[0].name;
|
||||
$scope.model.newBayModelSpec.volume_drivers = ctrl.supportedVolumeDrivers.initial;
|
||||
$scope.model.newBayModelSpec.volume_driver = ctrl.supportedVolumeDrivers.initial[0].name;
|
||||
$scope.model.newBaymodelSpec.network_drivers = ctrl.supportedNetworkDrivers.initial;
|
||||
$scope.model.newBaymodelSpec.network_driver = ctrl.supportedNetworkDrivers.initial[0].name;
|
||||
$scope.model.newBaymodelSpec.volume_drivers = ctrl.supportedVolumeDrivers.initial;
|
||||
$scope.model.newBaymodelSpec.volume_driver = ctrl.supportedVolumeDrivers.initial[0].name;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -1,20 +1,12 @@
|
||||
<div>
|
||||
<h3 translate>Description:</h3>
|
||||
<p translate>Specify Bay Model name and Container Orchestration Engine.</p>
|
||||
<p>
|
||||
<strong translate>COE:</strong>
|
||||
<translate>Specify the Container Orchestration Engine to use.</translate>
|
||||
</p>
|
||||
<p>
|
||||
<strong translate>Public:</strong>
|
||||
<translate>Make baymodel public. Default: False</translate>
|
||||
</p>
|
||||
<p>
|
||||
<strong translate>Registry Enabled:</strong>
|
||||
<translate>Enable docker registry in the Bay. Default: False</translate>
|
||||
</p>
|
||||
<p>
|
||||
<strong translate>TLS Disabled:</strong>
|
||||
<translate>Disable TLS in the Bay. Default: False</translate>
|
||||
</p>
|
||||
</div>
|
||||
<dl>
|
||||
<dt translate>Bay Model Name</dt>
|
||||
<dd translate>An arbitrary human-readable name</dd>
|
||||
<dt translate>Container Orchestration Engine</dt>
|
||||
<dd translate>Specify the Container Orchestration Engine to use.</dd>
|
||||
<dt translate>Public</dt>
|
||||
<dd translate>Make bay model public. Default: False</dd>
|
||||
<dt translate>Enable Registry</dt>
|
||||
<dd translate>Enable docker registry in the Bay. Default: False</dd>
|
||||
<dt translate>Disable TLS</dt>
|
||||
<dd translate>Disable TLS in the Bay. Default: False</dd>
|
||||
</dl>
|
||||
|
@ -1,47 +1,44 @@
|
||||
<div ng-controller="createBayModelInfoController as ctrl">
|
||||
<h1 translate>Bay Model Details</h1>
|
||||
|
||||
<div class="content">
|
||||
<div translate class="subtitle">Please provide the name of the Bay Model.</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="form-field baymodel-name">
|
||||
<label class="on-top" translate>Bay Model Name</label>
|
||||
<input name="baymodel-name" type="text" class="form-control input-sm"
|
||||
ng-model="model.newBayModelSpec.name"
|
||||
placeholder="{$ 'Name of the baymodel to create.'|translate $}">
|
||||
<div ng-controller="createBaymodelInfoController as ctrl">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="baymodel-name" translate>Bay Model Name</label>
|
||||
<input name="baymodel-name" type="text" class="form-control" id="baymodel-name"
|
||||
ng-model="model.newBaymodelSpec.name">
|
||||
</div>
|
||||
<div class="form-field required baymodel-coe">
|
||||
<label class="on-top" translate>COE</label>
|
||||
<select class="form-control" name="baymodel-coe"
|
||||
ng-model="model.newBayModelSpec.coe"
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="baymodel-coe" translate>
|
||||
Container Orchestration Engine
|
||||
<span class="hz-icon-required fa fa-asterisk"></span>
|
||||
</label>
|
||||
<select class="form-control" name="baymodel-coe" id="baymodel-coe"
|
||||
ng-model="model.newBaymodelSpec.coe"
|
||||
ng-required="true"
|
||||
ng-options="coe.name as coe.label for coe in ctrl.coes"
|
||||
ng-change="changeCoes()">
|
||||
</select>
|
||||
</div>
|
||||
<div class="checkbox baymodel-public">
|
||||
<label class="on-top">
|
||||
<input name="baymodel-public" type="checkbox"
|
||||
ng-model="model.newBayModelSpec.public">
|
||||
<translate>Public</translate>
|
||||
</label>
|
||||
<div class="form-group">
|
||||
<div class="themable-checkbox">
|
||||
<input name="baymodel-public" type="checkbox" id="baymodel-public"
|
||||
ng-model="model.newBaymodelSpec.public" translate>
|
||||
<label for="baymodel-public" translate>Public</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="checkbox baymodel-registry-enabled">
|
||||
<label class="on-top">
|
||||
<input name="baymodel-registry-enabled" type="checkbox"
|
||||
ng-model="model.newBayModelSpec.registry_enabled">
|
||||
<translate>Registry Enabled</translate>
|
||||
</label>
|
||||
<div class="form-group">
|
||||
<div class="themable-checkbox">
|
||||
<input name="baymodel-registry-enabled" type="checkbox" id="baymodel-registry-enabled"
|
||||
ng-model="model.newBaymodelSpec.registry_enabled">
|
||||
<label for="baymodel-registry-enabled" translate>Enable Registry</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="checkbox baymodel-tls-disabled">
|
||||
<label class="on-top">
|
||||
<input name="baymodel-tls-disabled" type="checkbox"
|
||||
ng-model="model.newBayModelSpec.tls_disabled">
|
||||
<translate>TLS Disabled</translate>
|
||||
</label>
|
||||
<div class="form-group">
|
||||
<div class="themable-checkbox">
|
||||
<input name="baymodel-tls-disabled" type="checkbox" id="baymodel-tls-disabled"
|
||||
ng-model="model.newBaymodelSpec.tls_disabled" translate>
|
||||
<label for="baymodel-tls-disabled" translate>Disable TLS</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
/**
|
||||
* @ngdoc controller
|
||||
* @name createBayModelLabelsController
|
||||
* @name createBaymodelLabelsController
|
||||
* @ngController
|
||||
*
|
||||
* @description
|
||||
@ -27,16 +27,16 @@
|
||||
*/
|
||||
angular
|
||||
.module('horizon.dashboard.containers.baymodels')
|
||||
.controller('createBayModelLabelsController', createBayModelLabelsController);
|
||||
.controller('createBaymodelLabelsController', createBaymodelLabelsController);
|
||||
|
||||
createBayModelLabelsController.$inject = [
|
||||
createBaymodelLabelsController.$inject = [
|
||||
'$q',
|
||||
'$scope',
|
||||
'horizon.dashboard.containers.basePath',
|
||||
'horizon.app.core.openstack-service-api.magnum'
|
||||
];
|
||||
|
||||
function createBayModelLabelsController($q, $scope, basePath, magnum) {
|
||||
function createBaymodelLabelsController($q, $scope, basePath, magnum) {
|
||||
var ctrl = this;
|
||||
}
|
||||
|
||||
|
@ -1,17 +1,11 @@
|
||||
<div ng-controller="createBayModelLabelsController as ctrl">
|
||||
<h1 translate>Labels</h1>
|
||||
|
||||
<div class="content">
|
||||
<div translate class="subtitle">Please provide the labels of the Bay Model.</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="form-field baymodel-labels">
|
||||
<label class="on-top" translate>Labels</label>
|
||||
<input name="baymodel-labels" type="text" class="form-control input-sm"
|
||||
ng-model="model.newBayModelSpec.labels"
|
||||
<div ng-controller="createBaymodelLabelsController as ctrl">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="baymodel-labels" translate>Labels</label>
|
||||
<textarea name="baymodel-labels" class="form-control" id="baymodel-labels"
|
||||
rows="4" ng-model="model.newBaymodelSpec.labels"
|
||||
placeholder="{$ 'KEY1=VALUE1,KEY2=VALUE2...'|translate $}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
/**
|
||||
* @ngdoc controller
|
||||
* @name createBayModelNetworkController
|
||||
* @name createBaymodelNetworkController
|
||||
* @ngController
|
||||
*
|
||||
* @description
|
||||
@ -27,16 +27,16 @@
|
||||
*/
|
||||
angular
|
||||
.module('horizon.dashboard.containers.baymodels')
|
||||
.controller('createBayModelNetworkController', createBayModelNetworkController);
|
||||
.controller('createBaymodelNetworkController', createBaymodelNetworkController);
|
||||
|
||||
createBayModelNetworkController.$inject = [
|
||||
createBaymodelNetworkController.$inject = [
|
||||
'$q',
|
||||
'$scope',
|
||||
'horizon.dashboard.containers.basePath',
|
||||
'horizon.app.core.openstack-service-api.magnum'
|
||||
];
|
||||
|
||||
function createBayModelNetworkController($q, $scope, basePath, magnum) {
|
||||
function createBaymodelNetworkController($q, $scope, basePath, magnum) {
|
||||
var ctrl = this;
|
||||
};
|
||||
|
||||
|
@ -1,12 +1,4 @@
|
||||
<div>
|
||||
<h3 translate>Description:</h3>
|
||||
<p translate>Specify the network settings for the Bay Model.</p>
|
||||
<p>
|
||||
<strong translate>Fixed Network:</strong>
|
||||
<translate>This should really be named fixed-network-cidr. Default: 10.0.0.0/24</translate>
|
||||
</p>
|
||||
<p>
|
||||
<strong translate>DNS:</strong>
|
||||
<translate>Specify the nameserver to use for the Bay. Default: 8.8.8.8</translate>
|
||||
</p>
|
||||
</div>
|
||||
<dt translate>Fixed Network</dt>
|
||||
<dd translate>This should really be named fixed-network-cidr. Default: 10.0.0.0/24</dd>
|
||||
<dt translate>DNS</dt>
|
||||
<dd translate>Specify the nameserver to use for the Bay. Default: 8.8.8.8</dd>
|
||||
|
@ -1,55 +1,60 @@
|
||||
<div ng-controller="createBayModelNetworkController as ctrl">
|
||||
<h1 translate>Network</h1>
|
||||
|
||||
<div class="content">
|
||||
<div translate class="subtitle">Please provide the settings of the Bay networking.</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="form-field baymodel-network-driver">
|
||||
<label class="on-top" translate>Network Driver</label>
|
||||
<select name="baymodel-network-driver" type="text" class="form-control input-sm"
|
||||
ng-model="model.newBayModelSpec.network_driver"
|
||||
placeholder="{$ 'The network driver name for instantiating container networks.'|translate $}"
|
||||
ng-options="driver.name as driver.label for driver in model.newBayModelSpec.network_drivers">
|
||||
<div ng-controller="createBaymodelNetworkController as ctrl">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="baymodel-network-driver" translate>Network Driver</label>
|
||||
<select name="baymodel-network-driver" type="text" class="form-control"
|
||||
id="baymodel-network-driver"
|
||||
ng-model="model.newBaymodelSpec.network_driver"
|
||||
placeholder="{$ 'The network driver name for instantiating container networks'|translate $}"
|
||||
ng-options="driver.name as driver.label for driver in model.newBaymodelSpec.network_drivers">
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-field baymodel-http-proxy">
|
||||
<label class="on-top" translate>HTTP Proxy</label>
|
||||
<input name="baymodel-http-proxy" type="text" class="form-control input-sm"
|
||||
ng-model="model.newBayModelSpec.http_proxy"
|
||||
placeholder="{$ 'The http_proxy address to use for nodes in bay.'|translate $}">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="baymodel-http-proxy" translate>HTTP Proxy</label>
|
||||
<input name="baymodel-http-proxy" type="text" class="form-control"
|
||||
id="baymodel-http-proxy"
|
||||
ng-model="model.newBaymodelSpec.http_proxy"
|
||||
placeholder="{$ 'The http_proxy address to use for nodes in bay'|translate $}">
|
||||
</div>
|
||||
<div class="form-field baymodel-https-proxy">
|
||||
<label class="on-top" translate>HTTPS Proxy</label>
|
||||
<input name="baymodel-https-proxy" type="text" class="form-control input-sm"
|
||||
ng-model="model.newBayModelSpec.https_proxy"
|
||||
placeholder="{$ 'The https_proxy address to use for nodes in bay.'|translate $}">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="baymodel-https-proxy" translate>HTTPS Proxy</label>
|
||||
<input name="baymodel-https-proxy" type="text" class="form-control"
|
||||
id="baymodel-https-proxy"
|
||||
ng-model="model.newBaymodelSpec.https_proxy"
|
||||
placeholder="{$ 'The https_proxy address to use for nodes in bay'|translate $}">
|
||||
</div>
|
||||
<div class="form-field baymodel-no-proxy">
|
||||
<label class="on-top" translate>No Proxy</label>
|
||||
<input name="baymodel-no-proxy" type="text" class="form-control input-sm"
|
||||
ng-model="model.newBayModelSpec.no_proxy"
|
||||
placeholder="{$ 'The no_proxy address to use for nodes in bay.'|translate $}">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="baymodel-no-proxy" translate>No Proxy</label>
|
||||
<input name="baymodel-no-proxy" type="text" class="form-control"
|
||||
id="baymodel-no-proxy"
|
||||
ng-model="model.newBaymodelSpec.no_proxy"
|
||||
placeholder="{$ 'The no_proxy address to use for nodes in bay'|translate $}">
|
||||
</div>
|
||||
<div class="form-field required baymodel-external-network-id">
|
||||
<label class="on-top" translate>External Network ID</label>
|
||||
<input name="baymodel-external-network-id" type="text" class="form-control input-sm"
|
||||
ng-model="model.newBayModelSpec.external_network_id" ng-required="true"
|
||||
placeholder="{$ 'The external Neutron network ID to connect to this bay model.'|translate $}">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="baymodel-external-network-id" translate>
|
||||
External Network ID
|
||||
<span class="hz-icon-required fa fa-asterisk"></span>
|
||||
</label>
|
||||
<input name="baymodel-external-network-id" type="text" class="form-control"
|
||||
id="baymodel-external-network-id"
|
||||
ng-model="model.newBaymodelSpec.external_network_id" ng-required="true"
|
||||
placeholder="{$ 'The external Neutron network ID to connect to this bay model'|translate $}">
|
||||
</div>
|
||||
<div class="form-field baymodel-fixed-network">
|
||||
<label class="on-top" translate>Fixed Network</label>
|
||||
<input name="baymodel-fixed-network" type="text" class="form-control input-sm"
|
||||
ng-model="model.newBayModelSpec.fixed_network"
|
||||
placeholder="{$ 'The private Neutron network name to connect to this bay model.'|translate $}">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="baymodel-fixed-network" translate>Fixed Network</label>
|
||||
<input name="baymodel-fixed-network" type="text" class="form-control"
|
||||
id="baymodel-fixed-network"
|
||||
ng-model="model.newBaymodelSpec.fixed_network"
|
||||
placeholder="{$ 'The private Neutron network name to connect to this bay model'|translate $}">
|
||||
</div>
|
||||
<div class="form-field baymodel-dns-nameserver">
|
||||
<label class="on-top" translate>DNS</label>
|
||||
<input name="baymodel-dns-nameserver" type="text" class="form-control input-sm"
|
||||
ng-model="model.newBayModelSpec.dns_nameserver"
|
||||
placeholder="{$ 'The DNS nameserver to use for this Bay.'|translate $}">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="baymodel-dns-nameserver" translate>DNS</label>
|
||||
<input name="baymodel-dns-nameserver" type="text" class="form-control"
|
||||
id="baymodel-dns-nameserver"
|
||||
ng-model="model.newBaymodelSpec.dns_nameserver"
|
||||
placeholder="{$ 'The DNS nameserver to use for this Bay'|translate $}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
/**
|
||||
* @ngdoc controller
|
||||
* @name createBayModelSpecController
|
||||
* @name createBaymodelSpecController
|
||||
* @ngController
|
||||
*
|
||||
* @description
|
||||
@ -27,9 +27,9 @@
|
||||
*/
|
||||
angular
|
||||
.module('horizon.dashboard.containers.baymodels')
|
||||
.controller('createBayModelSpecController', createBayModelSpecController);
|
||||
.controller('createBaymodelSpecController', createBaymodelSpecController);
|
||||
|
||||
createBayModelSpecController.$inject = [
|
||||
createBaymodelSpecController.$inject = [
|
||||
'$q',
|
||||
'$scope',
|
||||
'horizon.dashboard.containers.basePath',
|
||||
@ -38,11 +38,11 @@
|
||||
'horizon.app.core.openstack-service-api.glance'
|
||||
];
|
||||
|
||||
function createBayModelSpecController($q, $scope, basePath, magnum, nova, glance) {
|
||||
function createBaymodelSpecController($q, $scope, basePath, magnum, nova, glance) {
|
||||
var ctrl = this;
|
||||
ctrl.images = [{id:"", name: gettext("Choose a Image")}];
|
||||
ctrl.nflavors = [{id:"", name: gettext("Choose a Flavor for Node")}];
|
||||
ctrl.mflavors = [{id:"", name: gettext("Choose a Flavor for Master Node")}];
|
||||
ctrl.images = [{id:"", name: gettext("Choose an Image")}];
|
||||
ctrl.nflavors = [{id:"", name: gettext("Choose a Flavor for the Node")}];
|
||||
ctrl.mflavors = [{id:"", name: gettext("Choose a Flavor for the Master Node")}];
|
||||
ctrl.keypairs = [{id:"", name: gettext("Choose a Keypair")}];
|
||||
|
||||
init();
|
||||
|
@ -1,24 +1,12 @@
|
||||
<div>
|
||||
<h3 translate>Description:</h3>
|
||||
<p translate>Specify the specs for the nodes in the Bay.</p>
|
||||
<p>
|
||||
<strong translate>Image:</strong>
|
||||
<translate>The name or UUID of the base image to customize for the bay.</translate>
|
||||
</p>
|
||||
<p>
|
||||
<strong translate>Flavor:</strong>
|
||||
<translate>The nova flavor id to use when launching the bay. Default: m1.small</translate>
|
||||
</p>
|
||||
<p>
|
||||
<strong translate>Master Flavor:</strong>
|
||||
<translate>The nova flavor id to use when launching the master node of the bay. Default: m1.small</translate>
|
||||
</p>
|
||||
<p>
|
||||
<strong translate>Docker Volume Size:</strong>
|
||||
<translate>The size in GB for Docker Volume. Default: 25</translate>
|
||||
</p>
|
||||
<p>
|
||||
<strong translate>Keypair:</strong>
|
||||
<translate>The name or UUID of the SSH keypair to load into the Bay nodes.</translate>
|
||||
</p>
|
||||
</div>
|
||||
<dl>
|
||||
<dt translate>Image</dt>
|
||||
<dd translate>The name or UUID of the base image to customize for the bay.</dd>
|
||||
<dt translate>Flavor</dt>
|
||||
<dd translate>The nova flavor id to use when launching the bay. Default: m1.small</dd>
|
||||
<dt translate>Master Flavor</dt>
|
||||
<dd translate>The nova flavor id to use when launching the master node of the bay. Default: m1.small</dd>
|
||||
<dt translate>Docker Volume Size</dt>
|
||||
<dd translate>The size in GB for Docker Volume. Default: 25</dd>
|
||||
<dt translate>Keypair</dt>
|
||||
<dd translate>The name or UUID of the SSH keypair to load into the Bay nodes.</dd>
|
||||
</dl>
|
||||
|
@ -1,54 +1,67 @@
|
||||
<div ng-controller="createBayModelSpecController as ctrl">
|
||||
<h1 translate>Node Spec</h1>
|
||||
|
||||
<div class="content">
|
||||
<div class="subtitle" translate>Please provide the specs of the Bay.</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="form-field required baymodel-image-id">
|
||||
<label class="on-top" translate>Image</label>
|
||||
<select name="baymodel-image-id" type="text" class="form-control input-sm"
|
||||
ng-model="model.newBayModelSpec.image_id" ng-required="true"
|
||||
<div ng-controller="createBaymodelSpecController as ctrl">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="baymodel-image-id">
|
||||
<translate>Image</span>
|
||||
<span class="hz-icon-required fa fa-asterisk"></span>
|
||||
</label>
|
||||
<select name="baymodel-image-id" type="text" class="form-control" id="baymodel-image-id"
|
||||
ng-model="model.newBaymodelSpec.image_id" ng-required="true"
|
||||
ng-options="image.id as image.name for image in ctrl.images">
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-field baymodel-flavor-id">
|
||||
<label class="on-top" translate>Flavor</label>
|
||||
<select name="baymodel-flavor-id" type="text" class="form-control input-sm"
|
||||
ng-model="model.newBayModelSpec.flavor_id"
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="baymodel-flavor-id" translate>Flavor</label>
|
||||
<select name="baymodel-flavor-id" type="text" class="form-control" id="baymodel-flavor-id"
|
||||
ng-model="model.newBaymodelSpec.flavor_id"
|
||||
ng-options="nflavor.id as nflavor.name for nflavor in ctrl.nflavors">
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-field baymodel-master-flavor-id">
|
||||
<label class="on-top" translate>Master Flavor</label>
|
||||
<select name="baymodel-master-flavor-id" type="text" class="form-control input-sm"
|
||||
ng-model="model.newBayModelSpec.master_flavor_id"
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="baymodel-master-flavor-id" translate>Master Flavor</label>
|
||||
<select name="baymodel-master-flavor-id" type="text" class="form-control" id="baymodel-master-flavor-id"
|
||||
ng-model="model.newBaymodelSpec.master_flavor_id"
|
||||
ng-options="mflavor.id as mflavor.name for mflavor in ctrl.mflavors">
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-field baymodel-volume-driver">
|
||||
<label class="on-top" translate>Volume Driver</label>
|
||||
<select name="baymodel-volume-driver" type="text" class="form-control input-sm"
|
||||
ng-model="model.newBayModelSpec.volume_driver"
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="baymodel-volume-driver" translate>Volume Driver</label>
|
||||
<select name="baymodel-volume-driver" type="text" class="form-control" id="baymodel-volume-driver"
|
||||
ng-model="model.newBaymodelSpec.volume_driver"
|
||||
placeholder="{$ 'The volume driver name for instantiating container volume.'|translate $}"
|
||||
ng-options="driver.name as driver.label for driver in model.newBayModelSpec.volume_drivers">
|
||||
ng-options="driver.name as driver.label for driver in model.newBaymodelSpec.volume_drivers">
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-field baymodel-docker-volume-size">
|
||||
<label class="on-top" translate>Docker Volume Size (GB)</label>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="baymodel-docker-volume-size" translate>
|
||||
Docker Volume Size (GB)
|
||||
</label>
|
||||
<input name="baymodel-docker-volume-size" type="number" ng-pattern="/^[0-9]+$/"
|
||||
class="form-control input-sm"
|
||||
ng-model="model.newBayModelSpec.docker_volume_size" min="1"
|
||||
placeholder="{$ 'Specify the number of size in GB for the docker volume to use.'|translate $}">
|
||||
class="form-control" id="baymodel-docker-volume-size"
|
||||
ng-model="model.newBaymodelSpec.docker_volume_size" min="1"
|
||||
placeholder="{$ 'Specify the size in GB for the docker volume'|translate $}">
|
||||
</div>
|
||||
<div class="form-field required baymodel-keypair-id">
|
||||
<label class="on-top" translate>Keypair</label>
|
||||
<select name="baymodel-keypair-id" type="text" class="form-control input-sm"
|
||||
ng-model="model.newBayModelSpec.keypair_id" ng-required="true"
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="baymodel-keypair-id">
|
||||
<translate>Keypair</translate>
|
||||
<span class="hz-icon-required fa fa-asterisk"></span>
|
||||
</label>
|
||||
<select name="baymodel-keypair-id" type="text" class="form-control" id="baymodel-keypair-id"
|
||||
ng-model="model.newBaymodelSpec.keypair_id" ng-required="true"
|
||||
ng-options="keypair.id as keypair.name for keypair in ctrl.keypairs">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -82,18 +82,18 @@
|
||||
|
||||
function labelize(count){
|
||||
return {
|
||||
title: ngettext('Confirm Delete BayModel',
|
||||
'Confirm Delete BayModels', count),
|
||||
title: ngettext('Confirm Delete Baymodel',
|
||||
'Confirm Delete Baymodels', count),
|
||||
/* eslint-disable max-len */
|
||||
message: ngettext('You have selected "%s". Please confirm your selection. Deleted baymodel is not recoverable.',
|
||||
'You have selected "%s". Please confirm your selection. Deleted baymodels are not recoverable.', count),
|
||||
/* eslint-enable max-len */
|
||||
submit: ngettext('Delete BayModel',
|
||||
'Delete BayModels', count),
|
||||
success: ngettext('Deleted BayModel: %s.',
|
||||
'Deleted BayModels: %s.', count),
|
||||
error: ngettext('Unable to delete BayModel: %s.',
|
||||
'Unable to delete BayModels: %s.', count)
|
||||
submit: ngettext('Delete Baymodel',
|
||||
'Delete Baymodels', count),
|
||||
success: ngettext('Deleted Baymodel: %s.',
|
||||
'Deleted Baymodels: %s.', count),
|
||||
error: ngettext('Unable to delete Baymodel: %s.',
|
||||
'Unable to delete Baymodels: %s.', count)
|
||||
};
|
||||
}
|
||||
|
||||
@ -119,7 +119,7 @@
|
||||
|
||||
// call delete REST API
|
||||
function deleteEntity(id){
|
||||
return magnum.deleteBayModel(id, true);
|
||||
return magnum.deleteBaymodel(id, true);
|
||||
}
|
||||
}
|
||||
})();
|
||||
|
@ -18,9 +18,9 @@
|
||||
|
||||
angular
|
||||
.module('horizon.dashboard.containers.baymodels')
|
||||
.controller('BayModelDetailController', BayModelDetailController);
|
||||
.controller('BaymodelDetailController', BaymodelDetailController);
|
||||
|
||||
BayModelDetailController.$inject = [
|
||||
BaymodelDetailController.$inject = [
|
||||
'$scope',
|
||||
'$window',
|
||||
'$location',
|
||||
@ -33,7 +33,7 @@
|
||||
'horizon.dashboard.containers.baymodels.resourceType'
|
||||
];
|
||||
|
||||
function BayModelDetailController($scope, $window, $location, $routeParams, magnum, glance, events, bayEvents, registry, baymodelResourceType) {
|
||||
function BaymodelDetailController($scope, $window, $location, $routeParams, magnum, glance, events, bayEvents, registry, baymodelResourceType) {
|
||||
var ctrl = this;
|
||||
ctrl.baymodel = {};
|
||||
ctrl.image_uuid;
|
||||
@ -51,10 +51,10 @@
|
||||
function init() {
|
||||
registry.initActions(baymodelResourceType, $scope);
|
||||
// Load the elements that are used in the overview.
|
||||
magnum.getBayModel(baymodelId).success(onGetBayModel);
|
||||
magnum.getBaymodel(baymodelId).success(onGetBaymodel);
|
||||
}
|
||||
|
||||
function onGetBayModel(baymodel) {
|
||||
function onGetBaymodel(baymodel) {
|
||||
ctrl.baymodel = baymodel;
|
||||
ctrl.baymodel.id = baymodel.uuid;
|
||||
glance.getImages().success(onGetImages);
|
||||
@ -83,4 +83,4 @@
|
||||
createBayWatcher();
|
||||
}
|
||||
}
|
||||
})();
|
||||
})();
|
||||
|
@ -1,7 +1,7 @@
|
||||
<div class="content" ng-controller="BayModelDetailController as ctrl">
|
||||
<div class="content" ng-controller="BaymodelDetailController as ctrl">
|
||||
<div class="page-header">
|
||||
<ol class="breadcrumb">
|
||||
<li><a ng-href="project/baymodels" translate>Bay Models</a></li>
|
||||
<li><a ng-href="project/baymodels" translate>Baymodels</a></li>
|
||||
<li class="active">{$ ctrl.baymodel.name|noName $}</li>
|
||||
<div class="pull-right">
|
||||
<actions allowed="ctrl.baymodelResource.itemActions" type="row" item="ctrl.baymodel" />
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
/**
|
||||
* @ngdoc overview
|
||||
* @name containersBayModelsTableController
|
||||
* @name containersBaymodelsTableController
|
||||
* @ngController
|
||||
*
|
||||
* @description
|
||||
@ -27,9 +27,9 @@
|
||||
*/
|
||||
angular
|
||||
.module('horizon.dashboard.containers.baymodels')
|
||||
.controller('containersBayModelsTableController', containersBayModelsTableController);
|
||||
.controller('containersBaymodelsTableController', containersBaymodelsTableController);
|
||||
|
||||
containersBayModelsTableController.$inject = [
|
||||
containersBaymodelsTableController.$inject = [
|
||||
'$scope',
|
||||
'$location',
|
||||
'horizon.app.core.openstack-service-api.magnum',
|
||||
@ -39,7 +39,7 @@
|
||||
'horizon.dashboard.containers.baymodels.resourceType'
|
||||
];
|
||||
|
||||
function containersBayModelsTableController($scope, $location, magnum, events, bayEvents, registry, baymodelResourceType) {
|
||||
function containersBaymodelsTableController($scope, $location, magnum, events, bayEvents, registry, baymodelResourceType) {
|
||||
var ctrl = this;
|
||||
ctrl.baymodels = [];
|
||||
ctrl.baymodelsSrc = [];
|
||||
@ -77,10 +77,10 @@
|
||||
|
||||
function init() {
|
||||
registry.initActions(baymodelResourceType, $scope);
|
||||
magnum.getBayModels().success(getBayModelsSuccess);
|
||||
magnum.getBaymodels().success(getBaymodelsSuccess);
|
||||
}
|
||||
|
||||
function getBayModelsSuccess(response) {
|
||||
function getBaymodelsSuccess(response) {
|
||||
ctrl.baymodelsSrc = response.items;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<table ng-controller="containersBayModelsTableController as table"
|
||||
<table ng-controller="containersBaymodelsTableController as table"
|
||||
hz-table ng-cloak
|
||||
st-table="table.baymodels"
|
||||
st-safe-src="table.baymodelsSrc"
|
||||
|
@ -57,7 +57,7 @@
|
||||
},
|
||||
|
||||
btnIcon: {
|
||||
finish: 'fa fa-cloud-download'
|
||||
finish: 'fa fa-check'
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -38,7 +38,7 @@
|
||||
|
||||
function createBayInfoController($q, $scope, basePath, magnum) {
|
||||
var ctrl = this;
|
||||
ctrl.baymodels = [{id:"", name: gettext("Choose a Bay Model")}];
|
||||
ctrl.baymodels = [{id:"", name: gettext("Choose a Baymodel")}];
|
||||
$scope.model.newBaySpec.baymodel_id = "";
|
||||
$scope.baymodeldetail = {
|
||||
name: "",
|
||||
@ -51,8 +51,8 @@
|
||||
apiserver_port: ""
|
||||
};
|
||||
|
||||
$scope.changeBayModel = function(){
|
||||
// show Bay Model Detail
|
||||
$scope.changeBaymodel = function(){
|
||||
// show Baymodel Detail
|
||||
if(!$scope.model.newBaySpec.baymodel_id){
|
||||
$("#baymodel_detail").hide();
|
||||
$("#baymodel_detail_none").show();
|
||||
@ -79,14 +79,14 @@
|
||||
$("#baymodel_detail_none").show();
|
||||
|
||||
function init() {
|
||||
magnum.getBayModels({paginate: false}).success(onGetBayModels);
|
||||
magnum.getBaymodels({paginate: false}).success(onGetBaymodels);
|
||||
}
|
||||
|
||||
function onGetBayModels(response) {
|
||||
function onGetBaymodels(response) {
|
||||
Array.prototype.push.apply(ctrl.baymodels, response.items);
|
||||
if($scope.selected instanceof Object){
|
||||
$scope.model.newBaySpec.baymodel_id = $scope.selected.id;
|
||||
$scope.changeBayModel();
|
||||
$scope.changeBaymodel();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,6 @@
|
||||
<div>
|
||||
<h3 translate>Description:</h3>
|
||||
<p translate>Specify bay name and choose bay model.</p>
|
||||
</div>
|
||||
<dl>
|
||||
<dt translate>Name</dt>
|
||||
<dd translate>An arbitrary human-readable name</dd>
|
||||
<dt translate>Description</dt>
|
||||
<dd translate>Specify bay name and choose bay model</dd>
|
||||
</dl>
|
||||
|
@ -1,57 +1,49 @@
|
||||
<div ng-controller="createBayInfoController as ctrl">
|
||||
<h1 translate>Bay Details</h1>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
|
||||
<div class="content">
|
||||
<div translate class="subtitle">Please provide the name of the Bay.</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="form-field bay-name">
|
||||
<label class="on-top" translate>Bay Name</label>
|
||||
<input name="bay-name" type="text" class="form-control input-sm"
|
||||
ng-model="model.newBaySpec.name"
|
||||
placeholder="{$ 'Name of the bay to create.'|translate $}">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="bay-name" translate>Bay Name</label>
|
||||
<input name="bay-name" type="text" class="form-control" id="bay-name"
|
||||
ng-model="model.newBaySpec.name">
|
||||
</div>
|
||||
<div class="form-field required bay-model">
|
||||
<label class="on-top" translate>Bay Model</label>
|
||||
<select class="form-control" name="bay-model"
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="bay-model" translate>
|
||||
Baymodel
|
||||
<span class="hz-icon-required fa fa-asterisk"></span>
|
||||
</label>
|
||||
<select class="form-control" name="bay-model" id="bay-model"
|
||||
ng-model="model.newBaySpec.baymodel_id"
|
||||
ng-required="true"
|
||||
ng-options="baymodel.id as baymodel.name|noName for baymodel in ctrl.baymodels"
|
||||
ng-change="changeBayModel()">
|
||||
ng-change="changeBaymodel()">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2 translate class="section-title">Bay Model Detail</h2>
|
||||
<div class="subtitle" id="baymodel_detail_none" translate>
|
||||
Choose a Bay Model
|
||||
<div class="detail" ng-show="model.newBaySpec.baymodel_id">
|
||||
<span translate class="h4">Baymodel Detail</span>
|
||||
<dl class="dl-horizontal">
|
||||
<dt translate>Name</dt>
|
||||
<dd><a ng-href="project/baymodels/{$ baymodeldetail.id $}" ng-click="cancel()">
|
||||
{$ baymodeldetail.name|noName $}
|
||||
</a></dd>
|
||||
<dt translate>ID</dt>
|
||||
<dd>{$ baymodeldetail.id $}</dd>
|
||||
<dt translate>COE</dt>
|
||||
<dd>{$ baymodeldetail.coe $}</dd>
|
||||
<dt translate>Image ID</dt>
|
||||
<dd>{$ baymodeldetail.image_id $}</dd>
|
||||
<dt translate>Public</dt>
|
||||
<dd>{$ baymodeldetail.public $}</dd>
|
||||
<dt translate>Registry Enabled</dt>
|
||||
<dd>{$ baymodeldetail.registry_enabled $}</dd>
|
||||
<dt translate>TLS Disabled</dt>
|
||||
<dd>{$ baymodeldetail.tls_disabled $}</dd>
|
||||
<dt translate>API Server Port</dt>
|
||||
<dd>{$ baymodeldetail.apiserver_port $}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="subtitle" id="baymodel_detail">
|
||||
<dl class=dl-horizontal>
|
||||
<dt translate>Name</dt>
|
||||
<dd>
|
||||
<a
|
||||
ng-href="project/baymodels/{$ baymodeldetail.id $}"
|
||||
ng-click="cancel()">
|
||||
{$ baymodeldetail.name|noName $}
|
||||
</a>
|
||||
</dd>
|
||||
<dt translate>ID</dt>
|
||||
<dd>{$ baymodeldetail.id $}</dd>
|
||||
<dt translate>COE</dt>
|
||||
<dd>{$ baymodeldetail.coe $}</dd>
|
||||
<dt translate>Image ID</dt>
|
||||
<dd>{$ baymodeldetail.image_id $}</dd>
|
||||
<dt translate>Public</dt>
|
||||
<dd>{$ baymodeldetail.public $}</dd>
|
||||
<dt translate>Registry Enabled</dt>
|
||||
<dd>{$ baymodeldetail.registry_enabled $}</dd>
|
||||
<dt translate>TLS Disabled</dt>
|
||||
<dd>{$ baymodeldetail.tls_disabled $}</dd>
|
||||
<dt translate>API Server Port</dt>
|
||||
<dd>{$ baymodeldetail.apiserver_port $}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,4 +1 @@
|
||||
<div>
|
||||
<h3 translate>Description:</h3>
|
||||
<p translate>Specify conditions for bay creation.</p>
|
||||
</div>
|
||||
<p translate>Specify conditions for bay creation.</p>
|
||||
|
@ -1,23 +1,19 @@
|
||||
<div ng-controller="createBayMiscController as ctrl">
|
||||
<h1 translate>Miscellaneous</h1>
|
||||
<p translate>Please provide the miscellaneous for creation of the Bay.</p>
|
||||
|
||||
<div class="content">
|
||||
<div translate class="subtitle">Please provide the miscellaneous for creation of the Bay.</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="form-field bay-discovery-url">
|
||||
<label class="on-top" translate>Discovery URL</label>
|
||||
<input name="bay-discovery-url" type="text" class="form-control input-sm"
|
||||
ng-model="model.newBaySpec.discovery_url"
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="bay-discovery-url" translate>Discovery URL</label>
|
||||
<input name="bay-discovery-url" type="text" class="form-control"
|
||||
ng-model="model.newBaySpec.discovery_url" id="bay-discovery-url"
|
||||
placeholder="{$ 'Specifies custom discovery url for node discovery.'|translate $}">
|
||||
</div>
|
||||
<div class="form-field bay-timeout">
|
||||
<label class="on-top" translate>Timeout</label>
|
||||
<input name="bay-timeout" type="number" ng-pattern="/^[0-9]+$/" class="form-control input-sm"
|
||||
ng-model="model.newBaySpec.bay_create_timeout"
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="bay-timeout" translate>Timeout</label>
|
||||
<input name="bay-timeout" type="number" ng-pattern="/^[0-9]+$/" class="form-control"
|
||||
ng-model="model.newBaySpec.bay_create_timeout" id="bay-timeout"
|
||||
placeholder="{$ 'The timeout for bay creation in minutes. Set to 0 for no timeout. The default is no timeout.'|translate $}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,4 +1 @@
|
||||
<div>
|
||||
<h3 translate>Description:</h3>
|
||||
<p translate>Specify the number of master nodes and bay nodes for the bay.</p>
|
||||
</div>
|
||||
<p translate>Specify the number of master nodes and bay nodes for the bay.</p>
|
||||
|
@ -1,25 +1,21 @@
|
||||
<div ng-controller="createBaySizeController as ctrl">
|
||||
<h1 translate>Bay Size</h1>
|
||||
|
||||
<div class="content">
|
||||
<div translate class="subtitle">Please provide the count of the master and node in this Bay.</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="form-field bay-master-count">
|
||||
<label class="on-top" translate>Master Count</label>
|
||||
<input name="bay-master-count" type="number" ng-pattern="/^[0-9]+$/"
|
||||
class="form-control input-sm"
|
||||
ng-model="model.newBaySpec.master_count"
|
||||
<p translate>Please provide the count of the master and node in this Bay.</p>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="bay-master-count" translate>Master Count</label>
|
||||
<input name="bay-master-count" type="number" ng-pattern="/^[0-9]+$/" id="bay-master-count"
|
||||
class="form-control" ng-model="model.newBaySpec.master_count"
|
||||
placeholder="{$ 'The bay node count.'|translate $}">
|
||||
</div>
|
||||
<div class="form-field bay-node-count">
|
||||
<label class="on-top" translate>Node Count</label>
|
||||
<input name="bay-node-count" type="number" ng-pattern="/^[0-9]+$/"
|
||||
class="form-control input-sm"
|
||||
ng-model="model.newBaySpec.node_count"
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="bay-node-count" translate>Node Count</label>
|
||||
<input name="bay-node-count" type="number" ng-pattern="/^[0-9]+$/" id="bay-node-count"
|
||||
class="form-control" ng-model="model.newBaySpec.node_count"
|
||||
placeholder="{$ 'The number of master nodes for the bay.'|translate $}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -129,7 +129,7 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<dl class="col-xs-5">
|
||||
<dt translate>BayModel</dt>
|
||||
<dt translate>Baymodel</dt>
|
||||
<dd><a ng-href="project/baymodels/{$ b.baymodel_id $}">{$ b.baymodel_id $}</a></dd>
|
||||
</dl>
|
||||
<dl class="col-xs-3">
|
||||
|
@ -51,7 +51,7 @@
|
||||
},
|
||||
|
||||
btnIcon: {
|
||||
finish: 'fa fa-cloud-download'
|
||||
finish: 'fa fa-check'
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -1,4 +1 @@
|
||||
<div>
|
||||
<h3 translate>Description:</h3>
|
||||
<p translate>Specify container name and choose bay.</p>
|
||||
</div>
|
||||
<p translate>Specify container name and choose bay.</p>
|
||||
|
@ -1,53 +1,50 @@
|
||||
<div ng-controller="createContainerInfoController as ctrl">
|
||||
<h1 translate>Container Details</h1>
|
||||
<p translate>Please provide the name of the Container.</p>
|
||||
|
||||
<div class="content">
|
||||
<div translate class="subtitle">Please provide the name of the Container.</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
|
||||
<div class="form-group">
|
||||
<div class="form-field container-name">
|
||||
<label class="on-top" translate>Container Name</label>
|
||||
<input name="container-name" type="text" class="form-control input-sm"
|
||||
ng-model="model.newContainerSpec.name"
|
||||
placeholder="{$ 'Name of the container to create.'|translate $}">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="container-name" translate>
|
||||
Container Name
|
||||
</label>
|
||||
<input name="container-name" type="text" class="form-control" id="container-name"
|
||||
ng-model="model.newContainerSpec.name"
|
||||
placeholder="{$ 'Name of the container to create.'|translate $}">
|
||||
</div>
|
||||
<div class="form-field required container-model">
|
||||
<label class="on-top" translate>Bay</label>
|
||||
<select class="form-control" name="container-bay"
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="container-bay">
|
||||
<translate>Bay</translate>
|
||||
<span class="hz-icon-required fa fa-asterisk"></span>
|
||||
</label>
|
||||
<select class="form-control" name="container-bay" id="container-bay"
|
||||
ng-model="model.newContainerSpec.bay_uuid"
|
||||
ng-required="true"
|
||||
ng-options="bay.id as bay.name|noName for bay in ctrl.bays"
|
||||
ng-change="changeBay()">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2 translate class="section-title">Bay Detail</h2>
|
||||
<div class="subtitle" id="bay_detail_none" translate>
|
||||
Choose a Bay
|
||||
</div>
|
||||
<div class="subtitle" id="bay_detail">
|
||||
<dl class=dl-horizontal>
|
||||
<dt translate>Name</dt>
|
||||
<dd>
|
||||
<a
|
||||
ng-href="project/bays/{$ baydetail.id $}"
|
||||
ng-click="cancel()">
|
||||
|
||||
<div class="detail" ng-show="model.newContainerSpec.bay_uuid">
|
||||
<span translate class="h4">Bay Detail</span>
|
||||
<dl class="dl-horizontal">
|
||||
<dt translate>Name</dt>
|
||||
<dd><a ng-href="project/bays/{$ baydetail.id $}" ng-click="cancel()">
|
||||
{$ baydetail.name|noName $}
|
||||
</a>
|
||||
</dd>
|
||||
<dt translate>ID</dt>
|
||||
<dd>{$ baydetail.id $}</dd>
|
||||
<dt translate>BayModel ID</dt>
|
||||
<dd>{$ baydetail.baymodel_id $}</dd>
|
||||
<dt translate>Master Count</dt>
|
||||
<dd>{$ baydetail.master_count $}</dd>
|
||||
<dt translate>Node Count</dt>
|
||||
<dd>{$ baydetail.node_count $}</dd>
|
||||
<dt translate>Timeout</dt>
|
||||
<dd>{$ baydetail.timeout $}</dd>
|
||||
</dl>
|
||||
</a></dd>
|
||||
<dt translate>ID</dt>
|
||||
<dd>{$ baydetail.id $}</dd>
|
||||
<dt translate>Baymodel ID</dt>
|
||||
<dd>{$ baydetail.baymodel_id $}</dd>
|
||||
<dt translate>Master Count</dt>
|
||||
<dd>{$ baydetail.master_count $}</dd>
|
||||
<dt translate>Node Count</dt>
|
||||
<dd>{$ baydetail.node_count $}</dd>
|
||||
<dt translate>Timeout</dt>
|
||||
<dd>{$ baydetail.timeout $}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,4 +1 @@
|
||||
<div>
|
||||
<h3 translate>Description:</h3>
|
||||
<p translate>Specify the specs for the container.</p>
|
||||
</div>
|
||||
<p translate>Specify the specs for the container.</p>
|
||||
|
@ -1,44 +1,51 @@
|
||||
<div ng-controller="createContainerSpecController as ctrl">
|
||||
<h1 translate>Container Spec</h1>
|
||||
<p translate>Please provide the specs for this Container.</p>
|
||||
|
||||
<div class="content">
|
||||
<div translate class="subtitle">Please provide the specs for this Container.</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
|
||||
<div class="form-group">
|
||||
<div class="form-field required container-image">
|
||||
<label class="on-top" translate>Image</label>
|
||||
<input name="container-image" type="text"
|
||||
class="form-control input-sm"
|
||||
ng-required="true"
|
||||
ng-model="model.newContainerSpec.image"
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="container-image" translate>
|
||||
<translate>Image</translate>
|
||||
<span class="hz-icon-required fa fa-asterisk"></span>
|
||||
</label>
|
||||
<input name="container-image" type="text" class="form-control" id="container-image"
|
||||
ng-required="true" ng-model="model.newContainerSpec.image"
|
||||
placeholder="{$ 'Name of the container image.'|translate $}">
|
||||
</div>
|
||||
<div class="form-field container-memory">
|
||||
<label class="on-top" translate>Memory</label>
|
||||
<div class="input-group">
|
||||
<input name="container-memorysize" type="number" ng-pattern="/^[0-9]+$/"
|
||||
class="form-control form-inline input-sm container-memorysize"
|
||||
ng-model="model.newContainerSpec.memorysize"
|
||||
placeholder="{$ 'The container memory size.'|translate $}"
|
||||
ng-change="changeMemorySize()">
|
||||
<select name="container-memoryunit"
|
||||
class="form-control form-inline input-sm container-memoryunit"
|
||||
ng-options="mu.unit as mu.label for mu in ctrl.memoryunits"
|
||||
ng-model="model.newContainerSpec.memoryunit"
|
||||
ng-change="changeMemoryUnit()">
|
||||
</select>
|
||||
</div>
|
||||
<input name="container-memory" type="hidden"
|
||||
ng-model="model.newContainerSpec.memory">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="container-memorysize" translate>Memory Size</label>
|
||||
<input name="container-memorysize" type="number" ng-pattern="/^[0-9]+$/"
|
||||
class="form-control" ng-model="model.newContainerSpec.memorysize"
|
||||
placeholder="{$ 'The container memory size.'|translate $}"
|
||||
ng-change="changeMemorySize()" id="container-memorysize">
|
||||
</div>
|
||||
<div class="form-field container-command">
|
||||
<label class="on-top" translate>Command</label>
|
||||
<input name="container-command" type="text"
|
||||
class="form-control input-sm"
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="container-memoryunit" translate>Memory Unit</label>
|
||||
<select name="container-memoryunit" id="container-memoryunit"
|
||||
class="form-control" ng-options="mu.unit as mu.label for mu in ctrl.memoryunits"
|
||||
ng-model="model.newContainerSpec.memoryunit" ng-change="changeMemoryUnit()">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="container-command" translate>Command</label>
|
||||
<input name="container-command" type="text" class="form-control" id="container-command"
|
||||
ng-model="model.newContainerSpec.command"
|
||||
placeholder="{$ 'Send command to the contaier in a line.'|translate $}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -33,11 +33,11 @@
|
||||
getBays: getBays,
|
||||
deleteBay: deleteBay,
|
||||
deleteBays: deleteBays,
|
||||
createBayModel: createBayModel,
|
||||
getBayModel: getBayModel,
|
||||
getBayModels: getBayModels,
|
||||
deleteBayModel: deleteBayModel,
|
||||
deleteBayModels: deleteBayModels,
|
||||
createBaymodel: createBaymodel,
|
||||
getBaymodel: getBaymodel,
|
||||
getBaymodels: getBaymodels,
|
||||
deleteBaymodel: deleteBaymodel,
|
||||
deleteBaymodels: deleteBaymodels,
|
||||
createContainer: createContainer,
|
||||
getContainer: getContainer,
|
||||
getContainers: getContainers,
|
||||
@ -91,43 +91,43 @@
|
||||
}
|
||||
|
||||
///////////////
|
||||
// BayModels //
|
||||
// Baymodels //
|
||||
///////////////
|
||||
|
||||
function createBayModel(params) {
|
||||
function createBaymodel(params) {
|
||||
return apiService.post('/api/containers/baymodels/', params)
|
||||
.error(function() {
|
||||
toastService.add('error', gettext('Unable to create BayModel'));
|
||||
toastService.add('error', gettext('Unable to create Baymodel'));
|
||||
});
|
||||
}
|
||||
|
||||
function getBayModel(id) {
|
||||
function getBaymodel(id) {
|
||||
return apiService.get('/api/containers/baymodels/' + id)
|
||||
.error(function() {
|
||||
toastService.add('error', gettext('Unable to retrieve the BayModel.'));
|
||||
toastService.add('error', gettext('Unable to retrieve the Baymodel.'));
|
||||
});
|
||||
}
|
||||
|
||||
function getBayModels() {
|
||||
function getBaymodels() {
|
||||
return apiService.get('/api/containers/baymodels/')
|
||||
.error(function() {
|
||||
toastService.add('error', gettext('Unable to retrieve the BayModels.'));
|
||||
toastService.add('error', gettext('Unable to retrieve the Baymodels.'));
|
||||
});
|
||||
}
|
||||
|
||||
function deleteBayModel(id, suppressError) {
|
||||
function deleteBaymodel(id, suppressError) {
|
||||
var promise = apiService.delete('/api/containers/baymodels/', [id]);
|
||||
return suppressError ? promise : promise.error(function() {
|
||||
var msg = gettext('Unable to delete the BayModel with id: %(id)s');
|
||||
var msg = gettext('Unable to delete the Baymodel with id: %(id)s');
|
||||
toastService.add('error', interpolate(msg, { id: id }, true));
|
||||
});
|
||||
}
|
||||
|
||||
// FIXME(shu-mutou): Unused for batch-delete in Horizon framework in Feb, 2016.
|
||||
function deleteBayModels(ids) {
|
||||
function deleteBaymodels(ids) {
|
||||
return apiService.delete('/api/containers/baymodels/', ids)
|
||||
.error(function() {
|
||||
toastService.add('error', gettext('Unable to delete the BayModels.'));
|
||||
toastService.add('error', gettext('Unable to delete the Baymodels.'));
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -2,11 +2,11 @@
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}
|
||||
{% trans "Bay Models" %}
|
||||
{% trans "Baymodels" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
<hz-page-header header="{$ 'Bay Models' | translate $}"/>
|
||||
<hz-page-header header="{$ 'Baymodels' | translate $}"/>
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block ng_route_base %}
|
||||
|
@ -25,13 +25,13 @@ TEST = TestData(test_data.data)
|
||||
|
||||
class MagnumRestTestCase(test.TestCase):
|
||||
|
||||
# BayModels
|
||||
# Baymodels
|
||||
@mock.patch.object(magnum, 'magnum')
|
||||
def test_baymodel_get(self, client):
|
||||
request = self.mock_rest_request()
|
||||
client.baymodel_list.return_value = \
|
||||
mock_resource(TEST.baymodels.list())
|
||||
response = magnum.BayModels().get(request)
|
||||
response = magnum.Baymodels().get(request)
|
||||
|
||||
self.assertStatusCode(response, 200)
|
||||
self.assertItemsCollectionEqual(response, TEST.baymodels.list())
|
||||
@ -44,7 +44,7 @@ class MagnumRestTestCase(test.TestCase):
|
||||
test_body = json.dumps(test_bmodel.to_dict())
|
||||
request = self.mock_rest_request(body=test_body)
|
||||
client.baymodel_create.return_value = test_bmodel
|
||||
response = magnum.BayModels().post(request)
|
||||
response = magnum.Baymodels().post(request)
|
||||
|
||||
self.assertStatusCode(response, 201)
|
||||
self.assertEqual(response['location'],
|
||||
@ -57,7 +57,7 @@ class MagnumRestTestCase(test.TestCase):
|
||||
test_baymodel = TEST.baymodels.first()
|
||||
request = self.mock_rest_request(
|
||||
body='{"baymodel_id":' + str(test_baymodel['uuid']) + '}')
|
||||
response = magnum.BayModels().delete(request)
|
||||
response = magnum.Baymodels().delete(request)
|
||||
|
||||
self.assertStatusCode(response, 204)
|
||||
client.baymodel_delete.assert_called_once_with(
|
||||
|
Loading…
x
Reference in New Issue
Block a user