Merge pull request #708 from GNS3/Changes-with-add-node-dialog

Updating add node dialog
This commit is contained in:
piotrpekala7
2020-02-25 15:10:04 +01:00
committed by GitHub
4 changed files with 18 additions and 11 deletions

View File

@ -427,10 +427,10 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
return;
}
this.nodeService.createFromTemplate(this.server, this.project, nodeAddedEvent.template, nodeAddedEvent.x, nodeAddedEvent.y, nodeAddedEvent.server).subscribe((node: Node) => {
if (nodeAddedEvent.name !== nodeAddedEvent.template.name) {
node.name = nodeAddedEvent.name;
this.nodeService.updateNode(this.server, node).subscribe(()=>{});
}
// if (nodeAddedEvent.name !== nodeAddedEvent.template.name) {
// node.name = nodeAddedEvent.name;
// this.nodeService.updateNode(this.server, node).subscribe(()=>{});
// }
this.projectService.nodes(this.server, this.project.project_id).subscribe((nodes: Node[]) => {
nodes.filter((node) => node.label.style === null).forEach((node) => {