From c464d27e6675f15a3993ec8de33a8486ae850b64 Mon Sep 17 00:00:00 2001 From: Mengling Ding Date: Wed, 31 Jul 2024 18:33:03 -0500 Subject: [PATCH] fix: handle the format for LinkStatus --- webui/src/components/Stores/BladePortStore.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/webui/src/components/Stores/BladePortStore.ts b/webui/src/components/Stores/BladePortStore.ts index eb938d4..3e05129 100644 --- a/webui/src/components/Stores/BladePortStore.ts +++ b/webui/src/components/Stores/BladePortStore.ts @@ -47,8 +47,9 @@ export const useBladePortStore = defineStore('bladePort', { } // Combine LinkStatus, linkWidth and linkSpeed if the port is linked up - if (detailsResponse.data.linkStatus && detailsResponse.data.linkStatus == "LinkUp") { - const linkeStatus = detailsResponse.data.linkStatus; + if (detailsResponse.data.linkStatus && detailsResponse.data.linkStatus == "Link Up") { + //Remove the space in LinkStatus + const linkeStatus = detailsResponse.data.linkStatus.replace(/\s+/g, ''); const linkSpeed = detailsResponse.data.currentSpeedGbps; const linkWidth = detailsResponse.data.width; detailsResponse.data.linkStatus = linkeStatus + "/" + linkWidth + "/" + linkSpeed