mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Heatmap: Migrate to CUE (#62173)
* IP migrate heatmap to cue * WIP * refactor * change usages and refactor panelcfg * CR modifications and docs * refactor, enable heatmap cue generation, overwrite enum values in types.ts * small refactor * refactor types.ts * cr modifications * docs
This commit is contained in:
@@ -109,6 +109,33 @@ export enum FrameGeometrySourceMode {
|
||||
Lookup = 'lookup',
|
||||
}
|
||||
|
||||
export enum HeatmapCalculationMode {
|
||||
Count = 'count',
|
||||
Size = 'size',
|
||||
}
|
||||
|
||||
export enum HeatmapCellLayout {
|
||||
auto = 'auto',
|
||||
ge = 'ge',
|
||||
le = 'le',
|
||||
unknown = 'unknown',
|
||||
}
|
||||
|
||||
export interface HeatmapCalculationBucketConfig {
|
||||
/**
|
||||
* Sets the bucket calculation mode
|
||||
*/
|
||||
mode?: HeatmapCalculationMode;
|
||||
/**
|
||||
* Controls the scale of the buckets
|
||||
*/
|
||||
scale?: ScaleDistributionConfig;
|
||||
/**
|
||||
* The number of buckets to use for the axis in the heatmap
|
||||
*/
|
||||
value?: string;
|
||||
}
|
||||
|
||||
export enum LogsSortOrder {
|
||||
Ascending = 'Ascending',
|
||||
Descending = 'Descending',
|
||||
@@ -702,6 +729,17 @@ export interface FrameGeometrySource {
|
||||
wkt?: string;
|
||||
}
|
||||
|
||||
export interface HeatmapCalculationOptions {
|
||||
/**
|
||||
* The number of buckets to use for the xAxis in the heatmap
|
||||
*/
|
||||
xBuckets?: HeatmapCalculationBucketConfig;
|
||||
/**
|
||||
* The number of buckets to use for the yAxis in the heatmap
|
||||
*/
|
||||
yBuckets?: HeatmapCalculationBucketConfig;
|
||||
}
|
||||
|
||||
export enum LogsDedupStrategy {
|
||||
exact = 'exact',
|
||||
none = 'none',
|
||||
|
||||
21
packages/grafana-schema/src/common/heatmap.cue
Normal file
21
packages/grafana-schema/src/common/heatmap.cue
Normal file
@@ -0,0 +1,21 @@
|
||||
package common
|
||||
|
||||
HeatmapCalculationMode: "size" | "count" @cuetsy(kind="enum")
|
||||
|
||||
HeatmapCellLayout: "le" | "ge" | "unknown" | "auto" @cuetsy(kind="enum",memberNames="le|ge|unknown|auto")
|
||||
|
||||
HeatmapCalculationBucketConfig: {
|
||||
// Sets the bucket calculation mode
|
||||
mode?: HeatmapCalculationMode
|
||||
// The number of buckets to use for the axis in the heatmap
|
||||
value?: string
|
||||
// Controls the scale of the buckets
|
||||
scale?: ScaleDistributionConfig
|
||||
} @cuetsy(kind="interface")
|
||||
|
||||
HeatmapCalculationOptions: {
|
||||
// The number of buckets to use for the xAxis in the heatmap
|
||||
xBuckets?: HeatmapCalculationBucketConfig
|
||||
// The number of buckets to use for the yAxis in the heatmap
|
||||
yBuckets?: HeatmapCalculationBucketConfig
|
||||
} @cuetsy(kind="interface")
|
||||
Reference in New Issue
Block a user