diff options
author | Aashish Sharma <66050535+aaSharma14@users.noreply.github.com> | 2024-11-05 10:39:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-05 10:39:52 +0100 |
commit | 9eaff51b9da7c07e29fdc75ff1c75d663c242ae0 (patch) | |
tree | 9a53498338195dd04c93cb0e5a27edfe475255b8 /monitoring | |
parent | Merge pull request #60017 from rhcs-dashboard/kcli-quick-install (diff) | |
parent | mgr/dashboard: Add 'Browse Dashboards' button in multi-cluster and ceph-clust... (diff) | |
download | ceph-9eaff51b9da7c07e29fdc75ff1c75d663c242ae0.tar.xz ceph-9eaff51b9da7c07e29fdc75ff1c75d663c242ae0.zip |
Merge pull request #60100 from piyushagarwal1411/fix-68316-main
mgr/dashboard: Add 'Browse Dashboards' button in multi-cluster and ceph-cluster Grafana dashboards
Reviewed-by: Aashish Sharma <aasharma@redhat.com>
Diffstat (limited to 'monitoring')
4 files changed, 66 insertions, 2 deletions
diff --git a/monitoring/ceph-mixin/dashboards/multi-cluster.libsonnet b/monitoring/ceph-mixin/dashboards/multi-cluster.libsonnet index 8185ebb253b..6b070319202 100644 --- a/monitoring/ceph-mixin/dashboards/multi-cluster.libsonnet +++ b/monitoring/ceph-mixin/dashboards/multi-cluster.libsonnet @@ -43,6 +43,21 @@ local g = import 'grafonnet/grafana.libsonnet'; ), ) + .addLinks([ + $.addLinkSchema( + asDropdown=true, + icon='external link', + includeVars=true, + keepTime=true, + tags=[], + targetBlank=false, + title='Browse Dashboards', + tooltip='', + type='dashboards', + url='' + ), + ]) + .addPanels([ $.addRowSchema(false, true, 'Clusters') + { gridPos: { x: 0, y: 1, w: 24, h: 1 } }, $.addStatPanel( diff --git a/monitoring/ceph-mixin/dashboards/utils.libsonnet b/monitoring/ceph-mixin/dashboards/utils.libsonnet index 333a444dda1..50fa0027f28 100644 --- a/monitoring/ceph-mixin/dashboards/utils.libsonnet +++ b/monitoring/ceph-mixin/dashboards/utils.libsonnet @@ -133,6 +133,29 @@ local timeSeries = import 'timeseries_panel.libsonnet'; allValues=allValues, current=current), + addLinkSchema(asDropdown, + icon, + includeVars, + keepTime, + tags, + targetBlank, + title, + tooltip, + type, + url):: + { + asDropdown: asDropdown, + icon: icon, + includeVars: includeVars, + keepTime: keepTime, + tags: tags, + targetBlank: targetBlank, + title: title, + tooltip: tooltip, + type: type, + url: url, + }, + addAnnotationSchema(builtIn, datasource, enable, diff --git a/monitoring/ceph-mixin/dashboards_out/ceph-cluster.json b/monitoring/ceph-mixin/dashboards_out/ceph-cluster.json index 1fd7821a6b6..0b5abd73d90 100644 --- a/monitoring/ceph-mixin/dashboards_out/ceph-cluster.json +++ b/monitoring/ceph-mixin/dashboards_out/ceph-cluster.json @@ -35,7 +35,20 @@ "hideControls": false, "id": null, "iteration": 1525415495309, - "links": [], + "links": [ + { + "asDropdown": true, + "icon": "external link", + "includeVars": true, + "keepTime": true, + "tags": [], + "targetBlank": false, + "title": "Browse Dashboards", + "tooltip": "", + "type": "dashboards", + "url": "" + } + ], "panels": [ { "cacheTimeout": null, diff --git a/monitoring/ceph-mixin/dashboards_out/multi-cluster-overview.json b/monitoring/ceph-mixin/dashboards_out/multi-cluster-overview.json index 25648cc0abb..b9ccc453ac8 100644 --- a/monitoring/ceph-mixin/dashboards_out/multi-cluster-overview.json +++ b/monitoring/ceph-mixin/dashboards_out/multi-cluster-overview.json @@ -22,7 +22,20 @@ "graphTooltip": 0, "hideControls": false, "id": null, - "links": [ ], + "links": [ + { + "asDropdown": true, + "icon": "external link", + "includeVars": true, + "keepTime": true, + "tags": [], + "targetBlank": false, + "title": "Browse Dashboards", + "tooltip": "", + "type": "dashboards", + "url": "" + } + ], "panels": [ { "collapse": false, |