mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
[fix] Display other system logs
This commit is contained in:
parent
99e87a0b6e
commit
97dde7ffda
2 changed files with 15 additions and 12 deletions
|
@ -96,17 +96,20 @@
|
||||||
|
|
||||||
// Display journals list
|
// Display journals list
|
||||||
app.get('#/tools/logs', function (c) {
|
app.get('#/tools/logs', function (c) {
|
||||||
c.api("/logs?limit=25&with_details", function(categories) {
|
category_icons = {
|
||||||
|
'operation': 'wrench',
|
||||||
|
'history': 'history',
|
||||||
|
'package': 'puzzle-piece',
|
||||||
|
'system': 'cogs',
|
||||||
|
'access': 'ban',
|
||||||
|
'service': 'cog',
|
||||||
|
'app': 'cubes'
|
||||||
|
}
|
||||||
|
url = "/logs?limit=25&with_details";
|
||||||
|
url += Object.keys(category_icons).join('&category[]=');
|
||||||
|
|
||||||
|
c.api(url, function(categories) {
|
||||||
data = [];
|
data = [];
|
||||||
category_icons = {
|
|
||||||
'operation': 'wrench',
|
|
||||||
'history': 'history',
|
|
||||||
'package': 'puzzle-piece',
|
|
||||||
'system': 'cogs',
|
|
||||||
'access': 'ban',
|
|
||||||
'service': 'cog',
|
|
||||||
'app': 'cubes'
|
|
||||||
}
|
|
||||||
success_icons = {
|
success_icons = {
|
||||||
true: 'check text-success',
|
true: 'check text-success',
|
||||||
false: 'close text-danger',
|
false: 'close text-danger',
|
||||||
|
@ -147,7 +150,7 @@
|
||||||
}
|
}
|
||||||
c.view('tools/tools_log', {
|
c.view('tools/tools_log', {
|
||||||
"log": log,
|
"log": log,
|
||||||
"next_number": log.logs.length == number ? number * 10:false,
|
"next_number": (log.logs && log.logs.length == number) ? number * 10:false,
|
||||||
"locale": y18n.locale
|
"locale": y18n.locale
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
<div id="collapse-{{key}}" class="panel-collapse{{#if @first}}{{else}} collapse{{/if}}" role="tabpanel" aria-labelledby="heading-{{key}}">
|
<div id="collapse-{{key}}" class="panel-collapse{{#if @first}}{{else}} collapse{{/if}}" role="tabpanel" aria-labelledby="heading-{{key}}">
|
||||||
<div class="list-group">
|
<div class="list-group">
|
||||||
{{#value}}
|
{{#value}}
|
||||||
<a href="#/tools/logs/{{ name }}" class="list-group-item" title='{{formatTime started_at day="numeric" month="long" year="numeric" hour="numeric" minute="numeric"}}'><small style="margin-right:20px;" >{{formatRelative started_at}}</small>
|
<a href="#/tools/logs/{{ name }}" class="list-group-item"{{#if started_at }} title='{{formatTime started_at day="numeric" month="long" year="numeric" hour="numeric" minute="numeric"}}'><small style="margin-right:20px;" >{{formatRelative started_at}}</small{{/if}}>
|
||||||
<span class="fa-fw fa-{{success_icon}}"></span> {{ description }}</a>
|
<span class="fa-fw fa-{{success_icon}}"></span> {{ description }}</a>
|
||||||
{{/value}}
|
{{/value}}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Reference in a new issue