This commit is contained in:
2018-07-27 18:18:38 +00:00
parent 1b74f94b70
commit 8bdf3c0e38
4 changed files with 65 additions and 61 deletions

View File

@@ -31,31 +31,33 @@ namespace rockfishCore.Controllers
{ {
dtoOpsStatus Ret = new dtoOpsStatus(); dtoOpsStatus Ret = new dtoOpsStatus();
Ret.OpsCheckError="Fake error message\r\nwith more fake text\r\neot";
try try
{ {
Ret.MailMirrorOK = RfMail.MailIsMirroringProperly(); Ret.MailMirrorOK = RfMail.MailIsMirroringProperly();
} }
catch (Exception ex) catch (Exception ex)
{ {
Ret.OpsCheckMessage += $"Mail mirror: {ex.Message}\r\n"; Ret.OpsCheckError += $"Mail mirror: {ex.Message}\r\n";
} }
try try
{ {
Ret.AyaNovaWebsiteOK = OpsDiagnostics.CheckWebsite("https://www.ayanova.com/", "Ground Zero Tech-Works Inc."); Ret.AyaNovaSiteOK = OpsDiagnostics.CheckWebsite("https://www.ayanova.com/", "Ground Zero Tech-Works Inc.");
} }
catch (Exception ex) catch (Exception ex)
{ {
Ret.OpsCheckMessage += $"AyaNova site: {ex.Message}\r\n"; Ret.OpsCheckError += $"AyaNova site: {ex.Message}\r\n";
} }
try try
{ {
Ret.APIWebsiteOK = OpsDiagnostics.CheckWebsite("https://api.ayanova.com/", "WorkorderTypes Enumeration"); Ret.APISiteOK = OpsDiagnostics.CheckWebsite("https://api.ayanova.com/", "WorkorderTypes Enumeration");
} }
catch (Exception ex) catch (Exception ex)
{ {
Ret.OpsCheckMessage += $"API site: {ex.Message}\r\n"; Ret.OpsCheckError += $"API site: {ex.Message}\r\n";
} }
try try
@@ -64,7 +66,7 @@ namespace rockfishCore.Controllers
} }
catch (Exception ex) catch (Exception ex)
{ {
Ret.OpsCheckMessage += $"Contact form: {ex.Message}\r\n"; Ret.OpsCheckError += $"Contact form: {ex.Message}\r\n";
} }
try try
@@ -73,7 +75,7 @@ namespace rockfishCore.Controllers
} }
catch (Exception ex) catch (Exception ex)
{ {
Ret.OpsCheckMessage += $"Request form: {ex.Message}\r\n"; Ret.OpsCheckError += $"Request form: {ex.Message}\r\n";
} }
try try
@@ -82,7 +84,7 @@ namespace rockfishCore.Controllers
} }
catch (Exception ex) catch (Exception ex)
{ {
Ret.OpsCheckMessage += $"RequestLite form: {ex.Message}\r\n"; Ret.OpsCheckError += $"RequestLite form: {ex.Message}\r\n";
} }
try try
@@ -91,7 +93,7 @@ namespace rockfishCore.Controllers
} }
catch (Exception ex) catch (Exception ex)
{ {
Ret.OpsCheckMessage += $"Subversion: {ex.Message}\r\n"; Ret.OpsCheckError += $"Subversion: {ex.Message}\r\n";
} }
try try
@@ -100,7 +102,7 @@ namespace rockfishCore.Controllers
} }
catch (Exception ex) catch (Exception ex)
{ {
Ret.OpsCheckMessage += $"Forum: {ex.Message}\r\n"; Ret.OpsCheckError += $"Forum: {ex.Message}\r\n";
} }
try try
@@ -109,7 +111,7 @@ namespace rockfishCore.Controllers
} }
catch (Exception ex) catch (Exception ex)
{ {
Ret.OpsCheckMessage += $"DevOps: {ex.Message}\r\n"; Ret.OpsCheckError += $"DevOps: {ex.Message}\r\n";
} }
try try
@@ -118,7 +120,7 @@ namespace rockfishCore.Controllers
} }
catch (Exception ex) catch (Exception ex)
{ {
Ret.OpsCheckMessage += $"Backup: {ex.Message}\r\n"; Ret.OpsCheckError += $"Backup: {ex.Message}\r\n";
} }
@@ -148,29 +150,29 @@ namespace rockfishCore.Controllers
{ {
public bool MailMirrorOK; public bool MailMirrorOK;
public bool ForumOK; public bool ForumOK;
public bool AyaNovaWebsiteOK; public bool AyaNovaSiteOK;
public bool APIWebsiteOK; public bool APISiteOK;
public bool ContactFormOK; public bool ContactFormOK;
public bool RequestFormOK; public bool RequestFormOK;
public bool RequestLiteFormOK; public bool RequestLiteFormOK;
public bool SubversionOK; public bool SubversionOK;
public bool DevOpsOK; public bool DevOpsOK;
public bool BackupOK; public bool BackupOK;
public string OpsCheckMessage; public string OpsCheckError;
public dtoOpsStatus() public dtoOpsStatus()
{ {
MailMirrorOK = false; MailMirrorOK = false;
ForumOK = false; ForumOK = false;
AyaNovaWebsiteOK = false; AyaNovaSiteOK = false;
APIWebsiteOK = false; APISiteOK = false;
ContactFormOK = false; ContactFormOK = false;
RequestFormOK = false; RequestFormOK = false;
RequestLiteFormOK = false; RequestLiteFormOK = false;
SubversionOK = false; SubversionOK = false;
DevOpsOK = false; DevOpsOK = false;
BackupOK = false; BackupOK = false;
OpsCheckMessage = string.Empty; OpsCheckError = string.Empty;
} }
} }

View File

@@ -24,30 +24,30 @@ app.ops = (function() {
/////////////////////////////// ///////////////////////////////
//ONUPDATE //ONUPDATE
// //
// onChangePassword = function(event) { // onChangePassword = function(event) {
// event.preventDefault(); // event.preventDefault();
// $.gevent.publish("app-clear-error"); // $.gevent.publish("app-clear-error");
// //get form data // //get form data
// var formData = $("form").serializeArray({ // var formData = $("form").serializeArray({
// checkboxesAsBools: true // checkboxesAsBools: true
// }); // });
// var submitData = app.utilB.objectifyFormDataArray(formData); // var submitData = app.utilB.objectifyFormDataArray(formData);
// app.api.create( // app.api.create(
// "user/" + app.shell.stateMap.user.id + "/changepassword", // "user/" + app.shell.stateMap.user.id + "/changepassword",
// submitData, // submitData,
// function(res) { // function(res) {
// if (res.error) { // if (res.error) {
// $.gevent.publish("app-show-error", res.msg); // $.gevent.publish("app-show-error", res.msg);
// } else { // } else {
// page("#!/logout"); // page("#!/logout");
// } // }
// } // }
// ); // );
// return false; //prevent default? // return false; //prevent default?
// }; // };
//-------------------- END EVENT HANDLERS -------------------- //-------------------- END EVENT HANDLERS --------------------
//------------------- BEGIN PUBLIC METHODS ------------------- //------------------- BEGIN PUBLIC METHODS -------------------
@@ -69,7 +69,7 @@ app.ops = (function() {
$container.html(Handlebars.templates["app.ops"]({})); $container.html(Handlebars.templates["app.ops"]({}));
// bind actions // bind actions
// $("#btn-change-password").bind("click", onChangePassword); // $("#btn-change-password").bind("click", onChangePassword);
//Context menu //Context menu
app.nav.contextClear(); app.nav.contextClear();
@@ -78,18 +78,18 @@ app.ops = (function() {
if (res.error) { if (res.error) {
$.gevent.publish("app-show-error", res.msg); $.gevent.publish("app-show-error", res.msg);
} else { } else {
$("#about").append( if (res.opsCheckMessage) {
"<p>Ops status response: " + $("#about").append("<p>Ops status response: " + res.opsCheckMessage + "</p>");
res + }
"</p>"
); //set classes
} }
}); });
//{"mailMirrorOK":true,"forumOK":true,"ayaNovaWebsiteOK":true,"apiWebsiteOK":true,"contactFormOK":true,"requestFormOK":true,"requestLiteFormOK":true,"subversionOK":true,"devOpsOK":true,"backupOK":true,"opsCheckMessage":""}
//{"mailMirrorOK":true,"forumOK":true,"ayaNovaWebsiteOK":true,"apiWebsiteOK":true,"contactFormOK":true,"requestFormOK":true,"requestLiteFormOK":true,"subversionOK":true,"devOpsOK":true,"backupOK":true,"opsCheckMessage":""} //icons: alert for bad, check-circle for good
////app.nav.setContextTitle("Search");
}; };
//PUBLIC METHODS //PUBLIC METHODS

View File

@@ -1,16 +1,18 @@
<div> <div>
<h2>OPS</h2> <h2>OPS</h2>
<div class="alert alert-success mb-5" id="about" /> <div class="alert alert-success mb-5" id="about" />
<div id="statuslist">
<form id="frm" method="post" action="index.html"> <h4 id="ayanovasite>
<i class="mdi mdi-check-circle mdi-36px"></i>
AyaNova site
</h4>
<div class="form-group"> <h4>
<label for="oldpassword">Change password</label> <i class="mdi mdi-alert mdi-36px"></i>
<input class="form-control" type="text" id="oldpassword" name="oldpassword" placeholder="current password" value=""> API site
<input class="form-control" type="text" id="newpassword" name="newpassword" placeholder="new password" value=""> </h4>
<div class="app-frm-buttons mt-5">
<button id="btn-change-password">Update</button>
</div> </div>
</div>
</form>
</div> </div>

File diff suppressed because one or more lines are too long