MM-61991 Show server hostname in about modal (#29413)

This introduces a new entry in the `Main Menu -> About` modal with the hostname of the currently connected websocket. This will be used to aid debugging issues in clustered environments by showing which node in the cluster is servicing requests for a particular websocket.

This information is only visible in self-managed instances. It will not be visible on cloud instances.
Этот коммит содержится в:
David Krauser
2024-12-06 10:39:36 -05:00
коммит произвёл GitHub
родитель 59b8532a89
Коммит 3224e0d3a2
16 изменённых файлов: 121 добавлений и 3 удалений

Просмотреть файл

@@ -68,6 +68,7 @@ export default class WebSocketClient {
private closeListeners = new Set<CloseListener>();
private connectionId: string | null;
private serverHostname: string | null;
private postedAck: boolean;
constructor() {
@@ -78,6 +79,7 @@ export default class WebSocketClient {
this.connectFailCount = 0;
this.responseCallbacks = {};
this.connectionId = '';
this.serverHostname = '';
this.postedAck = false;
}
@@ -210,6 +212,9 @@ export default class WebSocketClient {
// If it's a fresh connection, we have to set the connectionId regardless.
// And if it's an existing connection, setting it again is harmless, and keeps the code simple.
this.connectionId = msg.data.connection_id;
// Also update the server hostname
this.serverHostname = msg.data.server_hostname;
}
// Now we check for sequence number, and if it does not match,

Просмотреть файл

@@ -94,5 +94,6 @@ export type GlobalState = {
lastConnectAt: number;
lastDisconnectAt: number;
connectionId: string;
serverHostname: string;
};
};