mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
[enh] Add diagnosis. #39
This commit is contained in:
parent
fb26b86c22
commit
a23cad09ab
4 changed files with 50 additions and 2 deletions
|
@ -148,11 +148,26 @@
|
|||
|
||||
});
|
||||
|
||||
// Security feed
|
||||
// Packages version
|
||||
app.get('#/tools/versions', function (c) {
|
||||
c.api('/version', function(versions) {
|
||||
c.view('tools/tools_versions', {'versions' : versions});
|
||||
});
|
||||
});
|
||||
|
||||
// Diagnosis
|
||||
app.get('#/tools/diagnosis(/:private)?', function (c) {
|
||||
// See http://sammyjs.org/docs/routes for splat documentation
|
||||
private = (c.params.splat[0] == 'private');
|
||||
|
||||
endurl = (private) ? '?private' : '';
|
||||
c.api('/diagnosis'+endurl, function(diagnosis) {
|
||||
c.view('tools/tools_diagnosis', {
|
||||
'diagnosis' : JSON.stringify(diagnosis, undefined, 4),
|
||||
'raw' : diagnosis,
|
||||
'private' : private
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
})();
|
|
@ -302,5 +302,10 @@
|
|||
"storage_create": "Add a remote storage",
|
||||
"confirm_restore": "Are you sure you want to restore %s ?",
|
||||
"backup_type": "Type",
|
||||
"path": "Path"
|
||||
"path": "Path",
|
||||
|
||||
"diagnosis" : "Diagnosis",
|
||||
"diagnosis_with_private" : "Diagnosis with private data",
|
||||
"diagnosis_view_private" : "Show diagnosis with private data",
|
||||
"diagnosis_hide_private" : "Show diagnosis without private data"
|
||||
}
|
||||
|
|
24
src/views/tools/tools_diagnosis.ms
Normal file
24
src/views/tools/tools_diagnosis.ms
Normal file
|
@ -0,0 +1,24 @@
|
|||
<div class="btn-breadcrumb">
|
||||
<a href="#/" ><i class="fa-home"></i><span class="sr-only">{{t 'home'}}</span></a>
|
||||
<a href="#/tools">{{t 'tools'}}</a>
|
||||
<a href="#/tools/diagnosis">{{t 'diagnosis'}}</a>
|
||||
{{#private}}
|
||||
<a href="#/tools/diagnosis/private">{{t 'diagnosis_with_private'}}</a>
|
||||
{{/private}}
|
||||
</div>
|
||||
|
||||
<div class="separator"></div>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h2 class="panel-title"><span class="fa-fw fa-stethoscope"></span> {{t 'diagnosis'}}</h2>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<pre>{{ diagnosis }}</pre>
|
||||
{{#if private}}
|
||||
<a class="btn btn-primary" href="#/tools/diagnosis">{{t 'diagnosis_hide_private'}}</a>
|
||||
{{else}}
|
||||
<a class="btn btn-primary" href="#/tools/diagnosis/private">{{t 'diagnosis_view_private'}}</a>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
|
@ -7,6 +7,10 @@
|
|||
|
||||
|
||||
<div class="list-group">
|
||||
<a href="#/tools/diagnosis" class="list-group-item slide clearfix">
|
||||
<span class="pull-right fa-chevron-right"></span>
|
||||
<h2 class="list-group-item-heading">{{t 'diagnosis'}}</h2>
|
||||
</a>
|
||||
<a href="#/tools/monitor" class="list-group-item slide clearfix">
|
||||
<span class="pull-right fa-chevron-right"></span>
|
||||
<h2 class="list-group-item-heading">{{t 'monitoring'}}</h2>
|
||||
|
|
Loading…
Reference in a new issue