Kindsys: Rename mudball to common schemas, allow multiple input cue files (#61703)
* kindsys: Rename mudball to common schemas * Update all core plugin imports * Add missed table types * Remove invalid JSON comment * Remove coremodel dir from codeowners
This commit is contained in:
+63
-59
@@ -1,8 +1,12 @@
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
|
||||
// This file is autogenerated. DO NOT EDIT.
|
||||
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
|
||||
//
|
||||
// To regenerate, run "make gen-cue" from the repository root.
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Generated by:
|
||||
// kinds/gen.go
|
||||
// Using jennies:
|
||||
// CommonSchemaJenny
|
||||
//
|
||||
// Run 'make gen-cue' from repository root to regenerate.
|
||||
|
||||
|
||||
/**
|
||||
* TODO docs
|
||||
@@ -262,14 +266,6 @@ export enum LegendDisplayMode {
|
||||
Table = 'table',
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO docs
|
||||
*/
|
||||
export interface TableSortByFieldState {
|
||||
desc?: boolean;
|
||||
displayName: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO docs
|
||||
*/
|
||||
@@ -388,35 +384,6 @@ export enum BigValueTextMode {
|
||||
*/
|
||||
export type FieldTextAlignment = ('auto' | 'left' | 'right' | 'center');
|
||||
|
||||
/**
|
||||
* Internally, this is the "type" of cell that's being displayed
|
||||
* in the table such as colored text, JSON, gauge, etc.
|
||||
* The color-background-solid, gradient-gauge, and lcd-gauge
|
||||
* modes are deprecated in favor of new cell subOptions
|
||||
*/
|
||||
export enum TableCellDisplayMode {
|
||||
Auto = 'auto',
|
||||
BasicGauge = 'basic',
|
||||
ColorBackground = 'color-background',
|
||||
ColorBackgroundSolid = 'color-background-solid',
|
||||
ColorText = 'color-text',
|
||||
Gauge = 'gauge',
|
||||
GradientGauge = 'gradient-gauge',
|
||||
Image = 'image',
|
||||
JSONView = 'json-view',
|
||||
LcdGauge = 'lcd-gauge',
|
||||
}
|
||||
|
||||
/**
|
||||
* Display mode to the "Colored Background" display
|
||||
* mode for table cells. Either displays a solid color (basic mode)
|
||||
* or a gradient.
|
||||
*/
|
||||
export enum TableCellBackgroundDisplayMode {
|
||||
Basic = 'basic',
|
||||
Gradient = 'gradient',
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO docs
|
||||
*/
|
||||
@@ -488,6 +455,43 @@ export enum BarGaugeDisplayMode {
|
||||
Lcd = 'lcd',
|
||||
}
|
||||
|
||||
/**
|
||||
* Internally, this is the "type" of cell that's being displayed
|
||||
* in the table such as colored text, JSON, gauge, etc.
|
||||
* The color-background-solid, gradient-gauge, and lcd-gauge
|
||||
* modes are deprecated in favor of new cell subOptions
|
||||
*/
|
||||
export enum TableCellDisplayMode {
|
||||
Auto = 'auto',
|
||||
BasicGauge = 'basic',
|
||||
ColorBackground = 'color-background',
|
||||
ColorBackgroundSolid = 'color-background-solid',
|
||||
ColorText = 'color-text',
|
||||
Gauge = 'gauge',
|
||||
GradientGauge = 'gradient-gauge',
|
||||
Image = 'image',
|
||||
JSONView = 'json-view',
|
||||
LcdGauge = 'lcd-gauge',
|
||||
}
|
||||
|
||||
/**
|
||||
* Display mode to the "Colored Background" display
|
||||
* mode for table cells. Either displays a solid color (basic mode)
|
||||
* or a gradient.
|
||||
*/
|
||||
export enum TableCellBackgroundDisplayMode {
|
||||
Basic = 'basic',
|
||||
Gradient = 'gradient',
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO docs
|
||||
*/
|
||||
export interface TableSortByFieldState {
|
||||
desc?: boolean;
|
||||
displayName: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Auto mode table cell options
|
||||
*/
|
||||
@@ -538,6 +542,24 @@ export interface TableColoredBackgroundCellOptions {
|
||||
*/
|
||||
export type TableCellOptions = (TableAutoCellOptions | TableBarGaugeCellOptions | TableColoredBackgroundCellOptions | TableColorTextCellOptions | TableImageCellOptions | TableJsonViewCellOptions);
|
||||
|
||||
/**
|
||||
* Use UTC/GMT timezone
|
||||
*/
|
||||
export type TimeZoneUtc = 'utc';
|
||||
|
||||
/**
|
||||
* Use the timezone defined by end user web browser
|
||||
*/
|
||||
export type TimeZoneBrowser = 'browser';
|
||||
|
||||
/**
|
||||
* TODO docs
|
||||
*/
|
||||
export interface VizTooltipOptions {
|
||||
mode: TooltipDisplayMode;
|
||||
sort: SortOrder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Field options for each field within a table (e.g 10, "The String", 64.20, etc.)
|
||||
* Generally defines alignment, filtering capabilties, display options, etc.
|
||||
@@ -561,24 +583,6 @@ export const defaultTableFieldOptions: Partial<TableFieldOptions> = {
|
||||
inspect: false,
|
||||
};
|
||||
|
||||
/**
|
||||
* TODO docs
|
||||
*/
|
||||
export interface VizTooltipOptions {
|
||||
mode: TooltipDisplayMode;
|
||||
sort: SortOrder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use UTC/GMT timezone
|
||||
*/
|
||||
export type TimeZoneUtc = 'utc';
|
||||
|
||||
/**
|
||||
* Use the timezone defined by end user web browser
|
||||
*/
|
||||
export type TimeZoneBrowser = 'browser';
|
||||
|
||||
/**
|
||||
* A specific timezone from https://en.wikipedia.org/wiki/Tz_database
|
||||
*/
|
||||
+1
-79
@@ -1,4 +1,4 @@
|
||||
package schema
|
||||
package common
|
||||
|
||||
// TODO break this up into individual files. Current limitation on this is codegen logic, imports, dependencies
|
||||
|
||||
@@ -137,12 +137,6 @@ LegendPlacement: "bottom" | "right" @cuetsy(kind="type")
|
||||
// Note: "hidden" needs to remain as an option for plugins compatibility
|
||||
LegendDisplayMode: "list" | "table" | "hidden" @cuetsy(kind="enum")
|
||||
|
||||
// TODO docs
|
||||
TableSortByFieldState: {
|
||||
displayName: string
|
||||
desc?: bool
|
||||
} @cuetsy(kind="interface")
|
||||
|
||||
// TODO docs
|
||||
SingleStatBaseOptions: {
|
||||
OptionsWithTextFormatting
|
||||
@@ -201,18 +195,6 @@ BigValueTextMode: "auto" | "value" | "value_and_name" | "name" | "none" @cuetsy(
|
||||
// TODO docs
|
||||
FieldTextAlignment: "auto" | "left" | "right" | "center" @cuetsy(kind="type")
|
||||
|
||||
// Internally, this is the "type" of cell that's being displayed
|
||||
// in the table such as colored text, JSON, gauge, etc.
|
||||
// The color-background-solid, gradient-gauge, and lcd-gauge
|
||||
// modes are deprecated in favor of new cell subOptions
|
||||
TableCellDisplayMode: "auto" | "color-text" | "color-background" | "color-background-solid" | "gradient-gauge" | "lcd-gauge" | "json-view" | "basic" | "image" | "gauge" @cuetsy(kind="enum",memberNames="Auto|ColorText|ColorBackground|ColorBackgroundSolid|GradientGauge|LcdGauge|JSONView|BasicGauge|Image|Gauge")
|
||||
|
||||
// Display mode to the "Colored Background" display
|
||||
// mode for table cells. Either displays a solid color (basic mode)
|
||||
// or a gradient.
|
||||
TableCellBackgroundDisplayMode: "basic" | "gradient" @cuetsy(kind="enum",memberNames="Basic|Gradient")
|
||||
|
||||
|
||||
// TODO docs
|
||||
VizTextDisplayOptions: {
|
||||
// Explicit title text size
|
||||
@@ -259,68 +241,8 @@ VizLegendOptions: {
|
||||
// for the bar gauge component of Grafana UI
|
||||
BarGaugeDisplayMode: "basic" | "lcd" | "gradient" @cuetsy(kind="enum")
|
||||
|
||||
// Auto mode table cell options
|
||||
TableAutoCellOptions: {
|
||||
type: TableCellDisplayMode & "auto"
|
||||
} @cuetsy(kind="interface")
|
||||
|
||||
// Colored text cell options
|
||||
TableColorTextCellOptions: {
|
||||
type: TableCellDisplayMode & "color-text"
|
||||
} @cuetsy(kind="interface")
|
||||
|
||||
// Json view cell options
|
||||
TableJsonViewCellOptions: {
|
||||
type: TableCellDisplayMode & "json-view"
|
||||
} @cuetsy(kind="interface")
|
||||
|
||||
// Json view cell options
|
||||
TableImageCellOptions: {
|
||||
type: TableCellDisplayMode & "image"
|
||||
} @cuetsy(kind="interface")
|
||||
|
||||
// Gauge cell options
|
||||
TableBarGaugeCellOptions: {
|
||||
type: TableCellDisplayMode & "gauge"
|
||||
mode?: BarGaugeDisplayMode
|
||||
} @cuetsy(kind="interface")
|
||||
|
||||
// Colored background cell options
|
||||
TableColoredBackgroundCellOptions: {
|
||||
type: TableCellDisplayMode & "color-background"
|
||||
mode?: TableCellBackgroundDisplayMode
|
||||
} @cuetsy(kind="interface")
|
||||
|
||||
// Table cell options. Each cell has a display mode
|
||||
// and other potential options for that display.
|
||||
TableCellOptions: TableAutoCellOptions | TableBarGaugeCellOptions | TableColoredBackgroundCellOptions | TableColorTextCellOptions | TableImageCellOptions | TableJsonViewCellOptions @cuetsy(kind="type")
|
||||
|
||||
// Field options for each field within a table (e.g 10, "The String", 64.20, etc.)
|
||||
// Generally defines alignment, filtering capabilties, display options, etc.
|
||||
TableFieldOptions: {
|
||||
width?: number
|
||||
minWidth?: number
|
||||
align: FieldTextAlignment | *"auto"
|
||||
// This field is deprecated in favor of using cellOptions
|
||||
displayMode?: TableCellDisplayMode
|
||||
cellOptions: TableCellOptions
|
||||
hidden?: bool // ?? default is missing or false ??
|
||||
inspect: bool | *false
|
||||
filterable?: bool
|
||||
} @cuetsy(kind="interface")
|
||||
|
||||
// TODO docs
|
||||
VizTooltipOptions: {
|
||||
mode: TooltipDisplayMode
|
||||
sort: SortOrder
|
||||
} @cuetsy(kind="interface")
|
||||
|
||||
|
||||
// Use UTC/GMT timezone
|
||||
TimeZoneUtc: "utc" @cuetsy(kind="type")
|
||||
|
||||
// Use the timezone defined by end user web browser
|
||||
TimeZoneBrowser: "browser" @cuetsy(kind="type")
|
||||
|
||||
// A specific timezone from https://en.wikipedia.org/wiki/Tz_database
|
||||
TimeZone: TimeZoneUtc | TimeZoneBrowser | string | *"browser" @cuetsy(kind="type")
|
||||
@@ -0,0 +1,69 @@
|
||||
package common
|
||||
|
||||
// Internally, this is the "type" of cell that's being displayed
|
||||
// in the table such as colored text, JSON, gauge, etc.
|
||||
// The color-background-solid, gradient-gauge, and lcd-gauge
|
||||
// modes are deprecated in favor of new cell subOptions
|
||||
TableCellDisplayMode: "auto" | "color-text" | "color-background" | "color-background-solid" | "gradient-gauge" | "lcd-gauge" | "json-view" | "basic" | "image" | "gauge" @cuetsy(kind="enum",memberNames="Auto|ColorText|ColorBackground|ColorBackgroundSolid|GradientGauge|LcdGauge|JSONView|BasicGauge|Image|Gauge")
|
||||
|
||||
// Display mode to the "Colored Background" display
|
||||
// mode for table cells. Either displays a solid color (basic mode)
|
||||
// or a gradient.
|
||||
TableCellBackgroundDisplayMode: "basic" | "gradient" @cuetsy(kind="enum",memberNames="Basic|Gradient")
|
||||
|
||||
// TODO docs
|
||||
TableSortByFieldState: {
|
||||
displayName: string
|
||||
desc?: bool
|
||||
} @cuetsy(kind="interface")
|
||||
|
||||
// Auto mode table cell options
|
||||
TableAutoCellOptions: {
|
||||
type: TableCellDisplayMode & "auto"
|
||||
} @cuetsy(kind="interface")
|
||||
|
||||
// Colored text cell options
|
||||
TableColorTextCellOptions: {
|
||||
type: TableCellDisplayMode & "color-text"
|
||||
} @cuetsy(kind="interface")
|
||||
|
||||
// Json view cell options
|
||||
TableJsonViewCellOptions: {
|
||||
type: TableCellDisplayMode & "json-view"
|
||||
} @cuetsy(kind="interface")
|
||||
|
||||
// Json view cell options
|
||||
TableImageCellOptions: {
|
||||
type: TableCellDisplayMode & "image"
|
||||
} @cuetsy(kind="interface")
|
||||
|
||||
// Gauge cell options
|
||||
TableBarGaugeCellOptions: {
|
||||
type: TableCellDisplayMode & "gauge"
|
||||
mode?: BarGaugeDisplayMode
|
||||
} @cuetsy(kind="interface")
|
||||
|
||||
// Colored background cell options
|
||||
TableColoredBackgroundCellOptions: {
|
||||
type: TableCellDisplayMode & "color-background"
|
||||
mode?: TableCellBackgroundDisplayMode
|
||||
} @cuetsy(kind="interface")
|
||||
|
||||
// Table cell options. Each cell has a display mode
|
||||
// and other potential options for that display.
|
||||
TableCellOptions: TableAutoCellOptions | TableBarGaugeCellOptions | TableColoredBackgroundCellOptions | TableColorTextCellOptions | TableImageCellOptions | TableJsonViewCellOptions @cuetsy(kind="type")
|
||||
|
||||
// Field options for each field within a table (e.g 10, "The String", 64.20, etc.)
|
||||
// Generally defines alignment, filtering capabilties, display options, etc.
|
||||
TableFieldOptions: {
|
||||
width?: number
|
||||
minWidth?: number
|
||||
align: FieldTextAlignment | *"auto"
|
||||
// This field is deprecated in favor of using cellOptions
|
||||
displayMode?: TableCellDisplayMode
|
||||
cellOptions: TableCellOptions
|
||||
hidden?: bool // ?? default is missing or false ??
|
||||
inspect: bool | *false
|
||||
filterable?: bool
|
||||
} @cuetsy(kind="interface")
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package common
|
||||
|
||||
// Use UTC/GMT timezone
|
||||
TimeZoneUtc: "utc" @cuetsy(kind="type")
|
||||
|
||||
// Use the timezone defined by end user web browser
|
||||
TimeZoneBrowser: "browser" @cuetsy(kind="type")
|
||||
|
||||
// A specific timezone from https://en.wikipedia.org/wiki/Tz_database
|
||||
TimeZone: TimeZoneUtc | TimeZoneBrowser | string | *"browser" @cuetsy(kind="type")
|
||||
@@ -3,5 +3,5 @@
|
||||
*
|
||||
* @packageDocumentation
|
||||
*/
|
||||
export * from './schema/mudball.gen';
|
||||
export * from './common/common.gen';
|
||||
export * from './index.gen';
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{
|
||||
// dashboard_experimental.gen.ts needs ignoring as isolatedModules requires it to contain an import or export statement.
|
||||
"exclude": ["dist/**/*", "src/schema/dashboard/dashboard_experimental.gen.ts", "**/*.test.ts*"],
|
||||
"exclude": ["dist/**/*", "**/*.test.ts*"],
|
||||
"extends": "./tsconfig.json"
|
||||
}
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
"isolatedModules": true,
|
||||
"rootDirs": ["."]
|
||||
},
|
||||
// dashboard_experimental.gen.ts needs ignoring as isolatedModules requires it to contain an import or export statement.
|
||||
"exclude": ["dist/**/*", "src/schema/*/*_experimental.gen.ts"],
|
||||
"exclude": ["dist/**/*"],
|
||||
"extends": "@grafana/tsconfig",
|
||||
"include": ["src/**/*.ts*"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user