mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-04-09 03:24:13 +00:00
.
This commit is contained in:
parent
408130596a
commit
4d5a5b8934
@ -32,10 +32,6 @@ export class MockedQemuService {
|
||||
return of(qemuTemplate);
|
||||
}
|
||||
|
||||
public getBinaries(controller:Controller ) {
|
||||
return of([]);
|
||||
}
|
||||
|
||||
public getImages(controller:Controller ) {
|
||||
return of([]);
|
||||
}
|
||||
@ -105,10 +101,6 @@ xdescribe('AddQemuVmTemplateComponent', () => {
|
||||
component.memoryForm.controls['ramMemory'].setValue(0);
|
||||
component.diskForm.controls['fileName'].setValue('file name');
|
||||
component.chosenImage = 'path';
|
||||
component.selectedBinary = {
|
||||
path: 'path',
|
||||
version: 'version',
|
||||
};
|
||||
component.newImageSelected = true;
|
||||
component.controller = { id: 1 } as Controller ;
|
||||
|
||||
@ -124,10 +116,6 @@ xdescribe('AddQemuVmTemplateComponent', () => {
|
||||
component.memoryForm.controls['ramMemory'].setValue(0);
|
||||
component.diskForm.controls['fileName'].setValue('file name');
|
||||
component.chosenImage = 'path';
|
||||
component.selectedBinary = {
|
||||
path: 'path',
|
||||
version: 'version',
|
||||
};
|
||||
component.newImageSelected = true;
|
||||
component.controller = { id: 1 } as Controller ;
|
||||
|
||||
@ -142,10 +130,6 @@ xdescribe('AddQemuVmTemplateComponent', () => {
|
||||
component.memoryForm.controls['binary'].setValue('binary');
|
||||
component.diskForm.controls['fileName'].setValue('file name');
|
||||
component.chosenImage = 'path';
|
||||
component.selectedBinary = {
|
||||
path: 'path',
|
||||
version: 'version',
|
||||
};
|
||||
component.newImageSelected = true;
|
||||
component.controller = { id: 1 } as Controller ;
|
||||
|
||||
|
@ -25,10 +25,8 @@ import { ToasterService } from '../../../../services/toaster.service';
|
||||
})
|
||||
export class AddQemuVmTemplateComponent implements OnInit {
|
||||
controller:Controller ;
|
||||
qemuBinaries: QemuBinary[] = [];
|
||||
selectPlatform: string[] = [];
|
||||
selectedPlatform: string;
|
||||
selectedBinary: QemuBinary;
|
||||
ramMemory: number;
|
||||
consoleTypes: string[] = [];
|
||||
newImageSelected: boolean = false;
|
||||
@ -172,7 +170,6 @@ export class AddQemuVmTemplateComponent implements OnInit {
|
||||
addTemplate() {
|
||||
if (!this.nameForm.invalid && !this.memoryForm.invalid && (this.selectedImage || this.chosenImage)) {
|
||||
this.qemuTemplate.ram = +this.memoryForm.get('ramMemory').value;
|
||||
// this.qemuTemplate.qemu_path = this.selectedBinary.path;
|
||||
this.qemuTemplate.platform = this.selectedPlatform;
|
||||
if (this.newImageSelected) {
|
||||
this.qemuTemplate.hda_disk_image = this.diskForm.get('fileName').value;
|
||||
|
@ -16,7 +16,6 @@ import { ToasterService } from '../../../../services/toaster.service';
|
||||
})
|
||||
export class CopyQemuVmTemplateComponent implements OnInit {
|
||||
controller:Controller ;
|
||||
qemuBinaries: QemuBinary[] = [];
|
||||
templateName: string = '';
|
||||
qemuTemplate: QemuTemplate;
|
||||
nameForm: FormGroup;
|
||||
|
@ -68,13 +68,7 @@
|
||||
<mat-form-field class="form-field">
|
||||
<input matInput type="number" [(ngModel)]="qemuTemplate.cpus" placeholder="vCPUs" />
|
||||
</mat-form-field>
|
||||
<!-- <mat-form-field class="form-field">
|
||||
<mat-select placeholder="Qemu binary" [(ngModel)]="qemuTemplate.qemu_path">
|
||||
<mat-option *ngFor="let binary of binaries" [value]="binary.path">
|
||||
{{ binary.path }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field> -->
|
||||
|
||||
<mat-form-field class="form-field">
|
||||
<mat-select placeholder="Boot priority" [(ngModel)]="qemuTemplate.boot_priority">
|
||||
<mat-option *ngFor="let priority of bootPriorities" [value]="priority[1]">
|
||||
|
@ -31,9 +31,6 @@ export class MockedQemuService {
|
||||
return of(qemuTemplate);
|
||||
}
|
||||
|
||||
public getBinaries(controller:Controller ) {
|
||||
return of([]);
|
||||
}
|
||||
|
||||
public getImages(controller:Controller ) {
|
||||
return of([]);
|
||||
|
@ -27,7 +27,6 @@ export class QemuVmTemplateDetailsComponent implements OnInit {
|
||||
onCloseOptions = [];
|
||||
categories = [];
|
||||
priorities: string[] = [];
|
||||
binaries: QemuBinary[] = [];
|
||||
activateCpuThrottling: boolean = true;
|
||||
isConfiguratorOpened: boolean = false;
|
||||
displayedColumns: string[] = ['adapter_number', 'port_name', 'adapter_type', 'actions'];
|
||||
|
@ -65,8 +65,6 @@ export class NewTemplateDialogComponent implements OnInit {
|
||||
public isLinuxPlatform = false;
|
||||
private isLocalComputerChosen = false;
|
||||
|
||||
public qemuBinaries: QemuBinary[] = [];
|
||||
public selectedBinary: QemuBinary;
|
||||
|
||||
public categories: string[] = ['all categories', 'router', 'multilayer_switch', 'guest', 'firewall'];
|
||||
public category: string = 'all categories';
|
||||
@ -332,30 +330,6 @@ export class NewTemplateDialogComponent implements OnInit {
|
||||
this.applianceToInstall = object;
|
||||
setTimeout(() => {
|
||||
this.stepper.next();
|
||||
if (this.applianceToInstall.qemu) {
|
||||
setTimeout(() => {
|
||||
if (this.qemuBinaries.length) {
|
||||
if (this.applianceToInstall.qemu.arch === 'x86_64') {
|
||||
let filtered_binaries = this.qemuBinaries.filter((n) => n.path.includes('qemu-system-x86_64'));
|
||||
if (filtered_binaries.length) {
|
||||
this.selectedBinary = filtered_binaries[0];
|
||||
}
|
||||
} else if (this.applianceToInstall.qemu.arch === 'i386') {
|
||||
let filtered_binaries = this.qemuBinaries.filter((n) => n.path.includes('qemu-system-i386'));
|
||||
if (filtered_binaries.length) {
|
||||
this.selectedBinary = filtered_binaries[0];
|
||||
}
|
||||
} else if (this.applianceToInstall.qemu.arch === 'x86_64') {
|
||||
let filtered_binaries = this.qemuBinaries.filter((n) => n.path.includes('qemu-system-arm'));
|
||||
if (filtered_binaries.length) {
|
||||
this.selectedBinary = filtered_binaries[0];
|
||||
}
|
||||
} else {
|
||||
this.selectedBinary = this.qemuBinaries[0];
|
||||
}
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
|
||||
@ -658,7 +632,6 @@ export class NewTemplateDialogComponent implements OnInit {
|
||||
qemuTemplate.first_port_name = this.applianceToInstall.first_port_name;
|
||||
qemuTemplate.port_name_format = this.applianceToInstall.port_name_format;
|
||||
qemuTemplate.symbol = this.applianceToInstall.symbol;
|
||||
// qemuTemplate.qemu_path = this.selectedBinary.path;
|
||||
qemuTemplate.compute_id = 'local';
|
||||
qemuTemplate.template_id = uuid();
|
||||
qemuTemplate.hda_disk_image = version.images.hda_disk_image;
|
||||
|
@ -21,7 +21,6 @@ export class ConfiguratorDialogCloudComponent implements OnInit {
|
||||
name: string;
|
||||
generalSettingsForm: FormGroup;
|
||||
consoleTypes: string[] = [];
|
||||
binaries: QemuBinary[] = [];
|
||||
onCloseOptions = [];
|
||||
bootPriorities = [];
|
||||
diskInterfaces: string[] = [];
|
||||
|
Loading…
x
Reference in New Issue
Block a user