From 7254e2968c1b7ca5230401028b95c6578ffcec07 Mon Sep 17 00:00:00 2001 From: Alex Shchyhol Date: Wed, 2 Apr 2025 16:20:41 +0200 Subject: [PATCH] [CPL-19563] add tabs, dateRangeFilter opts --- 202412121147.json | 99 ++++++++++++++++++++++++++++------------------- 1 file changed, 60 insertions(+), 39 deletions(-) diff --git a/202412121147.json b/202412121147.json index ea496b2..a663d77 100644 --- a/202412121147.json +++ b/202412121147.json @@ -408,44 +408,6 @@ } ] }, - "funnel": { - "allOf": [ - { "$ref": "#/$defs/commonComponent" }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "funnel" - }, - "series": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the series as shown in the legend, tooltip etc. See e.g. https://api.highcharts.com/highcharts/series.line.name" - }, - "type": { - "type": "string", - "description": "Set series type if the chart is a combination of different series types. See https://www.highcharts.com/docs/chart-and-series-types/combining-chart-types" - }, - "query": { - "$ref": "#/$defs/query" - } - }, - "required": ["query"] - } - }, - "format": { - "$ref": "#/$defs/formatProperties" - } - }, - "required": ["type", "series"] - } - ] - }, "pie-chart": { "allOf": [ { "$ref": "#/$defs/commonComponent" }, @@ -785,6 +747,46 @@ ] } }, + "tabs": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "The title of the tab" + }, + "layout": { + "$ref": "#/$defs/layout" + }, + "insights": { + "type": "array", + "description": "Components to use for insights.", + "items": { "$ref": "#/$defs/insights" } + }, + "components": { + "type": "array", + "description": "Components to render on the dashboard.", + "items": { + "oneOf": [ + { "$ref": "#/$defs/scorecard" }, + { "$ref": "#/$defs/chart" }, + { "$ref": "#/$defs/pie-chart" }, + { "$ref": "#/$defs/table" }, + { "$ref": "#/$defs/bar-chart" }, + { "$ref": "#/$defs/map" }, + { "$ref": "#/$defs/gauge" }, + { "$ref": "#/$defs/funnel" }, + { "$ref": "#/$defs/header" } + ] + } + } + }, + "required": ["title", "layout", "components"], + "additionalProperties": false + } + }, "dateRangeFilter": { "type": "object", "description": "Date range filter options.", @@ -798,7 +800,18 @@ "type": "integer", "description": "The number of days in the past to show data for.", "default": 31 + }, + "monthsInThePast": { + "type": "integer", + "description": "The number of months in the past to show data for. Needs precision to be specified." + }, + "precision": { + "enum": ["fullToFull", "fullToDate", "dateToDate"], + "description": "Precision of the date range to be applied for data filtering:\nfullToFull - from the first day of 'n' last month to last day of last month,\nfullToDate - from the first day of 'n' last month to today,\ndateToDate - from day 'n' months ago to today" } + }, + "dependentRequired": { + "monthsInThePast": ["precision"] } }, "rowFilterDisabled": { @@ -816,5 +829,13 @@ } } }, - "required": ["schemaVersion", "layout", "components"] + "required": ["schemaVersion"], + "oneOf": [ + { + "required": ["layout", "components"] + }, + { + "required": ["tabs"] + } + ] }