diff --git a/src/app/components/preferences/qemu/add-qemu-vm-template/add-qemu-vm-template.component.ts b/src/app/components/preferences/qemu/add-qemu-vm-template/add-qemu-vm-template.component.ts index 16a16b90..7787a0b4 100644 --- a/src/app/components/preferences/qemu/add-qemu-vm-template/add-qemu-vm-template.component.ts +++ b/src/app/components/preferences/qemu/add-qemu-vm-template/add-qemu-vm-template.component.ts @@ -92,8 +92,7 @@ export class AddQemuVmTemplateComponent implements OnInit { const server_id = this.route.snapshot.paramMap.get('server_id'); this.serverService.get(parseInt(server_id, 10)).then((server: Server) => { this.server = server; - - if(!this.server.authToken){ + this.templateMocksService.getQemuTemplate().subscribe((qemuTemplate: QemuTemplate) => { this.qemuTemplate = qemuTemplate; }); @@ -103,13 +102,15 @@ export class AddQemuVmTemplateComponent implements OnInit { if (this.qemuBinaries[0]) this.selectedBinary = this.qemuBinaries[0]; }); - this.qemuService.getImages(server).subscribe((qemuImages: QemuImage[]) => { - this.qemuImages = qemuImages; - }); + if (!this.server.authToken) { + this.qemuService.getImages(server).subscribe((qemuImages: QemuImage[]) => { + this.qemuImages = qemuImages; + }); + } - this.consoleTypes = this.configurationService.getConsoleTypes();} + this.consoleTypes = this.configurationService.getConsoleTypes(); }); - + } setServerType(serverType: string) {