I resolved "#1287 cannot open Qemu template manually including adding a Qemu template during step3.

This commit is contained in:
Sakshi Goel 2022-04-01 12:55:14 +05:30
parent 316fe735fc
commit 8adad9c13f

View File

@ -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) {