From 877e303e74542d7320de3869bdea7549611ccccb Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 12 Jun 2018 01:40:18 +0200 Subject: [PATCH 1/2] Use the active/inactive status instead of running/exited/dead in service views --- src/js/yunohost/controllers/services.js | 4 ++-- src/locales/en.json | 1 + src/views/service/service_info.ms | 2 +- src/views/service/service_list.ms | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/js/yunohost/controllers/services.js b/src/js/yunohost/controllers/services.js index ffb6fa1d..1385583b 100644 --- a/src/js/yunohost/controllers/services.js +++ b/src/js/yunohost/controllers/services.js @@ -48,9 +48,9 @@ data2.service.name = c.params['service']; // Handlebars want booleans 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 - data2.service.status = y18n.t(data.status); + data2.service.active = y18n.t(data.active); data2.service.loaded = y18n.t(data.loaded); store.clear('slide'); c.view('service/service_info', data2); diff --git a/src/locales/en.json b/src/locales/en.json index 8fc55239..719285f3 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -1,5 +1,6 @@ { "action": "Action", + "active": "Active", "add": "Add", "remove": "Remove", "administration_password": "Administration password", diff --git a/src/views/service/service_info.ms b/src/views/service/service_info.ms index cc584758..869e7a27 100644 --- a/src/views/service/service_info.ms +++ b/src/views/service/service_info.ms @@ -39,7 +39,7 @@
{{t 'service_status'}} - {{status}} + {{active}}
{{t 'started_at'}} diff --git a/src/views/service/service_list.ms b/src/views/service/service_list.ms index 883c9c22..55848ba6 100644 --- a/src/views/service/service_list.ms +++ b/src/views/service/service_list.ms @@ -13,7 +13,7 @@
{{t 'service_status'}} - {{status}} + {{active}}
{{t 'started_at'}} From a34784bd38d707c686bd5c758ed6544a7109e8ee Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 13 Jun 2018 20:40:50 +0200 Subject: [PATCH 2/2] Forgot to also fix this controller --- src/js/yunohost/controllers/services.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/yunohost/controllers/services.js b/src/js/yunohost/controllers/services.js index 1385583b..86e515fc 100644 --- a/src/js/yunohost/controllers/services.js +++ b/src/js/yunohost/controllers/services.js @@ -18,7 +18,7 @@ v.name = k; // Handlebars want booleans v.is_loaded = (v.loaded=='enabled') ? true : false; - v.is_running = (v.status=='running') ? true : false; + v.is_running = (v.active=='active') ? true : false; // Translate status and loaded state v.status = y18n.t(v.status); v.loaded = y18n.t(v.loaded);