diff --git a/Controllers/OpsController.cs b/Controllers/OpsController.cs
index a77be77..bce340f 100644
--- a/Controllers/OpsController.cs
+++ b/Controllers/OpsController.cs
@@ -36,10 +36,23 @@ namespace rockfishCore.Controllers
{
case "MailMirror":
Ret.Status = RfMail.MailIsMirroringProperly();
+ {
+ DateTime? sslExpiry = OpsDiagnostics.SSLCertExpiryDate("https://mail.ayanova.com/");
+ if (sslExpiry != null)
+ {
+ Ret.ServiceCheckError += "Mail server SSL expires: " + sslExpiry.ToString();
+ }
+ }
break;
case "AyaNovaSite":
Ret.Status = OpsDiagnostics.CheckWebsite("https://www.ayanova.com/", "Ground Zero Tech-Works Inc.");
- bool bssl = OpsDiagnostics.IsSSLCertAboutToExpire("https://www.ayanova.com");
+ {
+ DateTime? sslExpiry = OpsDiagnostics.SSLCertExpiryDate("https://www.ayanova.com");
+ if (sslExpiry != null)
+ {
+ Ret.ServiceCheckError += "AyaNova.com SSL expires: " + sslExpiry.ToString();
+ }
+ }
break;
case "APISite":
Ret.Status = OpsDiagnostics.CheckWebsite("https://api.ayanova.com/", "WorkorderTypes Enumeration");
@@ -61,6 +74,14 @@ namespace rockfishCore.Controllers
break;
case "DevOps":
Ret.Status = OpsDiagnostics.CheckWebsite("https://test.helloayanova.com/api/v8/", "AyaNova server");
+ //devops https check url is https://www.helloayanova.com/
+ {
+ DateTime? sslExpiry = OpsDiagnostics.SSLCertExpiryDate("https://www.helloayanova.com/");
+ if (sslExpiry != null)
+ {
+ Ret.ServiceCheckError += "DEVOPS SSL expires: " + sslExpiry.ToString();
+ }
+ }
break;
case "Backup":
Ret.Status = OpsDiagnostics.VerifyBackups();
diff --git a/util/OpsDiagnostics.cs b/util/OpsDiagnostics.cs
index 2b771fd..951bd80 100644
--- a/util/OpsDiagnostics.cs
+++ b/util/OpsDiagnostics.cs
@@ -44,18 +44,18 @@ namespace rockfishCore.Util
/// check if an ssl cert is within 10 days of expiry
///
///
- ///
- public static bool IsSSLCertAboutToExpire(string url)
+ /// null if more than 10 days before expiry or the expiry date for display
+ public static DateTime? SSLCertExpiryDate(string url)
{
var expires = GetServerCertificateExpiryAsync(url).Result;
//In 10 days will we be past the expiry date
- var deadline = DateTime.Now.AddDays(10);
+ var deadline = DateTime.Now.AddDays(100);
if (expires < deadline)
{
- return true;
+ return expires;
}
- return false;
+ return null;
}
diff --git a/wwwroot/js/app.ops.js b/wwwroot/js/app.ops.js
index cd4df45..c7969e2 100644
--- a/wwwroot/js/app.ops.js
+++ b/wwwroot/js/app.ops.js
@@ -27,10 +27,11 @@ app.ops = (function() {
$.gevent.publish("app-show-error", res.msg);
} else {
if (res.serviceCheckError) {
- var errorText = $("#rf-ops-error").text();
+ var errorElement=$("#"+service+"-error");
+ var errorText = errorElement.text();
errorText += "\r\n";
errorText += res.serviceCheckError;
- $("#rf-ops-error").text(errorText);
+ errorElement.text(errorText);
}
var serviceElement = $("#" + service);
diff --git a/wwwroot/js/templates/app.ops.handlebars b/wwwroot/js/templates/app.ops.handlebars
index 74c608b..ed12d69 100644
--- a/wwwroot/js/templates/app.ops.handlebars
+++ b/wwwroot/js/templates/app.ops.handlebars
@@ -2,46 +2,76 @@
Operations status
-
-
- Mail / mirror
-
-
-
- AyaNova site
-
-
-
- Backup
-
-
-
- Contact form
-
-
-
- Request form
-
-
-
- Request lite form
-
-
-
- Forum
-
-
-
- Subversion
-
-
-
- DevOps server
-
-
-
- API site
-
+
+
+
+ Mail / mirror
+
+
+
+
+
+
+
+
+
+
+ Request lite form
+
+
+
+
+
+
+
+
+ DevOps server
+
+
+
+
-
+
\ No newline at end of file
diff --git a/wwwroot/js/templates/templates.js b/wwwroot/js/templates/templates.js
index b280a34..ef5fba3 100644
--- a/wwwroot/js/templates/templates.js
+++ b/wwwroot/js/templates/templates.js
@@ -1,2 +1 @@
-!function(){var n=Handlebars.template,e=Handlebars.templates=Handlebars.templates||{};e["app.authenticate"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,l,i){return'\n

\n
Login
\n
\n
'},useData:!0}),e["app.customerEdit"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,l,i){return''},useData:!0}),e["app.customers"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,l,i){return'\n
\n
Active\n \n
\n
\n
Lapsed\n \n
\n
\n\n\n
\n Inactive\n \n
\n\n
+\n\n\n
\n
'},useData:!0}),e["app.customerSiteEdit"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,l,i){return'\n
\n
'},useData:!0}),e["app.customerSites"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,l,i){return''},useData:!0}),e["app.fourohfour"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,l,i){return"\n
404 NOT FOUND 404
\n"},useData:!0}),e["app.inbox"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,l,i){return''},useData:!0}),e["app.license"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,l,i){return'\n
\n
'},useData:!0}),e["app.licenseRequestEdit"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,l,i){return'\n
\n
'},useData:!0}),e["app.licenses"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,l,i){return''},useData:!0}),e["app.licenseTemplates"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,l,i){return'\n
\n
'},useData:!0}),e["app.licenseView"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,l,i){return''},useData:!0}),e["app.mailEdit"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,l,i){return'\n
\n
'},useData:!0}),e["app.ops"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,l,i){return'\n
Operations status
\n
\n
\n
\n \n Mail / mirror\n
\n \n \n AyaNova site\n
\n \n \n Backup\n
\n \n \n Contact form\n
\n \n \n Request form\n
\n \n \n Request lite form\n
\n \n \n Forum\n
\n \n \n Subversion\n
\n \n \n DevOps server\n
\n \n \n API site\n
\n\n \n
\n'},useData:!0}),e["app.purchaseEdit"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,l,i){return'\n
\n
'},useData:!0}),e["app.purchases"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,l,i){return''},useData:!0}),e["app.reportData"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,l,i){return''},useData:!0}),e["app.reportDataExpires"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,l,i){return'\n\n'},useData:!0}),e["app.reportDataProdEmail"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,l,i){return'\n
\n
'},useData:!0}),e["app.rfcaseEdit"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,l,i){
-return'\n
\n\n\n\n
\n\n
'},useData:!0}),e["app.rfcases"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,l,i){return'\n\n
\n\n\n
\n\n
\n\n
\n
\n \n \n
\n
\n\n
\n\n
\n
\n
\n\n\n'},useData:!0}),e["app.rfsettings"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,l,i){return''},useData:!0}),e["app.search"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,l,i){return''},useData:!0}),e["app.shell"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,l,i){return'\n\n\n\n'},useData:!0}),e["app.subnotify"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,l,i){return'\n\n'},useData:!0}),e["app.subscription"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,l,i){return''},useData:!0}),e["app.templateEdit"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,l,i){return'\n
\n
'},useData:!0}),e["app.templates"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,l,i){return''},useData:!0})}();
+!function(){var n=Handlebars.template,e=Handlebars.templates=Handlebars.templates||{};e["app.authenticate"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,i,l){return''},useData:!0}),e["app.customerEdit"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,i,l){return''},useData:!0}),e["app.customers"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,i,l){return'\n
\n
Active\n \n
\n
\n
Lapsed\n \n
\n
\n\n\n
\n Inactive\n \n
\n\n
+\n\n\n
\n
'},useData:!0}),e["app.customerSiteEdit"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,i,l){return'\n
\n
'},useData:!0}),e["app.customerSites"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,i,l){return''},useData:!0}),e["app.fourohfour"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,i,l){return"\n
404 NOT FOUND 404
\n"},useData:!0}),e["app.inbox"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,i,l){return''},useData:!0}),e["app.license"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,i,l){return'\n
\n
'},useData:!0}),e["app.licenseRequestEdit"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,i,l){return'\n
\n
'},useData:!0}),e["app.licenses"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,i,l){return''},useData:!0}),e["app.licenseTemplates"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,i,l){return'\n
\n
'},useData:!0}),e["app.licenseView"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,i,l){return''},useData:!0}),e["app.mailEdit"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,i,l){return'\n
\n
'},useData:!0}),e["app.ops"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,i,l){return'\n
Operations status
\n
\n
\n
\n
\n \n Mail / mirror\n
\n
\n
\n
\n
\n \n AyaNova site\n
\n
\n
\n
\n
\n
\n \n Contact form\n
\n
\n
\n
\n
\n \n Request form\n
\n
\n
\n
\n
\n \n Request lite form\n
\n
\n
\n
\n
\n
\n \n Subversion\n
\n
\n
\n
\n
\n \n DevOps server\n
\n
\n
\n
\n
\n \n API site\n
\n
\n
\n\n
\n
'},useData:!0}),e["app.purchaseEdit"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,i,l){return'\n
\n
'},useData:!0}),e["app.purchases"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,i,l){return''},useData:!0}),e["app.reportData"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,i,l){return''},useData:!0}),e["app.reportDataExpires"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,i,l){return'\n\n'},useData:!0}),e["app.reportDataProdEmail"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,i,l){return'\n
\n
'},useData:!0}),e["app.rfcaseEdit"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,i,l){return'\n
\n\n\n\n
\n\n
'},useData:!0}),e["app.rfcases"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,i,l){return'\n\n
\n\n\n
\n\n
\n\n
\n
\n \n \n
\n
\n\n
\n\n
\n
\n
\n\n\n'},useData:!0}),e["app.rfsettings"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,i,l){return''},useData:!0}),e["app.search"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,i,l){return''},useData:!0}),e["app.shell"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,i,l){return'\n\n\n\n'},useData:!0}),e["app.subnotify"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,i,l){return'\n\n'},useData:!0}),e["app.subscription"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,i,l){return''},useData:!0}),e["app.templateEdit"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,i,l){return'\n
\n
'},useData:!0}),e["app.templates"]=n({compiler:[7,">= 4.0.0"],main:function(n,e,a,i,l){return''},useData:!0})}();