Annotations: Prevent creating on unsaved dashboard (#81200)

This commit is contained in:
Adela Almasan 2024-01-24 19:24:52 -06:00 committed by GitHub
parent 1d25039674
commit 9da3db1ddf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 7 additions and 7 deletions

View File

@ -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}
/>
) : (

View File

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

View File

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

View File

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

View File

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