@intentius/chant-lexicon-grafana 0.96.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (259) hide show
  1. package/README.md +50 -0
  2. package/dist/build.d.ts +116 -0
  3. package/dist/build.d.ts.map +1 -0
  4. package/dist/catalog.d.ts +26 -0
  5. package/dist/catalog.d.ts.map +1 -0
  6. package/dist/codegen/docs-cli.d.ts +3 -0
  7. package/dist/codegen/docs-cli.d.ts.map +1 -0
  8. package/dist/codegen/docs.d.ts +8 -0
  9. package/dist/codegen/docs.d.ts.map +1 -0
  10. package/dist/codegen/generate-cli.d.ts +3 -0
  11. package/dist/codegen/generate-cli.d.ts.map +1 -0
  12. package/dist/codegen/generate.d.ts +21 -0
  13. package/dist/codegen/generate.d.ts.map +1 -0
  14. package/dist/codegen/package.d.ts +7 -0
  15. package/dist/codegen/package.d.ts.map +1 -0
  16. package/dist/codegen/schema-types.d.ts +41 -0
  17. package/dist/codegen/schema-types.d.ts.map +1 -0
  18. package/dist/composites/agent-dashboard.d.ts +70 -0
  19. package/dist/composites/agent-dashboard.d.ts.map +1 -0
  20. package/dist/composites/catalog.d.ts +3 -0
  21. package/dist/composites/catalog.d.ts.map +1 -0
  22. package/dist/composites/index.d.ts +12 -0
  23. package/dist/composites/index.d.ts.map +1 -0
  24. package/dist/composites/red-dashboard.d.ts +58 -0
  25. package/dist/composites/red-dashboard.d.ts.map +1 -0
  26. package/dist/composites/shared.d.ts +68 -0
  27. package/dist/composites/shared.d.ts.map +1 -0
  28. package/dist/composites/slo-dashboard.d.ts +62 -0
  29. package/dist/composites/slo-dashboard.d.ts.map +1 -0
  30. package/dist/dashboard.d.ts +84 -0
  31. package/dist/dashboard.d.ts.map +1 -0
  32. package/dist/datasource.d.ts +67 -0
  33. package/dist/datasource.d.ts.map +1 -0
  34. package/dist/detect.d.ts +20 -0
  35. package/dist/detect.d.ts.map +1 -0
  36. package/dist/index.d.ts +17 -0
  37. package/dist/index.d.ts.map +1 -0
  38. package/dist/integrity.json +22 -0
  39. package/dist/lint/audit-catalog.d.ts +13 -0
  40. package/dist/lint/audit-catalog.d.ts.map +1 -0
  41. package/dist/lint/post-synth/graf101.d.ts +8 -0
  42. package/dist/lint/post-synth/graf101.d.ts.map +1 -0
  43. package/dist/lint/post-synth/graf102.d.ts +8 -0
  44. package/dist/lint/post-synth/graf102.d.ts.map +1 -0
  45. package/dist/lint/post-synth/graf103.d.ts +8 -0
  46. package/dist/lint/post-synth/graf103.d.ts.map +1 -0
  47. package/dist/lint/post-synth/graf104.d.ts +8 -0
  48. package/dist/lint/post-synth/graf104.d.ts.map +1 -0
  49. package/dist/lint/post-synth/graf105.d.ts +8 -0
  50. package/dist/lint/post-synth/graf105.d.ts.map +1 -0
  51. package/dist/lint/post-synth/graf106.d.ts +8 -0
  52. package/dist/lint/post-synth/graf106.d.ts.map +1 -0
  53. package/dist/lint/post-synth/graf107.d.ts +8 -0
  54. package/dist/lint/post-synth/graf107.d.ts.map +1 -0
  55. package/dist/lint/post-synth/grafana-helpers.d.ts +16 -0
  56. package/dist/lint/post-synth/grafana-helpers.d.ts.map +1 -0
  57. package/dist/lint/post-synth/index.d.ts +3 -0
  58. package/dist/lint/post-synth/index.d.ts.map +1 -0
  59. package/dist/lint/rules/grafana-ast.d.ts +21 -0
  60. package/dist/lint/rules/grafana-ast.d.ts.map +1 -0
  61. package/dist/lint/rules/index.d.ts +6 -0
  62. package/dist/lint/rules/index.d.ts.map +1 -0
  63. package/dist/lint/rules/literal-secret.d.ts +12 -0
  64. package/dist/lint/rules/literal-secret.d.ts.map +1 -0
  65. package/dist/lint/rules/uid-syntax.d.ts +12 -0
  66. package/dist/lint/rules/uid-syntax.d.ts.map +1 -0
  67. package/dist/lsp/completions.d.ts +4 -0
  68. package/dist/lsp/completions.d.ts.map +1 -0
  69. package/dist/lsp/hover.d.ts +4 -0
  70. package/dist/lsp/hover.d.ts.map +1 -0
  71. package/dist/manifest.json +8 -0
  72. package/dist/meta.json +107 -0
  73. package/dist/okf/index.md +39 -0
  74. package/dist/okf/rules/GRAF001.md +16 -0
  75. package/dist/okf/rules/GRAF002.md +15 -0
  76. package/dist/okf/rules/GRAF101.md +15 -0
  77. package/dist/okf/rules/GRAF102.md +15 -0
  78. package/dist/okf/rules/GRAF103.md +11 -0
  79. package/dist/okf/rules/GRAF104.md +15 -0
  80. package/dist/okf/rules/GRAF105.md +11 -0
  81. package/dist/okf/rules/GRAF106.md +11 -0
  82. package/dist/okf/rules/GRAF107.md +11 -0
  83. package/dist/okf/types/ConstantVariable.md +9 -0
  84. package/dist/okf/types/CustomVariable.md +9 -0
  85. package/dist/okf/types/Dashboard.md +14 -0
  86. package/dist/okf/types/DashboardProvider.md +9 -0
  87. package/dist/okf/types/Datasource.md +16 -0
  88. package/dist/okf/types/DatasourceVariable.md +9 -0
  89. package/dist/okf/types/GaugePanel.md +9 -0
  90. package/dist/okf/types/HeatmapPanel.md +9 -0
  91. package/dist/okf/types/IntervalVariable.md +9 -0
  92. package/dist/okf/types/LogsPanel.md +9 -0
  93. package/dist/okf/types/LokiQuery.md +9 -0
  94. package/dist/okf/types/PromQuery.md +9 -0
  95. package/dist/okf/types/QueryVariable.md +9 -0
  96. package/dist/okf/types/Row.md +9 -0
  97. package/dist/okf/types/StatPanel.md +9 -0
  98. package/dist/okf/types/TablePanel.md +9 -0
  99. package/dist/okf/types/TempoQuery.md +9 -0
  100. package/dist/okf/types/TextPanel.md +9 -0
  101. package/dist/okf/types/TextboxVariable.md +9 -0
  102. package/dist/okf/types/TimeSeriesPanel.md +9 -0
  103. package/dist/okf/types/TracesPanel.md +9 -0
  104. package/dist/package-cli.d.ts +3 -0
  105. package/dist/package-cli.d.ts.map +1 -0
  106. package/dist/panels.d.ts +138 -0
  107. package/dist/panels.d.ts.map +1 -0
  108. package/dist/pin.d.ts +32 -0
  109. package/dist/pin.d.ts.map +1 -0
  110. package/dist/plugin.d.ts +12 -0
  111. package/dist/plugin.d.ts.map +1 -0
  112. package/dist/query.d.ts +81 -0
  113. package/dist/query.d.ts.map +1 -0
  114. package/dist/rules/graf101.ts +17 -0
  115. package/dist/rules/graf102.ts +17 -0
  116. package/dist/rules/graf103.ts +17 -0
  117. package/dist/rules/graf104.ts +17 -0
  118. package/dist/rules/graf105.ts +17 -0
  119. package/dist/rules/graf106.ts +17 -0
  120. package/dist/rules/graf107.ts +17 -0
  121. package/dist/rules/grafana-ast.ts +70 -0
  122. package/dist/rules/grafana-helpers.ts +68 -0
  123. package/dist/rules/literal-secret.ts +48 -0
  124. package/dist/rules/uid-syntax.ts +56 -0
  125. package/dist/schema/dashboard.gen.d.ts +1231 -0
  126. package/dist/schema/dashboard.gen.d.ts.map +1 -0
  127. package/dist/schema/gauge.gen.d.ts +57 -0
  128. package/dist/schema/gauge.gen.d.ts.map +1 -0
  129. package/dist/schema/heatmap.gen.d.ts +295 -0
  130. package/dist/schema/heatmap.gen.d.ts.map +1 -0
  131. package/dist/schema/index.d.ts +18 -0
  132. package/dist/schema/index.d.ts.map +1 -0
  133. package/dist/schema/logs.gen.d.ts +29 -0
  134. package/dist/schema/logs.gen.d.ts.map +1 -0
  135. package/dist/schema/loki.gen.d.ts +69 -0
  136. package/dist/schema/loki.gen.d.ts.map +1 -0
  137. package/dist/schema/prometheus.gen.d.ts +169 -0
  138. package/dist/schema/prometheus.gen.d.ts.map +1 -0
  139. package/dist/schema/stat.gen.d.ts +75 -0
  140. package/dist/schema/stat.gen.d.ts.map +1 -0
  141. package/dist/schema/table.gen.d.ts +295 -0
  142. package/dist/schema/table.gen.d.ts.map +1 -0
  143. package/dist/schema/tempo.gen.d.ts +136 -0
  144. package/dist/schema/tempo.gen.d.ts.map +1 -0
  145. package/dist/schema/text.gen.d.ts +16 -0
  146. package/dist/schema/text.gen.d.ts.map +1 -0
  147. package/dist/schema/timeseries.gen.d.ts +179 -0
  148. package/dist/schema/timeseries.gen.d.ts.map +1 -0
  149. package/dist/schema-validate.d.ts +20 -0
  150. package/dist/schema-validate.d.ts.map +1 -0
  151. package/dist/serializer.d.ts +22 -0
  152. package/dist/serializer.d.ts.map +1 -0
  153. package/dist/skill-defs.d.ts +3 -0
  154. package/dist/skill-defs.d.ts.map +1 -0
  155. package/dist/skills/chant-grafana-provisioning.md +42 -0
  156. package/dist/skills/chant-grafana.md +93 -0
  157. package/dist/spec/fetch-cli.d.ts +3 -0
  158. package/dist/spec/fetch-cli.d.ts.map +1 -0
  159. package/dist/spec/schemas.d.ts +25 -0
  160. package/dist/spec/schemas.d.ts.map +1 -0
  161. package/dist/types/index.d.ts +3 -0
  162. package/dist/util.d.ts +17 -0
  163. package/dist/util.d.ts.map +1 -0
  164. package/dist/validate-cli.d.ts +3 -0
  165. package/dist/validate-cli.d.ts.map +1 -0
  166. package/dist/validate-output.d.ts +42 -0
  167. package/dist/validate-output.d.ts.map +1 -0
  168. package/dist/validate.d.ts +12 -0
  169. package/dist/validate.d.ts.map +1 -0
  170. package/dist/variables.d.ts +100 -0
  171. package/dist/variables.d.ts.map +1 -0
  172. package/package.json +79 -0
  173. package/src/build.test.ts +210 -0
  174. package/src/build.ts +573 -0
  175. package/src/catalog.ts +116 -0
  176. package/src/codegen/docs-cli.ts +4 -0
  177. package/src/codegen/docs.ts +97 -0
  178. package/src/codegen/generate-cli.ts +8 -0
  179. package/src/codegen/generate.ts +83 -0
  180. package/src/codegen/package.ts +41 -0
  181. package/src/codegen/schema-types.ts +173 -0
  182. package/src/composites/agent-dashboard.ts +235 -0
  183. package/src/composites/catalog.test.ts +37 -0
  184. package/src/composites/catalog.ts +223 -0
  185. package/src/composites/composites.test.ts +314 -0
  186. package/src/composites/index.ts +12 -0
  187. package/src/composites/red-dashboard.ts +159 -0
  188. package/src/composites/shared.ts +94 -0
  189. package/src/composites/slo-dashboard.ts +177 -0
  190. package/src/dashboard.ts +123 -0
  191. package/src/datasource.ts +93 -0
  192. package/src/detect.ts +30 -0
  193. package/src/generated/lexicon-grafana.json +107 -0
  194. package/src/import.e2e.test.ts +147 -0
  195. package/src/import.test.ts +45 -0
  196. package/src/index.ts +178 -0
  197. package/src/lint/audit-catalog.ts +87 -0
  198. package/src/lint/post-synth/graf101.ts +17 -0
  199. package/src/lint/post-synth/graf102.ts +17 -0
  200. package/src/lint/post-synth/graf103.ts +17 -0
  201. package/src/lint/post-synth/graf104.ts +17 -0
  202. package/src/lint/post-synth/graf105.ts +17 -0
  203. package/src/lint/post-synth/graf106.ts +17 -0
  204. package/src/lint/post-synth/graf107.ts +17 -0
  205. package/src/lint/post-synth/grafana-helpers.ts +68 -0
  206. package/src/lint/post-synth/index.ts +19 -0
  207. package/src/lint/post-synth/post-synth.test.ts +231 -0
  208. package/src/lint/rules/grafana-ast.ts +70 -0
  209. package/src/lint/rules/index.ts +9 -0
  210. package/src/lint/rules/literal-secret.ts +48 -0
  211. package/src/lint/rules/rules.test.ts +70 -0
  212. package/src/lint/rules/uid-syntax.ts +56 -0
  213. package/src/lsp/completions.test.ts +31 -0
  214. package/src/lsp/completions.ts +15 -0
  215. package/src/lsp/hover.test.ts +25 -0
  216. package/src/lsp/hover.ts +28 -0
  217. package/src/package-cli.ts +17 -0
  218. package/src/panels.ts +275 -0
  219. package/src/pin.ts +68 -0
  220. package/src/plugin.test.ts +50 -0
  221. package/src/plugin.ts +116 -0
  222. package/src/query.ts +160 -0
  223. package/src/schema/dashboard.gen.ts +1289 -0
  224. package/src/schema/gauge.gen.ts +64 -0
  225. package/src/schema/heatmap.gen.ts +321 -0
  226. package/src/schema/index.ts +17 -0
  227. package/src/schema/logs.gen.ts +34 -0
  228. package/src/schema/loki.gen.ts +77 -0
  229. package/src/schema/prometheus.gen.ts +181 -0
  230. package/src/schema/stat.gen.ts +86 -0
  231. package/src/schema/table.gen.ts +334 -0
  232. package/src/schema/tempo.gen.ts +146 -0
  233. package/src/schema/text.gen.ts +22 -0
  234. package/src/schema/timeseries.gen.ts +208 -0
  235. package/src/schema-validate.ts +143 -0
  236. package/src/schema.test.ts +76 -0
  237. package/src/serializer.test.ts +170 -0
  238. package/src/serializer.ts +37 -0
  239. package/src/skill-defs.ts +31 -0
  240. package/src/skills/chant-grafana-provisioning.md +42 -0
  241. package/src/skills/chant-grafana.md +93 -0
  242. package/src/spec/fetch-cli.ts +27 -0
  243. package/src/spec/schemas/dashboard.jsonschema.json +1901 -0
  244. package/src/spec/schemas/gauge.jsonschema.json +114 -0
  245. package/src/spec/schemas/heatmap.jsonschema.json +480 -0
  246. package/src/spec/schemas/logs.jsonschema.json +94 -0
  247. package/src/spec/schemas/loki.jsonschema.json +118 -0
  248. package/src/spec/schemas/prometheus.jsonschema.json +276 -0
  249. package/src/spec/schemas/stat.jsonschema.json +163 -0
  250. package/src/spec/schemas/table.jsonschema.json +751 -0
  251. package/src/spec/schemas/tempo.jsonschema.json +225 -0
  252. package/src/spec/schemas/text.jsonschema.json +72 -0
  253. package/src/spec/schemas/timeseries.jsonschema.json +471 -0
  254. package/src/spec/schemas.ts +56 -0
  255. package/src/util.ts +43 -0
  256. package/src/validate-cli.ts +7 -0
  257. package/src/validate-output.ts +380 -0
  258. package/src/validate.ts +108 -0
  259. package/src/variables.ts +161 -0
@@ -0,0 +1,64 @@
1
+ // Code generated by chant generate from the vendored Grafana schema
2
+ // src/spec/schemas/gauge.jsonschema.json (see src/pin.ts). DO NOT EDIT.
3
+ /* eslint-disable */
4
+
5
+ export interface Options {
6
+ showThresholdLabels: boolean;
7
+ showThresholdMarkers: boolean;
8
+ sizing: BarGaugeSizing;
9
+ minVizWidth: number;
10
+ reduceOptions: ReduceDataOptions;
11
+ text?: VizTextDisplayOptions;
12
+ minVizHeight: number;
13
+ orientation: VizOrientation;
14
+ }
15
+
16
+ /**
17
+ * Allows for the bar gauge size to be set explicitly
18
+ */
19
+ export type BarGaugeSizing = "auto" | "manual";
20
+
21
+ /**
22
+ * TODO docs
23
+ */
24
+ export interface ReduceDataOptions {
25
+ /**
26
+ * If true show each row value
27
+ */
28
+ values?: boolean;
29
+ /**
30
+ * if showing all values limit
31
+ */
32
+ limit?: number;
33
+ /**
34
+ * When !values, pick one value for the whole field
35
+ */
36
+ calcs: string[];
37
+ /**
38
+ * Which fields to show. By default this is only numeric fields
39
+ */
40
+ fields?: string;
41
+ }
42
+
43
+ /**
44
+ * TODO docs
45
+ */
46
+ export interface VizTextDisplayOptions {
47
+ /**
48
+ * Explicit title text size
49
+ */
50
+ titleSize?: number;
51
+ /**
52
+ * Explicit value text size
53
+ */
54
+ valueSize?: number;
55
+ /**
56
+ * Explicit percent text size
57
+ */
58
+ percentSize?: number;
59
+ }
60
+
61
+ /**
62
+ * TODO docs
63
+ */
64
+ export type VizOrientation = "auto" | "vertical" | "horizontal";
@@ -0,0 +1,321 @@
1
+ // Code generated by chant generate from the vendored Grafana schema
2
+ // src/spec/schemas/heatmap.jsonschema.json (see src/pin.ts). DO NOT EDIT.
3
+ /* eslint-disable */
4
+
5
+ /**
6
+ * Controls the color mode of the heatmap
7
+ */
8
+ export type HeatmapColorMode = "opacity" | "scheme";
9
+
10
+ /**
11
+ * Controls the color scale of the heatmap
12
+ */
13
+ export type HeatmapColorScale = "linear" | "exponential";
14
+
15
+ /**
16
+ * Controls which axis to allow selection on
17
+ */
18
+ export type HeatmapSelectionMode = "x" | "y" | "xy";
19
+
20
+ /**
21
+ * Controls various color options
22
+ */
23
+ export interface HeatmapColorOptions {
24
+ /**
25
+ * Sets the color mode
26
+ */
27
+ mode?: HeatmapColorMode;
28
+ /**
29
+ * Controls the color scheme used
30
+ */
31
+ scheme: string;
32
+ /**
33
+ * Controls the color fill when in opacity mode
34
+ */
35
+ fill: string;
36
+ /**
37
+ * Controls the color scale
38
+ */
39
+ scale?: HeatmapColorScale;
40
+ /**
41
+ * Controls the exponent when scale is set to exponential
42
+ */
43
+ exponent: number;
44
+ /**
45
+ * Controls the number of color steps
46
+ */
47
+ steps: number;
48
+ /**
49
+ * Reverses the color scheme
50
+ */
51
+ reverse: boolean;
52
+ /**
53
+ * Sets the minimum value for the color scale
54
+ */
55
+ min?: number;
56
+ /**
57
+ * Sets the maximum value for the color scale
58
+ */
59
+ max?: number;
60
+ }
61
+
62
+ /**
63
+ * Configuration options for the yAxis
64
+ */
65
+ export interface YAxisConfig {
66
+ /**
67
+ * Sets the yAxis unit
68
+ */
69
+ unit?: string;
70
+ /**
71
+ * Reverses the yAxis
72
+ */
73
+ reverse?: boolean;
74
+ /**
75
+ * Controls the number of decimals for yAxis values
76
+ */
77
+ decimals?: number;
78
+ /**
79
+ * Sets the minimum value for the yAxis
80
+ */
81
+ min?: number;
82
+ axisPlacement?: AxisPlacement;
83
+ axisColorMode?: AxisColorMode;
84
+ axisLabel?: string;
85
+ axisWidth?: number;
86
+ axisSoftMin?: number;
87
+ axisSoftMax?: number;
88
+ axisGridShow?: boolean;
89
+ scaleDistribution?: ScaleDistributionConfig;
90
+ axisCenteredZero?: boolean;
91
+ /**
92
+ * Sets the maximum value for the yAxis
93
+ */
94
+ max?: number;
95
+ axisBorderShow?: boolean;
96
+ }
97
+
98
+ /**
99
+ * Controls cell value options
100
+ */
101
+ export interface CellValues {
102
+ /**
103
+ * Controls the cell value unit
104
+ */
105
+ unit?: string;
106
+ /**
107
+ * Controls the number of decimals for cell values
108
+ */
109
+ decimals?: number;
110
+ }
111
+
112
+ /**
113
+ * Controls the value filter range
114
+ */
115
+ export interface FilterValueRange {
116
+ /**
117
+ * Sets the filter range to values less than or equal to the given value
118
+ */
119
+ le?: number;
120
+ /**
121
+ * Sets the filter range to values greater than or equal to the given value
122
+ */
123
+ ge?: number;
124
+ }
125
+
126
+ /**
127
+ * Controls tooltip options
128
+ */
129
+ export interface HeatmapTooltip {
130
+ /**
131
+ * Controls how the tooltip is shown
132
+ */
133
+ mode: TooltipDisplayMode;
134
+ maxHeight?: number;
135
+ maxWidth?: number;
136
+ /**
137
+ * Controls if the tooltip shows a histogram of the y-axis values
138
+ */
139
+ yHistogram?: boolean;
140
+ /**
141
+ * Controls if the tooltip shows a color scale in header
142
+ */
143
+ showColorScale?: boolean;
144
+ }
145
+
146
+ /**
147
+ * Controls legend options
148
+ */
149
+ export interface HeatmapLegend {
150
+ /**
151
+ * Controls if the legend is shown
152
+ */
153
+ show: boolean;
154
+ }
155
+
156
+ /**
157
+ * Controls exemplar options
158
+ */
159
+ export interface ExemplarConfig {
160
+ /**
161
+ * Sets the color of the exemplar markers
162
+ */
163
+ color: string;
164
+ }
165
+
166
+ /**
167
+ * Controls frame rows options
168
+ */
169
+ export interface RowsHeatmapOptions {
170
+ /**
171
+ * Sets the name of the cell when not calculating from data
172
+ */
173
+ value?: string;
174
+ /**
175
+ * Controls tick alignment when not calculating from data
176
+ */
177
+ layout?: HeatmapCellLayout;
178
+ }
179
+
180
+ export interface Options {
181
+ /**
182
+ * Controls if the heatmap should be calculated from data
183
+ */
184
+ calculate?: boolean;
185
+ /**
186
+ * Calculation options for the heatmap
187
+ */
188
+ calculation?: HeatmapCalculationOptions;
189
+ /**
190
+ * Controls the color options
191
+ */
192
+ color: HeatmapColorOptions;
193
+ /**
194
+ * Filters values between a given range
195
+ */
196
+ filterValues?: FilterValueRange;
197
+ /**
198
+ * Controls tick alignment and value name when not calculating from data
199
+ */
200
+ rowsFrame?: RowsHeatmapOptions;
201
+ /**
202
+ * | *{
203
+ * layout: ui.HeatmapCellLayout & "auto" // TODO: fix after remove when https://github.com/grafana/cuetsy/issues/74 is fixed
204
+ * }
205
+ * Controls the display of the value in the cell
206
+ */
207
+ showValue: VisibilityMode;
208
+ /**
209
+ * Controls gap between cells
210
+ */
211
+ cellGap?: number;
212
+ /**
213
+ * Controls cell radius
214
+ */
215
+ cellRadius?: number;
216
+ /**
217
+ * Controls cell value unit
218
+ */
219
+ cellValues?: CellValues;
220
+ /**
221
+ * Controls yAxis placement
222
+ */
223
+ yAxis: YAxisConfig;
224
+ /**
225
+ * | *{
226
+ * axisPlacement: ui.AxisPlacement & "left" // TODO: fix after remove when https://github.com/grafana/cuetsy/issues/74 is fixed
227
+ * }
228
+ * Controls legend options
229
+ */
230
+ legend: HeatmapLegend;
231
+ /**
232
+ * Controls tooltip options
233
+ */
234
+ tooltip: HeatmapTooltip;
235
+ /**
236
+ * Controls exemplar options
237
+ */
238
+ exemplars: ExemplarConfig;
239
+ /**
240
+ * Controls which axis to allow selection on
241
+ */
242
+ selectionMode?: HeatmapSelectionMode;
243
+ }
244
+
245
+ export interface FieldConfig {
246
+ scaleDistribution?: ScaleDistributionConfig;
247
+ hideFrom?: HideSeriesConfig;
248
+ }
249
+
250
+ /**
251
+ * TODO docs
252
+ */
253
+ export type AxisPlacement = "auto" | "top" | "right" | "bottom" | "left" | "hidden";
254
+
255
+ /**
256
+ * TODO docs
257
+ */
258
+ export type AxisColorMode = "text" | "series";
259
+
260
+ /**
261
+ * TODO docs
262
+ */
263
+ export interface ScaleDistributionConfig {
264
+ type: ScaleDistribution;
265
+ log?: number;
266
+ linearThreshold?: number;
267
+ }
268
+
269
+ /**
270
+ * TODO docs
271
+ */
272
+ export type TooltipDisplayMode = "single" | "multi" | "none";
273
+
274
+ export type HeatmapCellLayout = "le" | "ge" | "unknown" | "auto";
275
+
276
+ export interface HeatmapCalculationOptions {
277
+ /**
278
+ * The number of buckets to use for the xAxis in the heatmap
279
+ */
280
+ xBuckets?: HeatmapCalculationBucketConfig;
281
+ /**
282
+ * The number of buckets to use for the yAxis in the heatmap
283
+ */
284
+ yBuckets?: HeatmapCalculationBucketConfig;
285
+ }
286
+
287
+ /**
288
+ * TODO docs
289
+ */
290
+ export type VisibilityMode = "auto" | "never" | "always";
291
+
292
+ /**
293
+ * TODO docs
294
+ */
295
+ export interface HideSeriesConfig {
296
+ tooltip: boolean;
297
+ legend: boolean;
298
+ viz: boolean;
299
+ }
300
+
301
+ /**
302
+ * TODO docs
303
+ */
304
+ export type ScaleDistribution = "linear" | "log" | "ordinal" | "symlog";
305
+
306
+ export interface HeatmapCalculationBucketConfig {
307
+ /**
308
+ * Sets the bucket calculation mode
309
+ */
310
+ mode?: HeatmapCalculationMode;
311
+ /**
312
+ * The number of buckets to use for the axis in the heatmap
313
+ */
314
+ value?: string;
315
+ /**
316
+ * Controls the scale of the buckets
317
+ */
318
+ scale?: ScaleDistributionConfig;
319
+ }
320
+
321
+ export type HeatmapCalculationMode = "size" | "count";
@@ -0,0 +1,17 @@
1
+ /**
2
+ * The generated Grafana schema types, one namespace per vendored schema.
3
+ * `schema.stat.Options` is the stat panel's options exactly as Grafana's
4
+ * schema at `GRAFANA_SCHEMA_PIN` spells them.
5
+ */
6
+ export * as dashboard from "./dashboard.gen";
7
+ export * as timeseries from "./timeseries.gen";
8
+ export * as stat from "./stat.gen";
9
+ export * as gauge from "./gauge.gen";
10
+ export * as table from "./table.gen";
11
+ export * as logs from "./logs.gen";
12
+ export * as heatmap from "./heatmap.gen";
13
+ export * as text from "./text.gen";
14
+ export * as prometheus from "./prometheus.gen";
15
+ export * as tempo from "./tempo.gen";
16
+ export * as loki from "./loki.gen";
17
+ export { DASHBOARD_SCHEMA_VERSION } from "./dashboard.gen";
@@ -0,0 +1,34 @@
1
+ // Code generated by chant generate from the vendored Grafana schema
2
+ // src/spec/schemas/logs.jsonschema.json (see src/pin.ts). DO NOT EDIT.
3
+ /* eslint-disable */
4
+
5
+ export interface Options {
6
+ showLabels: boolean;
7
+ showCommonLabels: boolean;
8
+ showTime: boolean;
9
+ showLogContextToggle: boolean;
10
+ wrapLogMessage: boolean;
11
+ prettifyLogMessage: boolean;
12
+ enableLogDetails: boolean;
13
+ sortOrder: LogsSortOrder;
14
+ dedupStrategy: LogsDedupStrategy;
15
+ enableInfiniteScrolling?: boolean;
16
+ /**
17
+ * Display controls to jump to the last or first log line, and filters by log level.
18
+ */
19
+ showControls?: boolean;
20
+ /**
21
+ * Show a component to manage the displayed fields from the logs.
22
+ */
23
+ showFieldSelector?: boolean;
24
+ /**
25
+ * Use a predefined coloring scheme to highlight relevant parts of the log lines.
26
+ */
27
+ syntaxHighlighting?: boolean;
28
+ fontSize?: "default" | "small";
29
+ detailsMode?: "inline" | "sidebar";
30
+ }
31
+
32
+ export type LogsSortOrder = "Descending" | "Ascending";
33
+
34
+ export type LogsDedupStrategy = "none" | "exact" | "numbers" | "signature";
@@ -0,0 +1,77 @@
1
+ // Code generated by chant generate from the vendored Grafana schema
2
+ // src/spec/schemas/loki.jsonschema.json (see src/pin.ts). DO NOT EDIT.
3
+ /* eslint-disable */
4
+
5
+ export type QueryEditorMode = "code" | "builder";
6
+
7
+ export type LokiQueryType = "range" | "instant" | "stream";
8
+
9
+ export type SupportingQueryType = "logsVolume" | "logsSample" | "dataSample" | "infiniteScroll";
10
+
11
+ export type LokiQueryDirection = "forward" | "backward" | "scan";
12
+
13
+ export interface Dataquery {
14
+ /**
15
+ * The LogQL query.
16
+ */
17
+ expr: string;
18
+ /**
19
+ * Used to override the name of the series.
20
+ */
21
+ legendFormat?: string;
22
+ /**
23
+ * Used to limit the number of log rows returned.
24
+ */
25
+ maxLines?: number;
26
+ /**
27
+ * @deprecated, now use step.
28
+ */
29
+ resolution?: number;
30
+ editorMode?: QueryEditorMode;
31
+ /**
32
+ * @deprecated, now use queryType.
33
+ */
34
+ range?: boolean;
35
+ /**
36
+ * @deprecated, now use queryType.
37
+ */
38
+ instant?: boolean;
39
+ /**
40
+ * Used to set step value for range queries.
41
+ */
42
+ step?: string;
43
+ /**
44
+ * A unique identifier for the query within the list of targets.
45
+ * In server side expressions, the refId is used as a variable name to identify results.
46
+ * By default, the UI will assign A->Z; however setting meaningful names may be useful.
47
+ */
48
+ refId?: string | null;
49
+ /**
50
+ * If hide is set to true, Grafana will filter out the response(s) associated with this query before returning it to the panel.
51
+ */
52
+ hide?: boolean;
53
+ /**
54
+ * Specify the query flavor
55
+ * TODO make this required and give it a default
56
+ */
57
+ queryType?: string;
58
+ /**
59
+ * For mixed data sources the selected datasource is on the query level.
60
+ * For non mixed scenarios this is undefined.
61
+ * TODO find a better way to do this ^ that's friendly to schema
62
+ * TODO this shouldn't be unknown but DataSourceRef | null
63
+ */
64
+ datasource?: DataSourceRef;
65
+ direction?: LokiQueryDirection;
66
+ }
67
+
68
+ export interface DataSourceRef {
69
+ /**
70
+ * The plugin type-id
71
+ */
72
+ type?: string;
73
+ /**
74
+ * Specific datasource instance
75
+ */
76
+ uid?: string;
77
+ }
@@ -0,0 +1,181 @@
1
+ // Code generated by chant generate from the vendored Grafana schema
2
+ // src/spec/schemas/prometheus.jsonschema.json (see src/pin.ts). DO NOT EDIT.
3
+ /* eslint-disable */
4
+
5
+ export interface AdhocFilters {
6
+ key: string;
7
+ operator: string;
8
+ value: string;
9
+ values?: string[];
10
+ }
11
+
12
+ export interface ResultAssertions {
13
+ /**
14
+ * Maximum frame count
15
+ */
16
+ maxFrames?: number;
17
+ /**
18
+ * Type asserts that the frame matches a known type structure.
19
+ * Possible enum values:
20
+ * - `""`
21
+ * - `"timeseries-wide"`
22
+ * - `"timeseries-long"`
23
+ * - `"timeseries-many"`
24
+ * - `"timeseries-multi"`
25
+ * - `"directory-listing"`
26
+ * - `"table"`
27
+ * - `"numeric-wide"`
28
+ * - `"numeric-multi"`
29
+ * - `"numeric-long"`
30
+ * - `"log-lines"`
31
+ */
32
+ type?: ResultAssertionsType;
33
+ /**
34
+ * TypeVersion is the version of the Type property. Versions greater than 0.0 correspond to the dataplane
35
+ * contract documentation https://grafana.github.io/dataplane/contract/.
36
+ */
37
+ typeVersion: number[];
38
+ }
39
+
40
+ export interface ScopesFilters {
41
+ key: string;
42
+ operator: string;
43
+ value: string;
44
+ values?: string[];
45
+ }
46
+
47
+ export interface Scopes {
48
+ defaultPath?: string[];
49
+ filters?: ScopesFilters[];
50
+ title: string;
51
+ }
52
+
53
+ export interface TimeRange {
54
+ /**
55
+ * From is the start time of the query.
56
+ */
57
+ from: string;
58
+ /**
59
+ * To is the end time of the query.
60
+ */
61
+ to: string;
62
+ }
63
+
64
+ export interface Dataquery {
65
+ /**
66
+ * Additional Ad-hoc filters that take precedence over Scope on conflict.
67
+ */
68
+ adhocFilters?: AdhocFilters[];
69
+ /**
70
+ * The datasource
71
+ */
72
+ datasource?: DataSourceRef;
73
+ /**
74
+ * what we should show in the editor
75
+ * Possible enum values:
76
+ * - `"builder"`
77
+ * - `"code"`
78
+ */
79
+ editorMode?: QueryEditorMode;
80
+ /**
81
+ * Execute an additional query to identify interesting raw samples relevant for the given expr
82
+ */
83
+ exemplar?: boolean;
84
+ /**
85
+ * The actual expression/query that will be evaluated by Prometheus
86
+ */
87
+ expr: string;
88
+ /**
89
+ * The response format
90
+ * Possible enum values:
91
+ * - `"time_series"`
92
+ * - `"table"`
93
+ * - `"heatmap"`
94
+ */
95
+ format?: PromQueryFormat;
96
+ /**
97
+ * Group By parameters to apply to aggregate expressions in the query
98
+ */
99
+ groupByKeys?: string[];
100
+ /**
101
+ * true if query is disabled (ie should not be returned to the dashboard)
102
+ * NOTE: this does not always imply that the query should not be executed since
103
+ * the results from a hidden query may be used as the input to other queries (SSE etc)
104
+ */
105
+ hide?: boolean;
106
+ /**
107
+ * Returns only the latest value that Prometheus has scraped for the requested time series
108
+ */
109
+ instant?: boolean;
110
+ /**
111
+ * Used to specify how many times to divide max data points by. We use max data points under query options
112
+ * See https://github.com/grafana/grafana/issues/48081
113
+ * Deprecated: use interval
114
+ */
115
+ intervalFactor?: number;
116
+ /**
117
+ * Interval is the suggested duration between time points in a time series query.
118
+ * NOTE: the values for intervalMs is not saved in the query model. It is typically calculated
119
+ * from the interval required to fill a pixels in the visualization
120
+ */
121
+ intervalMs?: number;
122
+ /**
123
+ * Series name override or template. Ex. {{hostname}} will be replaced with label value for hostname
124
+ */
125
+ legendFormat?: string;
126
+ /**
127
+ * MaxDataPoints is the maximum number of data points that should be returned from a time series query.
128
+ * NOTE: the values for maxDataPoints is not saved in the query model. It is typically calculated
129
+ * from the number of pixels visible in a visualization
130
+ */
131
+ maxDataPoints?: number;
132
+ /**
133
+ * QueryType is an optional identifier for the type of query.
134
+ * It can be used to distinguish different types of queries.
135
+ */
136
+ queryType?: string;
137
+ /**
138
+ * Returns a Range vector, comprised of a set of time series containing a range of data points over time for each time series
139
+ */
140
+ range?: boolean;
141
+ /**
142
+ * RefID is the unique identifier of the query, set by the frontend call.
143
+ */
144
+ refId?: string | null;
145
+ /**
146
+ * Optionally define expected query result behavior
147
+ */
148
+ resultAssertions?: ResultAssertions;
149
+ /**
150
+ * A set of filters applied to apply to the query
151
+ */
152
+ scopes?: Scopes[];
153
+ /**
154
+ * TimeRange represents the query range
155
+ * NOTE: unlike generic /ds/query, we can now send explicit time values in each query
156
+ * NOTE: the values for timeRange are not saved in a dashboard, they are constructed on the fly
157
+ */
158
+ timeRange?: TimeRange;
159
+ /**
160
+ * An additional lower limit for the step parameter of the Prometheus query and for the
161
+ * `$__interval` and `$__rate_interval` variables.
162
+ */
163
+ interval?: string;
164
+ }
165
+
166
+ export type ResultAssertionsType = "" | "timeseries-wide" | "timeseries-long" | "timeseries-many" | "timeseries-multi" | "directory-listing" | "table" | "numeric-wide" | "numeric-multi" | "numeric-long" | "log-lines";
167
+
168
+ export type QueryEditorMode = "builder" | "code";
169
+
170
+ export type PromQueryFormat = "time_series" | "table" | "heatmap";
171
+
172
+ export interface DataSourceRef {
173
+ /**
174
+ * The plugin type-id
175
+ */
176
+ type?: string;
177
+ /**
178
+ * Specific datasource instance
179
+ */
180
+ uid?: string;
181
+ }