Rendering: Fix dashboard screenshot (#73190)

Rendering: fix dashboard screenshot
This commit is contained in:
Agnès Toulet
2023-08-17 09:56:28 +02:00
committed by GitHub
parent ef6e1a9460
commit 24978eff61

View File

@@ -6,6 +6,7 @@ import { Subscription } from 'rxjs';
import { config } from '@grafana/runtime'; import { config } from '@grafana/runtime';
import { GRID_CELL_HEIGHT, GRID_CELL_VMARGIN, GRID_COLUMN_COUNT } from 'app/core/constants'; import { GRID_CELL_HEIGHT, GRID_CELL_VMARGIN, GRID_COLUMN_COUNT } from 'app/core/constants';
import { contextSrv } from 'app/core/services/context_srv';
import { DashboardPanelsChangedEvent } from 'app/types/events'; import { DashboardPanelsChangedEvent } from 'app/types/events';
import { AddLibraryPanelWidget } from '../components/AddLibraryPanelWidget'; import { AddLibraryPanelWidget } from '../components/AddLibraryPanelWidget';
@@ -207,7 +208,7 @@ export class DashboardGrid extends PureComponent<Props> {
* This can be quite distracting and make the dashboard appear to less snappy. * This can be quite distracting and make the dashboard appear to less snappy.
*/ */
onGetWrapperDivRef = (ref: HTMLDivElement | null) => { onGetWrapperDivRef = (ref: HTMLDivElement | null) => {
if (ref) { if (ref && contextSrv.user.authenticatedBy !== 'render') {
setTimeout(() => { setTimeout(() => {
ref.classList.add('react-grid-layout--enable-move-animations'); ref.classList.add('react-grid-layout--enable-move-animations');
}, 50); }, 50);