fix: added appLoc to the system page

This commit is contained in:
Mihajlo Medjedovic 2024-07-08 10:15:24 +02:00
parent ddc22e5200
commit dd2138ac5e
4 changed files with 27 additions and 17 deletions

View File

@ -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<string[] | null>(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

View File

@ -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
}

View File

@ -77,6 +77,10 @@
DC Admin Group:
<span class="dark">{{ environmentInfo?.DC_ADMIN_GROUP }}</span>
</p>
<p cds-text="label" class="m-0">
App Location:
<span class="dark">{{ environmentInfo?.APP_LOC }}</span>
</p>
</div>
</div>

View File

@ -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
)