Add stats page
parent
cf7fd42983
commit
b6b82b88f7
|
@ -38,6 +38,8 @@ sub startup ($self) {
|
|||
$r->get('/announcements')->to('Main#announcements');
|
||||
$r->get('/announcements.rss')->to('Main#announcement_feed');
|
||||
$r->get('/announcement/#filename')->to('Main#get_announcement');
|
||||
|
||||
$r->get('/stats')->to('Main#get_stats');
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
@ -232,4 +232,8 @@ sub get_entry($fullpath) {
|
|||
};
|
||||
}
|
||||
|
||||
sub get_stats($self) {
|
||||
return $self->render('main/statsPage');
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
@ -160,3 +160,9 @@ pre {
|
|||
label.field-with-error {
|
||||
color: red;
|
||||
}
|
||||
|
||||
img.stats {
|
||||
width: 100%;
|
||||
image-rendering: pixelated;
|
||||
display: block;
|
||||
}
|
||||
|
|
|
@ -40,5 +40,4 @@
|
|||
Please follow <a href="/rules">all rules</a> while using these services.
|
||||
</footer>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
|
@ -58,5 +58,5 @@
|
|||
<a href="https://keithhacks.cyou/">~keith</a>
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<a href="/stats">View live system stats!</a>
|
||||
</article>
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
% title 'UNIX.dog Stats';
|
||||
% layout 'default';
|
||||
<article>
|
||||
<h1>Stats</h1>
|
||||
<p>Current UNIX.dog system statistics for woofer.unix.dog.</p>
|
||||
<a href="/vnstat-summary.txt"><img class="stats" alt="Network usage summary" src="/vnstat-summary.png"></a>
|
||||
<a href="/vnstat-top5.txt"><img class="stats" alt="Network usage top 5 days" src="/vnstat-top5.png"></a>
|
||||
<a href="/vnstat-5m.txt"><img class="stats" alt="Network usage in 5m intervals" src="/vnstat-5m.png"></a>
|
||||
<a href="/vmstat-cpu.txt"><img class="stats" alt="CPU usage graph" src="/vmstat-cpu.png"></a>
|
||||
<a href="/vmstat-mem.txt"><img class="stats" alt="Memory usage graph" src="/vmstat-mem.png"></a>
|
||||
</article>
|
Loading…
Reference in New Issue