Skip to content

Commit

Permalink
feat: display port link details include the status, width and speed
Browse files Browse the repository at this point in the history
  • Loading branch information
Meng-20 committed Jul 31, 2024
1 parent fa88620 commit c6f9ce5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions webui/src/components/Stores/BladePortStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit c6f9ce5

Please sign in to comment.