This commit is contained in:
@@ -31,117 +31,101 @@ namespace rockfishCore.Controllers
|
||||
{
|
||||
dtoOpsStatus Ret = new dtoOpsStatus();
|
||||
|
||||
//TESTING
|
||||
Ret.OpsCheckError="Fake error message\r\nwith more fake text\r\neot";
|
||||
|
||||
try
|
||||
{
|
||||
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";
|
||||
}
|
||||
Ret.MailMirrorOK=true;
|
||||
Ret.ContactFormOK=true;
|
||||
|
||||
|
||||
// try
|
||||
// {
|
||||
// Ret.MailMirrorOK = RfMail.MailIsMirroringProperly();
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// Ret.OpsCheckError += $"Mail mirror: {ex.Message}\r\n";
|
||||
// }
|
||||
|
||||
//PING?
|
||||
//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
|
||||
//using System.Net.NetworkInformation;
|
||||
// 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";
|
||||
// }
|
||||
|
||||
//AyaNova website: https://www.ayanova.com/
|
||||
//API website: https://api.ayanova.com/
|
||||
//Contact form: https://contact.ayanova.com/contact
|
||||
//Request form: https://contact.ayanova.com/request
|
||||
//Request lite form: https://contact.ayanova.com/requestlite
|
||||
//subversion admin: http://svn.helloayanova.com:3343/csvn/login/auth
|
||||
//Forum: http://forum.ayanova.com/
|
||||
//devops: https://test.helloayanova.com/api/v8/
|
||||
//Spaces and backup: https://gztw1.nyc3.digitaloceanspaces.com/
|
||||
//confirm expected backup files are present
|
||||
|
||||
// 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";
|
||||
// }
|
||||
|
||||
return Ret;
|
||||
}
|
||||
|
||||
@@ -75,20 +75,32 @@ 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.opsCheckMessage) {
|
||||
$("#about").append("<p>Ops status response: " + res.opsCheckMessage + "</p>");
|
||||
|
||||
if (res.opsCheckError) {
|
||||
$("#rf-ops-error").text(res.opsCheckError);
|
||||
}
|
||||
|
||||
//set classes
|
||||
|
||||
|
||||
$("#rf-ops-status").html("<h4>Results:</h4>");
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
//{"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
|
||||
};
|
||||
|
||||
|
||||
@@ -1,18 +1,5 @@
|
||||
<div>
|
||||
<h2>OPS</h2>
|
||||
<div class="alert alert-success mb-5" id="about" />
|
||||
<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>
|
||||
|
||||
|
||||
<p id="rf-ops-error"></p>
|
||||
<div id="rf-ops-status">
|
||||
</div>
|
||||
</div>
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user