diff --git a/src/app/components/project-map/project-map.component.ts b/src/app/components/project-map/project-map.component.ts index dbe9cfdc..99bd4865 100644 --- a/src/app/components/project-map/project-map.component.ts +++ b/src/app/components/project-map/project-map.component.ts @@ -423,7 +423,7 @@ export class ProjectMapComponent implements OnInit, OnDestroy { if(!nodeAddedEvent) { return; } - this.nodeService.createFromTemplate(this.server, this.project, nodeAddedEvent.template, nodeAddedEvent.x, nodeAddedEvent.y, 'local').subscribe((node: Node) => { + 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(()=>{}); diff --git a/src/app/components/template/template-list-dialog/template-list-dialog.component.html b/src/app/components/template/template-list-dialog/template-list-dialog.component.html index 4306d9dd..aa5b5b31 100644 --- a/src/app/components/template/template-list-dialog/template-list-dialog.component.html +++ b/src/app/components/template/template-list-dialog/template-list-dialog.component.html @@ -46,6 +46,14 @@ + + + {{type}} + +
Position
diff --git a/src/app/components/template/template-list-dialog/template-list-dialog.component.ts b/src/app/components/template/template-list-dialog/template-list-dialog.component.ts index 37fa20e0..bbc37698 100644 --- a/src/app/components/template/template-list-dialog/template-list-dialog.component.ts +++ b/src/app/components/template/template-list-dialog/template-list-dialog.component.ts @@ -27,6 +27,8 @@ export class TemplateListDialogComponent implements OnInit { selectedTemplate: Template; searchText: string = ''; + nodeServers: string[] = ['local', 'vm'] + constructor( public dialogRef: MatDialogRef, private templateService: TemplateService, @@ -82,6 +84,7 @@ export class TemplateListDialogComponent implements OnInit { } else { let event: NodeAddedEvent = { template: this.selectedTemplate, + server: this.selectedTemplate.compute_id, name: this.configurationForm.get('name').value, numberOfNodes: this.configurationForm.get('numberOfNodes').value, x: x, @@ -95,6 +98,7 @@ export class TemplateListDialogComponent implements OnInit { export interface NodeAddedEvent { template: Template, + server: string, name: string, numberOfNodes: number; x: number;