From 4f7e1db57c6433edc71cb4b4df0f30325bd72103 Mon Sep 17 00:00:00 2001 From: Peter Holmberg Date: Thu, 16 Sep 2021 08:59:36 +0200 Subject: [PATCH] Graphs: Fix threshold handle being visible in dashboards (#39270) --- .../features/dashboard/dashgrid/PanelChrome.tsx | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/public/app/features/dashboard/dashgrid/PanelChrome.tsx b/public/app/features/dashboard/dashgrid/PanelChrome.tsx index ef9527a1167..8af04bd0454 100644 --- a/public/app/features/dashboard/dashgrid/PanelChrome.tsx +++ b/public/app/features/dashboard/dashgrid/PanelChrome.tsx @@ -14,7 +14,6 @@ import { PanelData, PanelPlugin, PanelPluginMeta, - ThresholdsConfig, TimeRange, toDataFrameDTO, toUtc, @@ -85,9 +84,6 @@ export class PanelChrome extends Component { 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 { 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;