Ori.livneh has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/246278

Change subject: grafana: override the default home dashboard with something 
custom
......................................................................

grafana: override the default home dashboard with something custom

Replace the Grafana logo in the default home dashboard with the Wikimedia logo
and a header.

Change-Id: I5667f712bd2b4704fa0656997f831aea5a1040a3
---
A files/grafana/home.json
M manifests/role/grafana.pp
2 files changed, 70 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/78/246278/1

diff --git a/files/grafana/home.json b/files/grafana/home.json
new file mode 100644
index 0000000..c90afb0
--- /dev/null
+++ b/files/grafana/home.json
@@ -0,0 +1,61 @@
+{
+  "title": "Home",
+  "tags": [],
+  "style": "light",
+  "timezone": "browser",
+  "editable": false,
+  "hideControls": true,
+  "rows": [
+    {
+      "title": "New row",
+      "height": "60px",
+      "collapse": false,
+      "editable": true,
+      "panels": [
+        {
+          "id": 1,
+          "span": 12,
+          "editable": true,
+          "type": "text",
+          "mode": "html",
+          "content": "<h1 style=\"font-weight: normal; color: 
#555;\">Wikimedia Operations Performance Metrics<img 
src=\"//upload.wikimedia.org/wikipedia/commons/8/81/Wikimedia-logo.svg\" 
alt=\"Wikimedia logo\" style=\"float: left; width: 40px; margin-right: 10px; 
position: relative; top: 2px;\"></h1>",
+          "style": {},
+          "title": ""
+        }
+      ]
+    },
+    {
+      "height": "610px",
+      "panels": [
+        {
+          "id": 2,
+          "span": 6,
+          "type": "dashlist",
+          "mode": "starred",
+          "title": "Starred dashboards"
+        },
+        {
+          "id": 3,
+          "span": 6,
+          "type": "dashlist",
+          "mode": "search",
+          "title": "Dashboards"
+        }
+      ]
+    }
+  ],
+  "nav": [
+    {
+      "type": "timepicker",
+      "enable": false
+    }
+  ],
+  "time": {
+    "from": "now-6h",
+    "to": "now"
+  },
+  "templating": {
+    "list": []
+  },
+  "version": 5
+}
diff --git a/manifests/role/grafana.pp b/manifests/role/grafana.pp
index d712df3..f1e9118 100644
--- a/manifests/role/grafana.pp
+++ b/manifests/role/grafana.pp
@@ -97,6 +97,15 @@
         ],
     }
 
+    # Override the default home dashboard with something custom.
+    # This will be doable via a preference in the future. See:
+    # 
<https://groups.io/org/groupsio/grafana/thread/home_dashboard_in_grafana_2_0/43631?threado=120>
+    file { '/usr/share/grafana/public/dashboards/home.json':
+        source  => 'puppet:///files/grafana/home.json',
+        require => Package['grafana'],
+        notify  => Service['grafana-server'],
+    }
+
     # Serve Grafana via two different vhosts:
     #
     # - grafana.wikimedia.org (read-only, but accessible to all)

-- 
To view, visit https://gerrit.wikimedia.org/r/246278
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5667f712bd2b4704fa0656997f831aea5a1040a3
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to