-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
UI: Fix selection of domain filters in the SearchView
component
#10386
UI: Fix selection of domain filters in the SearchView
component
#10386
Conversation
@bernardodemarco a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## 4.20 #10386 +/- ##
============================================
- Coverage 15.98% 15.98% -0.01%
+ Complexity 13077 13076 -1
============================================
Files 5649 5649
Lines 495617 495624 +7
Branches 59997 60003 +6
============================================
- Hits 79247 79237 -10
- Misses 407520 407544 +24
+ Partials 8850 8843 -7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
UI build: ✔️ |
@bernardodemarco a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
UI build: ✔️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clgtm
Description
Currently, when a domain has associated accounts, it is not possible to select it as a filter option in the
SearchView
component. The following video shows the current UI behavior:2025-02-12.10-33-42.mp4
When the user selects a filter option, the method
onSelectFieldChange
in theSearchView
component is executed. Then, it checks if the changed field name is equal todomainid
; if so, it executes the methodfetchDynamicFieldData
to fetch only the accounts of the selected domain.However, the
fetchDynamicFieldData
method is always executing, in itsfinally
block, thefillFormFieldValues
method:cloudstack/ui/src/components/view/SearchView.vue
Lines 716 to 722 in a7beaaf
The
fillFormFieldValues
method populates the filters values based on the query strings existing in the URL. Therefore, since the URL query strings are empty, thedomainid
field is set toundefined
, and the selected domain automatically disappears.Additionally, two other bugs have been identified:
SearchView
component, the fetched accounts are not refreshed;SearchView
component only displays the domain filter, after selecting a domain, an exception is thrown at the browser's console:This PR fixes the above-mentioned issues.
Fixes #10310
Types of changes
Feature/Enhancement Scale or Bug Severity
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
SearchView
component in the Events page.