From 78372d6345cf5f1e04d6a8d56c416a7aec70b998 Mon Sep 17 00:00:00 2001 From: Xiaochao Ma Date: Tue, 8 Mar 2022 20:13:00 +0800 Subject: SOL: fix socket close exception When the sol page is opened, a socket is opened; when the sol page is closed, the socket is not closed (console print is also exception). It only closes when you log out. Fix this condition to 'close socket when SOL page is exited'. test: Enter the SOL page-->console print'websocket console0/ opened' -->close the SOL page -->console print'websocket console0/ closed. code: 1000 reason: ' Signed-off-by: Xiaochao Ma Change-Id: I0f406c2085aec303d6e5139d57b31ed6f244a155 --- .../SerialOverLan/SerialOverLanConsole.vue | 26 ++++++++++++++-------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/src/views/Operations/SerialOverLan/SerialOverLanConsole.vue b/src/views/Operations/SerialOverLan/SerialOverLanConsole.vue index ce8549df..694083fd 100644 --- a/src/views/Operations/SerialOverLan/SerialOverLanConsole.vue +++ b/src/views/Operations/SerialOverLan/SerialOverLanConsole.vue @@ -85,37 +85,38 @@ export default { }, beforeDestroy() { window.removeEventListener('resize', this.resizeConsoleWindow); + this.closeTerminal(); }, methods: { openTerminal() { const token = this.$store.getters['authentication/token']; - const ws = new WebSocket(`wss://${window.location.host}/console0`, [ + this.ws = new WebSocket(`wss://${window.location.host}/console0`, [ token, ]); // Refer https://github.com/xtermjs/xterm.js/ for xterm implementation and addons. - const term = new Terminal({ + this.term = new Terminal({ fontSize: 15, fontFamily: 'SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace', }); - const attachAddon = new AttachAddon(ws); - term.loadAddon(attachAddon); + const attachAddon = new AttachAddon(this.ws); + this.term.loadAddon(attachAddon); const fitAddon = new FitAddon(); - term.loadAddon(fitAddon); + this.term.loadAddon(fitAddon); const SOL_THEME = { background: '#19273c', cursor: 'rgba(83, 146, 255, .5)', scrollbar: 'rgba(83, 146, 255, .5)', }; - term.setOption('theme', SOL_THEME); + this.term.setOption('theme', SOL_THEME); - term.open(this.$refs.panel); + this.term.open(this.$refs.panel); fitAddon.fit(); this.resizeConsoleWindow = throttle(() => { @@ -124,10 +125,10 @@ export default { window.addEventListener('resize', this.resizeConsoleWindow); try { - ws.onopen = function () { + this.ws.onopen = function () { console.log('websocket console0/ opened'); }; - ws.onclose = function (event) { + this.ws.onclose = function (event) { console.log( 'websocket console0/ closed. code: ' + event.code + @@ -139,6 +140,13 @@ export default { console.log(error); } }, + closeTerminal() { + console.log('closeTerminal'); + this.term.dispose(); + this.term = null; + this.ws.close(); + this.ws = null; + }, openConsoleWindow() { window.open( '#/console/serial-over-lan-console', -- cgit v1.2.3 From fedc7344df80d87050966a4903f7aff32fddd259 Mon Sep 17 00:00:00 2001 From: MichalX Szopinski Date: Fri, 25 Feb 2022 17:07:53 +0100 Subject: Add missing Model mapping to Chassis Store Add missing "model" mapping on "Hardware status" tab in chassis section. Signed-off-by: MichalX Szopinski Change-Id: I9a6bd4a7e4fbaaac72aa8d59cc065ba0bea040bd --- src/store/modules/HardwareStatus/ChassisStore.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/store/modules/HardwareStatus/ChassisStore.js b/src/store/modules/HardwareStatus/ChassisStore.js index 8a08e370..97930d2e 100644 --- a/src/store/modules/HardwareStatus/ChassisStore.js +++ b/src/store/modules/HardwareStatus/ChassisStore.js @@ -22,6 +22,7 @@ const ChassisStore = { PowerState, LocationIndicatorActive, AssetTag, + Model, MaxPowerWatts, MinPowerWatts, Name, @@ -39,6 +40,7 @@ const ChassisStore = { statusState: Status.State, healthRollup: Status.HealthRollup, assetTag: AssetTag, + model: Model, maxPowerWatts: MaxPowerWatts, minPowerWatts: MinPowerWatts, name: Name, -- cgit v1.2.3 From e4c78cf3807ac108ac73617ecde552e83326cd86 Mon Sep 17 00:00:00 2001 From: Jiaqing Zhao Date: Thu, 21 Apr 2022 14:17:51 +0800 Subject: Revert "Filtered the IP address to IPv4 on sessions page" In bmcweb/41d61c8 ("Convert IPv4-mapped IPv6 ClientIP back to IPv4"), bmcweb automatically converts IPv4 addresses to IPv4 format, workaround in webui-vue is no longer needed. The original patch also brings issue with displaying IPv6 addresses in Sessions tab. This reverts commit d902aa7b4f98b49d2a20ad8253bc15afd77e9349. Tested: Both IPv4 and IPv6 addresses are displayed correctly in Sessions. Change-Id: Ib56398de51526ee72168b5bf8427278bcb6f9c17 Signed-off-by: Jiaqing Zhao --- src/store/modules/SecurityAndAccess/SessionsStore.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/store/modules/SecurityAndAccess/SessionsStore.js b/src/store/modules/SecurityAndAccess/SessionsStore.js index 37ba9fc2..54607ab6 100644 --- a/src/store/modules/SecurityAndAccess/SessionsStore.js +++ b/src/store/modules/SecurityAndAccess/SessionsStore.js @@ -25,14 +25,10 @@ const SessionsStore = { ) .then((sessionUris) => { const allConnectionsData = sessionUris.map((sessionUri) => { - //For filtering IP address to IPv4 - let filteredIPAddress = sessionUri.data?.ClientOriginIPAddress.slice( - 7 - ); return { clientID: sessionUri.data?.Oem?.OpenBMC.ClientID, username: sessionUri.data?.UserName, - ipAddress: filteredIPAddress, + ipAddress: sessionUri.data?.ClientOriginIPAddress, uri: sessionUri.data['@odata.id'], }; }); -- cgit v1.2.3 From f763cd2e39ffce9b10191402243e8704794f08ff Mon Sep 17 00:00:00 2001 From: Konstantin Aladyshev Date: Fri, 10 Jun 2022 17:01:57 +0300 Subject: RU: Update SOL console page alert message Add russian translations that were missed in a commit 1d9257e5a355bbc0540b70ab2b2d9a17dea6d986 ("Update SOL console page alert message"). Signed-off-by: Konstantin Aladyshev Change-Id: I71219d8d9ac4cc7cd86ef8911863a216f2bbbee9 --- src/locales/ru-RU.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/locales/ru-RU.json b/src/locales/ru-RU.json index 00b540ad..62eb5359 100644 --- a/src/locales/ru-RU.json +++ b/src/locales/ru-RU.json @@ -811,6 +811,9 @@ } }, "pageSerialOverLan": { + "alert": { + "disconnectedAlertMessage" : "Система должна быть включена для соединения" + }, "connected": "Подключено", "disconnected": "Отключено", "openNewTab": "Открыть в новом окне", -- cgit v1.2.3