mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[Dashboard] Remove duplicate ID (#215575)
Removes a holdover extra `id` key from Dashboard's explicit input
This commit is contained in:
parent
4e6fa9e37f
commit
154b14da20
1 changed files with 1 additions and 3 deletions
|
@ -22,13 +22,11 @@ import {
|
|||
export const convertPanelsArrayToPanelMap = (panels?: DashboardPanel[]): DashboardPanelMap => {
|
||||
const panelsMap: DashboardPanelMap = {};
|
||||
panels?.forEach((panel, idx) => {
|
||||
const panelIndex = panel.panelIndex ?? String(idx);
|
||||
panelsMap![panel.panelIndex ?? String(idx)] = {
|
||||
type: panel.type,
|
||||
gridData: panel.gridData,
|
||||
panelRefName: panel.panelRefName,
|
||||
explicitInput: {
|
||||
id: panelIndex,
|
||||
...(panel.id !== undefined && { savedObjectId: panel.id }),
|
||||
...(panel.title !== undefined && { title: panel.title }),
|
||||
...panel.panelConfig,
|
||||
|
@ -77,7 +75,7 @@ export const generateNewPanelIds = (panels: DashboardPanelMap, references?: Refe
|
|||
newPanelsMap[newId] = {
|
||||
...panel,
|
||||
gridData: { ...panel.gridData, i: newId },
|
||||
explicitInput: { ...panel.explicitInput, id: newId },
|
||||
explicitInput: panel.explicitInput ?? {},
|
||||
};
|
||||
newReferences.push(
|
||||
...prefixReferencesFromPanel(newId, getReferencesForPanelId(oldId, references ?? []))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue