From c6f9ce5196cfd82ddd4631da80590ce17cfcc9a5 Mon Sep 17 00:00:00 2001 From: Mengling Ding Date: Wed, 31 Jul 2024 18:07:28 -0500 Subject: [PATCH] feat: display port link details include the status, width and speed --- webui/src/components/Stores/BladePortStore.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/webui/src/components/Stores/BladePortStore.ts b/webui/src/components/Stores/BladePortStore.ts index 7f552a7..1cc71d4 100644 --- a/webui/src/components/Stores/BladePortStore.ts +++ b/webui/src/components/Stores/BladePortStore.ts @@ -46,6 +46,14 @@ export const useBladePortStore = defineStore('bladePort', { detailsResponse.data.linkedPortUri = "NOT_FOUND"; } + // Combine LinkStatus, linkWidth and linkSpeed if the port is not linked down + if (detailsResponse.data.linkStatus && detailsResponse.data.linkStatus != "LinkDown") { + const linkeStatus = detailsResponse.data.linkStatus; + const linkSpeed = detailsResponse.data.currentSpeedGbps; + const linkWidth = detailsResponse.data.width; + detailsResponse.data.linkStatus = linkeStatus + "/" + linkWidth + "/" + linkSpeed + } + // Store port in ports list this.bladePorts.push(detailsResponse.data); }