Compare commits

..

63 Commits

Author SHA1 Message Date
61334d197d Release v2.2.41 2023-07-12 16:23:12 +10:00
d855e5cb33 Merge branch 'master' into 2.2 2023-07-12 16:09:45 +10:00
8dbaa11808 Fix issues with default IOU values for memories always checked. Fixes #1453 2023-07-06 21:53:01 +10:00
0d7020af97 Fix issues with Qemu adapters in template preferences. Fixes #1449 2023-07-06 20:39:04 +10:00
58b9083c49 Merge pull request #1442 from GNS3/dependabot/npm_and_yarn/webpack-5.76.0
Bump webpack from 5.62.1 to 5.76.0
2023-06-30 18:30:43 +10:00
43213d0669 Merge pull request #1432 from GNS3/dependabot/npm_and_yarn/http-cache-semantics-4.1.1
Bump http-cache-semantics from 4.1.0 to 4.1.1
2023-06-30 18:21:22 +10:00
924cbe2542 Merge pull request #1431 from GNS3/dependabot/npm_and_yarn/jszip-3.10.1
Bump jszip from 3.7.1 to 3.10.1
2023-06-30 18:21:07 +10:00
d06a3efd2c Merge branch 'master' into dependabot/npm_and_yarn/jszip-3.10.1 2023-06-30 18:08:08 +10:00
e2466ca4ab Merge branch 'master' into dependabot/npm_and_yarn/http-cache-semantics-4.1.1 2023-06-30 18:07:02 +10:00
1da94efe63 Merge branch 'master' into dependabot/npm_and_yarn/webpack-5.76.0 2023-06-30 18:06:16 +10:00
838480509e Support for UEFI boot mode option for Qemu VMs 2023-06-23 11:29:38 +09:30
04c28bd40a Developement on v2.2.41.dev1 2023-06-06 12:23:59 +09:30
328dd37ffe Release v2.2.40 2023-06-06 10:10:29 +09:30
c5a692babf Merge pull request #1445 from GNS3/dependabot/pip/scripts/requests-2.31.0
Bump requests from 2.25.1 to 2.31.0 in /scripts
2023-05-23 08:52:15 +08:00
119afd14d2 Bump requests from 2.25.1 to 2.31.0 in /scripts
Bumps [requests](https://github.com/psf/requests) from 2.25.1 to 2.31.0.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.25.1...v2.31.0)

---
updated-dependencies:
- dependency-name: requests
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-23 00:51:18 +00:00
37e6921ffb Support HTTP/HTTPS node console. Ref https://github.com/GNS3/gns3-gui/issues/3448 2023-05-22 19:48:23 +08:00
5d48ea046d Development on v2.2.40.dev1 2023-05-08 19:05:57 +08:00
4342d27d07 Release v2.2.39 2023-05-08 18:59:31 +08:00
3394035e2e Bump webpack from 5.62.1 to 5.76.0
Bumps [webpack](https://github.com/webpack/webpack) from 5.62.1 to 5.76.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.62.1...v5.76.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-14 17:07:32 +00:00
49403a5568 Development on v2.2.39.dev1 2023-02-28 15:27:36 +10:00
70e4745657 Merge pull request #1441
Release v2.2.38
2023-02-28 13:21:39 +08:00
543b81c81b Release v2.2.38 2023-02-28 15:17:27 +10:00
02562cd046 Merge pull request #1440 from GNS3/fix/1439
Support extra disk images when importing appliance
2023-02-26 18:42:11 +08:00
252452051a Support extra disk images (hdc/hdd) and cdrom image when importing appliance 2023-02-26 20:15:11 +10:00
a64ff3503e Merge pull request #1433 from GNS3/fix/1336
Fix new template action not using "port_segment_size" and "default_name_format"
2023-02-09 12:20:14 +05:45
318143f5a8 Fix new template action not using "port_segment_size" and "default_name_format" 2023-02-04 13:25:10 +08:00
e029bccf18 Bump http-cache-semantics from 4.1.0 to 4.1.1
Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/kornelski/http-cache-semantics/releases)
- [Commits](https://github.com/kornelski/http-cache-semantics/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: http-cache-semantics
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-03 04:50:10 +00:00
721adacde4 Bump jszip from 3.7.1 to 3.10.1
Bumps [jszip](https://github.com/Stuk/jszip) from 3.7.1 to 3.10.1.
- [Release notes](https://github.com/Stuk/jszip/releases)
- [Changelog](https://github.com/Stuk/jszip/blob/main/CHANGES.md)
- [Commits](https://github.com/Stuk/jszip/compare/v3.7.1...v3.10.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-02 17:12:02 +00:00
4374573c60 Remove cache and scan master branch in codeql.yml 2023-02-01 11:55:08 +08:00
1e7c04f93c Merge pull request #1423 from GNS3/dependabot/pip/scripts/setuptools-65.5.1
Bump setuptools from 54.2.0 to 65.5.1 in /scripts
2023-02-01 08:04:28 +05:45
7e172e30ba Merge pull request #1427 from GNS3/bugfix/1269
Fix console launch on Firefox
2023-01-31 17:27:37 +05:45
4d243f895c Merge pull request #1428 from GNS3/bugfix/1279
Fix error when suspending and configuring a packet filter on a link
2023-01-31 17:26:51 +05:45
aeef3e74ed Fix error when suspending and configuring a packet filter on a link 2023-01-31 19:18:27 +08:00
83d72787f4 Use a hidden iframe to open console on Firefox 2023-01-31 18:56:07 +08:00
829bfe12d7 Merge remote-tracking branch 'origin/master' 2023-01-31 09:45:45 +08:00
f5b5c717b4 Automatically add new issues to GNS3 project 2023-01-31 09:45:37 +08:00
5b7da298d6 Merge pull request #1426 from GNS3/dependabot/npm_and_yarn/ua-parser-js-0.7.33
Bump ua-parser-js from 0.7.31 to 0.7.33
2023-01-27 14:59:33 +05:45
d7742a7c59 Bump ua-parser-js from 0.7.31 to 0.7.33
Bumps [ua-parser-js](https://github.com/faisalman/ua-parser-js) from 0.7.31 to 0.7.33.
- [Release notes](https://github.com/faisalman/ua-parser-js/releases)
- [Changelog](https://github.com/faisalman/ua-parser-js/blob/master/changelog.md)
- [Commits](https://github.com/faisalman/ua-parser-js/compare/0.7.31...0.7.33)

---
updated-dependencies:
- dependency-name: ua-parser-js
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-27 08:44:32 +00:00
e0ce8c0770 Development on v2.2.38.dev1 2023-01-24 15:06:43 +08:00
061dec9d75 Release v2.2.37 2023-01-24 15:00:34 +08:00
684a160d99 Merge remote-tracking branch 'origin/master' 2023-01-04 19:03:48 +08:00
21a12c151b Development on v2.2.37dev 2023-01-04 19:03:17 +08:00
17be201862 Merge pull request #1424 from GNS3/dependabot/npm_and_yarn/json5-1.0.2
Bump json5 from 1.0.1 to 1.0.2
2023-01-04 16:43:01 +05:45
57385b84f7 Bump json5 from 1.0.1 to 1.0.2
Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v1.0.1...v1.0.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-04 10:57:08 +00:00
8e4f860b43 Release v2.2.36 2023-01-04 18:56:35 +08:00
2c015e695d Add TPM support for Qemu VMs 2023-01-04 18:52:46 +08:00
9fe2b3646b Bump setuptools from 54.2.0 to 65.5.1 in /scripts
Bumps [setuptools](https://github.com/pypa/setuptools) from 54.2.0 to 65.5.1.
- [Release notes](https://github.com/pypa/setuptools/releases)
- [Changelog](https://github.com/pypa/setuptools/blob/main/CHANGES.rst)
- [Commits](https://github.com/pypa/setuptools/compare/v54.2.0...v65.5.1)

---
updated-dependencies:
- dependency-name: setuptools
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-27 15:56:29 +00:00
313966548f Scan master-3.0 branch with Mend 2022-12-27 13:21:53 +08:00
69a7cf44c5 Merge pull request #1420 from GNS3/dependabot/npm_and_yarn/snyk-1.1064.0
Bump snyk from 1.996.0 to 1.1064.0
2022-12-20 20:01:32 +05:45
faec4b07be Bump snyk from 1.996.0 to 1.1064.0
Bumps [snyk](https://github.com/snyk/snyk) from 1.996.0 to 1.1064.0.
- [Release notes](https://github.com/snyk/snyk/releases)
- [Commits](https://github.com/snyk/snyk/compare/v1.996.0...v1.1064.0)

---
updated-dependencies:
- dependency-name: snyk
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-20 13:40:30 +00:00
908c721094 Create SECURITY.md 2022-12-20 21:34:44 +08:00
e3c4188171 Create codeql.yml 2022-12-20 21:32:46 +08:00
f48471cdd4 Merge pull request #1418 from GNS3/dependabot/npm_and_yarn/express-4.18.2
Bump express from 4.17.1 to 4.18.2
2022-12-07 13:17:33 +05:45
50fb05aa8e Bump express from 4.17.1 to 4.18.2
Bumps [express](https://github.com/expressjs/express) from 4.17.1 to 4.18.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.17.1...4.18.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-07 07:18:48 +00:00
63728091c1 Merge pull request #1417 from GNS3/dependabot/npm_and_yarn/qs-6.5.3
Bump qs from 6.5.2 to 6.5.3
2022-12-07 13:03:17 +05:45
03a417d78c Bump qs from 6.5.2 to 6.5.3
Bumps [qs](https://github.com/ljharb/qs) from 6.5.2 to 6.5.3.
- [Release notes](https://github.com/ljharb/qs/releases)
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ljharb/qs/compare/v6.5.2...v6.5.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-07 03:40:35 +00:00
c7a7a357c6 Merge pull request #1409 from GNS3/dependabot/npm_and_yarn/socket.io-parser-4.0.5
Bump socket.io-parser from 4.0.4 to 4.0.5
2022-12-03 21:16:35 +08:00
7d95267283 Merge pull request #1416 from GNS3/dependabot/npm_and_yarn/decode-uri-component-0.2.2
Bump decode-uri-component from 0.2.0 to 0.2.2
2022-12-03 21:16:13 +08:00
8a7309bde1 Bump decode-uri-component from 0.2.0 to 0.2.2
Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2.
- [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases)
- [Commits](https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2)

---
updated-dependencies:
- dependency-name: decode-uri-component
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-03 00:10:34 +00:00
afccf4955b Merge pull request #1412 from GNS3/dependabot/npm_and_yarn/loader-utils-1.4.2
Bump loader-utils from 1.4.1 to 1.4.2
2022-11-16 18:36:13 +08:00
ad57a5f3f7 Bump loader-utils from 1.4.1 to 1.4.2
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.1 to 1.4.2.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.2/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v1.4.1...v1.4.2)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-16 07:53:15 +00:00
7407ddafd3 Bump socket.io-parser from 4.0.4 to 4.0.5
Bumps [socket.io-parser](https://github.com/socketio/socket.io-parser) from 4.0.4 to 4.0.5.
- [Release notes](https://github.com/socketio/socket.io-parser/releases)
- [Changelog](https://github.com/socketio/socket.io-parser/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io-parser/compare/4.0.4...4.0.5)

---
updated-dependencies:
- dependency-name: socket.io-parser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-09 22:03:22 +00:00
168de3aecb Development on v2.2.36dev 2022-11-08 19:15:15 +08:00
24 changed files with 576 additions and 403 deletions

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,16 @@
name: Add new issues to GNS3 project
on:
issues:
types:
- opened
jobs:
add-to-project:
name: Add issue to project
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@v0.4.0
with:
project-url: https://github.com/orgs/GNS3/projects/3
github-token: ${{ secrets.ADD_NEW_ISSUES_TO_PROJECT }}

76
.github/workflows/codeql.yml vendored Normal file
View File

@ -0,0 +1,76 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ "master", "master-3.0" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master", "master-3.0" ]
schedule:
- cron: '38 18 * * 6'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'javascript', 'python' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Use only 'java' to analyze code written in Java, Kotlin or both
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
# Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"

View File

@ -2,7 +2,8 @@
"scanSettings": {
"configMode": "AUTO",
"configExternalURL": "",
"projectToken" : ""
"projectToken" : "",
"baseBranches": ["master", "master-3.0"]
},
"checkRunSettings": {
"vulnerableCheckRunConclusionLevel": "failure"
@ -10,4 +11,4 @@
"issueSettings": {
"minSeverityLevel": "LOW"
}
}
}

5
SECURITY.md Normal file
View File

@ -0,0 +1,5 @@
# Security Policy
## Reporting a Vulnerability
Please use GitHub's report a vulnerability feature. More information can be found in https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability

View File

@ -1,6 +1,6 @@
{
"name": "gns3-web-ui",
"version": "2.2.35",
"version": "2.2.41",
"author": {
"name": "GNS3 Technology Inc.",
"email": "developers@gns3.com"
@ -79,7 +79,7 @@
"rxjs": "^6.6.7",
"rxjs-compat": "^6.6.7",
"save-svg-as-png": "^1.4.17",
"snyk": "^1.996.0",
"snyk": "^1.1064.0",
"spark-md5": "^3.0.2",
"svg-crowbar": "^0.7.0",
"tree-kill": "^1.2.2",
@ -125,7 +125,7 @@
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.18.0",
"typescript": "4.2.3",
"webpack": "5.62.1",
"webpack": "5.76.0",
"yarn-upgrade-all": "^0.5.4"
},
"greenkeeper": {

View File

@ -1,6 +1,6 @@
setuptools==54.2.0
setuptools==65.5.1
cx_Freeze==5.1.1
requests==2.25.1
requests==2.31.0
packaging==20.9
appdirs==1.4.4
psutil==5.8.0

View File

@ -55,6 +55,8 @@ export class Properties {
extra_hosts: string;
extra_volumes: string[];
replicate_network_connection_state: boolean;
tpm: boolean;
uefi: boolean;
}
export class Node {

View File

@ -87,6 +87,7 @@ export class LinkWidget implements Widget {
.filter((l) => {
return (
!l.capturing &&
!l.suspend &&
(l.filters.bpf || l.filters.corrupt || l.filters.delay || l.filters.frequency_drop || l.filters.packet_loss)
);
})
@ -113,9 +114,7 @@ export class LinkWidget implements Widget {
link_body
.filter((l) => {
return (
l.capturing &&
l.suspend &&
!(l.filters.bpf || l.filters.corrupt || l.filters.delay || l.filters.frequency_drop || l.filters.packet_loss)
l.suspend
);
})
.append<SVGGElement>('g')

View File

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

View File

@ -98,14 +98,14 @@
<mat-checkbox [(ngModel)]="iouTemplate.l1_keepalives">
Enable layer 1 keepalive messages (non-functional) </mat-checkbox
><br />
<mat-checkbox [(ngModel)]="defaultSettings"> Use default IOU values for memories </mat-checkbox>
<mat-form-field class="form-field" *ngIf="!defaultSettings">
<mat-checkbox [(ngModel)]="iouTemplate.use_default_iou_values"> Use default IOU values for memories </mat-checkbox>
<mat-form-field class="form-field" *ngIf="!iouTemplate.use_default_iou_values">
<input matInput type="number" [(ngModel)]="iouTemplate.ram" placeholder="RAM size" />
<span matSuffix>MB</span>
</mat-form-field>
<mat-form-field class="form-field" *ngIf="!defaultSettings">
<mat-form-field class="form-field" *ngIf="!iouTemplate.use_default_iou_values">
<input matInput type="number" [(ngModel)]="iouTemplate.nvram" placeholder="NVRAM size" />
<span matSuffix>MB</span>
<span matSuffix>KB</span>
</mat-form-field>
</mat-expansion-panel>
<mat-expansion-panel>

View File

@ -186,7 +186,7 @@
</mat-form-field>
<mat-form-field class="form-field">
<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-form-field>
<button mat-button class="configButton" (click)="setCustomAdaptersConfiguratorState(true)">

View File

@ -1,4 +1,5 @@
import { Component, Input } from '@angular/core';
import { DeviceDetectorService } from 'ngx-device-detector';
import { Node } from '../../../../../cartography/models/node';
import { Server } from '../../../../../models/server';
import { NodeService } from '../../../../../services/node.service';
@ -12,7 +13,7 @@ export class ConsoleDeviceActionBrowserComponent {
@Input() server: Server;
@Input() node: Node;
constructor(private toasterService: ToasterService, private nodeService: NodeService) {}
constructor(private toasterService: ToasterService, private nodeService: NodeService, private deviceService: DeviceDetectorService) {}
openConsole() {
this.nodeService.getNode(this.server, this.node).subscribe((node: Node) => {
@ -21,6 +22,31 @@ export class ConsoleDeviceActionBrowserComponent {
});
}
createHiddenIframe(target: Element, uri: string) {
const iframe = document.createElement("iframe");
iframe.src = uri;
iframe.id = "hiddenIframe";
iframe.style.display = "none";
target.appendChild(iframe);
return iframe;
}
openUriUsingFirefox(uri: string) {
var iframe = (document.querySelector("#hiddenIframe") as HTMLIFrameElement);
if (!iframe) {
iframe = this.createHiddenIframe(document.body, "about:blank");
}
try {
iframe.contentWindow.location.href = uri;
} catch (e) {
if (e.name === "NS_ERROR_UNKNOWN_PROTOCOL") {
this.toasterService.error('Protocol handler does not exist');
}
}
}
startConsole() {
if (this.node.status !== 'started') {
this.toasterService.error('This node must be started before a console can be opened');
@ -33,22 +59,31 @@ export class ConsoleDeviceActionBrowserComponent {
this.node.console_host = this.server.host;
}
const device = this.deviceService.getDeviceInfo();
try {
var uri;
if (this.node.console_type === 'telnet') {
location.assign(
`gns3+telnet://${this.node.console_host}:${this.node.console}?name=${this.node.name}&project_id=${this.node.project_id}&node_id=${this.node.node_id}`
);
uri = `gns3+telnet://${this.node.console_host}:${this.node.console}?name=${this.node.name}&project_id=${this.node.project_id}&node_id=${this.node.node_id}`;
} else if (this.node.console_type === 'vnc') {
location.assign(
`gns3+vnc://${this.node.console_host}:${this.node.console}?name=${this.node.name}&project_id=${this.node.project_id}&node_id=${this.node.node_id}`
);
uri = `gns3+vnc://${this.node.console_host}:${this.node.console}?name=${this.node.name}&project_id=${this.node.project_id}&node_id=${this.node.node_id}`;
} else if (this.node.console_type.startsWith('spice')) {
location.assign(
`gns3+spice://${this.node.console_host}:${this.node.console}?name=${this.node.name}&project_id=${this.node.project_id}&node_id=${this.node.node_id}`
);
uri = `gns3+spice://${this.node.console_host}:${this.node.console}?name=${this.node.name}&project_id=${this.node.project_id}&node_id=${this.node.node_id}`
} else if (this.node.console_type.startsWith('http')) {
uri = `${this.node.console_type}://${this.node.console_host}:${this.node.console}`
return window.open(uri); // open an http console directly in a new window/tab
} else {
this.toasterService.error('Supported console types are: telnet, vnc, spice and spice+agent.');
}
if (device.browser === "Firefox") {
// Use a hidden iframe otherwise Firefox will disconnect
// from the GNS3 controller websocket if we use location.assign()
this.openUriUsingFirefox(uri);
} else {
location.assign(uri);
}
} catch (e) {
this.toasterService.error(e);
}

View File

@ -91,6 +91,7 @@ export class ImportApplianceComponent implements OnInit {
template.console_auto_start = appliance.iou.console_auto_start;
template.ethernet_adapters = appliance.iou.ethernet_adapters;
template.l1_keepalives = appliance.iou.l1_keepalives;
template.use_default_iou_values = appliance.iou.use_default_iou_values;
template.nvram = appliance.iou.nvram;
template.ram = appliance.iou.ram;
template.serial_adapters = appliance.iou.serial_adapters;

View File

@ -236,6 +236,8 @@ export class LogConsoleComponent implements OnInit, AfterViewInit, OnDestroy {
location.assign(
`gns3+spice://${node.console_host}:${node.console}?name=${node.name}&project_id=${node.project_id}&node_id=${node.node_id}`
);
} else if (node.console_type.startsWith('http')) {
window.open(`${node.console_type}://${node.console_host}:${node.console}`);
} else {
this.showCommand('Supported console types are: telnet, vnc, spice and spice+agent');
}

View File

@ -77,7 +77,7 @@
</ng-container>
<!-- <ng-container matColumnDef="expandedDetail">
<mat-cell *matCellDef="let detail">
<mat-cell *matCellDef="let detail">
The symbol for {{detail.element}}
</mat-cell>
</ng-container> -->
@ -85,14 +85,14 @@
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
<mat-row *matRowDef="let row; columns: displayedColumns"></mat-row>
<!-- <mat-row
<!-- <mat-row
*matRowDef="let row; columns: displayedColumns;"
matRipple
class="element-row"
matRipple
class="element-row"
[class.expanded]="expandedElement == row"
(click)="expandedElement = row">
</mat-row>
<mat-row
<mat-row
*matRowDef="let row; columns: ['expandedDetail']; when: isExpansionDetailRow"
[@detailExpand]="row.element == expandedElement ? 'expanded' : 'collapsed'"
style="overflow: hidden">
@ -292,6 +292,70 @@
</div>
</div>
<div class="list-item-inside" *ngIf="version.images.hdc_disk_image">
<span>
{{ version.images.hdb_disk_image }}
</span>
<div>
<span *ngIf="checkImageFromVersion(version.images.hdc_disk_image)"
><mat-icon matTooltip="Ready to install" matTooltipClass="custom-tooltip">check</mat-icon></span
>
<span *ngIf="!checkImageFromVersion(version.images.hdc_disk_image)"
><mat-icon matTooltip="Missing" matTooltipClass="custom-tooltip">close</mat-icon></span
>
<input
type="file"
class="non-visible"
#file4
(change)="importImage($event, version.images.hdc_disk_image)"
ng2FileSelect
[uploader]="uploaderImage"
/>
<button class="button" mat-raised-button (click)="file4.click()">Import</button>
<button
class="button"
mat-raised-button
(click)="downloadImageFromVersion(version.images.hdc_disk_image)"
>
Download
</button>
</div>
</div>
<div class="list-item-inside" *ngIf="version.images.hdd_disk_image">
<span>
{{ version.images.hdd_disk_image }}
</span>
<div>
<span *ngIf="checkImageFromVersion(version.images.hdd_disk_image)"
><mat-icon matTooltip="Ready to install" matTooltipClass="custom-tooltip">check</mat-icon></span
>
<span *ngIf="!checkImageFromVersion(version.images.hdd_disk_image)"
><mat-icon matTooltip="Missing" matTooltipClass="custom-tooltip">close</mat-icon></span
>
<input
type="file"
class="non-visible"
#file5
(change)="importImage($event, version.images.hdd_disk_image)"
ng2FileSelect
[uploader]="uploaderImage"
/>
<button class="button" mat-raised-button (click)="file5.click()">Import</button>
<button
class="button"
mat-raised-button
(click)="downloadImageFromVersion(version.images.hdd_disk_image)"
>
Download
</button>
</div>
</div>
<div class="list-item-inside" *ngIf="version.images.cdrom_image">
<span>
{{ version.images.cdrom_image}}
@ -308,12 +372,12 @@
<input
type="file"
class="non-visible"
#file4
#file6
(change)="importImage($event, version.images.cdrom_image)"
ng2FileSelect
[uploader]="uploaderImage"
/>
<button class="button" mat-raised-button (click)="file4.click()">Import</button>
<button class="button" mat-raised-button (click)="file6.click()">Import</button>
<button
class="button"
mat-raised-button

View File

@ -320,17 +320,17 @@ export class NewTemplateDialogComponent implements OnInit {
setTimeout(() => {
if (this.qemuBinaries.length) {
if (this.applianceToInstall.qemu.arch === 'x86_64') {
let filtered_binaries = this.qemuBinaries.filter((n) => n.path.includes('qemu-system-x86_64'));
let filtered_binaries = this.qemuBinaries.filter((n) => n.path.endsWith('qemu-system-x86_64'));
if (filtered_binaries.length) {
this.selectedBinary = filtered_binaries[0];
}
} else if (this.applianceToInstall.qemu.arch === 'i386') {
let filtered_binaries = this.qemuBinaries.filter((n) => n.path.includes('qemu-system-i386'));
let filtered_binaries = this.qemuBinaries.filter((n) => n.path.endsWith('qemu-system-i386'));
if (filtered_binaries.length) {
this.selectedBinary = filtered_binaries[0];
}
} else if (this.applianceToInstall.qemu.arch === 'x86_64') {
let filtered_binaries = this.qemuBinaries.filter((n) => n.path.includes('qemu-system-arm'));
} else if (this.applianceToInstall.qemu.arch === 'arm') {
let filtered_binaries = this.qemuBinaries.filter((n) => n.path.endsWith('qemu-system-arm'));
if (filtered_binaries.length) {
this.selectedBinary = filtered_binaries[0];
}
@ -364,7 +364,7 @@ export class NewTemplateDialogComponent implements OnInit {
autoFocus: false,
disableClose: true,
});
dialogRef.componentInstance.confirmationMessage = `This is not the correct file.
dialogRef.componentInstance.confirmationMessage = `This is not the correct file.
The MD5 sum is ${output} and should be ${imageToInstall.md5sum}. Do you want to accept it at your own risks?`;
dialogRef.afterClosed().subscribe((answer: boolean) => {
if (answer) {
@ -485,7 +485,7 @@ export class NewTemplateDialogComponent implements OnInit {
iouTemplate.startup_config = this.applianceToInstall.iou.startup_config;
iouTemplate.builtin = this.applianceToInstall.builtin;
iouTemplate.category = this.getCategory();
iouTemplate.default_name_format = this.applianceToInstall.port_name_format;
iouTemplate.default_name_format = this.applianceToInstall.default_name_format;
iouTemplate.symbol = this.applianceToInstall.symbol;
iouTemplate.compute_id = this.isGns3VmChosen ? 'vm' : 'local';
iouTemplate.template_id = uuid();
@ -534,7 +534,7 @@ export class NewTemplateDialogComponent implements OnInit {
iosTemplate.slot7 = this.applianceToInstall.dynamips.slot7;
iosTemplate.builtin = this.applianceToInstall.builtin;
iosTemplate.category = this.getCategory();
iosTemplate.default_name_format = this.applianceToInstall.port_name_format;
iosTemplate.default_name_format = this.applianceToInstall.default_name_format;
iosTemplate.symbol = this.applianceToInstall.symbol;
iosTemplate.compute_id = this.isGns3VmChosen ? 'vm' : 'local';
iosTemplate.template_id = uuid();
@ -572,7 +572,7 @@ export class NewTemplateDialogComponent implements OnInit {
dockerTemplate.console_type = this.applianceToInstall.docker.console_type;
dockerTemplate.builtin = this.applianceToInstall.builtin;
dockerTemplate.category = this.getCategory();
dockerTemplate.default_name_format = this.applianceToInstall.port_name_format;
dockerTemplate.default_name_format = this.applianceToInstall.default_name_format;
dockerTemplate.symbol = this.applianceToInstall.symbol;
dockerTemplate.compute_id = this.isGns3VmChosen ? 'vm' : 'local';
dockerTemplate.template_id = uuid();
@ -629,12 +629,17 @@ export class NewTemplateDialogComponent implements OnInit {
qemuTemplate.category = this.getCategory();
qemuTemplate.first_port_name = this.applianceToInstall.first_port_name;
qemuTemplate.port_name_format = this.applianceToInstall.port_name_format;
qemuTemplate.port_segment_size = this.applianceToInstall.port_segment_size;
qemuTemplate.default_name_format = this.applianceToInstall.default_name_format
qemuTemplate.symbol = this.applianceToInstall.symbol;
qemuTemplate.qemu_path = this.selectedBinary.path;
qemuTemplate.compute_id = this.isGns3VmChosen ? 'vm' : 'local';
qemuTemplate.template_id = uuid();
qemuTemplate.hda_disk_image = version.images.hda_disk_image;
qemuTemplate.hdb_disk_image = version.images.hdb_disk_image;
qemuTemplate.hdc_disk_image = version.images.hdc_disk_image;
qemuTemplate.hdd_disk_image = version.images.hdd_disk_image;
qemuTemplate.cdrom_image = version.images.cdrom_image;
qemuTemplate.template_type = 'qemu';
qemuTemplate.usage = this.applianceToInstall.usage;

View File

@ -20,13 +20,14 @@
</mat-select>
</mat-form-field>
<mat-checkbox [(ngModel)]="node.console_auto_start"> Auto start console </mat-checkbox><br />
<mat-form-field class="form-field">
<mat-checkbox [(ngModel)]="node.properties.use_default_iou_values"> Use default IOU values for memories </mat-checkbox>
<mat-form-field class="form-field" *ngIf="!node.properties.use_default_iou_values">
<input matInput type="number" [(ngModel)]="node.properties.ram" placeholder="RAM size" />
<span matSuffix>MB</span>
</mat-form-field>
<mat-form-field class="form-field">
<mat-form-field class="form-field" *ngIf="!node.properties.use_default_iou_values">
<input matInput type="number" [(ngModel)]="node.properties.nvram" placeholder="NVRAM size" />
<span matSuffix>MB</span>
<span matSuffix>KB</span>
</mat-form-field>
</mat-tab>
@ -38,7 +39,7 @@
matInput
formControlName="ethernetAdapters"
type="number"
[(ngModel)]="node.ethernet_adapters"
[(ngModel)]="node.properties.ethernet_adapters"
placeholder="Ethernet adapters"
/>
</mat-form-field>
@ -47,7 +48,7 @@
matInput
formControlName="serialAdapters"
type="number"
[(ngModel)]="node.serial_adapters"
[(ngModel)]="node.properties.serial_adapters"
placeholder="Serial adapters"
/>
</mat-form-field>

View File

@ -238,6 +238,12 @@
<mat-form-field class="form-field">
<input matInput type="text" [(ngModel)]="node.properties.options" placeholder="Options" />
</mat-form-field>
<br /><mat-checkbox [(ngModel)]="node.properties.tpm">
Enable the Trusted Platform Module (TPM)
</mat-checkbox>
<br /><mat-checkbox [(ngModel)]="node.properties.uefi">
Enable the UEFI boot mode
</mat-checkbox>
</mat-card-content>
</mat-card>
</mat-tab>

View File

@ -61,7 +61,7 @@
{{ node.name }}
</div>
<div *ngIf="node.console != null && node.console != undefined && node.console_type != 'none'">
{{ node.console_type }} {{ node.console_host }}:{{ node.console }}
{{ node.console_type }}://{{ node.console_host }}:{{ node.console }}
</div>
<div *ngIf="node.console === null || node.console === undefined || node.console_type === 'none'">
none

View File

@ -55,6 +55,9 @@ export interface Iou {
export interface Images {
hda_disk_image: string;
hdb_disk_image: string;
hdc_disk_image: string;
hdd_disk_image: string;
cdrom_image: string;
}
export interface Version {
@ -74,11 +77,13 @@ export interface Appliance {
maintainer_email: string;
name: string;
port_name_format: string;
port_segment_size: number;
product_name: string;
product_url: string;
registry_version: number;
status: string;
symbol: string;
default_name_format: string;
usage: string;
vendor_name: string;
vendor_url: string;

View File

@ -63,9 +63,6 @@ export class LinkService {
}
updateLink(server: Server, link: Link) {
link.x = Math.round(link.x);
link.y = Math.round(link.y);
return this.httpServer.put<Link>(server, `/projects/${link.project_id}/links/${link.link_id}`, link);
}

View File

@ -12,53 +12,30 @@ export class QemuConfigurationService {
getNetworkTypes() {
// 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 = [
'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',
{ value: 'e1000', name: 'Intel Gigabit Ethernet' },
{ value: 'e1000-82544gc', name: 'Intel 82544GC Gigabit Ethernet' },
{ value: 'e1000-82545em', name: 'Intel 82545EM Gigabit Ethernet' },
{ value: 'e1000e', name: 'Intel PCIe Gigabit Ethernet' },
{ value: 'i82550', name: 'Intel i82550 Ethernet' },
{ value: 'i82551', name: 'Intel i82551 Ethernet' },
{ value: 'i82557a', name: 'Intel i82557A Ethernet' },
{ value: 'i82557b', name: 'Intel i82557B Ethernet' },
{ value: 'i82557c', name: 'Intel i82557C Ethernet' },
{ value: 'i82558a', name: 'Intel i82558A Ethernet' },
{ value: 'i82558b', name: 'Intel i82558B Ethernet' },
{ value: 'i82559a', name: 'Intel i82559A Ethernet' },
{ value: 'i82559b', name: 'Intel i82559B Ethernet' },
{ value: 'i82559c', name: 'Intel i82559C Ethernet' },
{ value: 'i82559er', name: 'Intel i82559ER Ethernet' },
{ value: 'i82562', name: 'Intel i82562 Ethernet' },
{ value: 'i82801', name: 'Intel i82801 Ethernet' },
{ value: 'ne2k_pci', name: 'NE2000 Ethernet' },
{ value: 'pcnet', name: 'AMD PCNet Ethernet' },
{ value: 'rocker', name: 'Rocker L2 switch device' },
{ value: 'rtl8139', name: 'Realtek 8139 Ethernet' },
{ value: 'virtio-net-pci', name: 'Paravirtualized Network I/O' },
{ value: 'vmxnet3', name: 'VMWare Paravirtualized Ethernet v3' },
];
return networkTypes;

592
yarn.lock

File diff suppressed because it is too large Load Diff