graphs

package
v0.0.55 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2026 License: AGPL-3.0 Imports: 7 Imported by: 0

README

routes/graphs

HTTP route handlers that render live scoring visualizations as HTML pages. Each handler queries the database, injects the results into a Go template, and returns a fully rendered Chart.js chart. Templates are stored in an embedded filesystem and parsed at startup.

Currently provides four chart endpoints: a service status scoreboard rendered as a color matrix (pass/fail per team per service), cumulative team scores over time as a line chart, team standings by total checks passed as a bar chart, and historical uptime per team per box/service as a heatmap.

Documentation

Overview

Package graphs contains routes that generate html/js graphs that can be embedded into other pages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHeatmap

func GetHeatmap(c *gin.Context)

GetHeatmap returns html and js containing a heatmap of historical uptime percentage per team per box/service.

@Summary		Uptime heatmap
@Description	Returns an embeddable HTML/JS fragment showing historical uptime percentage as a heatmap.
@Tags			graphs
@Produce		html
@Success		200		{string}	string
@Failure		500		{object}	object
@Failure		501		{object}	object
@Router			/graphs/heatmap [get]

func GetScoreboard

func GetScoreboard(c *gin.Context)

GetScoreboard returns html and js containing a simple scoreaboard.

@Summary		Scoreboard chart
@Description	Returns an embeddable HTML/JS fragment rendering the current scoreboard heatmap for all teams and services.
@Tags			graphs
@Produce		html
@Success		200		{string}	string
@Failure		500		{object}	object
@Failure		501		{object}	object
@Router			/graphs/scoreboard [get]

func GetScores

func GetScores(c *gin.Context)

GetScores returns an HTML chart of scores over time.

@Summary		Scores over time chart
@Description	Returns an embeddable HTML/JS fragment rendering a chart of score trends over time.
@Tags			graphs
@Produce		html
@Success		200		{string}	string
@Failure		500		{object}	object
@Failure		501		{object}	object
@Router			/graphs/scores [get]

func GetStandings

func GetStandings(c *gin.Context)

GetStandings returns html and js containing a bar chart of current total points per team.

@Summary		Standings bar chart
@Description	Returns an embeddable HTML/JS fragment showing current total points per team as a bar chart.
@Tags			graphs
@Produce		html
@Success		200		{string}	string
@Failure		500		{object}	object
@Failure		501		{object}	object
@Router			/graphs/standings [get]

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL