Skip to content

Commit

Permalink
Display port link details including the status, width and speed in th…
Browse files Browse the repository at this point in the history
…e LinkStatus column (#22)

* feat: display port link details include the status, width and speed

* feat: handle the Linkup status not LinkDown status

* fix: handle the format for LinkStatus
  • Loading branch information
Meng-20 authored Aug 7, 2024
1 parent cb0d6c2 commit 8042876
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions webui/src/components/Stores/BladePortStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ export const useBladePortStore = defineStore('bladePort', {
detailsResponse.data.linkedPortUri = "NOT_FOUND";
}

// Combine LinkStatus, linkWidth and linkSpeed if the port is linked up
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
}

// Store port in ports list
this.bladePorts.push(detailsResponse.data);
}
Expand Down

0 comments on commit 8042876

Please sign in to comment.