mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Canvas: add feature flag for nesting elements (#49958)
This commit is contained in:
parent
1e4ebf876b
commit
e18e8002c4
@ -60,4 +60,5 @@ export interface FeatureToggles {
|
||||
prometheusStreamingJSONParser?: boolean;
|
||||
validateDashboardsOnSave?: boolean;
|
||||
prometheusWideSeries?: boolean;
|
||||
canvasPanelNesting?: boolean;
|
||||
}
|
||||
|
@ -248,5 +248,11 @@ var (
|
||||
Description: "Enable wide series responses in the Prometheus datasource",
|
||||
State: FeatureStateAlpha,
|
||||
},
|
||||
{
|
||||
Name: "canvasPanelNesting",
|
||||
Description: "Allow elements nesting",
|
||||
State: FeatureStateAlpha,
|
||||
FrontendOnly: true,
|
||||
},
|
||||
}
|
||||
)
|
||||
|
@ -182,4 +182,8 @@ const (
|
||||
// FlagPrometheusWideSeries
|
||||
// Enable wide series responses in the Prometheus datasource
|
||||
FlagPrometheusWideSeries = "prometheusWideSeries"
|
||||
|
||||
// FlagCanvasPanelNesting
|
||||
// Allow elements nesting
|
||||
FlagCanvasPanelNesting = "canvasPanelNesting"
|
||||
)
|
||||
|
@ -2,6 +2,7 @@ import React, { PureComponent } from 'react';
|
||||
import { DropResult } from 'react-beautiful-dnd';
|
||||
|
||||
import { AppEvents, SelectableValue, StandardEditorProps } from '@grafana/data';
|
||||
import { config } from '@grafana/runtime/src';
|
||||
import { Button, HorizontalGroup } from '@grafana/ui';
|
||||
import appEvents from 'app/core/app_events';
|
||||
import { AddLayerButton } from 'app/core/components/Layers/AddLayerButton';
|
||||
@ -269,7 +270,7 @@ export class LayerElementListEditor extends PureComponent<Props> {
|
||||
Clear selection
|
||||
</Button>
|
||||
)}
|
||||
{selection.length > 1 && (
|
||||
{selection.length > 1 && config.featureToggles.canvasPanelNesting && (
|
||||
<Button size="sm" variant="secondary" onClick={this.onFrameSelection}>
|
||||
Frame selection
|
||||
</Button>
|
||||
|
Loading…
Reference in New Issue
Block a user