зеркало из https://github.com/Azure/ipam.git
Added fix for randomly missing Virtual Network associations and fix for switching between two Spaces with similar Block names
This commit is contained in:
Родитель
470bddc929
Коммит
73fca7fb3b
|
@ -499,7 +499,7 @@ export default function EditVnets(props) {
|
|||
item['active'] = true;
|
||||
});
|
||||
|
||||
const missing = block['vnets'].map(vnet => vnet.id).filter(item => !data.map(a => a.id).includes(item));
|
||||
const missing = block['vnets'].map(vnet => vnet.id).filter(item => !data.map(a => a.id.toLowerCase()).includes(item.toLowerCase()));
|
||||
|
||||
missing.forEach((item) => {
|
||||
missing_data.push(mockVNet(item));
|
||||
|
@ -585,6 +585,11 @@ export default function EditVnets(props) {
|
|||
}
|
||||
};
|
||||
|
||||
console.log("NEW BLOCK");
|
||||
console.log("------------------");
|
||||
console.log(newBlock);
|
||||
console.log("------------------");
|
||||
|
||||
if(isEqual(prevBlock.identity, newBlock.identity)) {
|
||||
if(!isEqual(prevBlock.data, newBlock.data)) {
|
||||
refreshData();
|
||||
|
|
|
@ -118,8 +118,8 @@ export default function BlockDataGrid(props) {
|
|||
}, [selectionModel, setSelectedBlock]);
|
||||
|
||||
React.useEffect(() => {
|
||||
if(blocks && selectedBlock) {
|
||||
const currentBlock = blocks.find(block => block.name === selectedBlock.name);
|
||||
if(blocks && selectedBlock && selectedSpace) {
|
||||
const currentBlock = blocks.find(block => (block.name === selectedBlock.name) && (block.parent_space === selectedSpace.name));
|
||||
|
||||
if(!currentBlock) {
|
||||
setSelectionModel({});
|
||||
|
@ -127,7 +127,7 @@ export default function BlockDataGrid(props) {
|
|||
setSelectedBlock(currentBlock);
|
||||
}
|
||||
}
|
||||
}, [blocks, selectedBlock, setSelectedBlock, setSelectionModel]);
|
||||
}, [blocks, selectedSpace, selectedBlock, setSelectedBlock, setSelectionModel]);
|
||||
|
||||
const handleMenuClick = (event) => {
|
||||
setAnchorEl(event.currentTarget);
|
||||
|
|
Загрузка…
Ссылка в новой задаче