This commit is contained in:
@@ -31,117 +31,101 @@ namespace rockfishCore.Controllers
|
|||||||
{
|
{
|
||||||
dtoOpsStatus Ret = new dtoOpsStatus();
|
dtoOpsStatus Ret = new dtoOpsStatus();
|
||||||
|
|
||||||
|
//TESTING
|
||||||
Ret.OpsCheckError="Fake error message\r\nwith more fake text\r\neot";
|
Ret.OpsCheckError="Fake error message\r\nwith more fake text\r\neot";
|
||||||
|
Ret.MailMirrorOK=true;
|
||||||
try
|
Ret.ContactFormOK=true;
|
||||||
{
|
|
||||||
Ret.MailMirrorOK = RfMail.MailIsMirroringProperly();
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Ret.OpsCheckError += $"Mail mirror: {ex.Message}\r\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Ret.AyaNovaSiteOK = OpsDiagnostics.CheckWebsite("https://www.ayanova.com/", "Ground Zero Tech-Works Inc.");
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Ret.OpsCheckError += $"AyaNova site: {ex.Message}\r\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Ret.APISiteOK = OpsDiagnostics.CheckWebsite("https://api.ayanova.com/", "WorkorderTypes Enumeration");
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Ret.OpsCheckError += $"API site: {ex.Message}\r\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Ret.ContactFormOK = OpsDiagnostics.CheckWebsite("https://contact.ayanova.com/contact", "Contact.Email");
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Ret.OpsCheckError += $"Contact form: {ex.Message}\r\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Ret.RequestFormOK = OpsDiagnostics.CheckWebsite("https://contact.ayanova.com/request", "Contact.Email");
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Ret.OpsCheckError += $"Request form: {ex.Message}\r\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Ret.RequestLiteFormOK = OpsDiagnostics.CheckWebsite("https://contact.ayanova.com/requestlite", "Contact.Email");
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Ret.OpsCheckError += $"RequestLite form: {ex.Message}\r\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Ret.SubversionOK = OpsDiagnostics.CheckWebsite("http://svn.helloayanova.com:3343/csvn/login/auth", "Subversion Edge");
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Ret.OpsCheckError += $"Subversion: {ex.Message}\r\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Ret.ForumOK = OpsDiagnostics.CheckWebsite("http://forum.ayanova.com/", "AyaNova support resources");
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Ret.OpsCheckError += $"Forum: {ex.Message}\r\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Ret.DevOpsOK = OpsDiagnostics.CheckWebsite("https://test.helloayanova.com/api/v8/", "AyaNova server");
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Ret.OpsCheckError += $"DevOps: {ex.Message}\r\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Ret.BackupOK = OpsDiagnostics.VerifyBackups();
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Ret.OpsCheckError += $"Backup: {ex.Message}\r\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
// try
|
||||||
|
// {
|
||||||
|
// Ret.MailMirrorOK = RfMail.MailIsMirroringProperly();
|
||||||
|
// }
|
||||||
|
// catch (Exception ex)
|
||||||
|
// {
|
||||||
|
// Ret.OpsCheckError += $"Mail mirror: {ex.Message}\r\n";
|
||||||
|
// }
|
||||||
|
|
||||||
//PING?
|
// try
|
||||||
//Can ping Spaces and all the servers we have, maybe do that first then proceed
|
// {
|
||||||
//https://docs.microsoft.com/en-us/dotnet/framework/network-programming/how-to-ping-a-host
|
// Ret.AyaNovaSiteOK = OpsDiagnostics.CheckWebsite("https://www.ayanova.com/", "Ground Zero Tech-Works Inc.");
|
||||||
//using System.Net.NetworkInformation;
|
// }
|
||||||
|
// catch (Exception ex)
|
||||||
|
// {
|
||||||
|
// Ret.OpsCheckError += $"AyaNova site: {ex.Message}\r\n";
|
||||||
|
// }
|
||||||
|
|
||||||
//AyaNova website: https://www.ayanova.com/
|
// try
|
||||||
//API website: https://api.ayanova.com/
|
// {
|
||||||
//Contact form: https://contact.ayanova.com/contact
|
// Ret.APISiteOK = OpsDiagnostics.CheckWebsite("https://api.ayanova.com/", "WorkorderTypes Enumeration");
|
||||||
//Request form: https://contact.ayanova.com/request
|
// }
|
||||||
//Request lite form: https://contact.ayanova.com/requestlite
|
// catch (Exception ex)
|
||||||
//subversion admin: http://svn.helloayanova.com:3343/csvn/login/auth
|
// {
|
||||||
//Forum: http://forum.ayanova.com/
|
// Ret.OpsCheckError += $"API site: {ex.Message}\r\n";
|
||||||
//devops: https://test.helloayanova.com/api/v8/
|
// }
|
||||||
//Spaces and backup: https://gztw1.nyc3.digitaloceanspaces.com/
|
|
||||||
//confirm expected backup files are present
|
|
||||||
|
|
||||||
|
// try
|
||||||
|
// {
|
||||||
|
// Ret.ContactFormOK = OpsDiagnostics.CheckWebsite("https://contact.ayanova.com/contact", "Contact.Email");
|
||||||
|
// }
|
||||||
|
// catch (Exception ex)
|
||||||
|
// {
|
||||||
|
// Ret.OpsCheckError += $"Contact form: {ex.Message}\r\n";
|
||||||
|
// }
|
||||||
|
|
||||||
|
// try
|
||||||
|
// {
|
||||||
|
// Ret.RequestFormOK = OpsDiagnostics.CheckWebsite("https://contact.ayanova.com/request", "Contact.Email");
|
||||||
|
// }
|
||||||
|
// catch (Exception ex)
|
||||||
|
// {
|
||||||
|
// Ret.OpsCheckError += $"Request form: {ex.Message}\r\n";
|
||||||
|
// }
|
||||||
|
|
||||||
|
// try
|
||||||
|
// {
|
||||||
|
// Ret.RequestLiteFormOK = OpsDiagnostics.CheckWebsite("https://contact.ayanova.com/requestlite", "Contact.Email");
|
||||||
|
// }
|
||||||
|
// catch (Exception ex)
|
||||||
|
// {
|
||||||
|
// Ret.OpsCheckError += $"RequestLite form: {ex.Message}\r\n";
|
||||||
|
// }
|
||||||
|
|
||||||
|
// try
|
||||||
|
// {
|
||||||
|
// Ret.SubversionOK = OpsDiagnostics.CheckWebsite("http://svn.helloayanova.com:3343/csvn/login/auth", "Subversion Edge");
|
||||||
|
// }
|
||||||
|
// catch (Exception ex)
|
||||||
|
// {
|
||||||
|
// Ret.OpsCheckError += $"Subversion: {ex.Message}\r\n";
|
||||||
|
// }
|
||||||
|
|
||||||
|
// try
|
||||||
|
// {
|
||||||
|
// Ret.ForumOK = OpsDiagnostics.CheckWebsite("http://forum.ayanova.com/", "AyaNova support resources");
|
||||||
|
// }
|
||||||
|
// catch (Exception ex)
|
||||||
|
// {
|
||||||
|
// Ret.OpsCheckError += $"Forum: {ex.Message}\r\n";
|
||||||
|
// }
|
||||||
|
|
||||||
|
// try
|
||||||
|
// {
|
||||||
|
// Ret.DevOpsOK = OpsDiagnostics.CheckWebsite("https://test.helloayanova.com/api/v8/", "AyaNova server");
|
||||||
|
// }
|
||||||
|
// catch (Exception ex)
|
||||||
|
// {
|
||||||
|
// Ret.OpsCheckError += $"DevOps: {ex.Message}\r\n";
|
||||||
|
// }
|
||||||
|
|
||||||
|
// try
|
||||||
|
// {
|
||||||
|
// Ret.BackupOK = OpsDiagnostics.VerifyBackups();
|
||||||
|
// }
|
||||||
|
// catch (Exception ex)
|
||||||
|
// {
|
||||||
|
// Ret.OpsCheckError += $"Backup: {ex.Message}\r\n";
|
||||||
|
// }
|
||||||
|
|
||||||
return Ret;
|
return Ret;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,20 +75,32 @@ app.ops = (function() {
|
|||||||
app.nav.contextClear();
|
app.nav.contextClear();
|
||||||
|
|
||||||
app.api.get("ops/status/", function(res) {
|
app.api.get("ops/status/", function(res) {
|
||||||
|
$("#rf-ops-error").text("");
|
||||||
|
$("#rf-ops-status").html("<h4>Checking...</h4>");
|
||||||
if (res.error) {
|
if (res.error) {
|
||||||
$.gevent.publish("app-show-error", res.msg);
|
$.gevent.publish("app-show-error", res.msg);
|
||||||
} else {
|
} else {
|
||||||
if (res.opsCheckMessage) {
|
|
||||||
$("#about").append("<p>Ops status response: " + res.opsCheckMessage + "</p>");
|
if (res.opsCheckError) {
|
||||||
|
$("#rf-ops-error").text(res.opsCheckError);
|
||||||
}
|
}
|
||||||
|
$("#rf-ops-status").html("<h4>Results:</h4>");
|
||||||
//set classes
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
//{"mailMirrorOK":true,"forumOK":true,"ayaNovaWebsiteOK":true,"apiWebsiteOK":true,"contactFormOK":true,"requestFormOK":true,"requestLiteFormOK":true,"subversionOK":true,"devOpsOK":true,"backupOK":true,"opsCheckMessage":""}
|
/*
|
||||||
|
<h4 id="ayaNovaSiteOK">
|
||||||
|
<i class="mdi mdi-check-circle mdi-36px"></i>
|
||||||
|
AyaNova site
|
||||||
|
</h4>
|
||||||
|
|
||||||
|
<h4 id="contactFormOK">
|
||||||
|
<i class="mdi mdi-alert mdi-36px"></i>
|
||||||
|
Contact form
|
||||||
|
</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"}
|
||||||
//icons: alert for bad, check-circle for good
|
//icons: alert for bad, check-circle for good
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,18 +1,5 @@
|
|||||||
<div>
|
<div>
|
||||||
<h2>OPS</h2>
|
<p id="rf-ops-error"></p>
|
||||||
<div class="alert alert-success mb-5" id="about" />
|
<div id="rf-ops-status">
|
||||||
<div id="statuslist">
|
|
||||||
|
|
||||||
<h4 id="ayanovasite>
|
|
||||||
<i class="mdi mdi-check-circle mdi-36px"></i>
|
|
||||||
AyaNova site
|
|
||||||
</h4>
|
|
||||||
|
|
||||||
<h4>
|
|
||||||
<i class="mdi mdi-alert mdi-36px"></i>
|
|
||||||
API site
|
|
||||||
</h4>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user