Allow AddContainers to extends the default config
This commit is contained in:
parent
569d21ee9b
commit
6a3ddea763
3 changed files with 16 additions and 12 deletions
|
@ -85,7 +85,7 @@ function HandleSetContainerList(
|
|||
setNewHistory(
|
||||
AddContainers(
|
||||
selectedContainer.children.length,
|
||||
response.Containers.map(container => container.Type),
|
||||
response.Containers,
|
||||
selectedContainer.properties.id,
|
||||
configuration,
|
||||
history,
|
||||
|
@ -121,8 +121,6 @@ function HandleReplace(
|
|||
|
||||
const index = selectedContainer.parent.children.indexOf(selectedContainer);
|
||||
|
||||
const types = response.Containers.map(container => container.Type);
|
||||
|
||||
const newHistoryAfterDelete = DeleteContainer(
|
||||
selectedContainer.properties.id,
|
||||
history,
|
||||
|
@ -131,7 +129,7 @@ function HandleReplace(
|
|||
|
||||
const newHistoryBeforeDelete = AddContainers(
|
||||
index,
|
||||
types,
|
||||
response.Containers,
|
||||
selectedContainer.properties.parentId,
|
||||
configuration,
|
||||
newHistoryAfterDelete,
|
||||
|
@ -144,6 +142,7 @@ function HandleReplace(
|
|||
}
|
||||
|
||||
// Rename the last action by Replace
|
||||
const types = response.Containers.map(container => container.Type);
|
||||
newHistoryBeforeDelete[newHistoryBeforeDelete.length - 1].lastAction =
|
||||
`Replace ${selectedContainer.properties.id} by [${types.join(', ')}]`;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue