mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
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:
parent
f85d072c17
commit
8e94eab9ff
@ -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 */
|
||||
|
@ -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.)
|
||||
|
10
packages/grafana-schema/src/common/data_source.cue
Normal file
10
packages/grafana-schema/src/common/data_source.cue
Normal file
@ -0,0 +1,10 @@
|
||||
package common
|
||||
|
||||
// TODO docs
|
||||
DataSourceJsonData: {
|
||||
authType?: string
|
||||
defaultRegion?: string
|
||||
profile?: string
|
||||
manageAlerts?: bool
|
||||
alertmanagerUid?: string
|
||||
} @cuetsy(kind="interface")
|
@ -245,4 +245,6 @@ VizTooltipOptions: {
|
||||
sort: SortOrder
|
||||
} @cuetsy(kind="interface")
|
||||
|
||||
|
||||
Labels: {
|
||||
[string]: string
|
||||
} @cuetsy(kind="interface")
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user