From dd2138ac5e6067de310e83d16fccc9b9764ba3ff Mon Sep 17 00:00:00 2001 From: Mihajlo Medjedovic Date: Mon, 8 Jul 2024 10:15:24 +0200 Subject: [PATCH] fix: added appLoc to the system page --- client/src/app/services/app.service.ts | 11 +++++--- .../system/models/environment-info.model.ts | 27 ++++++++++--------- client/src/app/system/system.component.html | 4 +++ client/src/app/system/system.component.ts | 2 +- 4 files changed, 27 insertions(+), 17 deletions(-) diff --git a/client/src/app/services/app.service.ts b/client/src/app/services/app.service.ts index ff08556..330b9aa 100644 --- a/client/src/app/services/app.service.ts +++ b/client/src/app/services/app.service.ts @@ -10,11 +10,12 @@ import { LicenceService } from './licence.service' import { AppSettingsService } from './app-settings.service' import { AppThemes } from '../models/AppSettings' import { RequestWrapperResponse } from '../models/request-wrapper/RequestWrapperResponse' +import { AppStoreService } from './app-store.service' @Injectable() export class AppService { public syssite = new BehaviorSubject(null) - private environmentInfo: EnvironmentInfo | null = null + private environmentInfo: EnvironmentInfo = {} constructor( private licenceService: LicenceService, @@ -22,7 +23,8 @@ export class AppService { private sasService: SasService, private loggerService: LoggerService, private appSettingsService: AppSettingsService, - private router: Router + private router: Router, + private appStoreService: AppStoreService ) { this.subscribe() @@ -107,6 +109,8 @@ export class AppService { return } + const dcAdapterSettings = this.appStoreService.getDcAdapterSettings() + this.environmentInfo = { SYSSITE: res.adapterResponse.SYSSITE, SYSSCPL: res.adapterResponse.SYSSCPL, @@ -120,7 +124,8 @@ export class AppService { SYSENCODING: res.adapterResponse.SYSENCODING, AUTOEXEC: res.adapterResponse.AUTOEXEC, ISADMIN: res.adapterResponse.globvars[0].ISADMIN, - DC_ADMIN_GROUP: res.adapterResponse.globvars[0].DC_ADMIN_GROUP + DC_ADMIN_GROUP: res.adapterResponse.globvars[0].DC_ADMIN_GROUP, + APP_LOC: dcAdapterSettings?.appLoc } let libs = res.adapterResponse.sasdatasets diff --git a/client/src/app/system/models/environment-info.model.ts b/client/src/app/system/models/environment-info.model.ts index 4dcae15..c550cf8 100644 --- a/client/src/app/system/models/environment-info.model.ts +++ b/client/src/app/system/models/environment-info.model.ts @@ -1,15 +1,16 @@ export interface EnvironmentInfo { - SYSSITE: string - SYSSCPL: string - SYSTCPIPHOSTNAME: string - SYSVLONG: string - MEMSIZE: string - SYSPROCESSMODE: string - SYSHOSTNAME: string - SYSUSERID: string - SYSHOSTINFOLONG: string - SYSENCODING: string - AUTOEXEC: string - ISADMIN: number - DC_ADMIN_GROUP: string + SYSSITE?: string + SYSSCPL?: string + SYSTCPIPHOSTNAME?: string + SYSVLONG?: string + MEMSIZE?: string + SYSPROCESSMODE?: string + SYSHOSTNAME?: string + SYSUSERID?: string + SYSHOSTINFOLONG?: string + SYSENCODING?: string + AUTOEXEC?: string + ISADMIN?: number + DC_ADMIN_GROUP?: string + APP_LOC?: string } diff --git a/client/src/app/system/system.component.html b/client/src/app/system/system.component.html index 33691af..2a8763b 100644 --- a/client/src/app/system/system.component.html +++ b/client/src/app/system/system.component.html @@ -77,6 +77,10 @@ DC Admin Group: {{ environmentInfo?.DC_ADMIN_GROUP }}

+

+ App Location: + {{ environmentInfo?.APP_LOC }} +

diff --git a/client/src/app/system/system.component.ts b/client/src/app/system/system.component.ts index 58dbbb7..b294782 100644 --- a/client/src/app/system/system.component.ts +++ b/client/src/app/system/system.component.ts @@ -52,7 +52,7 @@ export class SystemComponent implements OnInit { this.environmentInfo = this.appService.getEnvironmentInfo() this.settings = this.appSettingsService.settings.value - if (this.environmentInfo) { + if (this.environmentInfo.AUTOEXEC) { this.environmentInfo.AUTOEXEC = decodeURIComponent( this.environmentInfo.AUTOEXEC )