Skip to content

Commit

Permalink
merged dev into feat
Browse files Browse the repository at this point in the history
  • Loading branch information
vktrrdk committed Dec 20, 2023
2 parents 3d0d845 + d06c9e7 commit 93f5489
Show file tree
Hide file tree
Showing 11 changed files with 99 additions and 63 deletions.
38 changes: 19 additions & 19 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@

},
"devDependencies": {
"@angular-devkit/build-angular": "^16.1.4",
"@angular-devkit/build-angular": "^16.2.10",
"@angular-eslint/builder": "16.2.0",
"@angular-eslint/eslint-plugin": "16.2.0",
"@angular-eslint/eslint-plugin-template": "16.2.0",
Expand Down
4 changes: 4 additions & 0 deletions src/app/applications/application.model/application.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
5 changes: 4 additions & 1 deletion src/app/pipe-module/pipe-module.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ 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 { SocialConsentGivenPipe } from './pipes/social-consent-given.pipe';
import { IsMigratedProjectPipe } from './pipes/isMigratedProject';

/**
* Pipemodule
Expand All @@ -41,6 +42,7 @@ import { SocialConsentGivenPipe } from './pipes/social-consent-given.pipe';
HasStatusNotInListPipe,
SignificancePipe,
SocialConsentGivenPipe,
IsMigratedProjectPipe,
],
exports: [
FlavorCounterPipe,
Expand All @@ -62,8 +64,9 @@ import { SocialConsentGivenPipe } from './pipes/social-consent-given.pipe';
HasStatusNotInListPipe,
SignificancePipe,
SocialConsentGivenPipe,
IsMigratedProjectPipe,
],
imports: [CommonModule],
providers: [IsMigratedProjectIdPipe],
providers: [],
})
export class PipeModuleModule {}
14 changes: 14 additions & 0 deletions src/app/pipe-module/pipes/isMigratedProject.ts
Original file line number Diff line number Diff line change
@@ -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();
}
}
2 changes: 1 addition & 1 deletion src/app/pipe-module/pipes/migratedList.ts
Original file line number Diff line number Diff line change
@@ -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',
Expand Down
30 changes: 23 additions & 7 deletions src/app/projectmanagement/overview.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -403,11 +403,17 @@ <h3>
<div class="col-6">
<div
*ngIf="this.resourceDataLoaded"
class="callout callout-info"
class="callout"
[ngClass]="(project_application | isMigratedProject) ? 'callout-warning' : 'callout-info'"
style="border-top-width: 0; border-bottom-width: 0; border-right-width: 0"
>
<small class="text-muted">Computational Resources</small><br />
<strong *ngIf="project_application?.project_application_openstack_project" class="text-muted"
<strong
*ngIf="
project_application?.project_application_openstack_project ||
(project_application | isMigratedProject)
"
class="text-muted"
>{{ maximumVMs }} VMs with a total of {{ project_application?.project_application_total_cores }} VCPUs
and {{ project_application?.project_application_total_ram }} GBs of RAM
<span
Expand All @@ -420,7 +426,12 @@ <h3>
{{ project_application?.project_modification_request?.date_submitted }}
</span>
</strong>
<strong *ngIf="!project_application?.project_application_openstack_project" class="text-muted"
<strong
*ngIf="
!project_application?.project_application_openstack_project &&
!(project_application | isMigratedProject)
"
class="text-muted"
>{{ vmsInUse }} of {{ maximumVMs }} VMS, {{ coresInUse }} of
{{ project_application?.project_application_total_cores }} VCPUs and {{ ramInUse }}
of
Expand All @@ -436,7 +447,10 @@ <h3>
</span> </strong
><br />
<div
*ngIf="!project_application?.project_application_openstack_project"
*ngIf="
!project_application?.project_application_openstack_project &&
!(project_application | isMigratedProject)
"
class="progress"
style="height: 2px"
>
Expand All @@ -448,6 +462,10 @@ <h3>
role="progressbar"
></div>
</div>
<small class="text-muted" *ngIf="project_application | isMigratedProject">
Please consider: As the project is migrated, the amount of used resources is visible in the
<a [href]="NEW_SVM_PORTAL_LINK" target="_blank" rel="noopener noreferrer">SimpleVM platform</a>.
</small>
</div>
</div>
<div class="col-6">
Expand Down Expand Up @@ -503,9 +521,7 @@ <h3>
<a
*ngIf="!project_application?.project_application_openstack_project && isAbleToStart()"
class="btn btn-outline-success"
[href]="
project_application?.migrated_simple_vm_resources ? NEW_SVM_PORTAL_LINK : '#/virtualmachines/newVM'
"
[href]="(project_application | isMigratedProject) ? NEW_SVM_PORTAL_LINK : '#/virtualmachines/newVM'"
>Start a VM</a
>
<a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<div *ngIf="!is_loaded" class="loader"></div>
<div *ngIf="is_loaded && userinfo?.PublicKey !== 'None' && projects.length === 0">
<div class="alert alert-warning" role="alert">
You are not an admin of any Simple VM project with workshop enabled.
You are not an admin of any Simple VM project with workshop enabled for this platform.
</div>
</div>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
</div>
</div>
</div>

<div *ngIf="projectWorkshopsLoaded && projectMembersLoaded" class="card" id="workshopCard">
<div class="card-header">
<i class="fa fa-align-justify"></i>
Expand Down Expand Up @@ -447,9 +446,9 @@ <h6 class="card-title">Add new timeframes</h6>
<span class="spinner-border-sm"></span>
</div>
</div>
<div *ngIf="projects.length === 0" class="alert alert-warning" role="alert">
You are not a member of a project with workshop functionality.
</div>
</div>
<div *ngIf="projects.length === 0" class="alert alert-warning" role="alert">
You are not a member of a project with workshop functionality on this platform.
</div>
</div>

Expand Down
24 changes: 12 additions & 12 deletions src/app/vo_manager/clients/modals/client-limits..component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ export class ClientLimitsComponent implements OnDestroy, OnInit {
.subscribe(
(cl: any) => {
this.client = new Client(null, null, null, cl['client_name'], null);
this.client.maxVolumeLimit = cl['maxTotalVolumeGigabytes'];
this.client.maxVolumeLimit = cl['max_total_volumeGigabytes'];
this.client.assignedVolumesStorage = cl['assigned_volume_gb'];
this.client.currentUsedVolumeStorage = cl['totalGigabytesUsed'];
this.client.currentUsedVolumeStorage = cl['total_gigabytes_used'];
this.client.newVolumeLimit = cl['new_volume_gb'];

this.client.maxVolumes = cl['maxTotalVolumes'];
this.client.maxVolumes = cl['max_total_volumes'];
this.client.assignedVolumes = cl['assigned_volumes'];
this.client.currentUsedVolumes = cl['totalVolumesUsed'];
this.client.currentUsedVolumes = cl['total_volumesUsed'];
this.client.newVolumes = cl['new_volumes'];

this.client.maxVMs = cl['max_total_instances'];
Expand Down Expand Up @@ -90,14 +90,14 @@ export class ClientLimitsComponent implements OnDestroy, OnInit {
.subscribe(
(cl: any) => {
this.client = new Client(null, null, null, cl['client_name'], null);
this.client.maxVolumeLimit = cl['maxTotalVolumeGigabytes'];
this.client.maxVolumeLimit = cl['max_total_volume_gigabytes'];
this.client.assignedVolumesStorage = cl['assigned_volume_gb'];
this.client.currentUsedVolumeStorage = cl['totalGigabytesUsed'];
this.client.currentUsedVolumeStorage = cl['total_gigabytes_used'];
this.client.newVolumeLimit = cl['new_volume_gb'];

this.client.maxVolumes = cl['maxTotalVolumes'];
this.client.maxVolumes = cl['max_total_volumes'];
this.client.assignedVolumes = cl['assigned_volumes'];
this.client.currentUsedVolumes = cl['totalVolumesUsed'];
this.client.currentUsedVolumes = cl['total_volumes_used'];
this.client.newVolumes = cl['new_volumes'];

this.client.maxVMs = cl['max_total_instances'];
Expand Down Expand Up @@ -137,14 +137,14 @@ export class ClientLimitsComponent implements OnDestroy, OnInit {
this.clientService.getClientLimits(this.client.id).subscribe(
(cl: any) => {
this.client = new Client(null, null, null, cl['client_name'], null);
this.client.maxVolumeLimit = cl['maxTotalVolumeGigabytes'];
this.client.maxVolumeLimit = cl['max_total_volume_gigabytes'];
this.client.assignedVolumesStorage = cl['assigned_volume_gb'];
this.client.currentUsedVolumeStorage = cl['totalGigabytesUsed'];
this.client.currentUsedVolumeStorage = cl['total_gigabytes_used'];
// this.client.newVolumeLimit = client['new_volume_gb'];

this.client.maxVolumes = cl['maxTotalVolumes'];
this.client.maxVolumes = cl['max_total_volumes'];
this.client.assignedVolumes = cl['assigned_volumes'];
this.client.currentUsedVolumes = cl['totalVolumesUsed'];
this.client.currentUsedVolumes = cl['total_volumes_used'];
// this.client.newVolumes = client['new_volumes'];

this.client.maxVMs = cl['max_total_instances'];
Expand Down
34 changes: 17 additions & 17 deletions src/links/check_links.sh
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
#!/bin/bash
WIKI_SNAPSHOTS=https://portal-dev.denbi.de/wiki/simple_vm/snapshots/
WIKI_SNAPSHOTS=https://simplevm-dev.bi.denbi.de/wiki/simple_vm/snapshots/
WIKI=https://portal-dev.denbi.de/wiki/
WIKI_GENERATE_KEYS=https://portal-dev.denbi.de/wiki/quickstart/#generate-ssh-keys
WIKI_NEWS_MANAGEMENT=https://portal-dev.denbi.de/wiki/cloud_admin/news_management/
WIKI_SIMPLEVM_CUSTOMISATION=https://portal-dev.denbi.de/wiki/simple_vm/customization/
WIKI_EXTEND_VOLUME=https://portal-dev.denbi.de/wiki/simple_vm/volumes/#extend-a-volume
WIKI_VOLUME_OVERVIEW=https://portal-dev.denbi.de/wiki/simple_vm/volumes/
WIKI_RESENV_LINK=https://portal-dev.denbi.de/wiki/simple_vm/customization/#research-environments
WIKI_RSTUDIO_LINK=https://portal-dev.denbi.de/wiki/simple_vm/customization/#rstudio
WIKI_GUACAMOLE_LINK=https://portal-dev.denbi.de/wiki/simple_vm/customization/#apache-guacamole
WIKI_NEW_INSTANCE_LINK=https://portal-dev.denbi.de/wiki/simple_vm/new_instance/
WIKI_INSTANCE_OVERVIEW_LINK=https://portal-dev.denbi.de/wiki/simple_vm/instance_overview/
WIKI_INSTANCE_DETAIL_LINK=https://portal-dev.denbi.de/wiki/simple_vm/instance_detail/
WIKI_LINK_ACCOUNTS=https://portal-dev.denbi.de/wiki/portal/user_information/#link-accounts-to-elixir
WIKI_SIMPLEVM_CUSTOMISATION=https://simplevm-dev.bi.denbi.de/wiki/simple_vm/customization/
WIKI_EXTEND_VOLUME=https://simplevm-dev.bi.denbi.de/wiki/simple_vm/volumes/#extend-a-volume
WIKI_VOLUME_OVERVIEW=https://simplevm-dev.bi.denbi.de/wiki/simple_vm/volumes/
WIKI_RESENV_LINK=https://simplevm-dev.bi.denbi.de/wiki/simple_vm/customization/#research-environments
WIKI_RSTUDIO_LINK=https://simplevm-dev.bi.denbi.de/wiki/simple_vm/customization/#rstudio
WIKI_GUACAMOLE_LINK=https://simplevm-dev.bi.denbi.de/wiki/simple_vm/customization/#apache-guacamole
WIKI_NEW_INSTANCE_LINK=https://simplevm-dev.bi.denbi.de/wiki/simple_vm/create_instance/
WIKI_INSTANCE_OVERVIEW_LINK=https://simplevm-dev.bi.denbi.de/wiki/simple_vm/instance_overview/
WIKI_INSTANCE_DETAIL_LINK=https://simplevm-dev.bi.denbi.de/wiki/simple_vm/instance_detail/
WIKI_LINK_ACCOUNTS=https://portal-dev.denbi.de/wiki/portal/user_information/#link-accounts-to-lifescience-formerly-elixir
SCALE_SCRIPT_LINK=https://raw.githubusercontent.com/deNBI/user_scripts/master/bibigrid/scaling.py
SCALING_UP_WIKI=https://portal-dev.denbi.de/wiki/simple_vm/Cluster/cluster_overview/#3-scale-up
SCALING_UP_WIKI=https://simplevm-dev.bi.denbi.de/wiki/simple_vm/Cluster/cluster_overview/#3-scale-up
WIKI_PUBLICATIONS=https://portal-dev.denbi.de/wiki/citation_and_publication/#publications
WIKI_MEMBER_MANAGEMENT=https://portal-dev.denbi.de/wiki/portal/project_overview/#member-management
WIKI_FAQ=https://portal-dev.denbi.de/wiki/FAQ/
WIKI_MOTD=https://portal-dev.denbi.de/wiki/cloud_admin/news_management/#message-of-the-day
WIKI_CREATE_SNAPSHOT_LINK=https://portal-dev.denbi.de/wiki/simple_vm/snapshots/#create-snapshot
WIKI_VOLUMES_LINK=https://portal-dev.denbi.de/wiki/simple_vm/volumes/
WIKI_CREATE_SNAPSHOT_LINK=https://simplevm-dev.bi.denbi.de/wiki/simple_vm/snapshots/#create-snapshot
WIKI_VOLUMES_LINK=https://simplevm-dev.bi.denbi.de/wiki/simple_vm/volumes/
WIKI_MOSH_LINK=https://portal-dev.denbi.de/wiki/Tutorials/Mosh/
WIKI_PERSONAL_DATA=https://portal-dev.denbi.de/wiki/portal/personal_data/
WIKI_EPHEMERAL_LINK=https://portal-dev.denbi.de/wiki/simple_vm/new_instance/#information-for-ephemeral-flavors
SURVEY_LINK=https://www.surveymonkey.de/r/HQW9V7C
WIKI_EPHEMERAL_LINK=https://simplevm-dev.bi.denbi.de/wiki/simple_vm/create_instance/#about-ephemeral-flavors
# SURVEY_LINK=https://www.surveymonkey.de/r/HQW9V7C


# WAGTAIL LINKS
Expand All @@ -43,7 +43,7 @@ ZAMMAD_HELPDESK_LINK=https://helpdesk.cloud.denbi.de
GDPR_LINK=https://gdpr.eu/article-9-processing-special-categories-of-personal-data-prohibited/


LINKS=("$ZAMMAD_HELPDESK_LINK" "$WIKI_SNAPSHOTS" "$SURVEY_LINK" "$WIKI_RSTUDIO_LINK" "$SCALING_UP_WIKI" "$SCALE_SCRIPT_LINK" "$WIKI" "$WIKI_GENERATE_KEYS" "$WIKI_NEWS_MANAGEMENT" "$WIKI_SIMPLEVM_CUSTOMISATION" "$WIKI_EXTEND_VOLUME" "$WIKI_VOLUME_OVERVIEW" "$WIKI_RESENV_LINK" "$WIKI_GUACAMOLE_LINK" "$WIKI_NEW_INSTANCE_LINK" "$WIKI_INSTANCE_OVERVIEW_LINK" "$WIKI_INSTANCE_DETAIL_LINK" "$WIKI_LINK_ACCOUNTS" "$WIKI_PUBLICATIONS" "$WIKI_MEMBER_MANAGEMENT" "$WIKI_FAQ" "$WIKI_MOTD" "$FACILITY_NEWS" "$POLICIES" "$PROJECT_TYPES" "$SIMPLE_VM" "$OPENSTACK" "$PUBLICATIONS" "$STATUS_LINK" "$SUPPORT_LINK" "$WIKI_CREATE_SNAPSHOT_LINK" "$WIKI_VOLUMES_LINK" "$WIKI_MOSH_LINK" "$WIKI_EPHEMERAL_LINK" "$WIKI_PERSONAL_DATA" "$GDPR_LINK")
LINKS=("$ZAMMAD_HELPDESK_LINK" "$WIKI_SNAPSHOTS" "$WIKI_RSTUDIO_LINK" "$SCALING_UP_WIKI" "$SCALE_SCRIPT_LINK" "$WIKI" "$WIKI_GENERATE_KEYS" "$WIKI_NEWS_MANAGEMENT" "$WIKI_SIMPLEVM_CUSTOMISATION" "$WIKI_EXTEND_VOLUME" "$WIKI_VOLUME_OVERVIEW" "$WIKI_RESENV_LINK" "$WIKI_GUACAMOLE_LINK" "$WIKI_NEW_INSTANCE_LINK" "$WIKI_INSTANCE_OVERVIEW_LINK" "$WIKI_INSTANCE_DETAIL_LINK" "$WIKI_LINK_ACCOUNTS" "$WIKI_PUBLICATIONS" "$WIKI_MEMBER_MANAGEMENT" "$WIKI_FAQ" "$WIKI_MOTD" "$FACILITY_NEWS" "$POLICIES" "$PROJECT_TYPES" "$SIMPLE_VM" "$OPENSTACK" "$PUBLICATIONS" "$STATUS_LINK" "$SUPPORT_LINK" "$WIKI_CREATE_SNAPSHOT_LINK" "$WIKI_VOLUMES_LINK" "$WIKI_MOSH_LINK" "$WIKI_EPHEMERAL_LINK" "$WIKI_PERSONAL_DATA" "$GDPR_LINK")

for i in "${LINKS[@]}"; do
echo "$i"
Expand Down

0 comments on commit 93f5489

Please sign in to comment.