mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
Handle the didn't-run-diagnosis-ever-yet case
This commit is contained in:
parent
7cd3b19017
commit
9e0f2f746a
3 changed files with 23 additions and 1 deletions
|
@ -10,6 +10,11 @@
|
||||||
app.get('#/diagnosis', function (c) {
|
app.get('#/diagnosis', function (c) {
|
||||||
c.api('GET', '/diagnosis/show?full', {}, function(data) {
|
c.api('GET', '/diagnosis/show?full', {}, function(data) {
|
||||||
|
|
||||||
|
if (typeof(data.reports) === "undefined")
|
||||||
|
{
|
||||||
|
data.reports = [];
|
||||||
|
}
|
||||||
|
|
||||||
// Prepare data to be displayed ...
|
// Prepare data to be displayed ...
|
||||||
for (var i = 0 ; i < data.reports.length ; i++)
|
for (var i = 0 ; i < data.reports.length ; i++)
|
||||||
{
|
{
|
||||||
|
@ -63,6 +68,13 @@
|
||||||
// Render and display the view
|
// Render and display the view
|
||||||
c.view('diagnosis/diagnosis_show', data, function() {
|
c.view('diagnosis/diagnosis_show', data, function() {
|
||||||
|
|
||||||
|
// Button for first diagnosis
|
||||||
|
$("button[data-action='run-full-diagnosis']").click(function() {
|
||||||
|
c.api('POST', '/diagnosis/run', {}, function(data) {
|
||||||
|
c.refresh();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
// Configure share with yunopaste button
|
// Configure share with yunopaste button
|
||||||
$("button[data-action='share']").click(function() {
|
$("button[data-action='share']").click(function() {
|
||||||
c.api('GET', '/diagnosis/show?share', {}, function(data) {
|
c.api('GET', '/diagnosis/show?share', {}, function(data) {
|
||||||
|
|
|
@ -96,6 +96,8 @@
|
||||||
"domain_dns_conf_is_just_a_recommendation": "This page shows you the *recommended* configuration. It does *not* configure the DNS for you. It is your responsability to configure your DNS zone in your DNS registrar according to this recommendation.",
|
"domain_dns_conf_is_just_a_recommendation": "This page shows you the *recommended* configuration. It does *not* configure the DNS for you. It is your responsability to configure your DNS zone in your DNS registrar according to this recommendation.",
|
||||||
"diagnosis": "Diagnosis",
|
"diagnosis": "Diagnosis",
|
||||||
"diagnosis_experimental_disclaimer": "Be aware that the diagnosis feature is still experimental and being polished, and it may not be fully reliable.",
|
"diagnosis_experimental_disclaimer": "Be aware that the diagnosis feature is still experimental and being polished, and it may not be fully reliable.",
|
||||||
|
"diagnosis_first_run": "The diagnosis feature will attempt to identify common issues on the different aspects of your server to help you make sure that everything works as smoothly as possible.",
|
||||||
|
"run_first_diagnosis": "Run initial diagnosis",
|
||||||
"disable": "Disable",
|
"disable": "Disable",
|
||||||
"disabled": "Disabled",
|
"disabled": "Disabled",
|
||||||
"dns": "DNS",
|
"dns": "DNS",
|
||||||
|
|
|
@ -11,7 +11,15 @@
|
||||||
|
|
||||||
<div class="separator"></div>
|
<div class="separator"></div>
|
||||||
|
|
||||||
<div class="alert alert-warning">{{t 'diagnosis_experimental_disclaimer'}}</div>
|
{{#unless reports}}
|
||||||
|
<div class="alert alert-info text-center">
|
||||||
|
<p>{{t 'diagnosis_first_run'}}</p>
|
||||||
|
<br>
|
||||||
|
<button class="btn btn-info" data-action="run-full-diagnosis"><span class="fa-fw fa-stethoscope"></span> {{t 'run_first_diagnosis'}}</button>
|
||||||
|
</div>
|
||||||
|
{{/unless}}
|
||||||
|
|
||||||
|
<div class="alert alert-warning text-center">{{t 'diagnosis_experimental_disclaimer'}}</div>
|
||||||
|
|
||||||
{{#reports}}
|
{{#reports}}
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
|
|
Loading…
Add table
Reference in a new issue