From 0bcb7320156977201380024620ca7ea8abf55348 Mon Sep 17 00:00:00 2001 From: Viktor Rudko <43116821+vktrrdk@users.noreply.github.com> Date: Mon, 11 Dec 2023 13:40:13 +0100 Subject: [PATCH] =?UTF-8?q?fix(Project=20Overview):=20Indicate=20that=20re?= =?UTF-8?q?source=20usage=20for=20migrated=20proj=E2=80=A6=20(#5981)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(Project Overview): Indicate that resource usage for migrated projects is visible on new platform * fix(Link-Check): Adjust links to new wiki --------- Co-authored-by: Ubuntu --- .../application.model/application.model.ts | 4 +++ src/app/pipe-module/pipe-module.module.ts | 5 +++- .../pipe-module/pipes/isMigratedProject.ts | 14 +++++++++ src/app/pipe-module/pipes/migratedList.ts | 2 +- .../projectmanagement/overview.component.html | 30 ++++++++++++++----- src/links/check_links.sh | 30 +++++++++---------- 6 files changed, 61 insertions(+), 24 deletions(-) create mode 100644 src/app/pipe-module/pipes/isMigratedProject.ts diff --git a/src/app/applications/application.model/application.model.ts b/src/app/applications/application.model/application.model.ts index 02719a8904..85e373535e 100644 --- a/src/app/applications/application.model/application.model.ts +++ b/src/app/applications/application.model/application.model.ts @@ -168,6 +168,10 @@ export class Application { return this.project_application_statuses?.includes(Application_States.SUBMITTED); } + public isMigrated(): boolean { + return this.migrate_to_simple_vm || this.migrated_simple_vm_resources; + } + public hasTerminatedStatus(): boolean { return this.project_application_statuses?.includes(Application_States.TERMINATED); } diff --git a/src/app/pipe-module/pipe-module.module.ts b/src/app/pipe-module/pipe-module.module.ts index fd2eff008f..37ae004611 100644 --- a/src/app/pipe-module/pipe-module.module.ts +++ b/src/app/pipe-module/pipe-module.module.ts @@ -15,6 +15,7 @@ import { IsFutureTimePipe } from './pipes/futureTime.pipe'; import { IsMigratedProjectIdPipe } from './pipes/migratedList'; import { HasStatusNotInListPipe } from './pipes/has-status-not-in-list.pipe'; import { SignificancePipe } from '../shared/shared_modules/components/maintenance-notification/significance-pipe/significance.pipe'; +import { IsMigratedProjectPipe } from './pipes/isMigratedProject'; /** * Pipemodule @@ -39,6 +40,7 @@ import { SignificancePipe } from '../shared/shared_modules/components/maintenanc IsMigratedProjectIdPipe, HasStatusNotInListPipe, SignificancePipe, + IsMigratedProjectPipe, ], exports: [ FlavorCounterPipe, @@ -59,8 +61,9 @@ import { SignificancePipe } from '../shared/shared_modules/components/maintenanc IsMigratedProjectIdPipe, HasStatusNotInListPipe, SignificancePipe, + IsMigratedProjectPipe, ], imports: [CommonModule], - providers: [IsMigratedProjectIdPipe], + providers: [], }) export class PipeModuleModule {} diff --git a/src/app/pipe-module/pipes/isMigratedProject.ts b/src/app/pipe-module/pipes/isMigratedProject.ts new file mode 100644 index 0000000000..9b5d2feae7 --- /dev/null +++ b/src/app/pipe-module/pipes/isMigratedProject.ts @@ -0,0 +1,14 @@ +import { Pipe, PipeTransform } from '@angular/core'; +import { Application } from 'app/applications/application.model/application.model'; + +/** + * Pipe which returns whether a certain project is migrated or marked for migration to SimpleVM-Platform. + */ +@Pipe({ + name: 'isMigratedProject', +}) +export class IsMigratedProjectPipe implements PipeTransform { + transform(projectApplication: Application) { + return projectApplication.isMigrated(); + } +} diff --git a/src/app/pipe-module/pipes/migratedList.ts b/src/app/pipe-module/pipes/migratedList.ts index ee19a0ec9b..ad5101081b 100644 --- a/src/app/pipe-module/pipes/migratedList.ts +++ b/src/app/pipe-module/pipes/migratedList.ts @@ -1,7 +1,7 @@ import { Pipe, PipeTransform } from '@angular/core'; /** - * Pipe which returns counter of flavors. + * Pipe which returns whether a project id belongs to a migrated project or not. */ @Pipe({ name: 'isMigratedProjectId', diff --git a/src/app/projectmanagement/overview.component.html b/src/app/projectmanagement/overview.component.html index 8846893e91..26bf300cd8 100644 --- a/src/app/projectmanagement/overview.component.html +++ b/src/app/projectmanagement/overview.component.html @@ -403,11 +403,17 @@

Computational Resources
- {{ maximumVMs }} VMs with a total of {{ project_application?.project_application_total_cores }} VCPUs and {{ project_application?.project_application_total_ram }} GBs of RAM {{ project_application?.project_modification_request?.date_submitted }} - {{ vmsInUse }} of {{ maximumVMs }} VMS, {{ coresInUse }} of {{ project_application?.project_application_total_cores }} VCPUs and {{ ramInUse }} of @@ -436,7 +447,10 @@


@@ -448,6 +462,10 @@

role="progressbar" >

+ + Please consider: As the project is migrated, the amount of used resources is visible in the + SimpleVM platform. +
@@ -503,9 +521,7 @@

Start a VM