~xdavidwu/uptime-monitor

ec3880cd317728829c1f2011ed23ed2a841f0419 — xdavidwu 3 years ago 832e4de
view: uptime: add status string to tooltip
2 files changed, 4 insertions(+), 4 deletions(-)

M app/Http/Controllers/UptimeController.php
M resources/views/uptime.blade.php
M app/Http/Controllers/UptimeController.php => app/Http/Controllers/UptimeController.php +3 -3
@@ 28,13 28,13 @@ class UptimeController extends Controller

                $known = false;
                $up = true;
                $info = 'Succeeded';
                $info = 'Probe succeeded';
                while ($raw_index < $raw_length &&
                        $raw_logs[$raw_index]->created_at < $localto) {
                    $known = true;
                    if ($raw_logs[$raw_index]->success == false) {
                        $up = false;
                        $info = 'Failed';
                        $info = 'Probe failed';
                    }
                    $raw_index++;
                }


@@ 44,7 44,7 @@ class UptimeController extends Controller
                    'to' => $localto,
                    'known' => $known,
                    'up' => $up,
                    'info' =>'',
                    'info' => $known ? $info : 'Unknown',
                ];
            }


M resources/views/uptime.blade.php => resources/views/uptime.blade.php +1 -1
@@ 105,7 105,7 @@
                    <div class="uptime-grid">
                        @foreach ($instance['logs'] as $log)
                            <div class="uptime-item {{ $log['known'] ? $log['up'] ? 'up' : 'down' : 'unknown' }}"
                                title="{{ "{$log['from']} to {$log['to']}" }}">
                                title="{{ "{$log['from']} ~ {$log['to']}: {$log['info']}" }}">
                            </div>
                        @endforeach
                    </div>