ce5b8300f1
Versioning the pure JSON files representing the Grafana dashboards
had some disadvantages. It was hard to review them, they were very
cluttered and a lot was duplicated.
There are some tools that deal with that. One of them is Grafonnet,
which is a superset of Jsonnet, a tool to create JSON files using a
domain specific language.
This change implements the Gerrit Process dashboard in Grafonnet.
It also extends the installer to be able to install dashboards in
the Jsonnet format.
Change-Id: I6235fb7d045bd71557678a4e3b0d4ad4515f4615
32 lines
640 B
Text
32 lines
640 B
Text
local grafana = import '../../vendor/grafonnet/grafana.libsonnet';
|
|
local graphPanel = grafana.graphPanel;
|
|
|
|
local defaults = import './defaults.libsonnet';
|
|
|
|
{
|
|
new(
|
|
title,
|
|
labelY1,
|
|
labelY2='',
|
|
formatY1='short',
|
|
formatY2='short',
|
|
stack=false,
|
|
):: graphPanel.new(
|
|
title=title,
|
|
labelY1=labelY1,
|
|
labelY2=labelY2,
|
|
formatY1=formatY1,
|
|
formatY2=formatY2,
|
|
stack=stack,
|
|
datasource=defaults.datasource,
|
|
fill=1,
|
|
legend_alignAsTable=true,
|
|
legend_avg=true,
|
|
legend_current=true,
|
|
legend_max=true,
|
|
legend_min=true,
|
|
legend_values=true,
|
|
lines=true,
|
|
linewidth=1,
|
|
),
|
|
}
|