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) {
|
||||
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.baymodeldetail = {
|
||||
name: "",
|
||||
|
@ -6,13 +6,13 @@
|
||||
|
||||
<div class="form-group">
|
||||
<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"
|
||||
ng-model="model.newBaySpec.name"
|
||||
placeholder="{$ 'Name of the bay to create.'|translate $}">
|
||||
</div>
|
||||
<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"
|
||||
ng-model="model.newBaySpec.baymodel_id"
|
||||
ng-required="true"
|
||||
@ -23,26 +23,26 @@
|
||||
</div>
|
||||
|
||||
<h2 translate class="section-title">Bay Model Detail</h2>
|
||||
<div translate class="subtitle" id="baymodel_detail_none">
|
||||
<translate>Choose a Bay Model</translate>
|
||||
<div class="subtitle" id="baymodel_detail_none" translate>
|
||||
Choose a Bay Model
|
||||
</div>
|
||||
<div class="subtitle" id="baymodel_detail">
|
||||
<dl class=dl-horizontal>
|
||||
<dt><translate>Name</translate></dt>
|
||||
<dt translate>Name</dt>
|
||||
<dd>{$ baymodeldetail.name $}</dd>
|
||||
<dt><translate>ID</translate></dt>
|
||||
<dt translate>ID</dt>
|
||||
<dd>{$ baymodeldetail.id $}</dd>
|
||||
<dt><translate>COE</translate></dt>
|
||||
<dt translate>COE</dt>
|
||||
<dd>{$ baymodeldetail.coe $}</dd>
|
||||
<dt><translate>Image ID</translate></dt>
|
||||
<dt translate>Image ID</dt>
|
||||
<dd>{$ baymodeldetail.image_id $}</dd>
|
||||
<dt><translate>Public</translate></dt>
|
||||
<dt translate>Public</dt>
|
||||
<dd>{$ baymodeldetail.public $}</dd>
|
||||
<dt><translate>Registry Enabled</translate></dt>
|
||||
<dt translate>Registry Enabled</dt>
|
||||
<dd>{$ baymodeldetail.registry_enabled $}</dd>
|
||||
<dt><translate>TLS Disabled</translate></dt>
|
||||
<dt translate>TLS Disabled</dt>
|
||||
<dd>{$ baymodeldetail.tls_disabled $}</dd>
|
||||
<dt><translate>API Server Port</translate></dt>
|
||||
<dt translate>API Server Port</dt>
|
||||
<dd>{$ baymodeldetail.apiserver_port $}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
@ -6,13 +6,13 @@
|
||||
|
||||
<div class="form-group">
|
||||
<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"
|
||||
ng-model="model.newBaySpec.discovery_url"
|
||||
placeholder="{$ 'Specifies custom discovery url for node discovery.'|translate $}">
|
||||
</div>
|
||||
<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"
|
||||
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 $}">
|
||||
|
@ -6,14 +6,14 @@
|
||||
|
||||
<div class="form-group">
|
||||
<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]+$/"
|
||||
class="form-control input-sm"
|
||||
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</translate></label>
|
||||
<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"
|
||||
|
@ -25,7 +25,7 @@
|
||||
class="btn btn-default btn-sm btn-launch ng-scope"
|
||||
ng-controller="containersBayModalController as modal"
|
||||
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>
|
||||
</action-list>
|
||||
<action-list class="btn-addon">
|
||||
@ -33,8 +33,7 @@
|
||||
action-classes="'btn btn-default btn-sm btn-danger'"
|
||||
disabled="numSelected === 0"
|
||||
callback="table.batchDelete">
|
||||
<i class="fa fa-trash-o"></i>
|
||||
<translate>Delete Bays</translate>
|
||||
<span class="fa fa-trash-o" translate>Delete Bays</span>
|
||||
</action>
|
||||
</action-list>
|
||||
</th>
|
||||
@ -50,28 +49,28 @@
|
||||
|
||||
<th class="expander"></th>
|
||||
|
||||
<th class="rsp-p1" st-sort="name" st-sort-default>
|
||||
<translate>Name</translate>
|
||||
<th class="rsp-p1" st-sort="name" st-sort-default translate>
|
||||
Name
|
||||
</th>
|
||||
|
||||
<th class="rsp-p2" st-sort="id" >
|
||||
<translate>ID</translate>
|
||||
<th class="rsp-p2" st-sort="id" translate>
|
||||
ID
|
||||
</th>
|
||||
|
||||
<th class="rsp-p1" st-sort="status" >
|
||||
<translate>Status</translate>
|
||||
<th class="rsp-p1" st-sort="status" translate>
|
||||
Status
|
||||
</th>
|
||||
|
||||
<th class="rsp-p2" st-sort="master_count" >
|
||||
<translate>Master Count</translate>
|
||||
<th class="rsp-p2" st-sort="master_count" translate>
|
||||
Master Count
|
||||
</th>
|
||||
|
||||
<th class="rsp-p2" st-sort="node_count" >
|
||||
<translate>Node Count</translate>
|
||||
<th class="rsp-p2" st-sort="node_count" translate>
|
||||
Node Count
|
||||
</th>
|
||||
|
||||
<th class="action-col">
|
||||
<translate>Actions</translate>
|
||||
<th class="action-col" translate>
|
||||
Actions
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -133,29 +132,29 @@
|
||||
<td class="detail" colspan="100">
|
||||
<dl class=dl-horizontal>
|
||||
|
||||
<dt><translate>Name</translate></dt>
|
||||
<dt translate>Name</dt>
|
||||
<dd>{$ b.name $}</dd>
|
||||
|
||||
<dt><translate>ID</translate></dt>
|
||||
<dt translate>ID</dt>
|
||||
<dd>{$ b.id $}</dd>
|
||||
|
||||
<dt><translate>Status</translate></dt>
|
||||
<dt translate>Status</dt>
|
||||
<dd>{$ b.status $}</dd>
|
||||
|
||||
<!--
|
||||
TODO (bradjones): Baymodel should link to the baymodel resource in
|
||||
the UI
|
||||
-->
|
||||
<dt><translate>BayModel</translate></dt>
|
||||
<dt translate>BayModel</dt>
|
||||
<dd>{$ b.baymodel_id $}</dd>
|
||||
|
||||
<dt><translate>Master Count</translate></dt>
|
||||
<dt translate>Master Count</dt>
|
||||
<dd>{$ b.master_count $}</dd>
|
||||
|
||||
<dt><translate>Node Count</translate></dt>
|
||||
<dt translate>Node Count</dt>
|
||||
<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>
|
||||
</dl>
|
||||
</td>
|
||||
|
Loading…
x
Reference in New Issue
Block a user