Commit 7c2f80d0 authored by David Morley's avatar David Morley

Cleanup and fix bugs

parent 8f8aeb32
Pipeline #385 failed with stages
in 7 seconds
ALTER TABLE ratingcomments DROP COLUMN userurl;
......@@ -3,14 +3,14 @@
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
cd "$SCRIPT_DIR"
FLAG_FILE="/tmp/poduptime.pulling"
FLAG_FILE="/tmp/poduptime.updating"
HOUR=$(date +%H)
DAY=$(date +%d)
HAPPY=" :-)"
SAD=" :-("
if [ -f "$FLAG_FILE" ]; then
echo "Already running pull"
echo "Already running update"
exit 1
fi
touch "$FLAG_FILE"
......@@ -26,20 +26,20 @@ fi
echo "$HAPPY"
if [ "$HOUR" = 23 ] || [ "$1" = 'init' ]; then
printf "%s" "Pulling in master versions..."
if php pull-masterversions.php; then
printf "%s" "Updating master versions..."
if php update-masterversions.php; then
echo "$HAPPY"
else
echo "$SAD"
fi
printf "%s" "Updating Monthy Stats Table..."
if php monthly_stats.php; then
if php update-monthly-stats.php; then
echo "$HAPPY"
else
echo "$SAD"
fi
printf "%s" "Crawling the federation..."
if php podcrawler.php; then
printf "%s" "Crawling and updating from the federation..."
if php update-remote-data.php; then
echo "$HAPPY"
else
echo "$SAD"
......@@ -62,10 +62,10 @@ if [ "$HOUR" = 23 ] || [ "$1" = 'init' ]; then
fi
fi
echo "Pulling in new pod data...";
php pull.php $@
echo "Updating in new pod data...";
php update.php $@
touch last.data
echo "Finished pull!"
echo "Finished update!"
echo "Backing up..."
php backup.php
......
......@@ -10,7 +10,6 @@ use RedBeanPHP\R;
// Required parameters.
($_username = $_POST['username'] ?? null) || die('Name is required');
//($_userurl = $_POST['userurl'] ?? null) || die('no userurl given');//lets not annoy people on this for now
($_domain = $_POST['domain'] ?? null) || die('no pod domain given');
($_comment = $_POST['comment'] ?? null) || die('A comment is required');
($_rating = $_POST['rating'] ?? null) || die('A rating is required');
......@@ -23,7 +22,6 @@ try {
$r['comment'] = $_comment;
$r['rating'] = $_rating;
$r['username'] = $_username;
//$r['userurl'] = $_userurl;
R::store($r);
} catch (\RedBeanPHP\RedException $e) {
die('Error in SQL query: ' . $e->getMessage());
......
......@@ -54,7 +54,6 @@ CREATE TABLE ratingcomments (
pod_id int,
rating int,
username text,
userurl text,
date_created timestamp DEFAULT current_timestamp
);
......
......@@ -57,10 +57,11 @@ $(document).ready(function () {
$('table').trigger('update', [true]);
var columns = [];
var input = $('input:input[name="input"]').val();
columns[7] = 'Yes';
if (input) {
columns[0] = input;
columns[7] = '';
}
columns[7] = 'Yes';
$('table').trigger('search', [columns]);
$('.pagerhidden').delay(900).show(200);
$('[data-toggle="tooltip"]').tooltip();
......
......@@ -17,7 +17,7 @@
<tr>
<td>
<div class="col text-center">Average Network User Growth<br>
<canvas id="user_growth" style="height:300px; width:500px"></canvas>
<canvas id="user_growth" style="height:300px; width:900px"></canvas>
</div>
</td>
</tr>
......
......@@ -5,14 +5,17 @@
"@fortawesome/fontawesome-free@^5.2.0":
version "5.3.1"
resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-5.3.1.tgz#5466b8f31c1f493a96754c1426c25796d0633dd9"
integrity sha512-jt6yi7iZVtkY9Jc6zFo+G2vqL4M81pb3IA3WmnnDt9ci7Asz+mPg4gbZL8pjx0nGFBsG0Bmd7BjU9IQkebqxFA==
bootstrap@^4.1.3:
version "4.1.3"
resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-4.1.3.tgz#0eb371af2c8448e8c210411d0cb824a6409a12be"
integrity sha512-rDFIzgXcof0jDyjNosjv4Sno77X4KuPeFxG2XZZv1/Kc8DRVGVADdoQyyOVDwPqL36DDmtCQbrpMCqvpPLJQ0w==
chart.js@^2.7.2:
version "2.7.2"
resolved "https://registry.yarnpkg.com/chart.js/-/chart.js-2.7.2.tgz#3c9fde4dc5b95608211bdefeda7e5d33dffa5714"
integrity sha512-90wl3V9xRZ8tnMvMlpcW+0Yg13BelsGS9P9t0ClaDxv/hdypHDr/YAGf+728m11P5ljwyB0ZHfPKCapZFqSqYA==
dependencies:
chartjs-color "^2.1.0"
moment "^2.10.2"
......@@ -20,12 +23,14 @@ chart.js@^2.7.2:
chartjs-color-string@^0.5.0:
version "0.5.0"
resolved "https://registry.yarnpkg.com/chartjs-color-string/-/chartjs-color-string-0.5.0.tgz#8d3752d8581d86687c35bfe2cb80ac5213ceb8c1"
integrity sha512-amWNvCOXlOUYxZVDSa0YOab5K/lmEhbFNKI55PWc4mlv28BDzA7zaoQTGxSBgJMHIW+hGX8YUrvw/FH4LyhwSQ==
dependencies:
color-name "^1.0.0"
chartjs-color@^2.1.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/chartjs-color/-/chartjs-color-2.2.0.tgz#84a2fb755787ed85c39dd6dd8c7b1d88429baeae"
integrity sha1-hKL7dVeH7YXDndbdjHsdiEKbrq4=
dependencies:
chartjs-color-string "^0.5.0"
color-convert "^0.5.3"
......@@ -33,47 +38,58 @@ chartjs-color@^2.1.0:
color-convert@^0.5.3:
version "0.5.3"
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-0.5.3.tgz#bdb6c69ce660fadffe0b0007cc447e1b9f7282bd"
integrity sha1-vbbGnOZg+t/+CwAHzER+G59ygr0=
color-name@^1.0.0:
version "1.1.3"
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=
featherlight@^1.7.13:
version "1.7.13"
resolved "https://registry.yarnpkg.com/featherlight/-/featherlight-1.7.13.tgz#500f53204ba7b5bb4650370dd94ae5965c556e94"
integrity sha1-UA9TIEuntbtGUDcN2UrlllxVbpQ=
ion-rangeslider@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/ion-rangeslider/-/ion-rangeslider-2.2.0.tgz#388f12cd70593a61b3368fad6c4f30a5da8b97c9"
integrity sha1-OI8SzXBZOmGzNo+tbE8wpdqLl8k=
dependencies:
jquery ">=1.8"
jquery@>=1.2.6, jquery@>=1.8, jquery@^3.3.1:
version "3.3.1"
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.3.1.tgz#958ce29e81c9790f31be7792df5d4d95fc57fbca"
integrity sha512-Ubldcmxp5np52/ENotGxlLe6aGMvmF4R8S6tZjsP6Knsaxd/xp3Zrh50cG93lR6nPXyUFwzN3ZSOQI0wRJNdGg==
leaflet.markercluster@^1.3.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/leaflet.markercluster/-/leaflet.markercluster-1.4.0.tgz#82d1892e2dfa6d3b2da262d9ed373c12411ba861"
integrity sha512-8WXIZFnIViNjp1YctGPcm1FXyppzuxs+cNjnghSeHK3Z1+zhq5BSESc6aQZan118X9TqptuP9Vzf29NVob+6Uw==
leaflet@^1.3.3:
version "1.3.4"
resolved "https://registry.yarnpkg.com/leaflet/-/leaflet-1.3.4.tgz#7f006ea5832603b53d7269ef5c595fd773060a40"
integrity sha512-FYL1LGFdj6v+2Ifpw+AcFIuIOqjNggfoLUwuwQv6+3sS21Za7Wvapq+LhbSE4NDXrEj6eYnW3y7LsaBICpyXtw==
moment@^2.10.2:
version "2.22.2"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.22.2.tgz#3c257f9839fc0e93ff53149632239eb90783ff66"
integrity sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y=
popper.js@^1.14.3:
version "1.14.4"
resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.14.4.tgz#8eec1d8ff02a5a3a152dd43414a15c7b79fd69b6"
integrity sha1-juwdj/AqWjoVLdQ0FKFce3n9abY=
tablesorter@^2.30.7:
version "2.31.0"
resolved "https://registry.yarnpkg.com/tablesorter/-/tablesorter-2.31.0.tgz#56fb478bb5317ecdfd4769b2f1b17598c98fee39"
integrity sha512-ys8Cvsc6V9wj7h+zU9uwS3LwKnct9FbE4UrLJE6hane96+Dl5oC3qQYPzM1YZZo9S0rZuvf2ozUj57psIXB7PQ==
dependencies:
jquery ">=1.2.6"
typeface-roboto@^0.0.54:
version "0.0.54"
resolved "https://registry.yarnpkg.com/typeface-roboto/-/typeface-roboto-0.0.54.tgz#8f02c9a18d1cfa7f49381a6ff0d21ff061f38ad2"
integrity sha512-sOFA1FXgP0gOgBYlS6irwq6hHYA370KE3dPlgYEJHL3PJd5X8gQE0RmL79ONif6fL5JZuGDj+rtOrFeOqz5IZQ==
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