mirror of
https://github.com/grafana/grafana.git
synced 2025-01-15 19:22:34 -06:00
Graphs: Fix threshold handle being visible in dashboards (#39270)
This commit is contained in:
parent
b5ed47c95c
commit
4f7e1db57c
@ -14,7 +14,6 @@ import {
|
||||
PanelData,
|
||||
PanelPlugin,
|
||||
PanelPluginMeta,
|
||||
ThresholdsConfig,
|
||||
TimeRange,
|
||||
toDataFrameDTO,
|
||||
toUtc,
|
||||
@ -85,9 +84,6 @@ export class PanelChrome extends Component<Props, State> {
|
||||
onAnnotationUpdate: this.onAnnotationUpdate,
|
||||
onAnnotationDelete: this.onAnnotationDelete,
|
||||
canAddAnnotations: () => Boolean(props.dashboard.meta.canEdit || props.dashboard.meta.canMakeEditable),
|
||||
// TODO: remove, added only for testing now
|
||||
canEditThresholds: true,
|
||||
onThresholdsChange: this.onThresholdsChange,
|
||||
},
|
||||
data: this.getInitialPanelDataState(),
|
||||
};
|
||||
@ -346,16 +342,6 @@ export class PanelChrome extends Component<Props, State> {
|
||||
this.state.context.eventBus.publish(new AnnotationChangeEvent(anno));
|
||||
};
|
||||
|
||||
onThresholdsChange = (thresholds: ThresholdsConfig) => {
|
||||
this.onFieldConfigChange({
|
||||
defaults: {
|
||||
...this.props.panel.fieldConfig.defaults,
|
||||
thresholds,
|
||||
},
|
||||
overrides: this.props.panel.fieldConfig.overrides,
|
||||
});
|
||||
};
|
||||
|
||||
get hasPanelSnapshot() {
|
||||
const { panel } = this.props;
|
||||
return panel.snapshotData && panel.snapshotData.length;
|
||||
|
Loading…
Reference in New Issue
Block a user