#4479 - upgrade SecurisServer to Java 21
| .. | .. |
|---|
| 100 | 100 | bootstrap: [ HomeComponent ], |
|---|
| 101 | 101 | entryComponents: [ ], |
|---|
| 102 | 102 | providers: [ |
|---|
| 103 | + LocaleService, |
|---|
| 103 | 104 | SeCurisSession, |
|---|
| 104 | 105 | UserService, |
|---|
| 105 | 106 | PacksService, |
|---|
| 106 | 107 | LicensesService, |
|---|
| 107 | | - PackFormComponent, |
|---|
| 108 | | - LicenseFormComponent, |
|---|
| 109 | | - LicenseTypeFormComponent, |
|---|
| 110 | | - OrganizationFormComponent, |
|---|
| 111 | | - UserFormComponent, |
|---|
| 112 | 108 | ApplicationsService, |
|---|
| 113 | 109 | OrganizationsService, |
|---|
| 114 | 110 | LicenseTypesService, |
|---|
| .. | .. |
|---|
| 10 | 10 | import { TdMediaService } from '@covalent/core'; |
|---|
| 11 | 11 | import { IComboOption, FormBase } from './base'; |
|---|
| 12 | 12 | import { ActivatedRoute, Router } from '@angular/router'; |
|---|
| 13 | +import { OrganizationsService } from '../resources/organizations'; |
|---|
| 13 | 14 | |
|---|
| 14 | 15 | |
|---|
| 15 | 16 | |
|---|
| .. | .. |
|---|
| 25 | 26 | constructor(private http: Http, |
|---|
| 26 | 27 | private licenseTypes: LicenseTypesService, |
|---|
| 27 | 28 | private packs: PacksService, |
|---|
| 29 | + private orgService: OrganizationsService, |
|---|
| 28 | 30 | router: Router, |
|---|
| 29 | 31 | toaster: ToastsManager, |
|---|
| 30 | 32 | route: ActivatedRoute, |
|---|
| .. | .. |
|---|
| 34 | 36 | } |
|---|
| 35 | 37 | |
|---|
| 36 | 38 | 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 | + |
|---|
| 43 | 46 | 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 | + ); |
|---|
| 49 | 52 | } |
|---|
| 50 | 53 | |
|---|
| 51 | 54 | goLicenses(): void { |
|---|
| .. | .. |
|---|
| 11 | 11 | import { Component, ViewChild, AfterViewInit } from '@angular/core'; |
|---|
| 12 | 12 | import { TdMediaService } from '@covalent/core'; |
|---|
| 13 | 13 | import { ApplicationsService } from '../resources/applications'; |
|---|
| 14 | | -import { PackFormComponent } from '../forms/pack.form.component'; |
|---|
| 15 | 14 | import { LocaleService } from '../common/i18n'; |
|---|
| 16 | 15 | import { ListingBase } from './base'; |
|---|
| 17 | 16 | |
|---|
| .. | .. |
|---|
| 56 | 55 | private media: TdMediaService, |
|---|
| 57 | 56 | private router: Router, |
|---|
| 58 | 57 | private $L: LocaleService, |
|---|
| 59 | | - private applicationForm: PackFormComponent, |
|---|
| 60 | 58 | private applications: ApplicationsService) { |
|---|
| 61 | 59 | super(_dataTableService); |
|---|
| 62 | 60 | this.applications.get().subscribe( |
|---|
| .. | .. |
|---|
| 11 | 11 | import { Component, ViewChild, AfterViewInit } from '@angular/core'; |
|---|
| 12 | 12 | import { TdMediaService } from '@covalent/core'; |
|---|
| 13 | 13 | import { LicenseTypesService } from '../resources/license_types'; |
|---|
| 14 | | -import { PackFormComponent } from '../forms/pack.form.component'; |
|---|
| 15 | 14 | import { LocaleService } from '../common/i18n'; |
|---|
| 16 | 15 | import { ListingBase } from './base'; |
|---|
| 17 | 16 | |
|---|
| .. | .. |
|---|
| 53 | 52 | private media: TdMediaService, |
|---|
| 54 | 53 | private router: Router, |
|---|
| 55 | 54 | private $L: LocaleService, |
|---|
| 56 | | - private applicationForm: PackFormComponent, |
|---|
| 57 | 55 | private licensetypes: LicenseTypesService) { |
|---|
| 58 | 56 | super(_dataTableService); |
|---|
| 59 | 57 | this.licensetypes.get().subscribe( |
|---|
| .. | .. |
|---|
| 11 | 11 | import { Component, ViewChild, AfterViewInit } from '@angular/core'; |
|---|
| 12 | 12 | import { TdMediaService } from '@covalent/core'; |
|---|
| 13 | 13 | import { OrganizationsService } from '../resources/organizations'; |
|---|
| 14 | | -import { PackFormComponent } from '../forms/pack.form.component'; |
|---|
| 15 | 14 | import { LocaleService } from '../common/i18n'; |
|---|
| 16 | 15 | import { ListingBase } from './base'; |
|---|
| 17 | 16 | |
|---|
| .. | .. |
|---|
| 52 | 51 | private media: TdMediaService, |
|---|
| 53 | 52 | private router: Router, |
|---|
| 54 | 53 | private $L: LocaleService, |
|---|
| 55 | | - private applicationForm: PackFormComponent, |
|---|
| 56 | 54 | private organizations: OrganizationsService) { |
|---|
| 57 | 55 | super(_dataTableService); |
|---|
| 58 | 56 | this.organizations.get().subscribe( |
|---|
| .. | .. |
|---|
| 10 | 10 | TdPagingBarComponent |
|---|
| 11 | 11 | } from '@covalent/core'; |
|---|
| 12 | 12 | 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'; |
|---|
| 15 | 15 | import { PacksService, PACK_ACTIONS, PacksFilter } from '../resources/packs'; |
|---|
| 16 | 16 | import { PackFormComponent } from '../forms/pack.form.component'; |
|---|
| 17 | 17 | import { LocaleService } from '../common/i18n'; |
|---|
| 18 | 18 | import { ListingBase } from './base'; |
|---|
| 19 | +import { Injector } from '@angular/core'; |
|---|
| 19 | 20 | |
|---|
| 20 | 21 | /** |
|---|
| 21 | 22 | var pack_example = { |
|---|
| .. | .. |
|---|
| 53 | 54 | }) |
|---|
| 54 | 55 | export class PackListComponent extends ListingBase implements AfterViewInit { |
|---|
| 55 | 56 | |
|---|
| 57 | + private packs: PacksService; |
|---|
| 58 | + |
|---|
| 56 | 59 | columns: ITdDataTableColumn[] = [ |
|---|
| 57 | 60 | { name: 'code', label: 'Code', tooltip: 'License pack code' }, |
|---|
| 58 | 61 | { name: 'application_name', label: 'App name' }, |
|---|
| .. | .. |
|---|
| 67 | 70 | filter_description : string; |
|---|
| 68 | 71 | prevUrl : string = null; |
|---|
| 69 | 72 | |
|---|
| 70 | | - constructor(_dataTableService: TdDataTableService, |
|---|
| 73 | + constructor(private injector: Injector, |
|---|
| 74 | + _dataTableService: TdDataTableService, |
|---|
| 71 | 75 | private media: TdMediaService, |
|---|
| 72 | 76 | private router: Router, |
|---|
| 73 | 77 | private route: ActivatedRoute, |
|---|
| 74 | 78 | private dialog: MdDialog, |
|---|
| 75 | 79 | 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); |
|---|
| 80 | 83 | } |
|---|
| 81 | 84 | |
|---|
| 82 | 85 | reload(filter?: PacksFilter) : void { |
|---|
| .. | .. |
|---|
| 11 | 11 | import { Component, ViewChild, AfterViewInit } from '@angular/core'; |
|---|
| 12 | 12 | import { TdMediaService } from '@covalent/core'; |
|---|
| 13 | 13 | import { UsersService } from '../resources/users'; |
|---|
| 14 | | -import { PackFormComponent } from '../forms/pack.form.component'; |
|---|
| 15 | 14 | import { LocaleService } from '../common/i18n'; |
|---|
| 16 | 15 | import { ListingBase } from './base'; |
|---|
| 17 | 16 | |
|---|
| .. | .. |
|---|
| 53 | 52 | private media: TdMediaService, |
|---|
| 54 | 53 | private router: Router, |
|---|
| 55 | 54 | private $L: LocaleService, |
|---|
| 56 | | - private applicationForm: PackFormComponent, |
|---|
| 57 | 55 | private users: UsersService) { |
|---|
| 58 | 56 | super(_dataTableService); |
|---|
| 59 | 57 | this.users.get().subscribe( |
|---|
| .. | .. |
|---|
| 3 | 3 | import { Observable } from 'rxjs/Observable'; |
|---|
| 4 | 4 | import { Http, RequestOptionsArgs, URLSearchParams, Headers } from '@angular/http'; |
|---|
| 5 | 5 | import { Locker } from 'angular-safeguard'; |
|---|
| 6 | +import { Injectable } from '@angular/core'; |
|---|
| 6 | 7 | |
|---|
| 7 | 8 | |
|---|
| 8 | 9 | export class MySearchParams extends URLSearchParams { |
|---|
| .. | .. |
|---|
| 12 | 13 | } |
|---|
| 13 | 14 | } |
|---|
| 14 | 15 | |
|---|
| 16 | +@Injectable() |
|---|
| 15 | 17 | export class SeCurisResourceServices extends BasicService { |
|---|
| 16 | 18 | constructor($L: LocaleService, |
|---|
| 17 | 19 | protected http: Http, |
|---|
| .. | .. |
|---|
| 7 | 7 | "emitDecoratorMetadata": true, |
|---|
| 8 | 8 | "experimentalDecorators": true, |
|---|
| 9 | 9 | "lib": [ "es2015", "dom" ], |
|---|
| 10 | | - "noImplicitAny": true, |
|---|
| 10 | + "noImplicitAny": false, |
|---|
| 11 | 11 | "suppressImplicitAnyIndexErrors": true |
|---|
| 12 | 12 | } |
|---|
| 13 | 13 | } |
|---|