mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-01-31 00:23:57 +00:00
Qemu configurator extended
This commit is contained in:
parent
041b9bc271
commit
78767399fc
@ -21,6 +21,10 @@
|
||||
width: 18%;
|
||||
}
|
||||
|
||||
.create-button {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.file-name-form-field {
|
||||
padding-left: 2%;
|
||||
width: 80%;
|
||||
|
@ -52,15 +52,17 @@
|
||||
<mat-tab label="HDD">
|
||||
<mat-card>
|
||||
<!-- to do -->
|
||||
<button mat-raised-button color="primary" (click)="openQemuImageCreator()" class="file-button">Create Qemu image</button>
|
||||
<button mat-raised-button color="primary" (click)="openQemuImageCreator()" class="create-button">Create Qemu image</button>
|
||||
<mat-card-title></mat-card-title>
|
||||
<mat-card-subtitle>
|
||||
HDA (Primary Master)
|
||||
</mat-card-subtitle>
|
||||
<mat-card-content>
|
||||
<mat-form-field class="form-field">
|
||||
<input matInput [(ngModel)]="node.properties.hda_disk_image" placeholder="Disk image">
|
||||
</mat-form-field>
|
||||
<mat-select placeholder="Disk image" [(ngModel)]="node.properties.hda_disk_image">
|
||||
<mat-option *ngFor="let image of qemuImages" [value]="image.filename">
|
||||
{{image.filename}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
<mat-form-field class="form-field">
|
||||
<mat-select placeholder="Disk interface" [(ngModel)]="node.properties.hda_disk_interface">
|
||||
<mat-option *ngFor="let interface of diskInterfaces" [value]="interface">
|
||||
@ -76,9 +78,11 @@
|
||||
HDB (Primary Slave)
|
||||
</mat-card-subtitle>
|
||||
<mat-card-content>
|
||||
<mat-form-field class="form-field">
|
||||
<input matInput [(ngModel)]="node.properties.hdb_disk_image" placeholder="Disk image">
|
||||
</mat-form-field>
|
||||
<mat-select placeholder="Disk image" [(ngModel)]="node.properties.hdb_disk_image">
|
||||
<mat-option *ngFor="let image of qemuImages" [value]="image.filename">
|
||||
{{image.filename}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
<mat-form-field class="form-field">
|
||||
<mat-select placeholder="Disk interface" [(ngModel)]="node.properties.hdb_disk_interface">
|
||||
<mat-option *ngFor="let interface of diskInterfaces" [value]="interface">
|
||||
@ -94,9 +98,11 @@
|
||||
HDC (Secondary Master)
|
||||
</mat-card-subtitle>
|
||||
<mat-card-content>
|
||||
<mat-form-field class="form-field">
|
||||
<input matInput [(ngModel)]="node.properties.hdc_disk_image" placeholder="Disk image">
|
||||
</mat-form-field>
|
||||
<mat-select placeholder="Disk image" [(ngModel)]="node.properties.hdc_disk_image">
|
||||
<mat-option *ngFor="let image of qemuImages" [value]="image.filename">
|
||||
{{image.filename}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
<mat-form-field class="form-field">
|
||||
<mat-select placeholder="Disk interface" [(ngModel)]="node.properties.hdc_disk_interface">
|
||||
<mat-option *ngFor="let interface of diskInterfaces" [value]="interface">
|
||||
@ -112,9 +118,11 @@
|
||||
HDD (Secondary Slave)
|
||||
</mat-card-subtitle>
|
||||
<mat-card-content>
|
||||
<mat-form-field class="form-field">
|
||||
<input matInput [(ngModel)]="node.properties.hdd_disk_image" placeholder="Disk image">
|
||||
</mat-form-field>
|
||||
<mat-select placeholder="Disk image" [(ngModel)]="node.properties.hdd_disk_image">
|
||||
<mat-option *ngFor="let image of qemuImages" [value]="image.filename">
|
||||
{{image.filename}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
<mat-form-field class="form-field">
|
||||
<mat-select placeholder="Disk interface" [(ngModel)]="node.properties.hdd_disk_interface">
|
||||
<mat-option *ngFor="let interface of diskInterfaces" [value]="interface">
|
||||
|
@ -10,6 +10,7 @@ import { QemuService } from '../../../../../services/qemu.service';
|
||||
import { QemuConfigurationService } from '../../../../../services/qemu-configuration.service';
|
||||
import { QemuBinary } from '../../../../../models/qemu/qemu-binary';
|
||||
import { QemuImageCreatorComponent } from './qemu-image-creator/qemu-image-creator.component';
|
||||
import { QemuImage } from '../../../../../models/qemu/qemu-image';
|
||||
|
||||
|
||||
@Component({
|
||||
@ -30,6 +31,7 @@ export class ConfiguratorDialogQemuComponent implements OnInit {
|
||||
|
||||
displayedColumns: string[] = ['adapter_number', 'port_name', 'adapter_type', 'actions'];
|
||||
networkTypes = [];
|
||||
qemuImages: QemuImage[] = [];
|
||||
|
||||
private conf = {
|
||||
autoFocus: false,
|
||||
@ -64,6 +66,10 @@ export class ConfiguratorDialogQemuComponent implements OnInit {
|
||||
this.qemuService.getBinaries(this.server).subscribe((qemuBinaries: QemuBinary[]) => {
|
||||
this.binaries = qemuBinaries;
|
||||
});
|
||||
|
||||
this.qemuService.getImages(this.server).subscribe((qemuImages: QemuImage[]) => {
|
||||
this.qemuImages = qemuImages;
|
||||
});
|
||||
}
|
||||
|
||||
openQemuImageCreator() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user