From cdd74aa144646be83a1804060d214b95b5e12dab Mon Sep 17 00:00:00 2001 From: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com> Date: Wed, 18 Dec 2024 10:45:10 +0100 Subject: [PATCH] Alerting: Fix ash not showing history graph in firefox (#98128) fix getEventsSceneObject --- .../CentralAlertHistoryScene.tsx | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/public/app/features/alerting/unified/components/rules/central-state-history/CentralAlertHistoryScene.tsx b/public/app/features/alerting/unified/components/rules/central-state-history/CentralAlertHistoryScene.tsx index 2b4693d3a38..6bbf0c458d7 100644 --- a/public/app/features/alerting/unified/components/rules/central-state-history/CentralAlertHistoryScene.tsx +++ b/public/app/features/alerting/unified/components/rules/central-state-history/CentralAlertHistoryScene.tsx @@ -124,10 +124,7 @@ export const CentralAlertHistoryScene = () => { body: new SceneFlexLayout({ direction: 'column', children: [ - new SceneFlexItem({ - ySizing: 'content', - body: getEventsSceneObject(), - }), + getEventsScenesFlexItem(), new SceneFlexItem({ body: new HistoryEventsListObject({}), }), @@ -145,16 +142,6 @@ export const CentralAlertHistoryScene = () => { return ; }; -/** - * Creates a SceneFlexItem with a timeseries panel that shows the events. - * The query uses a runtime datasource that fetches the events from the history api. - */ -function getEventsSceneObject() { - return new SceneFlexLayout({ - direction: 'column', - children: [getEventsScenesFlexItem()], - }); -} /** * Creates a SceneQueryRunner with the datasource information for the runtime datasource. @@ -182,6 +169,7 @@ function getQueryRunnerForAlertHistoryDataSource() { export function getEventsScenesFlexItem() { return new SceneFlexItem({ minHeight: 300, + ySizing: 'content', body: PanelBuilders.timeseries() .setTitle('Alert Events') .setDescription(