From e86f2fcc7fe6d97cfd6cba48c03029a8b6f7a264 Mon Sep 17 00:00:00 2001 From: wangruidong <940853815@qq.com> Date: Mon, 25 Nov 2024 10:49:05 +0800 Subject: [PATCH] perf: Add viewAssetOnlineSessionInfo conf --- .../connect/connect-dialog/connect-dialog.component.html | 2 +- .../connect/connect-dialog/connect-dialog.component.ts | 5 +++++ src/app/model.ts | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/app/elements/connect/connect-dialog/connect-dialog.component.html b/src/app/elements/connect/connect-dialog/connect-dialog.component.html index 1aa8ab44..9da0b9c6 100644 --- a/src/app/elements/connect/connect-dialog/connect-dialog.component.html +++ b/src/app/elements/connect/connect-dialog/connect-dialog.component.html @@ -73,7 +73,7 @@

{{"Connect" | translate}} - {{ asset.name | truncatechars:30 }}

type="submit" > {{"Connect"| translate}} - + ({{ 'Current online' | translate}}: {{ onlineNum === null ? '- ' : onlineNum }}) diff --git a/src/app/elements/connect/connect-dialog/connect-dialog.component.ts b/src/app/elements/connect/connect-dialog/connect-dialog.component.ts index 34a37865..b9537bd3 100644 --- a/src/app/elements/connect/connect-dialog/connect-dialog.component.ts +++ b/src/app/elements/connect/connect-dialog/connect-dialog.component.ts @@ -24,6 +24,7 @@ export class ElementConnectDialogComponent implements OnInit { public protocols: Array; public accountSelected: Account = null; public connectOption: Object; + public viewAssetOnlineSessionInfo: boolean = true; public outputData: ConnectData = new ConnectData(); public manualAuthInfo: AuthInfo = new AuthInfo(); public connectMethod: ConnectMethod = new ConnectMethod('Null', '', 'null', 'null'); @@ -92,6 +93,7 @@ export class ElementConnectDialogComponent implements OnInit { this.connectMethod = connectMethods[0]; } } + this.viewAssetOnlineSessionInfo = this._settingSvc.globalSetting.VIEW_ASSET_ONLINE_SESSION_INFO } onProtocolChange(protocol) { @@ -100,6 +102,9 @@ export class ElementConnectDialogComponent implements OnInit { } getOnlineNum() { + if (!this.viewAssetOnlineSessionInfo) { + return; + } if (this.protocol.name !== 'rdp') { return; } diff --git a/src/app/model.ts b/src/app/model.ts index 03064867..37f6bcd7 100644 --- a/src/app/model.ts +++ b/src/app/model.ts @@ -273,6 +273,7 @@ export class GlobalSetting { TERMINAL_GRAPHICAL_RESOLUTION: string; CONNECTION_TOKEN_REUSABLE: boolean; CHAT_AI_ENABLED: boolean; + VIEW_ASSET_ONLINE_SESSION_INFO: boolean; } export class Setting {