@intentius/chant-lexicon-grafana 0.96.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 (259) hide show
  1. package/README.md +50 -0
  2. package/dist/build.d.ts +116 -0
  3. package/dist/build.d.ts.map +1 -0
  4. package/dist/catalog.d.ts +26 -0
  5. package/dist/catalog.d.ts.map +1 -0
  6. package/dist/codegen/docs-cli.d.ts +3 -0
  7. package/dist/codegen/docs-cli.d.ts.map +1 -0
  8. package/dist/codegen/docs.d.ts +8 -0
  9. package/dist/codegen/docs.d.ts.map +1 -0
  10. package/dist/codegen/generate-cli.d.ts +3 -0
  11. package/dist/codegen/generate-cli.d.ts.map +1 -0
  12. package/dist/codegen/generate.d.ts +21 -0
  13. package/dist/codegen/generate.d.ts.map +1 -0
  14. package/dist/codegen/package.d.ts +7 -0
  15. package/dist/codegen/package.d.ts.map +1 -0
  16. package/dist/codegen/schema-types.d.ts +41 -0
  17. package/dist/codegen/schema-types.d.ts.map +1 -0
  18. package/dist/composites/agent-dashboard.d.ts +70 -0
  19. package/dist/composites/agent-dashboard.d.ts.map +1 -0
  20. package/dist/composites/catalog.d.ts +3 -0
  21. package/dist/composites/catalog.d.ts.map +1 -0
  22. package/dist/composites/index.d.ts +12 -0
  23. package/dist/composites/index.d.ts.map +1 -0
  24. package/dist/composites/red-dashboard.d.ts +58 -0
  25. package/dist/composites/red-dashboard.d.ts.map +1 -0
  26. package/dist/composites/shared.d.ts +68 -0
  27. package/dist/composites/shared.d.ts.map +1 -0
  28. package/dist/composites/slo-dashboard.d.ts +62 -0
  29. package/dist/composites/slo-dashboard.d.ts.map +1 -0
  30. package/dist/dashboard.d.ts +84 -0
  31. package/dist/dashboard.d.ts.map +1 -0
  32. package/dist/datasource.d.ts +67 -0
  33. package/dist/datasource.d.ts.map +1 -0
  34. package/dist/detect.d.ts +20 -0
  35. package/dist/detect.d.ts.map +1 -0
  36. package/dist/index.d.ts +17 -0
  37. package/dist/index.d.ts.map +1 -0
  38. package/dist/integrity.json +22 -0
  39. package/dist/lint/audit-catalog.d.ts +13 -0
  40. package/dist/lint/audit-catalog.d.ts.map +1 -0
  41. package/dist/lint/post-synth/graf101.d.ts +8 -0
  42. package/dist/lint/post-synth/graf101.d.ts.map +1 -0
  43. package/dist/lint/post-synth/graf102.d.ts +8 -0
  44. package/dist/lint/post-synth/graf102.d.ts.map +1 -0
  45. package/dist/lint/post-synth/graf103.d.ts +8 -0
  46. package/dist/lint/post-synth/graf103.d.ts.map +1 -0
  47. package/dist/lint/post-synth/graf104.d.ts +8 -0
  48. package/dist/lint/post-synth/graf104.d.ts.map +1 -0
  49. package/dist/lint/post-synth/graf105.d.ts +8 -0
  50. package/dist/lint/post-synth/graf105.d.ts.map +1 -0
  51. package/dist/lint/post-synth/graf106.d.ts +8 -0
  52. package/dist/lint/post-synth/graf106.d.ts.map +1 -0
  53. package/dist/lint/post-synth/graf107.d.ts +8 -0
  54. package/dist/lint/post-synth/graf107.d.ts.map +1 -0
  55. package/dist/lint/post-synth/grafana-helpers.d.ts +16 -0
  56. package/dist/lint/post-synth/grafana-helpers.d.ts.map +1 -0
  57. package/dist/lint/post-synth/index.d.ts +3 -0
  58. package/dist/lint/post-synth/index.d.ts.map +1 -0
  59. package/dist/lint/rules/grafana-ast.d.ts +21 -0
  60. package/dist/lint/rules/grafana-ast.d.ts.map +1 -0
  61. package/dist/lint/rules/index.d.ts +6 -0
  62. package/dist/lint/rules/index.d.ts.map +1 -0
  63. package/dist/lint/rules/literal-secret.d.ts +12 -0
  64. package/dist/lint/rules/literal-secret.d.ts.map +1 -0
  65. package/dist/lint/rules/uid-syntax.d.ts +12 -0
  66. package/dist/lint/rules/uid-syntax.d.ts.map +1 -0
  67. package/dist/lsp/completions.d.ts +4 -0
  68. package/dist/lsp/completions.d.ts.map +1 -0
  69. package/dist/lsp/hover.d.ts +4 -0
  70. package/dist/lsp/hover.d.ts.map +1 -0
  71. package/dist/manifest.json +8 -0
  72. package/dist/meta.json +107 -0
  73. package/dist/okf/index.md +39 -0
  74. package/dist/okf/rules/GRAF001.md +16 -0
  75. package/dist/okf/rules/GRAF002.md +15 -0
  76. package/dist/okf/rules/GRAF101.md +15 -0
  77. package/dist/okf/rules/GRAF102.md +15 -0
  78. package/dist/okf/rules/GRAF103.md +11 -0
  79. package/dist/okf/rules/GRAF104.md +15 -0
  80. package/dist/okf/rules/GRAF105.md +11 -0
  81. package/dist/okf/rules/GRAF106.md +11 -0
  82. package/dist/okf/rules/GRAF107.md +11 -0
  83. package/dist/okf/types/ConstantVariable.md +9 -0
  84. package/dist/okf/types/CustomVariable.md +9 -0
  85. package/dist/okf/types/Dashboard.md +14 -0
  86. package/dist/okf/types/DashboardProvider.md +9 -0
  87. package/dist/okf/types/Datasource.md +16 -0
  88. package/dist/okf/types/DatasourceVariable.md +9 -0
  89. package/dist/okf/types/GaugePanel.md +9 -0
  90. package/dist/okf/types/HeatmapPanel.md +9 -0
  91. package/dist/okf/types/IntervalVariable.md +9 -0
  92. package/dist/okf/types/LogsPanel.md +9 -0
  93. package/dist/okf/types/LokiQuery.md +9 -0
  94. package/dist/okf/types/PromQuery.md +9 -0
  95. package/dist/okf/types/QueryVariable.md +9 -0
  96. package/dist/okf/types/Row.md +9 -0
  97. package/dist/okf/types/StatPanel.md +9 -0
  98. package/dist/okf/types/TablePanel.md +9 -0
  99. package/dist/okf/types/TempoQuery.md +9 -0
  100. package/dist/okf/types/TextPanel.md +9 -0
  101. package/dist/okf/types/TextboxVariable.md +9 -0
  102. package/dist/okf/types/TimeSeriesPanel.md +9 -0
  103. package/dist/okf/types/TracesPanel.md +9 -0
  104. package/dist/package-cli.d.ts +3 -0
  105. package/dist/package-cli.d.ts.map +1 -0
  106. package/dist/panels.d.ts +138 -0
  107. package/dist/panels.d.ts.map +1 -0
  108. package/dist/pin.d.ts +32 -0
  109. package/dist/pin.d.ts.map +1 -0
  110. package/dist/plugin.d.ts +12 -0
  111. package/dist/plugin.d.ts.map +1 -0
  112. package/dist/query.d.ts +81 -0
  113. package/dist/query.d.ts.map +1 -0
  114. package/dist/rules/graf101.ts +17 -0
  115. package/dist/rules/graf102.ts +17 -0
  116. package/dist/rules/graf103.ts +17 -0
  117. package/dist/rules/graf104.ts +17 -0
  118. package/dist/rules/graf105.ts +17 -0
  119. package/dist/rules/graf106.ts +17 -0
  120. package/dist/rules/graf107.ts +17 -0
  121. package/dist/rules/grafana-ast.ts +70 -0
  122. package/dist/rules/grafana-helpers.ts +68 -0
  123. package/dist/rules/literal-secret.ts +48 -0
  124. package/dist/rules/uid-syntax.ts +56 -0
  125. package/dist/schema/dashboard.gen.d.ts +1231 -0
  126. package/dist/schema/dashboard.gen.d.ts.map +1 -0
  127. package/dist/schema/gauge.gen.d.ts +57 -0
  128. package/dist/schema/gauge.gen.d.ts.map +1 -0
  129. package/dist/schema/heatmap.gen.d.ts +295 -0
  130. package/dist/schema/heatmap.gen.d.ts.map +1 -0
  131. package/dist/schema/index.d.ts +18 -0
  132. package/dist/schema/index.d.ts.map +1 -0
  133. package/dist/schema/logs.gen.d.ts +29 -0
  134. package/dist/schema/logs.gen.d.ts.map +1 -0
  135. package/dist/schema/loki.gen.d.ts +69 -0
  136. package/dist/schema/loki.gen.d.ts.map +1 -0
  137. package/dist/schema/prometheus.gen.d.ts +169 -0
  138. package/dist/schema/prometheus.gen.d.ts.map +1 -0
  139. package/dist/schema/stat.gen.d.ts +75 -0
  140. package/dist/schema/stat.gen.d.ts.map +1 -0
  141. package/dist/schema/table.gen.d.ts +295 -0
  142. package/dist/schema/table.gen.d.ts.map +1 -0
  143. package/dist/schema/tempo.gen.d.ts +136 -0
  144. package/dist/schema/tempo.gen.d.ts.map +1 -0
  145. package/dist/schema/text.gen.d.ts +16 -0
  146. package/dist/schema/text.gen.d.ts.map +1 -0
  147. package/dist/schema/timeseries.gen.d.ts +179 -0
  148. package/dist/schema/timeseries.gen.d.ts.map +1 -0
  149. package/dist/schema-validate.d.ts +20 -0
  150. package/dist/schema-validate.d.ts.map +1 -0
  151. package/dist/serializer.d.ts +22 -0
  152. package/dist/serializer.d.ts.map +1 -0
  153. package/dist/skill-defs.d.ts +3 -0
  154. package/dist/skill-defs.d.ts.map +1 -0
  155. package/dist/skills/chant-grafana-provisioning.md +42 -0
  156. package/dist/skills/chant-grafana.md +93 -0
  157. package/dist/spec/fetch-cli.d.ts +3 -0
  158. package/dist/spec/fetch-cli.d.ts.map +1 -0
  159. package/dist/spec/schemas.d.ts +25 -0
  160. package/dist/spec/schemas.d.ts.map +1 -0
  161. package/dist/types/index.d.ts +3 -0
  162. package/dist/util.d.ts +17 -0
  163. package/dist/util.d.ts.map +1 -0
  164. package/dist/validate-cli.d.ts +3 -0
  165. package/dist/validate-cli.d.ts.map +1 -0
  166. package/dist/validate-output.d.ts +42 -0
  167. package/dist/validate-output.d.ts.map +1 -0
  168. package/dist/validate.d.ts +12 -0
  169. package/dist/validate.d.ts.map +1 -0
  170. package/dist/variables.d.ts +100 -0
  171. package/dist/variables.d.ts.map +1 -0
  172. package/package.json +79 -0
  173. package/src/build.test.ts +210 -0
  174. package/src/build.ts +573 -0
  175. package/src/catalog.ts +116 -0
  176. package/src/codegen/docs-cli.ts +4 -0
  177. package/src/codegen/docs.ts +97 -0
  178. package/src/codegen/generate-cli.ts +8 -0
  179. package/src/codegen/generate.ts +83 -0
  180. package/src/codegen/package.ts +41 -0
  181. package/src/codegen/schema-types.ts +173 -0
  182. package/src/composites/agent-dashboard.ts +235 -0
  183. package/src/composites/catalog.test.ts +37 -0
  184. package/src/composites/catalog.ts +223 -0
  185. package/src/composites/composites.test.ts +314 -0
  186. package/src/composites/index.ts +12 -0
  187. package/src/composites/red-dashboard.ts +159 -0
  188. package/src/composites/shared.ts +94 -0
  189. package/src/composites/slo-dashboard.ts +177 -0
  190. package/src/dashboard.ts +123 -0
  191. package/src/datasource.ts +93 -0
  192. package/src/detect.ts +30 -0
  193. package/src/generated/lexicon-grafana.json +107 -0
  194. package/src/import.e2e.test.ts +147 -0
  195. package/src/import.test.ts +45 -0
  196. package/src/index.ts +178 -0
  197. package/src/lint/audit-catalog.ts +87 -0
  198. package/src/lint/post-synth/graf101.ts +17 -0
  199. package/src/lint/post-synth/graf102.ts +17 -0
  200. package/src/lint/post-synth/graf103.ts +17 -0
  201. package/src/lint/post-synth/graf104.ts +17 -0
  202. package/src/lint/post-synth/graf105.ts +17 -0
  203. package/src/lint/post-synth/graf106.ts +17 -0
  204. package/src/lint/post-synth/graf107.ts +17 -0
  205. package/src/lint/post-synth/grafana-helpers.ts +68 -0
  206. package/src/lint/post-synth/index.ts +19 -0
  207. package/src/lint/post-synth/post-synth.test.ts +231 -0
  208. package/src/lint/rules/grafana-ast.ts +70 -0
  209. package/src/lint/rules/index.ts +9 -0
  210. package/src/lint/rules/literal-secret.ts +48 -0
  211. package/src/lint/rules/rules.test.ts +70 -0
  212. package/src/lint/rules/uid-syntax.ts +56 -0
  213. package/src/lsp/completions.test.ts +31 -0
  214. package/src/lsp/completions.ts +15 -0
  215. package/src/lsp/hover.test.ts +25 -0
  216. package/src/lsp/hover.ts +28 -0
  217. package/src/package-cli.ts +17 -0
  218. package/src/panels.ts +275 -0
  219. package/src/pin.ts +68 -0
  220. package/src/plugin.test.ts +50 -0
  221. package/src/plugin.ts +116 -0
  222. package/src/query.ts +160 -0
  223. package/src/schema/dashboard.gen.ts +1289 -0
  224. package/src/schema/gauge.gen.ts +64 -0
  225. package/src/schema/heatmap.gen.ts +321 -0
  226. package/src/schema/index.ts +17 -0
  227. package/src/schema/logs.gen.ts +34 -0
  228. package/src/schema/loki.gen.ts +77 -0
  229. package/src/schema/prometheus.gen.ts +181 -0
  230. package/src/schema/stat.gen.ts +86 -0
  231. package/src/schema/table.gen.ts +334 -0
  232. package/src/schema/tempo.gen.ts +146 -0
  233. package/src/schema/text.gen.ts +22 -0
  234. package/src/schema/timeseries.gen.ts +208 -0
  235. package/src/schema-validate.ts +143 -0
  236. package/src/schema.test.ts +76 -0
  237. package/src/serializer.test.ts +170 -0
  238. package/src/serializer.ts +37 -0
  239. package/src/skill-defs.ts +31 -0
  240. package/src/skills/chant-grafana-provisioning.md +42 -0
  241. package/src/skills/chant-grafana.md +93 -0
  242. package/src/spec/fetch-cli.ts +27 -0
  243. package/src/spec/schemas/dashboard.jsonschema.json +1901 -0
  244. package/src/spec/schemas/gauge.jsonschema.json +114 -0
  245. package/src/spec/schemas/heatmap.jsonschema.json +480 -0
  246. package/src/spec/schemas/logs.jsonschema.json +94 -0
  247. package/src/spec/schemas/loki.jsonschema.json +118 -0
  248. package/src/spec/schemas/prometheus.jsonschema.json +276 -0
  249. package/src/spec/schemas/stat.jsonschema.json +163 -0
  250. package/src/spec/schemas/table.jsonschema.json +751 -0
  251. package/src/spec/schemas/tempo.jsonschema.json +225 -0
  252. package/src/spec/schemas/text.jsonschema.json +72 -0
  253. package/src/spec/schemas/timeseries.jsonschema.json +471 -0
  254. package/src/spec/schemas.ts +56 -0
  255. package/src/util.ts +43 -0
  256. package/src/validate-cli.ts +7 -0
  257. package/src/validate-output.ts +380 -0
  258. package/src/validate.ts +108 -0
  259. package/src/variables.ts +161 -0
@@ -0,0 +1,118 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$ref": "#/definitions/dataquery",
4
+ "definitions": {
5
+ "QueryEditorMode": {
6
+ "enum": [
7
+ "code",
8
+ "builder"
9
+ ],
10
+ "type": "string"
11
+ },
12
+ "LokiQueryType": {
13
+ "enum": [
14
+ "range",
15
+ "instant",
16
+ "stream"
17
+ ],
18
+ "type": "string"
19
+ },
20
+ "SupportingQueryType": {
21
+ "enum": [
22
+ "logsVolume",
23
+ "logsSample",
24
+ "dataSample",
25
+ "infiniteScroll"
26
+ ],
27
+ "type": "string"
28
+ },
29
+ "LokiQueryDirection": {
30
+ "enum": [
31
+ "forward",
32
+ "backward",
33
+ "scan"
34
+ ],
35
+ "type": "string"
36
+ },
37
+ "dataquery": {
38
+ "type": "object",
39
+ "additionalProperties": false,
40
+ "required": [
41
+ "expr"
42
+ ],
43
+ "properties": {
44
+ "expr": {
45
+ "type": "string",
46
+ "description": "The LogQL query."
47
+ },
48
+ "legendFormat": {
49
+ "type": "string",
50
+ "description": "Used to override the name of the series."
51
+ },
52
+ "maxLines": {
53
+ "type": "integer",
54
+ "description": "Used to limit the number of log rows returned."
55
+ },
56
+ "resolution": {
57
+ "type": "integer",
58
+ "description": "@deprecated, now use step."
59
+ },
60
+ "editorMode": {
61
+ "$ref": "#/definitions/QueryEditorMode"
62
+ },
63
+ "range": {
64
+ "type": "boolean",
65
+ "description": "@deprecated, now use queryType."
66
+ },
67
+ "instant": {
68
+ "type": "boolean",
69
+ "description": "@deprecated, now use queryType."
70
+ },
71
+ "step": {
72
+ "type": "string",
73
+ "description": "Used to set step value for range queries."
74
+ },
75
+ "refId": {
76
+ "anyOf": [
77
+ {
78
+ "type": "string"
79
+ },
80
+ {
81
+ "type": "null"
82
+ }
83
+ ],
84
+ "description": "A unique identifier for the query within the list of targets.\nIn server side expressions, the refId is used as a variable name to identify results.\nBy default, the UI will assign A-\u003eZ; however setting meaningful names may be useful."
85
+ },
86
+ "hide": {
87
+ "type": "boolean",
88
+ "description": "If hide is set to true, Grafana will filter out the response(s) associated with this query before returning it to the panel."
89
+ },
90
+ "queryType": {
91
+ "type": "string",
92
+ "description": "Specify the query flavor\nTODO make this required and give it a default"
93
+ },
94
+ "datasource": {
95
+ "$ref": "#/definitions/DataSourceRef",
96
+ "description": "For mixed data sources the selected datasource is on the query level.\nFor non mixed scenarios this is undefined.\nTODO find a better way to do this ^ that's friendly to schema\nTODO this shouldn't be unknown but DataSourceRef | null"
97
+ },
98
+ "direction": {
99
+ "$ref": "#/definitions/LokiQueryDirection"
100
+ }
101
+ }
102
+ },
103
+ "DataSourceRef": {
104
+ "type": "object",
105
+ "additionalProperties": false,
106
+ "properties": {
107
+ "type": {
108
+ "type": "string",
109
+ "description": "The plugin type-id"
110
+ },
111
+ "uid": {
112
+ "type": "string",
113
+ "description": "Specific datasource instance"
114
+ }
115
+ }
116
+ }
117
+ }
118
+ }
@@ -0,0 +1,276 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$ref": "#/definitions/Dataquery",
4
+ "definitions": {
5
+ "AdhocFilters": {
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "key",
10
+ "operator",
11
+ "value"
12
+ ],
13
+ "properties": {
14
+ "key": {
15
+ "type": "string"
16
+ },
17
+ "operator": {
18
+ "type": "string"
19
+ },
20
+ "value": {
21
+ "type": "string"
22
+ },
23
+ "values": {
24
+ "type": "array",
25
+ "items": {
26
+ "type": "string"
27
+ }
28
+ }
29
+ }
30
+ },
31
+ "ResultAssertions": {
32
+ "type": "object",
33
+ "additionalProperties": false,
34
+ "required": [
35
+ "typeVersion"
36
+ ],
37
+ "properties": {
38
+ "maxFrames": {
39
+ "type": "integer",
40
+ "description": "Maximum frame count"
41
+ },
42
+ "type": {
43
+ "$ref": "#/definitions/ResultAssertionsType",
44
+ "description": "Type asserts that the frame matches a known type structure.\nPossible enum values:\n - `\"\"` \n - `\"timeseries-wide\"` \n - `\"timeseries-long\"` \n - `\"timeseries-many\"` \n - `\"timeseries-multi\"` \n - `\"directory-listing\"` \n - `\"table\"` \n - `\"numeric-wide\"` \n - `\"numeric-multi\"` \n - `\"numeric-long\"` \n - `\"log-lines\"` "
45
+ },
46
+ "typeVersion": {
47
+ "type": "array",
48
+ "items": {
49
+ "type": "integer"
50
+ },
51
+ "description": "TypeVersion is the version of the Type property. Versions greater than 0.0 correspond to the dataplane\ncontract documentation https://grafana.github.io/dataplane/contract/."
52
+ }
53
+ }
54
+ },
55
+ "ScopesFilters": {
56
+ "type": "object",
57
+ "additionalProperties": false,
58
+ "required": [
59
+ "key",
60
+ "operator",
61
+ "value"
62
+ ],
63
+ "properties": {
64
+ "key": {
65
+ "type": "string"
66
+ },
67
+ "operator": {
68
+ "type": "string"
69
+ },
70
+ "value": {
71
+ "type": "string"
72
+ },
73
+ "values": {
74
+ "type": "array",
75
+ "items": {
76
+ "type": "string"
77
+ }
78
+ }
79
+ }
80
+ },
81
+ "Scopes": {
82
+ "type": "object",
83
+ "additionalProperties": false,
84
+ "required": [
85
+ "title"
86
+ ],
87
+ "properties": {
88
+ "defaultPath": {
89
+ "type": "array",
90
+ "items": {
91
+ "type": "string"
92
+ }
93
+ },
94
+ "filters": {
95
+ "type": "array",
96
+ "items": {
97
+ "$ref": "#/definitions/ScopesFilters"
98
+ }
99
+ },
100
+ "title": {
101
+ "type": "string"
102
+ }
103
+ }
104
+ },
105
+ "TimeRange": {
106
+ "type": "object",
107
+ "additionalProperties": false,
108
+ "required": [
109
+ "from",
110
+ "to"
111
+ ],
112
+ "properties": {
113
+ "from": {
114
+ "type": "string",
115
+ "description": "From is the start time of the query.",
116
+ "default": "now-6h"
117
+ },
118
+ "to": {
119
+ "type": "string",
120
+ "description": "To is the end time of the query.",
121
+ "default": "now"
122
+ }
123
+ }
124
+ },
125
+ "Dataquery": {
126
+ "type": "object",
127
+ "additionalProperties": false,
128
+ "required": [
129
+ "expr"
130
+ ],
131
+ "properties": {
132
+ "adhocFilters": {
133
+ "type": "array",
134
+ "items": {
135
+ "$ref": "#/definitions/AdhocFilters"
136
+ },
137
+ "description": "Additional Ad-hoc filters that take precedence over Scope on conflict."
138
+ },
139
+ "datasource": {
140
+ "$ref": "#/definitions/DataSourceRef",
141
+ "description": "The datasource"
142
+ },
143
+ "editorMode": {
144
+ "$ref": "#/definitions/QueryEditorMode",
145
+ "description": "what we should show in the editor\nPossible enum values:\n - `\"builder\"` \n - `\"code\"` "
146
+ },
147
+ "exemplar": {
148
+ "type": "boolean",
149
+ "description": "Execute an additional query to identify interesting raw samples relevant for the given expr"
150
+ },
151
+ "expr": {
152
+ "type": "string",
153
+ "description": "The actual expression/query that will be evaluated by Prometheus"
154
+ },
155
+ "format": {
156
+ "$ref": "#/definitions/PromQueryFormat",
157
+ "description": "The response format\nPossible enum values:\n - `\"time_series\"` \n - `\"table\"` \n - `\"heatmap\"` "
158
+ },
159
+ "groupByKeys": {
160
+ "type": "array",
161
+ "items": {
162
+ "type": "string"
163
+ },
164
+ "description": "Group By parameters to apply to aggregate expressions in the query"
165
+ },
166
+ "hide": {
167
+ "type": "boolean",
168
+ "description": "true if query is disabled (ie should not be returned to the dashboard)\nNOTE: this does not always imply that the query should not be executed since\nthe results from a hidden query may be used as the input to other queries (SSE etc)"
169
+ },
170
+ "instant": {
171
+ "type": "boolean",
172
+ "description": "Returns only the latest value that Prometheus has scraped for the requested time series"
173
+ },
174
+ "intervalFactor": {
175
+ "type": "integer",
176
+ "description": "Used to specify how many times to divide max data points by. We use max data points under query options\nSee https://github.com/grafana/grafana/issues/48081\nDeprecated: use interval"
177
+ },
178
+ "intervalMs": {
179
+ "type": "number",
180
+ "description": "Interval is the suggested duration between time points in a time series query.\nNOTE: the values for intervalMs is not saved in the query model. It is typically calculated\nfrom the interval required to fill a pixels in the visualization"
181
+ },
182
+ "legendFormat": {
183
+ "type": "string",
184
+ "description": "Series name override or template. Ex. {{hostname}} will be replaced with label value for hostname"
185
+ },
186
+ "maxDataPoints": {
187
+ "type": "integer",
188
+ "description": "MaxDataPoints is the maximum number of data points that should be returned from a time series query.\nNOTE: the values for maxDataPoints is not saved in the query model. It is typically calculated\nfrom the number of pixels visible in a visualization"
189
+ },
190
+ "queryType": {
191
+ "type": "string",
192
+ "description": "QueryType is an optional identifier for the type of query.\nIt can be used to distinguish different types of queries."
193
+ },
194
+ "range": {
195
+ "type": "boolean",
196
+ "description": "Returns a Range vector, comprised of a set of time series containing a range of data points over time for each time series"
197
+ },
198
+ "refId": {
199
+ "anyOf": [
200
+ {
201
+ "type": "string"
202
+ },
203
+ {
204
+ "type": "null"
205
+ }
206
+ ],
207
+ "description": "RefID is the unique identifier of the query, set by the frontend call."
208
+ },
209
+ "resultAssertions": {
210
+ "$ref": "#/definitions/ResultAssertions",
211
+ "description": "Optionally define expected query result behavior"
212
+ },
213
+ "scopes": {
214
+ "type": "array",
215
+ "items": {
216
+ "$ref": "#/definitions/Scopes"
217
+ },
218
+ "description": "A set of filters applied to apply to the query"
219
+ },
220
+ "timeRange": {
221
+ "$ref": "#/definitions/TimeRange",
222
+ "description": "TimeRange represents the query range\nNOTE: unlike generic /ds/query, we can now send explicit time values in each query\nNOTE: the values for timeRange are not saved in a dashboard, they are constructed on the fly"
223
+ },
224
+ "interval": {
225
+ "type": "string",
226
+ "description": "An additional lower limit for the step parameter of the Prometheus query and for the\n`$__interval` and `$__rate_interval` variables."
227
+ }
228
+ }
229
+ },
230
+ "ResultAssertionsType": {
231
+ "enum": [
232
+ "",
233
+ "timeseries-wide",
234
+ "timeseries-long",
235
+ "timeseries-many",
236
+ "timeseries-multi",
237
+ "directory-listing",
238
+ "table",
239
+ "numeric-wide",
240
+ "numeric-multi",
241
+ "numeric-long",
242
+ "log-lines"
243
+ ],
244
+ "type": "string"
245
+ },
246
+ "QueryEditorMode": {
247
+ "enum": [
248
+ "builder",
249
+ "code"
250
+ ],
251
+ "type": "string"
252
+ },
253
+ "PromQueryFormat": {
254
+ "enum": [
255
+ "time_series",
256
+ "table",
257
+ "heatmap"
258
+ ],
259
+ "type": "string"
260
+ },
261
+ "DataSourceRef": {
262
+ "type": "object",
263
+ "additionalProperties": false,
264
+ "properties": {
265
+ "type": {
266
+ "type": "string",
267
+ "description": "The plugin type-id"
268
+ },
269
+ "uid": {
270
+ "type": "string",
271
+ "description": "Specific datasource instance"
272
+ }
273
+ }
274
+ }
275
+ }
276
+ }
@@ -0,0 +1,163 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "definitions": {
4
+ "Options": {
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "graphMode",
9
+ "colorMode",
10
+ "justifyMode",
11
+ "textMode",
12
+ "wideLayout",
13
+ "showPercentChange",
14
+ "reduceOptions",
15
+ "percentChangeColorMode",
16
+ "orientation"
17
+ ],
18
+ "properties": {
19
+ "graphMode": {
20
+ "$ref": "#/definitions/BigValueGraphMode",
21
+ "default": "area"
22
+ },
23
+ "colorMode": {
24
+ "$ref": "#/definitions/BigValueColorMode",
25
+ "default": "value"
26
+ },
27
+ "justifyMode": {
28
+ "$ref": "#/definitions/BigValueJustifyMode",
29
+ "default": "auto"
30
+ },
31
+ "textMode": {
32
+ "$ref": "#/definitions/BigValueTextMode",
33
+ "default": "auto"
34
+ },
35
+ "wideLayout": {
36
+ "type": "boolean",
37
+ "default": true
38
+ },
39
+ "showPercentChange": {
40
+ "type": "boolean",
41
+ "default": false
42
+ },
43
+ "reduceOptions": {
44
+ "$ref": "#/definitions/ReduceDataOptions"
45
+ },
46
+ "text": {
47
+ "$ref": "#/definitions/VizTextDisplayOptions"
48
+ },
49
+ "percentChangeColorMode": {
50
+ "$ref": "#/definitions/PercentChangeColorMode",
51
+ "default": "standard"
52
+ },
53
+ "orientation": {
54
+ "$ref": "#/definitions/VizOrientation"
55
+ }
56
+ }
57
+ },
58
+ "BigValueGraphMode": {
59
+ "enum": [
60
+ "none",
61
+ "line",
62
+ "area"
63
+ ],
64
+ "type": "string",
65
+ "description": "TODO docs"
66
+ },
67
+ "BigValueColorMode": {
68
+ "enum": [
69
+ "value",
70
+ "background",
71
+ "background_solid",
72
+ "none"
73
+ ],
74
+ "type": "string",
75
+ "description": "TODO docs"
76
+ },
77
+ "BigValueJustifyMode": {
78
+ "enum": [
79
+ "auto",
80
+ "center"
81
+ ],
82
+ "type": "string",
83
+ "description": "TODO docs"
84
+ },
85
+ "BigValueTextMode": {
86
+ "enum": [
87
+ "auto",
88
+ "value",
89
+ "value_and_name",
90
+ "name",
91
+ "none"
92
+ ],
93
+ "type": "string",
94
+ "description": "TODO docs"
95
+ },
96
+ "ReduceDataOptions": {
97
+ "type": "object",
98
+ "additionalProperties": false,
99
+ "required": [
100
+ "calcs"
101
+ ],
102
+ "properties": {
103
+ "values": {
104
+ "type": "boolean",
105
+ "description": "If true show each row value"
106
+ },
107
+ "limit": {
108
+ "type": "number",
109
+ "description": "if showing all values limit"
110
+ },
111
+ "calcs": {
112
+ "type": "array",
113
+ "items": {
114
+ "type": "string"
115
+ },
116
+ "description": "When !values, pick one value for the whole field"
117
+ },
118
+ "fields": {
119
+ "type": "string",
120
+ "description": "Which fields to show. By default this is only numeric fields"
121
+ }
122
+ },
123
+ "description": "TODO docs"
124
+ },
125
+ "VizTextDisplayOptions": {
126
+ "type": "object",
127
+ "additionalProperties": false,
128
+ "properties": {
129
+ "titleSize": {
130
+ "type": "number",
131
+ "description": "Explicit title text size"
132
+ },
133
+ "valueSize": {
134
+ "type": "number",
135
+ "description": "Explicit value text size"
136
+ },
137
+ "percentSize": {
138
+ "type": "number",
139
+ "description": "Explicit percent text size"
140
+ }
141
+ },
142
+ "description": "TODO docs"
143
+ },
144
+ "PercentChangeColorMode": {
145
+ "enum": [
146
+ "standard",
147
+ "inverted",
148
+ "same_as_value"
149
+ ],
150
+ "type": "string",
151
+ "description": "TODO docs"
152
+ },
153
+ "VizOrientation": {
154
+ "enum": [
155
+ "auto",
156
+ "vertical",
157
+ "horizontal"
158
+ ],
159
+ "type": "string",
160
+ "description": "TODO docs"
161
+ }
162
+ }
163
+ }