[fix] Display other system logs

This commit is contained in:
ljf 2019-08-15 20:27:01 +02:00
parent 99e87a0b6e
commit 97dde7ffda
2 changed files with 15 additions and 12 deletions

View file

@ -96,17 +96,20 @@
// Display journals list
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 = [];
category_icons = {
'operation': 'wrench',
'history': 'history',
'package': 'puzzle-piece',
'system': 'cogs',
'access': 'ban',
'service': 'cog',
'app': 'cubes'
}
success_icons = {
true: 'check text-success',
false: 'close text-danger',
@ -147,7 +150,7 @@
}
c.view('tools/tools_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
});
});

View file

@ -22,7 +22,7 @@
<div id="collapse-{{key}}" class="panel-collapse{{#if @first}}{{else}} collapse{{/if}}" role="tabpanel" aria-labelledby="heading-{{key}}">
<div class="list-group">
{{#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>
{{/value}}
</div>