mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2024-12-19 13:07:52 +00:00
Update new-template-dialog.component.ts
This commit is contained in:
parent
753e08a6ba
commit
e335a552c5
@ -357,25 +357,14 @@ export class NewTemplateDialogComponent implements OnInit {
|
||||
fileReader.readAsText(file);
|
||||
}
|
||||
|
||||
checkImage(image: Image): boolean {
|
||||
if (this.applianceToInstall.qemu) {
|
||||
if (this.qemuImages.filter(n => n.filename === image.filename).length > 0) return true;
|
||||
} else if (this.applianceToInstall.dynamips) {
|
||||
if (this.iosImages.filter(n => n.filename === image.filename).length > 0) return true;
|
||||
} else if (this.applianceToInstall.iou) {
|
||||
if (this.iouImages.filter(n => n.filename === image.filename).length > 0) return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
checkImageFromVersion(image: string): boolean {
|
||||
let imageToInstall = this.applianceToInstall.images.filter(n => n.filename === image)[0];
|
||||
if (this.applianceToInstall.qemu) {
|
||||
if (this.qemuImages.filter(n => n.filename === image).length > 0) return true;
|
||||
if (this.qemuImages.filter(n => n.md5sum === imageToInstall.md5sum).length > 0) return true;
|
||||
} else if (this.applianceToInstall.dynamips) {
|
||||
if (this.iosImages.filter(n => n.filename === image).length > 0) return true;
|
||||
if (this.iosImages.filter(n => n.md5sum === imageToInstall.md5sum).length > 0) return true;
|
||||
} else if (this.applianceToInstall.iou) {
|
||||
if (this.iouImages.filter(n => n.filename === image).length > 0) return true;
|
||||
if (this.iouImages.filter(n => n.md5sum === imageToInstall.md5sum).length > 0) return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user