mirror of
https://github.com/grafana/grafana.git
synced 2024-11-28 11:44:26 -06:00
LibraryPanels: Fix issue with repeated library panels (#82255)
Fixes an issue where a library panel being repeated by a template variable would briefly use the All value for the first repeat instance
This commit is contained in:
parent
fc5f228675
commit
984d2da9ae
@ -147,15 +147,16 @@ export function loadLibraryPanelAndUpdate(panel: PanelModel): ThunkResult<void>
|
||||
try {
|
||||
const libPanel = await getLibraryPanel(uid, true);
|
||||
panel.initLibraryPanel(libPanel);
|
||||
await dispatch(initPanelState(panel));
|
||||
const dashboard = getStore().dashboard.getModel();
|
||||
|
||||
const dashboard = getStore().dashboard.getModel();
|
||||
if (panel.repeat && dashboard) {
|
||||
const panelIndex = dashboard.panels.findIndex((p) => p.id === panel.id);
|
||||
dashboard.repeatPanel(panel, panelIndex);
|
||||
dashboard.sortPanelsByGridPos();
|
||||
dashboard.events.publish(new DashboardPanelsChangedEvent());
|
||||
}
|
||||
|
||||
await dispatch(initPanelState(panel));
|
||||
} catch (ex) {
|
||||
console.log('ERROR: ', ex);
|
||||
dispatch(
|
||||
|
Loading…
Reference in New Issue
Block a user