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