Commit 4f6b71de authored by dmorley's avatar dmorley Committed by GitHub

stats_api key should still be in the db (#135)

parent 5d63bcda
......@@ -86,8 +86,7 @@ try {
echo '<td>' . $pod['active_users_monthly'] . '</td>';
echo '<td>' . $pod['local_posts'] . '</td>';
echo '<td>' . $pod['comment_counts'] . '</td>';
$moreurl = 'https://api.uptimerobot.com/getMonitors?format=json&noJsonCallback=1&customUptimeRatio=7-30-60-90&apiKey=' . $pod['stats_apikey'];
echo '<td><div title="Last Check ' . $pod['date_updated'] . '" class="tipsy"><a target="_self" href="' . $moreurl . '">' . $pod['monthsmonitored'] . '</a></div></td>';
echo '<td><div title="Last Check ' . $pod['date_updated'] . '" class="tipsy">' . $pod['monthsmonitored'] . '</div></td>';
echo '<td>' . $pod['score'] . '</td>';
echo '<td><div class="tipsy" title="' . $pod['sslvalid'] . '">con info</td>';
?>
......
......@@ -33,7 +33,7 @@ R::usePartialBeans(true);
try {
$pods = R::getAll('
SELECT id, domain, stats_apikey, publickey, email
SELECT id, domain, publickey, email
FROM pods
');
} catch (\RedBeanPHP\RedException $e) {
......
......@@ -5,6 +5,7 @@ CREATE TABLE pods (
softwarename text,
masterversion text,
shortversion text,
stats_apikey text,
score int DEFAULT 50,
weightedscore numeric(5,2) DEFAULT 0,
adminrating decimal DEFAULT 0,
......
......@@ -6,7 +6,7 @@ defined('PODUPTIME') || die();
try {
$pods = R::getAll('
SELECT domain, dnssec, podmin_statement, sslexpire, masterversion, shortversion, softwarename, monthsmonitored, score, signup, name, country, city, state, lat, long, uptime_alltime, active_users_halfyear, active_users_monthly, service_facebook, service_twitter, service_tumblr, service_wordpress, service_xmpp, latency, date_updated, ipv6, total_users, local_posts, comment_counts, stats_apikey, userrating, status
SELECT domain, dnssec, podmin_statement, sslexpire, masterversion, shortversion, softwarename, monthsmonitored, score, signup, name, country, city, state, lat, long, uptime_alltime, active_users_halfyear, active_users_monthly, service_facebook, service_twitter, service_tumblr, service_wordpress, service_xmpp, latency, date_updated, ipv6, total_users, local_posts, comment_counts, userrating, status
FROM pods
WHERE uptime_alltime > 50
ORDER BY weightedscore DESC
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment