Use the active/inactive status instead of running/exited/dead in service views

This commit is contained in:
Alexandre Aubin 2018-06-12 01:40:18 +02:00
parent c9a9658279
commit 877e303e74
4 changed files with 5 additions and 4 deletions

View file

@ -48,9 +48,9 @@
data2.service.name = c.params['service']; data2.service.name = c.params['service'];
// Handlebars want booleans // Handlebars want booleans
data2.service.is_loaded = (data.loaded=='enabled') ? true : false; data2.service.is_loaded = (data.loaded=='enabled') ? true : false;
data2.service.is_running = (data.status=='running') ? true : false; data2.service.is_running = (data.active=='active') ? true : false;
// Translate status and loaded state // Translate status and loaded state
data2.service.status = y18n.t(data.status); data2.service.active = y18n.t(data.active);
data2.service.loaded = y18n.t(data.loaded); data2.service.loaded = y18n.t(data.loaded);
store.clear('slide'); store.clear('slide');
c.view('service/service_info', data2); c.view('service/service_info', data2);

View file

@ -1,5 +1,6 @@
{ {
"action": "Action", "action": "Action",
"active": "Active",
"add": "Add", "add": "Add",
"remove": "Remove", "remove": "Remove",
"administration_password": "Administration password", "administration_password": "Administration password",

View file

@ -39,7 +39,7 @@
<br> <br>
{{t 'service_status'}} {{t 'service_status'}}
<span class="text-{{#is_running}}success{{/is_running}}{{^is_running}}danger{{/is_running}}"> <span class="text-{{#is_running}}success{{/is_running}}{{^is_running}}danger{{/is_running}}">
{{status}} {{active}}
</span> </span>
<br> <br>
{{t 'started_at'}} {{t 'started_at'}}

View file

@ -13,7 +13,7 @@
<div class="list-group-item-text"> <div class="list-group-item-text">
{{t 'service_status'}} {{t 'service_status'}}
<span class="text-{{#is_running}}success{{/is_running}}{{^is_running}}danger{{/is_running}}"> <span class="text-{{#is_running}}success{{/is_running}}{{^is_running}}danger{{/is_running}}">
{{status}} {{active}}
</span> </span>
<br> <br>
{{t 'started_at'}} {{t 'started_at'}}