From: Aashish Sharma Date: Sat, 6 Apr 2024 03:43:48 +0000 (+0530) Subject: mgr/dashboard: add Table Schema to grafonnet X-Git-Tag: v17.2.8~403^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F56737%2Fhead;p=ceph.git mgr/dashboard: add Table Schema to grafonnet Backport of #56509 in quincy didn't include the Table Schema in the utils.libsonnet because of which the json generation ias failing. This PR tends to add the Table Schema Signed-off-by: Aashish Sharma --- diff --git a/monitoring/ceph-mixin/dashboards/utils.libsonnet b/monitoring/ceph-mixin/dashboards/utils.libsonnet index 739db82976e..5575d620529 100644 --- a/monitoring/ceph-mixin/dashboards/utils.libsonnet +++ b/monitoring/ceph-mixin/dashboards/utils.libsonnet @@ -356,4 +356,43 @@ local pieChartPanel = import 'piechart_panel.libsonnet'; overrides=overrides, reduceOptions=reduceOptions, ), + + addTableExtended( + title='', + datasource=null, + description=null, + sort=null, + styles='', + transform=null, + pluginVersion='9.1.3', + options=null, + gridPosition={}, + custom=null, + decimals=null, + thresholds=null, + unit=null, + overrides=[], + color=null + ):: + g.tablePanel.new(datasource=datasource, + description=description, + sort=sort, + styles=styles, + title=title, + transform=transform) + { + pluginVersion: pluginVersion, + gridPos: gridPosition, + [if options != null then 'options']: options, + fieldConfig+: { + defaults+: { + [if custom != null then 'custom']: custom, + [if decimals != null then 'decimals']: decimals, + [if thresholds != null then 'thresholds']: thresholds, + [if unit != null then 'unit']: unit, + [if color != null then 'color']: color, + + }, + overrides: overrides, + }, + }, }