Schema: Move known shared types into the common (#61875)

* Setup shared types

* Expand field types

* Fix array type

* Add QueryResultMeta

* Add QueryResultBase

* Add DataFrameJSON

* Add DataSourcePluginMeta

* Update QueryResultMetaStat

* Add plugin cue and veneers

* Rexport dupliate types to fix errors

* Fix export

* Update types

* Remove data frame/plugin types

* Cleanup types

* Remove redundant type

* Remove data frame related types
This commit is contained in:
Alex Khomenko 2023-01-24 18:45:28 +02:00 committed by GitHub
parent f85d072c17
commit 8e94eab9ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 40 additions and 13 deletions

View File

@ -38,7 +38,7 @@ export type PreferredVisualisationType = typeof preferredVisualizationTypes[numb
export interface QueryResultMeta {
type?: DataFrameType;
/** DatasSource Specific Values */
/** DataSource Specific Values */
custom?: Record<string, any>;
/** Stats */

View File

@ -8,6 +8,17 @@
// Run 'make gen-cue' from repository root to regenerate.
/**
* TODO docs
*/
export interface DataSourceJsonData {
alertmanagerUid?: string;
authType?: string;
defaultRegion?: string;
manageAlerts?: boolean;
profile?: string;
}
/**
* These are the common properties available to all queries in all datasources.
* Specific implementations will *extend* this interface, adding the required
@ -524,6 +535,14 @@ export enum BarGaugeDisplayMode {
Lcd = 'lcd',
}
/**
* TODO docs
*/
export interface VizTooltipOptions {
mode: TooltipDisplayMode;
sort: SortOrder;
}
/**
* Internally, this is the "type" of cell that's being displayed
* in the table such as colored text, JSON, gauge, etc.
@ -648,13 +667,7 @@ export interface FrameGeometrySource {
wkt?: string;
}
/**
* TODO docs
*/
export interface VizTooltipOptions {
mode: TooltipDisplayMode;
sort: SortOrder;
}
export interface Labels {}
/**
* Field options for each field within a table (e.g 10, "The String", 64.20, etc.)

View File

@ -0,0 +1,10 @@
package common
// TODO docs
DataSourceJsonData: {
authType?: string
defaultRegion?: string
profile?: string
manageAlerts?: bool
alertmanagerUid?: string
} @cuetsy(kind="interface")

View File

@ -245,4 +245,6 @@ VizTooltipOptions: {
sort: SortOrder
} @cuetsy(kind="interface")
Labels: {
[string]: string
} @cuetsy(kind="interface")

View File

@ -2,7 +2,9 @@
"kinds": {
"alertgroupspanelcfg": {
"category": "composable",
"codeowners": [],
"codeowners": [
"grafana/alerting-squad-frontend"
],
"currentVersion": [
0,
0
@ -10,10 +12,10 @@
"grafanaMaturityCount": 0,
"lineageIsGroup": true,
"links": {
"docs": "https:/grafana.com/docs/grafana/next/developers/kinds/composable/alertgroupspanelcfg/schema-reference",
"docs": "https://grafana.com/docs/grafana/next/developers/kinds/composable/alertgroupspanelcfg/schema-reference",
"go": "n/a",
"schema": "https:/github.com/grafana/grafana/tree/main/public/app/plugins/panel/alertGroups/panelcfg.cue",
"ts": "https:/github.com/grafana/grafana/tree/main/public/app/plugins/panel/alertGroups/panelcfg.gen.ts"
"schema": "https://github.com/grafana/grafana/tree/main/public/app/plugins/panel/alertGroups/panelcfg.cue",
"ts": "https://github.com/grafana/grafana/tree/main/public/app/plugins/panel/alertGroups/panelcfg.gen.ts"
},
"machineName": "alertgroupspanelcfg",
"maturity": "merged",