@grafana/viz-contract 1.1.0 → 1.2.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.
Files changed (35) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +4 -2
  3. package/fixtures/epoch-range/args.json +1 -1
  4. package/fixtures/epoch-range/request.json +2 -2
  5. package/fixtures/epoch-range/response.json +0 -28
  6. package/fixtures/epoch-range/result.json +1 -29
  7. package/fixtures/epoch-range/spec.json +1 -29
  8. package/fixtures/hostile-label/args.json +1 -1
  9. package/fixtures/hostile-label/request.json +2 -2
  10. package/fixtures/hostile-label/response.json +0 -112
  11. package/fixtures/hostile-label/result.json +1 -113
  12. package/fixtures/hostile-label/spec.json +1 -113
  13. package/fixtures/partial-error/args.json +1 -1
  14. package/fixtures/partial-error/request.json +3 -3
  15. package/fixtures/partial-error/response.json +0 -56
  16. package/fixtures/partial-error/result.json +1 -57
  17. package/fixtures/partial-error/spec.json +1 -57
  18. package/fixtures/prometheus-line/args.json +1 -1
  19. package/fixtures/prometheus-line/request.json +2 -2
  20. package/fixtures/prometheus-line/response.json +0 -4
  21. package/fixtures/prometheus-line/result.json +1 -5
  22. package/fixtures/prometheus-line/spec.json +1 -5
  23. package/fixtures/title/args.json +15 -0
  24. package/fixtures/title/meta.json +4 -0
  25. package/fixtures/title/request.json +17 -0
  26. package/fixtures/title/response.json +1344 -0
  27. package/fixtures/title/result.json +1493 -0
  28. package/fixtures/title/spec.json +1373 -0
  29. package/fixtures/title/state.json +4 -0
  30. package/fixtures/too-large/args.json +1 -1
  31. package/package.json +1 -1
  32. package/registry/constants.json +1 -0
  33. package/schemas/bundled/query-datasource-args.schema.json +7 -0
  34. package/schemas/bundled/tool-result.schema.json +8 -1
  35. package/schemas/bundled/viz-spec.schema.json +11 -1
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "data": {
26
26
  "range": {
27
- "from": 1790267077294,
27
+ "from": 1790352577294,
28
28
  "to": 1790353477294
29
29
  },
30
30
  "capturedAt": 1790353477806,
@@ -68,20 +68,6 @@
68
68
  "data": {
69
69
  "values": [
70
70
  [
71
- 1790351737294,
72
- 1790351797294,
73
- 1790351857294,
74
- 1790351917294,
75
- 1790351977294,
76
- 1790352037294,
77
- 1790352097294,
78
- 1790352157294,
79
- 1790352217294,
80
- 1790352277294,
81
- 1790352337294,
82
- 1790352397294,
83
- 1790352457294,
84
- 1790352517294,
85
71
  1790352577294,
86
72
  1790352637294,
87
73
  1790352697294,
@@ -100,20 +86,6 @@
100
86
  1790353477294
101
87
  ],
102
88
  [
103
- 10,
104
- 10.65,
105
- 11.24,
106
- 11.68,
107
- 11.94,
108
- 11.99,
109
- 11.82,
110
- 11.45,
111
- 10.91,
112
- 10.28,
113
- 9.62,
114
- 9,
115
- 8.49,
116
- 8.14,
117
89
  8,
118
90
  8.08,
119
91
  8.37,
@@ -170,20 +142,6 @@
170
142
  "data": {
171
143
  "values": [
172
144
  [
173
- 1790351737294,
174
- 1790351797294,
175
- 1790351857294,
176
- 1790351917294,
177
- 1790351977294,
178
- 1790352037294,
179
- 1790352097294,
180
- 1790352157294,
181
- 1790352217294,
182
- 1790352277294,
183
- 1790352337294,
184
- 1790352397294,
185
- 1790352457294,
186
- 1790352517294,
187
145
  1790352577294,
188
146
  1790352637294,
189
147
  1790352697294,
@@ -202,20 +160,6 @@
202
160
  1790353477294
203
161
  ],
204
162
  [
205
- 14.68,
206
- 14.94,
207
- 14.99,
208
- 14.82,
209
- 14.45,
210
- 13.91,
211
- 13.28,
212
- 12.62,
213
- 12,
214
- 11.49,
215
- 11.14,
216
- 11,
217
- 11.08,
218
- 11.37,
219
163
  11.84,
220
164
  12.44,
221
165
  13.1,
@@ -272,20 +216,6 @@
272
216
  "data": {
273
217
  "values": [
274
218
  [
275
- 1790351737294,
276
- 1790351797294,
277
- 1790351857294,
278
- 1790351917294,
279
- 1790351977294,
280
- 1790352037294,
281
- 1790352097294,
282
- 1790352157294,
283
- 1790352217294,
284
- 1790352277294,
285
- 1790352337294,
286
- 1790352397294,
287
- 1790352457294,
288
- 1790352517294,
289
219
  1790352577294,
290
220
  1790352637294,
291
221
  1790352697294,
@@ -304,20 +234,6 @@
304
234
  1790353477294
305
235
  ],
306
236
  [
307
- 17.82,
308
- 17.45,
309
- 16.91,
310
- 16.28,
311
- 15.62,
312
- 15,
313
- 14.49,
314
- 14.14,
315
- 14,
316
- 14.08,
317
- 14.37,
318
- 14.84,
319
- 15.44,
320
- 16.1,
321
237
  16.75,
322
238
  17.31,
323
239
  17.73,
@@ -374,20 +290,6 @@
374
290
  "data": {
375
291
  "values": [
376
292
  [
377
- 1790351737294,
378
- 1790351797294,
379
- 1790351857294,
380
- 1790351917294,
381
- 1790351977294,
382
- 1790352037294,
383
- 1790352097294,
384
- 1790352157294,
385
- 1790352217294,
386
- 1790352277294,
387
- 1790352337294,
388
- 1790352397294,
389
- 1790352457294,
390
- 1790352517294,
391
293
  1790352577294,
392
294
  1790352637294,
393
295
  1790352697294,
@@ -406,20 +308,6 @@
406
308
  1790353477294
407
309
  ],
408
310
  [
409
- 19.28,
410
- 18.62,
411
- 18,
412
- 17.49,
413
- 17.14,
414
- 17,
415
- 17.08,
416
- 17.37,
417
- 17.84,
418
- 18.44,
419
- 19.1,
420
- 19.75,
421
- 20.31,
422
- 20.73,
423
311
  20.97,
424
312
  20.98,
425
313
  20.77,
@@ -14,7 +14,7 @@
14
14
  "format": "time_series"
15
15
  }
16
16
  ],
17
- "from": "now-24h",
17
+ "from": "now-15m",
18
18
  "to": "now",
19
19
  "unit": "reqps"
20
20
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "from": "now-24h",
2
+ "from": "now-15m",
3
3
  "to": "now",
4
4
  "queries": [
5
5
  {
@@ -11,7 +11,7 @@
11
11
  "uid": "lgtm-prometheus"
12
12
  },
13
13
  "maxDataPoints": 1000,
14
- "intervalMs": 86400
14
+ "intervalMs": 900
15
15
  },
16
16
  {
17
17
  "refId": "B",
@@ -22,7 +22,7 @@
22
22
  "uid": "lgtm-prometheus"
23
23
  },
24
24
  "maxDataPoints": 1000,
25
- "intervalMs": 86400
25
+ "intervalMs": 900
26
26
  }
27
27
  ]
28
28
  }
@@ -41,20 +41,6 @@
41
41
  "data": {
42
42
  "values": [
43
43
  [
44
- 1790351737294,
45
- 1790351797294,
46
- 1790351857294,
47
- 1790351917294,
48
- 1790351977294,
49
- 1790352037294,
50
- 1790352097294,
51
- 1790352157294,
52
- 1790352217294,
53
- 1790352277294,
54
- 1790352337294,
55
- 1790352397294,
56
- 1790352457294,
57
- 1790352517294,
58
44
  1790352577294,
59
45
  1790352637294,
60
46
  1790352697294,
@@ -73,20 +59,6 @@
73
59
  1790353477294
74
60
  ],
75
61
  [
76
- 12,
77
- 12.65,
78
- 13.24,
79
- 13.68,
80
- 13.94,
81
- 13.99,
82
- 13.82,
83
- 13.45,
84
- 12.91,
85
- 12.28,
86
- 11.62,
87
- 11,
88
- 10.49,
89
- 10.14,
90
62
  10,
91
63
  10.08,
92
64
  10.37,
@@ -143,20 +115,6 @@
143
115
  "data": {
144
116
  "values": [
145
117
  [
146
- 1790351737294,
147
- 1790351797294,
148
- 1790351857294,
149
- 1790351917294,
150
- 1790351977294,
151
- 1790352037294,
152
- 1790352097294,
153
- 1790352157294,
154
- 1790352217294,
155
- 1790352277294,
156
- 1790352337294,
157
- 1790352397294,
158
- 1790352457294,
159
- 1790352517294,
160
118
  1790352577294,
161
119
  1790352637294,
162
120
  1790352697294,
@@ -175,20 +133,6 @@
175
133
  1790353477294
176
134
  ],
177
135
  [
178
- 5.84,
179
- 5.97,
180
- 6,
181
- 5.91,
182
- 5.72,
183
- 5.46,
184
- 5.14,
185
- 4.81,
186
- 4.5,
187
- 4.24,
188
- 4.07,
189
- 4,
190
- 4.04,
191
- 4.19,
192
136
  4.42,
193
137
  4.72,
194
138
  5.05,
@@ -135,7 +135,7 @@
135
135
  ],
136
136
  "data": {
137
137
  "range": {
138
- "from": 1790267077294,
138
+ "from": 1790352577294,
139
139
  "to": 1790353477294
140
140
  },
141
141
  "capturedAt": 1790353477806,
@@ -179,20 +179,6 @@
179
179
  "data": {
180
180
  "values": [
181
181
  [
182
- 1790351737294,
183
- 1790351797294,
184
- 1790351857294,
185
- 1790351917294,
186
- 1790351977294,
187
- 1790352037294,
188
- 1790352097294,
189
- 1790352157294,
190
- 1790352217294,
191
- 1790352277294,
192
- 1790352337294,
193
- 1790352397294,
194
- 1790352457294,
195
- 1790352517294,
196
182
  1790352577294,
197
183
  1790352637294,
198
184
  1790352697294,
@@ -211,20 +197,6 @@
211
197
  1790353477294
212
198
  ],
213
199
  [
214
- 12,
215
- 12.65,
216
- 13.24,
217
- 13.68,
218
- 13.94,
219
- 13.99,
220
- 13.82,
221
- 13.45,
222
- 12.91,
223
- 12.28,
224
- 11.62,
225
- 11,
226
- 10.49,
227
- 10.14,
228
200
  10,
229
201
  10.08,
230
202
  10.37,
@@ -281,20 +253,6 @@
281
253
  "data": {
282
254
  "values": [
283
255
  [
284
- 1790351737294,
285
- 1790351797294,
286
- 1790351857294,
287
- 1790351917294,
288
- 1790351977294,
289
- 1790352037294,
290
- 1790352097294,
291
- 1790352157294,
292
- 1790352217294,
293
- 1790352277294,
294
- 1790352337294,
295
- 1790352397294,
296
- 1790352457294,
297
- 1790352517294,
298
256
  1790352577294,
299
257
  1790352637294,
300
258
  1790352697294,
@@ -313,20 +271,6 @@
313
271
  1790353477294
314
272
  ],
315
273
  [
316
- 5.84,
317
- 5.97,
318
- 6,
319
- 5.91,
320
- 5.72,
321
- 5.46,
322
- 5.14,
323
- 4.81,
324
- 4.5,
325
- 4.24,
326
- 4.07,
327
- 4,
328
- 4.04,
329
- 4.19,
330
274
  4.42,
331
275
  4.72,
332
276
  5.05,
@@ -30,7 +30,7 @@
30
30
  },
31
31
  "data": {
32
32
  "range": {
33
- "from": 1790267077294,
33
+ "from": 1790352577294,
34
34
  "to": 1790353477294
35
35
  },
36
36
  "capturedAt": 1790353477806,
@@ -74,20 +74,6 @@
74
74
  "data": {
75
75
  "values": [
76
76
  [
77
- 1790351737294,
78
- 1790351797294,
79
- 1790351857294,
80
- 1790351917294,
81
- 1790351977294,
82
- 1790352037294,
83
- 1790352097294,
84
- 1790352157294,
85
- 1790352217294,
86
- 1790352277294,
87
- 1790352337294,
88
- 1790352397294,
89
- 1790352457294,
90
- 1790352517294,
91
77
  1790352577294,
92
78
  1790352637294,
93
79
  1790352697294,
@@ -106,20 +92,6 @@
106
92
  1790353477294
107
93
  ],
108
94
  [
109
- 12,
110
- 12.65,
111
- 13.24,
112
- 13.68,
113
- 13.94,
114
- 13.99,
115
- 13.82,
116
- 13.45,
117
- 12.91,
118
- 12.28,
119
- 11.62,
120
- 11,
121
- 10.49,
122
- 10.14,
123
95
  10,
124
96
  10.08,
125
97
  10.37,
@@ -176,20 +148,6 @@
176
148
  "data": {
177
149
  "values": [
178
150
  [
179
- 1790351737294,
180
- 1790351797294,
181
- 1790351857294,
182
- 1790351917294,
183
- 1790351977294,
184
- 1790352037294,
185
- 1790352097294,
186
- 1790352157294,
187
- 1790352217294,
188
- 1790352277294,
189
- 1790352337294,
190
- 1790352397294,
191
- 1790352457294,
192
- 1790352517294,
193
151
  1790352577294,
194
152
  1790352637294,
195
153
  1790352697294,
@@ -208,20 +166,6 @@
208
166
  1790353477294
209
167
  ],
210
168
  [
211
- 5.84,
212
- 5.97,
213
- 6,
214
- 5.91,
215
- 5.72,
216
- 5.46,
217
- 5.14,
218
- 4.81,
219
- 4.5,
220
- 4.24,
221
- 4.07,
222
- 4,
223
- 4.04,
224
- 4.19,
225
169
  4.42,
226
170
  4.72,
227
171
  5.05,
@@ -8,7 +8,7 @@
8
8
  "format": "time_series"
9
9
  }
10
10
  ],
11
- "from": "now-24h",
11
+ "from": "now-15m",
12
12
  "to": "now",
13
13
  "unit": "reqps"
14
14
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "from": "now-24h",
2
+ "from": "now-15m",
3
3
  "to": "now",
4
4
  "queries": [
5
5
  {
@@ -11,7 +11,7 @@
11
11
  "uid": "lgtm-prometheus"
12
12
  },
13
13
  "maxDataPoints": 1000,
14
- "intervalMs": 86400
14
+ "intervalMs": 900
15
15
  }
16
16
  ]
17
17
  }
@@ -1063,8 +1063,6 @@
1063
1063
  "data": {
1064
1064
  "values": [
1065
1065
  [
1066
- 1790352480000,
1067
- 1790352540000,
1068
1066
  1790352600000,
1069
1067
  1790352660000,
1070
1068
  1790352720000,
@@ -1082,8 +1080,6 @@
1082
1080
  1790353440000
1083
1081
  ],
1084
1082
  [
1085
- 0.010733333333333333,
1086
- 0.02406592002488806,
1087
1083
  0.0374,
1088
1084
  0.05073333333333334,
1089
1085
  0.06406666666666666,
@@ -135,7 +135,7 @@
135
135
  ],
136
136
  "data": {
137
137
  "range": {
138
- "from": 1790267077294,
138
+ "from": 1790352577294,
139
139
  "to": 1790353477294
140
140
  },
141
141
  "capturedAt": 1790353477806,
@@ -1201,8 +1201,6 @@
1201
1201
  "data": {
1202
1202
  "values": [
1203
1203
  [
1204
- 1790352480000,
1205
- 1790352540000,
1206
1204
  1790352600000,
1207
1205
  1790352660000,
1208
1206
  1790352720000,
@@ -1220,8 +1218,6 @@
1220
1218
  1790353440000
1221
1219
  ],
1222
1220
  [
1223
- 0.010733333333333333,
1224
- 0.02406592002488806,
1225
1221
  0.0374,
1226
1222
  0.05073333333333334,
1227
1223
  0.06406666666666666,
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "data": {
26
26
  "range": {
27
- "from": 1790267077294,
27
+ "from": 1790352577294,
28
28
  "to": 1790353477294
29
29
  },
30
30
  "capturedAt": 1790353477806,
@@ -1090,8 +1090,6 @@
1090
1090
  "data": {
1091
1091
  "values": [
1092
1092
  [
1093
- 1790352480000,
1094
- 1790352540000,
1095
1093
  1790352600000,
1096
1094
  1790352660000,
1097
1095
  1790352720000,
@@ -1109,8 +1107,6 @@
1109
1107
  1790353440000
1110
1108
  ],
1111
1109
  [
1112
- 0.010733333333333333,
1113
- 0.02406592002488806,
1114
1110
  0.0374,
1115
1111
  0.05073333333333334,
1116
1112
  0.06406666666666666,
@@ -0,0 +1,15 @@
1
+ {
2
+ "datasourceUid": "lgtm-prometheus",
3
+ "queries": [
4
+ {
5
+ "refId": "A",
6
+ "expr": "sum by (handler) (rate(grafana_http_request_duration_seconds_count[5m]))",
7
+ "legendFormat": "{{handler}}",
8
+ "format": "time_series"
9
+ }
10
+ ],
11
+ "from": "now-24h",
12
+ "to": "now",
13
+ "unit": "reqps",
14
+ "title": "HTTP requests <b>by</b> handler"
15
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "now": 1790353477294,
3
+ "capturedAt": 1790353477806
4
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "from": "now-24h",
3
+ "to": "now",
4
+ "queries": [
5
+ {
6
+ "refId": "A",
7
+ "expr": "sum by (handler) (rate(grafana_http_request_duration_seconds_count[5m]))",
8
+ "legendFormat": "{{handler}}",
9
+ "format": "time_series",
10
+ "datasource": {
11
+ "uid": "lgtm-prometheus"
12
+ },
13
+ "maxDataPoints": 1000,
14
+ "intervalMs": 86400
15
+ }
16
+ ]
17
+ }