diff --git a/lib/unix_dog.pm b/lib/unix_dog.pm index 1437a99..5cf4e35 100644 --- a/lib/unix_dog.pm +++ b/lib/unix_dog.pm @@ -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; diff --git a/lib/unix_dog/Controller/Main.pm b/lib/unix_dog/Controller/Main.pm index b227a72..ebbd235 100644 --- a/lib/unix_dog/Controller/Main.pm +++ b/lib/unix_dog/Controller/Main.pm @@ -232,4 +232,8 @@ sub get_entry($fullpath) { }; } +sub get_stats($self) { + return $self->render('main/statsPage'); +} + 1; diff --git a/public/css/main.css b/public/css/main.css index 437b9c4..ce18206 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -160,3 +160,9 @@ pre { label.field-with-error { color: red; } + +img.stats { + width: 100%; + image-rendering: pixelated; + display: block; +} diff --git a/templates/layouts/default.html.ep b/templates/layouts/default.html.ep index d8a05ee..c5794ba 100644 --- a/templates/layouts/default.html.ep +++ b/templates/layouts/default.html.ep @@ -40,5 +40,4 @@ Please follow all rules while using these services. - diff --git a/templates/main/index.html.ep b/templates/main/index.html.ep index 8a1b0bc..41b7c21 100644 --- a/templates/main/index.html.ep +++ b/templates/main/index.html.ep @@ -58,5 +58,5 @@ ~keith

- + View live system stats! diff --git a/templates/main/statsPage.html.ep b/templates/main/statsPage.html.ep new file mode 100644 index 0000000..d820058 --- /dev/null +++ b/templates/main/statsPage.html.ep @@ -0,0 +1,11 @@ +% title 'UNIX.dog Stats'; +% layout 'default'; +
+

Stats

+

Current UNIX.dog system statistics for woofer.unix.dog.

+ Network usage summary + Network usage top 5 days + Network usage in 5m intervals + CPU usage graph + Memory usage graph +