Skip to content

Commit

Permalink
fix: handle the format for LinkStatus
Browse files Browse the repository at this point in the history
  • Loading branch information
Meng-20 committed Jul 31, 2024
1 parent 7c22b40 commit c464d27
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions webui/src/components/Stores/BladePortStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c464d27

Please sign in to comment.