@grafana/viz-contract 1.1.0 → 1.3.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 (36) 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/registry/notices.json +1 -1
  34. package/schemas/bundled/query-datasource-args.schema.json +7 -0
  35. package/schemas/bundled/tool-result.schema.json +8 -1
  36. package/schemas/bundled/viz-spec.schema.json +11 -1
@@ -0,0 +1,4 @@
1
+ {
2
+ "state": "ready",
3
+ "notices": []
4
+ }
@@ -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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grafana/viz-contract",
3
- "version": "1.1.0",
3
+ "version": "1.3.0",
4
4
  "description": "Contract between a Grafana query source, the host that shows the chart, and the Renderer",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -9,6 +9,7 @@
9
9
  "maxBundleGzipBytes": { "value": null, "unit": "bytes", "meaning": "Largest gzip size of the Renderer bundle. Not set until the host size research is done", "changeable": true },
10
10
  "maxAppNotes": { "value": 5, "unit": "notes", "meaning": "Most notes of the Source that render_grafana_app adds to its text line", "changeable": true },
11
11
  "maxAppNoteChars": { "value": 200, "unit": "characters", "meaning": "Longest note in the text line of render_grafana_app", "changeable": true },
12
+ "maxTitleChars": { "value": 100, "unit": "characters", "meaning": "Longest title of the tool arguments", "changeable": true },
12
13
  "deprecationDays": { "value": 30, "unit": "days", "meaning": "Shortest deprecation period of a change to a frozen interface", "changeable": true },
13
14
  "specVersion": { "value": 1, "unit": "version", "meaning": "The viz spec version that this contract gives" }
14
15
  }
@@ -16,7 +16,7 @@
16
16
  "code": "series-truncated",
17
17
  "raisedBy": "renderer",
18
18
  "when": "The frames have more series than maxSeries",
19
- "message": "<omitted> series with the smallest peak values are not shown."
19
+ "message": "<omitted> series are not shown. The first <maxSeries> series are drawn."
20
20
  },
21
21
  {
22
22
  "code": "chart-changed",
@@ -79,6 +79,13 @@
79
79
  "type": "string",
80
80
  "minLength": 1,
81
81
  "description": "Optional Grafana unit ID for all values, for example bytes, percent or reqps."
82
+ },
83
+ "title": {
84
+ "type": "string",
85
+ "pattern": "\\S",
86
+ "maxLength": 100,
87
+ "$comment": "Generated from registry/constants.json (maxTitleChars). Do not edit.",
88
+ "description": "Optional title of the chart, for example HTTP requests by handler. The chart shows it as a panel title."
82
89
  }
83
90
  },
84
91
  "additionalProperties": false,
@@ -66,7 +66,7 @@
66
66
  },
67
67
  "panel": {
68
68
  "type": "object",
69
- "description": "The panel ID and the options preset of the chart, and the unit of the tool arguments.",
69
+ "description": "The panel ID and the options preset of the chart, and the unit and the title of the tool arguments.",
70
70
  "required": [
71
71
  "type",
72
72
  "options"
@@ -75,6 +75,13 @@
75
75
  "type": {
76
76
  "$ref": "#/$defs/panelId"
77
77
  },
78
+ "title": {
79
+ "type": "string",
80
+ "pattern": "\\S",
81
+ "maxLength": 100,
82
+ "$comment": "Generated from registry/constants.json (maxTitleChars). Do not edit.",
83
+ "description": "The title of the tool arguments."
84
+ },
78
85
  "options": {
79
86
  "type": "object"
80
87
  },
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "panel": {
17
17
  "type": "object",
18
- "description": "A Grafana panel JSON. type, options and fieldConfig come from the panel of the tool result. datasource and targets come from the tool arguments.",
18
+ "description": "A Grafana panel JSON. type, title, options and fieldConfig come from the panel of the tool result. datasource and targets come from the tool arguments.",
19
19
  "required": [
20
20
  "type"
21
21
  ],
@@ -23,6 +23,9 @@
23
23
  "type": {
24
24
  "$ref": "#/$defs/tool-result.$defs.panelId"
25
25
  },
26
+ "title": {
27
+ "$ref": "#/$defs/tool-result.$defs.panel.properties.title"
28
+ },
26
29
  "options": {
27
30
  "type": "object"
28
31
  },
@@ -123,6 +126,13 @@
123
126
  "grafana-echartsstream-panel"
124
127
  ]
125
128
  },
129
+ "tool-result.$defs.panel.properties.title": {
130
+ "type": "string",
131
+ "pattern": "\\S",
132
+ "maxLength": 100,
133
+ "$comment": "Generated from registry/constants.json (maxTitleChars). Do not edit.",
134
+ "description": "The title of the tool arguments."
135
+ },
126
136
  "tool-result.$defs.panel.properties.fieldConfig": {
127
137
  "type": "object",
128
138
  "properties": {