Merge pull request #1380 from GNS3/bugfix/1373

Resolve this issue:
This commit is contained in:
Jeremy Grossmann 2022-08-10 00:35:08 +02:00 committed by GitHub
commit c80ff95757
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 84 additions and 50 deletions

View File

@ -13,8 +13,8 @@
<th mat-header-cell *matHeaderCellDef>Adapter type</th> <th mat-header-cell *matHeaderCellDef>Adapter type</th>
<td mat-cell *matCellDef="let element; let i = index"> <td mat-cell *matCellDef="let element; let i = index">
<mat-select placeholder="Type" [(ngModel)]="element.adapter_type"> <mat-select placeholder="Type" [(ngModel)]="element.adapter_type">
<mat-option *ngFor="let type of networkTypes" [value]="type"> <mat-option *ngFor="let type of networkTypes" [value]="type.value">
{{ type }} {{ type.name }}
</mat-option> </mat-option>
</mat-select> </mat-select>
</td> </td>

View File

@ -194,7 +194,7 @@
</mat-form-field> </mat-form-field>
<mat-form-field class="form-field"> <mat-form-field class="form-field">
<mat-select placeholder="Type" [(ngModel)]="qemuTemplate.adapter_type"> <mat-select placeholder="Type" [(ngModel)]="qemuTemplate.adapter_type">
<mat-option *ngFor="let type of networkTypes" [value]="type[0]"> {{ type[1] }} ({{ type[0] }}) </mat-option> <mat-option *ngFor="let type of networkTypes" [value]="type.value">{{type.name}} ({{type.value}}) </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<button mat-button class="configButton" (click)="setCustomAdaptersConfiguratorState(true)"> <button mat-button class="configButton" (click)="setCustomAdaptersConfiguratorState(true)">

View File

@ -3,7 +3,36 @@ import { Injectable } from '@angular/core';
@Injectable() @Injectable()
export class QemuConfigurationService { export class QemuConfigurationService {
getPlatform() { getPlatform() {
return ['x86_64', 'aarch64', 'alpha', 'arm', 'cris', 'i386', 'lm32', 'm68k', 'microblaze', 'microblazeel', 'mips', 'mips64', 'mips64el', 'mipsel', 'moxie', 'or32', 'ppc', 'ppc64', 'ppcemb', 's390x', 'sh4', 'sh4eb', 'sparc', 'sparc64', 'tricore', 'unicore32', 'xtensa', 'xtensaeb']; return [
'x86_64',
'aarch64',
'alpha',
'arm',
'cris',
'i386',
'lm32',
'm68k',
'microblaze',
'microblazeel',
'mips',
'mips64',
'mips64el',
'mipsel',
'moxie',
'or32',
'ppc',
'ppc64',
'ppcemb',
's390x',
'sh4',
'sh4eb',
'sparc',
'sparc64',
'tricore',
'unicore32',
'xtensa',
'xtensaeb',
];
} }
getConsoleTypes() { getConsoleTypes() {
@ -16,55 +45,60 @@ export class QemuConfigurationService {
getNetworkTypes() { getNetworkTypes() {
// needs extending of custom adapter component // needs extending of custom adapter component
// let networkTypes = [["e1000", "Intel Gigabit Ethernet"],
// ["i82550", "Intel i82550 Ethernet"],
// ["i82551", "Intel i82551 Ethernet"],
// ["i82557a", "Intel i82557A Ethernet"],
// ["i82557b", "Intel i82557B Ethernet"],
// ["i82557c", "Intel i82557C Ethernet"],
// ["i82558a", "Intel i82558A Ethernet"],
// ["i82558b", "Intel i82558B Ethernet"],
// ["i82559a", "Intel i82559A Ethernet"],
// ["i82559b", "Intel i82559B Ethernet"],
// ["i82559c", "Intel i82559C Ethernet"],
// ["i82559er", "Intel i82559ER Ethernet"],
// ["i82562", "Intel i82562 Ethernet"],
// ["i82801", "Intel i82801 Ethernet"],
// ["ne2k_pci", "NE2000 Ethernet"],
// ["pcnet", "AMD PCNet Ethernet"],
// ["rtl8139", "Realtek 8139 Ethernet"],
// ["virtio", "Legacy paravirtualized Network I/O"],
// ["virtio-net-pci", "Paravirtualized Network I/O"],
// ["vmxnet3", "VMWare Paravirtualized Ethernet v3"]];
let networkTypes = [ let networkTypes = [
'e1000', { value: 'e1000', name: 'Intel Gigabit Ethernet' },
'e1000-82544gc', { value: 'e1000-82544gc', name: 'Intel 82544GC Gigabit Ethernet' },
'e1000-82545em', { value: 'e1000-82545em', name: 'Intel 82545EM Gigabit Ethernet' },
'e1000e', { value: 'e1000e', name: 'Intel PCIe Gigabit Ethernet' },
'rocker', { value: 'i82550', name: 'Intel i82550 Ethernet' },
'Intel Gigabit Ethernet', { value: 'i82551', name: 'Intel i82551 Ethernet' },
'i82550', { value: 'i82557a', name: 'Intel i82557A Ethernet' },
'i82551', { value: 'i82557b', name: 'Intel i82557B Ethernet' },
'i82557a', { value: 'i82557c', name: 'Intel i82557C Ethernet' },
'i82557b', { value: 'i82558a', name: 'Intel i82558A Ethernet' },
'i82557c', { value: 'i82558b', name: 'Intel i82558B Ethernet' },
'i82558a', { value: 'i82559a', name: 'Intel i82559A Ethernet' },
'i82558b', { value: 'i82559b', name: 'Intel i82559B Ethernet' },
'i82559a', { value: 'i82559c', name: 'Intel i82559C Ethernet' },
'i82559b', { value: 'i82559er', name: 'Intel i82559ER Ethernet' },
'i82559c', { value: 'i82562', name: 'Intel i82562 Ethernet' },
'i82559er', { value: 'i82801', name: 'Intel i82801 Ethernet' },
'i82562', { value: 'ne2k_pci', name: 'NE2000 Ethernet' },
'i82801', { value: 'pcnet', name: 'AMD PCNet Ethernet' },
'ne2k_pci', { value: 'rocker', name: 'Rocker L2 switch device' },
'pcnet', { value: 'rtl8139', name: 'Realtek 8139 Ethernet' },
'rtl8139', { value: 'virtio-net-pci', name: 'Paravirtualized Network I/O' },
'virtio', { value: 'vmxnet3', name: 'VMWare Paravirtualized Ethernet v3' },
'virtio-net-pci',
'vmxnet3',
]; ];
// let networkTypes = [
// 'e1000',
// 'e1000-82544gc',
// 'e1000-82545em',
// 'e1000e',
// 'rocker',
// 'Intel Gigabit Ethernet',
// 'i82550',
// 'i82551',
// 'i82557a',
// 'i82557b',
// 'i82557c',
// 'i82558a',
// 'i82558b',
// 'i82559a',
// 'i82559b',
// 'i82559c',
// 'i82559er',
// 'i82562',
// 'i82801',
// 'ne2k_pci',
// 'pcnet',
// 'rtl8139',
// 'virtio',
// 'virtio-net-pci',
// 'vmxnet3',
// ];
return networkTypes; return networkTypes;
} }