diff --git a/src/js/yunohost/controllers/services.js b/src/js/yunohost/controllers/services.js index 113c34fc..0445843a 100644 --- a/src/js/yunohost/controllers/services.js +++ b/src/js/yunohost/controllers/services.js @@ -16,15 +16,9 @@ }; $.each(data, function(k, v) { v.name = k; - // Handlebars want booleans - v.is_loaded = (v.loaded=='enabled') ? 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); - if (v.active_at == 'unknown') + if (v.last_state_change == 'unknown') { - delete v.active_at; + v.last_state_change = 0; } data2.services.push(v); }); @@ -46,25 +40,12 @@ // Status & actions for a service app.get('#/services/:service', function (c) { c.api('GET', '/services/'+ c.params['service'], {}, function(data) { - var data2 = { - service: data - }; - data2.service.name = c.params['service']; - // Handlebars want booleans - data2.service.is_loaded = (data.loaded=='enabled') ? true : false; - data2.service.is_running = (data.active=='active') ? true : false; - // Translate status and loaded state - data2.service.active = y18n.t(data.active); - data2.service.loaded = y18n.t(data.loaded); - if (data.active_at != 'unknown') + data.name = c.params['service']; + if (data.last_state_change == 'unknown') { - data2.service.active_at = data.active_at; + data.last_state_change = 0; } - else - { - data2.service.active_at = 0; - } - c.view('service/service_info', data2, function() { + c.view('service/service_info', data, function() { // Configure behavior for enable/disable and start/stop buttons $('button[data-action]').on('click', function() { diff --git a/src/locales/en.json b/src/locales/en.json index 3be53381..d353a336 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -53,6 +53,7 @@ "cancel": "Cancel", "check": "Check", "close": "Close", + "configuration": "Configuration", "confirm_app_change_url": "Are you sure you want to change the app access URL?", "confirm_app_default": "Are you sure you want to make this app default?", "confirm_change_maindomain": "Are you sure you want to change the main domain?", @@ -269,15 +270,15 @@ "select_none": "Select none", "service_description": "Description:", "service_log": "%s log", - "service_start_on_boot": "Start on boot: ", + "service_start_on_boot": "Start on boot", "service_status": "Status: ", "services": "Services", "services_list": "Service list", "set_default": "Set default", "size": "Size", + "since": "since", "skip": "Skip", "start": "Start", - "started_at": "Started at:", "status": "Status", "stop": "Stop", "storage_create": "Add remote storage", diff --git a/src/views/service/service_info.ms b/src/views/service/service_info.ms index 2e78941d..ad6809de 100644 --- a/src/views/service/service_info.ms +++ b/src/views/service/service_info.ms @@ -1,7 +1,7 @@
@@ -12,73 +12,70 @@