This commit is contained in:
2018-07-27 18:51:10 +00:00
parent 991c17dc2d
commit cbcc023b1e
4 changed files with 19 additions and 12 deletions

View File

@@ -1,5 +1,3 @@
ul{
padding:0;
}

View File

@@ -67,7 +67,8 @@ app.ops = (function() {
$container = $("#app-shell-main-content");
}
$container.html(Handlebars.templates["app.ops"]({}));
$("#rf-ops-error").text("");
$("#rf-ops-status").html("<h4>Checking...</h4>");
// bind actions
// $("#btn-change-password").bind("click", onChangePassword);
@@ -75,21 +76,29 @@ app.ops = (function() {
app.nav.contextClear();
app.api.get("ops/status/", function(res) {
$("#rf-ops-error").text("");
$("#rf-ops-status").html("<h4>Checking...</h4>");
if (res.error) {
$.gevent.publish("app-show-error", res.msg);
} else {
if (res.opsCheckError) {
$("#rf-ops-error").text(res.opsCheckError);
$("#rf-ops-error").text(res.opsCheckError);
}
$("#rf-ops-status").html("<h4>Results:</h4>");
//{"mailMirrorOK":true,"forumOK":true,"ayaNovaSiteOK":true,"apiSiteOK":true,"contactFormOK":true,"requestFormOK":true,"requestLiteFormOK":true,
//"subversionOK":true,"devOpsOK":true,"backupOK":true,"opsCheckError":"Fake error message\r\nwith more fake text\r\neot"}
var generatedHtml = "";
generatedHtml +=
'<h4><i class="mdi mdi-36px mdi-' + (res.ayaNovaSiteOK
? "check-circle text-success"
: "alert text-danger" + '"></i>') + ' AyaNova site' + '</h4>';
generatedHtml +=
'<h4><i class="mdi mdi-36px mdi-' + (res.mailMirrorOK
? "check-circle text-success"
: "alert text-danger") + '"></i>' + ' Mail mirror' + '</h4>';
$("#rf-ops-status").html(generatedHtml);
}
});
/*
/*"<h4>Results:</h4>"
<h4 id="ayaNovaSiteOK">
<i class="mdi mdi-check-circle mdi-36px"></i>
AyaNova site

View File

@@ -1,5 +1,5 @@
<div>
<p id="rf-ops-error"></p>
<pre id="rf-ops-error"></pre>
<div id="rf-ops-status">
</div>
</div>

File diff suppressed because one or more lines are too long