Skip to content

Commit 2d11637

Browse files
committed
[CPL-19563] add tabs, dateRangeFilter opts; correct AI insights
1 parent d75c1ea commit 2d11637

File tree

1 file changed

+62
-41
lines changed

1 file changed

+62
-41
lines changed

202412121147.json

Lines changed: 62 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
"type": "string",
136136
"const": "insights"
137137
},
138-
"prompt": {
138+
"langfusePrompt": {
139139
"type": "string"
140140
},
141141
"series": {
@@ -175,7 +175,7 @@
175175
}
176176
}
177177
},
178-
"required": ["prompt", "series", "columnDefs"]
178+
"required": ["langfusePrompt", "series", "columnDefs"]
179179
}
180180
]
181181
},
@@ -408,44 +408,6 @@
408408
}
409409
]
410410
},
411-
"funnel": {
412-
"allOf": [
413-
{ "$ref": "#/$defs/commonComponent" },
414-
{
415-
"type": "object",
416-
"properties": {
417-
"type": {
418-
"type": "string",
419-
"const": "funnel"
420-
},
421-
"series": {
422-
"type": "array",
423-
"items": {
424-
"type": "object",
425-
"properties": {
426-
"name": {
427-
"type": "string",
428-
"description": "The name of the series as shown in the legend, tooltip etc. See e.g. https://api.highcharts.com/highcharts/series.line.name"
429-
},
430-
"type": {
431-
"type": "string",
432-
"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"
433-
},
434-
"query": {
435-
"$ref": "#/$defs/query"
436-
}
437-
},
438-
"required": ["query"]
439-
}
440-
},
441-
"format": {
442-
"$ref": "#/$defs/formatProperties"
443-
}
444-
},
445-
"required": ["type", "series"]
446-
}
447-
]
448-
},
449411
"pie-chart": {
450412
"allOf": [
451413
{ "$ref": "#/$defs/commonComponent" },
@@ -785,6 +747,46 @@
785747
]
786748
}
787749
},
750+
"tabs": {
751+
"type": "array",
752+
"minItems": 1,
753+
"items": {
754+
"type": "object",
755+
"properties": {
756+
"title": {
757+
"type": "string",
758+
"description": "The title of the tab"
759+
},
760+
"layout": {
761+
"$ref": "#/$defs/layout"
762+
},
763+
"insights": {
764+
"type": "array",
765+
"description": "Components to use for insights.",
766+
"items": { "$ref": "#/$defs/insights" }
767+
},
768+
"components": {
769+
"type": "array",
770+
"description": "Components to render on the dashboard.",
771+
"items": {
772+
"oneOf": [
773+
{ "$ref": "#/$defs/scorecard" },
774+
{ "$ref": "#/$defs/chart" },
775+
{ "$ref": "#/$defs/pie-chart" },
776+
{ "$ref": "#/$defs/table" },
777+
{ "$ref": "#/$defs/bar-chart" },
778+
{ "$ref": "#/$defs/map" },
779+
{ "$ref": "#/$defs/gauge" },
780+
{ "$ref": "#/$defs/funnel" },
781+
{ "$ref": "#/$defs/header" }
782+
]
783+
}
784+
}
785+
},
786+
"required": ["title", "layout", "components"],
787+
"additionalProperties": false
788+
}
789+
},
788790
"dateRangeFilter": {
789791
"type": "object",
790792
"description": "Date range filter options.",
@@ -798,7 +800,18 @@
798800
"type": "integer",
799801
"description": "The number of days in the past to show data for.",
800802
"default": 31
803+
},
804+
"monthsInThePast": {
805+
"type": "integer",
806+
"description": "The number of months in the past to show data for. Needs precision to be specified."
807+
},
808+
"precision": {
809+
"enum": ["fullToFull", "fullToDate", "dateToDate"],
810+
"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"
801811
}
812+
},
813+
"dependentRequired": {
814+
"monthsInThePast": ["precision"]
802815
}
803816
},
804817
"rowFilterDisabled": {
@@ -816,5 +829,13 @@
816829
}
817830
}
818831
},
819-
"required": ["schemaVersion", "layout", "components"]
832+
"required": ["schemaVersion"],
833+
"oneOf": [
834+
{
835+
"required": ["layout", "components"]
836+
},
837+
{
838+
"required": ["tabs"]
839+
}
840+
]
820841
}

0 commit comments

Comments
 (0)