This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new f60414c  PingMyBox => NodePing
f60414c is described below

commit f60414c524e205b5edc12c7d9caca6ce52910544
Author: Sam Ruby <[email protected]>
AuthorDate: Sat May 12 08:56:42 2018 -0400

    PingMyBox => NodePing
---
 www/status/errors.cgi | 67 ---------------------------------------------------
 www/status/index.cgi  |  4 +--
 2 files changed, 2 insertions(+), 69 deletions(-)

diff --git a/www/status/errors.cgi b/www/status/errors.cgi
deleted file mode 100755
index 43d261a..0000000
--- a/www/status/errors.cgi
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/usr/bin/env ruby
-
-#
-# Fetch and parse the Ping My Box error log
-#
-
-require 'wunderbar'
-require 'uri'
-require 'yaml'
-require 'net/http'
-require 'time'
-
-# fetch status
-uri = URI.parse('https://www.pingmybox.com/api.pmb?what=errors&id=470')
-http = Net::HTTP.new(uri.host, uri.port)
-http.use_ssl = true
-request = Net::HTTP::Get.new(uri.request_uri)
-response = http.request(request)
-
-# extract time, pinger, and exception from response
-exceptions = YAML.load(response.body).map do |hash| 
-  exception = (hash['debug'][/Caught exception: .*?: (.*)/m, 1] ||
-    hash['debug'][/Caught exception: (.*)/m, 1]).to_s.strip
-  [Time.at(hash['time']), hash['pinger'], exception]
-end
-
-# produce table
-_html do
-  _link rel: 'stylesheet', href: 'css/bootstrap.min.css'
-  _h1 'Error Log'
-
-  _table.table do
-    _tr_ do
-      _th 'Pinger'
-      _th 'Time'
-      _th 'Status'
-      _th 'Error'
-    end
-
-    exceptions.sort.reverse.each do |time, pinger, text|
-      color = (text.include?('HTTP/1.1 3') ? 'warning' : 'danger')
-      _tr_ class: color do
-        _td align: 'right' do
-          _a pinger, href:
-            "https://www.pingmybox.com/pings?location=470&pinger=#{pinger}";
-        end
-        _td time.gmtime # show time in UTC for consistency
-        _td text[/^HTTP\/1.1 (\d+)/, 1] 
-        _td text.sub(/^HTTP\/1.1 \d+/, '')
-      end
-    end
-  end
-
-  _p do
-    _a 'raw log', href: uri.to_s
-  end
-
-  _script %{
-    Array.from(document.querySelectorAll('.time')).forEach(function(time) {
-      var date = new Date(Date.parse(time.textContent));
-      time.setAttribute('title', time.textContent);
-      time.textContent = date.toLocaleString();
-    });
-  }
-end
-
-
diff --git a/www/status/index.cgi b/www/status/index.cgi
index d6f9948..ed31ab1 100755
--- a/www/status/index.cgi
+++ b/www/status/index.cgi
@@ -76,8 +76,8 @@ print <<-EOF
 
     <p>
       This status is monitored by:
-      <a href="https://www.pingmybox.com/dashboard?location=470";>Ping My
-      Box</a> (<a href="errors">full log</a>).
+      <!-- https://nodeping.com/reports/status/70MTNEPXE6 -->
+      <a 
href="https://nodeping.com/reports/checks/e7hdvmc4-5e85-41vr-8xho-t8rjxow9dipl";>NodePing</a>.
     </p>
 
     <h2>Additional status</h2>

-- 
To stop receiving notification emails like this one, please contact
[email protected].

Reply via email to