diff --git a/.gitignore b/.gitignore index 4ce6fdd..fb86a7a 100644 --- a/.gitignore +++ b/.gitignore @@ -337,4 +337,6 @@ ASALocalRun/ .localhistory/ # BeatPulse healthcheck temp database -healthchecksdb \ No newline at end of file +healthchecksdb + +ISPChk/ispchk.db \ No newline at end of file diff --git a/ISPChk/NetworkTest.cs b/ISPChk/NetworkTest.cs index cb4a48f..e16bdb1 100644 --- a/ISPChk/NetworkTest.cs +++ b/ISPChk/NetworkTest.cs @@ -79,9 +79,9 @@ namespace ISPChk if (reply.Status == IPStatus.Success) { successes++; - System.Diagnostics.Debug.WriteLine("Reply from " + reply.Address.ToString() + - ": bytes=" + reply.Buffer.Length + - " time=" + reply.RoundtripTime + "ms"); + //System.Diagnostics.Debug.WriteLine("Reply from " + reply.Address.ToString() + + // ": bytes=" + reply.Buffer.Length + + // " time=" + reply.RoundtripTime + "ms"); avg += reply.RoundtripTime; if (reply.RoundtripTime < min) { @@ -106,7 +106,7 @@ namespace ISPChk // FIXME: This is dirty but I don't want the graph to explode if (min > timeout) min = 0; - System.Diagnostics.Debug.WriteLine("min:" + min + " max:" + max + " avg:" + avg); + System.Diagnostics.Debug.WriteLine(h.HostName+": "+"min:" + min + " max:" + max + " avg:" + avg); PingItem pi = new PingItem { Date = DateTimeOffset.UtcNow, Min = min, Max = max, Avg = avg, Failures = failures }; h.PingItems.Add(pi); ctx.SaveChanges(); diff --git a/ISPChk/ispchk.db b/ISPChk/ispchk.db index f2c669f..785a009 100644 Binary files a/ISPChk/ispchk.db and b/ISPChk/ispchk.db differ diff --git a/ISPChk/wwwroot/ispchk.js b/ISPChk/wwwroot/ispchk.js index 8171327..7bdcb0e 100644 --- a/ISPChk/wwwroot/ispchk.js +++ b/ISPChk/wwwroot/ispchk.js @@ -1,5 +1,6 @@ var hosts = []; var charts = {}; +var activeChart = 1; async function createHost(host) { $.postJSON("/api/host", host).then((res, status) => { @@ -77,16 +78,19 @@ async function prepareChart(host) { var chartDiv = $("#chartContainer"); var chartId = "chart_" + host.hostId; var canvas = $("", { id: chartId, width: 400, height: 200 }).appendTo(chartDiv).hide(); - $("