diff options
32 files changed, 425 insertions, 206 deletions
diff --git a/fixtures/Host.Boots.Gemtext.expected b/fixtures/Host.Boots.Gemtext.expected index a6f27d4..34f7286 100644 --- a/fixtures/Host.Boots.Gemtext.expected +++ b/fixtures/Host.Boots.Gemtext.expected @@ -3,11 +3,11 @@ Boots is the total number of host boots over the entire lifespan. ``` -+-----+----------------+-------+-----------------------------+ -| Pos | Host | Boots | Last Kernel | -+-----+----------------+-------+-----------------------------+ -| 1. | alphacentauri | 671 | FreeBSD 11.4-RELEASE-p7 | -| 2. | mars | 207 | Linux 3.2.0-4-amd64 | -| 3. | callisto | 153 | Linux 4.0.4-303.fc22.x86_64 | -+-----+----------------+-------+-----------------------------+ ++-----+----------------+-------+-----------------------------+------------------+ +| Pos | Host | Boots | Last Kernel | Updated | ++-----+----------------+-------+-----------------------------+------------------+ +| 1. | alphacentauri | 671 | FreeBSD 11.4-RELEASE-p7 | 2026-03-03 18:29 | +| 2. | mars | 207 | Linux 3.2.0-4-amd64 | 2026-03-03 18:29 | +| 3. | callisto | 153 | Linux 4.0.4-303.fc22.x86_64 | 2026-03-03 18:29 | ++-----+----------------+-------+-----------------------------+------------------+ ``` diff --git a/fixtures/Host.Boots.HTML.expected b/fixtures/Host.Boots.HTML.expected index 07aa52d..eb11339 100644 --- a/fixtures/Host.Boots.HTML.expected +++ b/fixtures/Host.Boots.HTML.expected @@ -11,13 +11,13 @@ <br /> <span class="quote">Boots is the total number of host boots over the entire lifespan.</span><br /> <br /> -<pre>+-----+----------------+-------+-----------------------------+ -| Pos | Host | Boots | Last Kernel | -+-----+----------------+-------+-----------------------------+ -| 1. | alphacentauri | 671 | FreeBSD 11.4-RELEASE-p7 | -| 2. | mars | 207 | Linux 3.2.0-4-amd64 | -| 3. | callisto | 153 | Linux 4.0.4-303.fc22.x86_64 | -+-----+----------------+-------+-----------------------------+ +<pre>+-----+----------------+-------+-----------------------------+------------------+ +| Pos | Host | Boots | Last Kernel | Updated | ++-----+----------------+-------+-----------------------------+------------------+ +| 1. | alphacentauri | 671 | FreeBSD 11.4-RELEASE-p7 | 2026-03-03 18:29 | +| 2. | mars | 207 | Linux 3.2.0-4-amd64 | 2026-03-03 18:29 | +| 3. | callisto | 153 | Linux 4.0.4-303.fc22.x86_64 | 2026-03-03 18:29 | ++-----+----------------+-------+-----------------------------+------------------+ </pre> </body> </html> diff --git a/fixtures/Host.Boots.Markdown.expected b/fixtures/Host.Boots.Markdown.expected index a6f27d4..34f7286 100644 --- a/fixtures/Host.Boots.Markdown.expected +++ b/fixtures/Host.Boots.Markdown.expected @@ -3,11 +3,11 @@ Boots is the total number of host boots over the entire lifespan. ``` -+-----+----------------+-------+-----------------------------+ -| Pos | Host | Boots | Last Kernel | -+-----+----------------+-------+-----------------------------+ -| 1. | alphacentauri | 671 | FreeBSD 11.4-RELEASE-p7 | -| 2. | mars | 207 | Linux 3.2.0-4-amd64 | -| 3. | callisto | 153 | Linux 4.0.4-303.fc22.x86_64 | -+-----+----------------+-------+-----------------------------+ ++-----+----------------+-------+-----------------------------+------------------+ +| Pos | Host | Boots | Last Kernel | Updated | ++-----+----------------+-------+-----------------------------+------------------+ +| 1. | alphacentauri | 671 | FreeBSD 11.4-RELEASE-p7 | 2026-03-03 18:29 | +| 2. | mars | 207 | Linux 3.2.0-4-amd64 | 2026-03-03 18:29 | +| 3. | callisto | 153 | Linux 4.0.4-303.fc22.x86_64 | 2026-03-03 18:29 | ++-----+----------------+-------+-----------------------------+------------------+ ``` diff --git a/fixtures/Host.Boots.Plaintext.expected b/fixtures/Host.Boots.Plaintext.expected index 75d8f24..57690d0 100644 --- a/fixtures/Host.Boots.Plaintext.expected +++ b/fixtures/Host.Boots.Plaintext.expected @@ -1,12 +1,11 @@ Top 3 Boots's by Host - Boots is the total number of host boots over the entire -lifespan. +Boots is the total number of host boots over the entire lifespan. -+-----+----------------+-------+-----------------------------+ -| Pos | Host | Boots | Last Kernel | -+-----+----------------+-------+-----------------------------+ -| 1. | alphacentauri | 671 | FreeBSD 11.4-RELEASE-p7 | -| 2. | mars | 207 | Linux 3.2.0-4-amd64 | -| 3. | callisto | 153 | Linux 4.0.4-303.fc22.x86_64 | -+-----+----------------+-------+-----------------------------+ ++-----+----------------+-------+-----------------------------+------------------+ +| Pos | Host | Boots | Last Kernel | Updated | ++-----+----------------+-------+-----------------------------+------------------+ +| 1. | alphacentauri | 671 | FreeBSD 11.4-RELEASE-p7 | 2026-03-03 18:29 | +| 2. | mars | 207 | Linux 3.2.0-4-amd64 | 2026-03-03 18:29 | +| 3. | callisto | 153 | Linux 4.0.4-303.fc22.x86_64 | 2026-03-03 18:29 | ++-----+----------------+-------+-----------------------------+------------------+ diff --git a/fixtures/Host.Downtime.Gemtext.expected b/fixtures/Host.Downtime.Gemtext.expected index ae83985..01a59f7 100644 --- a/fixtures/Host.Downtime.Gemtext.expected +++ b/fixtures/Host.Downtime.Gemtext.expected @@ -3,11 +3,11 @@ Downtime is the total downtime of a host over the entire lifespan. ``` -+-----+----------------+-----------------------------+--------------------------+ -| Pos | Host | Downtime | Last Kernel | -+-----+----------------+-----------------------------+--------------------------+ -| 1. | dionysus | 8 years, 3 months, 16 days | FreeBSD 13.0-RELEASE-p11 | -| 2. | alphacentauri | 5 years, 11 months, 18 days | FreeBSD 11.4-RELEASE-p7 | -| 3. | uranus | 3 years, 3 months, 28 days | Linux 5.16.14-arch1-1 | -+-----+----------------+-----------------------------+--------------------------+ ++-----+----------------+-----------------------------+--------------------------+------------------+ +| Pos | Host | Downtime | Last Kernel | Updated | ++-----+----------------+-----------------------------+--------------------------+------------------+ +| 1. | dionysus | 8 years, 3 months, 16 days | FreeBSD 13.0-RELEASE-p11 | 2026-03-03 18:29 | +| 2. | alphacentauri | 5 years, 11 months, 18 days | FreeBSD 11.4-RELEASE-p7 | 2026-03-03 18:29 | +| 3. | uranus | 3 years, 3 months, 28 days | Linux 5.16.14-arch1-1 | 2026-03-03 18:29 | ++-----+----------------+-----------------------------+--------------------------+------------------+ ``` diff --git a/fixtures/Host.Downtime.HTML.expected b/fixtures/Host.Downtime.HTML.expected index ecbbe42..020f638 100644 --- a/fixtures/Host.Downtime.HTML.expected +++ b/fixtures/Host.Downtime.HTML.expected @@ -11,13 +11,13 @@ <br /> <span class="quote">Downtime is the total downtime of a host over the entire lifespan.</span><br /> <br /> -<pre>+-----+----------------+-----------------------------+--------------------------+ -| Pos | Host | Downtime | Last Kernel | -+-----+----------------+-----------------------------+--------------------------+ -| 1. | dionysus | 8 years, 3 months, 16 days | FreeBSD 13.0-RELEASE-p11 | -| 2. | alphacentauri | 5 years, 11 months, 18 days | FreeBSD 11.4-RELEASE-p7 | -| 3. | uranus | 3 years, 3 months, 28 days | Linux 5.16.14-arch1-1 | -+-----+----------------+-----------------------------+--------------------------+ +<pre>+-----+----------------+-----------------------------+--------------------------+------------------+ +| Pos | Host | Downtime | Last Kernel | Updated | ++-----+----------------+-----------------------------+--------------------------+------------------+ +| 1. | dionysus | 8 years, 3 months, 16 days | FreeBSD 13.0-RELEASE-p11 | 2026-03-03 18:29 | +| 2. | alphacentauri | 5 years, 11 months, 18 days | FreeBSD 11.4-RELEASE-p7 | 2026-03-03 18:29 | +| 3. | uranus | 3 years, 3 months, 28 days | Linux 5.16.14-arch1-1 | 2026-03-03 18:29 | ++-----+----------------+-----------------------------+--------------------------+------------------+ </pre> </body> </html> diff --git a/fixtures/Host.Downtime.Markdown.expected b/fixtures/Host.Downtime.Markdown.expected index ae83985..01a59f7 100644 --- a/fixtures/Host.Downtime.Markdown.expected +++ b/fixtures/Host.Downtime.Markdown.expected @@ -3,11 +3,11 @@ Downtime is the total downtime of a host over the entire lifespan. ``` -+-----+----------------+-----------------------------+--------------------------+ -| Pos | Host | Downtime | Last Kernel | -+-----+----------------+-----------------------------+--------------------------+ -| 1. | dionysus | 8 years, 3 months, 16 days | FreeBSD 13.0-RELEASE-p11 | -| 2. | alphacentauri | 5 years, 11 months, 18 days | FreeBSD 11.4-RELEASE-p7 | -| 3. | uranus | 3 years, 3 months, 28 days | Linux 5.16.14-arch1-1 | -+-----+----------------+-----------------------------+--------------------------+ ++-----+----------------+-----------------------------+--------------------------+------------------+ +| Pos | Host | Downtime | Last Kernel | Updated | ++-----+----------------+-----------------------------+--------------------------+------------------+ +| 1. | dionysus | 8 years, 3 months, 16 days | FreeBSD 13.0-RELEASE-p11 | 2026-03-03 18:29 | +| 2. | alphacentauri | 5 years, 11 months, 18 days | FreeBSD 11.4-RELEASE-p7 | 2026-03-03 18:29 | +| 3. | uranus | 3 years, 3 months, 28 days | Linux 5.16.14-arch1-1 | 2026-03-03 18:29 | ++-----+----------------+-----------------------------+--------------------------+------------------+ ``` diff --git a/fixtures/Host.Downtime.Plaintext.expected b/fixtures/Host.Downtime.Plaintext.expected index 1da87aa..4824d16 100644 --- a/fixtures/Host.Downtime.Plaintext.expected +++ b/fixtures/Host.Downtime.Plaintext.expected @@ -2,10 +2,10 @@ Top 3 Downtime's by Host Downtime is the total downtime of a host over the entire lifespan. -+-----+----------------+-----------------------------+--------------------------+ -| Pos | Host | Downtime | Last Kernel | -+-----+----------------+-----------------------------+--------------------------+ -| 1. | dionysus | 8 years, 3 months, 16 days | FreeBSD 13.0-RELEASE-p11 | -| 2. | alphacentauri | 5 years, 11 months, 18 days | FreeBSD 11.4-RELEASE-p7 | -| 3. | uranus | 3 years, 3 months, 28 days | Linux 5.16.14-arch1-1 | -+-----+----------------+-----------------------------+--------------------------+ ++-----+----------------+-----------------------------+--------------------------+------------------+ +| Pos | Host | Downtime | Last Kernel | Updated | ++-----+----------------+-----------------------------+--------------------------+------------------+ +| 1. | dionysus | 8 years, 3 months, 16 days | FreeBSD 13.0-RELEASE-p11 | 2026-03-03 18:29 | +| 2. | alphacentauri | 5 years, 11 months, 18 days | FreeBSD 11.4-RELEASE-p7 | 2026-03-03 18:29 | +| 3. | uranus | 3 years, 3 months, 28 days | Linux 5.16.14-arch1-1 | 2026-03-03 18:29 | ++-----+----------------+-----------------------------+--------------------------+------------------+ diff --git a/fixtures/Host.Lifespan.Gemtext.expected b/fixtures/Host.Lifespan.Gemtext.expected index b5cf89c..f247c8e 100644 --- a/fixtures/Host.Lifespan.Gemtext.expected +++ b/fixtures/Host.Lifespan.Gemtext.expected @@ -3,11 +3,11 @@ Lifespan is the total uptime + the total downtime of a host. ``` -+-----+----------------+----------------------------+--------------------------+ -| Pos | Host | Lifespan | Last Kernel | -+-----+----------------+----------------------------+--------------------------+ -| 1. | dionysus | 8 years, 6 months, 17 days | FreeBSD 13.0-RELEASE-p11 | -| 2. | uranus | 7 years, 2 months, 16 days | Linux 5.16.14-arch1-1 | -| 3. | alphacentauri | 6 years, 9 months, 13 days | FreeBSD 11.4-RELEASE-p7 | -+-----+----------------+----------------------------+--------------------------+ ++-----+----------------+----------------------------+--------------------------+------------------+ +| Pos | Host | Lifespan | Last Kernel | Updated | ++-----+----------------+----------------------------+--------------------------+------------------+ +| 1. | dionysus | 8 years, 6 months, 17 days | FreeBSD 13.0-RELEASE-p11 | 2026-03-03 18:29 | +| 2. | uranus | 7 years, 2 months, 16 days | Linux 5.16.14-arch1-1 | 2026-03-03 18:29 | +| 3. | alphacentauri | 6 years, 9 months, 13 days | FreeBSD 11.4-RELEASE-p7 | 2026-03-03 18:29 | ++-----+----------------+----------------------------+--------------------------+------------------+ ``` diff --git a/fixtures/Host.Lifespan.HTML.expected b/fixtures/Host.Lifespan.HTML.expected index 7fa920b..a73bc82 100644 --- a/fixtures/Host.Lifespan.HTML.expected +++ b/fixtures/Host.Lifespan.HTML.expected @@ -11,13 +11,13 @@ <br /> <span class="quote">Lifespan is the total uptime + the total downtime of a host.</span><br /> <br /> -<pre>+-----+----------------+----------------------------+--------------------------+ -| Pos | Host | Lifespan | Last Kernel | -+-----+----------------+----------------------------+--------------------------+ -| 1. | dionysus | 8 years, 6 months, 17 days | FreeBSD 13.0-RELEASE-p11 | -| 2. | uranus | 7 years, 2 months, 16 days | Linux 5.16.14-arch1-1 | -| 3. | alphacentauri | 6 years, 9 months, 13 days | FreeBSD 11.4-RELEASE-p7 | -+-----+----------------+----------------------------+--------------------------+ +<pre>+-----+----------------+----------------------------+--------------------------+------------------+ +| Pos | Host | Lifespan | Last Kernel | Updated | ++-----+----------------+----------------------------+--------------------------+------------------+ +| 1. | dionysus | 8 years, 6 months, 17 days | FreeBSD 13.0-RELEASE-p11 | 2026-03-03 18:29 | +| 2. | uranus | 7 years, 2 months, 16 days | Linux 5.16.14-arch1-1 | 2026-03-03 18:29 | +| 3. | alphacentauri | 6 years, 9 months, 13 days | FreeBSD 11.4-RELEASE-p7 | 2026-03-03 18:29 | ++-----+----------------+----------------------------+--------------------------+------------------+ </pre> </body> </html> diff --git a/fixtures/Host.Lifespan.Markdown.expected b/fixtures/Host.Lifespan.Markdown.expected index b5cf89c..f247c8e 100644 --- a/fixtures/Host.Lifespan.Markdown.expected +++ b/fixtures/Host.Lifespan.Markdown.expected @@ -3,11 +3,11 @@ Lifespan is the total uptime + the total downtime of a host. ``` -+-----+----------------+----------------------------+--------------------------+ -| Pos | Host | Lifespan | Last Kernel | -+-----+----------------+----------------------------+--------------------------+ -| 1. | dionysus | 8 years, 6 months, 17 days | FreeBSD 13.0-RELEASE-p11 | -| 2. | uranus | 7 years, 2 months, 16 days | Linux 5.16.14-arch1-1 | -| 3. | alphacentauri | 6 years, 9 months, 13 days | FreeBSD 11.4-RELEASE-p7 | -+-----+----------------+----------------------------+--------------------------+ ++-----+----------------+----------------------------+--------------------------+------------------+ +| Pos | Host | Lifespan | Last Kernel | Updated | ++-----+----------------+----------------------------+--------------------------+------------------+ +| 1. | dionysus | 8 years, 6 months, 17 days | FreeBSD 13.0-RELEASE-p11 | 2026-03-03 18:29 | +| 2. | uranus | 7 years, 2 months, 16 days | Linux 5.16.14-arch1-1 | 2026-03-03 18:29 | +| 3. | alphacentauri | 6 years, 9 months, 13 days | FreeBSD 11.4-RELEASE-p7 | 2026-03-03 18:29 | ++-----+----------------+----------------------------+--------------------------+------------------+ ``` diff --git a/fixtures/Host.Lifespan.Plaintext.expected b/fixtures/Host.Lifespan.Plaintext.expected index e6740e1..7a417e9 100644 --- a/fixtures/Host.Lifespan.Plaintext.expected +++ b/fixtures/Host.Lifespan.Plaintext.expected @@ -2,10 +2,10 @@ Top 3 Lifespan's by Host Lifespan is the total uptime + the total downtime of a host. -+-----+----------------+----------------------------+--------------------------+ -| Pos | Host | Lifespan | Last Kernel | -+-----+----------------+----------------------------+--------------------------+ -| 1. | dionysus | 8 years, 6 months, 17 days | FreeBSD 13.0-RELEASE-p11 | -| 2. | uranus | 7 years, 2 months, 16 days | Linux 5.16.14-arch1-1 | -| 3. | alphacentauri | 6 years, 9 months, 13 days | FreeBSD 11.4-RELEASE-p7 | -+-----+----------------+----------------------------+--------------------------+ ++-----+----------------+----------------------------+--------------------------+------------------+ +| Pos | Host | Lifespan | Last Kernel | Updated | ++-----+----------------+----------------------------+--------------------------+------------------+ +| 1. | dionysus | 8 years, 6 months, 17 days | FreeBSD 13.0-RELEASE-p11 | 2026-03-03 18:29 | +| 2. | uranus | 7 years, 2 months, 16 days | Linux 5.16.14-arch1-1 | 2026-03-03 18:29 | +| 3. | alphacentauri | 6 years, 9 months, 13 days | FreeBSD 11.4-RELEASE-p7 | 2026-03-03 18:29 | ++-----+----------------+----------------------------+--------------------------+------------------+ diff --git a/fixtures/Host.Score.Gemtext.expected b/fixtures/Host.Score.Gemtext.expected index ba5c572..85042c4 100644 --- a/fixtures/Host.Score.Gemtext.expected +++ b/fixtures/Host.Score.Gemtext.expected @@ -3,11 +3,11 @@ Score is calculated by combining all other metrics. ``` -+-----+---------+-------+-----------------------------------+ -| Pos | Host | Score | Last Kernel | -+-----+---------+-------+-----------------------------------+ -| 1. | uranus | 309 | Linux 5.16.14-arch1-1 | -| 2. | vulcan | 270 | Linux 3.10.0-1160.81.1.el7.x86_64 | -| 3. | sun | 238 | FreeBSD 10.3-RELEASE-p24 | -+-----+---------+-------+-----------------------------------+ ++-----+---------+-------+-----------------------------------+------------------+ +| Pos | Host | Score | Last Kernel | Updated | ++-----+---------+-------+-----------------------------------+------------------+ +| 1. | uranus | 309 | Linux 5.16.14-arch1-1 | 2026-03-03 18:29 | +| 2. | vulcan | 270 | Linux 3.10.0-1160.81.1.el7.x86_64 | 2026-03-03 18:29 | +| 3. | sun | 238 | FreeBSD 10.3-RELEASE-p24 | 2026-03-03 18:29 | ++-----+---------+-------+-----------------------------------+------------------+ ``` diff --git a/fixtures/Host.Score.HTML.expected b/fixtures/Host.Score.HTML.expected index bf48b2b..c13e4a6 100644 --- a/fixtures/Host.Score.HTML.expected +++ b/fixtures/Host.Score.HTML.expected @@ -11,13 +11,13 @@ <br /> <span class="quote">Score is calculated by combining all other metrics.</span><br /> <br /> -<pre>+-----+---------+-------+-----------------------------------+ -| Pos | Host | Score | Last Kernel | -+-----+---------+-------+-----------------------------------+ -| 1. | uranus | 309 | Linux 5.16.14-arch1-1 | -| 2. | vulcan | 270 | Linux 3.10.0-1160.81.1.el7.x86_64 | -| 3. | sun | 238 | FreeBSD 10.3-RELEASE-p24 | -+-----+---------+-------+-----------------------------------+ +<pre>+-----+---------+-------+-----------------------------------+------------------+ +| Pos | Host | Score | Last Kernel | Updated | ++-----+---------+-------+-----------------------------------+------------------+ +| 1. | uranus | 309 | Linux 5.16.14-arch1-1 | 2026-03-03 18:29 | +| 2. | vulcan | 270 | Linux 3.10.0-1160.81.1.el7.x86_64 | 2026-03-03 18:29 | +| 3. | sun | 238 | FreeBSD 10.3-RELEASE-p24 | 2026-03-03 18:29 | ++-----+---------+-------+-----------------------------------+------------------+ </pre> </body> </html> diff --git a/fixtures/Host.Score.Markdown.expected b/fixtures/Host.Score.Markdown.expected index ba5c572..85042c4 100644 --- a/fixtures/Host.Score.Markdown.expected +++ b/fixtures/Host.Score.Markdown.expected @@ -3,11 +3,11 @@ Score is calculated by combining all other metrics. ``` -+-----+---------+-------+-----------------------------------+ -| Pos | Host | Score | Last Kernel | -+-----+---------+-------+-----------------------------------+ -| 1. | uranus | 309 | Linux 5.16.14-arch1-1 | -| 2. | vulcan | 270 | Linux 3.10.0-1160.81.1.el7.x86_64 | -| 3. | sun | 238 | FreeBSD 10.3-RELEASE-p24 | -+-----+---------+-------+-----------------------------------+ ++-----+---------+-------+-----------------------------------+------------------+ +| Pos | Host | Score | Last Kernel | Updated | ++-----+---------+-------+-----------------------------------+------------------+ +| 1. | uranus | 309 | Linux 5.16.14-arch1-1 | 2026-03-03 18:29 | +| 2. | vulcan | 270 | Linux 3.10.0-1160.81.1.el7.x86_64 | 2026-03-03 18:29 | +| 3. | sun | 238 | FreeBSD 10.3-RELEASE-p24 | 2026-03-03 18:29 | ++-----+---------+-------+-----------------------------------+------------------+ ``` diff --git a/fixtures/Host.Score.Plaintext.expected b/fixtures/Host.Score.Plaintext.expected index f70f6ea..02a3c66 100644 --- a/fixtures/Host.Score.Plaintext.expected +++ b/fixtures/Host.Score.Plaintext.expected @@ -2,10 +2,10 @@ Top 3 Score's by Host Score is calculated by combining all other metrics. -+-----+---------+-------+-----------------------------------+ -| Pos | Host | Score | Last Kernel | -+-----+---------+-------+-----------------------------------+ -| 1. | uranus | 309 | Linux 5.16.14-arch1-1 | -| 2. | vulcan | 270 | Linux 3.10.0-1160.81.1.el7.x86_64 | -| 3. | sun | 238 | FreeBSD 10.3-RELEASE-p24 | -+-----+---------+-------+-----------------------------------+ ++-----+---------+-------+-----------------------------------+------------------+ +| Pos | Host | Score | Last Kernel | Updated | ++-----+---------+-------+-----------------------------------+------------------+ +| 1. | uranus | 309 | Linux 5.16.14-arch1-1 | 2026-03-03 18:29 | +| 2. | vulcan | 270 | Linux 3.10.0-1160.81.1.el7.x86_64 | 2026-03-03 18:29 | +| 3. | sun | 238 | FreeBSD 10.3-RELEASE-p24 | 2026-03-03 18:29 | ++-----+---------+-------+-----------------------------------+------------------+ diff --git a/fixtures/Host.Uptime.Gemtext.expected b/fixtures/Host.Uptime.Gemtext.expected index 6f39e8a..0196d11 100644 --- a/fixtures/Host.Uptime.Gemtext.expected +++ b/fixtures/Host.Uptime.Gemtext.expected @@ -3,11 +3,11 @@ Uptime is the total uptime of a host over the entire lifespan. ``` -+-----+---------+-----------------------------+-----------------------------------+ -| Pos | Host | Uptime | Last Kernel | -+-----+---------+-----------------------------+-----------------------------------+ -| 1. | vulcan | 4 years, 4 months, 7 days | Linux 3.10.0-1160.81.1.el7.x86_64 | -| 2. | uranus | 3 years, 11 months, 21 days | Linux 5.16.14-arch1-1 | -| 3. | sun | 3 years, 9 months, 26 days | FreeBSD 10.3-RELEASE-p24 | -+-----+---------+-----------------------------+-----------------------------------+ ++-----+---------+-----------------------------+-----------------------------------+------------------+ +| Pos | Host | Uptime | Last Kernel | Updated | ++-----+---------+-----------------------------+-----------------------------------+------------------+ +| 1. | vulcan | 4 years, 4 months, 7 days | Linux 3.10.0-1160.81.1.el7.x86_64 | 2026-03-03 18:29 | +| 2. | uranus | 3 years, 11 months, 21 days | Linux 5.16.14-arch1-1 | 2026-03-03 18:29 | +| 3. | sun | 3 years, 9 months, 26 days | FreeBSD 10.3-RELEASE-p24 | 2026-03-03 18:29 | ++-----+---------+-----------------------------+-----------------------------------+------------------+ ``` diff --git a/fixtures/Host.Uptime.HTML.expected b/fixtures/Host.Uptime.HTML.expected index ca55e85..7c00ced 100644 --- a/fixtures/Host.Uptime.HTML.expected +++ b/fixtures/Host.Uptime.HTML.expected @@ -11,13 +11,13 @@ <br /> <span class="quote">Uptime is the total uptime of a host over the entire lifespan.</span><br /> <br /> -<pre>+-----+---------+-----------------------------+-----------------------------------+ -| Pos | Host | Uptime | Last Kernel | -+-----+---------+-----------------------------+-----------------------------------+ -| 1. | vulcan | 4 years, 4 months, 7 days | Linux 3.10.0-1160.81.1.el7.x86_64 | -| 2. | uranus | 3 years, 11 months, 21 days | Linux 5.16.14-arch1-1 | -| 3. | sun | 3 years, 9 months, 26 days | FreeBSD 10.3-RELEASE-p24 | -+-----+---------+-----------------------------+-----------------------------------+ +<pre>+-----+---------+-----------------------------+-----------------------------------+------------------+ +| Pos | Host | Uptime | Last Kernel | Updated | ++-----+---------+-----------------------------+-----------------------------------+------------------+ +| 1. | vulcan | 4 years, 4 months, 7 days | Linux 3.10.0-1160.81.1.el7.x86_64 | 2026-03-03 18:29 | +| 2. | uranus | 3 years, 11 months, 21 days | Linux 5.16.14-arch1-1 | 2026-03-03 18:29 | +| 3. | sun | 3 years, 9 months, 26 days | FreeBSD 10.3-RELEASE-p24 | 2026-03-03 18:29 | ++-----+---------+-----------------------------+-----------------------------------+------------------+ </pre> </body> </html> diff --git a/fixtures/Host.Uptime.Markdown.expected b/fixtures/Host.Uptime.Markdown.expected index 6f39e8a..0196d11 100644 --- a/fixtures/Host.Uptime.Markdown.expected +++ b/fixtures/Host.Uptime.Markdown.expected @@ -3,11 +3,11 @@ Uptime is the total uptime of a host over the entire lifespan. ``` -+-----+---------+-----------------------------+-----------------------------------+ -| Pos | Host | Uptime | Last Kernel | -+-----+---------+-----------------------------+-----------------------------------+ -| 1. | vulcan | 4 years, 4 months, 7 days | Linux 3.10.0-1160.81.1.el7.x86_64 | -| 2. | uranus | 3 years, 11 months, 21 days | Linux 5.16.14-arch1-1 | -| 3. | sun | 3 years, 9 months, 26 days | FreeBSD 10.3-RELEASE-p24 | -+-----+---------+-----------------------------+-----------------------------------+ ++-----+---------+-----------------------------+-----------------------------------+------------------+ +| Pos | Host | Uptime | Last Kernel | Updated | ++-----+---------+-----------------------------+-----------------------------------+------------------+ +| 1. | vulcan | 4 years, 4 months, 7 days | Linux 3.10.0-1160.81.1.el7.x86_64 | 2026-03-03 18:29 | +| 2. | uranus | 3 years, 11 months, 21 days | Linux 5.16.14-arch1-1 | 2026-03-03 18:29 | +| 3. | sun | 3 years, 9 months, 26 days | FreeBSD 10.3-RELEASE-p24 | 2026-03-03 18:29 | ++-----+---------+-----------------------------+-----------------------------------+------------------+ ``` diff --git a/fixtures/Host.Uptime.Plaintext.expected b/fixtures/Host.Uptime.Plaintext.expected index 39231f2..e1dc35e 100644 --- a/fixtures/Host.Uptime.Plaintext.expected +++ b/fixtures/Host.Uptime.Plaintext.expected @@ -2,10 +2,10 @@ Top 3 Uptime's by Host Uptime is the total uptime of a host over the entire lifespan. -+-----+---------+-----------------------------+-----------------------------------+ -| Pos | Host | Uptime | Last Kernel | -+-----+---------+-----------------------------+-----------------------------------+ -| 1. | vulcan | 4 years, 4 months, 7 days | Linux 3.10.0-1160.81.1.el7.x86_64 | -| 2. | uranus | 3 years, 11 months, 21 days | Linux 5.16.14-arch1-1 | -| 3. | sun | 3 years, 9 months, 26 days | FreeBSD 10.3-RELEASE-p24 | -+-----+---------+-----------------------------+-----------------------------------+ ++-----+---------+-----------------------------+-----------------------------------+------------------+ +| Pos | Host | Uptime | Last Kernel | Updated | ++-----+---------+-----------------------------+-----------------------------------+------------------+ +| 1. | vulcan | 4 years, 4 months, 7 days | Linux 3.10.0-1160.81.1.el7.x86_64 | 2026-03-03 18:29 | +| 2. | uranus | 3 years, 11 months, 21 days | Linux 5.16.14-arch1-1 | 2026-03-03 18:29 | +| 3. | sun | 3 years, 9 months, 26 days | FreeBSD 10.3-RELEASE-p24 | 2026-03-03 18:29 | ++-----+---------+-----------------------------+-----------------------------------+------------------+ diff --git a/internal/goprecords/aggregate.go b/internal/goprecords/aggregate.go index aa9c3fe..102ab7f 100644 --- a/internal/goprecords/aggregate.go +++ b/internal/goprecords/aggregate.go @@ -58,6 +58,7 @@ func (ag *Aggregator) Aggregate(ctx context.Context) (*Aggregates, error) { return nil, fmt.Errorf("last kernel %s: %w", relPath, err) } out.Host[host] = NewHostAggregate(host, lastKernel) + out.Host[host].LastUpdated = f.ModTime if err := processRecordsFile(ctx, ag.fsys, relPath, host, out); err != nil { return nil, err } diff --git a/internal/goprecords/aggregate_test.go b/internal/goprecords/aggregate_test.go index d675b4f..12fceae 100644 --- a/internal/goprecords/aggregate_test.go +++ b/internal/goprecords/aggregate_test.go @@ -118,6 +118,9 @@ func TestAggregateFixturesContent(t *testing.T) { if host.LastKernel == "" { t.Error("expected non-empty LastKernel for earth") } + if host.LastUpdated.IsZero() { + t.Error("expected non-zero LastUpdated for earth") + } } else { t.Error("expected earth host in aggregates") } diff --git a/internal/goprecords/db.go b/internal/goprecords/db.go index b2b095b..0746dfa 100644 --- a/internal/goprecords/db.go +++ b/internal/goprecords/db.go @@ -14,6 +14,10 @@ func LoadAggregates(ctx context.Context, db *sql.DB) (*Aggregates, error) { if err != nil { return nil, fmt.Errorf("load records: %w", err) } + hostMeta, err := storage.LoadHostMeta(ctx, db) + if err != nil { + return nil, fmt.Errorf("load host meta: %w", err) + } out := &Aggregates{ Host: make(map[string]*HostAggregate), Kernel: make(map[string]*Aggregate), @@ -38,6 +42,9 @@ func LoadAggregates(ctx context.Context, db *sql.DB) (*Aggregates, error) { } for host, h := range out.Host { h.LastKernel = hostLastKernel[host] + if t, ok := hostMeta[host]; ok { + h.LastUpdated = t + } } return out, nil } diff --git a/internal/goprecords/report.go b/internal/goprecords/report.go index 6300163..12c3951 100644 --- a/internal/goprecords/report.go +++ b/internal/goprecords/report.go @@ -186,9 +186,9 @@ func (r *HTMLReporter) Report() string { func (r reportBuilder) Report(outputFormat OutputFormat) string { var rows []tableRow - var hasLastKernel bool |
