Skip to content
Snippets Groups Projects
Commit bccacd4d authored by Maiykol's avatar Maiykol
Browse files

refresh network on network relevant config change

parent 4b43c231
No related branches found
No related tags found
No related merge requests found
Pipeline #11039 failed
......@@ -49,20 +49,25 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit {
if (typeof config === 'undefined') {
return;
}
// check if config updates affect network
let updateNetworkFlag = false;
const configObj = JSON.parse(config);
for (const key of Object.keys(configObj)) {
if (key === 'nodeGroups' ) {
this.setConfigNodeGroup(key, configObj[key]);
updateNetworkFlag = true;
// dont set the key here, will be set in function
continue;
} else if (key === 'edgeGroups') {
this.setConfigEdgeGroup(key, configObj[key])
updateNetworkFlag = true;
// dont set the key here, will be set in function
continue;
}
else if (key === 'interactions') {
this.getInteractions();
updateNetworkFlag = true;
// dont set the key here, will be set in function
continue;
} else if (key === 'showLeftSidebar') {
......@@ -84,6 +89,10 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit {
}
this.myConfig[key] = configObj[key];
}
if (updateNetworkFlag && typeof this.networkJSON !== 'undefined') {
// update network if network config has changed and networkJSON exists
this.createNetwork();
}
}
@Input()
......@@ -267,6 +276,10 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit {
this.showDetails = false;
}
// public async updateNetwork() {
// }
public async createNetwork() {
this.analysis.resetSelection();
this.selectedWrapper = null;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment