Skip to content

Commit

Permalink
Merge branch 'dev' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
dweinholz committed Aug 27, 2024
2 parents 3ff415f + 5850f17 commit 67e0dff
Show file tree
Hide file tree
Showing 35 changed files with 424 additions and 509 deletions.
433 changes: 200 additions & 233 deletions package-lock.json

Large diffs are not rendered by default.

40 changes: 20 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@denbi/cloud-portal-webapp",
"version": "4.863.0",
"version": "4.865.0",
"description": "de.NBI Cloud Portal",
"scripts": {
"ng": "ng serve",
Expand All @@ -19,21 +19,21 @@
"private": true,
"dependencies": {
"@angular-eslint/eslint-plugin": "^18.3.0",
"@angular/animations": "18.2.0",
"@angular/cdk": "18.2.0",
"@angular/common": "18.2.0",
"@angular/compiler": "18.2.0",
"@angular/core": "18.2.0",
"@angular/forms": "18.2.0",
"@angular/localize": "18.2.0",
"@angular/platform-browser": "18.2.0",
"@angular/platform-browser-dynamic": "18.2.0",
"@angular/router": "18.2.0",
"@angular/service-worker": "18.2.0",
"@angular/upgrade": "18.2.0",
"@coreui/angular": "5.2.13",
"@coreui/coreui": "5.1.1",
"@coreui/icons-angular": "5.2.13",
"@angular/animations": "18.2.1",
"@angular/cdk": "18.2.1",
"@angular/common": "18.2.1",
"@angular/compiler": "18.2.1",
"@angular/core": "18.2.1",
"@angular/forms": "18.2.1",
"@angular/localize": "18.2.1",
"@angular/platform-browser": "18.2.1",
"@angular/platform-browser-dynamic": "18.2.1",
"@angular/router": "18.2.1",
"@angular/service-worker": "18.2.1",
"@angular/upgrade": "18.2.1",
"@coreui/angular": "5.2.15",
"@coreui/coreui": "5.1.2",
"@coreui/icons-angular": "5.2.15",
"@ng-bootstrap/ng-bootstrap": "17.0.0",
"@ng-select/ng-select": "13.7.0",
"@sindresorhus/transliterate": "1.6.0",
Expand All @@ -42,7 +42,7 @@
"acorn": "8.12.1",
"ajv-formats": "3.0.1",
"angulartics2": "14.1.0",
"billboard.js": "3.12.4",
"billboard.js": "3.13.0",
"bootstrap": "5.3.3",
"chart.js": "4.4.4",
"cli-color": "2.0.4",
Expand All @@ -67,15 +67,15 @@
"ngx-cookie-service": "18.0.0",
"ngx-matomo-client": "6.3.0",
"ngx-owl-carousel-o": "18.0.0",
"ngx-scrollbar": "15.1.2",
"ngx-scrollbar": "15.1.3",
"postcss-loader": "8.1.1",
"postcss-url": "10.1.3",
"rxjs": "7.8.1",
"save-svg-as-png": "1.4.17",
"slash": "^5.0.0",
"svg2pdf.js": "2.2.4",
"ts-helpers": "1.1.2",
"tslib": "2.6.3",
"tslib": "2.7.0",
"uglify-js": "3.19.2"
},
"devDependencies": {
Expand All @@ -85,7 +85,7 @@
"@angular-eslint/schematics": "18.3.0",
"@angular-eslint/template-parser": "18.3.0",
"@angular/cli": "^18.1.4",
"@angular/compiler-cli": "18.2.0",
"@angular/compiler-cli": "18.2.1",
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.9.0",
"@playwright/test": "1.46.1",
Expand Down
9 changes: 3 additions & 6 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { AfterViewInit, ApplicationRef, Component, OnInit, ViewChild } from '@angular/core'
import { ModalDirective } from 'ngx-bootstrap/modal'
import { Angulartics2Matomo } from 'angulartics2'
import { VoService } from './api-connector/vo.service'
import { TitleService } from './title.service'

/**
* App component.
Expand All @@ -21,7 +21,7 @@ export class AppComponent implements AfterViewInit, OnInit {

constructor(
private appRef: ApplicationRef,
private angulartics2Matomo: Angulartics2Matomo
private titleService: TitleService
) {
/* if (environment.production) {
const isStable = appRef.isStable.pipe(first(isStable => isStable === true));
Expand All @@ -41,10 +41,7 @@ export class AppComponent implements AfterViewInit, OnInit {
}

ngOnInit(): void {
this.angulartics2Matomo.startTracking()
// this.voService.isVo().subscribe((result: IResponseTemplate) => {
// setVO(<boolean><Boolean>result.value);
// })
this.titleService.init()
}

ngAfterViewInit(): void {}
Expand Down
5 changes: 4 additions & 1 deletion src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { HashLocationStrategy, LocationStrategy, CommonModule } from '@angular/common'
import { ErrorHandler, NgModule } from '@angular/core'
import { BrowserModule } from '@angular/platform-browser'
import { BrowserModule, Title } from '@angular/platform-browser'
import { BsDropdownModule } from 'ngx-bootstrap/dropdown'
import { TabsModule } from 'ngx-bootstrap/tabs'
import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http'
Expand Down Expand Up @@ -46,6 +46,7 @@ import { VoService } from './api-connector/vo.service'
import { TokenInterceptor } from './api-connector/token-interceptor'
import { PipeModuleModule } from './pipe-module/pipe-module.module'
import { FacilityService } from './api-connector/facility.service'
import { TitleService } from './title.service'

/**
* App module.
Expand Down Expand Up @@ -114,6 +115,8 @@ import { FacilityService } from './api-connector/facility.service'
CookieService,
VoService,
FacilityService,
Title,
TitleService,
provideHttpClient(withInterceptorsFromDi())
]
})
Expand Down
168 changes: 88 additions & 80 deletions src/app/app.routing.ts
Original file line number Diff line number Diff line change
@@ -1,103 +1,111 @@
/* 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 {VoGuardService} from './shared/guards/vo-guard.service';
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: '',
redirectTo: 'userinfo',
pathMatch: 'full',
data: {
title: 'de.NBI Cloud Portal - Profile',
},
{
path: 'registration-info',
component: RegistrationInfoComponent,
pathMatch: 'full',
},
{
path: 'registration-info',
component: RegistrationInfoComponent,
pathMatch: 'full',
data: {
title: 'de.NBI Cloud Portal - Registration Info',
},
{
path: 'consent-info',
component: ConsentInfoComponent,
pathMatch: 'full',
},
{
path: 'consent-info',
component: ConsentInfoComponent,
pathMatch: 'full',
data: {
title: 'de.NBI Cloud Portal - Consent Info',
},
{
path: '',
component: FullLayoutComponent,
canActivate: [MemberGuardService],
data: {
title: 'de.NBI Cloud Portal',
},
children: [
{
path: 'userinfo',
canActivate: [LoggedInGuard],
},
{
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],
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],
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),
canActivate: [VoGuardService]
},
{
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
@@ -1,6 +1,6 @@
import { ChangeDetectorRef, Component, Input, OnInit, ViewChild, inject } from '@angular/core'
import { ChangeDetectorRef, Component, Input, OnInit, ViewChild } from '@angular/core'
import { NgForm } from '@angular/forms'
import { MatomoTracker } from 'ngx-matomo-client'

import { Flavor } from '../../virtualmachines/virtualmachinemodels/flavor'
import { FlavorService } from '../../api-connector/flavor.service'
import { FlavorType } from '../../virtualmachines/virtualmachinemodels/flavorType'
Expand Down Expand Up @@ -51,8 +51,6 @@ export class ApplicationFormularComponent extends ApplicationBaseClassComponent
@Input() is_validation: boolean = false
@Input() hash: string

private readonly tracker = inject(MatomoTracker)

userinfo: Userinfo
valid_pi_affiliations
unknownPiAffiliationsConfirmation: boolean = false
Expand Down Expand Up @@ -115,11 +113,6 @@ export class ApplicationFormularComponent extends ApplicationBaseClassComponent
}

ngOnInit(): void {
if (!this.is_validation) {
const typeStr: string = this.openstack_project ? ' Openstack' : 'SimpleVM'
this.tracker.trackPageView(`New Application Formular: ${typeStr}`)
}

this.getUserinfo()
this.getListOfFlavors()
this.getListOfTypes()
Expand Down Expand Up @@ -257,7 +250,6 @@ export class ApplicationFormularComponent extends ApplicationBaseClassComponent
* gets a list of all available Flavors from the flavorservice and puts them into the array flavorList
*/
getListOfFlavors(): void {

this.flavorService.getListOfFlavorsAvailable().subscribe((flavors: Flavor[]): void => {
this.flavorList = flavors
})
Expand Down
Loading

0 comments on commit 67e0dff

Please sign in to comment.