Skip to content

Commit

Permalink
Merge branch 'staging'
Browse files Browse the repository at this point in the history
  • Loading branch information
dweinholz committed Jul 9, 2024
2 parents 8532352 + 1edcdfc commit 66fcc13
Show file tree
Hide file tree
Showing 50 changed files with 1,865 additions and 2,096 deletions.
161 changes: 82 additions & 79 deletions src/app/app.routing.ts
Original file line number Diff line number Diff line change
@@ -1,100 +1,103 @@
/* eslint-disable */
import { NgModule } from '@angular/core'
import { RouterModule, Routes } from '@angular/router'
import {NgModule} from '@angular/core'
import {RouterModule, Routes} from '@angular/router'
// Layouts
import { ConsentInfoComponent } from './consent-info.component'
import { FullLayoutComponent } from './layouts/full-layout.component'
import { MemberGuardService } from './member-guard.service'
import { RegistrationInfoComponent } from './registration-info.component'
import { LoggedInGuard } from './logged-in-guard.service'
import { CreditsCalculatorComponent } from './credits-calculator/credits-calculator.component'
import {ConsentInfoComponent} from './consent-info.component'
import {FullLayoutComponent} from './layouts/full-layout.component'
import {MemberGuardService} from './member-guard.service'
import {RegistrationInfoComponent} from './registration-info.component'
import {LoggedInGuard} from './logged-in-guard.service'
import {CreditsCalculatorComponent} from './credits-calculator/credits-calculator.component'
import {VoGuardService} from './shared/guards/vo-guard.service';

export const routes: Routes = [
{
path: '',
redirectTo: 'userinfo',
pathMatch: 'full',
},
{
path: 'registration-info',
component: RegistrationInfoComponent,
pathMatch: 'full',
},
{
path: 'consent-info',
component: ConsentInfoComponent,
pathMatch: 'full',
},
{
path: '',
component: FullLayoutComponent,
canActivate: [MemberGuardService],
data: {
title: 'de.NBI Cloud Portal',
{
path: '',
redirectTo: 'userinfo',
pathMatch: 'full',
},
children: [
{
path: 'userinfo',
canActivate: [LoggedInGuard],
{
path: 'registration-info',
component: RegistrationInfoComponent,
pathMatch: 'full',
},
{
path: 'consent-info',
component: ConsentInfoComponent,
pathMatch: 'full',
},
{
path: '',
component: FullLayoutComponent,
canActivate: [MemberGuardService],
data: {
title: 'de.NBI Cloud Portal',
},
children: [
{
path: 'userinfo',
canActivate: [LoggedInGuard],

// eslint-disable-next-line @typescript-eslint/promise-function-async
loadChildren: () => import('./userinfo/userinfo.module').then(m => m.UserinfoModule),
},
{
path: 'help',
canActivate: [LoggedInGuard],
// eslint-disable-next-line @typescript-eslint/promise-function-async
loadChildren: () => import('./userinfo/userinfo.module').then(m => m.UserinfoModule),
},
{
path: 'help',
canActivate: [LoggedInGuard],

// eslint-disable-next-line @typescript-eslint/promise-function-async
loadChildren: () => import('./help/help.module').then(m => m.HelpModule),
},
{
path: 'project-management',
canActivate: [LoggedInGuard],
// eslint-disable-next-line @typescript-eslint/promise-function-async
loadChildren: () => import('./help/help.module').then(m => m.HelpModule),
},
{
path: 'project-management',
canActivate: [LoggedInGuard],

loadChildren: () => import('./projectmanagement/projectmanagement.module').then(m => m.ProjectManagementModule),
},
{
path: 'applications',
canActivate: [LoggedInGuard],
loadChildren: () => import('./projectmanagement/projectmanagement.module').then(m => m.ProjectManagementModule),
},
{
path: 'applications',
canActivate: [LoggedInGuard],

loadChildren: () => import('./applications/applications.module').then(m => m.ApplicationsModule),
},
{
path: 'virtualmachines',
canActivate: [LoggedInGuard],
loadChildren: () => import('./applications/applications.module').then(m => m.ApplicationsModule),
},
{
path: 'virtualmachines',
canActivate: [LoggedInGuard],

loadChildren: () => import('./virtualmachines/vm.module').then(m => m.VmModule),
},
{
path: 'vo-manager',
loadChildren: () => import('./vo_manager/VoManager.module').then(m => m.VoManagerModule),
},
{
path: 'facility-manager',
canActivate: [LoggedInGuard],
loadChildren: () => import('./virtualmachines/vm.module').then(m => m.VmModule),
},
{
path: 'vo-manager',
loadChildren: () => import('./vo_manager/VoManager.module').then(m => m.VoManagerModule),
canActivate: [VoGuardService]
},
{
path: 'facility-manager',
canActivate: [LoggedInGuard],

loadChildren: () => import('./facility_manager/facilitymanager.module').then(m => m.FacilitymanagerModule),
},
{
path: 'credits-calculator',
canActivate: [LoggedInGuard],
component: CreditsCalculatorComponent,
loadChildren: () => import('./facility_manager/facilitymanager.module').then(m => m.FacilitymanagerModule),
},
{
path: 'credits-calculator',
canActivate: [LoggedInGuard],
component: CreditsCalculatorComponent,

loadChildren: () =>
import('./credits-calculator/credits-calculator.module').then(m => m.CreditsCalculatorModule),
},
],
},
loadChildren: () =>
import('./credits-calculator/credits-calculator.module').then(m => m.CreditsCalculatorModule),
},
],
},
]

/**
* App routing module.
*/
@NgModule({
imports: [RouterModule.forRoot(routes, {})],
exports: [RouterModule],
providers: [MemberGuardService, LoggedInGuard],
imports: [RouterModule.forRoot(routes, {})],
exports: [RouterModule],
providers: [MemberGuardService, LoggedInGuard],
})
export class AppRoutingModule {}
export class AppRoutingModule {
}

/* eslint-enable */
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@if (application | hasstatusinlist: Application_States.WAIT_FOR_CONFIRMATION) {
<button
id="approval_{{ application?.project_application_shortname }}"
[attr.data-test-id]="'approval_' + application?.project_application_shortname"
[attr.data-test-id]="'approval_' + application?.project_application_name"
style="margin: 2px"
(click)="showConfirmationModal(ConfirmationActions.APPROVE_APPLICATION)"
type=" button"
Expand Down Expand Up @@ -34,7 +34,7 @@
style="margin: 2px"
(click)="showConfirmationModal(ConfirmationActions.APPROVE_EXTENSION)"
type="button"
[attr.data-test-id]="'extension_approval_' + application?.project_application_shortname"
[attr.data-test-id]="'extension_approval_' + application?.project_application_name"
class="btn btn-success"
>
<i class="fa fa-check"></i>&nbsp;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,14 @@ <h5 class="col-md-6 form-control-label">General Information</h5>
</strong>
</label>
<div class="col-md-8">
A cloud project is represented by an Openstack project which allows you to manage your virtual machines,
storage and network configurations.
@if (kubernetes_access) {
A cloud project is represented by a Kubernetes project which allows you to manage your virtual
machines, storage and network configurations. If it matches your project requirements, it may be that
Kubernetes is operated on top OpenStack.
} @else {
A cloud project is represented by an Openstack project which allows you to manage your virtual
machines, storage and network configurations.
}
</div>
</div>
<div class="form-group row" *ngIf="simple_vm_project">
Expand Down Expand Up @@ -431,6 +437,7 @@ <h5 class="col-md-12 form-control-label">Resources</h5>
class="form-control"
id="id_project_application_volume_counter"
name="project_application_volume_counter"
data-test-id="project_application_volume_counter"
placeholder="e.g. 20"
type="number"
min="0"
Expand All @@ -455,6 +462,7 @@ <h5 class="col-md-12 form-control-label">Resources</h5>
data-balloon="Storage limit is the sum of extra storage provided by volumes."
data-balloon-pos="right"
data-balloon-length="large"

><i class="icon-question" style="cursor: pointer"></i></i></strong
></label>
<div class="col-md-8">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import { User } from '../application.model/user.model';
export class ApplicationFormularComponent extends ApplicationBaseClassComponent implements OnInit {
@Input() openstack_project: boolean = false;
@Input() simple_vm_project: boolean = false;
@Input() kubernetes_access: boolean = false;
@Input() title: string;
@Input() application: Application;
@Input() is_validation: boolean = false;
Expand Down Expand Up @@ -178,6 +179,7 @@ export class ApplicationFormularComponent extends ApplicationBaseClassComponent
initiateFormWithApplication(): void {
if (this.application && !this.initiated_validation && this.is_validation) {
this.openstack_project = this.application.project_application_openstack_project;

this.simple_vm_project = !this.openstack_project;
this.application.project_application_pi = new User();
this.searchTermsInEdamTerms();
Expand All @@ -195,6 +197,7 @@ export class ApplicationFormularComponent extends ApplicationBaseClassComponent
} else {
this.application = new Application(null);
this.application.project_application_openstack_project = this.openstack_project;
this.application.project_application_kubernetes_access = this.kubernetes_access;
if (this.openstack_project) {
this.application.project_application_object_storage = 0;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<app-application-formular
[kubernetes_access]="kubernetes_access"
[openstack_project]="openstack_application"
[title]="title"
></app-application-formular>
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { Component } from '@angular/core';

/**
* This components provides the functions to create a new Kubernetes Cloud Application.
*/
@Component({
selector: 'app-kubernetes-formular',
templateUrl: 'kubernetes-formular.component.html',
styleUrls: ['kubernetes-formular.component.css'],
})
export class KubernetesFormularComponent {
openstack_application: boolean = true;
kubernetes_access: boolean = true;

title: string = 'New Kubernetes Application';
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* #flavor-card {cursor: pointer;} */
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ import { Component } from '@angular/core';
templateUrl: 'addcloudapplication.component.html',
styleUrls: ['addcloudapplication.component.css'],
})

export class AddcloudapplicationComponent {
openstack_application: boolean = true;

title: string = 'New OpenStack Application';

}
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import { Component } from '@angular/core';
templateUrl: 'addsimplevm.component.html',
})
export class AddsimplevmComponent {

simple_vm_application: boolean = true;
title: string = 'New Simple Vm Application';

}
Original file line number Diff line number Diff line change
@@ -1,32 +1,41 @@
<div *ngIf="applications.length > 0" class="card-body" data-test-id="submitted_applications_container">
<div>
<table class="table table-responsive table-borderless table-hover">
<thead>
<tr>
<th></th>
<th>Project Name</th>
<th>Short Name</th>
<th>Date submitted</th>
<th>User</th>
<th>Institute</th>
<th *ngIf="is_vo_admin && voView">Compute Center</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
@for (application of applications; track application.project_application_id) {
<app-application-card
class="table-line"
[application]="application"
[facilityView]="facilityView"
[voView]="voView"
(reloadNumbersTrigger)="triggerReloadNumbers()"
[computeCenters]="computeCenters"
(removeApplicationTrigger)="removeApplicationFromList($event)"
[tabState]="tabState"
></app-application-card>
}
</tbody>
</table>
</div>
</div>
@if (applications.length <= 0) {
<div class="card-body" [attr.data-test-id]="dataTestId">
<div class="alert alert-success" role="alert">
<strong>No new Applications!</strong> There is nothing to review.
</div>
</div>
} @else {

<div class="card-body" [attr.data-test-id]="dataTestId">
<div>
<table class="table table-responsive table-borderless table-hover">
<thead>
<tr>
<th></th>
<th>Project Name</th>
<th>Short Name</th>
<th>Date submitted</th>
<th>User</th>
<th>Institute</th>
<th *ngIf="is_vo_admin && voView">Compute Center</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
@for (application of applications; track application.project_application_id) {
<app-application-card
class="table-line"
[application]="application"
[facilityView]="facilityView"
[voView]="voView"
(reloadNumbersTrigger)="triggerReloadNumbers()"
[computeCenters]="computeCenters"
(removeApplicationTrigger)="removeApplicationFromList($event)"
[tabState]="tabState"
></app-application-card>
}
</tbody>
</table>
</div>
</div>
}
Loading

0 comments on commit 66fcc13

Please sign in to comment.