mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
[enh] Better more logs button
This commit is contained in:
parent
07d2e1c3bd
commit
de8459d753
2 changed files with 14 additions and 9 deletions
|
@ -316,5 +316,12 @@
|
|||
"logs_access": "List of access and bans",
|
||||
"logs_service": "Services logs",
|
||||
"logs_app": "Apps logs",
|
||||
"logs_no_logs_registered": "No log registered for this category"
|
||||
"logs_no_logs_registered": "No log registered for this category",
|
||||
"logs_end_with_error": "This log finished with the error :",
|
||||
"logs_error": "Error",
|
||||
"logs_ended_at": "End",
|
||||
"logs_started_at": "Start",
|
||||
"logs_path": "Path",
|
||||
"logs_context": "Context",
|
||||
"logs_more": "Display more lines"
|
||||
}
|
||||
|
|
|
@ -21,9 +21,10 @@
|
|||
</div>
|
||||
<div class="panel-body">
|
||||
<dl class="dl-horizontal" id="metadata">
|
||||
<dt>{{t 'path'}}</dt> <dd>{{ log.log_path }}</dd>
|
||||
{{#if log.metadata.started_at}}<dt>{{t 'started_at'}}</dt> <dd>{{formatTime log.metadata.started_at day="numeric" month="long" year="numeric" hour="numeric" minute="numeric"}}</dd>
|
||||
{{/if}}{{#if log.metadata.ended_at}}<dt>{{t 'ended_at'}}</dt> <dd>{{formatTime log.metadata.ended_at day="numeric" month="long" year="numeric" hour="numeric" minute="numeric"}}</dd>{{/if}}
|
||||
<dt>{{t 'logs_path'}}</dt> <dd>{{ log.log_path }}</dd>
|
||||
{{#if log.metadata.started_at}}<dt>{{t 'logs_started_at'}}</dt> <dd>{{formatTime log.metadata.started_at day="numeric" month="long" year="numeric" hour="numeric" minute="numeric"}}</dd>
|
||||
{{/if}}{{#if log.metadata.ended_at}}<dt>{{t 'logs_ended_at'}}</dt> <dd>{{formatTime log.metadata.ended_at day="numeric" month="long" year="numeric" hour="numeric" minute="numeric"}}</dd>{{/if}}
|
||||
{{#if log.metadata.error}}<dt>{{t 'logs_error'}}</dt> <dd>{{t 'logs_end_with_error'}} {{log.metadata.error}}</dd>{{/if}}
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -32,7 +33,7 @@
|
|||
<div class="panel-heading" role="tab" id="heading-context">
|
||||
<h2 class="panel-title">
|
||||
<a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse-context" aria-expanded="true" aria-controls="collapse-context">
|
||||
<span class="fa-fw fa-bug"></span>{{t 'Context'}}
|
||||
<span class="fa-fw fa-bug"></span>{{t 'logs_context'}}
|
||||
</a>
|
||||
</h2>
|
||||
</div>
|
||||
|
@ -53,10 +54,7 @@
|
|||
<h2 class="panel-title"><span class="fa-fw fa-file-text"></span> {{#if log.metadata}}{{t 'logs'}}{{else}}{{log.log_path}}{{/if}}</h2>
|
||||
</div>
|
||||
<div class="panel-body overflow-auto">
|
||||
{{#if log.metadata.error}}
|
||||
<div class="alert alert-warning" role="alert"><span class="fas fa-exclamation-triangle"></span> <strong>{{t 'Error'}}</strong>: {{log.metadata.error}}</div>
|
||||
{{/if}}
|
||||
{{#if next_number}}<a href="#/tools/logs/{{#if log.name}}{{ log.name }}{{else}}{{ log.log_path }}{{/if}}?number={{ next_number }}">MORE</a>{{/if}}
|
||||
{{#if next_number}}<a href="#/tools/logs/{{#if log.name}}{{ log.name }}{{else}}{{ log.log_path }}{{/if}}?number={{ next_number }}" class="btn btn-default full-width"><span class="fa-fw fa-plus"></span> {{t 'logs_more'}}</a>{{/if}}
|
||||
<!-- no indent because pre is sensible to whitespaces -->
|
||||
<pre id="log" class="full-width">{{#log.logs}}{{.}}
|
||||
{{/log.logs}}</pre>
|
||||
|
|
Loading…
Reference in a new issue