gns3-web-ui/src/app/components/preferences/qemu/add-qemu-vm-template/add-qemu-vm-template.component.html
piotrpekala7 8b177013d1
Updates from main branch (#1227)
* Update ReleaseNotes.txt

* Release 2.2.22

* Updating dependencies

* Update package.json

* Update project-map.component.ts

* Updating dependencies

* Update main.yml

* Bump postcss from 7.0.35 to 7.0.36

Bumps [postcss](https://github.com/postcss/postcss) from 7.0.35 to 7.0.36.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/7.0.35...7.0.36)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump ws from 6.2.1 to 6.2.2

Bumps [ws](https://github.com/websockets/ws) from 6.2.1 to 6.2.2.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/6.2.1...6.2.2)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix: package.json & yarn.lock to reduce vulnerabilities

The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-JSZIP-1251497

* Updating packages to latest versions

* Release 2.2.23

* Updating dependencies

* Bump tar from 6.1.0 to 6.1.6

Bumps [tar](https://github.com/npm/node-tar) from 6.1.0 to 6.1.6.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-tar/compare/v6.1.0...v6.1.6)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump url-parse from 1.5.1 to 1.5.3

Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.1 to 1.5.3.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.5.1...1.5.3)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Updating dependencies

* Removing vulnerabilities

* Updating angular-devkit/build-angular

* Update yarn.lock

* Fix for https://github.com/GNS3/gns3-web-ui/issues/1184

* Release 2.2.24

* Option to access system status from servers page

* Updating dependencies

* Release 2.2.25

* Update package.json

* Bump nth-check from 2.0.0 to 2.0.1

Bumps [nth-check](https://github.com/fb55/nth-check) from 2.0.0 to 2.0.1.
- [Release notes](https://github.com/fb55/nth-check/releases)
- [Commits](https://github.com/fb55/nth-check/compare/v2.0.0...v2.0.1)

---
updated-dependencies:
- dependency-name: nth-check
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix for theming

* Update template.component.ts

* Updating dependencies

* Update yarn.lock

* Update yarn.lock

* Update yarn.lock

* Release 2.2.26

* Update package.json

* show upload file progress when uploading qemu template.

* fix progress bar incorrect when upload file twice

* Updating packages

* Updating packages

* Update package.json

* Update yarn.lock

* updating packages

* Updating angular material

* Fix for error with component factory after migration to angular v13

* Update yarn.lock

* Update .gitignore

* Fix for builds on github

* Removing electron builder

* Removing sentry/cli

* Updating dependencies

* Release web UI 2.2.27

* Reverting updates

* Angular version set to 12.2.12

* Updating snyk version

* Update configurator-docker.component.ts

* Update new-template-dialog.component.html

* Mouse pointer #1219

* Update topology-summary.component.ts

* Update project-map.component.ts

* Update project-map.component.ts

* Release web UI 2.2.28

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: snyk-bot <snyk-bot@snyk.io>
Co-authored-by: potats0 <potatso>
2021-12-28 14:39:15 +01:00

120 lines
4.6 KiB
HTML

<div class="content">
<div class="default-header">
<div class="row">
<h1 class="col">New QEMU VM template</h1>
</div>
</div>
<div class="default-content">
<div class="container mat-elevation-z8">
<mat-vertical-stepper [linear]="true">
<mat-step label="Server type" [completed]="isLocalComputerChosen">
<mat-radio-group class="radio-group">
<mat-radio-button class="radio-button" value="1" (click)="setServerType('local')" checked
>Run this QEMU VM locally</mat-radio-button
>
</mat-radio-group>
</mat-step>
<mat-step label="QEMU VM Name" [completed]="nameForm.get('templateName').value">
<form [formGroup]="nameForm">
<mat-form-field class="form-field">
<input
matInput
type="text"
formControlName="templateName"
placeholder="Please choose a descriptive name for your new QEMU virtual machine"
ngDefaultContro
/> </mat-form-field
><br />
</form>
</mat-step>
<mat-step label="QEMU binary and memory" [completed]="memoryForm.get('ramMemory').value && selectedBinary">
<form [formGroup]="memoryForm">
<mat-form-field class="form-field">
<mat-select
placeholder="Qemu binary"
[(ngModel)]="selectedBinary"
[ngModelOptions]="{ standalone: true }"
>
<mat-option *ngFor="let binary of qemuBinaries" [value]="binary">
{{ binary.path }}
</mat-option>
</mat-select> </mat-form-field
><br />
<mat-form-field class="form-field">
<input matInput type="number" placeholder="RAM" formControlName="ramMemory" ngDefaultControl />
<span matSuffix>MB</span>
</mat-form-field>
</form>
</mat-step>
<mat-step label="Console type" [completed]="qemuTemplate.console_type">
<mat-form-field class="form-field">
<mat-select
placeholder="Console type"
[(ngModel)]="qemuTemplate.console_type"
[ngModelOptions]="{ standalone: true }"
>
<mat-option *ngFor="let type of consoleTypes" [value]="type">
{{ type }}
</mat-option>
</mat-select>
</mat-form-field>
</mat-step>
<mat-step label="Disk image">
<form [formGroup]="diskForm">
<mat-radio-group class="radio-group">
<mat-radio-button class="radio-button" value="1" (click)="setDiskImage('existingImage')" checked
>Existing image</mat-radio-button
>
<mat-radio-button class="radio-button" value="2" (click)="setDiskImage('newImage')"
>New image</mat-radio-button
> </mat-radio-group
><br /><br />
<mat-select
*ngIf="!newImageSelected"
placeholder="Disk image (hda)"
[ngModelOptions]="{ standalone: true }"
[(ngModel)]="selectedImage"
>
<mat-option *ngFor="let image of qemuImages" [value]="image">
{{ image.filename }}
</mat-option>
</mat-select>
<div *ngIf="newImageSelected">
<input
type="file"
accept=".qcow2"
#file
class="nonvisible"
(change)="uploadImageFile($event)"
ng2FileSelect
[uploader]="uploader"
/>
<button mat-raised-button color="primary" (click)="file.click()" class="file-button">Browse</button>
<mat-form-field class="file-name-form-field">
<input
matInput
type="text"
[(ngModel)]="chosenImage"
formControlName="fileName"
placeholder="Please enter name"
/>
</mat-form-field>
<div *ngIf="uploadedFile">
<mat-progress-bar mode="determinate" [value]="uploadProgress" aria-valuemin="0" aria-valuemax="100"></mat-progress-bar>
</div>
</div>
</form>
</mat-step>
</mat-vertical-stepper>
</div>
<div class="buttons-bar">
<button mat-button class="cancel-button" (click)="goBack()">Cancel</button>
<button mat-raised-button color="primary" (click)="addTemplate()">Add template</button>
</div>
</div>
</div>