diff options
| author | arf20 <aruizfernandez05@gmail.com> | 2025-10-21 17:46:26 +0200 |
|---|---|---|
| committer | arf20 <aruizfernandez05@gmail.com> | 2025-10-21 17:46:26 +0200 |
| commit | 6ed92d313341a1ff2b1dfc822f6a02eee0b3854a (patch) | |
| tree | b40b7bed9d6837d73f2322d76aef362bab0b7ac6 | |
| parent | ebbe4a02815287d26968e96b282384e8b26cf3fb (diff) | |
| download | arfnet2-status-6ed92d313341a1ff2b1dfc822f6a02eee0b3854a.tar.gz arfnet2-status-6ed92d313341a1ff2b1dfc822f6a02eee0b3854a.zip | |
wip: incidents and uptime
| -rw-r--r-- | README.md | 10 | ||||
| -rw-r--r-- | index.htm.tmpl | 32 | ||||
| -rw-r--r-- | main.c | 4 |
3 files changed, 36 insertions, 10 deletions
@@ -12,9 +12,9 @@ make ## Features (TODO) - - Current service status table - - Outage events table - - Uptime counter (total, month) - - Alerts - - Centralised config + [X] Current service status table + [ ] Outage events table + [ ] Uptime counter (total, month) + [ ] Alerts + [ ] Centralised config diff --git a/index.htm.tmpl b/index.htm.tmpl index e545845..0372cc7 100644 --- a/index.htm.tmpl +++ b/index.htm.tmpl @@ -16,6 +16,15 @@ table, th, td { .down { background-color: red; } + +.row { + +} + +.col { + float: left; + width: 50%; +} </style> </head> @@ -27,10 +36,25 @@ table, th, td { <main> <h2 class="center">Status Monitor</h2> <p>This webapp monitors the status of the main ARFNET services from outside the ARFNET network</p> - <table> - <tr><th>Type</th><th>Service</th><th>Status</th></tr> - %s - </table> + <div class="col"> + Services + <table> + <tr><th>Type</th><th>Service</th><th>Status</th></tr> + %s + </table> + </div> + <div class="col"> + Uptime + <table> + <tr><th>Week %%up</th><th>Month %%up</th><th>Total %%up since %s</th></tr> + <tr><td>%s</td><td>%s</td><td>%s</td></tr> + </table> + Incidents + <table> + <tr><th>Resolved</th><th>Started</th><th>Duration</th></tr> + <tr>%s</tr> + </table> + </div> </main> </body> </html> @@ -50,7 +50,9 @@ enum MHD_Result answer_to_connection( if (strcmp(method, "GET") == 0 && strcmp(url, "/") == 0) { snprintf(buff, RES_BUFF, - index_format_template, monitor_generate_status_html()); + index_format_template, + monitor_generate_status_html(), "(since)", "(week %up)", + "(month %up)", "(total %up)", "(incidents)"); response = MHD_create_response_from_buffer(strlen(buff), (void*)buff, MHD_RESPMEM_PERSISTENT); |
