mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-04-28 15:02:49 +00:00
Fix for appliances
This commit is contained in:
parent
af564d6cd7
commit
ffb3646d08
@ -113,17 +113,17 @@
|
|||||||
<mat-step *ngIf="applianceToInstall">
|
<mat-step *ngIf="applianceToInstall">
|
||||||
<ng-template matStepLabel>{{secondActionTitle}}</ng-template>
|
<ng-template matStepLabel>{{secondActionTitle}}</ng-template>
|
||||||
|
|
||||||
<mat-card [hidden]="applianceToInstall">
|
<mat-card [hidden]="!(!isLinuxPlatform && !isGns3VmAvailable && !applianceToInstall.dynamips)">
|
||||||
Please select appliance to install first
|
Please configure GNS3 VM to install selected appliance
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
|
||||||
<mat-card [hidden]="!applianceToInstall">
|
<mat-card [hidden]="!(isLinuxPlatform || isGns3VmAvailable || applianceToInstall.dynamips)">
|
||||||
<div *ngIf="applianceToInstall.qemu">
|
<div *ngIf="applianceToInstall.qemu">
|
||||||
<div>
|
<div>
|
||||||
Server type<br/>
|
Server type<br/>
|
||||||
<mat-radio-group class="radio-group">
|
<mat-radio-group class="radio-group">
|
||||||
<mat-radio-button [disabled]="true" class="radio-button" value="1" (click)="setServerType('local')">Install the appliance locally</mat-radio-button>
|
<mat-radio-button [disabled]="!isLinuxPlatform" [checked]="!isGns3VmChosen" class="radio-button" value="1" (click)="setServerType('local')">Install the appliance locally</mat-radio-button>
|
||||||
<mat-radio-button class="radio-button" value="2" checked (click)="setServerType('gns3 vm')">Install the appliance on the GNS3 VM</mat-radio-button>
|
<mat-radio-button [disabled]="!isGns3VmAvailable" [checked]="isGns3VmChosen" class="radio-button" value="2" (click)="setServerType('gns3 vm')">Install the appliance on the GNS3 VM</mat-radio-button>
|
||||||
</mat-radio-group>
|
</mat-radio-group>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@ -170,8 +170,8 @@
|
|||||||
<div>
|
<div>
|
||||||
Server type<br/>
|
Server type<br/>
|
||||||
<mat-radio-group class="radio-group">
|
<mat-radio-group class="radio-group">
|
||||||
<mat-radio-button [disabled]="true" class="radio-button" value="1" (click)="setServerType('local')">Install the appliance locally</mat-radio-button>
|
<mat-radio-button [disabled]="!isLinuxPlatform" [checked]="!isGns3VmChosen" class="radio-button" value="1" (click)="setServerType('local')">Install the appliance locally</mat-radio-button>
|
||||||
<mat-radio-button class="radio-button" value="2" checked (click)="setServerType('gns3 vm')">Install the appliance on the GNS3 VM</mat-radio-button>
|
<mat-radio-button [disabled]="!isGns3VmAvailable" [checked]="isGns3VmChosen" class="radio-button" value="2" (click)="setServerType('gns3 vm')">Install the appliance on the GNS3 VM</mat-radio-button>
|
||||||
</mat-radio-group>
|
</mat-radio-group>
|
||||||
</div>
|
</div>
|
||||||
<button mat-raised-button color="primary" (click)="createDockerTemplate()" class="create-button">Create docker template</button>
|
<button mat-raised-button color="primary" (click)="createDockerTemplate()" class="create-button">Create docker template</button>
|
||||||
@ -181,8 +181,8 @@
|
|||||||
<div>
|
<div>
|
||||||
Server type<br/>
|
Server type<br/>
|
||||||
<mat-radio-group class="radio-group">
|
<mat-radio-group class="radio-group">
|
||||||
<mat-radio-button class="radio-button" value="1" (click)="setServerType('local')">Install the appliance locally</mat-radio-button>
|
<mat-radio-button [checked]="!isGns3VmChosen" class="radio-button" value="1" (click)="setServerType('local')">Install the appliance locally</mat-radio-button>
|
||||||
<mat-radio-button class="radio-button" value="2" checked (click)="setServerType('gns3 vm')">Install the appliance on the GNS3 VM</mat-radio-button>
|
<mat-radio-button [disabled]="!isGns3VmAvailable" [checked]="isGns3VmChosen" class="radio-button" value="2" (click)="setServerType('gns3 vm')">Install the appliance on the GNS3 VM</mat-radio-button>
|
||||||
</mat-radio-group>
|
</mat-radio-group>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@ -214,8 +214,8 @@
|
|||||||
<div>
|
<div>
|
||||||
Server type<br/>
|
Server type<br/>
|
||||||
<mat-radio-group class="radio-group">
|
<mat-radio-group class="radio-group">
|
||||||
<mat-radio-button [disabled]="true" class="radio-button" value="1" (click)="setServerType('local')">Install the appliance locally</mat-radio-button>
|
<mat-radio-button [disabled]="!isLinuxPlatform" [checked]="!isGns3VmChosen" class="radio-button" value="1" (click)="setServerType('local')">Install the appliance locally</mat-radio-button>
|
||||||
<mat-radio-button class="radio-button" value="2" checked (click)="setServerType('gns3 vm')">Install the appliance on the GNS3 VM</mat-radio-button>
|
<mat-radio-button [disabled]="!isGns3VmAvailable" [checked]="isGns3VmChosen" class="radio-button" value="2" (click)="setServerType('gns3 vm')">Install the appliance on the GNS3 VM</mat-radio-button>
|
||||||
</mat-radio-group>
|
</mat-radio-group>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
@ -26,6 +26,7 @@ import { IouService } from '../../../services/iou.service';
|
|||||||
import { IouTemplate } from '../../../models/templates/iou-template';
|
import { IouTemplate } from '../../../models/templates/iou-template';
|
||||||
import { TemplateService } from '../../../services/template.service';
|
import { TemplateService } from '../../../services/template.service';
|
||||||
import { Template } from '../../../models/template';
|
import { Template } from '../../../models/template';
|
||||||
|
import { ComputeService } from '../../../services/compute.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-new-template-dialog',
|
selector: 'app-new-template-dialog',
|
||||||
@ -56,7 +57,10 @@ export class NewTemplateDialogComponent implements OnInit {
|
|||||||
public applianceToInstall: Appliance;
|
public applianceToInstall: Appliance;
|
||||||
public selectedImages: any[];
|
public selectedImages: any[];
|
||||||
|
|
||||||
private isGns3VmChosen = true;
|
public isGns3VmAvailable = false;
|
||||||
|
public isLinuxPlatform = false;
|
||||||
|
|
||||||
|
private isGns3VmChosen = false;
|
||||||
private isLocalComputerChosen = false;
|
private isLocalComputerChosen = false;
|
||||||
|
|
||||||
public qemuBinaries: QemuBinary[] = [];
|
public qemuBinaries: QemuBinary[] = [];
|
||||||
@ -85,10 +89,21 @@ export class NewTemplateDialogComponent implements OnInit {
|
|||||||
private iosService: IosService,
|
private iosService: IosService,
|
||||||
private iouService: IouService,
|
private iouService: IouService,
|
||||||
private templateService: TemplateService,
|
private templateService: TemplateService,
|
||||||
public dialog: MatDialog
|
public dialog: MatDialog,
|
||||||
|
private computeService: ComputeService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
this.computeService.getComputes(this.server).subscribe((computes) => {
|
||||||
|
computes.forEach(compute => {
|
||||||
|
if (compute.compute_id === 'vm') {
|
||||||
|
this.isGns3VmAvailable = true;
|
||||||
|
this.isGns3VmChosen = true;
|
||||||
|
}
|
||||||
|
if (compute.capabilities.platform === 'linux') this.isLinuxPlatform = true;
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
this.qemuService.getImages(this.server).subscribe((qemuImages) => {
|
this.qemuService.getImages(this.server).subscribe((qemuImages) => {
|
||||||
this.qemuImages = qemuImages;
|
this.qemuImages = qemuImages;
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user