From ec821845ac533de502d06aec9ec889aafeb72c21 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 15 Jan 2025 16:08:25 +0000 Subject: [PATCH 1/2] feat(Dependencies): Update angular-eslint monorepo to v19 | datasource | package | from | to | | ---------- | -------------------------------------- | ------ | ------ | | npm | @angular-eslint/builder | 18.3.1 | 19.0.2 | | npm | @angular-eslint/eslint-plugin | 18.3.1 | 19.0.2 | | npm | @angular-eslint/eslint-plugin-template | 18.3.1 | 19.0.2 | | npm | @angular-eslint/schematics | 18.3.1 | 19.0.2 | | npm | @angular-eslint/template-parser | 18.3.1 | 19.0.2 | --- package-lock.json | 282 +++++++++++++++++++++++++++++++++++++--------- package.json | 12 +- 2 files changed, 234 insertions(+), 60 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9f460144d3..22eb959b4e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,14 +1,14 @@ { "name": "@denbi/cloud-portal-webapp", - "version": "4.900.0", + "version": "4.901.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@denbi/cloud-portal-webapp", - "version": "4.900.0", + "version": "4.901.0", "dependencies": { - "@angular-eslint/eslint-plugin": "^18.3.0", + "@angular-eslint/eslint-plugin": "^19.0.0", "@angular/animations": "18.2.8", "@angular/cdk": "18.2.9", "@angular/common": "18.2.8", @@ -69,10 +69,10 @@ }, "devDependencies": { "@angular-devkit/build-angular": "^18.2.7", - "@angular-eslint/builder": "18.3.1", - "@angular-eslint/eslint-plugin-template": "18.3.1", - "@angular-eslint/schematics": "18.3.1", - "@angular-eslint/template-parser": "18.3.1", + "@angular-eslint/builder": "19.0.2", + "@angular-eslint/eslint-plugin-template": "19.0.2", + "@angular-eslint/schematics": "19.0.2", + "@angular-eslint/template-parser": "19.0.2", "@angular/cli": "^18.1.4", "@angular/compiler-cli": "18.2.8", "@eslint/eslintrc": "^3.1.0", @@ -892,30 +892,112 @@ } }, "node_modules/@angular-eslint/builder": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/@angular-eslint/builder/-/builder-18.3.1.tgz", - "integrity": "sha512-cPc7Ye9zDs5M4i+feL6vob+mh7yX5vxvOS5KQIhneUrp5e9D+IGuNFMmBLlOPpmklSc9XJBtuvI5Zjuh4z1ETw==", + "version": "19.0.2", + "resolved": "https://registry.npmjs.org/@angular-eslint/builder/-/builder-19.0.2.tgz", + "integrity": "sha512-BdmMSndQt2fSBiTVniskUcUpQaeweUapbsL0IDfQ7a13vL0NVXpc3K89YXuVE/xsb08uHtqphuwxPAAj6kX3OA==", "dev": true, "license": "MIT", + "dependencies": { + "@angular-devkit/architect": ">= 0.1900.0 < 0.2000.0", + "@angular-devkit/core": ">= 19.0.0 < 20.0.0" + }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": "*" } }, + "node_modules/@angular-eslint/builder/node_modules/@angular-devkit/architect": { + "version": "0.1900.7", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1900.7.tgz", + "integrity": "sha512-3dRV0IB+MbNYbAGbYEFMcABkMphqcTvn5MG79dQkwcf2a9QZxCq2slwf/rIleWoDUcFm9r1NnVPYrTYNYJaqQg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@angular-devkit/core": "19.0.7", + "rxjs": "7.8.1" + }, + "engines": { + "node": "^18.19.1 || ^20.11.1 || >=22.0.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + } + }, + "node_modules/@angular-eslint/builder/node_modules/@angular-devkit/core": { + "version": "19.0.7", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-19.0.7.tgz", + "integrity": "sha512-VyuORSitT6LIaGUEF0KEnv2TwNaeWl6L3/4L4stok0BJ23B4joVca2DYVcrLC1hSzz8V4dwVgSlbNIgjgGdVpg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "8.17.1", + "ajv-formats": "3.0.1", + "jsonc-parser": "3.3.1", + "picomatch": "4.0.2", + "rxjs": "7.8.1", + "source-map": "0.7.4" + }, + "engines": { + "node": "^18.19.1 || ^20.11.1 || >=22.0.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + }, + "peerDependencies": { + "chokidar": "^4.0.0" + }, + "peerDependenciesMeta": { + "chokidar": { + "optional": true + } + } + }, + "node_modules/@angular-eslint/builder/node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@angular-eslint/builder/node_modules/readdirp": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.1.tgz", + "integrity": "sha512-h80JrZu/MHUZCyHu5ciuoI0+WxsCxzxJTILn6Fs8rxSnFPh+UVHYfeIxK1nVGugMqkfC4vJcBOYbkfkwYK0+gw==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@angular-eslint/bundled-angular-compiler": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/@angular-eslint/bundled-angular-compiler/-/bundled-angular-compiler-18.3.1.tgz", - "integrity": "sha512-sikmkjfsXPpPTku1aQkQ1MNNEKGBgGGRvUN/WeNS9dhCJ4dxU3O7dZctt1aQWj+W3nbuUtDiimAWF5fZHGFE2Q==", + "version": "19.0.2", + "resolved": "https://registry.npmjs.org/@angular-eslint/bundled-angular-compiler/-/bundled-angular-compiler-19.0.2.tgz", + "integrity": "sha512-HPmp92r70SNO/0NdIaIhxrgVSpomqryuUk7jszvNRtu+OzYCJGcbLhQD38T3dbBWT/AV0QXzyzExn6/2ai9fEw==", "license": "MIT" }, "node_modules/@angular-eslint/eslint-plugin": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin/-/eslint-plugin-18.3.1.tgz", - "integrity": "sha512-MP4Nm+SHboF8KdnN0KpPEGAaTTzDLPm3+S/4W3Mg8onqWCyadyd4mActh9mK/pvCj8TVlb/SW1zeTtdMYhwonw==", + "version": "19.0.2", + "resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin/-/eslint-plugin-19.0.2.tgz", + "integrity": "sha512-DLuNVVGGFicSThOcMSJyNje+FZSPdG0B3lCBRiqcgKH/16kfM4pV8MobPM7RGK2NhaOmmZ4zzJNwpwWPSgi+Lw==", "license": "MIT", "dependencies": { - "@angular-eslint/bundled-angular-compiler": "18.3.1", - "@angular-eslint/utils": "18.3.1" + "@angular-eslint/bundled-angular-compiler": "19.0.2", + "@angular-eslint/utils": "19.0.2" }, "peerDependencies": { "@typescript-eslint/utils": "^7.11.0 || ^8.0.0", @@ -924,49 +1006,149 @@ } }, "node_modules/@angular-eslint/eslint-plugin-template": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin-template/-/eslint-plugin-template-18.3.1.tgz", - "integrity": "sha512-hBJ3+f7VSidvrtYaXH7Vp0sWvblA9jLK2c6uQzhYGWdEDUcTg7g7VI9ThW39WvMbHqkyzNE4PPOynK69cBEDGg==", + "version": "19.0.2", + "resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin-template/-/eslint-plugin-template-19.0.2.tgz", + "integrity": "sha512-f/OCF9ThnxQ8m0eNYPwnCrySQPhYfCOF6STL7F9LnS8Bs3ZeW3/oT1yLaMIZ1Eg0ogIkgxksMAJZjrJPUPBD1Q==", "dev": true, "license": "MIT", "dependencies": { - "@angular-eslint/bundled-angular-compiler": "18.3.1", - "@angular-eslint/utils": "18.3.1", - "aria-query": "5.3.0", + "@angular-eslint/bundled-angular-compiler": "19.0.2", + "@angular-eslint/utils": "19.0.2", + "aria-query": "5.3.2", "axobject-query": "4.1.0" }, "peerDependencies": { + "@typescript-eslint/types": "^7.11.0 || ^8.0.0", "@typescript-eslint/utils": "^7.11.0 || ^8.0.0", "eslint": "^8.57.0 || ^9.0.0", "typescript": "*" } }, "node_modules/@angular-eslint/schematics": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/@angular-eslint/schematics/-/schematics-18.3.1.tgz", - "integrity": "sha512-BTsQHDu7LjvXannJTb5BqMPCFIHRNN94eRyb60VfjJxB/ZFtsbAQDFFOi5lEZsRsd4mBeUMuL9mW4IMcPtUQ9Q==", + "version": "19.0.2", + "resolved": "https://registry.npmjs.org/@angular-eslint/schematics/-/schematics-19.0.2.tgz", + "integrity": "sha512-wI4SyiAnUCrpigtK6PHRlVWMC9vWljqmlLhbsJV5O5yDajlmRdvgXvSHDefhJm0hSfvZYRXuiAARYv2+QVfnGA==", "dev": true, "license": "MIT", "dependencies": { - "@angular-eslint/eslint-plugin": "18.3.1", - "@angular-eslint/eslint-plugin-template": "18.3.1", - "ignore": "5.3.2", + "@angular-devkit/core": ">= 19.0.0 < 20.0.0", + "@angular-devkit/schematics": ">= 19.0.0 < 20.0.0", + "@angular-eslint/eslint-plugin": "19.0.2", + "@angular-eslint/eslint-plugin-template": "19.0.2", + "ignore": "6.0.2", "semver": "7.6.3", "strip-json-comments": "3.1.1" + } + }, + "node_modules/@angular-eslint/schematics/node_modules/@angular-devkit/core": { + "version": "19.0.7", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-19.0.7.tgz", + "integrity": "sha512-VyuORSitT6LIaGUEF0KEnv2TwNaeWl6L3/4L4stok0BJ23B4joVca2DYVcrLC1hSzz8V4dwVgSlbNIgjgGdVpg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "8.17.1", + "ajv-formats": "3.0.1", + "jsonc-parser": "3.3.1", + "picomatch": "4.0.2", + "rxjs": "7.8.1", + "source-map": "0.7.4" + }, + "engines": { + "node": "^18.19.1 || ^20.11.1 || >=22.0.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" }, "peerDependencies": { - "@angular-devkit/core": ">= 18.0.0 < 19.0.0", - "@angular-devkit/schematics": ">= 18.0.0 < 19.0.0" + "chokidar": "^4.0.0" + }, + "peerDependenciesMeta": { + "chokidar": { + "optional": true + } + } + }, + "node_modules/@angular-eslint/schematics/node_modules/@angular-devkit/schematics": { + "version": "19.0.7", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-19.0.7.tgz", + "integrity": "sha512-BHXQv6kMc9xo4TH9lhwMv8nrZXHkLioQvLun2qYjwvOsyzt3qd+sUM9wpHwbG6t+01+FIQ05iNN9ox+Cvpndgg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@angular-devkit/core": "19.0.7", + "jsonc-parser": "3.3.1", + "magic-string": "0.30.12", + "ora": "5.4.1", + "rxjs": "7.8.1" + }, + "engines": { + "node": "^18.19.1 || ^20.11.1 || >=22.0.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + } + }, + "node_modules/@angular-eslint/schematics/node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@angular-eslint/schematics/node_modules/ignore": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-6.0.2.tgz", + "integrity": "sha512-InwqeHHN2XpumIkMvpl/DCJVrAHgCsG5+cn1XlnLWGwtZBm8QJfSusItfrwx81CTp5agNZqpKU2J/ccC5nGT4A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/@angular-eslint/schematics/node_modules/magic-string": { + "version": "0.30.12", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.12.tgz", + "integrity": "sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0" + } + }, + "node_modules/@angular-eslint/schematics/node_modules/readdirp": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.1.tgz", + "integrity": "sha512-h80JrZu/MHUZCyHu5ciuoI0+WxsCxzxJTILn6Fs8rxSnFPh+UVHYfeIxK1nVGugMqkfC4vJcBOYbkfkwYK0+gw==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" } }, "node_modules/@angular-eslint/template-parser": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/@angular-eslint/template-parser/-/template-parser-18.3.1.tgz", - "integrity": "sha512-JUUkfWH1G+u/Uk85ZYvJSt/qwN/Ko+jlXFtzBEcknJZsTWTwBcp36v77gPZe5FmKSziJZpyPUd+7Kiy6tuSCTw==", + "version": "19.0.2", + "resolved": "https://registry.npmjs.org/@angular-eslint/template-parser/-/template-parser-19.0.2.tgz", + "integrity": "sha512-z3rZd2sBfuYcFf9rGDsB2zz2fbGX8kkF+0ftg9eocyQmzWrlZHFmuw9ha7oP/Mz8gpblyCS/aa1U/Srs6gz0UQ==", "dev": true, "license": "MIT", "dependencies": { - "@angular-eslint/bundled-angular-compiler": "18.3.1", + "@angular-eslint/bundled-angular-compiler": "19.0.2", "eslint-scope": "^8.0.2" }, "peerDependencies": { @@ -975,12 +1157,12 @@ } }, "node_modules/@angular-eslint/utils": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/@angular-eslint/utils/-/utils-18.3.1.tgz", - "integrity": "sha512-sd9niZI7h9H2FQ7OLiQsLFBhjhRQTASh+Q0+4+hyjv9idbSHBJli8Gsi2fqj9zhtMKpAZFTrWzuLUpubJ9UYbA==", + "version": "19.0.2", + "resolved": "https://registry.npmjs.org/@angular-eslint/utils/-/utils-19.0.2.tgz", + "integrity": "sha512-HotBT8OKr7zCaX1S9k27JuhRiTVIbbYVl6whlb3uwdMIPIWY8iOcEh1tjI4qDPUafpLfR72Dhwi5bO1E17F3/Q==", "license": "MIT", "dependencies": { - "@angular-eslint/bundled-angular-compiler": "18.3.1" + "@angular-eslint/bundled-angular-compiler": "19.0.2" }, "peerDependencies": { "@typescript-eslint/utils": "^7.11.0 || ^8.0.0", @@ -6360,12 +6542,13 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, "node_modules/aria-query": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", - "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.2.tgz", + "integrity": "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==", "dev": true, - "dependencies": { - "dequal": "^2.0.3" + "license": "Apache-2.0", + "engines": { + "node": ">= 0.4" } }, "node_modules/array-flatten": { @@ -8555,15 +8738,6 @@ "node": ">= 0.8" } }, - "node_modules/dequal": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", - "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/destroy": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", diff --git a/package.json b/package.json index 600e7b1bd6..d9bdb309d0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@denbi/cloud-portal-webapp", - "version": "4.900.0", + "version": "4.901.0", "description": "de.NBI Cloud Portal", "scripts": { "ng": "ng serve", @@ -18,7 +18,7 @@ "resolutions": {}, "private": true, "dependencies": { - "@angular-eslint/eslint-plugin": "^18.3.0", + "@angular-eslint/eslint-plugin": "^19.0.0", "@angular/animations": "18.2.8", "@angular/cdk": "18.2.9", "@angular/common": "18.2.8", @@ -79,10 +79,10 @@ }, "devDependencies": { "@angular-devkit/build-angular": "^18.2.7", - "@angular-eslint/builder": "18.3.1", - "@angular-eslint/eslint-plugin-template": "18.3.1", - "@angular-eslint/schematics": "18.3.1", - "@angular-eslint/template-parser": "18.3.1", + "@angular-eslint/builder": "19.0.2", + "@angular-eslint/eslint-plugin-template": "19.0.2", + "@angular-eslint/schematics": "19.0.2", + "@angular-eslint/template-parser": "19.0.2", "@angular/cli": "^18.1.4", "@angular/compiler-cli": "18.2.8", "@eslint/eslintrc": "^3.1.0", From 310b7eaf1fab71c9acb65b9a8c81de3211f8896c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 15 Jan 2025 16:09:57 +0000 Subject: [PATCH 2/2] fix(Linting):blacked code --- src/app/api-connector/applications.service.ts | 13 ++-- .../application-formular.component.ts | 48 ++++++------ .../resources/resource-machine.ts | 78 +++++++++---------- ...enerate-public-key-modal.component.spec.ts | 33 ++++---- .../generate-public-key-modal.component.ts | 69 ++++++++-------- .../public-key/public-key.component.ts | 26 +++---- .../set-public-key-modal.component.spec.ts | 33 ++++---- .../set-public-key-modal.component.ts | 51 ++++++------ .../virtualmachinemodels/imageTypes.ts | 2 +- .../workshop/workshop-urlinfo.model.ts | 23 +++--- src/app/vo_manager/vo-guard.service.ts | 4 - 11 files changed, 178 insertions(+), 202 deletions(-) diff --git a/src/app/api-connector/applications.service.ts b/src/app/api-connector/applications.service.ts index 606a0e9da9..80a8ba935e 100644 --- a/src/app/api-connector/applications.service.ts +++ b/src/app/api-connector/applications.service.ts @@ -337,16 +337,15 @@ export class ApplicationsService { }) } - checkForTakenShortname(shortname: string,exclude_project_id?:string|number): Observable { - - let params:any={ shortname: shortname } - if (exclude_project_id){ - params={ shortname: shortname ,exclude_project_id:exclude_project_id} + checkForTakenShortname(shortname: string, exclude_project_id?: string | number): Observable { + let params: any = { shortname: shortname } + if (exclude_project_id) { + params = { shortname: shortname, exclude_project_id: exclude_project_id } } + return this.http.get(`${ApiSettings.getApiBaseURL()}project_applications/shortname/`, { params: params, withCredentials: true - }); - + }) } } diff --git a/src/app/applications/application-formular/application-formular.component.ts b/src/app/applications/application-formular/application-formular.component.ts index 2fe5d576c2..52efb80bb1 100644 --- a/src/app/applications/application-formular/application-formular.component.ts +++ b/src/app/applications/application-formular/application-formular.component.ts @@ -33,8 +33,8 @@ import { UserService } from '../../api-connector/user.service' import { Userinfo } from '../../userinfo/userinfo.model' import { User } from '../application.model/user.model' import { NotificationModalComponent } from '../../shared/modal/notification-modal' -import { Subject } from 'rxjs'; -import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; +import { Subject } from 'rxjs' +import { debounceTime, distinctUntilChanged } from 'rxjs/operators' /** * Application formular component. @@ -53,8 +53,8 @@ export class ApplicationFormularComponent extends ApplicationBaseClassComponent @Input() application: Application @Input() is_validation: boolean = false @Input() hash: string - DEFAULT_SHORTNAME_MAX_LENGTH:number=15 - shortNameMaxLength:number=15 + DEFAULT_SHORTNAME_MAX_LENGTH: number = 15 + shortNameMaxLength: number = 15 userinfo: Userinfo valid_pi_affiliations @@ -91,9 +91,9 @@ export class ApplicationFormularComponent extends ApplicationBaseClassComponent WIKI_BACKUP_LINK: string = WIKI_BACKUP_LINK GDPR_LINK: string = GDPR_LINK survey_link_visible: boolean = false - private nameCheckPipe = new Subject(); - shortnameChecking: boolean = false; - shortNameTaken: boolean = false; + private nameCheckPipe = new Subject() + shortnameChecking: boolean = false + shortNameTaken: boolean = false MAX_LIFETIME_DEFAULT: number = 6 max_lifetime: number = this.MAX_LIFETIME_DEFAULT @@ -126,7 +126,9 @@ export class ApplicationFormularComponent extends ApplicationBaseClassComponent this.getListOfFlavors() this.getListOfTypes() this.is_vo_admin = is_vo - this.nameCheckPipe.pipe(debounceTime(600), distinctUntilChanged()).subscribe(value => {this.checkIfNameIsTaken(value)}); + this.nameCheckPipe.pipe(debounceTime(600), distinctUntilChanged()).subscribe(value => { + this.checkIfNameIsTaken(value) + }) if (this.openstack_project) { this.simple_vm_min_vm = true @@ -146,19 +148,20 @@ export class ApplicationFormularComponent extends ApplicationBaseClassComponent } } - setDefaulShortnameLength():void{ - this.shortNameMaxLength=this.DEFAULT_SHORTNAME_MAX_LENGTH + setDefaulShortnameLength(): void { + this.shortNameMaxLength = this.DEFAULT_SHORTNAME_MAX_LENGTH } checkIfNameIsTaken(shortname: string): void { - this.shortnameChecking = true; - - this.applicationsService.checkForTakenShortname(shortname,this.application?.project_application_id).subscribe((result: boolean): void => { - let nameExists: boolean = result['exists']; - this.shortnameChecking = false; - this.shortNameTaken = nameExists; - }); - + this.shortnameChecking = true + + this.applicationsService + .checkForTakenShortname(shortname, this.application?.project_application_id) + .subscribe((result: boolean): void => { + const nameExists: boolean = result['exists'] + this.shortnameChecking = false + this.shortNameTaken = nameExists + }) } checkValidityComment(): boolean { @@ -196,8 +199,8 @@ export class ApplicationFormularComponent extends ApplicationBaseClassComponent if (this.application && !this.initiated_validation && this.is_validation) { this.openstack_project = this.application.project_application_openstack_project - if(this.application.project_application_shortname.length > 15){ - this.shortNameMaxLength=this.application.project_application_shortname.length + if (this.application.project_application_shortname.length > 15) { + this.shortNameMaxLength = this.application.project_application_shortname.length } this.simple_vm_project = !this.openstack_project @@ -266,10 +269,9 @@ export class ApplicationFormularComponent extends ApplicationBaseClassComponent public checkShortname(shortname: string): void { this.invalid_shortname = !/^[a-zA-Z0-9\s]*$/.test(shortname) if (!this.invalid_shortname) { - this.shortnameChecking = true; - this.nameCheckPipe.next(shortname); + this.shortnameChecking = true + this.nameCheckPipe.next(shortname) } - } public checkLongname(longname: string): void { diff --git a/src/app/facility_manager/resources/resource-machine.ts b/src/app/facility_manager/resources/resource-machine.ts index 7156a59a5f..d28d397331 100644 --- a/src/app/facility_manager/resources/resource-machine.ts +++ b/src/app/facility_manager/resources/resource-machine.ts @@ -1,51 +1,51 @@ -import { ComputecenterComponent } from '../../projectmanagement/computecenter.component'; -import { GPUSpecification } from './gpu-specification'; +import { ComputecenterComponent } from '../../projectmanagement/computecenter.component' +import { GPUSpecification } from './gpu-specification' /** * ResourceMachine class. */ export class ResourceMachine { - id: string; - compute_center: ComputecenterComponent; - name: string; - ram_public_factor: number = 1; - ram_private_factor: number = 1; - cores: number = 0; - cores_private_factor: number = 1; - cores_public_factor: number = 1; - gpu_slots: number = 0; - gpu_used: GPUSpecification[] = []; - public_count: number = 0; - private_count: number = 0; - ram: number = 0; - type: string = 'GENERAL_PURPOSE'; - local_disk_storage: number = 0; - local_disk_encrypted: boolean = false; + id: string + compute_center: ComputecenterComponent + name: string + ram_public_factor: number = 1 + ram_private_factor: number = 1 + cores: number = 0 + cores_private_factor: number = 1 + cores_public_factor: number = 1 + gpu_slots: number = 0 + gpu_used: GPUSpecification[] = [] + public_count: number = 0 + private_count: number = 0 + ram: number = 0 + type: string = 'GENERAL_PURPOSE' + local_disk_storage: number = 0 + local_disk_encrypted: boolean = false constructor(resourceMachine: ResourceMachine | null) { if (resourceMachine) { - this.id = resourceMachine.id; - this.compute_center = resourceMachine.compute_center; - this.name = resourceMachine.name; - // eslint-disable-next-line no-multi-assign,no-param-reassign - this.ram_public_factor = resourceMachine.ram_public_factor = 1; - // eslint-disable-next-line no-multi-assign,no-param-reassign - this.ram_private_factor = resourceMachine.ram_private_factor = 1; - this.cores = resourceMachine.cores; - this.local_disk_storage = resourceMachine.local_disk_storage; - this.local_disk_encrypted = resourceMachine.local_disk_encrypted; - this.cores_private_factor = resourceMachine.cores_private_factor; - this.cores_public_factor = resourceMachine.cores_public_factor; - this.gpu_slots = resourceMachine.gpu_slots; - this.gpu_used = resourceMachine.gpu_used; - this.public_count = resourceMachine.public_count; - this.private_count = resourceMachine.private_count; - this.ram = resourceMachine.ram; - this.type = resourceMachine.type; + this.id = resourceMachine.id + this.compute_center = resourceMachine.compute_center + this.name = resourceMachine.name + + this.ram_public_factor = resourceMachine.ram_public_factor = 1 + + this.ram_private_factor = resourceMachine.ram_private_factor = 1 + this.cores = resourceMachine.cores + this.local_disk_storage = resourceMachine.local_disk_storage + this.local_disk_encrypted = resourceMachine.local_disk_encrypted + this.cores_private_factor = resourceMachine.cores_private_factor + this.cores_public_factor = resourceMachine.cores_public_factor + this.gpu_slots = resourceMachine.gpu_slots + this.gpu_used = resourceMachine.gpu_used + this.public_count = resourceMachine.public_count + this.private_count = resourceMachine.private_count + this.ram = resourceMachine.ram + this.type = resourceMachine.type if (this.gpu_used.length < this.gpu_slots) { while (this.gpu_used.length < this.gpu_slots) { - this.gpu_used.push(new GPUSpecification(null)); + this.gpu_used.push(new GPUSpecification(null)) } } } @@ -53,10 +53,10 @@ export class ResourceMachine { changeGpuUsed(): void { if (this.gpu_slots < this.gpu_used.length) { - this.gpu_used = this.gpu_used.slice(0, this.gpu_slots); + this.gpu_used = this.gpu_used.slice(0, this.gpu_slots) } else { while (this.gpu_slots > this.gpu_used.length) { - this.gpu_used.push(new GPUSpecification(null)); + this.gpu_used.push(new GPUSpecification(null)) } } } diff --git a/src/app/shared/shared_modules/public-key/generate-public-key-modal/generate-public-key-modal.component.spec.ts b/src/app/shared/shared_modules/public-key/generate-public-key-modal/generate-public-key-modal.component.spec.ts index 883f9cbe67..d9c118c28b 100644 --- a/src/app/shared/shared_modules/public-key/generate-public-key-modal/generate-public-key-modal.component.spec.ts +++ b/src/app/shared/shared_modules/public-key/generate-public-key-modal/generate-public-key-modal.component.spec.ts @@ -1,23 +1,22 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed } from '@angular/core/testing' -import { GeneratePublicKeyModalComponent } from './generate-public-key-modal.component'; +import { GeneratePublicKeyModalComponent } from './generate-public-key-modal.component' describe('GeneratePublicKeyModalComponent', () => { - let component: GeneratePublicKeyModalComponent; - let fixture: ComponentFixture; + let component: GeneratePublicKeyModalComponent + let fixture: ComponentFixture - beforeEach(async () => { - await TestBed.configureTestingModule({ - imports: [GeneratePublicKeyModalComponent] - }) - .compileComponents(); + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [GeneratePublicKeyModalComponent] + }).compileComponents() - fixture = TestBed.createComponent(GeneratePublicKeyModalComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); + fixture = TestBed.createComponent(GeneratePublicKeyModalComponent) + component = fixture.componentInstance + fixture.detectChanges() + }) - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); + it('should create', () => { + expect(component).toBeTruthy() + }) +}) diff --git a/src/app/shared/shared_modules/public-key/generate-public-key-modal/generate-public-key-modal.component.ts b/src/app/shared/shared_modules/public-key/generate-public-key-modal/generate-public-key-modal.component.ts index 0e3c668321..6b7d0353e6 100644 --- a/src/app/shared/shared_modules/public-key/generate-public-key-modal/generate-public-key-modal.component.ts +++ b/src/app/shared/shared_modules/public-key/generate-public-key-modal/generate-public-key-modal.component.ts @@ -1,48 +1,43 @@ -import { Component, EventEmitter, Injectable } from '@angular/core'; -import { KeyService } from 'app/api-connector/key.service'; -import { AbstractBaseModalComponent } from 'app/shared/modal/abstract-base-modal/abstract-base-modal.component'; -import { BsModalService } from 'ngx-bootstrap/modal'; +import { Component, EventEmitter, Injectable } from '@angular/core' +import { KeyService } from 'app/api-connector/key.service' +import { AbstractBaseModalComponent } from 'app/shared/modal/abstract-base-modal/abstract-base-modal.component' +import { BsModalService } from 'ngx-bootstrap/modal' import { saveAs } from 'file-saver' @Injectable({ providedIn: 'root' }) @Component({ - selector: 'app-generate-public-key-modal', - templateUrl: './generate-public-key-modal.component.html', - styleUrl: './generate-public-key-modal.component.scss' + selector: 'app-generate-public-key-modal', + templateUrl: './generate-public-key-modal.component.html', + styleUrl: './generate-public-key-modal.component.scss' }) export class GeneratePublicKeyModalComponent extends AbstractBaseModalComponent { - userlogin:string; - acknowledgement_given:boolean=false + userlogin: string + acknowledgement_given: boolean = false - constructor( + constructor( protected modalService: BsModalService, - private keyService:KeyService - ) { - super(modalService) - - } - showGeneratePublicKeyModal( - userlogin:string - - ): EventEmitter { - const initialState = { - userlogin - } - - return this.showBaseModal(GeneratePublicKeyModalComponent, initialState) + private keyService: KeyService + ) { + super(modalService) + } + showGeneratePublicKeyModal(userlogin: string): EventEmitter { + const initialState = { + userlogin } - downloadPem(data: string): void { - const blob: Blob = new Blob([data], { type: 'pem' }) - const url: string = window.URL.createObjectURL(blob) - saveAs(url, `${this.userlogin}_ecdsa`) - } - - - generateKey(): void { - this.keyService.generateKey().subscribe((res: any): void => { - this.event.emit() - this.downloadPem(res['private_key']) - }) - } + return this.showBaseModal(GeneratePublicKeyModalComponent, initialState) + } + + downloadPem(data: string): void { + const blob: Blob = new Blob([data], { type: 'pem' }) + const url: string = window.URL.createObjectURL(blob) + saveAs(url, `${this.userlogin}_ecdsa`) + } + + generateKey(): void { + this.keyService.generateKey().subscribe((res: any): void => { + this.event.emit() + this.downloadPem(res['private_key']) + }) + } } diff --git a/src/app/shared/shared_modules/public-key/public-key.component.ts b/src/app/shared/shared_modules/public-key/public-key.component.ts index 802931e24c..dd6af9d6d1 100644 --- a/src/app/shared/shared_modules/public-key/public-key.component.ts +++ b/src/app/shared/shared_modules/public-key/public-key.component.ts @@ -33,8 +33,8 @@ export class PublicKeyComponent extends AbstractBaseClass implements OnInit { constructor( private keyService: KeyService, private clipboardService: ClipboardService, - private generatePublicKeyModal:GeneratePublicKeyModalComponent, - private setPublicKeyModalComponent:SetPublicKeyModalComponent + private generatePublicKeyModal: GeneratePublicKeyModalComponent, + private setPublicKeyModalComponent: SetPublicKeyModalComponent ) { super() } @@ -45,28 +45,24 @@ export class PublicKeyComponent extends AbstractBaseClass implements OnInit { } } - showSetPublicKeyModal():void{ - this.setPublicKeyModalComponent.showSetPublicKeyModal(this.userinfo.PublicKey).subscribe(() =>{ - console.log("event submitted") + showSetPublicKeyModal(): void { + this.setPublicKeyModalComponent.showSetPublicKeyModal(this.userinfo.PublicKey).subscribe(() => { + console.log('event submitted') this.getUserPublicKey() }) - } - showGeneratePublicKeyModal():void{ - this.generatePublicKeyModal.showGeneratePublicKeyModal(this.userinfo.UserLogin).subscribe(() =>{ - console.log("event submitted") + showGeneratePublicKeyModal(): void { + this.generatePublicKeyModal.showGeneratePublicKeyModal(this.userinfo.UserLogin).subscribe(() => { + console.log('event submitted') this.getUserPublicKey() }) } - unsetAcknowledgment():void{ - this.acknowledgement_given=false; + unsetAcknowledgment(): void { + this.acknowledgement_given = false } - - - isKeyBlocked(): void { this.keyService.isBlocked(this.userinfo.PublicKey.trim()).subscribe((res: BlacklistedResponse) => { this.blocked_key = res.blacklisted @@ -80,8 +76,6 @@ export class PublicKeyComponent extends AbstractBaseClass implements OnInit { }) } - - copyToClipboard(text: string): void { if (this.clipboardService.isSupported) { this.clipboardService.copy(text) diff --git a/src/app/shared/shared_modules/public-key/set-public-key-modal/set-public-key-modal.component.spec.ts b/src/app/shared/shared_modules/public-key/set-public-key-modal/set-public-key-modal.component.spec.ts index 5222159674..a0d03b51cf 100644 --- a/src/app/shared/shared_modules/public-key/set-public-key-modal/set-public-key-modal.component.spec.ts +++ b/src/app/shared/shared_modules/public-key/set-public-key-modal/set-public-key-modal.component.spec.ts @@ -1,23 +1,22 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed } from '@angular/core/testing' -import { SetPublicKeyModalComponent } from './set-public-key-modal.component'; +import { SetPublicKeyModalComponent } from './set-public-key-modal.component' describe('SetPublicKeyModalComponent', () => { - let component: SetPublicKeyModalComponent; - let fixture: ComponentFixture; + let component: SetPublicKeyModalComponent + let fixture: ComponentFixture - beforeEach(async () => { - await TestBed.configureTestingModule({ - imports: [SetPublicKeyModalComponent] - }) - .compileComponents(); + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [SetPublicKeyModalComponent] + }).compileComponents() - fixture = TestBed.createComponent(SetPublicKeyModalComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); + fixture = TestBed.createComponent(SetPublicKeyModalComponent) + component = fixture.componentInstance + fixture.detectChanges() + }) - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); + it('should create', () => { + expect(component).toBeTruthy() + }) +}) diff --git a/src/app/shared/shared_modules/public-key/set-public-key-modal/set-public-key-modal.component.ts b/src/app/shared/shared_modules/public-key/set-public-key-modal/set-public-key-modal.component.ts index 416cdc5171..9c7e7ff11e 100644 --- a/src/app/shared/shared_modules/public-key/set-public-key-modal/set-public-key-modal.component.ts +++ b/src/app/shared/shared_modules/public-key/set-public-key-modal/set-public-key-modal.component.ts @@ -1,48 +1,43 @@ -import { Component, EventEmitter, Injectable } from '@angular/core'; -import { KeyService } from 'app/api-connector/key.service'; -import { BlacklistedResponse } from 'app/api-connector/response-interfaces'; -import { AbstractBaseModalComponent } from 'app/shared/modal/abstract-base-modal/abstract-base-modal.component'; -import { NotificationModalComponent } from 'app/shared/modal/notification-modal'; -import { BsModalService } from 'ngx-bootstrap/modal'; +import { Component, EventEmitter, Injectable } from '@angular/core' +import { KeyService } from 'app/api-connector/key.service' +import { BlacklistedResponse } from 'app/api-connector/response-interfaces' +import { AbstractBaseModalComponent } from 'app/shared/modal/abstract-base-modal/abstract-base-modal.component' +import { NotificationModalComponent } from 'app/shared/modal/notification-modal' +import { BsModalService } from 'ngx-bootstrap/modal' @Injectable({ providedIn: 'root' }) @Component({ - selector: 'app-set-public-key-modal', - templateUrl: './set-public-key-modal.component.html', - styleUrl: './set-public-key-modal.component.scss' + selector: 'app-set-public-key-modal', + templateUrl: './set-public-key-modal.component.html', + styleUrl: './set-public-key-modal.component.scss' }) -export class SetPublicKeyModalComponent extends AbstractBaseModalComponent { - - acknowledgement_given:boolean=false - public_key:string; +export class SetPublicKeyModalComponent extends AbstractBaseModalComponent { + acknowledgement_given: boolean = false + public_key: string validated_key: boolean = false blocked_key: boolean = false current_key_blocked: boolean = false - constructor( + constructor( protected modalService: BsModalService, - private keyService:KeyService - ) { - super(modalService) - + private keyService: KeyService + ) { + super(modalService) + } + showSetPublicKeyModal(userlogin: string): EventEmitter { + const initialState = { + userlogin } - showSetPublicKeyModal( - userlogin:string - ): EventEmitter { - const initialState = { - userlogin - } - - return this.showBaseModal(SetPublicKeyModalComponent, initialState) - } + return this.showBaseModal(SetPublicKeyModalComponent, initialState) + } isKeyBlocked(): void { this.keyService.isBlocked(this.public_key.trim()).subscribe((res: BlacklistedResponse) => { this.blocked_key = res.blacklisted }) } -validateKey(): void { + validateKey(): void { this.keyService.validateKey(this.public_key.trim()).subscribe( (res: any) => { this.validated_key = res['status'] === 'valid' diff --git a/src/app/virtualmachines/virtualmachinemodels/imageTypes.ts b/src/app/virtualmachines/virtualmachinemodels/imageTypes.ts index 8cfe6d4624..b2662b57e5 100644 --- a/src/app/virtualmachines/virtualmachinemodels/imageTypes.ts +++ b/src/app/virtualmachines/virtualmachinemodels/imageTypes.ts @@ -1,7 +1,7 @@ /** * Image Types enum. */ -// eslint-disable-next-line no-shadow + export enum ImageTypes { IMAGE = 'IMAGE', CLUSTER_IMAGE = 'CLUSTER_IMAGE', diff --git a/src/app/virtualmachines/workshop/workshop-urlinfo.model.ts b/src/app/virtualmachines/workshop/workshop-urlinfo.model.ts index ab256c226b..bb9914b212 100644 --- a/src/app/virtualmachines/workshop/workshop-urlinfo.model.ts +++ b/src/app/virtualmachines/workshop/workshop-urlinfo.model.ts @@ -1,30 +1,27 @@ -// eslint-disable-next-line max-classes-per-file export class UrlData { - user_email: string; - user_name: string; - resenv_url: string; + user_email: string + user_name: string + resenv_url: string constructor(url_data?: Partial) { - Object.assign(this, url_data); + Object.assign(this, url_data) } } export class WorkshopUrlInfoModel { - - longname: string; - shortname: string; - url_data: UrlData[]; + longname: string + shortname: string + url_data: UrlData[] constructor(workshop_info?: Partial) { - Object.assign(this, workshop_info); + Object.assign(this, workshop_info) if (workshop_info) { if (workshop_info.url_data) { - this.url_data = []; + this.url_data = [] for (const url_data of workshop_info.url_data) { - this.url_data.push(new UrlData(url_data)); + this.url_data.push(new UrlData(url_data)) } } } } - } diff --git a/src/app/vo_manager/vo-guard.service.ts b/src/app/vo_manager/vo-guard.service.ts index cad5b4abc9..291e3b377d 100644 --- a/src/app/vo_manager/vo-guard.service.ts +++ b/src/app/vo_manager/vo-guard.service.ts @@ -13,18 +13,14 @@ import { is_vo } from '../shared/globalvar' export class VoGuardService { constructor(private router: Router) {} - // eslint-disable-next-line @typescript-eslint/no-unused-vars canActivate( route: ActivatedRouteSnapshot, state: RouterStateSnapshot ): Observable | Promise | boolean { - // eslint-disable-next-line @typescript-eslint/no-unused-vars return new Promise((resolve: any, reject: any): any => { if (is_vo) { - // eslint-disable-next-line no-promise-executor-return return resolve(true) } else { - // eslint-disable-next-line no-promise-executor-return return resolve(false) } })