@intentius/chant-lexicon-grafana 0.97.0 → 0.99.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 (451) hide show
  1. package/README.md +15 -5
  2. package/dist/actions/grafana.d.ts +24 -0
  3. package/dist/actions/grafana.d.ts.map +1 -0
  4. package/dist/actions/index.d.ts +2 -0
  5. package/dist/actions/index.d.ts.map +1 -0
  6. package/dist/alerting-build.d.ts +128 -0
  7. package/dist/alerting-build.d.ts.map +1 -0
  8. package/dist/alerting.d.ts +273 -0
  9. package/dist/alerting.d.ts.map +1 -0
  10. package/dist/api/apply.d.ts +156 -0
  11. package/dist/api/apply.d.ts.map +1 -0
  12. package/dist/api/bind.d.ts +32 -0
  13. package/dist/api/bind.d.ts.map +1 -0
  14. package/dist/api/client.d.ts +76 -0
  15. package/dist/api/client.d.ts.map +1 -0
  16. package/dist/api/converge.d.ts +33 -0
  17. package/dist/api/converge.d.ts.map +1 -0
  18. package/dist/api/dashboards.d.ts +102 -0
  19. package/dist/api/dashboards.d.ts.map +1 -0
  20. package/dist/api/datasources.d.ts +26 -0
  21. package/dist/api/datasources.d.ts.map +1 -0
  22. package/dist/api/fake-grafana-writes.d.ts +41 -0
  23. package/dist/api/fake-grafana-writes.d.ts.map +1 -0
  24. package/dist/api/fake-grafana.d.ts +61 -0
  25. package/dist/api/fake-grafana.d.ts.map +1 -0
  26. package/dist/api/folders.d.ts +110 -0
  27. package/dist/api/folders.d.ts.map +1 -0
  28. package/dist/api/library-panels.d.ts +52 -0
  29. package/dist/api/library-panels.d.ts.map +1 -0
  30. package/dist/build.d.ts +30 -2
  31. package/dist/build.d.ts.map +1 -1
  32. package/dist/catalog.d.ts +1 -1
  33. package/dist/catalog.d.ts.map +1 -1
  34. package/dist/codegen/docs.d.ts.map +1 -1
  35. package/dist/codegen/schema-types.d.ts +3 -3
  36. package/dist/codegen/schema-types.d.ts.map +1 -1
  37. package/dist/composites/agent-dashboard.d.ts.map +1 -1
  38. package/dist/composites/catalog.d.ts.map +1 -1
  39. package/dist/composites/index.d.ts +4 -2
  40. package/dist/composites/index.d.ts.map +1 -1
  41. package/dist/composites/red-dashboard.d.ts +21 -2
  42. package/dist/composites/red-dashboard.d.ts.map +1 -1
  43. package/dist/composites/shared.d.ts +7 -0
  44. package/dist/composites/shared.d.ts.map +1 -1
  45. package/dist/composites/slo-alert-rules.d.ts +92 -0
  46. package/dist/composites/slo-alert-rules.d.ts.map +1 -0
  47. package/dist/config.d.ts +111 -0
  48. package/dist/config.d.ts.map +1 -0
  49. package/dist/contact-point-secrets.d.ts +17 -0
  50. package/dist/contact-point-secrets.d.ts.map +1 -0
  51. package/dist/dashboard.d.ts +16 -2
  52. package/dist/dashboard.d.ts.map +1 -1
  53. package/dist/datasource-refs.d.ts +95 -0
  54. package/dist/datasource-refs.d.ts.map +1 -0
  55. package/dist/datasource.d.ts +29 -0
  56. package/dist/datasource.d.ts.map +1 -1
  57. package/dist/deep-observe-hooks.d.ts +64 -0
  58. package/dist/deep-observe-hooks.d.ts.map +1 -0
  59. package/dist/deep-observe.d.ts +42 -0
  60. package/dist/deep-observe.d.ts.map +1 -0
  61. package/dist/describe-resources.d.ts +49 -0
  62. package/dist/describe-resources.d.ts.map +1 -0
  63. package/dist/detect.d.ts +28 -1
  64. package/dist/detect.d.ts.map +1 -1
  65. package/dist/export-resources.d.ts +38 -0
  66. package/dist/export-resources.d.ts.map +1 -0
  67. package/dist/import/alerting.d.ts +40 -0
  68. package/dist/import/alerting.d.ts.map +1 -0
  69. package/dist/import/edits.d.ts +47 -0
  70. package/dist/import/edits.d.ts.map +1 -0
  71. package/dist/import/embedded.d.ts +14 -0
  72. package/dist/import/embedded.d.ts.map +1 -0
  73. package/dist/import/generator.d.ts +60 -0
  74. package/dist/import/generator.d.ts.map +1 -0
  75. package/dist/import/live-export.d.ts +108 -0
  76. package/dist/import/live-export.d.ts.map +1 -0
  77. package/dist/import/mappings.d.ts +83 -0
  78. package/dist/import/mappings.d.ts.map +1 -0
  79. package/dist/import/model.d.ts +98 -0
  80. package/dist/import/model.d.ts.map +1 -0
  81. package/dist/import/normalize-alerting.d.ts +26 -0
  82. package/dist/import/normalize-alerting.d.ts.map +1 -0
  83. package/dist/import/normalize.d.ts +74 -0
  84. package/dist/import/normalize.d.ts.map +1 -0
  85. package/dist/import/parser.d.ts +110 -0
  86. package/dist/import/parser.d.ts.map +1 -0
  87. package/dist/import/report.d.ts +26 -0
  88. package/dist/import/report.d.ts.map +1 -0
  89. package/dist/import/testdata/fixtures.d.ts +35 -0
  90. package/dist/import/testdata/fixtures.d.ts.map +1 -0
  91. package/dist/import/v2.d.ts +72 -0
  92. package/dist/import/v2.d.ts.map +1 -0
  93. package/dist/index.d.ts +26 -9
  94. package/dist/index.d.ts.map +1 -1
  95. package/dist/integrity.json +18 -10
  96. package/dist/k8s.d.ts +107 -0
  97. package/dist/k8s.d.ts.map +1 -0
  98. package/dist/lint/audit-catalog.d.ts +2 -1
  99. package/dist/lint/audit-catalog.d.ts.map +1 -1
  100. package/dist/lint/post-synth/graf101.d.ts +2 -2
  101. package/dist/lint/post-synth/graf102.d.ts +1 -1
  102. package/dist/lint/post-synth/graf107.d.ts +1 -1
  103. package/dist/lint/post-synth/graf108.d.ts +8 -0
  104. package/dist/lint/post-synth/graf108.d.ts.map +1 -0
  105. package/dist/lint/post-synth/graf109.d.ts +8 -0
  106. package/dist/lint/post-synth/graf109.d.ts.map +1 -0
  107. package/dist/lint/post-synth/graf111.d.ts +8 -0
  108. package/dist/lint/post-synth/graf111.d.ts.map +1 -0
  109. package/dist/lint/post-synth/graf112.d.ts +8 -0
  110. package/dist/lint/post-synth/graf112.d.ts.map +1 -0
  111. package/dist/lint/post-synth/graf113.d.ts +8 -0
  112. package/dist/lint/post-synth/graf113.d.ts.map +1 -0
  113. package/dist/lint/post-synth/graf114.d.ts +8 -0
  114. package/dist/lint/post-synth/graf114.d.ts.map +1 -0
  115. package/dist/lint/post-synth/graf115.d.ts +8 -0
  116. package/dist/lint/post-synth/graf115.d.ts.map +1 -0
  117. package/dist/lint/post-synth/grafana-helpers.d.ts +7 -5
  118. package/dist/lint/post-synth/grafana-helpers.d.ts.map +1 -1
  119. package/dist/lint/post-synth/index.d.ts.map +1 -1
  120. package/dist/lint/rules/literal-secret.d.ts +7 -3
  121. package/dist/lint/rules/literal-secret.d.ts.map +1 -1
  122. package/dist/lsp/hover.d.ts.map +1 -1
  123. package/dist/manifest.json +1 -1
  124. package/dist/members.d.ts +27 -0
  125. package/dist/members.d.ts.map +1 -0
  126. package/dist/meta.json +135 -0
  127. package/dist/okf/index.md +36 -2
  128. package/dist/okf/rules/GRAF002.md +3 -2
  129. package/dist/okf/rules/GRAF101.md +3 -2
  130. package/dist/okf/rules/GRAF102.md +1 -0
  131. package/dist/okf/rules/GRAF108.md +11 -0
  132. package/dist/okf/rules/GRAF109.md +15 -0
  133. package/dist/okf/rules/GRAF111.md +11 -0
  134. package/dist/okf/rules/GRAF112.md +16 -0
  135. package/dist/okf/rules/GRAF113.md +16 -0
  136. package/dist/okf/rules/GRAF114.md +11 -0
  137. package/dist/okf/rules/GRAF115.md +11 -0
  138. package/dist/okf/types/AlertListPanel.md +9 -0
  139. package/dist/okf/types/AlertQuery.md +9 -0
  140. package/dist/okf/types/AlertRule.md +9 -0
  141. package/dist/okf/types/AlertRuleGroup.md +9 -0
  142. package/dist/okf/types/BarChartPanel.md +9 -0
  143. package/dist/okf/types/BarGaugePanel.md +9 -0
  144. package/dist/okf/types/CanvasPanel.md +9 -0
  145. package/dist/okf/types/ClassicConditionsExpression.md +9 -0
  146. package/dist/okf/types/ContactPoint.md +14 -0
  147. package/dist/okf/types/Dashboard.md +1 -0
  148. package/dist/okf/types/Datasource.md +3 -2
  149. package/dist/okf/types/ExternalDatasource.md +15 -0
  150. package/dist/okf/types/FlameGraphPanel.md +9 -0
  151. package/dist/okf/types/GeomapPanel.md +9 -0
  152. package/dist/okf/types/HistogramPanel.md +9 -0
  153. package/dist/okf/types/MathExpression.md +9 -0
  154. package/dist/okf/types/MuteTiming.md +13 -0
  155. package/dist/okf/types/NodeGraphPanel.md +9 -0
  156. package/dist/okf/types/NotificationPolicy.md +9 -0
  157. package/dist/okf/types/NotificationTemplate.md +9 -0
  158. package/dist/okf/types/PieChartPanel.md +9 -0
  159. package/dist/okf/types/ReduceExpression.md +9 -0
  160. package/dist/okf/types/ResampleExpression.md +9 -0
  161. package/dist/okf/types/SqlExpression.md +9 -0
  162. package/dist/okf/types/StateTimelinePanel.md +9 -0
  163. package/dist/okf/types/StatusHistoryPanel.md +9 -0
  164. package/dist/okf/types/ThresholdExpression.md +9 -0
  165. package/dist/okf/types/TrendPanel.md +9 -0
  166. package/dist/okf/types/XYChartPanel.md +9 -0
  167. package/dist/op/activities/grafana-apply.d.ts +75 -0
  168. package/dist/op/activities/grafana-apply.d.ts.map +1 -0
  169. package/dist/op/activities/index.d.ts +9 -0
  170. package/dist/op/activities/index.d.ts.map +1 -0
  171. package/dist/op/builders.d.ts +24 -0
  172. package/dist/op/builders.d.ts.map +1 -0
  173. package/dist/ownership.d.ts +67 -0
  174. package/dist/ownership.d.ts.map +1 -0
  175. package/dist/panel-options.d.ts +65 -0
  176. package/dist/panel-options.d.ts.map +1 -0
  177. package/dist/panels.d.ts +46 -9
  178. package/dist/panels.d.ts.map +1 -1
  179. package/dist/pin.d.ts +29 -7
  180. package/dist/pin.d.ts.map +1 -1
  181. package/dist/plugin.d.ts.map +1 -1
  182. package/dist/promql-check.d.ts +51 -0
  183. package/dist/promql-check.d.ts.map +1 -0
  184. package/dist/query.d.ts +9 -8
  185. package/dist/query.d.ts.map +1 -1
  186. package/dist/rules/graf101.ts +3 -3
  187. package/dist/rules/graf102.ts +1 -1
  188. package/dist/rules/graf107.ts +1 -1
  189. package/dist/rules/graf108.ts +17 -0
  190. package/dist/rules/graf109.ts +17 -0
  191. package/dist/rules/graf111.ts +17 -0
  192. package/dist/rules/graf112.ts +17 -0
  193. package/dist/rules/graf113.ts +17 -0
  194. package/dist/rules/graf114.ts +17 -0
  195. package/dist/rules/graf115.ts +17 -0
  196. package/dist/rules/grafana-helpers.ts +15 -8
  197. package/dist/rules/literal-secret.ts +60 -6
  198. package/dist/schema/barchart.gen.d.ts +198 -0
  199. package/dist/schema/barchart.gen.d.ts.map +1 -0
  200. package/dist/schema/bargauge.gen.d.ts +97 -0
  201. package/dist/schema/bargauge.gen.d.ts.map +1 -0
  202. package/dist/schema/canvas.gen.d.ts +152 -0
  203. package/dist/schema/canvas.gen.d.ts.map +1 -0
  204. package/dist/schema/dashboard.gen.d.ts +196 -21
  205. package/dist/schema/dashboard.gen.d.ts.map +1 -1
  206. package/dist/schema/expr.gen.d.ts +606 -0
  207. package/dist/schema/expr.gen.d.ts.map +1 -0
  208. package/dist/schema/gauge.gen.d.ts.map +1 -1
  209. package/dist/schema/geomap.gen.d.ts +100 -0
  210. package/dist/schema/geomap.gen.d.ts.map +1 -0
  211. package/dist/schema/heatmap.gen.d.ts.map +1 -1
  212. package/dist/schema/histogram.gen.d.ts +132 -0
  213. package/dist/schema/histogram.gen.d.ts.map +1 -0
  214. package/dist/schema/index.d.ts +12 -0
  215. package/dist/schema/index.d.ts.map +1 -1
  216. package/dist/schema/logs.gen.d.ts +1 -0
  217. package/dist/schema/logs.gen.d.ts.map +1 -1
  218. package/dist/schema/loki.gen.d.ts.map +1 -1
  219. package/dist/schema/nodegraph.gen.d.ts +49 -0
  220. package/dist/schema/nodegraph.gen.d.ts.map +1 -0
  221. package/dist/schema/piechart.gen.d.ts +127 -0
  222. package/dist/schema/piechart.gen.d.ts.map +1 -0
  223. package/dist/schema/prometheus.gen.d.ts.map +1 -1
  224. package/dist/schema/stat.gen.d.ts.map +1 -1
  225. package/dist/schema/statetimeline.gen.d.ts +124 -0
  226. package/dist/schema/statetimeline.gen.d.ts.map +1 -0
  227. package/dist/schema/statushistory.gen.d.ts +114 -0
  228. package/dist/schema/statushistory.gen.d.ts.map +1 -0
  229. package/dist/schema/table.gen.d.ts +22 -3
  230. package/dist/schema/table.gen.d.ts.map +1 -1
  231. package/dist/schema/tempo.gen.d.ts.map +1 -1
  232. package/dist/schema/text.gen.d.ts.map +1 -1
  233. package/dist/schema/timeseries.gen.d.ts +5 -1
  234. package/dist/schema/timeseries.gen.d.ts.map +1 -1
  235. package/dist/schema/trend.gen.d.ts +180 -0
  236. package/dist/schema/trend.gen.d.ts.map +1 -0
  237. package/dist/schema/xychart.gen.d.ts +145 -0
  238. package/dist/schema/xychart.gen.d.ts.map +1 -0
  239. package/dist/schema-validate.d.ts +30 -4
  240. package/dist/schema-validate.d.ts.map +1 -1
  241. package/dist/serializer.d.ts +11 -3
  242. package/dist/serializer.d.ts.map +1 -1
  243. package/dist/skill-defs.d.ts.map +1 -1
  244. package/dist/skills/chant-grafana-alerting.md +49 -0
  245. package/dist/skills/chant-grafana-provisioning.md +3 -3
  246. package/dist/skills/chant-grafana.md +12 -6
  247. package/dist/spec/fetch-units-cli.d.ts +3 -0
  248. package/dist/spec/fetch-units-cli.d.ts.map +1 -0
  249. package/dist/spec/overlay.d.ts +43 -0
  250. package/dist/spec/overlay.d.ts.map +1 -0
  251. package/dist/spec/schemas.d.ts +13 -7
  252. package/dist/spec/schemas.d.ts.map +1 -1
  253. package/dist/spec/units.d.ts +35 -0
  254. package/dist/spec/units.d.ts.map +1 -0
  255. package/dist/spec/units.gen.d.ts +2 -0
  256. package/dist/spec/units.gen.d.ts.map +1 -0
  257. package/dist/transformations.d.ts +459 -0
  258. package/dist/transformations.d.ts.map +1 -0
  259. package/dist/util.d.ts +6 -0
  260. package/dist/util.d.ts.map +1 -1
  261. package/dist/validate-alerting.d.ts +65 -0
  262. package/dist/validate-alerting.d.ts.map +1 -0
  263. package/dist/validate-output.d.ts +49 -9
  264. package/dist/validate-output.d.ts.map +1 -1
  265. package/dist/validate.d.ts.map +1 -1
  266. package/dist/variables.d.ts +7 -2
  267. package/dist/variables.d.ts.map +1 -1
  268. package/package.json +12 -4
  269. package/src/actions/actions.test.ts +24 -0
  270. package/src/actions/grafana.ts +40 -0
  271. package/src/actions/index.ts +1 -0
  272. package/src/alerting-build.ts +376 -0
  273. package/src/alerting.e2e.test.ts +212 -0
  274. package/src/alerting.test.ts +272 -0
  275. package/src/alerting.ts +435 -0
  276. package/src/api/apply.test.ts +238 -0
  277. package/src/api/apply.ts +384 -0
  278. package/src/api/bind.ts +58 -0
  279. package/src/api/client.ts +148 -0
  280. package/src/api/converge.ts +63 -0
  281. package/src/api/dashboards.ts +247 -0
  282. package/src/api/datasources.ts +33 -0
  283. package/src/api/fake-grafana-writes.ts +201 -0
  284. package/src/api/fake-grafana.ts +186 -0
  285. package/src/api/folders.ts +265 -0
  286. package/src/api/library-panels.ts +101 -0
  287. package/src/build.test.ts +210 -5
  288. package/src/build.ts +180 -43
  289. package/src/catalog.ts +86 -2
  290. package/src/codegen/docs.ts +42 -9
  291. package/src/codegen/schema-types.ts +16 -6
  292. package/src/composites/agent-dashboard.ts +6 -3
  293. package/src/composites/catalog.test.ts +2 -2
  294. package/src/composites/catalog.ts +82 -0
  295. package/src/composites/composites.test.ts +73 -9
  296. package/src/composites/index.ts +4 -2
  297. package/src/composites/queries.e2e.test.ts +374 -0
  298. package/src/composites/red-dashboard.ts +83 -12
  299. package/src/composites/shared.ts +11 -0
  300. package/src/composites/slo-alert-rules.ts +149 -0
  301. package/src/config.test.ts +61 -0
  302. package/src/config.ts +138 -0
  303. package/src/contact-point-secrets.ts +63 -0
  304. package/src/dashboard.ts +16 -2
  305. package/src/datasource-refs.test.ts +56 -0
  306. package/src/datasource-refs.ts +189 -0
  307. package/src/datasource.ts +52 -0
  308. package/src/deep-observe-hooks.ts +252 -0
  309. package/src/deep-observe.test.ts +265 -0
  310. package/src/deep-observe.ts +164 -0
  311. package/src/describe-resources.test.ts +255 -0
  312. package/src/describe-resources.ts +209 -0
  313. package/src/detect.ts +79 -2
  314. package/src/export-resources.test.ts +129 -0
  315. package/src/export-resources.ts +84 -0
  316. package/src/generated/lexicon-grafana.json +135 -0
  317. package/src/import/alerting-roundtrip.test.ts +161 -0
  318. package/src/import/alerting.ts +500 -0
  319. package/src/import/edits.ts +95 -0
  320. package/src/import/embedded.test.ts +45 -0
  321. package/src/import/embedded.ts +47 -0
  322. package/src/import/generated-types.e2e.test.ts +118 -0
  323. package/src/import/generator.test.ts +210 -0
  324. package/src/import/generator.ts +462 -0
  325. package/src/import/live-export.ts +264 -0
  326. package/src/import/mappings.ts +264 -0
  327. package/src/import/model.ts +110 -0
  328. package/src/import/normalize-alerting.ts +101 -0
  329. package/src/import/normalize.test.ts +117 -0
  330. package/src/import/normalize.ts +364 -0
  331. package/src/import/parser.test.ts +440 -0
  332. package/src/import/parser.ts +1236 -0
  333. package/src/import/report.ts +62 -0
  334. package/src/import/roundtrip.test.ts +468 -0
  335. package/src/import/testdata/fixtures.ts +129 -0
  336. package/src/import/v2.test.ts +292 -0
  337. package/src/import/v2.ts +803 -0
  338. package/src/import.e2e.test.ts +31 -84
  339. package/src/import.test.ts +9 -3
  340. package/src/index.ts +190 -5
  341. package/src/k8s.test.ts +98 -0
  342. package/src/k8s.ts +197 -0
  343. package/src/lint/audit-catalog.ts +60 -3
  344. package/src/lint/core-lint.test.ts +43 -0
  345. package/src/lint/post-synth/graf101.ts +3 -3
  346. package/src/lint/post-synth/graf102.ts +1 -1
  347. package/src/lint/post-synth/graf107.ts +1 -1
  348. package/src/lint/post-synth/graf108.ts +17 -0
  349. package/src/lint/post-synth/graf109.ts +17 -0
  350. package/src/lint/post-synth/graf111.ts +17 -0
  351. package/src/lint/post-synth/graf112.ts +17 -0
  352. package/src/lint/post-synth/graf113.ts +17 -0
  353. package/src/lint/post-synth/graf114.ts +17 -0
  354. package/src/lint/post-synth/graf115.ts +17 -0
  355. package/src/lint/post-synth/grafana-helpers.ts +15 -8
  356. package/src/lint/post-synth/index.ts +14 -0
  357. package/src/lint/post-synth/post-synth.test.ts +235 -11
  358. package/src/lint/rules/literal-secret.ts +60 -6
  359. package/src/lint/rules/rules.test.ts +27 -0
  360. package/src/lsp/completions.test.ts +5 -0
  361. package/src/lsp/hover.test.ts +7 -0
  362. package/src/lsp/hover.ts +8 -1
  363. package/src/members.ts +68 -0
  364. package/src/observe.e2e.test.ts +255 -0
  365. package/src/op/activities/grafana-apply.e2e.test.ts +175 -0
  366. package/src/op/activities/grafana-apply.test.ts +229 -0
  367. package/src/op/activities/grafana-apply.ts +171 -0
  368. package/src/op/activities/index.ts +8 -0
  369. package/src/op/builders.test.ts +40 -0
  370. package/src/op/builders.ts +34 -0
  371. package/src/ownership.ts +103 -0
  372. package/src/panel-options.ts +66 -0
  373. package/src/panels.test.ts +51 -0
  374. package/src/panels.ts +148 -10
  375. package/src/pin.ts +57 -6
  376. package/src/plugin.test.ts +5 -2
  377. package/src/plugin.ts +66 -0
  378. package/src/promql-check.test.ts +108 -0
  379. package/src/promql-check.ts +189 -0
  380. package/src/query.ts +13 -8
  381. package/src/schema/barchart.gen.ts +221 -0
  382. package/src/schema/bargauge.gen.ts +111 -0
  383. package/src/schema/canvas.gen.ts +176 -0
  384. package/src/schema/dashboard.gen.ts +206 -22
  385. package/src/schema/expr.gen.ts +618 -0
  386. package/src/schema/gauge.gen.ts +2 -1
  387. package/src/schema/geomap.gen.ts +112 -0
  388. package/src/schema/heatmap.gen.ts +2 -1
  389. package/src/schema/histogram.gen.ts +151 -0
  390. package/src/schema/index.ts +12 -0
  391. package/src/schema/logs.gen.ts +3 -1
  392. package/src/schema/loki.gen.ts +2 -1
  393. package/src/schema/nodegraph.gen.ts +58 -0
  394. package/src/schema/piechart.gen.ts +146 -0
  395. package/src/schema/prometheus.gen.ts +2 -1
  396. package/src/schema/stat.gen.ts +2 -1
  397. package/src/schema/statetimeline.gen.ts +143 -0
  398. package/src/schema/statushistory.gen.ts +132 -0
  399. package/src/schema/table.gen.ts +27 -4
  400. package/src/schema/tempo.gen.ts +2 -1
  401. package/src/schema/text.gen.ts +2 -1
  402. package/src/schema/timeseries.gen.ts +7 -2
  403. package/src/schema/trend.gen.ts +208 -0
  404. package/src/schema/xychart.gen.ts +167 -0
  405. package/src/schema-overlay.test.ts +282 -0
  406. package/src/schema-validate.ts +141 -50
  407. package/src/schema.test.ts +4 -2
  408. package/src/serializer.test.ts +13 -1
  409. package/src/serializer.ts +11 -3
  410. package/src/skill-defs.ts +17 -0
  411. package/src/skills/chant-grafana-alerting.md +49 -0
  412. package/src/skills/chant-grafana-provisioning.md +3 -3
  413. package/src/skills/chant-grafana.md +12 -6
  414. package/src/spec/fetch-cli.ts +3 -3
  415. package/src/spec/fetch-units-cli.ts +37 -0
  416. package/src/spec/overlay/canvas.overlay.json +142 -0
  417. package/src/spec/overlay/dashboard.overlay.json +378 -0
  418. package/src/spec/overlay/expr.overlay.json +14 -0
  419. package/src/spec/overlay/geomap.overlay.json +35 -0
  420. package/src/spec/overlay/logs.overlay.json +14 -0
  421. package/src/spec/overlay/nodegraph.overlay.json +31 -0
  422. package/src/spec/overlay/piechart.overlay.json +17 -0
  423. package/src/spec/overlay/table.overlay.json +84 -0
  424. package/src/spec/overlay/timeseries.overlay.json +21 -0
  425. package/src/spec/overlay/trend.overlay.json +17 -0
  426. package/src/spec/overlay/xychart.overlay.json +16 -0
  427. package/src/spec/overlay.ts +105 -0
  428. package/src/spec/schemas/barchart.jsonschema.json +419 -0
  429. package/src/spec/schemas/bargauge.jsonschema.json +224 -0
  430. package/src/spec/schemas/canvas.jsonschema.json +356 -0
  431. package/src/spec/schemas/dashboardv2.jsonschema.json +3387 -0
  432. package/src/spec/schemas/expr.jsonschema.json +987 -0
  433. package/src/spec/schemas/geomap.jsonschema.json +220 -0
  434. package/src/spec/schemas/histogram.jsonschema.json +308 -0
  435. package/src/spec/schemas/nodegraph.jsonschema.json +77 -0
  436. package/src/spec/schemas/piechart.jsonschema.json +275 -0
  437. package/src/spec/schemas/statetimeline.jsonschema.json +324 -0
  438. package/src/spec/schemas/statushistory.jsonschema.json +292 -0
  439. package/src/spec/schemas/trend.jsonschema.json +449 -0
  440. package/src/spec/schemas/xychart.jsonschema.json +428 -0
  441. package/src/spec/schemas.ts +22 -10
  442. package/src/spec/units.gen.ts +281 -0
  443. package/src/spec/units.ts +77 -0
  444. package/src/transformations.test.ts +65 -0
  445. package/src/transformations.ts +574 -0
  446. package/src/util.ts +8 -0
  447. package/src/validate-alerting.test.ts +255 -0
  448. package/src/validate-alerting.ts +428 -0
  449. package/src/validate-output.ts +332 -101
  450. package/src/validate.ts +14 -0
  451. package/src/variables.ts +7 -2
@@ -0,0 +1,3387 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "definitions": {
4
+ "Dashboard": {
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "annotations",
9
+ "cursorSync",
10
+ "elements",
11
+ "layout",
12
+ "links",
13
+ "preload",
14
+ "tags",
15
+ "timeSettings",
16
+ "title",
17
+ "variables"
18
+ ],
19
+ "properties": {
20
+ "annotations": {
21
+ "type": "array",
22
+ "items": {
23
+ "$ref": "#/definitions/AnnotationQueryKind"
24
+ }
25
+ },
26
+ "cursorSync": {
27
+ "$ref": "#/definitions/DashboardCursorSync",
28
+ "description": "Configuration of dashboard cursor sync behavior.\n\"Off\" for no shared crosshair or tooltip (default).\n\"Crosshair\" for shared crosshair.\n\"Tooltip\" for shared crosshair AND shared tooltip.",
29
+ "default": "Off"
30
+ },
31
+ "description": {
32
+ "type": "string",
33
+ "description": "Description of dashboard."
34
+ },
35
+ "editable": {
36
+ "type": "boolean",
37
+ "description": "Whether a dashboard is editable or not.",
38
+ "default": true
39
+ },
40
+ "elements": {
41
+ "type": "object",
42
+ "additionalProperties": {
43
+ "$ref": "#/definitions/Element"
44
+ }
45
+ },
46
+ "layout": {
47
+ "oneOf": [
48
+ {
49
+ "$ref": "#/definitions/GridLayoutKind"
50
+ },
51
+ {
52
+ "$ref": "#/definitions/RowsLayoutKind"
53
+ },
54
+ {
55
+ "$ref": "#/definitions/AutoGridLayoutKind"
56
+ },
57
+ {
58
+ "$ref": "#/definitions/TabsLayoutKind"
59
+ }
60
+ ]
61
+ },
62
+ "links": {
63
+ "type": "array",
64
+ "items": {
65
+ "$ref": "#/definitions/DashboardLink"
66
+ },
67
+ "description": "Links with references to other dashboards or external websites."
68
+ },
69
+ "liveNow": {
70
+ "type": "boolean",
71
+ "description": "When set to true, the dashboard will redraw panels at an interval matching the pixel width.\nThis will keep data \"moving left\" regardless of the query refresh rate. This setting helps\navoid dashboards presenting stale live data."
72
+ },
73
+ "preload": {
74
+ "type": "boolean",
75
+ "description": "When set to true, the dashboard will load all panels in the dashboard when it's loaded.",
76
+ "default": false
77
+ },
78
+ "revision": {
79
+ "type": "integer",
80
+ "description": "Plugins only. The version of the dashboard installed together with the plugin.\nThis is used to determine if the dashboard should be updated when the plugin is updated."
81
+ },
82
+ "tags": {
83
+ "type": "array",
84
+ "items": {
85
+ "type": "string"
86
+ },
87
+ "description": "Tags associated with dashboard."
88
+ },
89
+ "timeSettings": {
90
+ "$ref": "#/definitions/TimeSettingsSpec"
91
+ },
92
+ "title": {
93
+ "type": "string",
94
+ "description": "Title of dashboard."
95
+ },
96
+ "variables": {
97
+ "type": "array",
98
+ "items": {
99
+ "$ref": "#/definitions/VariableKind"
100
+ },
101
+ "description": "Configured template variables."
102
+ },
103
+ "preferences": {
104
+ "$ref": "#/definitions/Preferences"
105
+ }
106
+ }
107
+ },
108
+ "AnnotationQueryKind": {
109
+ "type": "object",
110
+ "additionalProperties": false,
111
+ "required": [
112
+ "kind",
113
+ "spec"
114
+ ],
115
+ "properties": {
116
+ "kind": {
117
+ "type": "string",
118
+ "const": "AnnotationQuery"
119
+ },
120
+ "spec": {
121
+ "$ref": "#/definitions/AnnotationQuerySpec"
122
+ }
123
+ }
124
+ },
125
+ "AnnotationQuerySpec": {
126
+ "type": "object",
127
+ "additionalProperties": false,
128
+ "required": [
129
+ "query",
130
+ "enable",
131
+ "hide",
132
+ "iconColor",
133
+ "name"
134
+ ],
135
+ "properties": {
136
+ "query": {
137
+ "$ref": "#/definitions/DataQueryKind"
138
+ },
139
+ "enable": {
140
+ "type": "boolean"
141
+ },
142
+ "hide": {
143
+ "type": "boolean"
144
+ },
145
+ "iconColor": {
146
+ "type": "string"
147
+ },
148
+ "name": {
149
+ "type": "string"
150
+ },
151
+ "builtIn": {
152
+ "type": "boolean",
153
+ "default": false
154
+ },
155
+ "filter": {
156
+ "$ref": "#/definitions/AnnotationPanelFilter"
157
+ },
158
+ "placement": {
159
+ "anyOf": [
160
+ {
161
+ "$ref": "#/definitions/AnnotationQueryPlacement"
162
+ },
163
+ {
164
+ "type": "null"
165
+ }
166
+ ],
167
+ "description": "Placement can be used to display the annotation query somewhere else on the dashboard other than the default location."
168
+ },
169
+ "mappings": {
170
+ "type": "object",
171
+ "additionalProperties": {
172
+ "$ref": "#/definitions/AnnotationEventFieldMapping"
173
+ },
174
+ "description": "Mappings define how to convert data frame fields to annotation event fields."
175
+ },
176
+ "legacyOptions": {
177
+ "type": "object",
178
+ "additionalProperties": {
179
+ "type": "object",
180
+ "additionalProperties": {}
181
+ },
182
+ "description": "Catch-all field for datasource-specific properties. Should not be available in as code tooling."
183
+ }
184
+ }
185
+ },
186
+ "DataQueryKind": {
187
+ "type": "object",
188
+ "additionalProperties": false,
189
+ "required": [
190
+ "kind",
191
+ "group",
192
+ "version",
193
+ "spec"
194
+ ],
195
+ "properties": {
196
+ "kind": {
197
+ "type": "string",
198
+ "const": "DataQuery"
199
+ },
200
+ "group": {
201
+ "type": "string"
202
+ },
203
+ "version": {
204
+ "type": "string",
205
+ "default": "v0"
206
+ },
207
+ "labels": {
208
+ "type": "object",
209
+ "additionalProperties": {
210
+ "type": "string"
211
+ }
212
+ },
213
+ "datasource": {
214
+ "type": "object",
215
+ "additionalProperties": false,
216
+ "properties": {
217
+ "name": {
218
+ "type": "string"
219
+ }
220
+ },
221
+ "description": "New type for datasource reference\nNot creating a new type until we figure out how to handle DS refs for group by, adhoc, and every place that uses DataSourceRef in TS."
222
+ },
223
+ "spec": {
224
+ "anyOf": [
225
+ {
226
+ "type": "object",
227
+ "additionalProperties": {}
228
+ },
229
+ {
230
+ "type": "null"
231
+ }
232
+ ]
233
+ }
234
+ }
235
+ },
236
+ "AnnotationPanelFilter": {
237
+ "type": "object",
238
+ "additionalProperties": false,
239
+ "required": [
240
+ "ids"
241
+ ],
242
+ "properties": {
243
+ "exclude": {
244
+ "type": "boolean",
245
+ "description": "Should the specified panels be included or excluded",
246
+ "default": false
247
+ },
248
+ "ids": {
249
+ "type": "array",
250
+ "items": {
251
+ "type": "integer"
252
+ },
253
+ "description": "Panel IDs that should be included or excluded"
254
+ }
255
+ }
256
+ },
257
+ "AnnotationQueryPlacement": {
258
+ "enum": [
259
+ "inControlsMenu"
260
+ ],
261
+ "type": "string",
262
+ "description": "Annotation Query placement. Defines where the annotation query should be displayed.\n- \"inControlsMenu\" renders the annotation query in the dashboard controls dropdown menu"
263
+ },
264
+ "AnnotationEventFieldMapping": {
265
+ "type": "object",
266
+ "additionalProperties": false,
267
+ "properties": {
268
+ "source": {
269
+ "type": "string",
270
+ "description": "Source type for the field value",
271
+ "default": "field"
272
+ },
273
+ "value": {
274
+ "type": "string",
275
+ "description": "Constant value to use when source is \"text\""
276
+ },
277
+ "regex": {
278
+ "type": "string",
279
+ "description": "Regular expression to apply to the field value"
280
+ }
281
+ },
282
+ "description": "Annotation event field mapping. Defines how to map a data frame field to an annotation event field."
283
+ },
284
+ "DashboardCursorSync": {
285
+ "enum": [
286
+ "Crosshair",
287
+ "Tooltip",
288
+ "Off"
289
+ ],
290
+ "type": "string",
291
+ "description": "\"Off\" for no shared crosshair or tooltip (default).\n\"Crosshair\" for shared crosshair.\n\"Tooltip\" for shared crosshair AND shared tooltip."
292
+ },
293
+ "Element": {
294
+ "oneOf": [
295
+ {
296
+ "$ref": "#/definitions/PanelKind"
297
+ },
298
+ {
299
+ "$ref": "#/definitions/LibraryPanelKind"
300
+ }
301
+ ],
302
+ "description": "Supported dashboard elements\n|* more element types in the future"
303
+ },
304
+ "PanelKind": {
305
+ "type": "object",
306
+ "additionalProperties": false,
307
+ "required": [
308
+ "kind",
309
+ "spec"
310
+ ],
311
+ "properties": {
312
+ "kind": {
313
+ "type": "string",
314
+ "const": "Panel"
315
+ },
316
+ "spec": {
317
+ "$ref": "#/definitions/PanelSpec"
318
+ }
319
+ }
320
+ },
321
+ "PanelSpec": {
322
+ "type": "object",
323
+ "additionalProperties": false,
324
+ "required": [
325
+ "id",
326
+ "title",
327
+ "description",
328
+ "links",
329
+ "data",
330
+ "vizConfig"
331
+ ],
332
+ "properties": {
333
+ "id": {
334
+ "type": "number"
335
+ },
336
+ "title": {
337
+ "type": "string"
338
+ },
339
+ "description": {
340
+ "type": "string"
341
+ },
342
+ "links": {
343
+ "type": "array",
344
+ "items": {
345
+ "$ref": "#/definitions/DataLink"
346
+ }
347
+ },
348
+ "data": {
349
+ "$ref": "#/definitions/QueryGroupKind"
350
+ },
351
+ "vizConfig": {
352
+ "$ref": "#/definitions/VizConfigKind"
353
+ },
354
+ "transparent": {
355
+ "type": "boolean"
356
+ }
357
+ }
358
+ },
359
+ "DataLink": {
360
+ "type": "object",
361
+ "additionalProperties": false,
362
+ "required": [
363
+ "title",
364
+ "url"
365
+ ],
366
+ "properties": {
367
+ "title": {
368
+ "type": "string"
369
+ },
370
+ "url": {
371
+ "type": "string"
372
+ },
373
+ "targetBlank": {
374
+ "type": "boolean"
375
+ }
376
+ }
377
+ },
378
+ "QueryGroupKind": {
379
+ "type": "object",
380
+ "additionalProperties": false,
381
+ "required": [
382
+ "kind",
383
+ "spec"
384
+ ],
385
+ "properties": {
386
+ "kind": {
387
+ "type": "string",
388
+ "const": "QueryGroup"
389
+ },
390
+ "spec": {
391
+ "$ref": "#/definitions/QueryGroupSpec"
392
+ }
393
+ }
394
+ },
395
+ "QueryGroupSpec": {
396
+ "type": "object",
397
+ "additionalProperties": false,
398
+ "required": [
399
+ "queries",
400
+ "transformations",
401
+ "queryOptions"
402
+ ],
403
+ "properties": {
404
+ "queries": {
405
+ "type": "array",
406
+ "items": {
407
+ "$ref": "#/definitions/PanelQueryKind"
408
+ }
409
+ },
410
+ "transformations": {
411
+ "type": "array",
412
+ "items": {
413
+ "$ref": "#/definitions/TransformationKind"
414
+ }
415
+ },
416
+ "queryOptions": {
417
+ "$ref": "#/definitions/QueryOptionsSpec"
418
+ }
419
+ }
420
+ },
421
+ "PanelQueryKind": {
422
+ "type": "object",
423
+ "additionalProperties": false,
424
+ "required": [
425
+ "kind",
426
+ "spec"
427
+ ],
428
+ "properties": {
429
+ "kind": {
430
+ "type": "string",
431
+ "const": "PanelQuery"
432
+ },
433
+ "spec": {
434
+ "$ref": "#/definitions/PanelQuerySpec"
435
+ }
436
+ }
437
+ },
438
+ "PanelQuerySpec": {
439
+ "type": "object",
440
+ "additionalProperties": false,
441
+ "required": [
442
+ "query",
443
+ "refId",
444
+ "hidden"
445
+ ],
446
+ "properties": {
447
+ "query": {
448
+ "$ref": "#/definitions/DataQueryKind"
449
+ },
450
+ "refId": {
451
+ "type": "string"
452
+ },
453
+ "hidden": {
454
+ "type": "boolean"
455
+ }
456
+ }
457
+ },
458
+ "TransformationKind": {
459
+ "type": "object",
460
+ "additionalProperties": false,
461
+ "required": [
462
+ "kind",
463
+ "group",
464
+ "spec"
465
+ ],
466
+ "properties": {
467
+ "kind": {
468
+ "type": "string",
469
+ "const": "Transformation"
470
+ },
471
+ "group": {
472
+ "type": "string",
473
+ "description": "The group is the transformation ID"
474
+ },
475
+ "spec": {
476
+ "$ref": "#/definitions/TransformationSpec"
477
+ }
478
+ }
479
+ },
480
+ "TransformationSpec": {
481
+ "type": "object",
482
+ "additionalProperties": false,
483
+ "required": [
484
+ "options"
485
+ ],
486
+ "properties": {
487
+ "disabled": {
488
+ "type": "boolean",
489
+ "description": "Disabled transformations are skipped"
490
+ },
491
+ "filter": {
492
+ "$ref": "#/definitions/MatcherConfig",
493
+ "description": "Optional frame matcher. When missing it will be applied to all results"
494
+ },
495
+ "topic": {
496
+ "$ref": "#/definitions/DataTopic",
497
+ "description": "Where to pull DataFrames from as input to transformation"
498
+ },
499
+ "options": {
500
+ "type": "object",
501
+ "additionalProperties": {},
502
+ "description": "Options to be passed to the transformer\nValid options depend on the transformer id"
503
+ }
504
+ },
505
+ "description": "Transformations allow to manipulate data returned by a query before the system applies a visualization.\nUsing transformations you can: rename fields, join time series data, perform mathematical operations across queries,\nuse the output of one transformation as the input to another transformation, etc."
506
+ },
507
+ "MatcherConfig": {
508
+ "type": "object",
509
+ "additionalProperties": false,
510
+ "required": [
511
+ "id"
512
+ ],
513
+ "properties": {
514
+ "id": {
515
+ "type": "string",
516
+ "description": "The matcher id. This is used to find the matcher implementation from registry.",
517
+ "default": ""
518
+ },
519
+ "scope": {
520
+ "$ref": "#/definitions/MatcherScope",
521
+ "description": "If set, limits this matcher to fields of that type. If not set, \"series\" mode is used."
522
+ },
523
+ "options": {
524
+ "type": "object",
525
+ "additionalProperties": {},
526
+ "description": "The matcher options. This is specific to the matcher implementation."
527
+ }
528
+ },
529
+ "description": "Matcher is a predicate configuration. Based on the config a set of field(s) or values is filtered in order to apply override / transformation.\nIt comes with in id ( to resolve implementation from registry) and a configuration that’s specific to a particular matcher type."
530
+ },
531
+ "MatcherScope": {
532
+ "enum": [
533
+ "series",
534
+ "nested",
535
+ "annotation",
536
+ "exemplar"
537
+ ],
538
+ "type": "string"
539
+ },
540
+ "DataTopic": {
541
+ "enum": [
542
+ "series",
543
+ "annotations",
544
+ "alertStates"
545
+ ],
546
+ "type": "string",
547
+ "description": "A topic is attached to DataFrame metadata in query results.\nThis specifies where the data should be used."
548
+ },
549
+ "QueryOptionsSpec": {
550
+ "type": "object",
551
+ "additionalProperties": false,
552
+ "properties": {
553
+ "timeFrom": {
554
+ "type": "string"
555
+ },
556
+ "maxDataPoints": {
557
+ "type": "integer"
558
+ },
559
+ "timeShift": {
560
+ "type": "string"
561
+ },
562
+ "queryCachingTTL": {
563
+ "type": "integer"
564
+ },
565
+ "interval": {
566
+ "type": "string"
567
+ },
568
+ "cacheTimeout": {
569
+ "type": "string"
570
+ },
571
+ "hideTimeOverride": {
572
+ "type": "boolean"
573
+ },
574
+ "timeCompare": {
575
+ "type": "string"
576
+ }
577
+ }
578
+ },
579
+ "VizConfigKind": {
580
+ "type": "object",
581
+ "additionalProperties": false,
582
+ "required": [
583
+ "kind",
584
+ "group",
585
+ "version",
586
+ "spec"
587
+ ],
588
+ "properties": {
589
+ "kind": {
590
+ "type": "string",
591
+ "const": "VizConfig"
592
+ },
593
+ "group": {
594
+ "type": "string",
595
+ "description": "The group is the plugin ID"
596
+ },
597
+ "version": {
598
+ "type": "string"
599
+ },
600
+ "spec": {
601
+ "$ref": "#/definitions/VizConfigSpec"
602
+ }
603
+ }
604
+ },
605
+ "VizConfigSpec": {
606
+ "type": "object",
607
+ "additionalProperties": false,
608
+ "required": [
609
+ "options",
610
+ "fieldConfig"
611
+ ],
612
+ "properties": {
613
+ "options": {
614
+ "anyOf": [
615
+ {
616
+ "type": "object",
617
+ "additionalProperties": {}
618
+ },
619
+ {
620
+ "type": "null"
621
+ }
622
+ ]
623
+ },
624
+ "fieldConfig": {
625
+ "$ref": "#/definitions/FieldConfigSource"
626
+ }
627
+ },
628
+ "description": "--- Kinds ---"
629
+ },
630
+ "FieldConfigSource": {
631
+ "type": "object",
632
+ "additionalProperties": false,
633
+ "required": [
634
+ "defaults",
635
+ "overrides"
636
+ ],
637
+ "properties": {
638
+ "defaults": {
639
+ "$ref": "#/definitions/FieldConfig",
640
+ "description": "Defaults are the options applied to all fields."
641
+ },
642
+ "overrides": {
643
+ "type": "array",
644
+ "items": {
645
+ "type": "object",
646
+ "additionalProperties": false,
647
+ "required": [
648
+ "matcher",
649
+ "properties"
650
+ ],
651
+ "properties": {
652
+ "__systemRef": {
653
+ "type": "string"
654
+ },
655
+ "matcher": {
656
+ "$ref": "#/definitions/MatcherConfig"
657
+ },
658
+ "properties": {
659
+ "type": "array",
660
+ "items": {
661
+ "$ref": "#/definitions/DynamicConfigValue"
662
+ }
663
+ }
664
+ }
665
+ },
666
+ "description": "Overrides are the options applied to specific fields overriding the defaults."
667
+ }
668
+ },
669
+ "description": "The data model used in Grafana, namely the data frame, is a columnar-oriented table structure that unifies both time series and table query results.\nEach column within this structure is called a field. A field can represent a single time series or table column.\nField options allow you to change how the data is displayed in your visualizations."
670
+ },
671
+ "FieldConfig": {
672
+ "type": "object",
673
+ "additionalProperties": false,
674
+ "properties": {
675
+ "displayName": {
676
+ "type": "string",
677
+ "description": "The display value for this field. This supports template variables blank is auto"
678
+ },
679
+ "displayNameFromDS": {
680
+ "type": "string",
681
+ "description": "This can be used by data sources that return and explicit naming structure for values and labels\nWhen this property is configured, this value is used rather than the default naming strategy."
682
+ },
683
+ "description": {
684
+ "type": "string",
685
+ "description": "Human readable field metadata"
686
+ },
687
+ "path": {
688
+ "type": "string",
689
+ "description": "An explicit path to the field in the datasource. When the frame meta includes a path,\nThis will default to `${frame.meta.path}/${field.name}\n\nWhen defined, this value can be used as an identifier within the datasource scope, and\nmay be used to update the results"
690
+ },
691
+ "writeable": {
692
+ "type": "boolean",
693
+ "description": "True if data source can write a value to the path. Auth/authz are supported separately"
694
+ },
695
+ "filterable": {
696
+ "type": "boolean",
697
+ "description": "True if data source field supports ad-hoc filters"
698
+ },
699
+ "unit": {
700
+ "type": "string",
701
+ "description": "Unit a field should use. The unit you select is applied to all fields except time.\nYou can use the units ID available in Grafana or a custom unit.\nAvailable units in Grafana: https://github.com/grafana/grafana/blob/main/packages/grafana-data/src/valueFormats/categories.ts\nAs custom unit, you can use the following formats:\n`suffix:\u003csuffix\u003e` for custom unit that should go after value.\n`prefix:\u003cprefix\u003e` for custom unit that should go before value.\n`time:\u003cformat\u003e` For custom date time formats type for example `time:YYYY-MM-DD`.\n`si:\u003cbase scale\u003e\u003cunit characters\u003e` for custom SI units. For example: `si: mF`. This one is a bit more advanced as you can specify both a unit and the source data scale. So if your source data is represented as milli (thousands of) something prefix the unit with that SI scale character.\n`count:\u003cunit\u003e` for a custom count unit.\n`currency:\u003cunit\u003e` for custom a currency unit."
702
+ },
703
+ "decimals": {
704
+ "type": "number",
705
+ "description": "Specify the number of decimals Grafana includes in the rendered value.\nIf you leave this field blank, Grafana automatically truncates the number of decimals based on the value.\nFor example 1.1234 will display as 1.12 and 100.456 will display as 100.\nTo display all decimals, set the unit to `String`."
706
+ },
707
+ "min": {
708
+ "type": "number",
709
+ "description": "The minimum value used in percentage threshold calculations. Leave blank for auto calculation based on all series and fields."
710
+ },
711
+ "max": {
712
+ "type": "number",
713
+ "description": "The maximum value used in percentage threshold calculations. Leave blank for auto calculation based on all series and fields."
714
+ },
715
+ "mappings": {
716
+ "type": "array",
717
+ "items": {
718
+ "$ref": "#/definitions/ValueMapping"
719
+ },
720
+ "description": "Convert input values into a display string"
721
+ },
722
+ "thresholds": {
723
+ "$ref": "#/definitions/ThresholdsConfig",
724
+ "description": "Map numeric values to states"
725
+ },
726
+ "color": {
727
+ "$ref": "#/definitions/FieldColor",
728
+ "description": "Panel color configuration"
729
+ },
730
+ "links": {
731
+ "type": "array",
732
+ "items": {
733
+ "type": "object",
734
+ "additionalProperties": {}
735
+ },
736
+ "description": "The behavior when clicking on a result"
737
+ },
738
+ "actions": {
739
+ "type": "array",
740
+ "items": {
741
+ "$ref": "#/definitions/Action"
742
+ },
743
+ "description": "Define interactive HTTP requests that can be triggered from data visualizations."
744
+ },
745
+ "noValue": {
746
+ "type": "string",
747
+ "description": "Alternative to empty string"
748
+ },
749
+ "custom": {
750
+ "anyOf": [
751
+ {
752
+ "type": "object",
753
+ "additionalProperties": {}
754
+ },
755
+ {
756
+ "type": "null"
757
+ }
758
+ ],
759
+ "description": "custom is specified by the FieldConfig field\nin panel plugin schemas."
760
+ },
761
+ "fieldMinMax": {
762
+ "type": "boolean",
763
+ "description": "Calculate min max per field"
764
+ },
765
+ "nullValueMode": {
766
+ "$ref": "#/definitions/NullValueMode",
767
+ "description": "How null values should be handled when calculating field stats\n\"null\" - Include null values, \"connected\" - Ignore nulls, \"null as zero\" - Treat nulls as zero"
768
+ }
769
+ },
770
+ "description": "The data model used in Grafana, namely the data frame, is a columnar-oriented table structure that unifies both time series and table query results.\nEach column within this structure is called a field. A field can represent a single time series or table column.\nField options allow you to change how the data is displayed in your visualizations."
771
+ },
772
+ "ValueMapping": {
773
+ "oneOf": [
774
+ {
775
+ "$ref": "#/definitions/ValueMap"
776
+ },
777
+ {
778
+ "$ref": "#/definitions/RangeMap"
779
+ },
780
+ {
781
+ "$ref": "#/definitions/RegexMap"
782
+ },
783
+ {
784
+ "$ref": "#/definitions/SpecialValueMap"
785
+ }
786
+ ]
787
+ },
788
+ "ValueMap": {
789
+ "type": "object",
790
+ "additionalProperties": false,
791
+ "required": [
792
+ "type",
793
+ "options"
794
+ ],
795
+ "properties": {
796
+ "type": {
797
+ "allOf": [
798
+ {
799
+ "$ref": "#/definitions/MappingType"
800
+ }
801
+ ],
802
+ "default": "value"
803
+ },
804
+ "options": {
805
+ "type": "object",
806
+ "additionalProperties": {
807
+ "$ref": "#/definitions/ValueMappingResult"
808
+ },
809
+ "description": "Map with \u003cvalue_to_match\u003e: ValueMappingResult. For example: { \"10\": { text: \"Perfection!\", color: \"green\" } }"
810
+ }
811
+ },
812
+ "description": "Maps text values to a color or different display text and color.\nFor example, you can configure a value mapping so that all instances of the value 10 appear as Perfection! rather than the number."
813
+ },
814
+ "MappingType": {
815
+ "enum": [
816
+ "value",
817
+ "range",
818
+ "regex",
819
+ "special"
820
+ ],
821
+ "type": "string",
822
+ "description": "Supported value mapping types\n`value`: Maps text values to a color or different display text and color. For example, you can configure a value mapping so that all instances of the value 10 appear as Perfection! rather than the number.\n`range`: Maps numerical ranges to a display text and color. For example, if a value is within a certain range, you can configure a range value mapping to display Low or High rather than the number.\n`regex`: Maps regular expressions to replacement text and a color. For example, if a value is www.example.com, you can configure a regex value mapping so that Grafana displays www and truncates the domain.\n`special`: Maps special values like Null, NaN (not a number), and boolean values like true and false to a display text and color. See SpecialValueMatch to see the list of special values. For example, you can configure a special value mapping so that null values appear as N/A."
823
+ },
824
+ "ValueMappingResult": {
825
+ "type": "object",
826
+ "additionalProperties": false,
827
+ "properties": {
828
+ "text": {
829
+ "type": "string",
830
+ "description": "Text to display when the value matches"
831
+ },
832
+ "color": {
833
+ "type": "string",
834
+ "description": "Text to use when the value matches"
835
+ },
836
+ "icon": {
837
+ "type": "string",
838
+ "description": "Icon to display when the value matches. Only specific visualizations."
839
+ },
840
+ "index": {
841
+ "type": "integer",
842
+ "description": "Position in the mapping array. Only used internally."
843
+ }
844
+ },
845
+ "description": "Result used as replacement with text and color when the value matches"
846
+ },
847
+ "RangeMap": {
848
+ "type": "object",
849
+ "additionalProperties": false,
850
+ "required": [
851
+ "type",
852
+ "options"
853
+ ],
854
+ "properties": {
855
+ "type": {
856
+ "allOf": [
857
+ {
858
+ "$ref": "#/definitions/MappingType"
859
+ }
860
+ ],
861
+ "default": "range"
862
+ },
863
+ "options": {
864
+ "type": "object",
865
+ "additionalProperties": false,
866
+ "required": [
867
+ "from",
868
+ "to",
869
+ "result"
870
+ ],
871
+ "properties": {
872
+ "from": {
873
+ "anyOf": [
874
+ {
875
+ "type": "number"
876
+ },
877
+ {
878
+ "type": "null"
879
+ }
880
+ ],
881
+ "description": "Min value of the range. It can be null which means -Infinity"
882
+ },
883
+ "to": {
884
+ "anyOf": [
885
+ {
886
+ "type": "number"
887
+ },
888
+ {
889
+ "type": "null"
890
+ }
891
+ ],
892
+ "description": "Max value of the range. It can be null which means +Infinity"
893
+ },
894
+ "result": {
895
+ "$ref": "#/definitions/ValueMappingResult",
896
+ "description": "Config to apply when the value is within the range"
897
+ }
898
+ },
899
+ "description": "Range to match against and the result to apply when the value is within the range"
900
+ }
901
+ },
902
+ "description": "Maps numerical ranges to a display text and color.\nFor example, if a value is within a certain range, you can configure a range value mapping to display Low or High rather than the number."
903
+ },
904
+ "RegexMap": {
905
+ "type": "object",
906
+ "additionalProperties": false,
907
+ "required": [
908
+ "type",
909
+ "options"
910
+ ],
911
+ "properties": {
912
+ "type": {
913
+ "allOf": [
914
+ {
915
+ "$ref": "#/definitions/MappingType"
916
+ }
917
+ ],
918
+ "default": "regex"
919
+ },
920
+ "options": {
921
+ "type": "object",
922
+ "additionalProperties": false,
923
+ "required": [
924
+ "pattern",
925
+ "result"
926
+ ],
927
+ "properties": {
928
+ "pattern": {
929
+ "type": "string",
930
+ "description": "Regular expression to match against"
931
+ },
932
+ "result": {
933
+ "$ref": "#/definitions/ValueMappingResult",
934
+ "description": "Config to apply when the value matches the regex"
935
+ }
936
+ },
937
+ "description": "Regular expression to match against and the result to apply when the value matches the regex"
938
+ }
939
+ },
940
+ "description": "Maps regular expressions to replacement text and a color.\nFor example, if a value is www.example.com, you can configure a regex value mapping so that Grafana displays www and truncates the domain."
941
+ },
942
+ "SpecialValueMap": {
943
+ "type": "object",
944
+ "additionalProperties": false,
945
+ "required": [
946
+ "type",
947
+ "options"
948
+ ],
949
+ "properties": {
950
+ "type": {
951
+ "allOf": [
952
+ {
953
+ "$ref": "#/definitions/MappingType"
954
+ }
955
+ ],
956
+ "default": "special"
957
+ },
958
+ "options": {
959
+ "type": "object",
960
+ "additionalProperties": false,
961
+ "required": [
962
+ "match",
963
+ "result"
964
+ ],
965
+ "properties": {
966
+ "match": {
967
+ "$ref": "#/definitions/SpecialValueMatch",
968
+ "description": "Special value to match against"
969
+ },
970
+ "result": {
971
+ "$ref": "#/definitions/ValueMappingResult",
972
+ "description": "Config to apply when the value matches the special value"
973
+ }
974
+ }
975
+ }
976
+ },
977
+ "description": "Maps special values like Null, NaN (not a number), and boolean values like true and false to a display text and color.\nSee SpecialValueMatch to see the list of special values.\nFor example, you can configure a special value mapping so that null values appear as N/A."
978
+ },
979
+ "SpecialValueMatch": {
980
+ "enum": [
981
+ "true",
982
+ "false",
983
+ "null",
984
+ "nan",
985
+ "null+nan",
986
+ "empty"
987
+ ],
988
+ "type": "string",
989
+ "description": "Special value types supported by the `SpecialValueMap`"
990
+ },
991
+ "ThresholdsConfig": {
992
+ "type": "object",
993
+ "additionalProperties": false,
994
+ "required": [
995
+ "mode",
996
+ "steps"
997
+ ],
998
+ "properties": {
999
+ "mode": {
1000
+ "$ref": "#/definitions/ThresholdsMode"
1001
+ },
1002
+ "steps": {
1003
+ "type": "array",
1004
+ "items": {
1005
+ "$ref": "#/definitions/Threshold"
1006
+ }
1007
+ }
1008
+ }
1009
+ },
1010
+ "ThresholdsMode": {
1011
+ "enum": [
1012
+ "absolute",
1013
+ "percentage"
1014
+ ],
1015
+ "type": "string"
1016
+ },
1017
+ "Threshold": {
1018
+ "type": "object",
1019
+ "additionalProperties": false,
1020
+ "required": [
1021
+ "value",
1022
+ "color"
1023
+ ],
1024
+ "properties": {
1025
+ "value": {
1026
+ "anyOf": [
1027
+ {
1028
+ "type": "number"
1029
+ },
1030
+ {
1031
+ "type": "null"
1032
+ }
1033
+ ],
1034
+ "description": "Value null means -Infinity"
1035
+ },
1036
+ "color": {
1037
+ "type": "string"
1038
+ }
1039
+ }
1040
+ },
1041
+ "FieldColor": {
1042
+ "type": "object",
1043
+ "additionalProperties": false,
1044
+ "required": [
1045
+ "mode"
1046
+ ],
1047
+ "properties": {
1048
+ "mode": {
1049
+ "$ref": "#/definitions/FieldColorModeId",
1050
+ "description": "The main color scheme mode."
1051
+ },
1052
+ "fixedColor": {
1053
+ "type": "string",
1054
+ "description": "The fixed color value for fixed or shades color modes."
1055
+ },
1056
+ "seriesBy": {
1057
+ "$ref": "#/definitions/FieldColorSeriesByMode",
1058
+ "description": "Some visualizations need to know how to assign a series color from by value color schemes."
1059
+ }
1060
+ },
1061
+ "description": "Map a field to a color."
1062
+ },
1063
+ "FieldColorModeId": {
1064
+ "enum": [
1065
+ "thresholds",
1066
+ "palette-classic",
1067
+ "palette-classic-by-name",
1068
+ "continuous-viridis",
1069
+ "continuous-magma",
1070
+ "continuous-plasma",
1071
+ "continuous-inferno",
1072
+ "continuous-cividis",
1073
+ "continuous-GrYlRd",
1074
+ "continuous-RdYlGr",
1075
+ "continuous-BlYlRd",
1076
+ "continuous-YlRd",
1077
+ "continuous-BlPu",
1078
+ "continuous-YlBl",
1079
+ "continuous-blues",
1080
+ "continuous-reds",
1081
+ "continuous-greens",
1082
+ "continuous-purples",
1083
+ "fixed",
1084
+ "shades"
1085
+ ],
1086
+ "type": "string",
1087
+ "description": "Color mode for a field. You can specify a single color, or select a continuous (gradient) color schemes, based on a value.\nContinuous color interpolates a color using the percentage of a value relative to min and max.\nAccepted values are:\n`thresholds`: From thresholds. Informs Grafana to take the color from the matching threshold\n`palette-classic`: Classic palette. Grafana will assign color by looking up a color in a palette by series index. Useful for Graphs and pie charts and other categorical data visualizations\n`palette-classic-by-name`: Classic palette (by name). Grafana will assign color by looking up a color in a palette by series name. Useful for Graphs and pie charts and other categorical data visualizations\n`continuous-viridis`: Continuous Viridis palette mode\n`continuous-magma`: Continuous Magma palette mode\n`continuous-plasma`: Continuous Plasma palette mode\n`continuous-inferno`: Continuous Inferno palette mode\n`continuous-cividis`: Continuous Cividis palette mode\n`continuous-GrYlRd`: Continuous Green-Yellow-Red palette mode\n`continuous-RdYlGr`: Continuous Red-Yellow-Green palette mode\n`continuous-BlYlRd`: Continuous Blue-Yellow-Red palette mode\n`continuous-YlRd`: Continuous Yellow-Red palette mode\n`continuous-BlPu`: Continuous Blue-Purple palette mode\n`continuous-YlBl`: Continuous Yellow-Blue palette mode\n`continuous-blues`: Continuous Blue palette mode\n`continuous-reds`: Continuous Red palette mode\n`continuous-greens`: Continuous Green palette mode\n`continuous-purples`: Continuous Purple palette mode\n`shades`: Shades of a single color. Specify a single color, useful in an override rule.\n`fixed`: Fixed color mode. Specify a single color, useful in an override rule."
1088
+ },
1089
+ "FieldColorSeriesByMode": {
1090
+ "enum": [
1091
+ "min",
1092
+ "max",
1093
+ "last"
1094
+ ],
1095
+ "type": "string",
1096
+ "description": "Defines how to assign a series color from \"by value\" color schemes. For example for an aggregated data points like a timeseries, the color can be assigned by the min, max or last value."
1097
+ },
1098
+ "Action": {
1099
+ "type": "object",
1100
+ "additionalProperties": false,
1101
+ "required": [
1102
+ "type",
1103
+ "title"
1104
+ ],
1105
+ "properties": {
1106
+ "type": {
1107
+ "$ref": "#/definitions/ActionType"
1108
+ },
1109
+ "title": {
1110
+ "type": "string"
1111
+ },
1112
+ "fetch": {
1113
+ "$ref": "#/definitions/FetchOptions"
1114
+ },
1115
+ "infinity": {
1116
+ "$ref": "#/definitions/InfinityOptions"
1117
+ },
1118
+ "confirmation": {
1119
+ "type": "string"
1120
+ },
1121
+ "oneClick": {
1122
+ "type": "boolean"
1123
+ },
1124
+ "variables": {
1125
+ "type": "array",
1126
+ "items": {
1127
+ "$ref": "#/definitions/ActionVariable"
1128
+ }
1129
+ },
1130
+ "style": {
1131
+ "type": "object",
1132
+ "additionalProperties": false,
1133
+ "properties": {
1134
+ "backgroundColor": {
1135
+ "type": "string"
1136
+ }
1137
+ }
1138
+ }
1139
+ }
1140
+ },
1141
+ "ActionType": {
1142
+ "enum": [
1143
+ "fetch",
1144
+ "infinity"
1145
+ ],
1146
+ "type": "string"
1147
+ },
1148
+ "FetchOptions": {
1149
+ "type": "object",
1150
+ "additionalProperties": false,
1151
+ "required": [
1152
+ "method",
1153
+ "url"
1154
+ ],
1155
+ "properties": {
1156
+ "method": {
1157
+ "$ref": "#/definitions/HttpRequestMethod"
1158
+ },
1159
+ "url": {
1160
+ "type": "string"
1161
+ },
1162
+ "body": {
1163
+ "type": "string"
1164
+ },
1165
+ "queryParams": {
1166
+ "type": "array",
1167
+ "items": {
1168
+ "type": "array",
1169
+ "items": {
1170
+ "type": "string"
1171
+ }
1172
+ },
1173
+ "description": "These are 2D arrays of strings, each representing a key-value pair\nWe are defining them this way because we can't generate a go struct that\nthat would have exactly two strings in each sub-array"
1174
+ },
1175
+ "headers": {
1176
+ "type": "array",
1177
+ "items": {
1178
+ "type": "array",
1179
+ "items": {
1180
+ "type": "string"
1181
+ }
1182
+ }
1183
+ }
1184
+ }
1185
+ },
1186
+ "HttpRequestMethod": {
1187
+ "enum": [
1188
+ "GET",
1189
+ "PUT",
1190
+ "POST",
1191
+ "DELETE",
1192
+ "PATCH"
1193
+ ],
1194
+ "type": "string"
1195
+ },
1196
+ "InfinityOptions": {
1197
+ "type": "object",
1198
+ "additionalProperties": false,
1199
+ "required": [
1200
+ "method",
1201
+ "url",
1202
+ "datasourceUid"
1203
+ ],
1204
+ "properties": {
1205
+ "method": {
1206
+ "$ref": "#/definitions/HttpRequestMethod"
1207
+ },
1208
+ "url": {
1209
+ "type": "string"
1210
+ },
1211
+ "body": {
1212
+ "type": "string"
1213
+ },
1214
+ "queryParams": {
1215
+ "type": "array",
1216
+ "items": {
1217
+ "type": "array",
1218
+ "items": {
1219
+ "type": "string"
1220
+ }
1221
+ },
1222
+ "description": "These are 2D arrays of strings, each representing a key-value pair\nWe are defining them this way because we can't generate a go struct that\nthat would have exactly two strings in each sub-array"
1223
+ },
1224
+ "datasourceUid": {
1225
+ "type": "string"
1226
+ },
1227
+ "headers": {
1228
+ "type": "array",
1229
+ "items": {
1230
+ "type": "array",
1231
+ "items": {
1232
+ "type": "string"
1233
+ }
1234
+ }
1235
+ }
1236
+ }
1237
+ },
1238
+ "ActionVariable": {
1239
+ "type": "object",
1240
+ "additionalProperties": false,
1241
+ "required": [
1242
+ "key",
1243
+ "name",
1244
+ "type"
1245
+ ],
1246
+ "properties": {
1247
+ "key": {
1248
+ "type": "string"
1249
+ },
1250
+ "name": {
1251
+ "type": "string"
1252
+ },
1253
+ "type": {
1254
+ "$ref": "#/definitions/ActionVariableType"
1255
+ }
1256
+ }
1257
+ },
1258
+ "ActionVariableType": {
1259
+ "type": "string",
1260
+ "const": "string",
1261
+ "description": "Action variable type"
1262
+ },
1263
+ "NullValueMode": {
1264
+ "enum": [
1265
+ "null",
1266
+ "connected",
1267
+ "null as zero"
1268
+ ],
1269
+ "type": "string",
1270
+ "description": "How null values should be handled"
1271
+ },
1272
+ "DynamicConfigValue": {
1273
+ "type": "object",
1274
+ "additionalProperties": false,
1275
+ "required": [
1276
+ "id"
1277
+ ],
1278
+ "properties": {
1279
+ "id": {
1280
+ "type": "string",
1281
+ "default": ""
1282
+ },
1283
+ "value": {
1284
+ "type": "object",
1285
+ "additionalProperties": {}
1286
+ }
1287
+ }
1288
+ },
1289
+ "LibraryPanelKind": {
1290
+ "type": "object",
1291
+ "additionalProperties": false,
1292
+ "required": [
1293
+ "kind",
1294
+ "spec"
1295
+ ],
1296
+ "properties": {
1297
+ "kind": {
1298
+ "type": "string",
1299
+ "const": "LibraryPanel"
1300
+ },
1301
+ "spec": {
1302
+ "$ref": "#/definitions/LibraryPanelKindSpec"
1303
+ }
1304
+ }
1305
+ },
1306
+ "LibraryPanelKindSpec": {
1307
+ "type": "object",
1308
+ "additionalProperties": false,
1309
+ "required": [
1310
+ "id",
1311
+ "title",
1312
+ "libraryPanel"
1313
+ ],
1314
+ "properties": {
1315
+ "id": {
1316
+ "type": "number",
1317
+ "description": "Panel ID for the library panel in the dashboard"
1318
+ },
1319
+ "title": {
1320
+ "type": "string",
1321
+ "description": "Title for the library panel in the dashboard"
1322
+ },
1323
+ "libraryPanel": {
1324
+ "$ref": "#/definitions/LibraryPanelRef"
1325
+ }
1326
+ }
1327
+ },
1328
+ "LibraryPanelRef": {
1329
+ "type": "object",
1330
+ "additionalProperties": false,
1331
+ "required": [
1332
+ "name",
1333
+ "uid"
1334
+ ],
1335
+ "properties": {
1336
+ "name": {
1337
+ "type": "string",
1338
+ "description": "Library panel name"
1339
+ },
1340
+ "uid": {
1341
+ "type": "string",
1342
+ "description": "Library panel uid"
1343
+ }
1344
+ },
1345
+ "description": "A library panel is a reusable panel that you can use in any dashboard.\nWhen you make a change to a library panel, that change propagates to all instances of where the panel is used.\nLibrary panels streamline reuse of panels across multiple dashboards."
1346
+ },
1347
+ "GridLayoutKind": {
1348
+ "type": "object",
1349
+ "additionalProperties": false,
1350
+ "required": [
1351
+ "kind",
1352
+ "spec"
1353
+ ],
1354
+ "properties": {
1355
+ "kind": {
1356
+ "type": "string",
1357
+ "const": "GridLayout"
1358
+ },
1359
+ "spec": {
1360
+ "$ref": "#/definitions/GridLayoutSpec"
1361
+ }
1362
+ }
1363
+ },
1364
+ "GridLayoutSpec": {
1365
+ "type": "object",
1366
+ "additionalProperties": false,
1367
+ "required": [
1368
+ "items"
1369
+ ],
1370
+ "properties": {
1371
+ "items": {
1372
+ "type": "array",
1373
+ "items": {
1374
+ "$ref": "#/definitions/GridLayoutItemKind"
1375
+ }
1376
+ }
1377
+ }
1378
+ },
1379
+ "GridLayoutItemKind": {
1380
+ "type": "object",
1381
+ "additionalProperties": false,
1382
+ "required": [
1383
+ "kind",
1384
+ "spec"
1385
+ ],
1386
+ "properties": {
1387
+ "kind": {
1388
+ "type": "string",
1389
+ "const": "GridLayoutItem"
1390
+ },
1391
+ "spec": {
1392
+ "$ref": "#/definitions/GridLayoutItemSpec"
1393
+ }
1394
+ }
1395
+ },
1396
+ "GridLayoutItemSpec": {
1397
+ "type": "object",
1398
+ "additionalProperties": false,
1399
+ "required": [
1400
+ "x",
1401
+ "y",
1402
+ "width",
1403
+ "height",
1404
+ "element"
1405
+ ],
1406
+ "properties": {
1407
+ "x": {
1408
+ "type": "integer"
1409
+ },
1410
+ "y": {
1411
+ "type": "integer"
1412
+ },
1413
+ "width": {
1414
+ "type": "integer"
1415
+ },
1416
+ "height": {
1417
+ "type": "integer"
1418
+ },
1419
+ "element": {
1420
+ "$ref": "#/definitions/ElementReference",
1421
+ "description": "reference to a PanelKind from dashboard.spec.elements Expressed as JSON Schema reference"
1422
+ },
1423
+ "repeat": {
1424
+ "$ref": "#/definitions/RepeatOptions"
1425
+ }
1426
+ }
1427
+ },
1428
+ "ElementReference": {
1429
+ "type": "object",
1430
+ "additionalProperties": false,
1431
+ "required": [
1432
+ "kind",
1433
+ "name"
1434
+ ],
1435
+ "properties": {
1436
+ "kind": {
1437
+ "type": "string",
1438
+ "const": "ElementReference"
1439
+ },
1440
+ "name": {
1441
+ "type": "string"
1442
+ }
1443
+ }
1444
+ },
1445
+ "RepeatOptions": {
1446
+ "type": "object",
1447
+ "additionalProperties": false,
1448
+ "required": [
1449
+ "mode",
1450
+ "value"
1451
+ ],
1452
+ "properties": {
1453
+ "mode": {
1454
+ "allOf": [
1455
+ {
1456
+ "$ref": "#/definitions/RepeatMode"
1457
+ }
1458
+ ],
1459
+ "default": "variable"
1460
+ },
1461
+ "value": {
1462
+ "type": "string"
1463
+ },
1464
+ "direction": {
1465
+ "enum": [
1466
+ "h",
1467
+ "v"
1468
+ ],
1469
+ "type": "string"
1470
+ },
1471
+ "maxPerRow": {
1472
+ "type": "integer"
1473
+ }
1474
+ }
1475
+ },
1476
+ "RepeatMode": {
1477
+ "enum": [
1478
+ "variable"
1479
+ ],
1480
+ "type": "string",
1481
+ "description": "other repeat modes will be added in the future: label, frame"
1482
+ },
1483
+ "RowsLayoutKind": {
1484
+ "type": "object",
1485
+ "additionalProperties": false,
1486
+ "required": [
1487
+ "kind",
1488
+ "spec"
1489
+ ],
1490
+ "properties": {
1491
+ "kind": {
1492
+ "type": "string",
1493
+ "const": "RowsLayout"
1494
+ },
1495
+ "spec": {
1496
+ "$ref": "#/definitions/RowsLayoutSpec"
1497
+ }
1498
+ }
1499
+ },
1500
+ "RowsLayoutSpec": {
1501
+ "type": "object",
1502
+ "additionalProperties": false,
1503
+ "required": [
1504
+ "rows"
1505
+ ],
1506
+ "properties": {
1507
+ "rows": {
1508
+ "type": "array",
1509
+ "items": {
1510
+ "$ref": "#/definitions/RowsLayoutRowKind"
1511
+ }
1512
+ }
1513
+ }
1514
+ },
1515
+ "RowsLayoutRowKind": {
1516
+ "type": "object",
1517
+ "additionalProperties": false,
1518
+ "required": [
1519
+ "kind",
1520
+ "spec"
1521
+ ],
1522
+ "properties": {
1523
+ "kind": {
1524
+ "type": "string",
1525
+ "const": "RowsLayoutRow"
1526
+ },
1527
+ "spec": {
1528
+ "$ref": "#/definitions/RowsLayoutRowSpec"
1529
+ }
1530
+ }
1531
+ },
1532
+ "RowsLayoutRowSpec": {
1533
+ "type": "object",
1534
+ "additionalProperties": false,
1535
+ "required": [
1536
+ "layout"
1537
+ ],
1538
+ "properties": {
1539
+ "title": {
1540
+ "type": "string"
1541
+ },
1542
+ "collapse": {
1543
+ "type": "boolean"
1544
+ },
1545
+ "hideHeader": {
1546
+ "type": "boolean"
1547
+ },
1548
+ "fillScreen": {
1549
+ "type": "boolean"
1550
+ },
1551
+ "conditionalRendering": {
1552
+ "$ref": "#/definitions/ConditionalRenderingGroupKind"
1553
+ },
1554
+ "repeat": {
1555
+ "$ref": "#/definitions/RowRepeatOptions"
1556
+ },
1557
+ "layout": {
1558
+ "oneOf": [
1559
+ {
1560
+ "$ref": "#/definitions/GridLayoutKind"
1561
+ },
1562
+ {
1563
+ "$ref": "#/definitions/AutoGridLayoutKind"
1564
+ },
1565
+ {
1566
+ "$ref": "#/definitions/TabsLayoutKind"
1567
+ },
1568
+ {
1569
+ "$ref": "#/definitions/RowsLayoutKind"
1570
+ }
1571
+ ]
1572
+ },
1573
+ "variables": {
1574
+ "type": "array",
1575
+ "items": {
1576
+ "$ref": "#/definitions/VariableKind"
1577
+ }
1578
+ }
1579
+ }
1580
+ },
1581
+ "ConditionalRenderingGroupKind": {
1582
+ "type": "object",
1583
+ "additionalProperties": false,
1584
+ "required": [
1585
+ "kind",
1586
+ "spec"
1587
+ ],
1588
+ "properties": {
1589
+ "kind": {
1590
+ "type": "string",
1591
+ "const": "ConditionalRenderingGroup"
1592
+ },
1593
+ "spec": {
1594
+ "$ref": "#/definitions/ConditionalRenderingGroupSpec"
1595
+ }
1596
+ }
1597
+ },
1598
+ "ConditionalRenderingGroupSpec": {
1599
+ "type": "object",
1600
+ "additionalProperties": false,
1601
+ "required": [
1602
+ "visibility",
1603
+ "condition",
1604
+ "items"
1605
+ ],
1606
+ "properties": {
1607
+ "visibility": {
1608
+ "enum": [
1609
+ "show",
1610
+ "hide"
1611
+ ],
1612
+ "type": "string"
1613
+ },
1614
+ "condition": {
1615
+ "enum": [
1616
+ "and",
1617
+ "or"
1618
+ ],
1619
+ "type": "string"
1620
+ },
1621
+ "items": {
1622
+ "type": "array",
1623
+ "items": {
1624
+ "oneOf": [
1625
+ {
1626
+ "$ref": "#/definitions/ConditionalRenderingVariableKind"
1627
+ },
1628
+ {
1629
+ "$ref": "#/definitions/ConditionalRenderingDataKind"
1630
+ },
1631
+ {
1632
+ "$ref": "#/definitions/ConditionalRenderingTimeRangeSizeKind"
1633
+ }
1634
+ ]
1635
+ }
1636
+ }
1637
+ }
1638
+ },
1639
+ "ConditionalRenderingVariableKind": {
1640
+ "type": "object",
1641
+ "additionalProperties": false,
1642
+ "required": [
1643
+ "kind",
1644
+ "spec"
1645
+ ],
1646
+ "properties": {
1647
+ "kind": {
1648
+ "type": "string",
1649
+ "const": "ConditionalRenderingVariable"
1650
+ },
1651
+ "spec": {
1652
+ "$ref": "#/definitions/ConditionalRenderingVariableSpec"
1653
+ }
1654
+ }
1655
+ },
1656
+ "ConditionalRenderingVariableSpec": {
1657
+ "type": "object",
1658
+ "additionalProperties": false,
1659
+ "required": [
1660
+ "variable",
1661
+ "operator",
1662
+ "value"
1663
+ ],
1664
+ "properties": {
1665
+ "variable": {
1666
+ "type": "string"
1667
+ },
1668
+ "operator": {
1669
+ "enum": [
1670
+ "equals",
1671
+ "notEquals",
1672
+ "matches",
1673
+ "notMatches"
1674
+ ],
1675
+ "type": "string"
1676
+ },
1677
+ "value": {
1678
+ "type": "string"
1679
+ }
1680
+ }
1681
+ },
1682
+ "ConditionalRenderingDataKind": {
1683
+ "type": "object",
1684
+ "additionalProperties": false,
1685
+ "required": [
1686
+ "kind",
1687
+ "spec"
1688
+ ],
1689
+ "properties": {
1690
+ "kind": {
1691
+ "type": "string",
1692
+ "const": "ConditionalRenderingData"
1693
+ },
1694
+ "spec": {
1695
+ "$ref": "#/definitions/ConditionalRenderingDataSpec"
1696
+ }
1697
+ }
1698
+ },
1699
+ "ConditionalRenderingDataSpec": {
1700
+ "type": "object",
1701
+ "additionalProperties": false,
1702
+ "required": [
1703
+ "value"
1704
+ ],
1705
+ "properties": {
1706
+ "value": {
1707
+ "type": "boolean"
1708
+ }
1709
+ }
1710
+ },
1711
+ "ConditionalRenderingTimeRangeSizeKind": {
1712
+ "type": "object",
1713
+ "additionalProperties": false,
1714
+ "required": [
1715
+ "kind",
1716
+ "spec"
1717
+ ],
1718
+ "properties": {
1719
+ "kind": {
1720
+ "type": "string",
1721
+ "const": "ConditionalRenderingTimeRangeSize"
1722
+ },
1723
+ "spec": {
1724
+ "$ref": "#/definitions/ConditionalRenderingTimeRangeSizeSpec"
1725
+ }
1726
+ }
1727
+ },
1728
+ "ConditionalRenderingTimeRangeSizeSpec": {
1729
+ "type": "object",
1730
+ "additionalProperties": false,
1731
+ "required": [
1732
+ "value"
1733
+ ],
1734
+ "properties": {
1735
+ "value": {
1736
+ "type": "string"
1737
+ }
1738
+ }
1739
+ },
1740
+ "RowRepeatOptions": {
1741
+ "type": "object",
1742
+ "additionalProperties": false,
1743
+ "required": [
1744
+ "mode",
1745
+ "value"
1746
+ ],
1747
+ "properties": {
1748
+ "mode": {
1749
+ "allOf": [
1750
+ {
1751
+ "$ref": "#/definitions/RepeatMode"
1752
+ }
1753
+ ],
1754
+ "default": "variable"
1755
+ },
1756
+ "value": {
1757
+ "type": "string"
1758
+ }
1759
+ }
1760
+ },
1761
+ "AutoGridLayoutKind": {
1762
+ "type": "object",
1763
+ "additionalProperties": false,
1764
+ "required": [
1765
+ "kind",
1766
+ "spec"
1767
+ ],
1768
+ "properties": {
1769
+ "kind": {
1770
+ "type": "string",
1771
+ "const": "AutoGridLayout"
1772
+ },
1773
+ "spec": {
1774
+ "$ref": "#/definitions/AutoGridLayoutSpec"
1775
+ }
1776
+ }
1777
+ },
1778
+ "AutoGridLayoutSpec": {
1779
+ "type": "object",
1780
+ "additionalProperties": false,
1781
+ "required": [
1782
+ "columnWidthMode",
1783
+ "rowHeightMode",
1784
+ "items"
1785
+ ],
1786
+ "properties": {
1787
+ "maxColumnCount": {
1788
+ "type": "number",
1789
+ "default": 3
1790
+ },
1791
+ "columnWidthMode": {
1792
+ "enum": [
1793
+ "narrow",
1794
+ "standard",
1795
+ "wide",
1796
+ "custom"
1797
+ ],
1798
+ "type": "string",
1799
+ "default": "standard"
1800
+ },
1801
+ "columnWidth": {
1802
+ "type": "number"
1803
+ },
1804
+ "rowHeightMode": {
1805
+ "enum": [
1806
+ "short",
1807
+ "standard",
1808
+ "tall",
1809
+ "custom"
1810
+ ],
1811
+ "type": "string",
1812
+ "default": "standard"
1813
+ },
1814
+ "rowHeight": {
1815
+ "type": "number"
1816
+ },
1817
+ "fillScreen": {
1818
+ "type": "boolean",
1819
+ "default": false
1820
+ },
1821
+ "items": {
1822
+ "type": "array",
1823
+ "items": {
1824
+ "$ref": "#/definitions/AutoGridLayoutItemKind"
1825
+ }
1826
+ }
1827
+ }
1828
+ },
1829
+ "AutoGridLayoutItemKind": {
1830
+ "type": "object",
1831
+ "additionalProperties": false,
1832
+ "required": [
1833
+ "kind",
1834
+ "spec"
1835
+ ],
1836
+ "properties": {
1837
+ "kind": {
1838
+ "type": "string",
1839
+ "const": "AutoGridLayoutItem"
1840
+ },
1841
+ "spec": {
1842
+ "$ref": "#/definitions/AutoGridLayoutItemSpec"
1843
+ }
1844
+ }
1845
+ },
1846
+ "AutoGridLayoutItemSpec": {
1847
+ "type": "object",
1848
+ "additionalProperties": false,
1849
+ "required": [
1850
+ "element"
1851
+ ],
1852
+ "properties": {
1853
+ "element": {
1854
+ "$ref": "#/definitions/ElementReference"
1855
+ },
1856
+ "repeat": {
1857
+ "$ref": "#/definitions/AutoGridRepeatOptions"
1858
+ },
1859
+ "conditionalRendering": {
1860
+ "$ref": "#/definitions/ConditionalRenderingGroupKind"
1861
+ }
1862
+ }
1863
+ },
1864
+ "AutoGridRepeatOptions": {
1865
+ "type": "object",
1866
+ "additionalProperties": false,
1867
+ "required": [
1868
+ "mode",
1869
+ "value"
1870
+ ],
1871
+ "properties": {
1872
+ "mode": {
1873
+ "allOf": [
1874
+ {
1875
+ "$ref": "#/definitions/RepeatMode"
1876
+ }
1877
+ ],
1878
+ "default": "variable"
1879
+ },
1880
+ "value": {
1881
+ "type": "string"
1882
+ }
1883
+ }
1884
+ },
1885
+ "TabsLayoutKind": {
1886
+ "type": "object",
1887
+ "additionalProperties": false,
1888
+ "required": [
1889
+ "kind",
1890
+ "spec"
1891
+ ],
1892
+ "properties": {
1893
+ "kind": {
1894
+ "type": "string",
1895
+ "const": "TabsLayout"
1896
+ },
1897
+ "spec": {
1898
+ "$ref": "#/definitions/TabsLayoutSpec"
1899
+ }
1900
+ }
1901
+ },
1902
+ "TabsLayoutSpec": {
1903
+ "type": "object",
1904
+ "additionalProperties": false,
1905
+ "required": [
1906
+ "tabs"
1907
+ ],
1908
+ "properties": {
1909
+ "tabs": {
1910
+ "type": "array",
1911
+ "items": {
1912
+ "$ref": "#/definitions/TabsLayoutTabKind"
1913
+ }
1914
+ }
1915
+ }
1916
+ },
1917
+ "TabsLayoutTabKind": {
1918
+ "type": "object",
1919
+ "additionalProperties": false,
1920
+ "required": [
1921
+ "kind",
1922
+ "spec"
1923
+ ],
1924
+ "properties": {
1925
+ "kind": {
1926
+ "type": "string",
1927
+ "const": "TabsLayoutTab"
1928
+ },
1929
+ "spec": {
1930
+ "$ref": "#/definitions/TabsLayoutTabSpec"
1931
+ }
1932
+ }
1933
+ },
1934
+ "TabsLayoutTabSpec": {
1935
+ "type": "object",
1936
+ "additionalProperties": false,
1937
+ "required": [
1938
+ "layout"
1939
+ ],
1940
+ "properties": {
1941
+ "title": {
1942
+ "type": "string"
1943
+ },
1944
+ "layout": {
1945
+ "oneOf": [
1946
+ {
1947
+ "$ref": "#/definitions/GridLayoutKind"
1948
+ },
1949
+ {
1950
+ "$ref": "#/definitions/RowsLayoutKind"
1951
+ },
1952
+ {
1953
+ "$ref": "#/definitions/AutoGridLayoutKind"
1954
+ },
1955
+ {
1956
+ "$ref": "#/definitions/TabsLayoutKind"
1957
+ }
1958
+ ]
1959
+ },
1960
+ "conditionalRendering": {
1961
+ "$ref": "#/definitions/ConditionalRenderingGroupKind"
1962
+ },
1963
+ "repeat": {
1964
+ "$ref": "#/definitions/TabRepeatOptions"
1965
+ },
1966
+ "variables": {
1967
+ "type": "array",
1968
+ "items": {
1969
+ "$ref": "#/definitions/VariableKind"
1970
+ }
1971
+ }
1972
+ }
1973
+ },
1974
+ "TabRepeatOptions": {
1975
+ "type": "object",
1976
+ "additionalProperties": false,
1977
+ "required": [
1978
+ "mode",
1979
+ "value"
1980
+ ],
1981
+ "properties": {
1982
+ "mode": {
1983
+ "allOf": [
1984
+ {
1985
+ "$ref": "#/definitions/RepeatMode"
1986
+ }
1987
+ ],
1988
+ "default": "variable"
1989
+ },
1990
+ "value": {
1991
+ "type": "string"
1992
+ }
1993
+ }
1994
+ },
1995
+ "VariableKind": {
1996
+ "oneOf": [
1997
+ {
1998
+ "$ref": "#/definitions/QueryVariableKind"
1999
+ },
2000
+ {
2001
+ "$ref": "#/definitions/TextVariableKind"
2002
+ },
2003
+ {
2004
+ "$ref": "#/definitions/ConstantVariableKind"
2005
+ },
2006
+ {
2007
+ "$ref": "#/definitions/DatasourceVariableKind"
2008
+ },
2009
+ {
2010
+ "$ref": "#/definitions/IntervalVariableKind"
2011
+ },
2012
+ {
2013
+ "$ref": "#/definitions/CustomVariableKind"
2014
+ },
2015
+ {
2016
+ "$ref": "#/definitions/GroupByVariableKind"
2017
+ },
2018
+ {
2019
+ "$ref": "#/definitions/AdhocVariableKind"
2020
+ },
2021
+ {
2022
+ "$ref": "#/definitions/SwitchVariableKind"
2023
+ }
2024
+ ]
2025
+ },
2026
+ "QueryVariableKind": {
2027
+ "type": "object",
2028
+ "additionalProperties": false,
2029
+ "required": [
2030
+ "kind",
2031
+ "spec"
2032
+ ],
2033
+ "properties": {
2034
+ "kind": {
2035
+ "type": "string",
2036
+ "const": "QueryVariable"
2037
+ },
2038
+ "spec": {
2039
+ "$ref": "#/definitions/QueryVariableSpec"
2040
+ }
2041
+ },
2042
+ "description": "Query variable kind"
2043
+ },
2044
+ "QueryVariableSpec": {
2045
+ "type": "object",
2046
+ "additionalProperties": false,
2047
+ "required": [
2048
+ "name",
2049
+ "current",
2050
+ "hide",
2051
+ "refresh",
2052
+ "skipUrlSync",
2053
+ "query",
2054
+ "regex",
2055
+ "sort",
2056
+ "options",
2057
+ "multi",
2058
+ "includeAll",
2059
+ "allowCustomValue"
2060
+ ],
2061
+ "properties": {
2062
+ "name": {
2063
+ "type": "string",
2064
+ "default": ""
2065
+ },
2066
+ "current": {
2067
+ "$ref": "#/definitions/VariableOption",
2068
+ "default": {
2069
+ "text": "",
2070
+ "value": ""
2071
+ }
2072
+ },
2073
+ "label": {
2074
+ "type": "string"
2075
+ },
2076
+ "hide": {
2077
+ "$ref": "#/definitions/VariableHide",
2078
+ "default": "dontHide"
2079
+ },
2080
+ "refresh": {
2081
+ "$ref": "#/definitions/VariableRefresh",
2082
+ "default": "never"
2083
+ },
2084
+ "skipUrlSync": {
2085
+ "type": "boolean",
2086
+ "default": false
2087
+ },
2088
+ "description": {
2089
+ "type": "string"
2090
+ },
2091
+ "query": {
2092
+ "$ref": "#/definitions/DataQueryKind"
2093
+ },
2094
+ "regex": {
2095
+ "type": "string",
2096
+ "default": ""
2097
+ },
2098
+ "regexApplyTo": {
2099
+ "$ref": "#/definitions/VariableRegexApplyTo",
2100
+ "default": "value"
2101
+ },
2102
+ "sort": {
2103
+ "$ref": "#/definitions/VariableSort"
2104
+ },
2105
+ "definition": {
2106
+ "type": "string"
2107
+ },
2108
+ "options": {
2109
+ "type": "array",
2110
+ "items": {
2111
+ "$ref": "#/definitions/VariableOption"
2112
+ }
2113
+ },
2114
+ "multi": {
2115
+ "type": "boolean",
2116
+ "default": false
2117
+ },
2118
+ "includeAll": {
2119
+ "type": "boolean",
2120
+ "default": false
2121
+ },
2122
+ "allValue": {
2123
+ "type": "string"
2124
+ },
2125
+ "placeholder": {
2126
+ "type": "string"
2127
+ },
2128
+ "allowCustomValue": {
2129
+ "type": "boolean",
2130
+ "default": true
2131
+ },
2132
+ "staticOptions": {
2133
+ "type": "array",
2134
+ "items": {
2135
+ "$ref": "#/definitions/VariableOption"
2136
+ }
2137
+ },
2138
+ "staticOptionsOrder": {
2139
+ "enum": [
2140
+ "before",
2141
+ "after",
2142
+ "sorted"
2143
+ ],
2144
+ "type": "string"
2145
+ },
2146
+ "origin": {
2147
+ "$ref": "#/definitions/ControlSourceRef"
2148
+ }
2149
+ },
2150
+ "description": "Query variable specification"
2151
+ },
2152
+ "VariableOption": {
2153
+ "type": "object",
2154
+ "additionalProperties": false,
2155
+ "required": [
2156
+ "text",
2157
+ "value"
2158
+ ],
2159
+ "properties": {
2160
+ "selected": {
2161
+ "type": "boolean",
2162
+ "description": "Whether the option is selected or not"
2163
+ },
2164
+ "text": {
2165
+ "oneOf": [
2166
+ {
2167
+ "type": "string"
2168
+ },
2169
+ {
2170
+ "type": "array",
2171
+ "items": {
2172
+ "type": "string"
2173
+ }
2174
+ }
2175
+ ],
2176
+ "description": "Text to be displayed for the option"
2177
+ },
2178
+ "value": {
2179
+ "oneOf": [
2180
+ {
2181
+ "type": "string"
2182
+ },
2183
+ {
2184
+ "type": "array",
2185
+ "items": {
2186
+ "type": "string"
2187
+ }
2188
+ }
2189
+ ],
2190
+ "description": "Value of the option"
2191
+ },
2192
+ "properties": {
2193
+ "type": "object",
2194
+ "additionalProperties": {
2195
+ "type": "string"
2196
+ },
2197
+ "description": "Additional properties for multi-props variables"
2198
+ }
2199
+ },
2200
+ "description": "Variable option specification"
2201
+ },
2202
+ "VariableHide": {
2203
+ "enum": [
2204
+ "dontHide",
2205
+ "hideLabel",
2206
+ "hideVariable",
2207
+ "inControlsMenu"
2208
+ ],
2209
+ "type": "string",
2210
+ "description": "Determine if the variable shows on dashboard\nAccepted values are `dontHide` (show label and value), `hideLabel` (show value only), `hideVariable` (show nothing), `inControlsMenu` (show in a drop-down menu)."
2211
+ },
2212
+ "VariableRefresh": {
2213
+ "enum": [
2214
+ "never",
2215
+ "onDashboardLoad",
2216
+ "onTimeRangeChanged"
2217
+ ],
2218
+ "type": "string",
2219
+ "description": "Options to config when to refresh a variable\n`never`: Never refresh the variable\n`onDashboardLoad`: Queries the data source every time the dashboard loads.\n`onTimeRangeChanged`: Queries the data source when the dashboard time range changes."
2220
+ },
2221
+ "VariableRegexApplyTo": {
2222
+ "enum": [
2223
+ "value",
2224
+ "text"
2225
+ ],
2226
+ "type": "string",
2227
+ "description": "Determine whether regex applies to variable value or display text\nAccepted values are `value` (apply to value used in queries) or `text` (apply to display text shown to users)"
2228
+ },
2229
+ "VariableSort": {
2230
+ "enum": [
2231
+ "disabled",
2232
+ "alphabeticalAsc",
2233
+ "alphabeticalDesc",
2234
+ "numericalAsc",
2235
+ "numericalDesc",
2236
+ "alphabeticalCaseInsensitiveAsc",
2237
+ "alphabeticalCaseInsensitiveDesc",
2238
+ "naturalAsc",
2239
+ "naturalDesc"
2240
+ ],
2241
+ "type": "string",
2242
+ "description": "Sort variable options\nAccepted values are:\n`disabled`: No sorting\n`alphabeticalAsc`: Alphabetical ASC\n`alphabeticalDesc`: Alphabetical DESC\n`numericalAsc`: Numerical ASC\n`numericalDesc`: Numerical DESC\n`alphabeticalCaseInsensitiveAsc`: Alphabetical Case Insensitive ASC\n`alphabeticalCaseInsensitiveDesc`: Alphabetical Case Insensitive DESC\n`naturalAsc`: Natural ASC\n`naturalDesc`: Natural DESC\nVariableSort enum with default value"
2243
+ },
2244
+ "ControlSourceRef": {
2245
+ "$ref": "#/definitions/DatasourceControlSourceRef"
2246
+ },
2247
+ "DatasourceControlSourceRef": {
2248
+ "type": "object",
2249
+ "additionalProperties": false,
2250
+ "required": [
2251
+ "type",
2252
+ "group"
2253
+ ],
2254
+ "properties": {
2255
+ "type": {
2256
+ "type": "string",
2257
+ "const": "datasource"
2258
+ },
2259
+ "group": {
2260
+ "type": "string",
2261
+ "description": "The plugin type-id"
2262
+ }
2263
+ },
2264
+ "description": "Source information for controls (e.g. variables or links)"
2265
+ },
2266
+ "TextVariableKind": {
2267
+ "type": "object",
2268
+ "additionalProperties": false,
2269
+ "required": [
2270
+ "kind",
2271
+ "spec"
2272
+ ],
2273
+ "properties": {
2274
+ "kind": {
2275
+ "type": "string",
2276
+ "const": "TextVariable"
2277
+ },
2278
+ "spec": {
2279
+ "$ref": "#/definitions/TextVariableSpec"
2280
+ }
2281
+ },
2282
+ "description": "Text variable kind"
2283
+ },
2284
+ "TextVariableSpec": {
2285
+ "type": "object",
2286
+ "additionalProperties": false,
2287
+ "required": [
2288
+ "name",
2289
+ "current",
2290
+ "query",
2291
+ "hide",
2292
+ "skipUrlSync"
2293
+ ],
2294
+ "properties": {
2295
+ "name": {
2296
+ "type": "string",
2297
+ "default": ""
2298
+ },
2299
+ "current": {
2300
+ "$ref": "#/definitions/VariableOption",
2301
+ "default": {
2302
+ "text": "",
2303
+ "value": ""
2304
+ }
2305
+ },
2306
+ "query": {
2307
+ "type": "string",
2308
+ "default": ""
2309
+ },
2310
+ "label": {
2311
+ "type": "string"
2312
+ },
2313
+ "hide": {
2314
+ "$ref": "#/definitions/VariableHide",
2315
+ "default": "dontHide"
2316
+ },
2317
+ "skipUrlSync": {
2318
+ "type": "boolean",
2319
+ "default": false
2320
+ },
2321
+ "description": {
2322
+ "type": "string"
2323
+ },
2324
+ "origin": {
2325
+ "$ref": "#/definitions/ControlSourceRef"
2326
+ }
2327
+ },
2328
+ "description": "Text variable specification"
2329
+ },
2330
+ "ConstantVariableKind": {
2331
+ "type": "object",
2332
+ "additionalProperties": false,
2333
+ "required": [
2334
+ "kind",
2335
+ "spec"
2336
+ ],
2337
+ "properties": {
2338
+ "kind": {
2339
+ "type": "string",
2340
+ "const": "ConstantVariable"
2341
+ },
2342
+ "spec": {
2343
+ "$ref": "#/definitions/ConstantVariableSpec"
2344
+ }
2345
+ },
2346
+ "description": "Constant variable kind"
2347
+ },
2348
+ "ConstantVariableSpec": {
2349
+ "type": "object",
2350
+ "additionalProperties": false,
2351
+ "required": [
2352
+ "name",
2353
+ "query",
2354
+ "current",
2355
+ "hide",
2356
+ "skipUrlSync"
2357
+ ],
2358
+ "properties": {
2359
+ "name": {
2360
+ "type": "string",
2361
+ "default": ""
2362
+ },
2363
+ "query": {
2364
+ "type": "string",
2365
+ "default": ""
2366
+ },
2367
+ "current": {
2368
+ "$ref": "#/definitions/VariableOption",
2369
+ "default": {
2370
+ "text": "",
2371
+ "value": ""
2372
+ }
2373
+ },
2374
+ "label": {
2375
+ "type": "string"
2376
+ },
2377
+ "hide": {
2378
+ "$ref": "#/definitions/VariableHide",
2379
+ "default": "dontHide"
2380
+ },
2381
+ "skipUrlSync": {
2382
+ "type": "boolean",
2383
+ "default": false
2384
+ },
2385
+ "description": {
2386
+ "type": "string"
2387
+ },
2388
+ "origin": {
2389
+ "$ref": "#/definitions/ControlSourceRef"
2390
+ }
2391
+ },
2392
+ "description": "Constant variable specification"
2393
+ },
2394
+ "DatasourceVariableKind": {
2395
+ "type": "object",
2396
+ "additionalProperties": false,
2397
+ "required": [
2398
+ "kind",
2399
+ "spec"
2400
+ ],
2401
+ "properties": {
2402
+ "kind": {
2403
+ "type": "string",
2404
+ "const": "DatasourceVariable"
2405
+ },
2406
+ "spec": {
2407
+ "$ref": "#/definitions/DatasourceVariableSpec"
2408
+ }
2409
+ },
2410
+ "description": "Datasource variable kind"
2411
+ },
2412
+ "DatasourceVariableSpec": {
2413
+ "type": "object",
2414
+ "additionalProperties": false,
2415
+ "required": [
2416
+ "name",
2417
+ "pluginId",
2418
+ "refresh",
2419
+ "regex",
2420
+ "current",
2421
+ "options",
2422
+ "multi",
2423
+ "includeAll",
2424
+ "hide",
2425
+ "skipUrlSync",
2426
+ "allowCustomValue"
2427
+ ],
2428
+ "properties": {
2429
+ "name": {
2430
+ "type": "string",
2431
+ "default": ""
2432
+ },
2433
+ "pluginId": {
2434
+ "type": "string",
2435
+ "default": ""
2436
+ },
2437
+ "refresh": {
2438
+ "$ref": "#/definitions/VariableRefresh",
2439
+ "default": "never"
2440
+ },
2441
+ "regex": {
2442
+ "type": "string",
2443
+ "default": ""
2444
+ },
2445
+ "current": {
2446
+ "$ref": "#/definitions/VariableOption",
2447
+ "default": {
2448
+ "text": "",
2449
+ "value": ""
2450
+ }
2451
+ },
2452
+ "options": {
2453
+ "type": "array",
2454
+ "items": {
2455
+ "$ref": "#/definitions/VariableOption"
2456
+ }
2457
+ },
2458
+ "multi": {
2459
+ "type": "boolean",
2460
+ "default": false
2461
+ },
2462
+ "includeAll": {
2463
+ "type": "boolean",
2464
+ "default": false
2465
+ },
2466
+ "allValue": {
2467
+ "type": "string"
2468
+ },
2469
+ "label": {
2470
+ "type": "string"
2471
+ },
2472
+ "hide": {
2473
+ "$ref": "#/definitions/VariableHide",
2474
+ "default": "dontHide"
2475
+ },
2476
+ "skipUrlSync": {
2477
+ "type": "boolean",
2478
+ "default": false
2479
+ },
2480
+ "description": {
2481
+ "type": "string"
2482
+ },
2483
+ "allowCustomValue": {
2484
+ "type": "boolean",
2485
+ "default": true
2486
+ },
2487
+ "origin": {
2488
+ "$ref": "#/definitions/ControlSourceRef"
2489
+ }
2490
+ },
2491
+ "description": "Datasource variable specification"
2492
+ },
2493
+ "IntervalVariableKind": {
2494
+ "type": "object",
2495
+ "additionalProperties": false,
2496
+ "required": [
2497
+ "kind",
2498
+ "spec"
2499
+ ],
2500
+ "properties": {
2501
+ "kind": {
2502
+ "type": "string",
2503
+ "const": "IntervalVariable"
2504
+ },
2505
+ "spec": {
2506
+ "$ref": "#/definitions/IntervalVariableSpec"
2507
+ }
2508
+ },
2509
+ "description": "Interval variable kind"
2510
+ },
2511
+ "IntervalVariableSpec": {
2512
+ "type": "object",
2513
+ "additionalProperties": false,
2514
+ "required": [
2515
+ "name",
2516
+ "query",
2517
+ "current",
2518
+ "options",
2519
+ "auto",
2520
+ "auto_min",
2521
+ "auto_count",
2522
+ "refresh",
2523
+ "hide",
2524
+ "skipUrlSync"
2525
+ ],
2526
+ "properties": {
2527
+ "name": {
2528
+ "type": "string",
2529
+ "default": ""
2530
+ },
2531
+ "query": {
2532
+ "type": "string",
2533
+ "default": ""
2534
+ },
2535
+ "current": {
2536
+ "$ref": "#/definitions/VariableOption",
2537
+ "default": {
2538
+ "text": "",
2539
+ "value": ""
2540
+ }
2541
+ },
2542
+ "options": {
2543
+ "type": "array",
2544
+ "items": {
2545
+ "$ref": "#/definitions/VariableOption"
2546
+ }
2547
+ },
2548
+ "auto": {
2549
+ "type": "boolean",
2550
+ "default": false
2551
+ },
2552
+ "auto_min": {
2553
+ "type": "string",
2554
+ "default": ""
2555
+ },
2556
+ "auto_count": {
2557
+ "type": "integer",
2558
+ "default": 0
2559
+ },
2560
+ "refresh": {
2561
+ "type": "string",
2562
+ "const": "onTimeRangeChanged"
2563
+ },
2564
+ "label": {
2565
+ "type": "string"
2566
+ },
2567
+ "hide": {
2568
+ "$ref": "#/definitions/VariableHide",
2569
+ "default": "dontHide"
2570
+ },
2571
+ "skipUrlSync": {
2572
+ "type": "boolean",
2573
+ "default": false
2574
+ },
2575
+ "description": {
2576
+ "type": "string"
2577
+ },
2578
+ "origin": {
2579
+ "$ref": "#/definitions/ControlSourceRef"
2580
+ }
2581
+ },
2582
+ "description": "Interval variable specification"
2583
+ },
2584
+ "CustomVariableKind": {
2585
+ "type": "object",
2586
+ "additionalProperties": false,
2587
+ "required": [
2588
+ "kind",
2589
+ "spec"
2590
+ ],
2591
+ "properties": {
2592
+ "kind": {
2593
+ "type": "string",
2594
+ "const": "CustomVariable"
2595
+ },
2596
+ "spec": {
2597
+ "$ref": "#/definitions/CustomVariableSpec"
2598
+ }
2599
+ },
2600
+ "description": "Custom variable kind"
2601
+ },
2602
+ "CustomVariableSpec": {
2603
+ "type": "object",
2604
+ "additionalProperties": false,
2605
+ "required": [
2606
+ "name",
2607
+ "query",
2608
+ "current",
2609
+ "options",
2610
+ "multi",
2611
+ "includeAll",
2612
+ "hide",
2613
+ "skipUrlSync",
2614
+ "allowCustomValue"
2615
+ ],
2616
+ "properties": {
2617
+ "name": {
2618
+ "type": "string",
2619
+ "default": ""
2620
+ },
2621
+ "query": {
2622
+ "type": "string",
2623
+ "default": ""
2624
+ },
2625
+ "current": {
2626
+ "$ref": "#/definitions/VariableOption"
2627
+ },
2628
+ "options": {
2629
+ "type": "array",
2630
+ "items": {
2631
+ "$ref": "#/definitions/VariableOption"
2632
+ }
2633
+ },
2634
+ "multi": {
2635
+ "type": "boolean",
2636
+ "default": false
2637
+ },
2638
+ "includeAll": {
2639
+ "type": "boolean",
2640
+ "default": false
2641
+ },
2642
+ "allValue": {
2643
+ "type": "string"
2644
+ },
2645
+ "label": {
2646
+ "type": "string"
2647
+ },
2648
+ "hide": {
2649
+ "$ref": "#/definitions/VariableHide",
2650
+ "default": "dontHide"
2651
+ },
2652
+ "skipUrlSync": {
2653
+ "type": "boolean",
2654
+ "default": false
2655
+ },
2656
+ "description": {
2657
+ "type": "string"
2658
+ },
2659
+ "allowCustomValue": {
2660
+ "type": "boolean",
2661
+ "default": true
2662
+ },
2663
+ "valuesFormat": {
2664
+ "enum": [
2665
+ "csv",
2666
+ "json"
2667
+ ],
2668
+ "type": "string"
2669
+ },
2670
+ "origin": {
2671
+ "$ref": "#/definitions/ControlSourceRef"
2672
+ }
2673
+ },
2674
+ "description": "Custom variable specification"
2675
+ },
2676
+ "GroupByVariableKind": {
2677
+ "type": "object",
2678
+ "additionalProperties": false,
2679
+ "required": [
2680
+ "kind",
2681
+ "group",
2682
+ "spec"
2683
+ ],
2684
+ "properties": {
2685
+ "kind": {
2686
+ "type": "string",
2687
+ "const": "GroupByVariable"
2688
+ },
2689
+ "group": {
2690
+ "type": "string"
2691
+ },
2692
+ "labels": {
2693
+ "type": "object",
2694
+ "additionalProperties": {
2695
+ "type": "string"
2696
+ }
2697
+ },
2698
+ "datasource": {
2699
+ "type": "object",
2700
+ "additionalProperties": false,
2701
+ "properties": {
2702
+ "name": {
2703
+ "type": "string"
2704
+ }
2705
+ }
2706
+ },
2707
+ "spec": {
2708
+ "$ref": "#/definitions/GroupByVariableSpec"
2709
+ }
2710
+ },
2711
+ "description": "Group variable kind"
2712
+ },
2713
+ "GroupByVariableSpec": {
2714
+ "type": "object",
2715
+ "additionalProperties": false,
2716
+ "required": [
2717
+ "name",
2718
+ "current",
2719
+ "options",
2720
+ "multi",
2721
+ "hide",
2722
+ "skipUrlSync"
2723
+ ],
2724
+ "properties": {
2725
+ "name": {
2726
+ "type": "string",
2727
+ "default": ""
2728
+ },
2729
+ "defaultValue": {
2730
+ "$ref": "#/definitions/VariableOption"
2731
+ },
2732
+ "current": {
2733
+ "$ref": "#/definitions/VariableOption",
2734
+ "default": {
2735
+ "text": "",
2736
+ "value": ""
2737
+ }
2738
+ },
2739
+ "options": {
2740
+ "type": "array",
2741
+ "items": {
2742
+ "$ref": "#/definitions/VariableOption"
2743
+ }
2744
+ },
2745
+ "multi": {
2746
+ "type": "boolean",
2747
+ "default": false
2748
+ },
2749
+ "label": {
2750
+ "type": "string"
2751
+ },
2752
+ "hide": {
2753
+ "$ref": "#/definitions/VariableHide",
2754
+ "default": "dontHide"
2755
+ },
2756
+ "skipUrlSync": {
2757
+ "type": "boolean",
2758
+ "default": false
2759
+ },
2760
+ "description": {
2761
+ "type": "string"
2762
+ },
2763
+ "origin": {
2764
+ "$ref": "#/definitions/ControlSourceRef"
2765
+ }
2766
+ },
2767
+ "description": "GroupBy variable specification"
2768
+ },
2769
+ "AdhocVariableKind": {
2770
+ "type": "object",
2771
+ "additionalProperties": false,
2772
+ "required": [
2773
+ "kind",
2774
+ "group",
2775
+ "spec"
2776
+ ],
2777
+ "properties": {
2778
+ "kind": {
2779
+ "type": "string",
2780
+ "const": "AdhocVariable"
2781
+ },
2782
+ "group": {
2783
+ "type": "string"
2784
+ },
2785
+ "labels": {
2786
+ "type": "object",
2787
+ "additionalProperties": {
2788
+ "type": "string"
2789
+ }
2790
+ },
2791
+ "datasource": {
2792
+ "type": "object",
2793
+ "additionalProperties": false,
2794
+ "properties": {
2795
+ "name": {
2796
+ "type": "string"
2797
+ }
2798
+ }
2799
+ },
2800
+ "spec": {
2801
+ "$ref": "#/definitions/AdhocVariableSpec"
2802
+ }
2803
+ },
2804
+ "description": "Adhoc variable kind"
2805
+ },
2806
+ "AdhocVariableSpec": {
2807
+ "type": "object",
2808
+ "additionalProperties": false,
2809
+ "required": [
2810
+ "name",
2811
+ "baseFilters",
2812
+ "filters",
2813
+ "defaultKeys",
2814
+ "hide",
2815
+ "skipUrlSync",
2816
+ "allowCustomValue"
2817
+ ],
2818
+ "properties": {
2819
+ "name": {
2820
+ "type": "string",
2821
+ "default": ""
2822
+ },
2823
+ "baseFilters": {
2824
+ "type": "array",
2825
+ "items": {
2826
+ "$ref": "#/definitions/AdHocFilterWithLabels"
2827
+ }
2828
+ },
2829
+ "filters": {
2830
+ "type": "array",
2831
+ "items": {
2832
+ "$ref": "#/definitions/AdHocFilterWithLabels"
2833
+ }
2834
+ },
2835
+ "defaultKeys": {
2836
+ "type": "array",
2837
+ "items": {
2838
+ "$ref": "#/definitions/MetricFindValue"
2839
+ }
2840
+ },
2841
+ "label": {
2842
+ "type": "string"
2843
+ },
2844
+ "hide": {
2845
+ "$ref": "#/definitions/VariableHide",
2846
+ "default": "dontHide"
2847
+ },
2848
+ "skipUrlSync": {
2849
+ "type": "boolean",
2850
+ "default": false
2851
+ },
2852
+ "description": {
2853
+ "type": "string"
2854
+ },
2855
+ "allowCustomValue": {
2856
+ "type": "boolean",
2857
+ "default": true
2858
+ },
2859
+ "enableGroupBy": {
2860
+ "type": "boolean",
2861
+ "description": "Whether the group-by operator is enabled in the ad hoc filter combobox.",
2862
+ "default": false
2863
+ },
2864
+ "origin": {
2865
+ "$ref": "#/definitions/ControlSourceRef"
2866
+ }
2867
+ },
2868
+ "description": "Adhoc variable specification"
2869
+ },
2870
+ "AdHocFilterWithLabels": {
2871
+ "type": "object",
2872
+ "additionalProperties": false,
2873
+ "required": [
2874
+ "key",
2875
+ "operator",
2876
+ "value"
2877
+ ],
2878
+ "properties": {
2879
+ "key": {
2880
+ "type": "string"
2881
+ },
2882
+ "operator": {
2883
+ "type": "string"
2884
+ },
2885
+ "value": {
2886
+ "type": "string"
2887
+ },
2888
+ "values": {
2889
+ "type": "array",
2890
+ "items": {
2891
+ "type": "string"
2892
+ }
2893
+ },
2894
+ "keyLabel": {
2895
+ "type": "string"
2896
+ },
2897
+ "valueLabels": {
2898
+ "type": "array",
2899
+ "items": {
2900
+ "type": "string"
2901
+ }
2902
+ },
2903
+ "forceEdit": {
2904
+ "type": "boolean"
2905
+ },
2906
+ "origin": {
2907
+ "$ref": "#/definitions/FilterOrigin"
2908
+ },
2909
+ "condition": {
2910
+ "type": "string",
2911
+ "description": "@deprecated"
2912
+ }
2913
+ },
2914
+ "description": "Define the AdHocFilterWithLabels type"
2915
+ },
2916
+ "FilterOrigin": {
2917
+ "type": "string",
2918
+ "const": "dashboard",
2919
+ "description": "Determine the origin of the adhoc variable filter"
2920
+ },
2921
+ "MetricFindValue": {
2922
+ "type": "object",
2923
+ "additionalProperties": false,
2924
+ "required": [
2925
+ "text"
2926
+ ],
2927
+ "properties": {
2928
+ "text": {
2929
+ "type": "string"
2930
+ },
2931
+ "value": {
2932
+ "oneOf": [
2933
+ {
2934
+ "type": "string"
2935
+ },
2936
+ {
2937
+ "type": "number"
2938
+ }
2939
+ ]
2940
+ },
2941
+ "group": {
2942
+ "type": "string"
2943
+ },
2944
+ "expandable": {
2945
+ "type": "boolean"
2946
+ }
2947
+ },
2948
+ "description": "Define the MetricFindValue type"
2949
+ },
2950
+ "SwitchVariableKind": {
2951
+ "type": "object",
2952
+ "additionalProperties": false,
2953
+ "required": [
2954
+ "kind",
2955
+ "spec"
2956
+ ],
2957
+ "properties": {
2958
+ "kind": {
2959
+ "type": "string",
2960
+ "const": "SwitchVariable"
2961
+ },
2962
+ "spec": {
2963
+ "$ref": "#/definitions/SwitchVariableSpec"
2964
+ }
2965
+ }
2966
+ },
2967
+ "SwitchVariableSpec": {
2968
+ "type": "object",
2969
+ "additionalProperties": false,
2970
+ "required": [
2971
+ "name",
2972
+ "current",
2973
+ "enabledValue",
2974
+ "disabledValue",
2975
+ "hide",
2976
+ "skipUrlSync"
2977
+ ],
2978
+ "properties": {
2979
+ "name": {
2980
+ "type": "string",
2981
+ "default": ""
2982
+ },
2983
+ "current": {
2984
+ "type": "string",
2985
+ "default": "false"
2986
+ },
2987
+ "enabledValue": {
2988
+ "type": "string",
2989
+ "default": "true"
2990
+ },
2991
+ "disabledValue": {
2992
+ "type": "string",
2993
+ "default": "false"
2994
+ },
2995
+ "label": {
2996
+ "type": "string"
2997
+ },
2998
+ "hide": {
2999
+ "$ref": "#/definitions/VariableHide",
3000
+ "default": "dontHide"
3001
+ },
3002
+ "skipUrlSync": {
3003
+ "type": "boolean",
3004
+ "default": false
3005
+ },
3006
+ "description": {
3007
+ "type": "string"
3008
+ },
3009
+ "origin": {
3010
+ "$ref": "#/definitions/ControlSourceRef"
3011
+ }
3012
+ }
3013
+ },
3014
+ "DashboardLink": {
3015
+ "type": "object",
3016
+ "additionalProperties": false,
3017
+ "required": [
3018
+ "title",
3019
+ "type",
3020
+ "icon",
3021
+ "tooltip",
3022
+ "tags",
3023
+ "asDropdown",
3024
+ "targetBlank",
3025
+ "includeVars",
3026
+ "keepTime"
3027
+ ],
3028
+ "properties": {
3029
+ "title": {
3030
+ "type": "string",
3031
+ "description": "Title to display with the link"
3032
+ },
3033
+ "type": {
3034
+ "$ref": "#/definitions/DashboardLinkType",
3035
+ "description": "Link type. Accepted values are dashboards (to refer to another dashboard) and link (to refer to an external resource)\nFIXME: The type is generated as `type: DashboardLinkType | dashboardLinkType.Link;` but it should be `type: DashboardLinkType`"
3036
+ },
3037
+ "icon": {
3038
+ "type": "string",
3039
+ "description": "Icon name to be displayed with the link"
3040
+ },
3041
+ "tooltip": {
3042
+ "type": "string",
3043
+ "description": "Tooltip to display when the user hovers their mouse over it"
3044
+ },
3045
+ "url": {
3046
+ "type": "string",
3047
+ "description": "Link URL. Only required/valid if the type is link"
3048
+ },
3049
+ "tags": {
3050
+ "type": "array",
3051
+ "items": {
3052
+ "type": "string"
3053
+ },
3054
+ "description": "List of tags to limit the linked dashboards. If empty, all dashboards will be displayed. Only valid if the type is dashboards"
3055
+ },
3056
+ "asDropdown": {
3057
+ "type": "boolean",
3058
+ "description": "If true, all dashboards links will be displayed in a dropdown. If false, all dashboards links will be displayed side by side. Only valid if the type is dashboards",
3059
+ "default": false
3060
+ },
3061
+ "targetBlank": {
3062
+ "type": "boolean",
3063
+ "description": "If true, the link will be opened in a new tab",
3064
+ "default": false
3065
+ },
3066
+ "includeVars": {
3067
+ "type": "boolean",
3068
+ "description": "If true, includes current template variables values in the link as query params",
3069
+ "default": false
3070
+ },
3071
+ "keepTime": {
3072
+ "type": "boolean",
3073
+ "description": "If true, includes current time range in the link as query params",
3074
+ "default": false
3075
+ },
3076
+ "placement": {
3077
+ "anyOf": [
3078
+ {
3079
+ "$ref": "#/definitions/DashboardLinkPlacement"
3080
+ },
3081
+ {
3082
+ "type": "null"
3083
+ }
3084
+ ],
3085
+ "description": "Placement can be used to display the link somewhere else on the dashboard other than above the visualisations."
3086
+ },
3087
+ "origin": {
3088
+ "$ref": "#/definitions/ControlSourceRef",
3089
+ "description": "The source that registered the link (if any)"
3090
+ }
3091
+ },
3092
+ "description": "Links with references to other dashboards or external resources"
3093
+ },
3094
+ "DashboardLinkType": {
3095
+ "enum": [
3096
+ "link",
3097
+ "dashboards"
3098
+ ],
3099
+ "type": "string",
3100
+ "description": "Dashboard Link type. Accepted values are dashboards (to refer to another dashboard) and link (to refer to an external resource)"
3101
+ },
3102
+ "DashboardLinkPlacement": {
3103
+ "enum": [
3104
+ "inControlsMenu"
3105
+ ],
3106
+ "type": "string",
3107
+ "description": "Dashboard Link placement. Defines where the link should be displayed.\n- \"inControlsMenu\" renders the link in bottom part of the dashboard controls dropdown menu"
3108
+ },
3109
+ "TimeSettingsSpec": {
3110
+ "type": "object",
3111
+ "additionalProperties": false,
3112
+ "required": [
3113
+ "from",
3114
+ "to",
3115
+ "autoRefresh",
3116
+ "autoRefreshIntervals",
3117
+ "hideTimepicker",
3118
+ "fiscalYearStartMonth"
3119
+ ],
3120
+ "properties": {
3121
+ "timezone": {
3122
+ "type": "string",
3123
+ "description": "Timezone of dashboard. Accepted values are IANA TZDB zone ID or \"browser\" or \"utc\".",
3124
+ "default": "browser"
3125
+ },
3126
+ "from": {
3127
+ "type": "string",
3128
+ "description": "Start time range for dashboard.\nAccepted values are relative time strings like \"now-6h\" or absolute time strings like \"2020-07-10T08:00:00.000Z\".",
3129
+ "default": "now-6h"
3130
+ },
3131
+ "to": {
3132
+ "type": "string",
3133
+ "description": "End time range for dashboard.\nAccepted values are relative time strings like \"now-6h\" or absolute time strings like \"2020-07-10T08:00:00.000Z\".",
3134
+ "default": "now"
3135
+ },
3136
+ "autoRefresh": {
3137
+ "type": "string",
3138
+ "description": "Refresh rate of dashboard. Represented via interval string, e.g. \"5s\", \"1m\", \"1h\", \"1d\".\nv1: refresh",
3139
+ "default": ""
3140
+ },
3141
+ "autoRefreshIntervals": {
3142
+ "type": "array",
3143
+ "items": {
3144
+ "type": "string"
3145
+ },
3146
+ "description": "Interval options available in the refresh picker dropdown.\nv1: timepicker.refresh_intervals",
3147
+ "default": [
3148
+ "5s",
3149
+ "10s",
3150
+ "30s",
3151
+ "1m",
3152
+ "5m",
3153
+ "15m",
3154
+ "30m",
3155
+ "1h",
3156
+ "2h",
3157
+ "1d"
3158
+ ]
3159
+ },
3160
+ "quickRanges": {
3161
+ "type": "array",
3162
+ "items": {
3163
+ "$ref": "#/definitions/TimeRangeOption"
3164
+ },
3165
+ "description": "Selectable options available in the time picker dropdown. Has no effect on provisioned dashboard.\nv1: timepicker.quick_ranges , not exposed in the UI"
3166
+ },
3167
+ "hideTimepicker": {
3168
+ "type": "boolean",
3169
+ "description": "Whether timepicker is visible or not.\nv1: timepicker.hidden",
3170
+ "default": false
3171
+ },
3172
+ "weekStart": {
3173
+ "enum": [
3174
+ "saturday",
3175
+ "monday",
3176
+ "sunday"
3177
+ ],
3178
+ "type": "string",
3179
+ "description": "Day when the week starts. Expressed by the name of the day in lowercase, e.g. \"monday\"."
3180
+ },
3181
+ "fiscalYearStartMonth": {
3182
+ "type": "integer",
3183
+ "description": "The month that the fiscal year starts on. 0 = January, 11 = December",
3184
+ "default": 0
3185
+ },
3186
+ "nowDelay": {
3187
+ "type": "string",
3188
+ "description": "Override the now time by entering a time delay. Use this option to accommodate known delays in data aggregation to avoid null values.\nv1: timepicker.nowDelay"
3189
+ }
3190
+ },
3191
+ "description": "Time configuration\nIt defines the default time config for the time picker, the refresh picker for the specific dashboard."
3192
+ },
3193
+ "TimeRangeOption": {
3194
+ "type": "object",
3195
+ "additionalProperties": false,
3196
+ "required": [
3197
+ "display",
3198
+ "from",
3199
+ "to"
3200
+ ],
3201
+ "properties": {
3202
+ "display": {
3203
+ "type": "string",
3204
+ "default": "Last 6 hours"
3205
+ },
3206
+ "from": {
3207
+ "type": "string",
3208
+ "default": "now-6h"
3209
+ },
3210
+ "to": {
3211
+ "type": "string",
3212
+ "default": "now"
3213
+ }
3214
+ }
3215
+ },
3216
+ "Preferences": {
3217
+ "type": "object",
3218
+ "additionalProperties": false,
3219
+ "properties": {
3220
+ "layout": {
3221
+ "oneOf": [
3222
+ {
3223
+ "$ref": "#/definitions/AutoGridLayoutKind"
3224
+ },
3225
+ {
3226
+ "$ref": "#/definitions/GridLayoutKind"
3227
+ }
3228
+ ],
3229
+ "description": "default layout template to be used when new containers are created"
3230
+ }
3231
+ },
3232
+ "description": "Dashboard specific preferences (applied per dashboard = all users using the dashboard)"
3233
+ },
3234
+ "AnnotationEventFieldSource": {
3235
+ "enum": [
3236
+ "field",
3237
+ "text",
3238
+ "skip"
3239
+ ],
3240
+ "type": "string",
3241
+ "description": "Annotation event field source. Defines how to obtain the value for an annotation event field.\n- \"field\": Find the value with a matching key (default)\n- \"text\": Write a constant string into the value\n- \"skip\": Do not include the field"
3242
+ },
3243
+ "Kind": {
3244
+ "type": "object",
3245
+ "additionalProperties": false,
3246
+ "required": [
3247
+ "kind",
3248
+ "spec"
3249
+ ],
3250
+ "properties": {
3251
+ "kind": {
3252
+ "type": "string"
3253
+ },
3254
+ "spec": {
3255
+ "type": "object",
3256
+ "additionalProperties": {}
3257
+ },
3258
+ "metadata": {
3259
+ "type": "object",
3260
+ "additionalProperties": {}
3261
+ }
3262
+ },
3263
+ "description": "--- Common types ---"
3264
+ },
3265
+ "VariableValue": {
3266
+ "oneOf": [
3267
+ {
3268
+ "$ref": "#/definitions/VariableValueSingle"
3269
+ },
3270
+ {
3271
+ "type": "array",
3272
+ "items": {
3273
+ "$ref": "#/definitions/VariableValueSingle"
3274
+ }
3275
+ }
3276
+ ],
3277
+ "description": "Variable types"
3278
+ },
3279
+ "VariableValueSingle": {
3280
+ "oneOf": [
3281
+ {
3282
+ "type": "string"
3283
+ },
3284
+ {
3285
+ "type": "boolean"
3286
+ },
3287
+ {
3288
+ "type": "number"
3289
+ },
3290
+ {
3291
+ "$ref": "#/definitions/CustomVariableValue"
3292
+ }
3293
+ ]
3294
+ },
3295
+ "CustomVariableValue": {
3296
+ "type": "object",
3297
+ "additionalProperties": false,
3298
+ "required": [
3299
+ "formatter"
3300
+ ],
3301
+ "properties": {
3302
+ "formatter": {
3303
+ "anyOf": [
3304
+ {
3305
+ "type": "string"
3306
+ },
3307
+ {
3308
+ "type": "null"
3309
+ }
3310
+ ],
3311
+ "description": "The format name or function used in the expression"
3312
+ }
3313
+ },
3314
+ "description": "Custom variable value"
3315
+ },
3316
+ "VariableType": {
3317
+ "enum": [
3318
+ "query",
3319
+ "adhoc",
3320
+ "groupby",
3321
+ "constant",
3322
+ "datasource",
3323
+ "interval",
3324
+ "textbox",
3325
+ "custom",
3326
+ "system",
3327
+ "snapshot",
3328
+ "switch"
3329
+ ],
3330
+ "type": "string",
3331
+ "description": "Dashboard variable type\n`query`: Query-generated list of values such as metric names, server names, sensor IDs, data centers, and so on.\n`adhoc`: Key/value filters that are automatically added to all metric queries for a data source (Prometheus, Loki, InfluxDB, and Elasticsearch only).\n`constant`: \tDefine a hidden constant.\n`datasource`: Quickly change the data source for an entire dashboard.\n`interval`: Interval variables represent time spans.\n`textbox`: Display a free text input field with an optional default value.\n`custom`: Define the variable options manually using a comma-separated list.\n`system`: Variables defined by Grafana. See: https://grafana.com/docs/grafana/latest/dashboards/variables/add-template-variables/#global-variables"
3332
+ },
3333
+ "CustomFormatterVariable": {
3334
+ "type": "object",
3335
+ "additionalProperties": false,
3336
+ "required": [
3337
+ "name",
3338
+ "type",
3339
+ "multi",
3340
+ "includeAll"
3341
+ ],
3342
+ "properties": {
3343
+ "name": {
3344
+ "type": "string"
3345
+ },
3346
+ "type": {
3347
+ "$ref": "#/definitions/VariableType"
3348
+ },
3349
+ "multi": {
3350
+ "type": "boolean"
3351
+ },
3352
+ "includeAll": {
3353
+ "type": "boolean"
3354
+ }
3355
+ },
3356
+ "description": "Custom formatter variable"
3357
+ },
3358
+ "VariableValueOption": {
3359
+ "type": "object",
3360
+ "additionalProperties": false,
3361
+ "required": [
3362
+ "label",
3363
+ "value"
3364
+ ],
3365
+ "properties": {
3366
+ "label": {
3367
+ "type": "string"
3368
+ },
3369
+ "value": {
3370
+ "$ref": "#/definitions/VariableValueSingle"
3371
+ },
3372
+ "group": {
3373
+ "type": "string"
3374
+ }
3375
+ },
3376
+ "description": "FIXME: should we introduce this? --- Variable value option"
3377
+ },
3378
+ "DashboardAPIVersion": {
3379
+ "type": "string",
3380
+ "const": "dashboard.grafana.app/v2"
3381
+ },
3382
+ "DashboardKind": {
3383
+ "type": "string",
3384
+ "const": "Dashboard"
3385
+ }
3386
+ }
3387
+ }