Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display port link details including the status, width and speed in the LinkStatus column #22

Merged
merged 3 commits into from
Aug 7, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 linked up
if (detailsResponse.data.linkStatus && detailsResponse.data.linkStatus == "LinkUp") {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Be aware that the BMC's response is "Link Up". There is a space between "Link" and "Up"

Copy link
Collaborator Author

@Meng-20 Meng-20 Jul 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you, I have fixed that

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
Loading