Commit 25aa7016 authored by dmorley's avatar dmorley

Merge branch 'develop' into 'master'

[2.6.2] - 2019-11-24

See merge request diasporg/Poduptime!245
parents 9b7f6936 4eebe5e3
Pipeline #4789 passed with stage
in 1 minute and 34 seconds
......@@ -9,6 +9,20 @@ The format is based on [Keep a Changelog] and this project adheres to [Semantic
### Fixed
### Security
## [2.6.2] - 2019-11-24
### Added
- Total rows count o loading screen as that is growing
- Status page timeout value is user set in config.php
### Changed
- Update backup meta if backup is a success
### Deprecated
### Removed
### Fixed
- Updated json pull for mastodon not having the full nodeinfo data
- Fix geoip if IP is not real
### Security
- Updated packages
## [2.6.1] - 2019-06-30
### Added
### Changed
......
This diff is collapsed.
......@@ -35,6 +35,9 @@ return [
//DNS server for dnssec testing. 1.1.1.1 tests the best
'dnsserver' => '',
//Number of minutes to report on status.php that the run is still green
'status_green' => '',
//CA for curl to use - full file path
'cafullpath' => '',
......
......@@ -233,16 +233,16 @@ a {
}
.signal {
border: 6px solid #ffffff;
border: 4px solid #ffffff;
border-radius: 50px;
height: 40px;
left: 5%;
left: 520px;
margin: -20px 0 0 -20px;
opacity: 0;
position: absolute;
top: 24%;
top: 197px;
width: 40px;
animation: pulsate 2s ease-in-out;
animation: pulsate 5s ease-out;
animation-iteration-count: infinite;
}
......
......@@ -26,6 +26,11 @@ system(sprintf(
c('pgdb'),
$backup_file
), $exit_code);
if ($exit_code === 0) {
updateMeta('backup');
}
debug(" %s\n", $exit_code === 0 ? 'Success!' : 'Failed.');
$dirh = dir(c('backup_dir'));
......@@ -48,5 +53,3 @@ while ($entry = $dirh->read()) {
unlink($file) ? 'Success!' : 'Failed.'
);
}
updateMeta('backup');
......@@ -99,8 +99,12 @@ if ('save' === $_action) {
?>
<script>
window.onload = function() {
$("#weight").ionRangeSlider();
$("#podmin_notify_level").ionRangeSlider();
$("#weight").ionRangeSlider({
skin: "big"
});
$("#podmin_notify_level").ionRangeSlider({
skin: "big"
});
}
</script>
Authorized to edit <b><?php echo $_domain; ?></b> for <?php echo (new Carbon($pod['tokenexpire']))->diffForHumans(null, true); ?><br>
......
......@@ -25,15 +25,15 @@ foreach ($softwares as $software => $details) {
$cjson = curl('https://' . $details['gitsite'] . '/repos/' . $details['repo'] . '/commits/' . $details['devbranch']);
$commitjson = json_decode($cjson['body'] ?: '');
}
if ($masterversion = $releasejson->tag_name ? str_replace('v', '', $releasejson->tag_name) : '') {
if (isset($releasejson->tag_name) && $masterversion = $releasejson->tag_name ? str_replace('v', '', $releasejson->tag_name) : '') {
try {
$m = R::dispense('masterversions');
$m['software'] = $software;
$m['version'] = $masterversion;
if ($releasedate = $releasejson ? $releasejson->published_at : '') {
if (isset($releasejson->published_at) && $releasedate = $releasejson ? $releasejson->published_at : '') {
$m['releasedate'] = $releasedate;
}
if ($devlastcommit = $commitjson ? $commitjson->commit->author->date : '') {
if (isset($commitjson->commit->author->date) && $devlastcommit = $commitjson ? $commitjson->commit->author->date : '') {
$m['devlastcommit'] = $devlastcommit;
}
R::store($m);
......@@ -48,15 +48,15 @@ foreach ($softwares as $software => $details) {
$cjson = curl('https://' . $details['gitsite'] . '/api/v4/projects/' . $details['repo'] . '/repository/commits/' . $details['devbranch']);
$commitjson = json_decode($cjson['body'] ?: '');
}
if ($masterversion = $releasejson[0]->name ? str_replace('v', '', $releasejson[0]->name) : '') {
if (isset($releasejson[0]->name) && $masterversion = $releasejson[0]->name ? str_replace('v', '', $releasejson[0]->name) : '') {
try {
$m = R::dispense('masterversions');
$m['software'] = $software;
$m['version'] = $masterversion;
if ($releasedate = $releasejson[0] ? $releasejson[0]->commit->created_at : '') {
if (isset($releasejson[0]->commit->created_at) && $releasedate = $releasejson[0] ? $releasejson[0]->commit->created_at : '') {
$m['releasedate'] = $releasedate;
}
if ($devlastcommit = $commitjson ? $commitjson->created_at : '') {
if (isset($commitjson->created_at) && $devlastcommit = $commitjson ? $commitjson->created_at : '') {
$m['devlastcommit'] = $devlastcommit;
}
R::store($m);
......
......@@ -160,8 +160,12 @@ foreach ($pods as $pod) {
$service_xmpp = ($jsonssl->metadata->xmppChat ?? false) === true;
if (json_last_error() === 0) {
(!$jsonssl->software->version) || $score += 1;
if (is_array($jsonssl->services->outbound)) {
$services = json_encode($jsonssl->services->outbound);
if (isset($jsonssl->services)) {
if (is_array($jsonssl->services->outbound)) {
$services = json_encode($jsonssl->services->outbound);
}
} else {
$services = "{}";
}
if (is_array($jsonssl->protocols)) {
$protocols = json_encode($jsonssl->protocols);
......@@ -334,7 +338,11 @@ foreach ($pods as $pod) {
// todo: Temporary workaround (see https://github.com/akalongman/php-ip-tools/issues/8)
if (Ip::isValid($ip) && Ip::isRemote($ip) && $ip != '0.0.0.0') {
$geo = $reader->city($ip);
try {
$geo = $reader->city($ip);
} catch (\GeoIp2\Exception\AddressNotFoundException $e) {
} catch (\MaxMind\Db\Reader\InvalidDatabaseException $e) {
}
$countryname = ($geo->country->name ?? null) ?: null;
$country = ($geo->country->isoCode ?? null) ?: null;
$city = ($geo->city->name ?? null) ?: null;
......
......@@ -33,7 +33,6 @@ $fullview = false;
<link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="css/poduptime.css"/>
<link rel="stylesheet" href="node_modules/ion-rangeslider/css/ion.rangeSlider.css"/>
<link rel="stylesheet" href="node_modules/ion-rangeslider/css/ion.rangeSlider.skinHTML5.css"/>
<link rel="stylesheet" href="node_modules/featherlight/release/featherlight.min.css"/>
<link rel="stylesheet" href="node_modules/tablesorter/dist/css/theme.bootstrap_4.min.css"/>
<link rel="stylesheet" href="node_modules/@fortawesome/fontawesome-free/css/all.min.css"/>
......
......@@ -63,9 +63,9 @@ $(document).ready(function () {
columns[8] = '';
}
$('table').trigger('search', [columns]);
$('.pagerhidden').delay(300).show(800);
$('.pagerhidden').delay(30).show(800);
$('[data-toggle="tooltip"]').tooltip();
$('.loadingtable').delay(300).hide(300);
$('.loadingtable').delay(30).hide(300);
});
$('#colSelect1').prop('checked', false);
});
......@@ -17,7 +17,9 @@ require_once __DIR__ . '/boot.php';
<head>
<script>
$(document).ready(function () {
$("#rating").ionRangeSlider();
$("#rating").ionRangeSlider({
skin: "big"
});
$('#addrating').click(function () {
$('.ratings').hide('fast');
$('#commentform').show('slow');
......
......@@ -6,9 +6,25 @@
declare(strict_types=1);
use Poduptime\PodStatus;
use RedBeanPHP\R;
require_once __DIR__ . '/boot.php';
// CloudFlare country code pull.
$country_code = $_SERVER['HTTP_CF_IPCOUNTRY'] ?? '';
try {
$pods = R::getAll("
SELECT count(domain)
FROM pods
WHERE status < ?
AND score > 0
", [PodStatus::RECHECK]);
} catch (\RedBeanPHP\RedException $e) {
die('Error in SQL query: ' . $e->getMessage());
}
?>
<style>
......@@ -58,7 +74,7 @@ $country_code = $_SERVER['HTTP_CF_IPCOUNTRY'] ?? '';
<div class="table-responsive">
<div class="loadingtable">
<div class="loadingmessage">Loading Table</div>
<div class="loadingmessage">Loading <span id="podcountdown"><?php echo $pods[0]['count']; ?></span> lines of data to the table, this takes under 30 seconds</div>
<div class="signal"></div>
</div>
<table class="table table-bordered table-sm tablesorter table-hover tfont">
......
......@@ -8,7 +8,7 @@ use Carbon\Carbon;
$pods_updated_stats = Carbon::createFromFormat('Y-m-d H:i:s.u', getMeta('pods_updated', 'date_created'))->diffInMinutes();
echo "<small>";
if ($pods_updated_stats < 200) {
if ($pods_updated_stats < c('status_green')) {
echo "System status is Green<br>";
} else {
echo "System status is Red<br>";
......
......@@ -147,7 +147,7 @@ foreach ($pods as $pod) {
foreach ($services as $service) {
// Make sure we have this service in the list.
if (!isset($services_list[$service])) {
debugToConsole($service);
//debugToConsole($service);
continue;
}
......
......@@ -3,9 +3,9 @@
"@fortawesome/fontawesome-free@^5.2.0":
version "5.8.2"
resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-5.8.2.tgz#fae4112c4fb47086f6ae167e32524b280000abd5"
integrity sha512-E4fDUF4fbu9AxKpaQQqCN3XBnNzb/5e0Gvd9OaQsYkK574LVI57v/EqqPfIm/mC7jYbxaPNrhvT5AF+Yzwyizg==
version "5.11.2"
resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-5.11.2.tgz#8644bc25b19475779a7b7c1fc104bc0a794f4465"
integrity sha512-XiUPoS79r1G7PcpnNtq85TJ7inJWe0v+b5oZJZKb0pGHNIV6+UiNeQWiFGmuQ0aj7GEhnD/v9iqxIsjuRKtEnQ==
bootstrap@^4.1.3:
version "4.3.1"
......@@ -13,9 +13,9 @@ bootstrap@^4.1.3:
integrity sha512-rXqOmH1VilAt2DyPzluTi2blhk17bO7ef+zLLPlWvG494pDxcM234pJ8wTc/6R40UWizAIIMgxjvxZg5kmsbag==
chart.js@^2.7.2:
version "2.8.0"
resolved "https://registry.yarnpkg.com/chart.js/-/chart.js-2.8.0.tgz#b703b10d0f4ec5079eaefdcd6ca32dc8f826e0e9"
integrity sha512-Di3wUL4BFvqI5FB5K26aQ+hvWh8wnP9A3DWGvXHVkO13D3DSnaSsdZx29cXlEsYKVkn1E2az+ZYFS4t0zi8x0w==
version "2.9.3"
resolved "https://registry.yarnpkg.com/chart.js/-/chart.js-2.9.3.tgz#ae3884114dafd381bc600f5b35a189138aac1ef7"
integrity sha512-+2jlOobSk52c1VU6fzkh3UwqHMdSlgH1xFv9FKMqHiNCpXsGPQa/+81AFa+i3jZ253Mq9aAycPwDjnn1XbRNNw==
dependencies:
chartjs-color "^2.1.0"
moment "^2.10.2"
......@@ -28,17 +28,24 @@ chartjs-color-string@^0.6.0:
color-name "^1.0.0"
chartjs-color@^2.1.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/chartjs-color/-/chartjs-color-2.3.0.tgz#0e7e1e8dba37eae8415fd3db38bf572007dd958f"
integrity sha512-hEvVheqczsoHD+fZ+tfPUE+1+RbV6b+eksp2LwAhwRTVXEjCSEavvk+Hg3H6SZfGlPh/UfmWKGIvZbtobOEm3g==
version "2.4.1"
resolved "https://registry.yarnpkg.com/chartjs-color/-/chartjs-color-2.4.1.tgz#6118bba202fe1ea79dd7f7c0f9da93467296c3b0"
integrity sha512-haqOg1+Yebys/Ts/9bLo/BqUcONQOdr/hoEr2LLTRl6C5LXctUdHxsCYfvQVg5JIxITrfCNUDr4ntqmQk9+/0w==
dependencies:
chartjs-color-string "^0.6.0"
color-convert "^0.5.3"
color-convert "^1.9.3"
color-convert@^1.9.3:
version "1.9.3"
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==
dependencies:
color-name "1.1.3"
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.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=
color-name@^1.0.0:
version "1.1.4"
......@@ -46,13 +53,13 @@ color-name@^1.0.0:
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
featherlight@^1.7.13:
version "1.7.13"
resolved "https://registry.yarnpkg.com/featherlight/-/featherlight-1.7.13.tgz#500f53204ba7b5bb4650370dd94ae5965c556e94"
integrity sha1-UA9TIEuntbtGUDcN2UrlllxVbpQ=
version "1.7.14"
resolved "https://registry.yarnpkg.com/featherlight/-/featherlight-1.7.14.tgz#7896909d0d7ac4672c334ba018363e519d31e4db"
integrity sha512-4R0Vk0pTN5IPCuMABPtXJ6hgGgoK1qwbxGB4Nf06gXovw/i+r3s/f94ksZYjsW3c2oMEAS9A8exdlNaX9YSSRQ==
fork-awesome@ForkAwesome/Fork-Awesome:
version "1.1.7"
resolved "https://codeload.github.com/ForkAwesome/Fork-Awesome/tar.gz/10fdbffbf1841759eb0f6b78229f92c7f599a8b3"
resolved "https://codeload.github.com/ForkAwesome/Fork-Awesome/tar.gz/b0605a81632452818bf19c8fa97469da1206b52b"
ion-rangeslider@^2.2.0:
version "2.3.0"
......@@ -72,9 +79,9 @@ leaflet.markercluster@^1.3.0:
integrity sha512-ZSEpE/EFApR0bJ1w/dUGwTSUvWlpalKqIzkaYdYB7jaftQA/Y2Jav+eT4CMtEYFj+ZK4mswP13Q2acnPBnhGOw==
leaflet@^1.3.3:
version "1.5.1"
resolved "https://registry.yarnpkg.com/leaflet/-/leaflet-1.5.1.tgz#9afb9d963d66c870066b1342e7a06f92840f46bf"
integrity sha512-ekM9KAeG99tYisNBg0IzEywAlp0hYI5XRipsqRXyRTeuU8jcuntilpp+eFf5gaE0xubc9RuSNIVtByEKwqFV0w==
version "1.6.0"
resolved "https://registry.yarnpkg.com/leaflet/-/leaflet-1.6.0.tgz#aecbb044b949ec29469eeb31c77a88e2f448f308"
integrity sha512-CPkhyqWUKZKFJ6K8umN5/D2wrJ2+/8UIpXppY7QDnUZW5bZL5+SEI2J7GBpwh4LIupOKqbNSQXgqmrEJopHVNQ==
moment@^2.10.2:
version "2.24.0"
......@@ -82,9 +89,9 @@ moment@^2.10.2:
integrity sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==
popper.js@^1.14.3:
version "1.15.0"
resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.15.0.tgz#5560b99bbad7647e9faa475c6b8056621f5a4ff2"
integrity sha512-w010cY1oCUmI+9KwwlWki+r5jxKfTFDVoadl7MSrIujHU5MJ5OR6HTDj6Xo8aoR/QsA56x8jKjA59qGH4ELtrA==
version "1.16.0"
resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.16.0.tgz#2e1816bcbbaa518ea6c2e15a466f4cb9c6e2fbb3"
integrity sha512-+G+EkOPoE5S/zChTpmBSSDYmhXJ5PsW8eMhH8cP/CQHMFPBG/kC9Y5IIw6qNYgdJ+/COf0ddY2li28iHaZRSjw==
tablesorter@^2.30.7:
version "2.31.1"
......
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