Annotations: Prevent creating on unsaved dashboard (#81200)

pull/81145/head
Adela Almasan 2 years ago committed by GitHub
parent 1d25039674
commit 9da3db1ddf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      public/app/plugins/panel/candlestick/CandlestickPanel.tsx
  2. 2
      public/app/plugins/panel/heatmap/HeatmapPanel.tsx
  3. 2
      public/app/plugins/panel/state-timeline/StateTimelinePanel.tsx
  4. 2
      public/app/plugins/panel/status-history/StatusHistoryPanel.tsx
  5. 2
      public/app/plugins/panel/timeseries/TimeSeriesPanel.tsx

@ -299,8 +299,8 @@ export const CandlestickPanel = ({
/>
);
}}
maxWidth={options.tooltip.maxWidth}
maxHeight={options.tooltip.maxHeight}
maxWidth={options.tooltip?.maxWidth}
maxHeight={options.tooltip?.maxHeight}
/>
) : (
<>
@ -320,7 +320,7 @@ export const CandlestickPanel = ({
annotations={data.annotations ?? []}
config={uplotConfig}
timeZone={timeZone}
newRange={newAnnotationRange}
newRange={enableAnnotationCreation ? newAnnotationRange : null}
setNewRange={setNewAnnotationRange}
/>
) : (

@ -286,7 +286,7 @@ export const HeatmapPanel = ({
annotations={data.annotations ?? []}
config={builder}
timeZone={timeZone}
newRange={newAnnotationRange}
newRange={enableAnnotationCreation ? newAnnotationRange : null}
setNewRange={setNewAnnotationRange}
canvasRegionRendering={false}
/>

@ -249,7 +249,7 @@ export const StateTimelinePanel = ({
annotations={data.annotations ?? []}
config={builder}
timeZone={timeZone}
newRange={newAnnotationRange}
newRange={enableAnnotationCreation ? newAnnotationRange : null}
setNewRange={setNewAnnotationRange}
canvasRegionRendering={false}
/>

@ -275,7 +275,7 @@ export const StatusHistoryPanel = ({
annotations={data.annotations ?? []}
config={builder}
timeZone={timeZone}
newRange={newAnnotationRange}
newRange={enableAnnotationCreation ? newAnnotationRange : null}
setNewRange={setNewAnnotationRange}
canvasRegionRendering={false}
/>

@ -170,7 +170,7 @@ export const TimeSeriesPanel = ({
annotations={data.annotations ?? []}
config={uplotConfig}
timeZone={timeZone}
newRange={newAnnotationRange}
newRange={enableAnnotationCreation ? newAnnotationRange : null}
setNewRange={setNewAnnotationRange}
/>
) : (

Loading…
Cancel
Save