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:
Victor Marin
2023-03-01 17:47:21 +02:00
committed by GitHub
parent 763b0fa4d5
commit e1bc3fad83
25 changed files with 773 additions and 188 deletions

View File

@@ -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',

View 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")