Merge pull request #191 from YunoHost/services_dbus

display more information on service listing page (thanks to dbus)
This commit is contained in:
Bram 2018-05-22 05:57:14 +02:00 committed by GitHub
commit f79899867a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 40 additions and 4 deletions

View file

@ -24,6 +24,17 @@
v.loaded = y18n.t(v.loaded); v.loaded = y18n.t(v.loaded);
data2.services.push(v); data2.services.push(v);
}); });
data2.services.sort(function (a, b) {
if (a.name > b.name) {
return 1;
}
else if (a.name < b.name) {
return -1;
}
return 0;
});
c.view('service/service_list', data2); c.view('service/service_list', data2);
}); });
}); });

View file

@ -248,6 +248,7 @@
"running": "Running", "running": "Running",
"save": "Save", "save": "Save",
"select_user": "Select user", "select_user": "Select user",
"service_description": "Description:",
"service_log": "%s log", "service_log": "%s log",
"service_start_on_boot": "Start on boot: ", "service_start_on_boot": "Start on boot: ",
"service_status": "Status: ", "service_status": "Status: ",
@ -257,6 +258,7 @@
"size": "Size", "size": "Size",
"skip": "Skip", "skip": "Skip",
"start": "Start", "start": "Start",
"started_at": "Started at:",
"status": "Status", "status": "Status",
"stop": "Stop", "stop": "Stop",
"storage_create": "Add remote storage", "storage_create": "Add remote storage",

View file

@ -9,7 +9,24 @@
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<h2 class="panel-title"><span class="fa-fw fa-info-circle"></span> {{t 'status'}}</h2> <h2 class="panel-title"><span class="fa-fw fa-info-circle"></span> {{t 'infos'}}</h2>
</div>
<div class="panel-body">
{{#service}}
<dl class="dl-horizontal">
<dt>{{t 'name'}}</dt>
<dd>{{name}}</dd>
<dt>{{t 'description'}}</dt>
<dd>{{description}}</dd>
</dl>
{{/service}}
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h2 class="panel-title"><span class="fa-fw fa-wrench"></span> {{t 'status'}}</h2>
</div> </div>
<div class="panel-body"> <div class="panel-body">
<dl class="dl-horizontal"> <dl class="dl-horizontal">
@ -24,6 +41,9 @@
<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}} {{status}}
</span> </span>
<br>
{{t 'started_at'}}
{{active_at.human}}
</div> </div>
<div class="pull-right"> <div class="pull-right">

View file

@ -9,13 +9,16 @@
{{#services}} {{#services}}
<a href="#/services/{{name}}" class="list-group-item slide service-{{name}}"> <a href="#/services/{{name}}" class="list-group-item slide service-{{name}}">
<span class="fa-chevron-right pull-right"></span> <span class="fa-chevron-right pull-right"></span>
<h2 class="list-group-item-heading">{{name}}</h2> <h2 class="list-group-item-heading">{{name}} <small>{{description}}</small></h2>
<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}} {{status}}
</span> </span>
<br>
{{t 'started_at'}}
{{active_at.human}}
</div> </div>
</a> </a>
{{/services}} {{/services}}
</div> </div>