@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,86 @@
1
+ // Code generated by chant generate from the vendored Grafana schema
2
+ // src/spec/schemas/stat.jsonschema.json (see src/pin.ts). DO NOT EDIT.
3
+ /* eslint-disable */
4
+
5
+ export interface Options {
6
+ graphMode: BigValueGraphMode;
7
+ colorMode: BigValueColorMode;
8
+ justifyMode: BigValueJustifyMode;
9
+ textMode: BigValueTextMode;
10
+ wideLayout: boolean;
11
+ showPercentChange: boolean;
12
+ reduceOptions: ReduceDataOptions;
13
+ text?: VizTextDisplayOptions;
14
+ percentChangeColorMode: PercentChangeColorMode;
15
+ orientation: VizOrientation;
16
+ }
17
+
18
+ /**
19
+ * TODO docs
20
+ */
21
+ export type BigValueGraphMode = "none" | "line" | "area";
22
+
23
+ /**
24
+ * TODO docs
25
+ */
26
+ export type BigValueColorMode = "value" | "background" | "background_solid" | "none";
27
+
28
+ /**
29
+ * TODO docs
30
+ */
31
+ export type BigValueJustifyMode = "auto" | "center";
32
+
33
+ /**
34
+ * TODO docs
35
+ */
36
+ export type BigValueTextMode = "auto" | "value" | "value_and_name" | "name" | "none";
37
+
38
+ /**
39
+ * TODO docs
40
+ */
41
+ export interface ReduceDataOptions {
42
+ /**
43
+ * If true show each row value
44
+ */
45
+ values?: boolean;
46
+ /**
47
+ * if showing all values limit
48
+ */
49
+ limit?: number;
50
+ /**
51
+ * When !values, pick one value for the whole field
52
+ */
53
+ calcs: string[];
54
+ /**
55
+ * Which fields to show. By default this is only numeric fields
56
+ */
57
+ fields?: string;
58
+ }
59
+
60
+ /**
61
+ * TODO docs
62
+ */
63
+ export interface VizTextDisplayOptions {
64
+ /**
65
+ * Explicit title text size
66
+ */
67
+ titleSize?: number;
68
+ /**
69
+ * Explicit value text size
70
+ */
71
+ valueSize?: number;
72
+ /**
73
+ * Explicit percent text size
74
+ */
75
+ percentSize?: number;
76
+ }
77
+
78
+ /**
79
+ * TODO docs
80
+ */
81
+ export type PercentChangeColorMode = "standard" | "inverted" | "same_as_value";
82
+
83
+ /**
84
+ * TODO docs
85
+ */
86
+ export type VizOrientation = "auto" | "vertical" | "horizontal";
@@ -0,0 +1,334 @@
1
+ // Code generated by chant generate from the vendored Grafana schema
2
+ // src/spec/schemas/table.jsonschema.json (see src/pin.ts). DO NOT EDIT.
3
+ /* eslint-disable */
4
+
5
+ export interface Options {
6
+ /**
7
+ * Represents the index of the selected frame
8
+ */
9
+ frameIndex: number;
10
+ /**
11
+ * Controls whether the panel should show the header
12
+ */
13
+ showHeader: boolean;
14
+ /**
15
+ * Controls whether the header should show icons for the column types
16
+ */
17
+ showTypeIcons?: boolean;
18
+ /**
19
+ * Used to control row sorting
20
+ */
21
+ sortBy?: TableSortByFieldState[];
22
+ /**
23
+ * Controls footer options
24
+ */
25
+ footer?: TableFooterOptions;
26
+ /**
27
+ * Controls the height of the rows
28
+ */
29
+ cellHeight?: TableCellHeight;
30
+ }
31
+
32
+ export type FieldConfig = TableFieldOptions;
33
+
34
+ /**
35
+ * Sort by field state
36
+ */
37
+ export interface TableSortByFieldState {
38
+ /**
39
+ * Sets the display name of the field to sort by
40
+ */
41
+ displayName: string;
42
+ /**
43
+ * Flag used to indicate descending sort order
44
+ */
45
+ desc?: boolean;
46
+ }
47
+
48
+ /**
49
+ * Footer options
50
+ */
51
+ export interface TableFooterOptions {
52
+ show: boolean;
53
+ /**
54
+ * actually 1 value
55
+ */
56
+ reducer: string[];
57
+ fields?: string[];
58
+ enablePagination?: boolean;
59
+ countRows?: boolean;
60
+ }
61
+
62
+ /**
63
+ * Height of a table cell
64
+ */
65
+ export type TableCellHeight = "sm" | "md" | "lg" | "auto";
66
+
67
+ /**
68
+ * Field options for each field within a table (e.g 10, "The String", 64.20, etc.)
69
+ * Generally defines alignment, filtering capabilties, display options, etc.
70
+ */
71
+ export interface TableFieldOptions {
72
+ width?: number;
73
+ minWidth?: number;
74
+ align: FieldTextAlignment;
75
+ /**
76
+ * This field is deprecated in favor of using cellOptions
77
+ */
78
+ displayMode?: TableCellDisplayMode;
79
+ cellOptions?: TableCellOptions | null;
80
+ /**
81
+ * ?? default is missing or false ??
82
+ */
83
+ hidden?: boolean;
84
+ inspect: boolean;
85
+ filterable?: boolean;
86
+ /**
87
+ * Hides any header for a column, useful for columns that show some static content or buttons.
88
+ */
89
+ hideHeader?: boolean;
90
+ }
91
+
92
+ /**
93
+ * TODO -- should not be table specific!
94
+ * TODO docs
95
+ */
96
+ export type FieldTextAlignment = "auto" | "left" | "right" | "center";
97
+
98
+ /**
99
+ * Internally, this is the "type" of cell that's being displayed
100
+ * in the table such as colored text, JSON, gauge, etc.
101
+ * The color-background-solid, gradient-gauge, and lcd-gauge
102
+ * modes are deprecated in favor of new cell subOptions
103
+ */
104
+ export type TableCellDisplayMode = "auto" | "color-text" | "color-background" | "color-background-solid" | "gradient-gauge" | "lcd-gauge" | "json-view" | "basic" | "image" | "gauge" | "sparkline" | "data-links" | "custom" | "actions";
105
+
106
+ /**
107
+ * Table cell options. Each cell has a display mode
108
+ * and other potential options for that display.
109
+ */
110
+ export type TableCellOptions = TableAutoCellOptions | TableSparklineCellOptions | TableBarGaugeCellOptions | TableColoredBackgroundCellOptions | TableColorTextCellOptions | TableImageCellOptions | TableDataLinksCellOptions | TableActionsCellOptions | TableJsonViewCellOptions;
111
+
112
+ /**
113
+ * Auto mode table cell options
114
+ */
115
+ export interface TableAutoCellOptions {
116
+ type: TableCellDisplayMode;
117
+ wrapText?: boolean;
118
+ }
119
+
120
+ /**
121
+ * Sparkline cell options
122
+ */
123
+ export interface TableSparklineCellOptions {
124
+ type: TableCellDisplayMode;
125
+ drawStyle?: GraphDrawStyle;
126
+ gradientMode?: GraphGradientMode;
127
+ thresholdsStyle?: GraphThresholdsStyleConfig;
128
+ transform?: GraphTransform;
129
+ lineColor?: string;
130
+ lineWidth?: number;
131
+ lineInterpolation?: LineInterpolation;
132
+ lineStyle?: LineStyle;
133
+ fillColor?: string;
134
+ fillOpacity?: number;
135
+ showPoints?: VisibilityMode;
136
+ pointSize?: number;
137
+ pointColor?: string;
138
+ axisPlacement?: AxisPlacement;
139
+ axisColorMode?: AxisColorMode;
140
+ axisLabel?: string;
141
+ axisWidth?: number;
142
+ axisSoftMin?: number;
143
+ axisSoftMax?: number;
144
+ axisGridShow?: boolean;
145
+ scaleDistribution?: ScaleDistributionConfig;
146
+ axisCenteredZero?: boolean;
147
+ barAlignment?: BarAlignment;
148
+ barWidthFactor?: number;
149
+ stacking?: StackingConfig;
150
+ hideFrom?: HideSeriesConfig;
151
+ hideValue?: boolean;
152
+ insertNulls?: boolean | number;
153
+ /**
154
+ * Indicate if null values should be treated as gaps or connected.
155
+ * When the value is a number, it represents the maximum delta in the
156
+ * X axis that should be considered connected. For timeseries, this is milliseconds
157
+ */
158
+ spanNulls?: boolean | number;
159
+ fillBelowTo?: string;
160
+ pointSymbol?: string;
161
+ axisBorderShow?: boolean;
162
+ barMaxWidth?: number;
163
+ }
164
+
165
+ /**
166
+ * Gauge cell options
167
+ */
168
+ export interface TableBarGaugeCellOptions {
169
+ type: TableCellDisplayMode;
170
+ mode?: BarGaugeDisplayMode;
171
+ valueDisplayMode?: BarGaugeValueMode;
172
+ }
173
+
174
+ /**
175
+ * Colored background cell options
176
+ */
177
+ export interface TableColoredBackgroundCellOptions {
178
+ type: TableCellDisplayMode;
179
+ mode?: TableCellBackgroundDisplayMode;
180
+ applyToRow?: boolean;
181
+ wrapText?: boolean;
182
+ }
183
+
184
+ /**
185
+ * Colored text cell options
186
+ */
187
+ export interface TableColorTextCellOptions {
188
+ type: TableCellDisplayMode;
189
+ wrapText?: boolean;
190
+ }
191
+
192
+ /**
193
+ * Json view cell options
194
+ */
195
+ export interface TableImageCellOptions {
196
+ type: TableCellDisplayMode;
197
+ alt?: string;
198
+ title?: string;
199
+ }
200
+
201
+ /**
202
+ * Show data links in the cell
203
+ */
204
+ export interface TableDataLinksCellOptions {
205
+ type: TableCellDisplayMode;
206
+ }
207
+
208
+ /**
209
+ * Show actions in the cell
210
+ */
211
+ export interface TableActionsCellOptions {
212
+ type: TableCellDisplayMode;
213
+ }
214
+
215
+ /**
216
+ * Json view cell options
217
+ */
218
+ export interface TableJsonViewCellOptions {
219
+ type: TableCellDisplayMode;
220
+ }
221
+
222
+ /**
223
+ * TODO docs
224
+ */
225
+ export type GraphDrawStyle = "line" | "bars" | "points";
226
+
227
+ /**
228
+ * TODO docs
229
+ */
230
+ export type GraphGradientMode = "none" | "opacity" | "hue" | "scheme";
231
+
232
+ /**
233
+ * TODO docs
234
+ */
235
+ export interface GraphThresholdsStyleConfig {
236
+ mode: GraphThresholdsStyleMode;
237
+ }
238
+
239
+ /**
240
+ * TODO docs
241
+ */
242
+ export type GraphTransform = "constant" | "negative-Y";
243
+
244
+ /**
245
+ * TODO docs
246
+ */
247
+ export type LineInterpolation = "linear" | "smooth" | "stepBefore" | "stepAfter";
248
+
249
+ /**
250
+ * TODO docs
251
+ */
252
+ export interface LineStyle {
253
+ fill?: "solid" | "dash" | "dot" | "square";
254
+ dash?: number[];
255
+ }
256
+
257
+ /**
258
+ * TODO docs
259
+ */
260
+ export type VisibilityMode = "auto" | "never" | "always";
261
+
262
+ /**
263
+ * TODO docs
264
+ */
265
+ export type AxisPlacement = "auto" | "top" | "right" | "bottom" | "left" | "hidden";
266
+
267
+ /**
268
+ * TODO docs
269
+ */
270
+ export type AxisColorMode = "text" | "series";
271
+
272
+ /**
273
+ * TODO docs
274
+ */
275
+ export interface ScaleDistributionConfig {
276
+ type: ScaleDistribution;
277
+ log?: number;
278
+ linearThreshold?: number;
279
+ }
280
+
281
+ /**
282
+ * TODO docs
283
+ */
284
+ export type BarAlignment = -1 | 0 | 1;
285
+
286
+ /**
287
+ * TODO docs
288
+ */
289
+ export interface StackingConfig {
290
+ mode?: StackingMode;
291
+ group?: string;
292
+ }
293
+
294
+ /**
295
+ * TODO docs
296
+ */
297
+ export interface HideSeriesConfig {
298
+ tooltip: boolean;
299
+ legend: boolean;
300
+ viz: boolean;
301
+ }
302
+
303
+ /**
304
+ * Enum expressing the possible display modes
305
+ * for the bar gauge component of Grafana UI
306
+ */
307
+ export type BarGaugeDisplayMode = "basic" | "lcd" | "gradient";
308
+
309
+ /**
310
+ * Allows for the table cell gauge display type to set the gauge mode.
311
+ */
312
+ export type BarGaugeValueMode = "color" | "text" | "hidden";
313
+
314
+ /**
315
+ * Display mode to the "Colored Background" display
316
+ * mode for table cells. Either displays a solid color (basic mode)
317
+ * or a gradient.
318
+ */
319
+ export type TableCellBackgroundDisplayMode = "basic" | "gradient";
320
+
321
+ /**
322
+ * TODO docs
323
+ */
324
+ export type GraphThresholdsStyleMode = "off" | "line" | "dashed" | "area" | "line+area" | "dashed+area" | "series";
325
+
326
+ /**
327
+ * TODO docs
328
+ */
329
+ export type ScaleDistribution = "linear" | "log" | "ordinal" | "symlog";
330
+
331
+ /**
332
+ * TODO docs
333
+ */
334
+ export type StackingMode = "none" | "normal" | "percent";
@@ -0,0 +1,146 @@
1
+ // Code generated by chant generate from the vendored Grafana schema
2
+ // src/spec/schemas/tempo.jsonschema.json (see src/pin.ts). DO NOT EDIT.
3
+ /* eslint-disable */
4
+
5
+ export interface Dataquery {
6
+ /**
7
+ * A unique identifier for the query within the list of targets.
8
+ * In server side expressions, the refId is used as a variable name to identify results.
9
+ * By default, the UI will assign A->Z; however setting meaningful names may be useful.
10
+ */
11
+ refId?: string | null;
12
+ /**
13
+ * If hide is set to true, Grafana will filter out the response(s) associated with this query before returning it to the panel.
14
+ */
15
+ hide?: boolean;
16
+ /**
17
+ * Specify the query flavor
18
+ * TODO make this required and give it a default
19
+ */
20
+ queryType?: string;
21
+ /**
22
+ * TraceQL query or trace ID
23
+ */
24
+ query?: string;
25
+ /**
26
+ * @deprecated Logfmt query to filter traces by their tags. Example: http.status_code=200 error=true
27
+ */
28
+ search?: string;
29
+ /**
30
+ * @deprecated Query traces by service name
31
+ */
32
+ serviceName?: string;
33
+ /**
34
+ * @deprecated Query traces by span name
35
+ */
36
+ spanName?: string;
37
+ /**
38
+ * @deprecated Define the minimum duration to select traces. Use duration format, for example: 1.2s, 100ms
39
+ */
40
+ minDuration?: string;
41
+ /**
42
+ * @deprecated Define the maximum duration to select traces. Use duration format, for example: 1.2s, 100ms
43
+ */
44
+ maxDuration?: string;
45
+ /**
46
+ * Filters to be included in a PromQL query to select data for the service graph. Example: {client="app",service="app"}. Providing multiple values will produce union of results for each filter, using PromQL OR operator internally.
47
+ */
48
+ serviceMapQuery?: string | string[];
49
+ /**
50
+ * Use service.namespace in addition to service.name to uniquely identify a service.
51
+ */
52
+ serviceMapIncludeNamespace?: boolean;
53
+ /**
54
+ * Defines the maximum number of traces that are returned from Tempo
55
+ */
56
+ limit?: number;
57
+ /**
58
+ * Defines the maximum number of spans per spanset that are returned from Tempo
59
+ */
60
+ spss?: number;
61
+ filters: TraceqlFilter[];
62
+ /**
63
+ * Filters that are used to query the metrics summary
64
+ */
65
+ groupBy?: TraceqlFilter[];
66
+ /**
67
+ * The type of the table that is used to display the search results
68
+ */
69
+ tableType?: SearchTableType;
70
+ /**
71
+ * For metric queries, the step size to use
72
+ */
73
+ step?: string;
74
+ /**
75
+ * For metric queries, how many exemplars to request, 0 means no exemplars
76
+ */
77
+ exemplars?: number;
78
+ /**
79
+ * For mixed data sources the selected datasource is on the query level.
80
+ * For non mixed scenarios this is undefined.
81
+ * TODO find a better way to do this ^ that's friendly to schema
82
+ * TODO this shouldn't be unknown but DataSourceRef | null
83
+ */
84
+ datasource?: DataSourceRef;
85
+ /**
86
+ * For metric queries, whether to run instant or range queries
87
+ */
88
+ metricsQueryType?: MetricsQueryType;
89
+ }
90
+
91
+ export interface TraceqlFilter {
92
+ /**
93
+ * Uniquely identify the filter, will not be used in the query generation
94
+ */
95
+ id: string;
96
+ /**
97
+ * The tag for the search filter, for example: .http.status_code, .service.name, status
98
+ */
99
+ tag?: string;
100
+ /**
101
+ * The operator that connects the tag to the value, for example: =, >, !=, =~
102
+ */
103
+ operator?: string;
104
+ /**
105
+ * The value for the search filter
106
+ */
107
+ value?: string | string[];
108
+ /**
109
+ * The type of the value, used for example to check whether we need to wrap the value in quotes when generating the query
110
+ */
111
+ valueType?: string;
112
+ /**
113
+ * The scope of the filter, can either be unscoped/all scopes, resource or span
114
+ */
115
+ scope?: TraceqlSearchScope;
116
+ }
117
+
118
+ /**
119
+ * static fields are pre-set in the UI, dynamic fields are added by the user
120
+ */
121
+ export type TraceqlSearchScope = "intrinsic" | "unscoped" | "event" | "instrumentation" | "link" | "resource" | "span";
122
+
123
+ /**
124
+ * The type of the table that is used to display the search results
125
+ */
126
+ export type SearchTableType = "traces" | "spans" | "raw";
127
+
128
+ export type MetricsQueryType = "range" | "instant";
129
+
130
+ export type TempoQueryType = "traceql" | "traceqlSearch" | "serviceMap" | "upload" | "nativeSearch" | "traceId" | "clear";
131
+
132
+ /**
133
+ * The state of the TraceQL streaming search query
134
+ */
135
+ export type SearchStreamingState = "pending" | "streaming" | "done" | "error";
136
+
137
+ export interface DataSourceRef {
138
+ /**
139
+ * The plugin type-id
140
+ */
141
+ type?: string;
142
+ /**
143
+ * Specific datasource instance
144
+ */
145
+ uid?: string;
146
+ }
@@ -0,0 +1,22 @@
1
+ // Code generated by chant generate from the vendored Grafana schema
2
+ // src/spec/schemas/text.jsonschema.json (see src/pin.ts). DO NOT EDIT.
3
+ /* eslint-disable */
4
+
5
+ export type TextMode = "html" | "markdown" | "code";
6
+
7
+ export type CodeLanguage = "json" | "yaml" | "xml" | "typescript" | "sql" | "go" | "markdown" | "html" | "plaintext";
8
+
9
+ export interface CodeOptions {
10
+ /**
11
+ * The language passed to monaco code editor
12
+ */
13
+ language: CodeLanguage;
14
+ showLineNumbers: boolean;
15
+ showMiniMap: boolean;
16
+ }
17
+
18
+ export interface Options {
19
+ mode: TextMode;
20
+ code?: CodeOptions;
21
+ content: string;
22
+ }