← Back to team overview

sts-sponsors team mailing list archive

[Merge] ~adam-collard/maas-kpi:github-issues-grafana-yaxis into maas-kpi:master

 

Adam Collard has proposed merging ~adam-collard/maas-kpi:github-issues-grafana-yaxis into maas-kpi:master.

Commit message:
Team dashboard fixes
* Set Y-axis minimum to 0
* Format Y-axis as no format (i.e. whole integers)
* Title tweaks



Requested reviews:
  MAAS Lander (maas-lander): unittests
  MAAS Committers (maas-committers)

For more details, see:
https://code.launchpad.net/~adam-collard/maas-kpi/+git/maas-kpi/+merge/443873
-- 
Your team MAAS Committers is requested to review the proposed merge of ~adam-collard/maas-kpi:github-issues-grafana-yaxis into maas-kpi:master.
diff --git a/grafana/team.dashboard.py b/grafana/team.dashboard.py
index 1ec2141..7e083ba 100644
--- a/grafana/team.dashboard.py
+++ b/grafana/team.dashboard.py
@@ -1,17 +1,15 @@
 from grafanalib.core import (
     INDIVIDUAL,
     NULL_AS_ZERO,
-    SHORT_FORMAT,
     SORT_DESC,
     Dashboard,
     Graph,
     Row,
     Time,
     Tooltip,
-    YAxes,
-    YAxis,
+    single_y_axis
 )
-
+from grafanalib import formatunits as UNITS
 from maaskpi.grafana import InfluxDBTarget, get_datasource
 
 
@@ -31,7 +29,7 @@ def untriaged_bugs_graph(title, project):
                 ),
             )
         ],
-        yAxes=YAxes(YAxis(format=SHORT_FORMAT)),
+        yAxes=single_y_axis(format=UNITS.NO_FORMAT, min=0),
         stack=True,
         nullPointMode=NULL_AS_ZERO,
         tooltip=Tooltip(
@@ -57,7 +55,7 @@ def github_graph(title, project):
                 ),
             )
         ],
-        yAxes=YAxes(YAxis(format=SHORT_FORMAT)),
+        yAxes=single_y_axis(format=UNITS.NO_FORMAT, min=0),
         stack=True,
         nullPointMode=NULL_AS_ZERO,
         tooltip=Tooltip(
@@ -78,26 +76,26 @@ dashboard = Dashboard(
         ),
         Row(
             panels=[
-                github_graph("Packer-MAAS", "packer-maas"),
-                github_graph("Terraform Provider", "terraform-provider-maas"),
+                github_graph("Packer MAAS issues", "packer-maas"),
+                github_graph("Terraform Provider issues", "terraform-provider-maas"),
             ]
         ),
         Row(
             panels=[
-                github_graph("Prometheus Alert Rules", "maas-prometheus-alert-rules"),
-                github_graph("Loki Alert Rules", "maas-loki-alert-rules"),
+                github_graph("Prometheus Alert Rules issues", "maas-prometheus-alert-rules"),
+                github_graph("Loki Alert Rules issues", "maas-loki-alert-rules"),
             ]
         ),
         Row(
             panels=[
-                github_graph("Ansible Playbook", "maas-ansible-playbook"),
-                github_graph("Ansible Collection", "ansible-collection"),
+                github_graph("Ansible Playbook issues", "maas-ansible-playbook"),
+                github_graph("Ansible Collection issues", "ansible-collection"),
             ]
         ),
         Row(
             panels=[
-                github_graph("Python libmaas", "python-libmaas"),
-                github_graph("Go MAAS client", "gomaasclient"),
+                github_graph("Python libmaas issues", "python-libmaas"),
+                github_graph("Go MAAS client issues", "gomaasclient"),
             ]
         ),
     ],