@cloudcare/guance-front-tools 1.0.11 → 1.0.13

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 (54) hide show
  1. package/README.md +8 -0
  2. package/guance-all-charts.json +3415 -0
  3. package/lib/cjs/generated/dashboardCharts.d.ts +54 -13
  4. package/lib/cjs/scripts/grafana-covert-to-guance-core.d.ts +4 -0
  5. package/lib/cjs/scripts/grafana-covert-to-guance-core.js +10 -0
  6. package/lib/cjs/scripts/grafana-dashbord.d.ts +2220 -0
  7. package/lib/cjs/scripts/grafana-dashbord.js +4 -0
  8. package/lib/cjs/src/grafana-covert-to-guance.d.ts +2 -0
  9. package/lib/cjs/src/grafana-covert-to-guance.js +5 -0
  10. package/lib/cjs/src/index.d.ts +1 -0
  11. package/lib/cjs/src/index.js +1 -0
  12. package/lib/esm/generated/dashboardCharts.d.ts +54 -13
  13. package/lib/esm/scripts/grafana-covert-to-guance-core.d.ts +4 -0
  14. package/lib/esm/scripts/grafana-covert-to-guance-core.js +7 -0
  15. package/lib/esm/scripts/grafana-dashbord.d.ts +2220 -0
  16. package/lib/esm/scripts/grafana-dashbord.js +1 -0
  17. package/lib/esm/src/grafana-covert-to-guance.d.ts +2 -0
  18. package/lib/esm/src/grafana-covert-to-guance.js +1 -0
  19. package/lib/esm/src/index.d.ts +1 -0
  20. package/lib/esm/src/index.js +1 -0
  21. package/lib/example/grafana2.json +878 -0
  22. package/lib/example/guance-dahs-3.json +348 -0
  23. package/lib/scripts/grafana-covert-to-guance-core.js +7 -0
  24. package/lib/scripts/grafana-covert-to-guance-core.ts +23 -0
  25. package/lib/scripts/grafana-covert-to-guance.js +52 -397
  26. package/lib/scripts/grafana-covert-to-guance.ts +58 -410
  27. package/lib/src/grafana-covert-to-guance.ts +7 -0
  28. package/lib/src/index.ts +1 -0
  29. package/package.json +6 -4
  30. package/schemas/charts/chart-schema.json +8 -5
  31. package/schemas/charts/common/chart-link-item-schema.json +48 -0
  32. package/schemas/charts/common/chart-links-schema.json +9 -0
  33. package/schemas/charts/common/common-chart-types-schema.json +3 -1
  34. package/schemas/charts/dashboard-schema.json +11 -4
  35. package/schemas/charts/query/query-item-schema.json +19 -1
  36. package/schemas/charts/settings/settings-time-schema.json +1 -5
  37. package/schemas/charts/settings/settings-unit-items-schema.json +3 -1
  38. package/schemas/charts/settings/settings-units-schema.json +2 -3
  39. package/scripts/validate-file.mjs +57 -0
  40. package/skills/grafana-to-guance-dashboard/SKILL.md +102 -0
  41. package/skills/grafana-to-guance-dashboard/agents/openai.yaml +4 -0
  42. package/skills/grafana-to-guance-dashboard/references/converter-notes.md +134 -0
  43. package/skills/grafana-to-guance-dashboard/scripts/convert-grafana-dashboard.mjs +1899 -0
  44. package/test/cli.test.mjs +373 -0
  45. package/test-output/grafana2.cli.guance.json +1029 -0
  46. package/test-output/grafana2.guance.json +1029 -0
  47. package/test-output/grafana2.keep-meta.guance.json +1384 -0
  48. package/test-output/pod.guance.json +2153 -0
  49. package/test-output/skill-test2-enhanced.guance.json +21596 -0
  50. package/test-output/skill-test2-validated.guance.json +11610 -0
  51. package/test-output/skill-test2.guance.json +11610 -0
  52. package/test-output/test.guance.json +1086 -0
  53. package/test-output/test2.guance.guance-promql.json +23212 -0
  54. package/test-output/test2.guance.json +17554 -0
@@ -0,0 +1,2220 @@
1
+ /**
2
+ * A topic is attached to DataFrame metadata in query results.
3
+ * This specifies where the data should be used.
4
+ */
5
+ declare enum DataTopic {
6
+ AlertStates = "alertStates",
7
+ Annotations = "annotations",
8
+ Series = "series"
9
+ }
10
+ /**
11
+ * TODO docs
12
+ */
13
+ interface DataSourceJsonData {
14
+ alertmanagerUid?: string;
15
+ authType?: string;
16
+ defaultRegion?: string;
17
+ manageAlerts?: boolean;
18
+ profile?: string;
19
+ }
20
+ /**
21
+ * These are the common properties available to all queries in all datasources.
22
+ * Specific implementations will *extend* this interface, adding the required
23
+ * properties for the given context.
24
+ */
25
+ interface DataQuery$1 {
26
+ /**
27
+ * For mixed data sources the selected datasource is on the query level.
28
+ * For non mixed scenarios this is undefined.
29
+ * TODO find a better way to do this ^ that's friendly to schema
30
+ * TODO this shouldn't be unknown but DataSourceRef | null
31
+ */
32
+ datasource?: unknown;
33
+ /**
34
+ * If hide is set to true, Grafana will filter out the response(s) associated with this query before returning it to the panel.
35
+ */
36
+ hide?: boolean;
37
+ /**
38
+ * Specify the query flavor
39
+ * TODO make this required and give it a default
40
+ */
41
+ queryType?: string;
42
+ /**
43
+ * A unique identifier for the query within the list of targets.
44
+ * In server side expressions, the refId is used as a variable name to identify results.
45
+ * By default, the UI will assign A->Z; however setting meaningful names may be useful.
46
+ */
47
+ refId: string;
48
+ }
49
+ interface BaseDimensionConfig$1 {
50
+ /**
51
+ * fixed: T -- will be added by each element
52
+ */
53
+ field?: string;
54
+ }
55
+ declare enum ScaleDimensionMode {
56
+ Linear = "linear",
57
+ Quad = "quad"
58
+ }
59
+ interface ScaleDimensionConfig$1 extends BaseDimensionConfig$1 {
60
+ fixed?: number;
61
+ max: number;
62
+ min: number;
63
+ mode?: ScaleDimensionMode;
64
+ }
65
+ interface ColorDimensionConfig$1 extends BaseDimensionConfig$1 {
66
+ fixed?: string;
67
+ }
68
+ declare enum ScalarDimensionMode {
69
+ Clamped = "clamped",
70
+ Mod = "mod"
71
+ }
72
+ interface ScalarDimensionConfig$1 extends BaseDimensionConfig$1 {
73
+ fixed?: number;
74
+ max: number;
75
+ min: number;
76
+ mode?: ScalarDimensionMode;
77
+ }
78
+ declare enum TextDimensionMode {
79
+ Field = "field",
80
+ Fixed = "fixed",
81
+ Template = "template"
82
+ }
83
+ interface TextDimensionConfig$1 extends BaseDimensionConfig$1 {
84
+ fixed?: string;
85
+ mode: TextDimensionMode;
86
+ }
87
+ declare enum ResourceDimensionMode {
88
+ Field = "field",
89
+ Fixed = "fixed",
90
+ Mapping = "mapping"
91
+ }
92
+ interface MapLayerOptions$1 {
93
+ /**
94
+ * Custom options depending on the type
95
+ */
96
+ config?: unknown;
97
+ /**
98
+ * Defines a frame MatcherConfig that may filter data for the given layer
99
+ */
100
+ filterData?: unknown;
101
+ /**
102
+ * Common method to define geometry fields
103
+ */
104
+ location?: FrameGeometrySource;
105
+ /**
106
+ * configured unique display name
107
+ */
108
+ name: string;
109
+ /**
110
+ * Common properties:
111
+ * https://openlayers.org/en/latest/apidoc/module-ol_layer_Base-BaseLayer.html
112
+ * Layer opacity (0-1)
113
+ */
114
+ opacity?: number;
115
+ /**
116
+ * Check tooltip (defaults to true)
117
+ */
118
+ tooltip?: boolean;
119
+ type: string;
120
+ }
121
+ declare enum FrameGeometrySourceMode {
122
+ Auto = "auto",
123
+ Coords = "coords",
124
+ Geohash = "geohash",
125
+ Lookup = "lookup"
126
+ }
127
+ declare enum HeatmapCalculationMode {
128
+ Count = "count",
129
+ Size = "size"
130
+ }
131
+ declare enum HeatmapCellLayout {
132
+ auto = "auto",
133
+ ge = "ge",
134
+ le = "le",
135
+ unknown = "unknown"
136
+ }
137
+ interface HeatmapCalculationBucketConfig {
138
+ /**
139
+ * Sets the bucket calculation mode
140
+ */
141
+ mode?: HeatmapCalculationMode;
142
+ /**
143
+ * Controls the scale of the buckets
144
+ */
145
+ scale?: ScaleDistributionConfig;
146
+ /**
147
+ * The number of buckets to use for the axis in the heatmap
148
+ */
149
+ value?: string;
150
+ }
151
+ declare enum LogsSortOrder {
152
+ Ascending = "Ascending",
153
+ Descending = "Descending"
154
+ }
155
+ /**
156
+ * TODO docs
157
+ */
158
+ declare enum AxisPlacement {
159
+ Auto = "auto",
160
+ Bottom = "bottom",
161
+ Hidden = "hidden",
162
+ Left = "left",
163
+ Right = "right",
164
+ Top = "top"
165
+ }
166
+ /**
167
+ * TODO docs
168
+ */
169
+ declare enum AxisColorMode {
170
+ Series = "series",
171
+ Text = "text"
172
+ }
173
+ /**
174
+ * TODO docs
175
+ */
176
+ declare enum VisibilityMode {
177
+ Always = "always",
178
+ Auto = "auto",
179
+ Never = "never"
180
+ }
181
+ /**
182
+ * TODO docs
183
+ */
184
+ declare enum GraphDrawStyle {
185
+ Bars = "bars",
186
+ Line = "line",
187
+ Points = "points"
188
+ }
189
+ /**
190
+ * TODO docs
191
+ */
192
+ declare enum GraphTransform {
193
+ Constant = "constant",
194
+ NegativeY = "negative-Y"
195
+ }
196
+ /**
197
+ * TODO docs
198
+ */
199
+ declare enum LineInterpolation {
200
+ Linear = "linear",
201
+ Smooth = "smooth",
202
+ StepAfter = "stepAfter",
203
+ StepBefore = "stepBefore"
204
+ }
205
+ /**
206
+ * TODO docs
207
+ */
208
+ declare enum ScaleDistribution {
209
+ Linear = "linear",
210
+ Log = "log",
211
+ Ordinal = "ordinal",
212
+ Symlog = "symlog"
213
+ }
214
+ /**
215
+ * TODO docs
216
+ */
217
+ declare enum GraphGradientMode {
218
+ Hue = "hue",
219
+ None = "none",
220
+ Opacity = "opacity",
221
+ Scheme = "scheme"
222
+ }
223
+ /**
224
+ * TODO docs
225
+ */
226
+ declare enum StackingMode {
227
+ None = "none",
228
+ Normal = "normal",
229
+ Percent = "percent"
230
+ }
231
+ /**
232
+ * TODO docs
233
+ */
234
+ declare enum BarAlignment {
235
+ After = 1,
236
+ Before = -1,
237
+ Center = 0
238
+ }
239
+ /**
240
+ * TODO docs
241
+ */
242
+ declare enum ScaleOrientation {
243
+ Horizontal = 0,
244
+ Vertical = 1
245
+ }
246
+ /**
247
+ * TODO docs
248
+ */
249
+ declare enum ScaleDirection {
250
+ Down = -1,
251
+ Left = -1,
252
+ Right = 1,
253
+ Up = 1
254
+ }
255
+ /**
256
+ * TODO docs
257
+ */
258
+ interface LineStyle {
259
+ dash?: Array<number>;
260
+ fill?: 'solid' | 'dash' | 'dot' | 'square';
261
+ }
262
+ declare const defaultLineStyle: Partial<LineStyle>;
263
+ /**
264
+ * TODO docs
265
+ */
266
+ interface LineConfig {
267
+ lineColor?: string;
268
+ lineInterpolation?: LineInterpolation;
269
+ lineStyle?: LineStyle;
270
+ lineWidth?: number;
271
+ /**
272
+ * Indicate if null values should be treated as gaps or connected.
273
+ * When the value is a number, it represents the maximum delta in the
274
+ * X axis that should be considered connected. For timeseries, this is milliseconds
275
+ */
276
+ spanNulls?: boolean | number;
277
+ }
278
+ /**
279
+ * TODO docs
280
+ */
281
+ interface BarConfig {
282
+ barAlignment?: BarAlignment;
283
+ barMaxWidth?: number;
284
+ barWidthFactor?: number;
285
+ }
286
+ /**
287
+ * TODO docs
288
+ */
289
+ interface FillConfig {
290
+ fillBelowTo?: string;
291
+ fillColor?: string;
292
+ fillOpacity?: number;
293
+ }
294
+ /**
295
+ * TODO docs
296
+ */
297
+ interface PointsConfig {
298
+ pointColor?: string;
299
+ pointSize?: number;
300
+ pointSymbol?: string;
301
+ showPoints?: VisibilityMode;
302
+ }
303
+ /**
304
+ * TODO docs
305
+ */
306
+ interface ScaleDistributionConfig {
307
+ linearThreshold?: number;
308
+ log?: number;
309
+ type: ScaleDistribution;
310
+ }
311
+ /**
312
+ * TODO docs
313
+ */
314
+ interface AxisConfig {
315
+ axisBorderShow?: boolean;
316
+ axisCenteredZero?: boolean;
317
+ axisColorMode?: AxisColorMode;
318
+ axisGridShow?: boolean;
319
+ axisLabel?: string;
320
+ axisPlacement?: AxisPlacement;
321
+ axisSoftMax?: number;
322
+ axisSoftMin?: number;
323
+ axisWidth?: number;
324
+ scaleDistribution?: ScaleDistributionConfig;
325
+ }
326
+ /**
327
+ * TODO docs
328
+ */
329
+ interface HideSeriesConfig {
330
+ legend: boolean;
331
+ tooltip: boolean;
332
+ viz: boolean;
333
+ }
334
+ /**
335
+ * TODO docs
336
+ */
337
+ interface StackingConfig {
338
+ group?: string;
339
+ mode?: StackingMode;
340
+ }
341
+ /**
342
+ * TODO docs
343
+ */
344
+ interface StackableFieldConfig {
345
+ stacking?: StackingConfig;
346
+ }
347
+ /**
348
+ * TODO docs
349
+ */
350
+ interface HideableFieldConfig {
351
+ hideFrom?: HideSeriesConfig;
352
+ }
353
+ /**
354
+ * TODO docs
355
+ */
356
+ declare enum GraphThresholdsStyleMode {
357
+ Area = "area",
358
+ Dashed = "dashed",
359
+ DashedAndArea = "dashed+area",
360
+ Line = "line",
361
+ LineAndArea = "line+area",
362
+ Off = "off",
363
+ Series = "series"
364
+ }
365
+ /**
366
+ * TODO docs
367
+ */
368
+ interface GraphThresholdsStyleConfig {
369
+ mode: GraphThresholdsStyleMode;
370
+ }
371
+ /**
372
+ * TODO docs
373
+ */
374
+ type LegendPlacement = 'bottom' | 'right';
375
+ /**
376
+ * TODO docs
377
+ * Note: "hidden" needs to remain as an option for plugins compatibility
378
+ */
379
+ declare enum LegendDisplayMode {
380
+ Hidden = "hidden",
381
+ List = "list",
382
+ Table = "table"
383
+ }
384
+ /**
385
+ * TODO docs
386
+ */
387
+ interface SingleStatBaseOptions extends OptionsWithTextFormatting {
388
+ orientation: VizOrientation;
389
+ reduceOptions: ReduceDataOptions;
390
+ }
391
+ /**
392
+ * TODO docs
393
+ */
394
+ interface ReduceDataOptions {
395
+ /**
396
+ * When !values, pick one value for the whole field
397
+ */
398
+ calcs: Array<string>;
399
+ /**
400
+ * Which fields to show. By default this is only numeric fields
401
+ */
402
+ fields?: string;
403
+ /**
404
+ * if showing all values limit
405
+ */
406
+ limit?: number;
407
+ /**
408
+ * If true show each row value
409
+ */
410
+ values?: boolean;
411
+ }
412
+ declare const defaultReduceDataOptions: Partial<ReduceDataOptions>;
413
+ /**
414
+ * TODO docs
415
+ */
416
+ declare enum VizOrientation {
417
+ Auto = "auto",
418
+ Horizontal = "horizontal",
419
+ Vertical = "vertical"
420
+ }
421
+ /**
422
+ * TODO docs
423
+ */
424
+ interface OptionsWithTooltip {
425
+ tooltip: VizTooltipOptions;
426
+ }
427
+ /**
428
+ * TODO docs
429
+ */
430
+ interface OptionsWithLegend {
431
+ legend: VizLegendOptions;
432
+ }
433
+ /**
434
+ * TODO docs
435
+ */
436
+ interface OptionsWithTimezones {
437
+ timezone?: Array<TimeZone>;
438
+ }
439
+ declare const defaultOptionsWithTimezones: Partial<OptionsWithTimezones>;
440
+ /**
441
+ * TODO docs
442
+ */
443
+ interface OptionsWithTextFormatting {
444
+ text?: VizTextDisplayOptions;
445
+ }
446
+ /**
447
+ * TODO docs
448
+ */
449
+ declare enum BigValueColorMode {
450
+ Background = "background",
451
+ BackgroundSolid = "background_solid",
452
+ None = "none",
453
+ Value = "value"
454
+ }
455
+ /**
456
+ * TODO docs
457
+ */
458
+ declare enum BigValueGraphMode {
459
+ Area = "area",
460
+ Line = "line",
461
+ None = "none"
462
+ }
463
+ /**
464
+ * TODO docs
465
+ */
466
+ declare enum BigValueJustifyMode {
467
+ Auto = "auto",
468
+ Center = "center"
469
+ }
470
+ /**
471
+ * TODO docs
472
+ */
473
+ declare enum BigValueTextMode {
474
+ Auto = "auto",
475
+ Name = "name",
476
+ None = "none",
477
+ Value = "value",
478
+ ValueAndName = "value_and_name"
479
+ }
480
+ /**
481
+ * TODO docs
482
+ */
483
+ declare enum PercentChangeColorMode {
484
+ Inverted = "inverted",
485
+ SameAsValue = "same_as_value",
486
+ Standard = "standard"
487
+ }
488
+ /**
489
+ * TODO -- should not be table specific!
490
+ * TODO docs
491
+ */
492
+ type FieldTextAlignment = 'auto' | 'left' | 'right' | 'center';
493
+ /**
494
+ * Controls the value alignment in the TimelineChart component
495
+ */
496
+ type TimelineValueAlignment = 'center' | 'left' | 'right';
497
+ /**
498
+ * TODO docs
499
+ */
500
+ interface VizTextDisplayOptions {
501
+ /**
502
+ * Explicit title text size
503
+ */
504
+ titleSize?: number;
505
+ /**
506
+ * Explicit value text size
507
+ */
508
+ valueSize?: number;
509
+ }
510
+ /**
511
+ * TODO docs
512
+ */
513
+ declare enum TooltipDisplayMode {
514
+ Multi = "multi",
515
+ None = "none",
516
+ Single = "single"
517
+ }
518
+ /**
519
+ * TODO docs
520
+ */
521
+ declare enum SortOrder {
522
+ Ascending = "asc",
523
+ Descending = "desc",
524
+ None = "none"
525
+ }
526
+ /**
527
+ * TODO docs
528
+ */
529
+ interface GraphFieldConfig extends LineConfig, FillConfig, PointsConfig, AxisConfig, BarConfig, StackableFieldConfig, HideableFieldConfig {
530
+ drawStyle?: GraphDrawStyle;
531
+ gradientMode?: GraphGradientMode;
532
+ insertNulls?: boolean | number;
533
+ thresholdsStyle?: GraphThresholdsStyleConfig;
534
+ transform?: GraphTransform;
535
+ }
536
+ /**
537
+ * TODO docs
538
+ */
539
+ interface VizLegendOptions {
540
+ asTable?: boolean;
541
+ calcs: Array<string>;
542
+ displayMode: LegendDisplayMode;
543
+ isVisible?: boolean;
544
+ placement: LegendPlacement;
545
+ showLegend: boolean;
546
+ sortBy?: string;
547
+ sortDesc?: boolean;
548
+ width?: number;
549
+ }
550
+ declare const defaultVizLegendOptions: Partial<VizLegendOptions>;
551
+ /**
552
+ * Enum expressing the possible display modes
553
+ * for the bar gauge component of Grafana UI
554
+ */
555
+ declare enum BarGaugeDisplayMode {
556
+ Basic = "basic",
557
+ Gradient = "gradient",
558
+ Lcd = "lcd"
559
+ }
560
+ /**
561
+ * Allows for the table cell gauge display type to set the gauge mode.
562
+ */
563
+ declare enum BarGaugeValueMode {
564
+ Color = "color",
565
+ Hidden = "hidden",
566
+ Text = "text"
567
+ }
568
+ /**
569
+ * Allows for the bar gauge name to be placed explicitly
570
+ */
571
+ declare enum BarGaugeNamePlacement {
572
+ Auto = "auto",
573
+ Left = "left",
574
+ Top = "top"
575
+ }
576
+ /**
577
+ * Allows for the bar gauge size to be set explicitly
578
+ */
579
+ declare enum BarGaugeSizing {
580
+ Auto = "auto",
581
+ Manual = "manual"
582
+ }
583
+ /**
584
+ * TODO docs
585
+ */
586
+ interface VizTooltipOptions {
587
+ maxHeight?: number;
588
+ maxWidth?: number;
589
+ mode: TooltipDisplayMode;
590
+ sort: SortOrder;
591
+ }
592
+ interface Labels {
593
+ }
594
+ /**
595
+ * Internally, this is the "type" of cell that's being displayed
596
+ * in the table such as colored text, JSON, gauge, etc.
597
+ * The color-background-solid, gradient-gauge, and lcd-gauge
598
+ * modes are deprecated in favor of new cell subOptions
599
+ */
600
+ declare enum TableCellDisplayMode {
601
+ Auto = "auto",
602
+ BasicGauge = "basic",
603
+ ColorBackground = "color-background",
604
+ ColorBackgroundSolid = "color-background-solid",
605
+ ColorText = "color-text",
606
+ Custom = "custom",
607
+ DataLinks = "data-links",
608
+ Gauge = "gauge",
609
+ GradientGauge = "gradient-gauge",
610
+ Image = "image",
611
+ JSONView = "json-view",
612
+ LcdGauge = "lcd-gauge",
613
+ Sparkline = "sparkline"
614
+ }
615
+ /**
616
+ * Display mode to the "Colored Background" display
617
+ * mode for table cells. Either displays a solid color (basic mode)
618
+ * or a gradient.
619
+ */
620
+ declare enum TableCellBackgroundDisplayMode {
621
+ Basic = "basic",
622
+ Gradient = "gradient"
623
+ }
624
+ /**
625
+ * Sort by field state
626
+ */
627
+ interface TableSortByFieldState {
628
+ /**
629
+ * Flag used to indicate descending sort order
630
+ */
631
+ desc?: boolean;
632
+ /**
633
+ * Sets the display name of the field to sort by
634
+ */
635
+ displayName: string;
636
+ }
637
+ /**
638
+ * Footer options
639
+ */
640
+ interface TableFooterOptions {
641
+ countRows?: boolean;
642
+ enablePagination?: boolean;
643
+ fields?: Array<string>;
644
+ reducer: Array<string>;
645
+ show: boolean;
646
+ }
647
+ declare const defaultTableFooterOptions: Partial<TableFooterOptions>;
648
+ /**
649
+ * Auto mode table cell options
650
+ */
651
+ interface TableAutoCellOptions {
652
+ type: TableCellDisplayMode.Auto;
653
+ wrapText?: boolean;
654
+ }
655
+ /**
656
+ * Colored text cell options
657
+ */
658
+ interface TableColorTextCellOptions {
659
+ type: TableCellDisplayMode.ColorText;
660
+ wrapText?: boolean;
661
+ }
662
+ /**
663
+ * Json view cell options
664
+ */
665
+ interface TableJsonViewCellOptions {
666
+ type: TableCellDisplayMode.JSONView;
667
+ }
668
+ /**
669
+ * Json view cell options
670
+ */
671
+ interface TableImageCellOptions {
672
+ alt?: string;
673
+ title?: string;
674
+ type: TableCellDisplayMode.Image;
675
+ }
676
+ /**
677
+ * Show data links in the cell
678
+ */
679
+ interface TableDataLinksCellOptions {
680
+ type: TableCellDisplayMode.DataLinks;
681
+ }
682
+ /**
683
+ * Gauge cell options
684
+ */
685
+ interface TableBarGaugeCellOptions {
686
+ mode?: BarGaugeDisplayMode;
687
+ type: TableCellDisplayMode.Gauge;
688
+ valueDisplayMode?: BarGaugeValueMode;
689
+ }
690
+ /**
691
+ * Sparkline cell options
692
+ */
693
+ interface TableSparklineCellOptions extends GraphFieldConfig {
694
+ hideValue?: boolean;
695
+ type: TableCellDisplayMode.Sparkline;
696
+ }
697
+ /**
698
+ * Colored background cell options
699
+ */
700
+ interface TableColoredBackgroundCellOptions {
701
+ applyToRow?: boolean;
702
+ mode?: TableCellBackgroundDisplayMode;
703
+ type: TableCellDisplayMode.ColorBackground;
704
+ wrapText?: boolean;
705
+ }
706
+ /**
707
+ * Height of a table cell
708
+ */
709
+ declare enum TableCellHeight {
710
+ Auto = "auto",
711
+ Lg = "lg",
712
+ Md = "md",
713
+ Sm = "sm"
714
+ }
715
+ /**
716
+ * Table cell options. Each cell has a display mode
717
+ * and other potential options for that display.
718
+ */
719
+ type TableCellOptions = TableAutoCellOptions | TableSparklineCellOptions | TableBarGaugeCellOptions | TableColoredBackgroundCellOptions | TableColorTextCellOptions | TableImageCellOptions | TableDataLinksCellOptions | TableJsonViewCellOptions;
720
+ /**
721
+ * Use UTC/GMT timezone
722
+ */
723
+ type TimeZoneUtc = 'utc';
724
+ /**
725
+ * Use the timezone defined by end user web browser
726
+ */
727
+ type TimeZoneBrowser = 'browser';
728
+ /**
729
+ * Optional formats for the template variable replace functions
730
+ * See also https://grafana.com/docs/grafana/latest/dashboards/variables/variable-syntax/#advanced-variable-format-options
731
+ */
732
+ declare enum VariableFormatID {
733
+ CSV = "csv",
734
+ Date = "date",
735
+ Distributed = "distributed",
736
+ DoubleQuote = "doublequote",
737
+ Glob = "glob",
738
+ HTML = "html",
739
+ JSON = "json",
740
+ Lucene = "lucene",
741
+ PercentEncode = "percentencode",
742
+ Pipe = "pipe",
743
+ QueryParam = "queryparam",
744
+ Raw = "raw",
745
+ Regex = "regex",
746
+ SQLString = "sqlstring",
747
+ SingleQuote = "singlequote",
748
+ Text = "text",
749
+ UriEncode = "uriencode"
750
+ }
751
+ interface DataSourceRef$1 {
752
+ /**
753
+ * Datasource API version
754
+ */
755
+ apiVersion?: string;
756
+ /**
757
+ * The plugin type-id
758
+ */
759
+ type?: string;
760
+ /**
761
+ * Specific datasource instance
762
+ */
763
+ uid?: string;
764
+ }
765
+ /**
766
+ * Links to a resource (image/svg path)
767
+ */
768
+ interface ResourceDimensionConfig$1 extends BaseDimensionConfig$1 {
769
+ fixed?: string;
770
+ mode: ResourceDimensionMode;
771
+ }
772
+ interface FrameGeometrySource {
773
+ /**
774
+ * Path to Gazetteer
775
+ */
776
+ gazetteer?: string;
777
+ /**
778
+ * Field mappings
779
+ */
780
+ geohash?: string;
781
+ latitude?: string;
782
+ longitude?: string;
783
+ lookup?: string;
784
+ mode: FrameGeometrySourceMode;
785
+ wkt?: string;
786
+ }
787
+ interface HeatmapCalculationOptions {
788
+ /**
789
+ * The number of buckets to use for the xAxis in the heatmap
790
+ */
791
+ xBuckets?: HeatmapCalculationBucketConfig;
792
+ /**
793
+ * The number of buckets to use for the yAxis in the heatmap
794
+ */
795
+ yBuckets?: HeatmapCalculationBucketConfig;
796
+ }
797
+ declare enum LogsDedupStrategy {
798
+ exact = "exact",
799
+ none = "none",
800
+ numbers = "numbers",
801
+ signature = "signature"
802
+ }
803
+ /**
804
+ * Compare two values
805
+ */
806
+ declare enum ComparisonOperation {
807
+ EQ = "eq",
808
+ GT = "gt",
809
+ GTE = "gte",
810
+ LT = "lt",
811
+ LTE = "lte",
812
+ NEQ = "neq"
813
+ }
814
+ /**
815
+ * Field options for each field within a table (e.g 10, "The String", 64.20, etc.)
816
+ * Generally defines alignment, filtering capabilties, display options, etc.
817
+ */
818
+ interface TableFieldOptions {
819
+ align: FieldTextAlignment;
820
+ cellOptions: TableCellOptions;
821
+ /**
822
+ * This field is deprecated in favor of using cellOptions
823
+ */
824
+ displayMode?: TableCellDisplayMode;
825
+ filterable?: boolean;
826
+ hidden?: boolean;
827
+ /**
828
+ * Hides any header for a column, useful for columns that show some static content or buttons.
829
+ */
830
+ hideHeader?: boolean;
831
+ inspect: boolean;
832
+ minWidth?: number;
833
+ width?: number;
834
+ }
835
+ /**
836
+ * A specific timezone from https://en.wikipedia.org/wiki/Tz_database
837
+ */
838
+ type TimeZone = TimeZoneUtc | TimeZoneBrowser | string;
839
+ declare const defaultTimeZone: TimeZone;
840
+ /**
841
+ * TODO: this should be a regular DataQuery that depends on the selected dashboard
842
+ * these match the properties of the "grafana" datasouce that is default in most dashboards
843
+ */
844
+ interface AnnotationTarget {
845
+ /**
846
+ * Only required/valid for the grafana datasource...
847
+ * but code+tests is already depending on it so hard to change
848
+ */
849
+ limit: number;
850
+ /**
851
+ * Only required/valid for the grafana datasource...
852
+ * but code+tests is already depending on it so hard to change
853
+ */
854
+ matchAny: boolean;
855
+ /**
856
+ * Only required/valid for the grafana datasource...
857
+ * but code+tests is already depending on it so hard to change
858
+ */
859
+ tags: Array<string>;
860
+ /**
861
+ * Only required/valid for the grafana datasource...
862
+ * but code+tests is already depending on it so hard to change
863
+ */
864
+ type: string;
865
+ }
866
+ declare const defaultAnnotationTarget: Partial<AnnotationTarget>;
867
+ interface AnnotationPanelFilter {
868
+ /**
869
+ * Should the specified panels be included or excluded
870
+ */
871
+ exclude?: boolean;
872
+ /**
873
+ * Panel IDs that should be included or excluded
874
+ */
875
+ ids: Array<number>;
876
+ }
877
+ declare const defaultAnnotationPanelFilter: Partial<AnnotationPanelFilter>;
878
+ /**
879
+ * Contains the list of annotations that are associated with the dashboard.
880
+ * Annotations are used to overlay event markers and overlay event tags on graphs.
881
+ * Grafana comes with a native annotation store and the ability to add annotation events directly from the graph panel or via the HTTP API.
882
+ * See https://grafana.com/docs/grafana/latest/dashboards/build-dashboards/annotate-visualizations/
883
+ */
884
+ interface AnnotationContainer$1 {
885
+ /**
886
+ * List of annotations
887
+ */
888
+ list?: Array<AnnotationQuery$1>;
889
+ }
890
+ /**
891
+ * TODO docs
892
+ * FROM: AnnotationQuery in grafana-data/src/types/annotations.ts
893
+ */
894
+ interface AnnotationQuery$1 {
895
+ /**
896
+ * Set to 1 for the standard annotation query all dashboards have by default.
897
+ */
898
+ builtIn?: number;
899
+ /**
900
+ * Datasource where the annotations data is
901
+ */
902
+ datasource: DataSourceRef;
903
+ /**
904
+ * When enabled the annotation query is issued with every dashboard refresh
905
+ */
906
+ enable: boolean;
907
+ /**
908
+ * Filters to apply when fetching annotations
909
+ */
910
+ filter?: AnnotationPanelFilter;
911
+ /**
912
+ * Annotation queries can be toggled on or off at the top of the dashboard.
913
+ * When hide is true, the toggle is not shown in the dashboard.
914
+ */
915
+ hide?: boolean;
916
+ /**
917
+ * Color to use for the annotation event markers
918
+ */
919
+ iconColor: string;
920
+ /**
921
+ * Name of annotation.
922
+ */
923
+ name: string;
924
+ /**
925
+ * TODO.. this should just be a normal query target
926
+ */
927
+ target?: AnnotationTarget;
928
+ /**
929
+ * TODO -- this should not exist here, it is based on the --grafana-- datasource
930
+ */
931
+ type?: string;
932
+ }
933
+ /**
934
+ * A variable is a placeholder for a value. You can use variables in metric queries and in panel titles.
935
+ */
936
+ interface VariableModel$1 {
937
+ /**
938
+ * Custom all value
939
+ */
940
+ allValue?: string;
941
+ /**
942
+ * Shows current selected variable text/value on the dashboard
943
+ */
944
+ current?: VariableOption;
945
+ /**
946
+ * Data source used to fetch values for a variable. It can be defined but `null`.
947
+ */
948
+ datasource?: DataSourceRef;
949
+ /**
950
+ * Description of variable. It can be defined but `null`.
951
+ */
952
+ description?: string;
953
+ /**
954
+ * Visibility configuration for the variable
955
+ */
956
+ hide?: VariableHide$1;
957
+ /**
958
+ * Whether all value option is available or not
959
+ */
960
+ includeAll?: boolean;
961
+ /**
962
+ * Optional display name
963
+ */
964
+ label?: string;
965
+ /**
966
+ * Whether multiple values can be selected or not from variable value list
967
+ */
968
+ multi?: boolean;
969
+ /**
970
+ * Name of variable
971
+ */
972
+ name: string;
973
+ /**
974
+ * Options that can be selected for a variable.
975
+ */
976
+ options?: Array<VariableOption>;
977
+ /**
978
+ * Query used to fetch values for a variable
979
+ */
980
+ query?: string | Record<string, unknown>;
981
+ /**
982
+ * Options to config when to refresh a variable
983
+ */
984
+ refresh?: VariableRefresh;
985
+ /**
986
+ * Optional field, if you want to extract part of a series name or metric node segment.
987
+ * Named capture groups can be used to separate the display text and value.
988
+ */
989
+ regex?: string;
990
+ /**
991
+ * Whether the variable value should be managed by URL query params or not
992
+ */
993
+ skipUrlSync?: boolean;
994
+ /**
995
+ * Options sort order
996
+ */
997
+ sort?: VariableSort;
998
+ /**
999
+ * Type of variable
1000
+ */
1001
+ type: VariableType;
1002
+ }
1003
+ /**
1004
+ * Option to be selected in a variable.
1005
+ */
1006
+ interface VariableOption {
1007
+ /**
1008
+ * Whether the option is selected or not
1009
+ */
1010
+ selected?: boolean;
1011
+ /**
1012
+ * Text to be displayed for the option
1013
+ */
1014
+ text: string | Array<string>;
1015
+ /**
1016
+ * Value of the option
1017
+ */
1018
+ value: string | Array<string>;
1019
+ }
1020
+ /**
1021
+ * Options to config when to refresh a variable
1022
+ * `0`: Never refresh the variable
1023
+ * `1`: Queries the data source every time the dashboard loads.
1024
+ * `2`: Queries the data source when the dashboard time range changes.
1025
+ */
1026
+ declare enum VariableRefresh {
1027
+ never = 0,
1028
+ onDashboardLoad = 1,
1029
+ onTimeRangeChanged = 2
1030
+ }
1031
+ /**
1032
+ * Determine if the variable shows on dashboard
1033
+ * Accepted values are 0 (show label and value), 1 (show value only), 2 (show nothing).
1034
+ */
1035
+ declare enum VariableHide$1 {
1036
+ dontHide = 0,
1037
+ hideLabel = 1,
1038
+ hideVariable = 2
1039
+ }
1040
+ /**
1041
+ * Sort variable options
1042
+ * Accepted values are:
1043
+ * `0`: No sorting
1044
+ * `1`: Alphabetical ASC
1045
+ * `2`: Alphabetical DESC
1046
+ * `3`: Numerical ASC
1047
+ * `4`: Numerical DESC
1048
+ * `5`: Alphabetical Case Insensitive ASC
1049
+ * `6`: Alphabetical Case Insensitive DESC
1050
+ * `7`: Natural ASC
1051
+ * `8`: Natural DESC
1052
+ */
1053
+ declare enum VariableSort {
1054
+ alphabeticalAsc = 1,
1055
+ alphabeticalCaseInsensitiveAsc = 5,
1056
+ alphabeticalCaseInsensitiveDesc = 6,
1057
+ alphabeticalDesc = 2,
1058
+ disabled = 0,
1059
+ naturalAsc = 7,
1060
+ naturalDesc = 8,
1061
+ numericalAsc = 3,
1062
+ numericalDesc = 4
1063
+ }
1064
+ /**
1065
+ * Ref to a DataSource instance
1066
+ */
1067
+ interface DataSourceRef {
1068
+ /**
1069
+ * The plugin type-id
1070
+ */
1071
+ type?: string;
1072
+ /**
1073
+ * Specific datasource instance
1074
+ */
1075
+ uid?: string;
1076
+ }
1077
+ /**
1078
+ * Links with references to other dashboards or external resources
1079
+ */
1080
+ interface DashboardLink {
1081
+ /**
1082
+ * 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
1083
+ */
1084
+ asDropdown: boolean;
1085
+ /**
1086
+ * Icon name to be displayed with the link
1087
+ */
1088
+ icon: string;
1089
+ /**
1090
+ * If true, includes current template variables values in the link as query params
1091
+ */
1092
+ includeVars: boolean;
1093
+ /**
1094
+ * If true, includes current time range in the link as query params
1095
+ */
1096
+ keepTime: boolean;
1097
+ /**
1098
+ * List of tags to limit the linked dashboards. If empty, all dashboards will be displayed. Only valid if the type is dashboards
1099
+ */
1100
+ tags: Array<string>;
1101
+ /**
1102
+ * If true, the link will be opened in a new tab
1103
+ */
1104
+ targetBlank: boolean;
1105
+ /**
1106
+ * Title to display with the link
1107
+ */
1108
+ title: string;
1109
+ /**
1110
+ * Tooltip to display when the user hovers their mouse over it
1111
+ */
1112
+ tooltip: string;
1113
+ /**
1114
+ * Link type. Accepted values are dashboards (to refer to another dashboard) and link (to refer to an external resource)
1115
+ */
1116
+ type: DashboardLinkType;
1117
+ /**
1118
+ * Link URL. Only required/valid if the type is link
1119
+ */
1120
+ url?: string;
1121
+ }
1122
+ declare const defaultDashboardLink: Partial<DashboardLink>;
1123
+ /**
1124
+ * Dashboard Link type. Accepted values are dashboards (to refer to another dashboard) and link (to refer to an external resource)
1125
+ */
1126
+ type DashboardLinkType = 'link' | 'dashboards';
1127
+ /**
1128
+ * Dashboard variable type
1129
+ * `query`: Query-generated list of values such as metric names, server names, sensor IDs, data centers, and so on.
1130
+ * `adhoc`: Key/value filters that are automatically added to all metric queries for a data source (Prometheus, Loki, InfluxDB, and Elasticsearch only).
1131
+ * `constant`: Define a hidden constant.
1132
+ * `datasource`: Quickly change the data source for an entire dashboard.
1133
+ * `interval`: Interval variables represent time spans.
1134
+ * `textbox`: Display a free text input field with an optional default value.
1135
+ * `custom`: Define the variable options manually using a comma-separated list.
1136
+ * `system`: Variables defined by Grafana. See: https://grafana.com/docs/grafana/latest/dashboards/variables/add-template-variables/#global-variables
1137
+ */
1138
+ type VariableType = 'query' | 'adhoc' | 'groupby' | 'constant' | 'datasource' | 'interval' | 'textbox' | 'custom' | 'system';
1139
+ /**
1140
+ * Color mode for a field. You can specify a single color, or select a continuous (gradient) color schemes, based on a value.
1141
+ * Continuous color interpolates a color using the percentage of a value relative to min and max.
1142
+ * Accepted values are:
1143
+ * `thresholds`: From thresholds. Informs Grafana to take the color from the matching threshold
1144
+ * `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
1145
+ * `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
1146
+ * `continuous-GrYlRd`: ontinuous Green-Yellow-Red palette mode
1147
+ * `continuous-RdYlGr`: Continuous Red-Yellow-Green palette mode
1148
+ * `continuous-BlYlRd`: Continuous Blue-Yellow-Red palette mode
1149
+ * `continuous-YlRd`: Continuous Yellow-Red palette mode
1150
+ * `continuous-BlPu`: Continuous Blue-Purple palette mode
1151
+ * `continuous-YlBl`: Continuous Yellow-Blue palette mode
1152
+ * `continuous-blues`: Continuous Blue palette mode
1153
+ * `continuous-reds`: Continuous Red palette mode
1154
+ * `continuous-greens`: Continuous Green palette mode
1155
+ * `continuous-purples`: Continuous Purple palette mode
1156
+ * `shades`: Shades of a single color. Specify a single color, useful in an override rule.
1157
+ * `fixed`: Fixed color mode. Specify a single color, useful in an override rule.
1158
+ */
1159
+ declare enum FieldColorModeId {
1160
+ ContinuousBlPu = "continuous-BlPu",
1161
+ ContinuousBlYlRd = "continuous-BlYlRd",
1162
+ ContinuousBlues = "continuous-blues",
1163
+ ContinuousGrYlRd = "continuous-GrYlRd",
1164
+ ContinuousGreens = "continuous-greens",
1165
+ ContinuousPurples = "continuous-purples",
1166
+ ContinuousRdYlGr = "continuous-RdYlGr",
1167
+ ContinuousReds = "continuous-reds",
1168
+ ContinuousYlBl = "continuous-YlBl",
1169
+ ContinuousYlRd = "continuous-YlRd",
1170
+ Fixed = "fixed",
1171
+ PaletteClassic = "palette-classic",
1172
+ PaletteClassicByName = "palette-classic-by-name",
1173
+ Shades = "shades",
1174
+ Thresholds = "thresholds"
1175
+ }
1176
+ /**
1177
+ * 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.
1178
+ */
1179
+ type FieldColorSeriesByMode = 'min' | 'max' | 'last';
1180
+ /**
1181
+ * Map a field to a color.
1182
+ */
1183
+ interface FieldColor {
1184
+ /**
1185
+ * The fixed color value for fixed or shades color modes.
1186
+ */
1187
+ fixedColor?: string;
1188
+ /**
1189
+ * The main color scheme mode.
1190
+ */
1191
+ mode: FieldColorModeId;
1192
+ /**
1193
+ * Some visualizations need to know how to assign a series color from by value color schemes.
1194
+ */
1195
+ seriesBy?: FieldColorSeriesByMode;
1196
+ }
1197
+ /**
1198
+ * Position and dimensions of a panel in the grid
1199
+ */
1200
+ interface GridPos {
1201
+ /**
1202
+ * Panel height. The height is the number of rows from the top edge of the panel.
1203
+ */
1204
+ h: number;
1205
+ /**
1206
+ * Whether the panel is fixed within the grid. If true, the panel will not be affected by other panels' interactions
1207
+ */
1208
+ static?: boolean;
1209
+ /**
1210
+ * Panel width. The width is the number of columns from the left edge of the panel.
1211
+ */
1212
+ w: number;
1213
+ /**
1214
+ * Panel x. The x coordinate is the number of columns from the left edge of the grid
1215
+ */
1216
+ x: number;
1217
+ /**
1218
+ * Panel y. The y coordinate is the number of rows from the top edge of the grid
1219
+ */
1220
+ y: number;
1221
+ }
1222
+ declare const defaultGridPos: Partial<GridPos>;
1223
+ /**
1224
+ * User-defined value for a metric that triggers visual changes in a panel when this value is met or exceeded
1225
+ * They are used to conditionally style and color visualizations based on query results , and can be applied to most visualizations.
1226
+ */
1227
+ interface Threshold {
1228
+ /**
1229
+ * Color represents the color of the visual change that will occur in the dashboard when the threshold value is met or exceeded.
1230
+ */
1231
+ color: string;
1232
+ /**
1233
+ * Value represents a specified metric for the threshold, which triggers a visual change in the dashboard when this value is met or exceeded.
1234
+ * Nulls currently appear here when serializing -Infinity to JSON.
1235
+ */
1236
+ value: number | null;
1237
+ }
1238
+ /**
1239
+ * Thresholds can either be `absolute` (specific number) or `percentage` (relative to min or max, it will be values between 0 and 1).
1240
+ */
1241
+ declare enum ThresholdsMode {
1242
+ Absolute = "absolute",
1243
+ Percentage = "percentage"
1244
+ }
1245
+ /**
1246
+ * Thresholds configuration for the panel
1247
+ */
1248
+ interface ThresholdsConfig {
1249
+ /**
1250
+ * Thresholds mode.
1251
+ */
1252
+ mode: ThresholdsMode;
1253
+ /**
1254
+ * Must be sorted by 'value', first value is always -Infinity
1255
+ */
1256
+ steps: Array<Threshold>;
1257
+ }
1258
+ declare const defaultThresholdsConfig: Partial<ThresholdsConfig>;
1259
+ /**
1260
+ * Allow to transform the visual representation of specific data values in a visualization, irrespective of their original units
1261
+ */
1262
+ type ValueMapping = ValueMap | RangeMap | RegexMap | SpecialValueMap;
1263
+ /**
1264
+ * Supported value mapping types
1265
+ * `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.
1266
+ * `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.
1267
+ * `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.
1268
+ * `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.
1269
+ */
1270
+ declare enum MappingType {
1271
+ RangeToText = "range",
1272
+ RegexToText = "regex",
1273
+ SpecialValue = "special",
1274
+ ValueToText = "value"
1275
+ }
1276
+ /**
1277
+ * Maps text values to a color or different display text and color.
1278
+ * For example, you can configure a value mapping so that all instances of the value 10 appear as Perfection! rather than the number.
1279
+ */
1280
+ interface ValueMap {
1281
+ /**
1282
+ * Map with <value_to_match>: ValueMappingResult. For example: { "10": { text: "Perfection!", color: "green" } }
1283
+ */
1284
+ options: Record<string, ValueMappingResult>;
1285
+ type: MappingType.ValueToText;
1286
+ }
1287
+ /**
1288
+ * Maps numerical ranges to a display text and color.
1289
+ * 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.
1290
+ */
1291
+ interface RangeMap {
1292
+ /**
1293
+ * Range to match against and the result to apply when the value is within the range
1294
+ */
1295
+ options: {
1296
+ /**
1297
+ * Min value of the range. It can be null which means -Infinity
1298
+ */
1299
+ from: number | null;
1300
+ /**
1301
+ * Max value of the range. It can be null which means +Infinity
1302
+ */
1303
+ to: number | null;
1304
+ /**
1305
+ * Config to apply when the value is within the range
1306
+ */
1307
+ result: ValueMappingResult;
1308
+ };
1309
+ type: MappingType.RangeToText;
1310
+ }
1311
+ /**
1312
+ * Maps regular expressions to replacement text and a color.
1313
+ * 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.
1314
+ */
1315
+ interface RegexMap {
1316
+ /**
1317
+ * Regular expression to match against and the result to apply when the value matches the regex
1318
+ */
1319
+ options: {
1320
+ /**
1321
+ * Regular expression to match against
1322
+ */
1323
+ pattern: string;
1324
+ /**
1325
+ * Config to apply when the value matches the regex
1326
+ */
1327
+ result: ValueMappingResult;
1328
+ };
1329
+ type: MappingType.RegexToText;
1330
+ }
1331
+ /**
1332
+ * Maps special values like Null, NaN (not a number), and boolean values like true and false to a display text and color.
1333
+ * See SpecialValueMatch to see the list of special values.
1334
+ * For example, you can configure a special value mapping so that null values appear as N/A.
1335
+ */
1336
+ interface SpecialValueMap {
1337
+ options: {
1338
+ /**
1339
+ * Special value to match against
1340
+ */
1341
+ match: SpecialValueMatch;
1342
+ /**
1343
+ * Config to apply when the value matches the special value
1344
+ */
1345
+ result: ValueMappingResult;
1346
+ };
1347
+ type: MappingType.SpecialValue;
1348
+ }
1349
+ /**
1350
+ * Special value types supported by the `SpecialValueMap`
1351
+ */
1352
+ declare enum SpecialValueMatch {
1353
+ Empty = "empty",
1354
+ False = "false",
1355
+ NaN = "nan",
1356
+ Null = "null",
1357
+ NullAndNan = "null+nan",
1358
+ True = "true"
1359
+ }
1360
+ /**
1361
+ * Result used as replacement with text and color when the value matches
1362
+ */
1363
+ interface ValueMappingResult {
1364
+ /**
1365
+ * Text to use when the value matches
1366
+ */
1367
+ color?: string;
1368
+ /**
1369
+ * Icon to display when the value matches. Only specific visualizations.
1370
+ */
1371
+ icon?: string;
1372
+ /**
1373
+ * Position in the mapping array. Only used internally.
1374
+ */
1375
+ index?: number;
1376
+ /**
1377
+ * Text to display when the value matches
1378
+ */
1379
+ text?: string;
1380
+ }
1381
+ /**
1382
+ * Transformations allow to manipulate data returned by a query before the system applies a visualization.
1383
+ * Using transformations you can: rename fields, join time series data, perform mathematical operations across queries,
1384
+ * use the output of one transformation as the input to another transformation, etc.
1385
+ */
1386
+ interface DataTransformerConfig$1 {
1387
+ /**
1388
+ * Disabled transformations are skipped
1389
+ */
1390
+ disabled?: boolean;
1391
+ /**
1392
+ * Optional frame matcher. When missing it will be applied to all results
1393
+ */
1394
+ filter?: MatcherConfig$1;
1395
+ /**
1396
+ * Unique identifier of transformer
1397
+ */
1398
+ id: string;
1399
+ /**
1400
+ * Options to be passed to the transformer
1401
+ * Valid options depend on the transformer id
1402
+ */
1403
+ options: unknown;
1404
+ /**
1405
+ * Where to pull DataFrames from as input to transformation
1406
+ */
1407
+ topic?: 'series' | 'annotations' | 'alertStates';
1408
+ }
1409
+ /**
1410
+ * Time picker configuration
1411
+ * It defines the default config for the time picker and the refresh picker for the specific dashboard.
1412
+ */
1413
+ interface TimePickerConfig$1 {
1414
+ /**
1415
+ * Whether timepicker is visible or not.
1416
+ */
1417
+ hidden?: boolean;
1418
+ /**
1419
+ * Override the now time by entering a time delay. Use this option to accommodate known delays in data aggregation to avoid null values.
1420
+ */
1421
+ nowDelay?: string;
1422
+ /**
1423
+ * Interval options available in the refresh picker dropdown.
1424
+ */
1425
+ refresh_intervals?: Array<string>;
1426
+ /**
1427
+ * Selectable options available in the time picker dropdown. Has no effect on provisioned dashboard.
1428
+ */
1429
+ time_options?: Array<string>;
1430
+ }
1431
+ /**
1432
+ * 0 for no shared crosshair or tooltip (default).
1433
+ * 1 for shared crosshair.
1434
+ * 2 for shared crosshair AND shared tooltip.
1435
+ */
1436
+ declare enum DashboardCursorSync {
1437
+ Crosshair = 1,
1438
+ Off = 0,
1439
+ Tooltip = 2
1440
+ }
1441
+ declare const defaultDashboardCursorSync: DashboardCursorSync;
1442
+ /**
1443
+ * Dashboard panels are the basic visualization building blocks.
1444
+ */
1445
+ interface Panel$1 {
1446
+ /**
1447
+ * Sets panel queries cache timeout.
1448
+ */
1449
+ cacheTimeout?: string;
1450
+ /**
1451
+ * The datasource used in all targets.
1452
+ */
1453
+ datasource?: DataSourceRef;
1454
+ /**
1455
+ * Panel description.
1456
+ */
1457
+ description?: string;
1458
+ /**
1459
+ * Field options allow you to change how the data is displayed in your visualizations.
1460
+ */
1461
+ fieldConfig?: FieldConfigSource$1;
1462
+ /**
1463
+ * Grid position.
1464
+ */
1465
+ gridPos?: GridPos;
1466
+ /**
1467
+ * Controls if the timeFrom or timeShift overrides are shown in the panel header
1468
+ */
1469
+ hideTimeOverride?: boolean;
1470
+ /**
1471
+ * Unique identifier of the panel. Generated by Grafana when creating a new panel. It must be unique within a dashboard, but not globally.
1472
+ */
1473
+ id?: number;
1474
+ /**
1475
+ * The min time interval setting defines a lower limit for the $__interval and $__interval_ms variables.
1476
+ * This value must be formatted as a number followed by a valid time
1477
+ * identifier like: "40s", "3d", etc.
1478
+ * See: https://grafana.com/docs/grafana/latest/panels-visualizations/query-transform-data/#query-options
1479
+ */
1480
+ interval?: string;
1481
+ /**
1482
+ * Dynamically load the panel
1483
+ */
1484
+ libraryPanel?: LibraryPanelRef;
1485
+ /**
1486
+ * Panel links.
1487
+ */
1488
+ links?: Array<DashboardLink>;
1489
+ /**
1490
+ * The maximum number of data points that the panel queries are retrieving.
1491
+ */
1492
+ maxDataPoints?: number;
1493
+ /**
1494
+ * Option for repeated panels that controls max items per row
1495
+ * Only relevant for horizontally repeated panels
1496
+ */
1497
+ maxPerRow?: number;
1498
+ /**
1499
+ * It depends on the panel plugin. They are specified by the Options field in panel plugin schemas.
1500
+ */
1501
+ options?: Record<string, unknown>;
1502
+ /**
1503
+ * The version of the plugin that is used for this panel. This is used to find the plugin to display the panel and to migrate old panel configs.
1504
+ */
1505
+ pluginVersion?: string;
1506
+ /**
1507
+ * Overrides the data source configured time-to-live for a query cache item in milliseconds
1508
+ */
1509
+ queryCachingTTL?: number;
1510
+ /**
1511
+ * Name of template variable to repeat for.
1512
+ */
1513
+ repeat?: string;
1514
+ /**
1515
+ * Direction to repeat in if 'repeat' is set.
1516
+ * `h` for horizontal, `v` for vertical.
1517
+ */
1518
+ repeatDirection?: 'h' | 'v';
1519
+ /**
1520
+ * Depends on the panel plugin. See the plugin documentation for details.
1521
+ */
1522
+ targets?: Array<Record<string, unknown>>;
1523
+ /**
1524
+ * Overrides the relative time range for individual panels,
1525
+ * which causes them to be different than what is selected in
1526
+ * the dashboard time picker in the top-right corner of the dashboard. You can use this to show metrics from different
1527
+ * time periods or days on the same dashboard.
1528
+ * The value is formatted as time operation like: `now-5m` (Last 5 minutes), `now/d` (the day so far),
1529
+ * `now-5d/d`(Last 5 days), `now/w` (This week so far), `now-2y/y` (Last 2 years).
1530
+ * Note: Panel time overrides have no effect when the dashboard’s time range is absolute.
1531
+ * See: https://grafana.com/docs/grafana/latest/panels-visualizations/query-transform-data/#query-options
1532
+ */
1533
+ timeFrom?: string;
1534
+ /**
1535
+ * Overrides the time range for individual panels by shifting its start and end relative to the time picker.
1536
+ * For example, you can shift the time range for the panel to be two hours earlier than the dashboard time picker setting `2h`.
1537
+ * Note: Panel time overrides have no effect when the dashboard’s time range is absolute.
1538
+ * See: https://grafana.com/docs/grafana/latest/panels-visualizations/query-transform-data/#query-options
1539
+ */
1540
+ timeShift?: string;
1541
+ /**
1542
+ * Panel title.
1543
+ */
1544
+ title?: string;
1545
+ /**
1546
+ * List of transformations that are applied to the panel data before rendering.
1547
+ * When there are multiple transformations, Grafana applies them in the order they are listed.
1548
+ * Each transformation creates a result set that then passes on to the next transformation in the processing pipeline.
1549
+ */
1550
+ transformations?: Array<DataTransformerConfig$1>;
1551
+ /**
1552
+ * Whether to display the panel without a background.
1553
+ */
1554
+ transparent?: boolean;
1555
+ /**
1556
+ * The panel plugin type id. This is used to find the plugin to display the panel.
1557
+ */
1558
+ type: string;
1559
+ }
1560
+ /**
1561
+ * 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.
1562
+ * Each column within this structure is called a field. A field can represent a single time series or table column.
1563
+ * Field options allow you to change how the data is displayed in your visualizations.
1564
+ */
1565
+ interface FieldConfigSource$1 {
1566
+ /**
1567
+ * Defaults are the options applied to all fields.
1568
+ */
1569
+ defaults: FieldConfig$1;
1570
+ /**
1571
+ * Overrides are the options applied to specific fields overriding the defaults.
1572
+ */
1573
+ overrides: Array<{
1574
+ matcher: MatcherConfig$1;
1575
+ properties: Array<{
1576
+ id: string;
1577
+ value?: unknown;
1578
+ }>;
1579
+ }>;
1580
+ }
1581
+ /**
1582
+ * A library panel is a reusable panel that you can use in any dashboard.
1583
+ * When you make a change to a library panel, that change propagates to all instances of where the panel is used.
1584
+ * Library panels streamline reuse of panels across multiple dashboards.
1585
+ */
1586
+ interface LibraryPanelRef {
1587
+ /**
1588
+ * Library panel name
1589
+ */
1590
+ name: string;
1591
+ /**
1592
+ * Library panel uid
1593
+ */
1594
+ uid: string;
1595
+ }
1596
+ /**
1597
+ * Matcher is a predicate configuration. Based on the config a set of field(s) or values is filtered in order to apply override / transformation.
1598
+ * It comes with in id ( to resolve implementation from registry) and a configuration that’s specific to a particular matcher type.
1599
+ */
1600
+ interface MatcherConfig$1 {
1601
+ /**
1602
+ * The matcher id. This is used to find the matcher implementation from registry.
1603
+ */
1604
+ id: string;
1605
+ /**
1606
+ * The matcher options. This is specific to the matcher implementation.
1607
+ */
1608
+ options?: unknown;
1609
+ }
1610
+ /**
1611
+ * 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.
1612
+ * Each column within this structure is called a field. A field can represent a single time series or table column.
1613
+ * Field options allow you to change how the data is displayed in your visualizations.
1614
+ */
1615
+ interface FieldConfig$1 {
1616
+ /**
1617
+ * Panel color configuration
1618
+ */
1619
+ color?: FieldColor;
1620
+ /**
1621
+ * custom is specified by the FieldConfig field
1622
+ * in panel plugin schemas.
1623
+ */
1624
+ custom?: Record<string, unknown>;
1625
+ /**
1626
+ * Specify the number of decimals Grafana includes in the rendered value.
1627
+ * If you leave this field blank, Grafana automatically truncates the number of decimals based on the value.
1628
+ * For example 1.1234 will display as 1.12 and 100.456 will display as 100.
1629
+ * To display all decimals, set the unit to `String`.
1630
+ */
1631
+ decimals?: number;
1632
+ /**
1633
+ * Human readable field metadata
1634
+ */
1635
+ description?: string;
1636
+ /**
1637
+ * The display value for this field. This supports template variables blank is auto
1638
+ */
1639
+ displayName?: string;
1640
+ /**
1641
+ * This can be used by data sources that return and explicit naming structure for values and labels
1642
+ * When this property is configured, this value is used rather than the default naming strategy.
1643
+ */
1644
+ displayNameFromDS?: string;
1645
+ /**
1646
+ * True if data source field supports ad-hoc filters
1647
+ */
1648
+ filterable?: boolean;
1649
+ /**
1650
+ * The behavior when clicking on a result
1651
+ */
1652
+ links?: Array<unknown>;
1653
+ /**
1654
+ * Convert input values into a display string
1655
+ */
1656
+ mappings?: Array<ValueMapping>;
1657
+ /**
1658
+ * The maximum value used in percentage threshold calculations. Leave blank for auto calculation based on all series and fields.
1659
+ */
1660
+ max?: number;
1661
+ /**
1662
+ * The minimum value used in percentage threshold calculations. Leave blank for auto calculation based on all series and fields.
1663
+ */
1664
+ min?: number;
1665
+ /**
1666
+ * Alternative to empty string
1667
+ */
1668
+ noValue?: string;
1669
+ /**
1670
+ * An explicit path to the field in the datasource. When the frame meta includes a path,
1671
+ * This will default to `${frame.meta.path}/${field.name}
1672
+ *
1673
+ * When defined, this value can be used as an identifier within the datasource scope, and
1674
+ * may be used to update the results
1675
+ */
1676
+ path?: string;
1677
+ /**
1678
+ * Map numeric values to states
1679
+ */
1680
+ thresholds?: ThresholdsConfig;
1681
+ /**
1682
+ * Unit a field should use. The unit you select is applied to all fields except time.
1683
+ * You can use the units ID availables in Grafana or a custom unit.
1684
+ * Available units in Grafana: https://github.com/grafana/grafana/blob/main/packages/grafana-data/src/valueFormats/categories.ts
1685
+ * As custom unit, you can use the following formats:
1686
+ * `suffix:<suffix>` for custom unit that should go after value.
1687
+ * `prefix:<prefix>` for custom unit that should go before value.
1688
+ * `time:<format>` For custom date time formats type for example `time:YYYY-MM-DD`.
1689
+ * `si:<base scale><unit characters>` 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.
1690
+ * `count:<unit>` for a custom count unit.
1691
+ * `currency:<unit>` for custom a currency unit.
1692
+ */
1693
+ unit?: string;
1694
+ /**
1695
+ * True if data source can write a value to the path. Auth/authz are supported separately
1696
+ */
1697
+ writeable?: boolean;
1698
+ }
1699
+ /**
1700
+ * Row panel
1701
+ */
1702
+ interface RowPanel$1 {
1703
+ /**
1704
+ * Whether this row should be collapsed or not.
1705
+ */
1706
+ collapsed: boolean;
1707
+ /**
1708
+ * Name of default datasource for the row
1709
+ */
1710
+ datasource?: DataSourceRef;
1711
+ /**
1712
+ * Row grid position
1713
+ */
1714
+ gridPos?: GridPos;
1715
+ /**
1716
+ * Unique identifier of the panel. Generated by Grafana when creating a new panel. It must be unique within a dashboard, but not globally.
1717
+ */
1718
+ id: number;
1719
+ /**
1720
+ * List of panels in the row
1721
+ */
1722
+ panels: Array<Panel$1>;
1723
+ /**
1724
+ * Name of template variable to repeat for.
1725
+ */
1726
+ repeat?: string;
1727
+ /**
1728
+ * Row title
1729
+ */
1730
+ title?: string;
1731
+ /**
1732
+ * The panel type
1733
+ */
1734
+ type: 'row';
1735
+ }
1736
+ interface Dashboard$1 {
1737
+ /**
1738
+ * Contains the list of annotations that are associated with the dashboard.
1739
+ * Annotations are used to overlay event markers and overlay event tags on graphs.
1740
+ * Grafana comes with a native annotation store and the ability to add annotation events directly from the graph panel or via the HTTP API.
1741
+ * See https://grafana.com/docs/grafana/latest/dashboards/build-dashboards/annotate-visualizations/
1742
+ */
1743
+ annotations?: AnnotationContainer$1;
1744
+ /**
1745
+ * Description of dashboard.
1746
+ */
1747
+ description?: string;
1748
+ /**
1749
+ * Whether a dashboard is editable or not.
1750
+ */
1751
+ editable?: boolean;
1752
+ /**
1753
+ * The month that the fiscal year starts on. 0 = January, 11 = December
1754
+ */
1755
+ fiscalYearStartMonth?: number;
1756
+ /**
1757
+ * ID of a dashboard imported from the https://grafana.com/grafana/dashboards/ portal
1758
+ */
1759
+ gnetId?: string;
1760
+ /**
1761
+ * Configuration of dashboard cursor sync behavior.
1762
+ * Accepted values are 0 (sync turned off), 1 (shared crosshair), 2 (shared crosshair and tooltip).
1763
+ */
1764
+ graphTooltip?: DashboardCursorSync;
1765
+ /**
1766
+ * Unique numeric identifier for the dashboard.
1767
+ * `id` is internal to a specific Grafana instance. `uid` should be used to identify a dashboard across Grafana instances.
1768
+ */
1769
+ id?: number | null;
1770
+ /**
1771
+ * Links with references to other dashboards or external websites.
1772
+ */
1773
+ links?: Array<DashboardLink>;
1774
+ /**
1775
+ * When set to true, the dashboard will redraw panels at an interval matching the pixel width.
1776
+ * This will keep data "moving left" regardless of the query refresh rate. This setting helps
1777
+ * avoid dashboards presenting stale live data
1778
+ */
1779
+ liveNow?: boolean;
1780
+ /**
1781
+ * List of dashboard panels
1782
+ */
1783
+ panels?: Array<Panel$1 | RowPanel$1>;
1784
+ /**
1785
+ * When set to true, the dashboard will load all panels in the dashboard when it's loaded.
1786
+ */
1787
+ preload?: boolean;
1788
+ /**
1789
+ * Refresh rate of dashboard. Represented via interval string, e.g. "5s", "1m", "1h", "1d".
1790
+ */
1791
+ refresh?: string;
1792
+ /**
1793
+ * This property should only be used in dashboards defined by plugins. It is a quick check
1794
+ * to see if the version has changed since the last time.
1795
+ */
1796
+ revision?: number;
1797
+ /**
1798
+ * Version of the JSON schema, incremented each time a Grafana update brings
1799
+ * changes to said schema.
1800
+ */
1801
+ schemaVersion: number;
1802
+ /**
1803
+ * Snapshot options. They are present only if the dashboard is a snapshot.
1804
+ */
1805
+ snapshot?: {
1806
+ /**
1807
+ * Time when the snapshot was created
1808
+ */
1809
+ created: string;
1810
+ /**
1811
+ * Time when the snapshot expires, default is never to expire
1812
+ */
1813
+ expires: string;
1814
+ /**
1815
+ * Is the snapshot saved in an external grafana instance
1816
+ */
1817
+ external: boolean;
1818
+ /**
1819
+ * external url, if snapshot was shared in external grafana instance
1820
+ */
1821
+ externalUrl: string;
1822
+ /**
1823
+ * original url, url of the dashboard that was snapshotted
1824
+ */
1825
+ originalUrl: string;
1826
+ /**
1827
+ * Unique identifier of the snapshot
1828
+ */
1829
+ id: number;
1830
+ /**
1831
+ * Optional, defined the unique key of the snapshot, required if external is true
1832
+ */
1833
+ key: string;
1834
+ /**
1835
+ * Optional, name of the snapshot
1836
+ */
1837
+ name: string;
1838
+ /**
1839
+ * org id of the snapshot
1840
+ */
1841
+ orgId: number;
1842
+ /**
1843
+ * last time when the snapshot was updated
1844
+ */
1845
+ updated: string;
1846
+ /**
1847
+ * url of the snapshot, if snapshot was shared internally
1848
+ */
1849
+ url?: string;
1850
+ /**
1851
+ * user id of the snapshot creator
1852
+ */
1853
+ userId: number;
1854
+ };
1855
+ /**
1856
+ * Tags associated with dashboard.
1857
+ */
1858
+ tags?: Array<string>;
1859
+ /**
1860
+ * Configured template variables
1861
+ */
1862
+ templating?: {
1863
+ /**
1864
+ * List of configured template variables with their saved values along with some other metadata
1865
+ */
1866
+ list?: Array<VariableModel$1>;
1867
+ };
1868
+ /**
1869
+ * Time range for dashboard.
1870
+ * Accepted values are relative time strings like {from: 'now-6h', to: 'now'} or absolute time strings like {from: '2020-07-10T08:00:00.000Z', to: '2020-07-10T14:00:00.000Z'}.
1871
+ */
1872
+ time?: {
1873
+ from: string;
1874
+ to: string;
1875
+ };
1876
+ /**
1877
+ * Configuration of the time picker shown at the top of a dashboard.
1878
+ */
1879
+ timepicker?: TimePickerConfig$1;
1880
+ /**
1881
+ * Timezone of dashboard. Accepted values are IANA TZDB zone ID or "browser" or "utc".
1882
+ */
1883
+ timezone?: string;
1884
+ /**
1885
+ * Title of dashboard.
1886
+ */
1887
+ title?: string;
1888
+ /**
1889
+ * Unique dashboard identifier that can be generated by anyone. string (8-40)
1890
+ */
1891
+ uid?: string;
1892
+ /**
1893
+ * Version of the dashboard, incremented each time the dashboard is updated.
1894
+ */
1895
+ version?: number;
1896
+ /**
1897
+ * Day when the week starts. Expressed by the name of the day in lowercase, e.g. "monday".
1898
+ */
1899
+ weekStart?: string;
1900
+ }
1901
+ interface Panel<TOptions = Record<string, unknown>, TCustomFieldConfig = Record<string, unknown>> extends Omit<Panel$1, 'fieldConfig'> {
1902
+ fieldConfig?: FieldConfigSource<TCustomFieldConfig>;
1903
+ }
1904
+ interface RowPanel extends Omit<RowPanel$1, 'panels'> {
1905
+ panels: Panel[];
1906
+ }
1907
+ declare enum VariableHide {
1908
+ dontHide = 0,
1909
+ hideLabel = 1,
1910
+ hideVariable = 2
1911
+ }
1912
+ interface VariableModel extends Omit<VariableModel$1, 'datasource'> {
1913
+ datasource?: DataSourceRef$1 | null;
1914
+ }
1915
+ interface Dashboard extends Omit<Dashboard$1, 'templating' | 'annotations' | 'panels'> {
1916
+ panels?: Array<Panel | RowPanel>;
1917
+ annotations?: AnnotationContainer;
1918
+ templating?: {
1919
+ list?: VariableModel[];
1920
+ };
1921
+ }
1922
+ interface AnnotationQuery<TQuery extends DataQuery = DataQuery> extends Omit<AnnotationQuery$1, 'target' | 'datasource'> {
1923
+ datasource?: DataSourceRef$1 | null;
1924
+ target?: TQuery;
1925
+ snapshotData?: unknown;
1926
+ }
1927
+ interface AnnotationContainer extends Omit<AnnotationContainer$1, 'list'> {
1928
+ list?: AnnotationQuery[];
1929
+ }
1930
+ interface FieldConfig<TOptions = Record<string, unknown>> extends FieldConfig$1 {
1931
+ custom?: TOptions & Record<string, unknown>;
1932
+ }
1933
+ interface FieldConfigSource<TOptions = Record<string, unknown>> extends Omit<FieldConfigSource$1, 'defaults'> {
1934
+ defaults: FieldConfig<TOptions>;
1935
+ }
1936
+ interface MatcherConfig<TConfig = any> extends MatcherConfig$1 {
1937
+ options?: TConfig;
1938
+ }
1939
+ interface DataTransformerConfig<TOptions = any> extends DataTransformerConfig$1 {
1940
+ options: TOptions;
1941
+ topic?: DataTopic;
1942
+ }
1943
+ interface TimePickerConfig extends TimePickerConfig$1 {
1944
+ }
1945
+ declare const defaultDashboard: Dashboard;
1946
+ declare const defaultVariableModel: VariableModel;
1947
+ declare const defaultTimePickerConfig: TimePickerConfig;
1948
+ declare const defaultPanel: Partial<Panel>;
1949
+ declare const defaultRowPanel: Partial<Panel>;
1950
+ declare const defaultFieldConfig: Partial<FieldConfig>;
1951
+ declare const defaultFieldConfigSource: Partial<FieldConfigSource>;
1952
+ declare const defaultMatcherConfig: Partial<MatcherConfig>;
1953
+ declare const defaultAnnotationQuery: Partial<AnnotationQuery>;
1954
+ declare const defaultAnnotationContainer: Partial<AnnotationContainer>;
1955
+ interface MapLayerOptions<TConfig = any> extends MapLayerOptions$1 {
1956
+ config?: TConfig;
1957
+ filterData?: MatcherConfig;
1958
+ }
1959
+ interface DataQuery extends DataQuery$1 {
1960
+ /**
1961
+ * Unique, guid like, string (used only in explore mode)
1962
+ */
1963
+ key?: string;
1964
+ datasource?: DataSourceRef$1 | null;
1965
+ }
1966
+ interface BaseDimensionConfig<T = string | number> extends Omit<BaseDimensionConfig$1, 'fixed'> {
1967
+ fixed: T;
1968
+ }
1969
+ interface ScaleDimensionConfig extends BaseDimensionConfig<number>, Omit<ScaleDimensionConfig$1, 'fixed'> {
1970
+ }
1971
+ interface ScalarDimensionConfig extends BaseDimensionConfig<number>, Omit<ScalarDimensionConfig$1, 'fixed'> {
1972
+ }
1973
+ interface TextDimensionConfig extends BaseDimensionConfig<string>, Omit<TextDimensionConfig$1, 'fixed'> {
1974
+ }
1975
+ interface ColorDimensionConfig extends BaseDimensionConfig<string>, Omit<ColorDimensionConfig$1, 'fixed'> {
1976
+ }
1977
+ interface ColorDimensionConfig extends BaseDimensionConfig<string>, Omit<ColorDimensionConfig$1, 'fixed'> {
1978
+ }
1979
+ interface ResourceDimensionConfig extends BaseDimensionConfig<string>, Omit<ResourceDimensionConfig$1, 'fixed'> {
1980
+ }
1981
+ declare const defaultTableFieldOptions: TableFieldOptions;
1982
+ /**
1983
+ * Represent panel data loading state.
1984
+ * @deprecated Please use LoadingState from @grafana/data
1985
+ */
1986
+ declare enum LoadingState {
1987
+ NotStarted = "NotStarted",
1988
+ Loading = "Loading",
1989
+ Streaming = "Streaming",
1990
+ Done = "Done",
1991
+ Error = "Error"
1992
+ }
1993
+ interface RoleRef {
1994
+ /**
1995
+ * Policies can apply to roles, teams, or users
1996
+ * Applying policies to individual users is supported, but discouraged
1997
+ */
1998
+ kind: 'Role' | 'BuiltinRole' | 'Team' | 'User';
1999
+ name: string;
2000
+ xname: string;
2001
+ }
2002
+ interface ResourceRef {
2003
+ kind: string;
2004
+ name: string;
2005
+ }
2006
+ interface AccessRule {
2007
+ /**
2008
+ * The kind this rule applies to (dashboards, alert, etc)
2009
+ */
2010
+ kind: '*' | string;
2011
+ /**
2012
+ * Specific sub-elements like "alert.rules" or "dashboard.permissions"????
2013
+ */
2014
+ target?: string;
2015
+ /**
2016
+ * READ, WRITE, CREATE, DELETE, ...
2017
+ * should move to k8s style verbs like: "get", "list", "watch", "create", "update", "patch", "delete"
2018
+ */
2019
+ verb: '*' | 'none' | string;
2020
+ }
2021
+ interface AccessPolicy {
2022
+ /**
2023
+ * The role that must apply this policy
2024
+ */
2025
+ role: RoleRef;
2026
+ /**
2027
+ * The set of rules to apply. Note that * is required to modify
2028
+ * access policy rules, and that "none" will reject all actions
2029
+ */
2030
+ rules: Array<AccessRule>;
2031
+ /**
2032
+ * The scope where these policies should apply
2033
+ */
2034
+ scope: ResourceRef;
2035
+ }
2036
+ declare const defaultAccessPolicy: Partial<AccessPolicy>;
2037
+ interface LibraryElementDTOMetaUser {
2038
+ avatarUrl: string;
2039
+ id: number;
2040
+ name: string;
2041
+ }
2042
+ interface LibraryElementDTOMeta {
2043
+ connectedDashboards: number;
2044
+ created: string;
2045
+ createdBy: LibraryElementDTOMetaUser;
2046
+ folderName: string;
2047
+ folderUid: string;
2048
+ updated: string;
2049
+ updatedBy: LibraryElementDTOMetaUser;
2050
+ }
2051
+ interface LibraryPanel$1 {
2052
+ /**
2053
+ * Panel description
2054
+ */
2055
+ description?: string;
2056
+ /**
2057
+ * Folder UID
2058
+ */
2059
+ folderUid?: string;
2060
+ /**
2061
+ * Object storage metadata
2062
+ */
2063
+ meta?: LibraryElementDTOMeta;
2064
+ /**
2065
+ * TODO: should be the same panel schema defined in dashboard
2066
+ * Typescript: Omit<Panel, 'gridPos' | 'id' | 'libraryPanel'>;
2067
+ */
2068
+ model: Record<string, unknown>;
2069
+ /**
2070
+ * Panel name (also saved in the model)
2071
+ */
2072
+ name: string;
2073
+ /**
2074
+ * Dashboard version when this was saved (zero if unknown)
2075
+ */
2076
+ schemaVersion?: number;
2077
+ /**
2078
+ * The panel type (from inside the model)
2079
+ */
2080
+ type: string;
2081
+ /**
2082
+ * Library element UID
2083
+ */
2084
+ uid: string;
2085
+ /**
2086
+ * panel version, incremented each time the dashboard is updated.
2087
+ */
2088
+ version: number;
2089
+ }
2090
+ interface LibraryPanel extends LibraryPanel$1 {
2091
+ model: Omit<Panel, 'gridPos' | 'id' | 'libraryPanel'>;
2092
+ }
2093
+ interface QueryHistoryPreference {
2094
+ /**
2095
+ * one of: '' | 'query' | 'starred';
2096
+ */
2097
+ homeTab?: string;
2098
+ }
2099
+ interface CookiePreferences {
2100
+ analytics?: Record<string, unknown>;
2101
+ functional?: Record<string, unknown>;
2102
+ performance?: Record<string, unknown>;
2103
+ }
2104
+ interface NavbarPreference {
2105
+ bookmarkUrls: Array<string>;
2106
+ }
2107
+ declare const defaultNavbarPreference: Partial<NavbarPreference>;
2108
+ /**
2109
+ * Spec defines user, team or org Grafana preferences
2110
+ * swagger:model Preferences
2111
+ */
2112
+ interface Preferences {
2113
+ /**
2114
+ * Cookie preferences
2115
+ */
2116
+ cookiePreferences?: CookiePreferences;
2117
+ /**
2118
+ * UID for the home dashboard
2119
+ */
2120
+ homeDashboardUID?: string;
2121
+ /**
2122
+ * Selected language (beta)
2123
+ */
2124
+ language?: string;
2125
+ /**
2126
+ * Navigation preferences
2127
+ */
2128
+ navbar?: NavbarPreference;
2129
+ /**
2130
+ * Explore query history preferences
2131
+ */
2132
+ queryHistory?: QueryHistoryPreference;
2133
+ /**
2134
+ * light, dark, empty is default
2135
+ */
2136
+ theme?: string;
2137
+ /**
2138
+ * The timezone selection
2139
+ * TODO: this should use the timezone defined in common
2140
+ */
2141
+ timezone?: string;
2142
+ /**
2143
+ * day of the week (sunday, monday, etc)
2144
+ */
2145
+ weekStart?: string;
2146
+ }
2147
+ interface PublicDashboard {
2148
+ /**
2149
+ * Unique public access token
2150
+ */
2151
+ accessToken?: string;
2152
+ /**
2153
+ * Flag that indicates if annotations are enabled
2154
+ */
2155
+ annotationsEnabled: boolean;
2156
+ /**
2157
+ * Dashboard unique identifier referenced by this public dashboard
2158
+ */
2159
+ dashboardUid: string;
2160
+ /**
2161
+ * Flag that indicates if the public dashboard is enabled
2162
+ */
2163
+ isEnabled: boolean;
2164
+ /**
2165
+ * Flag that indicates if the time range picker is enabled
2166
+ */
2167
+ timeSelectionEnabled: boolean;
2168
+ /**
2169
+ * Unique public dashboard identifier
2170
+ */
2171
+ uid: string;
2172
+ }
2173
+ interface Role {
2174
+ /**
2175
+ * Role description
2176
+ */
2177
+ description?: string;
2178
+ /**
2179
+ * Optional display
2180
+ */
2181
+ displayName?: string;
2182
+ /**
2183
+ * Name of the team.
2184
+ */
2185
+ groupName?: string;
2186
+ /**
2187
+ * Do not show this role
2188
+ */
2189
+ hidden: boolean | false;
2190
+ /**
2191
+ * The role identifier `managed:builtins:editor:permissions`
2192
+ */
2193
+ name: string;
2194
+ }
2195
+ interface CustomRoleRef {
2196
+ kind: 'Role';
2197
+ name: string;
2198
+ }
2199
+ interface BuiltinRoleRef {
2200
+ kind: 'BuiltinRole';
2201
+ name: 'viewer' | 'editor' | 'admin';
2202
+ }
2203
+ interface RoleBindingSubject {
2204
+ kind: 'Team' | 'User';
2205
+ /**
2206
+ * The team/user identifier name
2207
+ */
2208
+ name: string;
2209
+ }
2210
+ interface RoleBinding {
2211
+ /**
2212
+ * The role we are discussing
2213
+ */
2214
+ role: BuiltinRoleRef | CustomRoleRef;
2215
+ /**
2216
+ * The team or user that has the specified role
2217
+ */
2218
+ subject: RoleBindingSubject;
2219
+ }
2220
+ export { AccessPolicy, AccessRule, AnnotationContainer, AnnotationPanelFilter, AnnotationQuery, AnnotationTarget, AxisColorMode, AxisConfig, AxisPlacement, BarAlignment, BarConfig, BarGaugeDisplayMode, BarGaugeNamePlacement, BarGaugeSizing, BarGaugeValueMode, BaseDimensionConfig, BigValueColorMode, BigValueGraphMode, BigValueJustifyMode, BigValueTextMode, BuiltinRoleRef, ColorDimensionConfig, ComparisonOperation, CookiePreferences, CustomRoleRef, Dashboard, Dashboard$1 as DashboardData, DashboardCursorSync, DashboardLink, DashboardLinkType, DataQuery, DataSourceJsonData, DataSourceRef$1 as DataSourceRef, DataTopic, DataTransformerConfig, FieldColor, FieldColorModeId, FieldColorSeriesByMode, FieldConfig, FieldConfigSource, FieldTextAlignment, FillConfig, FrameGeometrySource, FrameGeometrySourceMode, GraphDrawStyle, GraphFieldConfig, GraphGradientMode, GraphThresholdsStyleConfig, GraphThresholdsStyleMode, GraphTransform, GridPos, HeatmapCalculationBucketConfig, HeatmapCalculationMode, HeatmapCalculationOptions, HeatmapCellLayout, HideSeriesConfig, HideableFieldConfig, Labels, LegendDisplayMode, LegendPlacement, LibraryElementDTOMeta, LibraryElementDTOMetaUser, LibraryPanel, LibraryPanelRef, LineConfig, LineInterpolation, LineStyle, LoadingState, LogsDedupStrategy, LogsSortOrder, MapLayerOptions, MappingType, MatcherConfig, NavbarPreference, OptionsWithLegend, OptionsWithTextFormatting, OptionsWithTimezones, OptionsWithTooltip, Panel, PercentChangeColorMode, PointsConfig, Preferences, PublicDashboard, QueryHistoryPreference, RangeMap, ReduceDataOptions, RegexMap, ResourceDimensionConfig, ResourceDimensionMode, ResourceRef, Role, RoleBinding, RoleBindingSubject, RoleRef, RowPanel, ScalarDimensionConfig, ScalarDimensionMode, ScaleDimensionConfig, ScaleDimensionMode, ScaleDirection, ScaleDistribution, ScaleDistributionConfig, ScaleOrientation, SingleStatBaseOptions, SortOrder, SpecialValueMap, SpecialValueMatch, StackableFieldConfig, StackingConfig, StackingMode, TableAutoCellOptions, TableBarGaugeCellOptions, TableCellBackgroundDisplayMode, TableCellDisplayMode, TableCellHeight, TableCellOptions, TableColorTextCellOptions, TableColoredBackgroundCellOptions, TableDataLinksCellOptions, TableFieldOptions, TableFooterOptions, TableImageCellOptions, TableJsonViewCellOptions, TableSortByFieldState, TableSparklineCellOptions, TextDimensionConfig, TextDimensionMode, Threshold, ThresholdsConfig, ThresholdsMode, TimePickerConfig, TimeZone, TimeZoneBrowser, TimeZoneUtc, TimelineValueAlignment, TooltipDisplayMode, ValueMap, ValueMapping, ValueMappingResult, VariableFormatID, VariableHide, VariableModel, VariableOption, VariableRefresh, VariableSort, VariableType, VisibilityMode, VizLegendOptions, VizOrientation, VizTextDisplayOptions, VizTooltipOptions, defaultAccessPolicy, defaultAnnotationContainer, defaultAnnotationPanelFilter, defaultAnnotationQuery, defaultAnnotationTarget, defaultDashboard, defaultDashboardCursorSync, defaultDashboardLink, defaultFieldConfig, defaultFieldConfigSource, defaultGridPos, defaultLineStyle, defaultMatcherConfig, defaultNavbarPreference, defaultOptionsWithTimezones, defaultPanel, defaultReduceDataOptions, defaultRowPanel, defaultTableFieldOptions, defaultTableFooterOptions, defaultThresholdsConfig, defaultTimePickerConfig, defaultTimeZone, defaultVariableModel, defaultVizLegendOptions, };