Merge "Refactor translate attribute and gettext() in bay panel"
This commit is contained in:
commit
552a9ee56f
magnum_ui/static/dashboard/containers/bay
@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
function createBayInfoController($q, $scope, basePath, magnum) {
|
function createBayInfoController($q, $scope, basePath, magnum) {
|
||||||
var ctrl = this;
|
var ctrl = this;
|
||||||
ctrl.baymodels = [{id:"", name: "Choose a Bay Model"}];
|
ctrl.baymodels = [{id:"", name: gettext("Choose a Bay Model")}];
|
||||||
$scope.model.newBaySpec.baymodel_id = "";
|
$scope.model.newBaySpec.baymodel_id = "";
|
||||||
$scope.baymodeldetail = {
|
$scope.baymodeldetail = {
|
||||||
name: "",
|
name: "",
|
||||||
|
@ -6,13 +6,13 @@
|
|||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="form-field bay-name">
|
<div class="form-field bay-name">
|
||||||
<label class="on-top"><translate>Bay Name</translate></label>
|
<label class="on-top" translate>Bay Name</label>
|
||||||
<input name="bay-name" type="text" class="form-control input-sm"
|
<input name="bay-name" type="text" class="form-control input-sm"
|
||||||
ng-model="model.newBaySpec.name"
|
ng-model="model.newBaySpec.name"
|
||||||
placeholder="{$ 'Name of the bay to create.'|translate $}">
|
placeholder="{$ 'Name of the bay to create.'|translate $}">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-field required bay-model">
|
<div class="form-field required bay-model">
|
||||||
<label class="on-top"><translate>Bay Model</translate></label>
|
<label class="on-top" translate>Bay Model</label>
|
||||||
<select class="form-control" name="bay-model"
|
<select class="form-control" name="bay-model"
|
||||||
ng-model="model.newBaySpec.baymodel_id"
|
ng-model="model.newBaySpec.baymodel_id"
|
||||||
ng-required="true"
|
ng-required="true"
|
||||||
@ -23,26 +23,26 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2 translate class="section-title">Bay Model Detail</h2>
|
<h2 translate class="section-title">Bay Model Detail</h2>
|
||||||
<div translate class="subtitle" id="baymodel_detail_none">
|
<div class="subtitle" id="baymodel_detail_none" translate>
|
||||||
<translate>Choose a Bay Model</translate>
|
Choose a Bay Model
|
||||||
</div>
|
</div>
|
||||||
<div class="subtitle" id="baymodel_detail">
|
<div class="subtitle" id="baymodel_detail">
|
||||||
<dl class=dl-horizontal>
|
<dl class=dl-horizontal>
|
||||||
<dt><translate>Name</translate></dt>
|
<dt translate>Name</dt>
|
||||||
<dd>{$ baymodeldetail.name $}</dd>
|
<dd>{$ baymodeldetail.name $}</dd>
|
||||||
<dt><translate>ID</translate></dt>
|
<dt translate>ID</dt>
|
||||||
<dd>{$ baymodeldetail.id $}</dd>
|
<dd>{$ baymodeldetail.id $}</dd>
|
||||||
<dt><translate>COE</translate></dt>
|
<dt translate>COE</dt>
|
||||||
<dd>{$ baymodeldetail.coe $}</dd>
|
<dd>{$ baymodeldetail.coe $}</dd>
|
||||||
<dt><translate>Image ID</translate></dt>
|
<dt translate>Image ID</dt>
|
||||||
<dd>{$ baymodeldetail.image_id $}</dd>
|
<dd>{$ baymodeldetail.image_id $}</dd>
|
||||||
<dt><translate>Public</translate></dt>
|
<dt translate>Public</dt>
|
||||||
<dd>{$ baymodeldetail.public $}</dd>
|
<dd>{$ baymodeldetail.public $}</dd>
|
||||||
<dt><translate>Registry Enabled</translate></dt>
|
<dt translate>Registry Enabled</dt>
|
||||||
<dd>{$ baymodeldetail.registry_enabled $}</dd>
|
<dd>{$ baymodeldetail.registry_enabled $}</dd>
|
||||||
<dt><translate>TLS Disabled</translate></dt>
|
<dt translate>TLS Disabled</dt>
|
||||||
<dd>{$ baymodeldetail.tls_disabled $}</dd>
|
<dd>{$ baymodeldetail.tls_disabled $}</dd>
|
||||||
<dt><translate>API Server Port</translate></dt>
|
<dt translate>API Server Port</dt>
|
||||||
<dd>{$ baymodeldetail.apiserver_port $}</dd>
|
<dd>{$ baymodeldetail.apiserver_port $}</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
@ -6,13 +6,13 @@
|
|||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="form-field bay-discovery-url">
|
<div class="form-field bay-discovery-url">
|
||||||
<label class="on-top"><translate>Discovery URL</translate></label>
|
<label class="on-top" translate>Discovery URL</label>
|
||||||
<input name="bay-discovery-url" type="text" class="form-control input-sm"
|
<input name="bay-discovery-url" type="text" class="form-control input-sm"
|
||||||
ng-model="model.newBaySpec.discovery_url"
|
ng-model="model.newBaySpec.discovery_url"
|
||||||
placeholder="{$ 'Specifies custom discovery url for node discovery.'|translate $}">
|
placeholder="{$ 'Specifies custom discovery url for node discovery.'|translate $}">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-field bay-timeout">
|
<div class="form-field bay-timeout">
|
||||||
<label class="on-top"><translate>Timeout</translate></label>
|
<label class="on-top" translate>Timeout</label>
|
||||||
<input name="bay-timeout" type="number" ng-pattern="/^[0-9]+$/" class="form-control input-sm"
|
<input name="bay-timeout" type="number" ng-pattern="/^[0-9]+$/" class="form-control input-sm"
|
||||||
ng-model="model.newBaySpec.bay_create_timeout"
|
ng-model="model.newBaySpec.bay_create_timeout"
|
||||||
placeholder="{$ 'The timeout for bay creation in minutes. Set to 0 for no timeout. The default is no timeout.'|translate $}">
|
placeholder="{$ 'The timeout for bay creation in minutes. Set to 0 for no timeout. The default is no timeout.'|translate $}">
|
||||||
|
@ -6,14 +6,14 @@
|
|||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="form-field bay-master-count">
|
<div class="form-field bay-master-count">
|
||||||
<label class="on-top"><translate>Master Count</translate></label>
|
<label class="on-top" translate>Master Count</label>
|
||||||
<input name="bay-master-count" type="number" ng-pattern="/^[0-9]+$/"
|
<input name="bay-master-count" type="number" ng-pattern="/^[0-9]+$/"
|
||||||
class="form-control input-sm"
|
class="form-control input-sm"
|
||||||
ng-model="model.newBaySpec.master_count"
|
ng-model="model.newBaySpec.master_count"
|
||||||
placeholder="{$ 'The bay node count.'|translate $}">
|
placeholder="{$ 'The bay node count.'|translate $}">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-field bay-node-count">
|
<div class="form-field bay-node-count">
|
||||||
<label class="on-top"><translate>Node Count</translate></label>
|
<label class="on-top" translate>Node Count</label>
|
||||||
<input name="bay-node-count" type="number" ng-pattern="/^[0-9]+$/"
|
<input name="bay-node-count" type="number" ng-pattern="/^[0-9]+$/"
|
||||||
class="form-control input-sm"
|
class="form-control input-sm"
|
||||||
ng-model="model.newBaySpec.node_count"
|
ng-model="model.newBaySpec.node_count"
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
class="btn btn-default btn-sm btn-launch ng-scope"
|
class="btn btn-default btn-sm btn-launch ng-scope"
|
||||||
ng-controller="containersBayModalController as modal"
|
ng-controller="containersBayModalController as modal"
|
||||||
ng-click="modal.openBayCreateWizard({successUrl: '/containers/'})">
|
ng-click="modal.openBayCreateWizard({successUrl: '/containers/'})">
|
||||||
<span class="fa fa-plus"> <translate>Create Bay</translate></span>
|
<span class="fa fa-plus" translate>Create Bay</span>
|
||||||
</a>
|
</a>
|
||||||
</action-list>
|
</action-list>
|
||||||
<action-list class="btn-addon">
|
<action-list class="btn-addon">
|
||||||
@ -33,8 +33,7 @@
|
|||||||
action-classes="'btn btn-default btn-sm btn-danger'"
|
action-classes="'btn btn-default btn-sm btn-danger'"
|
||||||
disabled="numSelected === 0"
|
disabled="numSelected === 0"
|
||||||
callback="table.batchDelete">
|
callback="table.batchDelete">
|
||||||
<i class="fa fa-trash-o"></i>
|
<span class="fa fa-trash-o" translate>Delete Bays</span>
|
||||||
<translate>Delete Bays</translate>
|
|
||||||
</action>
|
</action>
|
||||||
</action-list>
|
</action-list>
|
||||||
</th>
|
</th>
|
||||||
@ -50,28 +49,28 @@
|
|||||||
|
|
||||||
<th class="expander"></th>
|
<th class="expander"></th>
|
||||||
|
|
||||||
<th class="rsp-p1" st-sort="name" st-sort-default>
|
<th class="rsp-p1" st-sort="name" st-sort-default translate>
|
||||||
<translate>Name</translate>
|
Name
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th class="rsp-p2" st-sort="id" >
|
<th class="rsp-p2" st-sort="id" translate>
|
||||||
<translate>ID</translate>
|
ID
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th class="rsp-p1" st-sort="status" >
|
<th class="rsp-p1" st-sort="status" translate>
|
||||||
<translate>Status</translate>
|
Status
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th class="rsp-p2" st-sort="master_count" >
|
<th class="rsp-p2" st-sort="master_count" translate>
|
||||||
<translate>Master Count</translate>
|
Master Count
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th class="rsp-p2" st-sort="node_count" >
|
<th class="rsp-p2" st-sort="node_count" translate>
|
||||||
<translate>Node Count</translate>
|
Node Count
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th class="action-col">
|
<th class="action-col" translate>
|
||||||
<translate>Actions</translate>
|
Actions
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@ -133,29 +132,29 @@
|
|||||||
<td class="detail" colspan="100">
|
<td class="detail" colspan="100">
|
||||||
<dl class=dl-horizontal>
|
<dl class=dl-horizontal>
|
||||||
|
|
||||||
<dt><translate>Name</translate></dt>
|
<dt translate>Name</dt>
|
||||||
<dd>{$ b.name $}</dd>
|
<dd>{$ b.name $}</dd>
|
||||||
|
|
||||||
<dt><translate>ID</translate></dt>
|
<dt translate>ID</dt>
|
||||||
<dd>{$ b.id $}</dd>
|
<dd>{$ b.id $}</dd>
|
||||||
|
|
||||||
<dt><translate>Status</translate></dt>
|
<dt translate>Status</dt>
|
||||||
<dd>{$ b.status $}</dd>
|
<dd>{$ b.status $}</dd>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
TODO (bradjones): Baymodel should link to the baymodel resource in
|
TODO (bradjones): Baymodel should link to the baymodel resource in
|
||||||
the UI
|
the UI
|
||||||
-->
|
-->
|
||||||
<dt><translate>BayModel</translate></dt>
|
<dt translate>BayModel</dt>
|
||||||
<dd>{$ b.baymodel_id $}</dd>
|
<dd>{$ b.baymodel_id $}</dd>
|
||||||
|
|
||||||
<dt><translate>Master Count</translate></dt>
|
<dt translate>Master Count</dt>
|
||||||
<dd>{$ b.master_count $}</dd>
|
<dd>{$ b.master_count $}</dd>
|
||||||
|
|
||||||
<dt><translate>Node Count</translate></dt>
|
<dt translate>Node Count</dt>
|
||||||
<dd>{$ b.node_count $}</dd>
|
<dd>{$ b.node_count $}</dd>
|
||||||
|
|
||||||
<dt><translate>Node Addresses</translate></dt>
|
<dt translate>Node Addresses</dt>
|
||||||
<dd ng-repeat="addr in b.node_addresses">{$ addr $}</dd>
|
<dd ng-repeat="addr in b.node_addresses">{$ addr $}</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</td>
|
</td>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user