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

Notifications at cost and perf levels #175

Merged
merged 4 commits into from
Jun 26, 2024

Conversation

bhanvimenghani
Copy link
Contributor

This pr adds alerts for over and under resource utilization in the UI. This pr has been made as per the json structure shared here. A demo video reflecting the changes is attached here

@bhanvimenghani bhanvimenghani self-assigned this May 14, 2024
@bhanvimenghani bhanvimenghani changed the title Notifications for Over/Under resource utilization Notifications at cost and perf levels May 15, 2024
@bhanvimenghani
Copy link
Contributor Author

@dinogun quay.io/bmenghan/notifications image with the pr changes.

@bhanvimenghani
Copy link
Contributor Author

Fixed conflicts


const [showSuccessAlert, setShowSuccessAlert] = useState(false);
const [alertMessage, setAlertMessage] = useState('');
const [notificationType, setNotificationType] = useState<alertVarient>('info');

Choose a reason for hiding this comment

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

Is it alertVariant ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this useState<alertVarient> is the same type alertVarient on line 98 hence the same spelling. (I guess the spelling i can correct to 'variant' at both places)

setNotificationType('info');
}
else if (notification.type == "error"){
setNotificationType('danger');

Choose a reason for hiding this comment

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

Any reason on setting a different value for notification type ?
If notification.type is "error" , why to set as "danger" instead of "error" itself ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

patternfly has "info" and "Danger" as the notification variants while from the backend we get "notice" and "error", so over here im just trying to match the notification type from backend to the patternfly notifications. reference https://www.patternfly.org/components/alert

Choose a reason for hiding this comment

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

As I don't see warning and critical related notifications, can you please add them as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added

@kusumachalasani
Copy link

As discussed, we should be able to view all the notifications related to one recommendation at a time.

@bhanvimenghani
Copy link
Contributor Author

here is the updated view of the ui with before (in perf tab) and after (in cost tab) link

@bhanvimenghani
Copy link
Contributor Author

@kusumachalasani can u re-review the pr please.

@kusumachalasani
Copy link

here is the updated view of the ui with before (in perf tab) and after (in cost tab) link

@bhanvimenghani I'm unable to view the video. It says 'may have been deleted or archived by its creator.'

@bhanvimenghani
Copy link
Contributor Author

@bhanvimenghani
Copy link
Contributor Author

image for testing quay.io/bmenghan/175

@kusumachalasani
Copy link

kusumachalasani commented Jun 25, 2024

Couldn't test with the image because of 'Unable to Generate Recommendations' error in openshift.
To avoid these errors for the local monitoring demo for now - it would be good to use 'listRecomendations' API to view the recommendations.

Copy link

@kusumachalasani kusumachalasani left a comment

Choose a reason for hiding this comment

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

Approving, as the changes required per the comments can be addressed in the another PR.

@bhanvimenghani
Copy link
Contributor Author

bhanvimenghani commented Jun 26, 2024

Couldn't test with the image because of 'Unable to Generate Recommendations' error in openshift. To avoid these errors for the local monitoring demo for now - it would be good to use 'listRecomendations' API to view the recommendations.

This change would be part of a different sprint, out of scope for this pr

Copy link
Contributor

@dinogun dinogun left a comment

Choose a reason for hiding this comment

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

LGTM

@dinogun dinogun merged commit 78f00a2 into kruize:mvp_demo Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants