From 721adacde44c580663f1ba4109bec032d4bd0722 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Feb 2023 17:12:02 +0000 Subject: [PATCH 01/22] 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] --- yarn.lock | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/yarn.lock b/yarn.lock index dce3dc95..b5992590 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3692,7 +3692,7 @@ core-util-is@1.0.2: core-util-is@~1.0.0: version "1.0.3" - resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== cors@~2.8.5: @@ -5923,8 +5923,8 @@ image-size@~0.5.0: immediate@~3.0.5: version "3.0.6" - resolved "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz" - integrity sha1-nbHb0Pr43m++D13V5Wu2BigN5ps= + resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" + integrity sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ== import-fresh@^3.2.1: version "3.3.0" @@ -6349,8 +6349,8 @@ is-yarn-global@^0.3.0: isarray@1.0.0, isarray@~1.0.0: version "1.0.0" - resolved "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" - integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== isbinaryfile@^3.0.2: version "3.0.3" @@ -6630,14 +6630,14 @@ jsprim@^1.2.2: verror "1.10.0" jszip@^3.1.3: - version "3.7.1" - resolved "https://registry.npmjs.org/jszip/-/jszip-3.7.1.tgz" - integrity sha512-ghL0tz1XG9ZEmRMcEN2vt7xabrDdqHHeykgARpmZ0BiIctWxM47Vt63ZO2dnp4QYt/xJVLLy5Zv1l/xRdh2byg== + version "3.10.1" + resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.10.1.tgz#34aee70eb18ea1faec2f589208a157d1feb091c2" + integrity sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g== dependencies: lie "~3.3.0" pako "~1.0.2" readable-stream "~2.3.6" - set-immediate-shim "~1.0.1" + setimmediate "^1.0.5" karma-chrome-launcher@~3.1.0: version "3.1.0" @@ -6816,7 +6816,7 @@ license-webpack-plugin@2.3.20: lie@~3.3.0: version "3.3.0" - resolved "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz" + resolved "https://registry.yarnpkg.com/lie/-/lie-3.3.0.tgz#dcf82dee545f46074daf200c7c1c5a08e0f40f6a" integrity sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ== dependencies: immediate "~3.0.5" @@ -8735,7 +8735,7 @@ pretty-format@^27.0.0, pretty-format@^27.3.1: process-nextick-args@~2.0.0: version "2.0.1" - resolved "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== progress@^2.0.3: @@ -9311,7 +9311,7 @@ rxjs@^7.2.0: safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" - resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.2: @@ -9521,11 +9521,6 @@ set-blocking@^2.0.0, set-blocking@~2.0.0: resolved "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz" integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= -set-immediate-shim@~1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz" - integrity sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E= - set-value@^2.0.0, set-value@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" @@ -9536,6 +9531,11 @@ set-value@^2.0.0, set-value@^2.0.1: is-plain-object "^2.0.3" split-string "^3.0.1" +setimmediate@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA== + setprototypeof@1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz" @@ -9980,7 +9980,7 @@ string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2 string_decoder@^1.1.1, string_decoder@~1.1.1: version "1.1.1" - resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== dependencies: safe-buffer "~5.1.0" @@ -10633,8 +10633,8 @@ utf8-byte-length@^1.0.1: util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: version "1.0.2" - resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" - integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== util-extend@^1.0.1: version "1.0.3" From e029bccf182dea652b6284fc2f628b87167dd937 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 3 Feb 2023 04:50:10 +0000 Subject: [PATCH 02/22] 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] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index dce3dc95..d4603dd3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5777,9 +5777,9 @@ html-escaper@^2.0.0: integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== http-cache-semantics@^4.0.0, http-cache-semantics@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz" - integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== + version "4.1.1" + resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz#abe02fcb2985460bf0323be664436ec3476a6d5a" + integrity sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ== http-deceiver@^1.2.7: version "1.2.7" From 318143f5a8ea09c8692735925c00916c76f2d339 Mon Sep 17 00:00:00 2001 From: grossmj Date: Sat, 4 Feb 2023 13:25:10 +0800 Subject: [PATCH 03/22] Fix new template action not using "port_segment_size" and "default_name_format" --- .../new-template-dialog.component.ts | 18 ++++++++++-------- src/app/models/appliance.ts | 2 ++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/app/components/project-map/new-template-dialog/new-template-dialog.component.ts b/src/app/components/project-map/new-template-dialog/new-template-dialog.component.ts index 4ad51de9..4d50e47a 100644 --- a/src/app/components/project-map/new-template-dialog/new-template-dialog.component.ts +++ b/src/app/components/project-map/new-template-dialog/new-template-dialog.component.ts @@ -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,6 +629,8 @@ 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'; diff --git a/src/app/models/appliance.ts b/src/app/models/appliance.ts index 661fbc01..4e0ecb91 100644 --- a/src/app/models/appliance.ts +++ b/src/app/models/appliance.ts @@ -74,11 +74,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; From 252452051af114c5d372f032820fe80daca7c6c1 Mon Sep 17 00:00:00 2001 From: grossmj Date: Sun, 26 Feb 2023 20:15:11 +1000 Subject: [PATCH 04/22] Support extra disk images (hdc/hdd) and cdrom image when importing appliance --- .../new-template-dialog.component.html | 78 +++++++++++++++++-- .../new-template-dialog.component.ts | 3 + src/app/models/appliance.ts | 3 + 3 files changed, 77 insertions(+), 7 deletions(-) diff --git a/src/app/components/project-map/new-template-dialog/new-template-dialog.component.html b/src/app/components/project-map/new-template-dialog/new-template-dialog.component.html index 64390801..6f00730e 100644 --- a/src/app/components/project-map/new-template-dialog/new-template-dialog.component.html +++ b/src/app/components/project-map/new-template-dialog/new-template-dialog.component.html @@ -77,7 +77,7 @@ @@ -85,14 +85,14 @@ -