mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
Handle ignored stuff display + add unignore button
This commit is contained in:
parent
0e80393ef4
commit
c73f9cea1d
4 changed files with 25 additions and 2 deletions
|
@ -849,3 +849,9 @@ input[type='radio'].nice-radio {
|
|||
background-color: #d9edf7;
|
||||
border-color: #bce8f1;
|
||||
}
|
||||
|
||||
.alert-ignored-yo {
|
||||
background-color: ghostwhite;
|
||||
border-color: lightgrey;
|
||||
color: grey;
|
||||
}
|
||||
|
|
|
@ -18,16 +18,26 @@
|
|||
data.reports[i].time = new Date(data.reports[i].timestamp*1000);
|
||||
data.reports[i].warnings = 0;
|
||||
data.reports[i].errors = 0;
|
||||
data.reports[i].ignored = 0;
|
||||
for (var j = 0 ; j < data.reports[i].items.length ; j++)
|
||||
{
|
||||
var type_ = data.reports[i].items[j].status;
|
||||
type_ = type_.toLowerCase();
|
||||
var ignored = data.reports[i].items[j].ignored;
|
||||
var icon = "";
|
||||
var issue = false;
|
||||
|
||||
if (type_ == "success") {
|
||||
icon = "check-circle";
|
||||
}
|
||||
else if (ignored == true) {
|
||||
icon = type_;
|
||||
if (type_ == "error") {
|
||||
icon = "times"
|
||||
}
|
||||
type_ = "ignored";
|
||||
data.reports[i].ignored++;
|
||||
}
|
||||
else if (type_ == "warning") {
|
||||
icon = "warning";
|
||||
issue = true;
|
||||
|
|
|
@ -181,6 +181,7 @@
|
|||
"hostname": "Hostname",
|
||||
"id": "ID",
|
||||
"ignore": "Ignore",
|
||||
"ignored": "%s ignored",
|
||||
"inactive": "Inactive",
|
||||
"infos": "Info",
|
||||
"install": "Install",
|
||||
|
@ -362,6 +363,7 @@
|
|||
"transmission": "Transmission",
|
||||
"udp": "UDP",
|
||||
"unauthorized": "Unauthorized",
|
||||
"unignore": "Unignore",
|
||||
"uninstall": "Uninstall",
|
||||
"unknown_action": "Unknown action %s",
|
||||
"unknown_argument": "Unknown argument: %s",
|
||||
|
|
|
@ -20,9 +20,10 @@
|
|||
{{#if noIssues}}<span class="label label-success">{{t 'everything_good'}}</span>{{/if}}
|
||||
{{#if errors}}<span class="label label-danger">{{t 'errors' errors }}</span>{{/if}}
|
||||
{{#if warnings}}<span class="label label-warning">{{t 'warnings' warnings }}</span>{{/if}}
|
||||
{{#if ignored}}<span class="label label-default">{{t 'ignored' ignored }}</span>{{/if}}
|
||||
<a role="button" category="{{ id }}" class="btn btn-sm btn-info pull-right rerun-diagnosis"><span class="fa-fw fa-refresh"></span> {{t 'rerun_diagnosis'}}</a>
|
||||
</div>
|
||||
<div class="panel-body collapse {{#unless noIssues}}in{{/unless}}" id="category-{{id}}">
|
||||
<div class="panel-body collapse {{#if errors}}in{{/if}}" id="category-{{id}}">
|
||||
<ul class="list-group" style="margin-bottom: 0px">
|
||||
<p>{{t 'last_ran' }} {{formatRelative time day="numeric" month="long" year="numeric" hour="numeric" minute="numeric" }}</p>
|
||||
{{#items}}
|
||||
|
@ -31,8 +32,12 @@
|
|||
<span class="fa-fw fa-{{icon}}"></span>
|
||||
{{/if}}
|
||||
{{summary}}
|
||||
{{#if ignored}}
|
||||
<a href="#" role="button" class="btn btn-sm btn-default pull-right"><span class="fa-fw fa-bell"></span> {{t 'unignore'}}</a>
|
||||
{{else}}
|
||||
{{#if issue}}
|
||||
<a href="#" role="button" class="btn btn-sm btn-warning pull-right"><span class="fa-fw fa-times"></span> {{t 'ignore'}}</a>
|
||||
<a href="#" role="button" class="btn btn-sm btn-warning pull-right"><span class="fa-fw fa-bell-slash"></span> {{t 'ignore'}}</a>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{#if details}}
|
||||
<a role="button" class="btn btn-sm btn-default pull-right" data-toggle="collapse" href="#details-{{../id}}-{{@index}}" aria-expanded="false" aria-controls="details-{{../id}}-{{@index}}"><span class="fa-fw fa-level-down"></span>{{t 'details'}}</a>
|
||||
|
|
Loading…
Reference in a new issue