Joaquín Reñé
4 hours ago c5b1e27a77081717f37942de8dacfa5c2e30b09d
#4479 - upgrade SecurisServer to Java 21
9 files modified
changed files
securis/src/main/webapp/src/app/app.module.ts patch | view | blame | history
securis/src/main/webapp/src/app/forms/pack.form.component.ts patch | view | blame | history
securis/src/main/webapp/src/app/listing/application.list.component.ts patch | view | blame | history
securis/src/main/webapp/src/app/listing/licensetype.list.component.ts patch | view | blame | history
securis/src/main/webapp/src/app/listing/organization.list.component.ts patch | view | blame | history
securis/src/main/webapp/src/app/listing/pack.list.component.ts patch | view | blame | history
securis/src/main/webapp/src/app/listing/user.list.component.ts patch | view | blame | history
securis/src/main/webapp/src/app/resources/base.ts patch | view | blame | history
securis/src/main/webapp/src/tsconfig.json patch | view | blame | history
securis/src/main/webapp/src/app/app.module.ts
....@@ -100,15 +100,11 @@
100100 bootstrap: [ HomeComponent ],
101101 entryComponents: [ ],
102102 providers: [
103
+ LocaleService,
103104 SeCurisSession,
104105 UserService,
105106 PacksService,
106107 LicensesService,
107
- PackFormComponent,
108
- LicenseFormComponent,
109
- LicenseTypeFormComponent,
110
- OrganizationFormComponent,
111
- UserFormComponent,
112108 ApplicationsService,
113109 OrganizationsService,
114110 LicenseTypesService,
securis/src/main/webapp/src/app/forms/pack.form.component.ts
....@@ -10,6 +10,7 @@
1010 import { TdMediaService } from '@covalent/core';
1111 import { IComboOption, FormBase } from './base';
1212 import { ActivatedRoute, Router } from '@angular/router';
13
+import { OrganizationsService } from '../resources/organizations';
1314
1415
1516
....@@ -25,6 +26,7 @@
2526 constructor(private http: Http,
2627 private licenseTypes: LicenseTypesService,
2728 private packs: PacksService,
29
+ private orgService: OrganizationsService,
2830 router: Router,
2931 toaster: ToastsManager,
3032 route: ActivatedRoute,
....@@ -34,18 +36,19 @@
3436 }
3537
3638 loadCombos(): void {
37
- this.http.get('api/organization')
38
- .map(response => response.json().map((org : any) => <IComboOption>{id: org.id, label: `(${org.code}) ${org.name}`}))
39
- .subscribe(
40
- data => super.setViewData(() => this.organizations = (<IComboOption[]>data).sort((e1, e2) => e1.label.localeCompare(e2.label))),
41
- err => console.error('Error loading orgs')
42
- );
39
+ this.orgService.get()
40
+ .map((orgs: any[]) => orgs.map((org: any) => <IComboOption>{id: org.id, label: `(${org.code}) ${org.name}`}))
41
+ .subscribe(
42
+ (data: IComboOption[]) => super.setViewData(() => this.organizations = data.sort((e1: IComboOption, e2: IComboOption) => e1.label.localeCompare(e2.label))),
43
+ (err: any) => console.error('Error loading orgs', err)
44
+ );
45
+
4346 this.licenseTypes.get()
44
- .map(list => list.map((lt : any) => <IComboOption>{id: lt.id, label: `(${lt.code}) ${lt.name}`}))
45
- .subscribe(
46
- data => super.setViewData(() => this.licensetypes = (<IComboOption[]>data).sort((e1, e2) => e1.label.localeCompare(e2.label))),
47
- err => console.error('Error loading license types')
48
- );
47
+ .map((list: any[]) => list.map((lt: any) => <IComboOption>{id: lt.id, label: `(${lt.code}) ${lt.name}`}))
48
+ .subscribe(
49
+ (data: IComboOption[]) => super.setViewData(() => this.licensetypes = data.sort((e1: IComboOption, e2: IComboOption) => e1.label.localeCompare(e2.label))),
50
+ (err: any) => console.error('Error loading license types', err)
51
+ );
4952 }
5053
5154 goLicenses(): void {
securis/src/main/webapp/src/app/listing/application.list.component.ts
....@@ -11,7 +11,6 @@
1111 import { Component, ViewChild, AfterViewInit } from '@angular/core';
1212 import { TdMediaService } from '@covalent/core';
1313 import { ApplicationsService } from '../resources/applications';
14
-import { PackFormComponent } from '../forms/pack.form.component';
1514 import { LocaleService } from '../common/i18n';
1615 import { ListingBase } from './base';
1716
....@@ -56,7 +55,6 @@
5655 private media: TdMediaService,
5756 private router: Router,
5857 private $L: LocaleService,
59
- private applicationForm: PackFormComponent,
6058 private applications: ApplicationsService) {
6159 super(_dataTableService);
6260 this.applications.get().subscribe(
securis/src/main/webapp/src/app/listing/licensetype.list.component.ts
....@@ -11,7 +11,6 @@
1111 import { Component, ViewChild, AfterViewInit } from '@angular/core';
1212 import { TdMediaService } from '@covalent/core';
1313 import { LicenseTypesService } from '../resources/license_types';
14
-import { PackFormComponent } from '../forms/pack.form.component';
1514 import { LocaleService } from '../common/i18n';
1615 import { ListingBase } from './base';
1716
....@@ -53,7 +52,6 @@
5352 private media: TdMediaService,
5453 private router: Router,
5554 private $L: LocaleService,
56
- private applicationForm: PackFormComponent,
5755 private licensetypes: LicenseTypesService) {
5856 super(_dataTableService);
5957 this.licensetypes.get().subscribe(
securis/src/main/webapp/src/app/listing/organization.list.component.ts
....@@ -11,7 +11,6 @@
1111 import { Component, ViewChild, AfterViewInit } from '@angular/core';
1212 import { TdMediaService } from '@covalent/core';
1313 import { OrganizationsService } from '../resources/organizations';
14
-import { PackFormComponent } from '../forms/pack.form.component';
1514 import { LocaleService } from '../common/i18n';
1615 import { ListingBase } from './base';
1716
....@@ -52,7 +51,6 @@
5251 private media: TdMediaService,
5352 private router: Router,
5453 private $L: LocaleService,
55
- private applicationForm: PackFormComponent,
5654 private organizations: OrganizationsService) {
5755 super(_dataTableService);
5856 this.organizations.get().subscribe(
securis/src/main/webapp/src/app/listing/pack.list.component.ts
....@@ -10,12 +10,13 @@
1010 TdPagingBarComponent
1111 } from '@covalent/core';
1212 import { IPageChangeEvent } from '@covalent/core';
13
-import { Component, ViewChild, AfterViewInit } from '@angular/core';
14
-import { TdMediaService } from '@covalent/core';
13
+import { Component, ViewChild, AfterViewInit, Inject } from '@angular/core';
14
+import { TdMediaService} from '@covalent/core';
1515 import { PacksService, PACK_ACTIONS, PacksFilter } from '../resources/packs';
1616 import { PackFormComponent } from '../forms/pack.form.component';
1717 import { LocaleService } from '../common/i18n';
1818 import { ListingBase } from './base';
19
+import { Injector } from '@angular/core';
1920
2021 /**
2122 var pack_example = {
....@@ -53,6 +54,8 @@
5354 })
5455 export class PackListComponent extends ListingBase implements AfterViewInit {
5556
57
+ private packs: PacksService;
58
+
5659 columns: ITdDataTableColumn[] = [
5760 { name: 'code', label: 'Code', tooltip: 'License pack code' },
5861 { name: 'application_name', label: 'App name' },
....@@ -67,16 +70,16 @@
6770 filter_description : string;
6871 prevUrl : string = null;
6972
70
- constructor(_dataTableService: TdDataTableService,
73
+ constructor(private injector: Injector,
74
+ _dataTableService: TdDataTableService,
7175 private media: TdMediaService,
7276 private router: Router,
7377 private route: ActivatedRoute,
7478 private dialog: MdDialog,
7579 private $L: LocaleService,
76
- private toaster: ToastsManager,
77
- private packForm: PackFormComponent,
78
- private packs: PacksService) {
79
- super(_dataTableService);
80
+ private toaster: ToastsManager) {
81
+ super(_dataTableService);
82
+ this.packs = this.injector.get(PacksService);
8083 }
8184
8285 reload(filter?: PacksFilter) : void {
securis/src/main/webapp/src/app/listing/user.list.component.ts
....@@ -11,7 +11,6 @@
1111 import { Component, ViewChild, AfterViewInit } from '@angular/core';
1212 import { TdMediaService } from '@covalent/core';
1313 import { UsersService } from '../resources/users';
14
-import { PackFormComponent } from '../forms/pack.form.component';
1514 import { LocaleService } from '../common/i18n';
1615 import { ListingBase } from './base';
1716
....@@ -53,7 +52,6 @@
5352 private media: TdMediaService,
5453 private router: Router,
5554 private $L: LocaleService,
56
- private applicationForm: PackFormComponent,
5755 private users: UsersService) {
5856 super(_dataTableService);
5957 this.users.get().subscribe(
securis/src/main/webapp/src/app/resources/base.ts
....@@ -3,6 +3,7 @@
33 import { Observable } from 'rxjs/Observable';
44 import { Http, RequestOptionsArgs, URLSearchParams, Headers } from '@angular/http';
55 import { Locker } from 'angular-safeguard';
6
+import { Injectable } from '@angular/core';
67
78
89 export class MySearchParams extends URLSearchParams {
....@@ -12,6 +13,7 @@
1213 }
1314 }
1415
16
+@Injectable()
1517 export class SeCurisResourceServices extends BasicService {
1618 constructor($L: LocaleService,
1719 protected http: Http,
securis/src/main/webapp/src/tsconfig.json
....@@ -7,7 +7,7 @@
77 "emitDecoratorMetadata": true,
88 "experimentalDecorators": true,
99 "lib": [ "es2015", "dom" ],
10
- "noImplicitAny": true,
10
+ "noImplicitAny": false,
1111 "suppressImplicitAnyIndexErrors": true
1212 }
1313 }