From c5b1e27a77081717f37942de8dacfa5c2e30b09d Mon Sep 17 00:00:00 2001
From: Joaquín Reñé <jrene@curisit.net>
Date: Tue, 21 Apr 2026 22:56:25 +0000
Subject: [PATCH] #4479 - upgrade SecurisServer to Java 21
---
securis/src/main/webapp/src/app/listing/user.list.component.ts | 2 --
securis/src/main/webapp/src/app/resources/base.ts | 2 ++
securis/src/main/webapp/src/app/forms/pack.form.component.ts | 25 ++++++++++++++-----------
securis/src/main/webapp/src/app/listing/application.list.component.ts | 2 --
securis/src/main/webapp/src/app/app.module.ts | 6 +-----
securis/src/main/webapp/src/app/listing/organization.list.component.ts | 2 --
securis/src/main/webapp/src/tsconfig.json | 2 +-
securis/src/main/webapp/src/app/listing/licensetype.list.component.ts | 2 --
securis/src/main/webapp/src/app/listing/pack.list.component.ts | 17 ++++++++++-------
9 files changed, 28 insertions(+), 32 deletions(-)
diff --git a/securis/src/main/webapp/src/app/app.module.ts b/securis/src/main/webapp/src/app/app.module.ts
index 57e6a1e..00de34c 100644
--- a/securis/src/main/webapp/src/app/app.module.ts
+++ b/securis/src/main/webapp/src/app/app.module.ts
@@ -100,15 +100,11 @@
bootstrap: [ HomeComponent ],
entryComponents: [ ],
providers: [
+ LocaleService,
SeCurisSession,
UserService,
PacksService,
LicensesService,
- PackFormComponent,
- LicenseFormComponent,
- LicenseTypeFormComponent,
- OrganizationFormComponent,
- UserFormComponent,
ApplicationsService,
OrganizationsService,
LicenseTypesService,
diff --git a/securis/src/main/webapp/src/app/forms/pack.form.component.ts b/securis/src/main/webapp/src/app/forms/pack.form.component.ts
index 9676626..5622817 100644
--- a/securis/src/main/webapp/src/app/forms/pack.form.component.ts
+++ b/securis/src/main/webapp/src/app/forms/pack.form.component.ts
@@ -10,6 +10,7 @@
import { TdMediaService } from '@covalent/core';
import { IComboOption, FormBase } from './base';
import { ActivatedRoute, Router } from '@angular/router';
+import { OrganizationsService } from '../resources/organizations';
@@ -25,6 +26,7 @@
constructor(private http: Http,
private licenseTypes: LicenseTypesService,
private packs: PacksService,
+ private orgService: OrganizationsService,
router: Router,
toaster: ToastsManager,
route: ActivatedRoute,
@@ -34,18 +36,19 @@
}
loadCombos(): void {
- this.http.get('api/organization')
- .map(response => response.json().map((org : any) => <IComboOption>{id: org.id, label: `(${org.code}) ${org.name}`}))
- .subscribe(
- data => super.setViewData(() => this.organizations = (<IComboOption[]>data).sort((e1, e2) => e1.label.localeCompare(e2.label))),
- err => console.error('Error loading orgs')
- );
+ this.orgService.get()
+ .map((orgs: any[]) => orgs.map((org: any) => <IComboOption>{id: org.id, label: `(${org.code}) ${org.name}`}))
+ .subscribe(
+ (data: IComboOption[]) => super.setViewData(() => this.organizations = data.sort((e1: IComboOption, e2: IComboOption) => e1.label.localeCompare(e2.label))),
+ (err: any) => console.error('Error loading orgs', err)
+ );
+
this.licenseTypes.get()
- .map(list => list.map((lt : any) => <IComboOption>{id: lt.id, label: `(${lt.code}) ${lt.name}`}))
- .subscribe(
- data => super.setViewData(() => this.licensetypes = (<IComboOption[]>data).sort((e1, e2) => e1.label.localeCompare(e2.label))),
- err => console.error('Error loading license types')
- );
+ .map((list: any[]) => list.map((lt: any) => <IComboOption>{id: lt.id, label: `(${lt.code}) ${lt.name}`}))
+ .subscribe(
+ (data: IComboOption[]) => super.setViewData(() => this.licensetypes = data.sort((e1: IComboOption, e2: IComboOption) => e1.label.localeCompare(e2.label))),
+ (err: any) => console.error('Error loading license types', err)
+ );
}
goLicenses(): void {
diff --git a/securis/src/main/webapp/src/app/listing/application.list.component.ts b/securis/src/main/webapp/src/app/listing/application.list.component.ts
index e4d5469..4802296 100644
--- a/securis/src/main/webapp/src/app/listing/application.list.component.ts
+++ b/securis/src/main/webapp/src/app/listing/application.list.component.ts
@@ -11,7 +11,6 @@
import { Component, ViewChild, AfterViewInit } from '@angular/core';
import { TdMediaService } from '@covalent/core';
import { ApplicationsService } from '../resources/applications';
-import { PackFormComponent } from '../forms/pack.form.component';
import { LocaleService } from '../common/i18n';
import { ListingBase } from './base';
@@ -56,7 +55,6 @@
private media: TdMediaService,
private router: Router,
private $L: LocaleService,
- private applicationForm: PackFormComponent,
private applications: ApplicationsService) {
super(_dataTableService);
this.applications.get().subscribe(
diff --git a/securis/src/main/webapp/src/app/listing/licensetype.list.component.ts b/securis/src/main/webapp/src/app/listing/licensetype.list.component.ts
index 17d51de..e6a9980 100644
--- a/securis/src/main/webapp/src/app/listing/licensetype.list.component.ts
+++ b/securis/src/main/webapp/src/app/listing/licensetype.list.component.ts
@@ -11,7 +11,6 @@
import { Component, ViewChild, AfterViewInit } from '@angular/core';
import { TdMediaService } from '@covalent/core';
import { LicenseTypesService } from '../resources/license_types';
-import { PackFormComponent } from '../forms/pack.form.component';
import { LocaleService } from '../common/i18n';
import { ListingBase } from './base';
@@ -53,7 +52,6 @@
private media: TdMediaService,
private router: Router,
private $L: LocaleService,
- private applicationForm: PackFormComponent,
private licensetypes: LicenseTypesService) {
super(_dataTableService);
this.licensetypes.get().subscribe(
diff --git a/securis/src/main/webapp/src/app/listing/organization.list.component.ts b/securis/src/main/webapp/src/app/listing/organization.list.component.ts
index 9aebd5c..51d979f 100644
--- a/securis/src/main/webapp/src/app/listing/organization.list.component.ts
+++ b/securis/src/main/webapp/src/app/listing/organization.list.component.ts
@@ -11,7 +11,6 @@
import { Component, ViewChild, AfterViewInit } from '@angular/core';
import { TdMediaService } from '@covalent/core';
import { OrganizationsService } from '../resources/organizations';
-import { PackFormComponent } from '../forms/pack.form.component';
import { LocaleService } from '../common/i18n';
import { ListingBase } from './base';
@@ -52,7 +51,6 @@
private media: TdMediaService,
private router: Router,
private $L: LocaleService,
- private applicationForm: PackFormComponent,
private organizations: OrganizationsService) {
super(_dataTableService);
this.organizations.get().subscribe(
diff --git a/securis/src/main/webapp/src/app/listing/pack.list.component.ts b/securis/src/main/webapp/src/app/listing/pack.list.component.ts
index 0d92901..44529d3 100644
--- a/securis/src/main/webapp/src/app/listing/pack.list.component.ts
+++ b/securis/src/main/webapp/src/app/listing/pack.list.component.ts
@@ -10,12 +10,13 @@
TdPagingBarComponent
} from '@covalent/core';
import { IPageChangeEvent } from '@covalent/core';
-import { Component, ViewChild, AfterViewInit } from '@angular/core';
-import { TdMediaService } from '@covalent/core';
+import { Component, ViewChild, AfterViewInit, Inject } from '@angular/core';
+import { TdMediaService} from '@covalent/core';
import { PacksService, PACK_ACTIONS, PacksFilter } from '../resources/packs';
import { PackFormComponent } from '../forms/pack.form.component';
import { LocaleService } from '../common/i18n';
import { ListingBase } from './base';
+import { Injector } from '@angular/core';
/**
var pack_example = {
@@ -53,6 +54,8 @@
})
export class PackListComponent extends ListingBase implements AfterViewInit {
+ private packs: PacksService;
+
columns: ITdDataTableColumn[] = [
{ name: 'code', label: 'Code', tooltip: 'License pack code' },
{ name: 'application_name', label: 'App name' },
@@ -67,16 +70,16 @@
filter_description : string;
prevUrl : string = null;
- constructor(_dataTableService: TdDataTableService,
+ constructor(private injector: Injector,
+ _dataTableService: TdDataTableService,
private media: TdMediaService,
private router: Router,
private route: ActivatedRoute,
private dialog: MdDialog,
private $L: LocaleService,
- private toaster: ToastsManager,
- private packForm: PackFormComponent,
- private packs: PacksService) {
- super(_dataTableService);
+ private toaster: ToastsManager) {
+ super(_dataTableService);
+ this.packs = this.injector.get(PacksService);
}
reload(filter?: PacksFilter) : void {
diff --git a/securis/src/main/webapp/src/app/listing/user.list.component.ts b/securis/src/main/webapp/src/app/listing/user.list.component.ts
index cd26bf6..245de7f 100644
--- a/securis/src/main/webapp/src/app/listing/user.list.component.ts
+++ b/securis/src/main/webapp/src/app/listing/user.list.component.ts
@@ -11,7 +11,6 @@
import { Component, ViewChild, AfterViewInit } from '@angular/core';
import { TdMediaService } from '@covalent/core';
import { UsersService } from '../resources/users';
-import { PackFormComponent } from '../forms/pack.form.component';
import { LocaleService } from '../common/i18n';
import { ListingBase } from './base';
@@ -53,7 +52,6 @@
private media: TdMediaService,
private router: Router,
private $L: LocaleService,
- private applicationForm: PackFormComponent,
private users: UsersService) {
super(_dataTableService);
this.users.get().subscribe(
diff --git a/securis/src/main/webapp/src/app/resources/base.ts b/securis/src/main/webapp/src/app/resources/base.ts
index 3f5f39d..4c29a11 100644
--- a/securis/src/main/webapp/src/app/resources/base.ts
+++ b/securis/src/main/webapp/src/app/resources/base.ts
@@ -3,6 +3,7 @@
import { Observable } from 'rxjs/Observable';
import { Http, RequestOptionsArgs, URLSearchParams, Headers } from '@angular/http';
import { Locker } from 'angular-safeguard';
+import { Injectable } from '@angular/core';
export class MySearchParams extends URLSearchParams {
@@ -12,6 +13,7 @@
}
}
+@Injectable()
export class SeCurisResourceServices extends BasicService {
constructor($L: LocaleService,
protected http: Http,
diff --git a/securis/src/main/webapp/src/tsconfig.json b/securis/src/main/webapp/src/tsconfig.json
index 2c7260d..99f35dc 100644
--- a/securis/src/main/webapp/src/tsconfig.json
+++ b/securis/src/main/webapp/src/tsconfig.json
@@ -7,7 +7,7 @@
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [ "es2015", "dom" ],
- "noImplicitAny": true,
+ "noImplicitAny": false,
"suppressImplicitAnyIndexErrors": true
}
}
--
Gitblit v1.3.2