Skip to content

Commit

Permalink
Show version and revision in status page
Browse files Browse the repository at this point in the history
  • Loading branch information
pedropombeiro committed Jul 7, 2024
1 parent fecae43 commit 0b92848
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/status/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/dustin/go-humanize"
"github.com/dustin/go-humanize/english"
"github.com/pedropombeiro/qnapexporter/lib/exporter"
"github.com/pedropombeiro/qnapexporter/lib/utils"
)

const (
Expand Down Expand Up @@ -84,6 +85,8 @@ func (s *Status) WriteHTML(w io.Writer) error {
ms := endpointStatus{
Path: s.MetricsEndpoint,
Properties: map[string]string{
"Version": utils.VERSION,
"Revision": utils.REVISION,
"Uptime": humanizeTime(e.Uptime),
"Last fetch": humanizeTime(e.LastFetch),
"Last duration": e.LastFetchDuration.String(),
Expand Down

0 comments on commit 0b92848

Please sign in to comment.