mirror of https://github.com/rancher/ui.git
Translations for processes page
This commit is contained in:
parent
9ee33d8f5d
commit
0e3b51edf1
|
|
@ -4,22 +4,22 @@ export default Ember.Controller.extend({
|
|||
sortBy: 'name',
|
||||
headers: [
|
||||
{
|
||||
displayName: 'Name',
|
||||
translationKey: 'generic.name',
|
||||
name: 'name',
|
||||
sort: ['name'],
|
||||
},
|
||||
{
|
||||
displayName: 'Running',
|
||||
translationKey: 'processesPage.summary.table.running',
|
||||
name: 'running',
|
||||
sort: ['running','name'],
|
||||
},
|
||||
{
|
||||
displayName: 'Ready',
|
||||
translationKey: 'processesPage.summary.table.ready',
|
||||
name: 'ready',
|
||||
sort: ['ready','name'],
|
||||
},
|
||||
{
|
||||
displayName: 'Delayed',
|
||||
translationKey: 'processesPage.summary.table.delay',
|
||||
name: 'delay',
|
||||
sort: ['delay','name'],
|
||||
},
|
||||
|
|
|
|||
|
|
@ -20,18 +20,18 @@ export default Ember.Controller.extend({
|
|||
let which = this.get('which');
|
||||
let out = [
|
||||
{
|
||||
displayName: 'ID',
|
||||
name: 'id',
|
||||
translationKey: 'generic.id',
|
||||
sort: ['id:desc'],
|
||||
width: '75px',
|
||||
},
|
||||
{
|
||||
displayName: 'Name',
|
||||
name: 'processName',
|
||||
translationKey: 'generic.name',
|
||||
sort: ['processName','id:desc'],
|
||||
},
|
||||
{
|
||||
displayName: 'Resource',
|
||||
translationKey: 'processesPage.list.table.resource',
|
||||
name: 'resource',
|
||||
sort: ['resourceType','id:desc'],
|
||||
searchField: ['typeAndId', 'resourceType','resourceId'],
|
||||
|
|
@ -40,7 +40,7 @@ export default Ember.Controller.extend({
|
|||
|
||||
if ( which === 'completed' ) {
|
||||
out.push({
|
||||
displayName: 'Exit Reason',
|
||||
translationKey: 'processesPage.list.table.exitReason',
|
||||
name: 'exitReason',
|
||||
sort: ['exitReason','id:desc'],
|
||||
width: '150px',
|
||||
|
|
@ -48,37 +48,45 @@ export default Ember.Controller.extend({
|
|||
}
|
||||
|
||||
out.push({
|
||||
displayName: 'Start Time',
|
||||
translationKey: 'processesPage.list.table.startTime',
|
||||
name: 'startTime',
|
||||
sort: ['startTime:desc','id:desc'],
|
||||
width: '150px',
|
||||
width: '120px',
|
||||
searchField: false,
|
||||
});
|
||||
|
||||
if ( which === 'completed' ) {
|
||||
out.push({
|
||||
displayName: 'End Time',
|
||||
translationKey: 'processesPage.list.table.endTime',
|
||||
name: 'endTime',
|
||||
sort: ['endTime:desc','id:desc'],
|
||||
width: '150px',
|
||||
width: '120px',
|
||||
searchField: false,
|
||||
});
|
||||
}
|
||||
|
||||
if ( which === 'delayed' ) {
|
||||
out.push({
|
||||
displayName: 'Run Time',
|
||||
translationKey: 'processesPage.list.table.runAfter',
|
||||
name: 'runAfter',
|
||||
sort: ['runAfter:desc','id:desc'],
|
||||
width: '120px',
|
||||
searchField: false,
|
||||
});
|
||||
} else {
|
||||
out.push({
|
||||
translationKey: 'processesPage.list.table.runTime',
|
||||
name: 'runTime',
|
||||
sort: ['runTime:desc','id:desc'],
|
||||
width: '100px',
|
||||
searchField: false,
|
||||
});
|
||||
}
|
||||
|
||||
if ( which === 'delayed' ) {
|
||||
out.push({
|
||||
isActions: true,
|
||||
width: '50px',
|
||||
width: '40px',
|
||||
});
|
||||
}
|
||||
|
||||
return out;
|
||||
}.property('which'),
|
||||
|
|
|
|||
|
|
@ -49,18 +49,22 @@
|
|||
</td>
|
||||
{{/if}}
|
||||
|
||||
{{#if (eq which "delayed")}}
|
||||
<td data-title="{{dt.runAfter}}">
|
||||
{{date-calendar row.runAfter}}
|
||||
</td>
|
||||
{{else}}
|
||||
<td data-title="{{dt.runTime}}">
|
||||
{{run-time row.startTimeTS row.endTimeTS}}
|
||||
</td>
|
||||
|
||||
{{#if (eq which "delayed")}}
|
||||
<td data-title="{{t 'generic.actions'}}:" class="actions">
|
||||
<i {{action "replay" row}} class="icon icon-refresh hand"></i>
|
||||
</td>
|
||||
{{/if}}
|
||||
|
||||
<td data-title="{{t 'generic.actions'}}:" class="actions">
|
||||
{{action-menu model=row showPrimary=false}}
|
||||
</td>
|
||||
{{else if (eq kind "nomatch")}}
|
||||
<td colspan="{{headers.length}}" class="text-center text-muted lacsso pt-20 pb-20">{{t 'processesPage.list.noMatch'}}</td>
|
||||
{{else if (eq kind "norows")}}
|
||||
<td colspan="{{headers.length}}" class="text-center text-muted lacsso pt-20 pb-20">{{t 'processesPage.list.noData'}}</td>
|
||||
<td colspan="{{headers.length}}" class="text-center text-muted lacsso pt-20 pb-20">{{t 'processesPage.list.noData' which=which}}</td>
|
||||
{{/if}}
|
||||
{{/sortable-table}}
|
||||
|
|
|
|||
|
|
@ -4,38 +4,38 @@ export default Ember.Controller.extend({
|
|||
sortBy: 'name',
|
||||
headers: [
|
||||
{
|
||||
displayName: 'Name',
|
||||
translationKey: 'generic.name',
|
||||
name: 'name',
|
||||
sort: ['name'],
|
||||
width: '150px'
|
||||
},
|
||||
{
|
||||
displayName: 'Active',
|
||||
translationKey: 'processesPage.pools.table.activeTasks',
|
||||
name: 'activeTasks',
|
||||
sort: ['activeTasks','name'],
|
||||
},
|
||||
{
|
||||
displayName: 'Pool Size',
|
||||
translationKey: 'processesPage.pools.table.poolSize',
|
||||
name: 'poolSize',
|
||||
sort: ['poolSize','name'],
|
||||
},
|
||||
{
|
||||
displayName: 'Rejected',
|
||||
translationKey: 'processesPage.pools.table.rejectedTasks',
|
||||
name: 'rejectedTasks',
|
||||
sort: ['rejectedTasks','name'],
|
||||
},
|
||||
{
|
||||
displayName: 'Completed',
|
||||
translationKey: 'processesPage.pools.table.completedTasks',
|
||||
name: 'completedTasks',
|
||||
sort: ['completedTasks','name'],
|
||||
},
|
||||
{
|
||||
displayName: 'Queue Size',
|
||||
translationKey: 'processesPage.pools.table.queueSize',
|
||||
name: 'queueSize',
|
||||
sort: ['queueSize','name'],
|
||||
},
|
||||
{
|
||||
displayName: 'Queue Remain',
|
||||
translationKey: 'processesPage.pools.table.queueRemainingCapacity',
|
||||
name: 'queueRemainingCapacity',
|
||||
sort: ['queueRemainingCapacity','name'],
|
||||
},
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@
|
|||
as |row kind|
|
||||
}}
|
||||
{{#if (eq kind "row")}}
|
||||
<td data-title="{{headers.0.displayName}}: ">{{row.displayName}}</td>
|
||||
<td data-title="{{headers.1.displayName}}: " class="{{if (gte row.activeTasks row.poolSize) 'text-warning text-bold'}}">{{format-number row.activeTasks}}</td>
|
||||
<td data-title="{{headers.2.displayName}}: ">
|
||||
<td data-title="{{dt.name}}">{{row.displayName}}</td>
|
||||
<td data-title="{{dt.activeTasks}}" class="{{if (gte row.activeTasks row.poolSize) 'text-warning text-bold'}}">{{format-number row.activeTasks}}</td>
|
||||
<td data-title="{{dt.poolSize}}">
|
||||
{{~format-number row.poolSize~}}
|
||||
{{#if (or (not-eq row.poolSize row.minPoolSize) (not-eq row.poolSize row.maxPoolSize))}}
|
||||
<span class="text-muted"> (
|
||||
|
|
@ -21,10 +21,10 @@
|
|||
)</span>
|
||||
{{/if}}
|
||||
</td>
|
||||
<td data-title="{{headers.3.displayName}}: ">{{format-number row.rejectedTasks}}</td>
|
||||
<td data-title="{{headers.4.displayName}}: ">{{format-number row.completedTasks}}</td>
|
||||
<td data-title="{{headers.5.displayName}}: ">{{format-number row.queueSize}}</td>
|
||||
<td data-title="{{headers.6.displayName}}: ">
|
||||
<td data-title="{{dt.rejectedTasks}}">{{format-number row.rejectedTasks}}</td>
|
||||
<td data-title="{{dt.completedTasks}}">{{format-number row.completedTasks}}</td>
|
||||
<td data-title="{{dt.queueSize}}">{{format-number row.queueSize}}</td>
|
||||
<td data-title="{{dt.queueRemainingCapacity}}">
|
||||
{{#if (eq row.queueRemainingCapacity 2147483647)}}
|
||||
∞
|
||||
{{else}}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ export default Ember.Controller.extend({
|
|||
headers: [
|
||||
{
|
||||
classNames: '',
|
||||
displayName: 'State',
|
||||
name: 'stateSort',
|
||||
searchField: 'displayState',
|
||||
sort: ['stateSort','name','id'],
|
||||
|
|
@ -41,32 +40,27 @@ export default Ember.Controller.extend({
|
|||
width: '125px'
|
||||
},
|
||||
{
|
||||
displayName: 'Name',
|
||||
name: 'name',
|
||||
sort: ['name','id'],
|
||||
translationKey: 'containersPage.index.table.header.name',
|
||||
},
|
||||
{
|
||||
displayName: 'IP',
|
||||
name: 'displayIp',
|
||||
sort: ['displayIp','name','id'],
|
||||
width: '110px',
|
||||
translationKey: 'containersPage.index.table.header.ip',
|
||||
},
|
||||
{
|
||||
displayName: 'Host',
|
||||
name: 'primaryHost.displayName',
|
||||
sort: ['primaryHost.displayName','name','id'],
|
||||
translationKey: 'containersPage.index.table.header.host',
|
||||
},
|
||||
{
|
||||
displayName: 'Image',
|
||||
name: 'imageUuid',
|
||||
sort: ['imageUuid','id'],
|
||||
translationKey: 'containersPage.index.table.header.image',
|
||||
},
|
||||
{
|
||||
displayName: 'Command',
|
||||
name: 'command',
|
||||
sort: ['command','name','id'],
|
||||
translationKey: 'containersPage.index.table.header.command',
|
||||
|
|
|
|||
|
|
@ -9,6 +9,15 @@ var ProcessInstance = Resource.extend({
|
|||
typeAndId: Ember.computed('resourceType','resourceId', function() {
|
||||
return this.get('resourceType') + ':' + this.get('resourceId');
|
||||
}),
|
||||
|
||||
availableActions: function() {
|
||||
var a = this.get('actionLinks');
|
||||
|
||||
return [
|
||||
{ label: 'action.replay', icon: 'icon icon-refresh', action: 'replay', enabled: !!a.replay },
|
||||
{ label: 'action.viewInApi', icon: 'icon icon-external-link',action: 'goToApi', enabled: true },
|
||||
];
|
||||
}.property('actionLinks.replay'),
|
||||
});
|
||||
|
||||
export default ProcessInstance;
|
||||
|
|
|
|||
|
|
@ -34,9 +34,8 @@
|
|||
|
||||
.btn-xs I,
|
||||
.btn-group-xs > .btn I {
|
||||
/* Icons are slightly too high.. */
|
||||
position: relative;
|
||||
top: 1px;
|
||||
top: -1px;
|
||||
}
|
||||
|
||||
.dropdown-menu,
|
||||
|
|
|
|||
|
|
@ -1043,11 +1043,30 @@ processesPage:
|
|||
completed: Recently Completed
|
||||
summary:
|
||||
noData: No processes are currently scheduled
|
||||
table:
|
||||
running: Running
|
||||
ready: Ready
|
||||
delay: Delayed
|
||||
pools:
|
||||
noData: No pools found
|
||||
noMatch: No pools match the current search
|
||||
table:
|
||||
activeTasks: Active
|
||||
poolSize: Pool Size
|
||||
rejectedTasks: Rejected
|
||||
completedTasks: Completed
|
||||
queueSize: Queue Size
|
||||
queueRemainingCapacity: Queue Remain
|
||||
|
||||
list:
|
||||
noData: No processes found
|
||||
table:
|
||||
resource: Resource
|
||||
exitReason: Exit Reason
|
||||
startTime: Start Time
|
||||
endTime: End Time
|
||||
runTime: Run Time
|
||||
runAfter: Run After
|
||||
noData: 'No processes are currently {which}'
|
||||
noMatch: No processes match the current search
|
||||
|
||||
virtualMachinePage:
|
||||
|
|
@ -3320,6 +3339,7 @@ action:
|
|||
machineConfig: Machine Config
|
||||
purge: Purge
|
||||
remove: Delete
|
||||
replay: Replay
|
||||
restart: Restart
|
||||
restore: Restore
|
||||
retry: Retry
|
||||
|
|
@ -3393,3 +3413,4 @@ model:
|
|||
min: Minimum Scale
|
||||
max: Maximum Scale
|
||||
amount: By
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue