mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
TimeSeriesPanel: Allow threshold indicators without change handler (#60575)
This commit is contained in:
@@ -38,7 +38,8 @@ export const CandlestickPanel: React.FC<CandlestickPanelProps> = ({
|
||||
onChangeTimeRange,
|
||||
replaceVariables,
|
||||
}) => {
|
||||
const { sync, canAddAnnotations, onThresholdsChange, canEditThresholds, onSplitOpen } = usePanelContext();
|
||||
const { sync, canAddAnnotations, onThresholdsChange, canEditThresholds, showThresholds, onSplitOpen } =
|
||||
usePanelContext();
|
||||
|
||||
const getFieldLinks = (field: Field, rowIndex: number) => {
|
||||
return getFieldLinksForExplore({ field, rowIndex, splitOpenFn: onSplitOpen, range: timeRange });
|
||||
@@ -320,11 +321,11 @@ export const CandlestickPanel: React.FC<CandlestickPanelProps> = ({
|
||||
/>
|
||||
)}
|
||||
|
||||
{canEditThresholds && onThresholdsChange && (
|
||||
{((canEditThresholds && onThresholdsChange) || showThresholds) && (
|
||||
<ThresholdControlsPlugin
|
||||
config={config}
|
||||
fieldConfig={fieldConfig}
|
||||
onThresholdsChange={onThresholdsChange}
|
||||
onThresholdsChange={canEditThresholds ? onThresholdsChange : undefined}
|
||||
/>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user