]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: add Table Schema to grafonnet 56736/head
authorAashish Sharma <aasharma@li-e74156cc-2f67-11b2-a85c-e98659a63c5c.ibm.com>
Sat, 6 Apr 2024 03:36:51 +0000 (09:06 +0530)
committerAashish Sharma <aasharma@li-e74156cc-2f67-11b2-a85c-e98659a63c5c.ibm.com>
Sat, 6 Apr 2024 03:36:51 +0000 (09:06 +0530)
Backport of #56509 in reef 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 <aasharma@redhat.com>
monitoring/ceph-mixin/dashboards/utils.libsonnet

index 739db82976ebe10b0e8f9c508528b8c2929de668..5575d620529829da5d8c381aa78f2c038db99b5a 100644 (file)
@@ -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,
+      },
+    },
 }