@grafana/viz-contract 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/LICENSE +201 -0
- package/README.md +140 -0
- package/fixtures/epoch-range/args.json +14 -0
- package/fixtures/epoch-range/meta.json +4 -0
- package/fixtures/epoch-range/request.json +17 -0
- package/fixtures/epoch-range/response.json +114 -0
- package/fixtures/epoch-range/result.json +252 -0
- package/fixtures/epoch-range/spec.json +141 -0
- package/fixtures/epoch-range/state.json +4 -0
- package/fixtures/error-all-queries-failed/spec.json +45 -0
- package/fixtures/error-all-queries-failed/state.json +8 -0
- package/fixtures/error-invalid-spec/spec.json +25 -0
- package/fixtures/error-invalid-spec/state.json +8 -0
- package/fixtures/error-unsupported-panel-type/spec.json +1372 -0
- package/fixtures/error-unsupported-panel-type/state.json +8 -0
- package/fixtures/error-unsupported-spec-version/spec.json +1372 -0
- package/fixtures/error-unsupported-spec-version/state.json +8 -0
- package/fixtures/hostile-label/args.json +14 -0
- package/fixtures/hostile-label/meta.json +4 -0
- package/fixtures/hostile-label/request.json +17 -0
- package/fixtures/hostile-label/response.json +420 -0
- package/fixtures/hostile-label/result.json +558 -0
- package/fixtures/hostile-label/spec.json +447 -0
- package/fixtures/hostile-label/state.json +4 -0
- package/fixtures/no-data/args.json +14 -0
- package/fixtures/no-data/meta.json +4 -0
- package/fixtures/no-data/request.json +17 -0
- package/fixtures/no-data/response.json +40 -0
- package/fixtures/no-data/result.json +178 -0
- package/fixtures/no-data/spec.json +67 -0
- package/fixtures/no-data/state.json +4 -0
- package/fixtures/partial-error/args.json +20 -0
- package/fixtures/partial-error/meta.json +4 -0
- package/fixtures/partial-error/request.json +28 -0
- package/fixtures/partial-error/response.json +220 -0
- package/fixtures/partial-error/result.json +358 -0
- package/fixtures/partial-error/spec.json +253 -0
- package/fixtures/partial-error/state.json +9 -0
- package/fixtures/pick-annotations-only/args.json +10 -0
- package/fixtures/pick-annotations-only/meta.json +4 -0
- package/fixtures/pick-annotations-only/response.json +41 -0
- package/fixtures/pick-annotations-only/result.json +53 -0
- package/fixtures/pick-categories/args.json +10 -0
- package/fixtures/pick-categories/meta.json +4 -0
- package/fixtures/pick-categories/response.json +58 -0
- package/fixtures/pick-categories/result.json +116 -0
- package/fixtures/pick-empty-result/args.json +10 -0
- package/fixtures/pick-empty-result/meta.json +4 -0
- package/fixtures/pick-empty-result/response.json +11 -0
- package/fixtures/pick-empty-result/result.json +23 -0
- package/fixtures/pick-failed-query-with-frames/args.json +10 -0
- package/fixtures/pick-failed-query-with-frames/meta.json +4 -0
- package/fixtures/pick-failed-query-with-frames/response.json +43 -0
- package/fixtures/pick-failed-query-with-frames/result.json +131 -0
- package/fixtures/pick-few-parts/args.json +10 -0
- package/fixtures/pick-few-parts/meta.json +4 -0
- package/fixtures/pick-few-parts/response.json +40 -0
- package/fixtures/pick-few-parts/result.json +98 -0
- package/fixtures/pick-heatmap-cells/args.json +10 -0
- package/fixtures/pick-heatmap-cells/meta.json +4 -0
- package/fixtures/pick-heatmap-cells/response.json +55 -0
- package/fixtures/pick-heatmap-cells/result.json +143 -0
- package/fixtures/pick-log-lines/args.json +10 -0
- package/fixtures/pick-log-lines/meta.json +4 -0
- package/fixtures/pick-log-lines/response.json +49 -0
- package/fixtures/pick-log-lines/result.json +76 -0
- package/fixtures/pick-no-rows/args.json +10 -0
- package/fixtures/pick-no-rows/meta.json +4 -0
- package/fixtures/pick-no-rows/response.json +32 -0
- package/fixtures/pick-no-rows/result.json +120 -0
- package/fixtures/pick-node-graph/args.json +10 -0
- package/fixtures/pick-node-graph/meta.json +4 -0
- package/fixtures/pick-node-graph/response.json +77 -0
- package/fixtures/pick-node-graph/result.json +89 -0
- package/fixtures/pick-numeric-only/args.json +10 -0
- package/fixtures/pick-numeric-only/meta.json +4 -0
- package/fixtures/pick-numeric-only/response.json +40 -0
- package/fixtures/pick-numeric-only/result.json +89 -0
- package/fixtures/pick-single-stat/args.json +10 -0
- package/fixtures/pick-single-stat/meta.json +4 -0
- package/fixtures/pick-single-stat/response.json +29 -0
- package/fixtures/pick-single-stat/result.json +69 -0
- package/fixtures/pick-time-series-instant/args.json +10 -0
- package/fixtures/pick-time-series-instant/meta.json +4 -0
- package/fixtures/pick-time-series-instant/response.json +40 -0
- package/fixtures/pick-time-series-instant/result.json +128 -0
- package/fixtures/pick-time-series-long/args.json +10 -0
- package/fixtures/pick-time-series-long/meta.json +4 -0
- package/fixtures/pick-time-series-long/response.json +61 -0
- package/fixtures/pick-time-series-long/result.json +167 -0
- package/fixtures/pick-time-series-multi-frame/args.json +10 -0
- package/fixtures/pick-time-series-multi-frame/meta.json +4 -0
- package/fixtures/pick-time-series-multi-frame/response.json +74 -0
- package/fixtures/pick-time-series-multi-frame/result.json +162 -0
- package/fixtures/pick-time-series-null-time/args.json +10 -0
- package/fixtures/pick-time-series-null-time/meta.json +4 -0
- package/fixtures/pick-time-series-null-time/response.json +40 -0
- package/fixtures/pick-time-series-null-time/result.json +128 -0
- package/fixtures/pick-time-series-single/args.json +10 -0
- package/fixtures/pick-time-series-single/meta.json +4 -0
- package/fixtures/pick-time-series-single/response.json +40 -0
- package/fixtures/pick-time-series-single/result.json +128 -0
- package/fixtures/pick-time-series-wide/args.json +10 -0
- package/fixtures/pick-time-series-wide/meta.json +4 -0
- package/fixtures/pick-time-series-wide/response.json +61 -0
- package/fixtures/pick-time-series-wide/result.json +149 -0
- package/fixtures/prometheus-line/args.json +14 -0
- package/fixtures/prometheus-line/meta.json +4 -0
- package/fixtures/prometheus-line/request.json +17 -0
- package/fixtures/prometheus-line/response.json +1344 -0
- package/fixtures/prometheus-line/result.json +1483 -0
- package/fixtures/prometheus-line/spec.json +1372 -0
- package/fixtures/prometheus-line/state.json +4 -0
- package/fixtures/smoke-barchart/spec.json +64 -0
- package/fixtures/smoke-barchart/state.json +4 -0
- package/fixtures/smoke-boxplot/spec.json +96 -0
- package/fixtures/smoke-boxplot/state.json +4 -0
- package/fixtures/smoke-bubble/spec.json +229 -0
- package/fixtures/smoke-bubble/state.json +4 -0
- package/fixtures/smoke-candlestick/spec.json +97 -0
- package/fixtures/smoke-candlestick/state.json +4 -0
- package/fixtures/smoke-chord/spec.json +72 -0
- package/fixtures/smoke-chord/state.json +4 -0
- package/fixtures/smoke-funnel/spec.json +62 -0
- package/fixtures/smoke-funnel/state.json +4 -0
- package/fixtures/smoke-geomap/spec.json +76 -0
- package/fixtures/smoke-geomap/state.json +4 -0
- package/fixtures/smoke-heatmap/spec.json +103 -0
- package/fixtures/smoke-heatmap/state.json +4 -0
- package/fixtures/smoke-histogram/spec.json +63 -0
- package/fixtures/smoke-histogram/state.json +4 -0
- package/fixtures/smoke-nodeGraph/spec.json +101 -0
- package/fixtures/smoke-nodeGraph/state.json +4 -0
- package/fixtures/smoke-parallel/spec.json +78 -0
- package/fixtures/smoke-parallel/state.json +4 -0
- package/fixtures/smoke-piechart/spec.json +62 -0
- package/fixtures/smoke-piechart/state.json +4 -0
- package/fixtures/smoke-radar/spec.json +82 -0
- package/fixtures/smoke-radar/state.json +4 -0
- package/fixtures/smoke-sankey/spec.json +72 -0
- package/fixtures/smoke-sankey/state.json +4 -0
- package/fixtures/smoke-state-timeline/spec.json +64 -0
- package/fixtures/smoke-state-timeline/state.json +4 -0
- package/fixtures/smoke-status-history/spec.json +64 -0
- package/fixtures/smoke-status-history/state.json +4 -0
- package/fixtures/smoke-streamgraph/spec.json +229 -0
- package/fixtures/smoke-streamgraph/state.json +4 -0
- package/fixtures/smoke-sunburst/spec.json +72 -0
- package/fixtures/smoke-sunburst/state.json +4 -0
- package/fixtures/smoke-timeseries/spec.json +163 -0
- package/fixtures/smoke-timeseries/state.json +4 -0
- package/fixtures/smoke-treemap/spec.json +72 -0
- package/fixtures/smoke-treemap/state.json +4 -0
- package/fixtures/too-large/args.json +14 -0
- package/fixtures/too-large/meta.json +4 -0
- package/fixtures/type-mismatch/args.json +15 -0
- package/fixtures/type-mismatch/meta.json +4 -0
- package/fixtures/type-mismatch/request.json +17 -0
- package/fixtures/type-mismatch/response.json +1344 -0
- package/fixtures/type-mismatch/result.json +9 -0
- package/package.json +32 -0
- package/registry/chart-types.json +170 -0
- package/registry/constants.json +14 -0
- package/registry/notices.json +40 -0
- package/registry/panel-types.json +14 -0
- package/registry/pick.json +46 -0
- package/registry/states.json +85 -0
- package/renderer-api.d.ts +70 -0
- package/schemas/bundled/query-datasource-args.schema.json +86 -0
- package/schemas/bundled/registry.schema.json +375 -0
- package/schemas/bundled/tool-result.schema.json +245 -0
- package/schemas/bundled/viz-spec.schema.json +261 -0
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "Registry files of the contract",
|
|
4
|
+
"description": "One definition for each file in registry/. A check validates each file against its definition.",
|
|
5
|
+
"$defs": {
|
|
6
|
+
"condition": {
|
|
7
|
+
"title": "Condition",
|
|
8
|
+
"description": "A condition on the summary of the frames. Each key must match. An empty object always matches. The summary skips the frames that have schema.meta.dataTopic annotations.",
|
|
9
|
+
"type": "object",
|
|
10
|
+
"propertyNames": {
|
|
11
|
+
"anyOf": [
|
|
12
|
+
{
|
|
13
|
+
"description": "frameCount, rowCountTotal, rowCountMax, fieldCount and fieldCountMax are numbers. isInstant is true when the frames have a time field with one or more values, and each time value is the same.",
|
|
14
|
+
"enum": [
|
|
15
|
+
"frameCount",
|
|
16
|
+
"rowCountTotal",
|
|
17
|
+
"rowCountMax",
|
|
18
|
+
"fieldCount",
|
|
19
|
+
"fieldCountMax",
|
|
20
|
+
"isInstant"
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"description": "fieldCountByType.<type> is the number of fields of that @grafana/data field type. hasFieldType.<type> is true when that number is more than 0. A field with enum values counts as a string field.",
|
|
25
|
+
"pattern": "^(fieldCountByType|hasFieldType)\\.(time|number|string|boolean|trace|geo|enum|other|frame|nestedFrames)$"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"description": "hasDataFrameType.<type> is true when a frame has schema.meta.type <type>. hasPreferredVisualisationType.<type> is true when a frame has schema.meta.preferredVisualisationType <type>. hasFieldName.<name> is true when a frame has a field with the name <name>, in lower case.",
|
|
29
|
+
"pattern": "^(hasDataFrameType|hasPreferredVisualisationType|hasFieldName)\\..+$"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
"additionalProperties": {
|
|
34
|
+
"$ref": "#/$defs/matcher"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"matcher": {
|
|
38
|
+
"title": "Matcher",
|
|
39
|
+
"description": "A list matches when the summary value is a member. An object matches a number from min to max, both included. Any other value matches when it is equal.",
|
|
40
|
+
"oneOf": [
|
|
41
|
+
{
|
|
42
|
+
"type": "boolean"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"type": "number"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"type": "string"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"type": "array",
|
|
52
|
+
"minItems": 1,
|
|
53
|
+
"items": {
|
|
54
|
+
"type": [
|
|
55
|
+
"boolean",
|
|
56
|
+
"number",
|
|
57
|
+
"string"
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"type": "object",
|
|
63
|
+
"properties": {
|
|
64
|
+
"min": {
|
|
65
|
+
"type": "number"
|
|
66
|
+
},
|
|
67
|
+
"max": {
|
|
68
|
+
"type": "number"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"minProperties": 1,
|
|
72
|
+
"additionalProperties": false
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
"constant": {
|
|
77
|
+
"type": "object",
|
|
78
|
+
"required": [
|
|
79
|
+
"value",
|
|
80
|
+
"unit",
|
|
81
|
+
"meaning"
|
|
82
|
+
],
|
|
83
|
+
"properties": {
|
|
84
|
+
"value": {
|
|
85
|
+
"type": [
|
|
86
|
+
"number",
|
|
87
|
+
"string",
|
|
88
|
+
"null"
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
"unit": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"minLength": 1
|
|
94
|
+
},
|
|
95
|
+
"meaning": {
|
|
96
|
+
"type": "string",
|
|
97
|
+
"minLength": 1
|
|
98
|
+
},
|
|
99
|
+
"changeable": {
|
|
100
|
+
"type": "boolean",
|
|
101
|
+
"default": false
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"additionalProperties": false
|
|
105
|
+
},
|
|
106
|
+
"constants": {
|
|
107
|
+
"title": "registry/constants.json",
|
|
108
|
+
"type": "object",
|
|
109
|
+
"propertyNames": {
|
|
110
|
+
"pattern": "^[a-z][A-Za-z0-9]*$"
|
|
111
|
+
},
|
|
112
|
+
"additionalProperties": {
|
|
113
|
+
"$ref": "#/$defs/constant"
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"panelTypes": {
|
|
117
|
+
"title": "registry/panel-types.json",
|
|
118
|
+
"type": "object",
|
|
119
|
+
"required": [
|
|
120
|
+
"panels"
|
|
121
|
+
],
|
|
122
|
+
"properties": {
|
|
123
|
+
"panels": {
|
|
124
|
+
"type": "array",
|
|
125
|
+
"minItems": 1,
|
|
126
|
+
"items": {
|
|
127
|
+
"type": "object",
|
|
128
|
+
"required": [
|
|
129
|
+
"id",
|
|
130
|
+
"family",
|
|
131
|
+
"name"
|
|
132
|
+
],
|
|
133
|
+
"properties": {
|
|
134
|
+
"id": {
|
|
135
|
+
"type": "string",
|
|
136
|
+
"pattern": "^[a-z0-9-]+-panel$"
|
|
137
|
+
},
|
|
138
|
+
"family": {
|
|
139
|
+
"type": "string",
|
|
140
|
+
"minLength": 1
|
|
141
|
+
},
|
|
142
|
+
"name": {
|
|
143
|
+
"type": "string",
|
|
144
|
+
"minLength": 1,
|
|
145
|
+
"description": "The name of the panel that a user reads, in lower case"
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
"additionalProperties": false
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"additionalProperties": false
|
|
153
|
+
},
|
|
154
|
+
"chartTypes": {
|
|
155
|
+
"title": "registry/chart-types.json",
|
|
156
|
+
"type": "object",
|
|
157
|
+
"required": [
|
|
158
|
+
"charts"
|
|
159
|
+
],
|
|
160
|
+
"properties": {
|
|
161
|
+
"charts": {
|
|
162
|
+
"type": "array",
|
|
163
|
+
"minItems": 1,
|
|
164
|
+
"items": {
|
|
165
|
+
"type": "object",
|
|
166
|
+
"required": [
|
|
167
|
+
"name",
|
|
168
|
+
"panel",
|
|
169
|
+
"options",
|
|
170
|
+
"fits",
|
|
171
|
+
"description",
|
|
172
|
+
"dataShape"
|
|
173
|
+
],
|
|
174
|
+
"properties": {
|
|
175
|
+
"name": {
|
|
176
|
+
"type": "string",
|
|
177
|
+
"pattern": "^[A-Za-z][A-Za-z0-9-]*$"
|
|
178
|
+
},
|
|
179
|
+
"panel": {
|
|
180
|
+
"type": "string",
|
|
181
|
+
"description": "An id of registry/panel-types.json"
|
|
182
|
+
},
|
|
183
|
+
"options": {
|
|
184
|
+
"type": "object",
|
|
185
|
+
"description": "The options preset that the panel gets"
|
|
186
|
+
},
|
|
187
|
+
"fits": {
|
|
188
|
+
"type": "array",
|
|
189
|
+
"minItems": 1,
|
|
190
|
+
"description": "The frames fit the chart when one condition of the list matches",
|
|
191
|
+
"items": {
|
|
192
|
+
"$ref": "#/$defs/condition"
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
"description": {
|
|
196
|
+
"type": "string",
|
|
197
|
+
"minLength": 1
|
|
198
|
+
},
|
|
199
|
+
"dataShape": {
|
|
200
|
+
"type": "string",
|
|
201
|
+
"minLength": 1
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
"additionalProperties": false
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
"additionalProperties": false
|
|
209
|
+
},
|
|
210
|
+
"pick": {
|
|
211
|
+
"title": "registry/pick.json",
|
|
212
|
+
"type": "object",
|
|
213
|
+
"required": [
|
|
214
|
+
"pickVersion",
|
|
215
|
+
"rules"
|
|
216
|
+
],
|
|
217
|
+
"properties": {
|
|
218
|
+
"pickVersion": {
|
|
219
|
+
"const": 1
|
|
220
|
+
},
|
|
221
|
+
"rules": {
|
|
222
|
+
"type": "array",
|
|
223
|
+
"minItems": 1,
|
|
224
|
+
"description": "The first rule whose when matches wins. The when of the last rule must be empty",
|
|
225
|
+
"items": {
|
|
226
|
+
"type": "object",
|
|
227
|
+
"required": [
|
|
228
|
+
"id",
|
|
229
|
+
"reason",
|
|
230
|
+
"when",
|
|
231
|
+
"chart"
|
|
232
|
+
],
|
|
233
|
+
"properties": {
|
|
234
|
+
"id": {
|
|
235
|
+
"type": "string",
|
|
236
|
+
"pattern": "^[a-z0-9-]+$"
|
|
237
|
+
},
|
|
238
|
+
"reason": {
|
|
239
|
+
"type": "string",
|
|
240
|
+
"minLength": 1
|
|
241
|
+
},
|
|
242
|
+
"when": {
|
|
243
|
+
"$ref": "#/$defs/condition"
|
|
244
|
+
},
|
|
245
|
+
"chart": {
|
|
246
|
+
"type": "string",
|
|
247
|
+
"description": "A name of registry/chart-types.json"
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
"additionalProperties": false
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
"additionalProperties": false
|
|
255
|
+
},
|
|
256
|
+
"message": {
|
|
257
|
+
"type": "object",
|
|
258
|
+
"required": [
|
|
259
|
+
"code",
|
|
260
|
+
"when",
|
|
261
|
+
"message"
|
|
262
|
+
],
|
|
263
|
+
"properties": {
|
|
264
|
+
"code": {
|
|
265
|
+
"type": "string",
|
|
266
|
+
"pattern": "^[a-z0-9-]+$"
|
|
267
|
+
},
|
|
268
|
+
"when": {
|
|
269
|
+
"type": "string",
|
|
270
|
+
"minLength": 1
|
|
271
|
+
},
|
|
272
|
+
"message": {
|
|
273
|
+
"type": "string",
|
|
274
|
+
"minLength": 1,
|
|
275
|
+
"description": "A pattern. A name in angle brackets is a placeholder"
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
"states": {
|
|
280
|
+
"title": "registry/states.json",
|
|
281
|
+
"type": "object",
|
|
282
|
+
"required": [
|
|
283
|
+
"states",
|
|
284
|
+
"errors",
|
|
285
|
+
"toolErrors",
|
|
286
|
+
"refresh"
|
|
287
|
+
],
|
|
288
|
+
"properties": {
|
|
289
|
+
"states": {
|
|
290
|
+
"type": "array",
|
|
291
|
+
"items": {
|
|
292
|
+
"type": "object",
|
|
293
|
+
"required": [
|
|
294
|
+
"state",
|
|
295
|
+
"final",
|
|
296
|
+
"meaning"
|
|
297
|
+
],
|
|
298
|
+
"properties": {
|
|
299
|
+
"state": {
|
|
300
|
+
"type": "string",
|
|
301
|
+
"pattern": "^[a-z-]+$"
|
|
302
|
+
},
|
|
303
|
+
"final": {
|
|
304
|
+
"type": "boolean"
|
|
305
|
+
},
|
|
306
|
+
"meaning": {
|
|
307
|
+
"type": "string",
|
|
308
|
+
"minLength": 1
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
"additionalProperties": false
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
"errors": {
|
|
315
|
+
"description": "The error codes of the Renderer",
|
|
316
|
+
"type": "array",
|
|
317
|
+
"items": {
|
|
318
|
+
"type": "object",
|
|
319
|
+
"$ref": "#/$defs/message",
|
|
320
|
+
"unevaluatedProperties": false
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
"toolErrors": {
|
|
324
|
+
"description": "The tool errors of the Source",
|
|
325
|
+
"type": "array",
|
|
326
|
+
"items": {
|
|
327
|
+
"type": "object",
|
|
328
|
+
"$ref": "#/$defs/message",
|
|
329
|
+
"unevaluatedProperties": false
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
"refresh": {
|
|
333
|
+
"description": "The messages of a failed refresh that the Renderer shows",
|
|
334
|
+
"type": "array",
|
|
335
|
+
"items": {
|
|
336
|
+
"type": "object",
|
|
337
|
+
"$ref": "#/$defs/message",
|
|
338
|
+
"unevaluatedProperties": false
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
},
|
|
342
|
+
"additionalProperties": false
|
|
343
|
+
},
|
|
344
|
+
"notices": {
|
|
345
|
+
"title": "registry/notices.json",
|
|
346
|
+
"type": "object",
|
|
347
|
+
"required": [
|
|
348
|
+
"notices"
|
|
349
|
+
],
|
|
350
|
+
"properties": {
|
|
351
|
+
"notices": {
|
|
352
|
+
"type": "array",
|
|
353
|
+
"items": {
|
|
354
|
+
"type": "object",
|
|
355
|
+
"$ref": "#/$defs/message",
|
|
356
|
+
"required": [
|
|
357
|
+
"raisedBy"
|
|
358
|
+
],
|
|
359
|
+
"properties": {
|
|
360
|
+
"raisedBy": {
|
|
361
|
+
"enum": [
|
|
362
|
+
"renderer",
|
|
363
|
+
"app"
|
|
364
|
+
]
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
"unevaluatedProperties": false
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
"additionalProperties": false
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
"$comment": "Generated from schemas/registry.schema.json. Do not edit."
|
|
375
|
+
}
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "query_datasource tool result",
|
|
4
|
+
"description": "The structuredContent that the Source gives to the App.",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": [
|
|
7
|
+
"chart",
|
|
8
|
+
"panel",
|
|
9
|
+
"alternatives",
|
|
10
|
+
"data"
|
|
11
|
+
],
|
|
12
|
+
"properties": {
|
|
13
|
+
"chart": {
|
|
14
|
+
"$ref": "#/$defs/chartName"
|
|
15
|
+
},
|
|
16
|
+
"panel": {
|
|
17
|
+
"$ref": "#/$defs/panel"
|
|
18
|
+
},
|
|
19
|
+
"alternatives": {
|
|
20
|
+
"type": "array",
|
|
21
|
+
"description": "Each other chart that fits the frames. The App can switch to one with no new query.",
|
|
22
|
+
"items": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"required": [
|
|
25
|
+
"chart",
|
|
26
|
+
"panel"
|
|
27
|
+
],
|
|
28
|
+
"properties": {
|
|
29
|
+
"chart": {
|
|
30
|
+
"$ref": "#/$defs/chartName"
|
|
31
|
+
},
|
|
32
|
+
"panel": {
|
|
33
|
+
"$ref": "#/$defs/panel"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"data": {
|
|
39
|
+
"$ref": "#/$defs/data"
|
|
40
|
+
},
|
|
41
|
+
"grafanaUrl": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"format": "uri",
|
|
44
|
+
"description": "The base URL of the Grafana that the Source queries."
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"$defs": {
|
|
48
|
+
"chartName": {
|
|
49
|
+
"$ref": "#/$defs/query-datasource-args.properties.type"
|
|
50
|
+
},
|
|
51
|
+
"panelId": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"$comment": "Generated from registry/panel-types.json. Do not edit.",
|
|
54
|
+
"enum": [
|
|
55
|
+
"grafana-echartscartesian-panel",
|
|
56
|
+
"grafana-echartsgeo-panel",
|
|
57
|
+
"grafana-echartsheatmap-panel",
|
|
58
|
+
"grafana-echartshierarchy-panel",
|
|
59
|
+
"grafana-echartsmultivariate-panel",
|
|
60
|
+
"grafana-echartsparttowhole-panel",
|
|
61
|
+
"grafana-relations-panel",
|
|
62
|
+
"grafana-echartsstatetimeline-panel",
|
|
63
|
+
"grafana-echartsstatushistory-panel",
|
|
64
|
+
"grafana-echartsstream-panel"
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
"panel": {
|
|
68
|
+
"type": "object",
|
|
69
|
+
"description": "The panel ID and the options preset of the chart, and the unit of the tool arguments.",
|
|
70
|
+
"required": [
|
|
71
|
+
"type",
|
|
72
|
+
"options"
|
|
73
|
+
],
|
|
74
|
+
"properties": {
|
|
75
|
+
"type": {
|
|
76
|
+
"$ref": "#/$defs/panelId"
|
|
77
|
+
},
|
|
78
|
+
"options": {
|
|
79
|
+
"type": "object"
|
|
80
|
+
},
|
|
81
|
+
"fieldConfig": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"properties": {
|
|
84
|
+
"defaults": {
|
|
85
|
+
"type": "object",
|
|
86
|
+
"properties": {
|
|
87
|
+
"unit": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"minLength": 1
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"overrides": {
|
|
94
|
+
"type": "array"
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"data": {
|
|
101
|
+
"type": "object",
|
|
102
|
+
"required": [
|
|
103
|
+
"range",
|
|
104
|
+
"capturedAt",
|
|
105
|
+
"results"
|
|
106
|
+
],
|
|
107
|
+
"properties": {
|
|
108
|
+
"range": {
|
|
109
|
+
"type": "object",
|
|
110
|
+
"description": "The absolute time range of the query, in epoch milliseconds.",
|
|
111
|
+
"required": [
|
|
112
|
+
"from",
|
|
113
|
+
"to"
|
|
114
|
+
],
|
|
115
|
+
"properties": {
|
|
116
|
+
"from": {
|
|
117
|
+
"type": "integer"
|
|
118
|
+
},
|
|
119
|
+
"to": {
|
|
120
|
+
"type": "integer"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"additionalProperties": false
|
|
124
|
+
},
|
|
125
|
+
"capturedAt": {
|
|
126
|
+
"type": "integer",
|
|
127
|
+
"description": "The time when the response of /api/ds/query arrived, in epoch milliseconds."
|
|
128
|
+
},
|
|
129
|
+
"results": {
|
|
130
|
+
"$ref": "#/$defs/results"
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"results": {
|
|
135
|
+
"type": "object",
|
|
136
|
+
"description": "The results object of the /api/ds/query response, with no change. The key is the refId.",
|
|
137
|
+
"minProperties": 1,
|
|
138
|
+
"additionalProperties": {
|
|
139
|
+
"type": "object",
|
|
140
|
+
"required": [
|
|
141
|
+
"status"
|
|
142
|
+
],
|
|
143
|
+
"properties": {
|
|
144
|
+
"status": {
|
|
145
|
+
"type": "integer"
|
|
146
|
+
},
|
|
147
|
+
"frames": {
|
|
148
|
+
"type": "array",
|
|
149
|
+
"items": {
|
|
150
|
+
"$ref": "#/$defs/frame"
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"error": {
|
|
154
|
+
"type": "string"
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"frame": {
|
|
160
|
+
"type": "object",
|
|
161
|
+
"description": "A frame in the DataFrameJSON format of the dataplane contract.",
|
|
162
|
+
"required": [
|
|
163
|
+
"schema"
|
|
164
|
+
],
|
|
165
|
+
"properties": {
|
|
166
|
+
"schema": {
|
|
167
|
+
"type": "object",
|
|
168
|
+
"properties": {
|
|
169
|
+
"refId": {
|
|
170
|
+
"type": "string"
|
|
171
|
+
},
|
|
172
|
+
"meta": {
|
|
173
|
+
"type": "object"
|
|
174
|
+
},
|
|
175
|
+
"fields": {
|
|
176
|
+
"type": "array",
|
|
177
|
+
"items": {
|
|
178
|
+
"type": "object",
|
|
179
|
+
"required": [
|
|
180
|
+
"name"
|
|
181
|
+
],
|
|
182
|
+
"properties": {
|
|
183
|
+
"name": {
|
|
184
|
+
"type": "string"
|
|
185
|
+
},
|
|
186
|
+
"type": {
|
|
187
|
+
"type": "string"
|
|
188
|
+
},
|
|
189
|
+
"labels": {
|
|
190
|
+
"type": "object",
|
|
191
|
+
"additionalProperties": {
|
|
192
|
+
"type": "string"
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
"config": {
|
|
196
|
+
"type": "object"
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
"data": {
|
|
204
|
+
"type": "object",
|
|
205
|
+
"properties": {
|
|
206
|
+
"values": {
|
|
207
|
+
"type": "array",
|
|
208
|
+
"items": {
|
|
209
|
+
"type": "array"
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
"query-datasource-args.properties.type": {
|
|
217
|
+
"type": "string",
|
|
218
|
+
"$comment": "Generated from registry/chart-types.json. Do not edit.",
|
|
219
|
+
"enum": [
|
|
220
|
+
"timeseries",
|
|
221
|
+
"barchart",
|
|
222
|
+
"histogram",
|
|
223
|
+
"candlestick",
|
|
224
|
+
"boxplot",
|
|
225
|
+
"piechart",
|
|
226
|
+
"funnel",
|
|
227
|
+
"heatmap",
|
|
228
|
+
"geomap",
|
|
229
|
+
"state-timeline",
|
|
230
|
+
"status-history",
|
|
231
|
+
"nodeGraph",
|
|
232
|
+
"sankey",
|
|
233
|
+
"chord",
|
|
234
|
+
"treemap",
|
|
235
|
+
"sunburst",
|
|
236
|
+
"radar",
|
|
237
|
+
"parallel",
|
|
238
|
+
"streamgraph",
|
|
239
|
+
"bubble"
|
|
240
|
+
],
|
|
241
|
+
"description": "Optional chart to draw. With no type, the chart comes from the data. Each chart needs: timeseries (a time field and number fields), barchart (number fields, with a string or time field for the categories), histogram (number fields), candlestick (number fields named open, high, low and close), boxplot (number fields named min, q1, median, q3 and max), piechart (a number field, with a string field for the names of the parts), funnel (a number field, with a string field for the names of the stages), heatmap (heatmap cells, or a time field and number fields for the buckets), geomap (a geo field, a geohash field, or latitude and longitude fields), state-timeline (a time field and string, boolean or number fields), status-history (a time field and string, boolean or number fields), nodeGraph (node graph frames, or source and target fields), sankey (source, target and value fields), chord (source, target and value fields), treemap (string fields for the levels and a number field), sunburst (string fields for the levels and a number field), radar (three or more number fields), parallel (two or more number fields), streamgraph (a time field and number fields), bubble (a time field and number fields)."
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
"$comment": "Generated from schemas/tool-result.schema.json. Do not edit."
|
|
245
|
+
}
|