Skip to content

Commit

Permalink
perf: Add viewAssetOnlineSessionInfo conf
Browse files Browse the repository at this point in the history
  • Loading branch information
w940853815 committed Nov 25, 2024
1 parent b83b505 commit 6848623
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ <h3>{{ "Connect" | translate }} - {{ asset.name | truncatechars:30 }}</h3>
type="submit"
>
{{ "CONNECT"| translate }}
<span *ngIf="protocol && protocol.name === 'rdp'" class="online-num">
<span *ngIf="protocol && protocol.name === 'rdp' && viewAssetOnlineSessionInfo" class="online-num">
({{ 'Current online' | translate }}: {{ onlineNum === null ? '- ' : onlineNum }})
</span>
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export class ElementConnectDialogComponent implements OnInit {
public accountSelected: Account = null;
public connectOption: Object;
public outputData: ConnectData = new ConnectData();
public viewAssetOnlineSessionInfo: boolean = true;
public manualAuthInfo: AuthInfo = new AuthInfo();
public connectMethod: ConnectMethod = new ConnectMethod('Null', '', 'null', 'null');
public preConnectData: ConnectData = new ConnectData();
Expand Down Expand Up @@ -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) {
Expand All @@ -100,6 +102,9 @@ export class ElementConnectDialogComponent implements OnInit {
}

getOnlineNum() {
if (!this.viewAssetOnlineSessionInfo) {
return;
}
if (this.protocol.name !== 'rdp') {
return;
}
Expand Down
1 change: 1 addition & 0 deletions src/app/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,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 {
Expand Down

0 comments on commit 6848623

Please sign in to comment.