diff --git a/Controllers/OpsController.cs b/Controllers/OpsController.cs index 97ea908..eff36a4 100644 --- a/Controllers/OpsController.cs +++ b/Controllers/OpsController.cs @@ -31,101 +31,101 @@ namespace rockfishCore.Controllers { dtoOpsStatus Ret = new dtoOpsStatus(); - //TESTING - Ret.OpsCheckError="Fake error message\r\nwith more fake text\r\neot"; - Ret.MailMirrorOK=true; - Ret.ContactFormOK=true; + // //TESTING + // Ret.OpsCheckError="Fake error message\r\nwith more fake text\r\neot"; + // Ret.MailMirrorOK=true; + // Ret.ContactFormOK=true; - // try - // { - // Ret.MailMirrorOK = RfMail.MailIsMirroringProperly(); - // } - // catch (Exception ex) - // { - // Ret.OpsCheckError += $"Mail mirror: {ex.Message}\r\n"; - // } + 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.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.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.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.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.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.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.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.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.BackupOK = OpsDiagnostics.VerifyBackups(); + } + catch (Exception ex) + { + Ret.OpsCheckError += $"Backup: {ex.Message}\r\n"; + } return Ret; } diff --git a/wwwroot/js/app.ops.js b/wwwroot/js/app.ops.js index 35d834b..787e4bb 100644 --- a/wwwroot/js/app.ops.js +++ b/wwwroot/js/app.ops.js @@ -21,11 +21,15 @@ app.ops = (function() { //Generate list item // generateItem = function(okStatus, label) { + + var okClassFragment = okStatus + ? "mdi-check-circle text-success" + : "mdi-alert text-danger"; + return ( - '