Dashboard Controls: Fix schema transformation for link placement (#114630)
* fix: add missing transformation for scenes -> save model v2 * fix: link placement transformation on the backend between schemas * fix: update the openapi spec in the tests * tes: add tests for `transformSceneToSaveModelSchemaV2` * tests: extend conversion_test.go to cover link placements
This commit is contained in:
@@ -971,6 +971,8 @@ export interface DashboardLink {
|
||||
includeVars: boolean;
|
||||
// If true, includes current time range in the link as query params
|
||||
keepTime: boolean;
|
||||
// Placement can be used to display the link somewhere else on the dashboard other than above the visualisations.
|
||||
placement?: "inControlsMenu";
|
||||
}
|
||||
|
||||
export const defaultDashboardLink = (): DashboardLink => ({
|
||||
@@ -983,6 +985,7 @@ export const defaultDashboardLink = (): DashboardLink => ({
|
||||
targetBlank: false,
|
||||
includeVars: false,
|
||||
keepTime: false,
|
||||
placement: DashboardLinkPlacement,
|
||||
});
|
||||
|
||||
// Dashboard Link type. Accepted values are dashboards (to refer to another dashboard) and link (to refer to an external resource)
|
||||
@@ -990,6 +993,10 @@ export type DashboardLinkType = "link" | "dashboards";
|
||||
|
||||
export const defaultDashboardLinkType = (): DashboardLinkType => ("link");
|
||||
|
||||
// Dashboard Link placement. Defines where the link should be displayed.
|
||||
// - "inControlsMenu" renders the link in bottom part of the dashboard controls dropdown menu
|
||||
export const DashboardLinkPlacement = "inControlsMenu";
|
||||
|
||||
// Time configuration
|
||||
// It defines the default time config for the time picker, the refresh picker for the specific dashboard.
|
||||
export interface TimeSettingsSpec {
|
||||
|
||||
Reference in New Issue
Block a user