Re-fix workflow styles
This patch fixes workflow styles again. Change-Id: I9ba14dbb1ab46355714e07252210abb2470df61f Closes-Bug: #1554527
This commit is contained in:
parent
c3494b3fce
commit
a6e326d72d
@ -23,7 +23,7 @@
|
||||
* @ngModule
|
||||
*
|
||||
* @description
|
||||
* Provides all the services and widgets require to display the bay model
|
||||
* Provides all the services and widgets require to display the baymodel
|
||||
* panel
|
||||
*/
|
||||
angular
|
||||
@ -34,7 +34,7 @@
|
||||
/**
|
||||
* @ngdoc constant
|
||||
* @name horizon.dashboard.containers.baymodels.events
|
||||
* @description A list of events used by Bay Models
|
||||
* @description A list of events used by Baymodels
|
||||
*/
|
||||
function events() {
|
||||
return {
|
||||
|
@ -1,10 +1,10 @@
|
||||
<dl>
|
||||
<dt translate>Bay Model Name</dt>
|
||||
<dt translate>Baymodel 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>
|
||||
<dd translate>Make baymodel 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>
|
||||
|
@ -2,13 +2,14 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="baymodel-name" translate>Bay Model Name</label>
|
||||
<label class="control-label" for="baymodel-name" translate>Baymodel Name</label>
|
||||
<input name="baymodel-name" type="text" class="form-control" id="baymodel-name"
|
||||
ng-model="model.newBaymodelSpec.name">
|
||||
ng-model="model.newBaymodelSpec.name"
|
||||
placeholder="{$ 'Name of the baymodel to create.'|translate $}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="baymodel-coe" translate>
|
||||
Container Orchestration Engine
|
||||
<label class="control-label" for="baymodel-coe">
|
||||
<translate>Container Orchestration Engine</translate>
|
||||
<span class="hz-icon-required fa fa-asterisk"></span>
|
||||
</label>
|
||||
<select class="form-control" name="baymodel-coe" id="baymodel-coe"
|
||||
@ -21,7 +22,7 @@
|
||||
<div class="form-group">
|
||||
<div class="themable-checkbox">
|
||||
<input name="baymodel-public" type="checkbox" id="baymodel-public"
|
||||
ng-model="model.newBaymodelSpec.public" translate>
|
||||
ng-model="model.newBaymodelSpec.public">
|
||||
<label for="baymodel-public" translate>Public</label>
|
||||
</div>
|
||||
</div>
|
||||
@ -35,7 +36,7 @@
|
||||
<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>
|
||||
ng-model="model.newBaymodelSpec.tls_disabled">
|
||||
<label for="baymodel-tls-disabled" translate>Disable TLS</label>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,4 +1 @@
|
||||
<div>
|
||||
<h3 translate>Description:</h3>
|
||||
<p translate>Arbitrary labels in the form of key=value pairs to associate with a baymodel. May be used multiple times.</p>
|
||||
</div>
|
||||
<p translate>Arbitrary labels in the form of key=value pairs to associate with a baymodel. May be used multiple times.</p>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<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 $}">
|
||||
placeholder="{$ 'KEY1=VALUE1,KEY2=VALUE2...'|translate $}"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -32,9 +32,9 @@
|
||||
placeholder="{$ 'The no_proxy address to use for nodes in bay'|translate $}">
|
||||
</div>
|
||||
<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 class="control-label" for="baymodel-external-network-id">
|
||||
<translate>External Network ID</translate>
|
||||
<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"
|
||||
|
@ -3,7 +3,7 @@
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="baymodel-image-id">
|
||||
<translate>Image</span>
|
||||
<translate>Image</translate>
|
||||
<span class="hz-icon-required fa fa-asterisk"></span>
|
||||
</label>
|
||||
<select name="baymodel-image-id" type="text" class="form-control" id="baymodel-image-id"
|
||||
@ -45,7 +45,7 @@
|
||||
<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]+$/"
|
||||
<input name="baymodel-docker-volume-size" type="number"
|
||||
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 $}">
|
||||
|
@ -52,31 +52,21 @@
|
||||
};
|
||||
|
||||
$scope.changeBaymodel = function(){
|
||||
// show Baymodel Detail
|
||||
if(!$scope.model.newBaySpec.baymodel_id){
|
||||
$("#baymodel_detail").hide();
|
||||
$("#baymodel_detail_none").show();
|
||||
} else {
|
||||
angular.forEach(ctrl.baymodels, function(model, idx){
|
||||
if($scope.model.newBaySpec.baymodel_id === model.id){
|
||||
$("#baymodel_detail").show();
|
||||
$("#baymodel_detail_none").hide();
|
||||
$scope.baymodeldetail.name = model.name;
|
||||
$scope.baymodeldetail.id = model.id;
|
||||
$scope.baymodeldetail.coe = model.coe;
|
||||
$scope.baymodeldetail.image_id = model.image_id;
|
||||
$scope.baymodeldetail.public = model.public;
|
||||
$scope.baymodeldetail.registry_enabled = model.registry_enabled;
|
||||
$scope.baymodeldetail.tls_disabled = model.tls_disabled;
|
||||
$scope.baymodeldetail.apiserver_port = model.apiserver_port;
|
||||
}
|
||||
});
|
||||
}
|
||||
angular.forEach(ctrl.baymodels, function(model, idx){
|
||||
if($scope.model.newBaySpec.baymodel_id === model.id){
|
||||
$scope.baymodeldetail.name = model.name;
|
||||
$scope.baymodeldetail.id = model.id;
|
||||
$scope.baymodeldetail.coe = model.coe;
|
||||
$scope.baymodeldetail.image_id = model.image_id;
|
||||
$scope.baymodeldetail.public = model.public;
|
||||
$scope.baymodeldetail.registry_enabled = model.registry_enabled;
|
||||
$scope.baymodeldetail.tls_disabled = model.tls_disabled;
|
||||
$scope.baymodeldetail.apiserver_port = model.apiserver_port;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
init();
|
||||
$("#baymodel_detail").hide();
|
||||
$("#baymodel_detail_none").show();
|
||||
|
||||
function init() {
|
||||
magnum.getBaymodels({paginate: false}).success(onGetBaymodels);
|
||||
|
@ -1,6 +1 @@
|
||||
<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>
|
||||
<p translate>Specify bay name and choose baymodel</p>
|
||||
|
@ -5,12 +5,13 @@
|
||||
<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">
|
||||
ng-model="model.newBaySpec.name"
|
||||
placeholder="{$ 'Name of the bay to create.'|translate $}">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="bay-model" translate>
|
||||
Baymodel
|
||||
<label class="control-label" for="bay-model">
|
||||
<translate>Baymodel</translate>
|
||||
<span class="hz-icon-required fa fa-asterisk"></span>
|
||||
</label>
|
||||
<select class="form-control" name="bay-model" id="bay-model"
|
||||
|
@ -1,6 +1,4 @@
|
||||
<div ng-controller="createBayMiscController as ctrl">
|
||||
<p translate>Please provide the miscellaneous for creation of the Bay.</p>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
@ -11,7 +9,7 @@
|
||||
</div>
|
||||
<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"
|
||||
<input name="bay-timeout" type="number" min="0" 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>
|
||||
|
@ -1,20 +1,19 @@
|
||||
<div ng-controller="createBaySizeController as ctrl">
|
||||
<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"
|
||||
<input name="bay-master-count" type="number" min="1" id="bay-master-count"
|
||||
class="form-control" ng-model="model.newBaySpec.master_count"
|
||||
placeholder="{$ 'The bay node count.'|translate $}">
|
||||
placeholder="{$ 'The number of master nodes for the bay.'|translate $}">
|
||||
</div>
|
||||
</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"
|
||||
<input name="bay-node-count" type="number" min="1" id="bay-node-count"
|
||||
class="form-control" ng-model="model.newBaySpec.node_count"
|
||||
placeholder="{$ 'The number of master nodes for the bay.'|translate $}">
|
||||
placeholder="{$ 'The bay node count.'|translate $}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -58,10 +58,10 @@
|
||||
function onGetBay(bay) {
|
||||
ctrl.bay = bay;
|
||||
ctrl.bay.id = bay.uuid;
|
||||
magnum.getBayModel(ctrl.bay.baymodel_id).success(onGetBayModel);
|
||||
magnum.getBaymodel(ctrl.bay.baymodel_id).success(onGetBaymodel);
|
||||
}
|
||||
|
||||
function onGetBayModel(baymodel) {
|
||||
function onGetBaymodel(baymodel) {
|
||||
ctrl.baymodel = baymodel;
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
<tab heading="{$ 'Overview' | translate $}">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<h3 translate>Bay Model</h3>
|
||||
<h3 translate>Baymodel</h3>
|
||||
<hr class="header-rule">
|
||||
<dl class="dl-horizontal">
|
||||
<div class="{$ propertyClasses $}">
|
||||
|
@ -1,2 +0,0 @@
|
||||
// Custom Style Variables
|
||||
@import "create/info/info";
|
@ -40,8 +40,8 @@
|
||||
bay_uuid: null,
|
||||
image: null,
|
||||
memory: null,
|
||||
memorysize: null,
|
||||
memoryunit: "m",
|
||||
memory_size: null,
|
||||
memory_unit: "m",
|
||||
command: null
|
||||
};
|
||||
}
|
||||
@ -63,7 +63,7 @@
|
||||
// Initially clean fields that don't have any value.
|
||||
for (var key in finalSpec) {
|
||||
if (finalSpec.hasOwnProperty(key) && finalSpec[key] === null
|
||||
|| key === "memorysize" || key === "memoryunit") {
|
||||
|| key === "memory_size" || key === "memory_unit") {
|
||||
delete finalSpec[key];
|
||||
}
|
||||
}
|
||||
|
@ -51,30 +51,22 @@
|
||||
};
|
||||
|
||||
$scope.changeBay = function(){
|
||||
// show Bay Detail
|
||||
if(!$scope.model.newContainerSpec.bay_uuid){
|
||||
$("#bay_detail").hide();
|
||||
$("#bay_detail_none").show();
|
||||
} else {
|
||||
angular.forEach(ctrl.bays, function(bay, idx){
|
||||
if($scope.model.newContainerSpec.bay_uuid === bay.id){
|
||||
$("#bay_detail").show();
|
||||
$("#bay_detail_none").hide();
|
||||
$scope.baydetail.name = bay.name;
|
||||
$scope.baydetail.id = bay.id;
|
||||
$scope.baydetail.baymodel_id = bay.baymodel_id;
|
||||
$scope.baydetail.master_count = bay.master_count;
|
||||
$scope.baydetail.node_count = bay.node_count;
|
||||
$scope.baydetail.discovery_url = bay.discovery_url;
|
||||
$scope.baydetail.timeout = bay.timeout;
|
||||
}
|
||||
});
|
||||
}
|
||||
angular.forEach(ctrl.bays, function(bay, idx){
|
||||
if($scope.model.newContainerSpec.bay_uuid === bay.id){
|
||||
$("#bay_detail").show();
|
||||
$("#bay_detail_none").hide();
|
||||
$scope.baydetail.name = bay.name;
|
||||
$scope.baydetail.id = bay.id;
|
||||
$scope.baydetail.baymodel_id = bay.baymodel_id;
|
||||
$scope.baydetail.master_count = bay.master_count;
|
||||
$scope.baydetail.node_count = bay.node_count;
|
||||
$scope.baydetail.discovery_url = bay.discovery_url;
|
||||
$scope.baydetail.timeout = bay.timeout;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
init();
|
||||
$("#bay_detail").hide();
|
||||
$("#bay_detail_none").show();
|
||||
|
||||
function init() {
|
||||
magnum.getBays({paginate: false}).success(onGetBays);
|
||||
@ -87,7 +79,5 @@
|
||||
$scope.changeBay();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
})();
|
||||
|
@ -1,9 +1,6 @@
|
||||
<div ng-controller="createContainerInfoController as ctrl">
|
||||
<p translate>Please provide the name of the Container.</p>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="container-name" translate>
|
||||
Container Name
|
||||
@ -12,7 +9,6 @@
|
||||
ng-model="model.newContainerSpec.name"
|
||||
placeholder="{$ 'Name of the container to create.'|translate $}">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="container-bay">
|
||||
<translate>Bay</translate>
|
||||
@ -25,7 +21,7 @@
|
||||
ng-change="changeBay()">
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="detail" ng-show="model.newContainerSpec.bay_uuid">
|
||||
<span translate class="h4">Bay Detail</span>
|
||||
<dl class="dl-horizontal">
|
||||
|
@ -1,13 +0,0 @@
|
||||
.container-memory {
|
||||
.input-group {
|
||||
width: 100%;
|
||||
|
||||
.container-memorysize {
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
.container-memoryunit {
|
||||
width: 30%;
|
||||
}
|
||||
}
|
||||
}
|
@ -38,16 +38,16 @@
|
||||
|
||||
function createContainerSpecController($q, $scope, basePath, magnum) {
|
||||
var ctrl = this;
|
||||
ctrl.memoryunits = [{unit: "b", label: gettext("bytes")},
|
||||
ctrl.memory_units = [{unit: "b", label: gettext("bytes")},
|
||||
{unit: "k", label: gettext("KB")},
|
||||
{unit: "m", label: gettext("MB")},
|
||||
{unit: "g", label: gettext("GB")}];
|
||||
|
||||
$scope.changeMemory = function(){
|
||||
if($scope.model.newContainerSpec.memorysize > 0){
|
||||
$scope.model.newContainerSpec.memory = $scope.model.newContainerSpec.memorysize + $scope.model.newContainerSpec.memoryunit;
|
||||
if($scope.model.newContainerSpec.memory_size > 0){
|
||||
$scope.model.newContainerSpec.memory = $scope.model.newContainerSpec.memory_size + $scope.model.newContainerSpec.memory_unit;
|
||||
}else{
|
||||
$scope.model.newContainerSpec.memory = "";
|
||||
$scope.model.newContainerSpec.memory = null;
|
||||
}
|
||||
};
|
||||
$scope.changeMemoryUnit = function(){
|
||||
|
@ -1,9 +1,6 @@
|
||||
<div ng-controller="createContainerSpecController as ctrl">
|
||||
<p translate>Please provide the specs for this Container.</p>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="container-image" translate>
|
||||
<translate>Image</translate>
|
||||
@ -19,20 +16,20 @@
|
||||
<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"
|
||||
<label class="control-label" for="container-memory-size" translate>Memory Size</label>
|
||||
<input name="container-memory-size" type="number" min="1"
|
||||
class="form-control" ng-model="model.newContainerSpec.memory_size"
|
||||
placeholder="{$ 'The container memory size.'|translate $}"
|
||||
ng-change="changeMemorySize()" id="container-memorysize">
|
||||
ng-change="changeMemorySize()" id="container-memory-size">
|
||||
</div>
|
||||
</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()">
|
||||
<label class="control-label" for="container-memory-unit" translate>Memory Unit</label>
|
||||
<select name="container-memory-unit" id="container-memory-unit"
|
||||
class="form-control" ng-options="mu.unit as mu.label for mu in ctrl.memory_units"
|
||||
ng-model="model.newContainerSpec.memory_unit" ng-change="changeMemoryUnit()">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -60,10 +60,10 @@
|
||||
|
||||
function onGetBay(bay) {
|
||||
ctrl.bay = bay;
|
||||
magnum.getBayModel(ctrl.bay.baymodel_id).success(onGetBayModel);
|
||||
magnum.getBaymodel(ctrl.bay.baymodel_id).success(onGetBaymodel);
|
||||
}
|
||||
|
||||
function onGetBayModel(baymodel) {
|
||||
function onGetBaymodel(baymodel) {
|
||||
ctrl.baymodel = baymodel;
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<h3 translate>Bay Model</h3>
|
||||
<h3 translate>Baymodel</h3>
|
||||
<hr class="header-rule">
|
||||
<dl class="dl-horizontal">
|
||||
<div class="{$ propertyClasses $}">
|
||||
|
@ -191,7 +191,7 @@
|
||||
function convertMemorySize(container){
|
||||
container.memorysize = "";
|
||||
container.memoryunit = "";
|
||||
if(container.memory !== null){
|
||||
if(container.memory !== null && container.memory !== ""){
|
||||
// separate number and unit.
|
||||
var regex = /(\d+)([bkmg]?)/;
|
||||
var match = regex.exec(container.memory);
|
||||
|
Loading…
Reference in New Issue
Block a user