Insights View Fixes - #1937
Merged
LadislavVasina1 merged 1 commit intoJul 30, 2025
Merged
Conversation
LadislavVasina1
requested review from
a team,
ColeHiggins2,
chris1984,
synkd and
vsedmik
July 29, 2025 12:21
Contributor
Reviewer's GuideRefactors Cloud Insights view definitions to use PF5-specific widget classes and updated OUIA locators, aligning the file with Airgun’s PF5 conventions to restore test compatibility. Class diagram for updated Cloud Insights view classesclassDiagram
class BaseLoggedInView
class SearchableViewMixinPF4
class Modal
class PF5OUIAModal
class Button
class PF5Button
class Switch
class PF5OUIASwitch
class Dropdown
class PF5OUIADropdown
class PatternflyTable
class PF5OUIAPatternflyTable
class Checkbox
class TextInput
class Text
class PF5Pagination
class View
class CloudTokenView {
rhcloud_token: TextInput
save_token: PF5Button
is_displayed()
}
CloudTokenView --|> BaseLoggedInView
class RemediationView {
OUIA_ID = 'remediation-modal'
remediate: PF5Button
cancel: PF5Button
table: PF5OUIAPatternflyTable
}
RemediationView --|> PF5OUIAModal
class CloudInsightsView {
title: Text
insights_sync_switcher: PF5OUIASwitch
remediate: PF5Button
insights_dropdown: PF5OUIADropdown
select_all: Checkbox
table: PF5OUIAPatternflyTable
select_all_hits: PF5Button
clear_hits_selection: PF5Button
pagination: PF5Pagination
remediation_window: RemediationView
}
CloudInsightsView --|> BaseLoggedInView
CloudInsightsView --|> SearchableViewMixinPF4
CloudInsightsView --> RemediationView : nested
PF5Button --|> Button
PF5OUIAModal --|> Modal
PF5OUIASwitch --|> Switch
PF5OUIADropdown --|> Dropdown
PF5OUIAPatternflyTable --|> PatternflyTable
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
Author
|
Contributor
There was a problem hiding this comment.
Hey @LadislavVasina1 - I've reviewed your changes - here's some feedback:
- Make sure to update the imports at the top of cloud_insights.py to include all of the new PF5 component classes used in this diff (e.g., PF5Button, PF5OUIASwitch, PF5OUIADropdown, PF5OUIAPatternflyTable, PF5OUIAModal).
- Verify that the new OUIA_ID and component_id values ('remediation-modal', 'remediations-table', 'rh-cloud-recommendations-table') match the actual attributes in the rendered UI to avoid locator mismatches.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Make sure to update the imports at the top of cloud_insights.py to include all of the new PF5 component classes used in this diff (e.g., PF5Button, PF5OUIASwitch, PF5OUIADropdown, PF5OUIAPatternflyTable, PF5OUIAModal).
- Verify that the new OUIA_ID and component_id values ('remediation-modal', 'remediations-table', 'rh-cloud-recommendations-table') match the actual attributes in the rendered UI to avoid locator mismatches.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
ColeHiggins2
approved these changes
Jul 29, 2025
chris1984
approved these changes
Jul 29, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update
views/cloud_insights.pyfile to match the format we use elsewhere in Airgun + fix locators to make tests pass.This pr fixes:
test_rhcloud_insights.py/test_rhcloud_insights_remediate_multiple_hosttest_rhcloud_insights.py/test_rhcloud_insights_e2ePRT Example
Summary by Sourcery
Refactor cloud insights views to PF5 widget classes and update their OUIAIDs and locators to restore test compatibility.
Bug Fixes:
Enhancements: