[
https://issues.apache.org/jira/browse/AMBARI-26645?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Himanshu Maurya updated AMBARI-26645:
-------------------------------------
Resolution: Fixed
Status: Resolved (was: Patch Available)
> Ambari Web React: Persist Hosts List filters and selection across navigation;
> fix pagination display when empty
> ---------------------------------------------------------------------------------------------------------------
>
> Key: AMBARI-26645
> URL: https://issues.apache.org/jira/browse/AMBARI-26645
> Project: Ambari
> Issue Type: Story
> Reporter: Himanshu Maurya
> Assignee: Himanshu Maurya
> Priority: Major
> Fix For: 3.1.0
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
> h2. Summary
> Aligns Hosts List filter and host-selection behavior with the classic Ember
> UI: filters applied on the Hosts List page were lost whenever the user
> navigated to a Host Summary page and back, and selected hosts did not survive
> a page refresh. Also fixes an incorrect pagination count shown when a
> filtered result set is empty.
> h2. Changes
> * Introduced a new {{HostsListStateProvider}} (shared React context) holding
> {{selectedFilters}} and {{selectedHosts}} above the route tree, so this state
> survives the component unmount that happens when navigating from the Hosts
> List to a Host Summary page and back — filters no longer reset on that
> round-trip.
> * Host selection is now also mirrored into the browser's local storage under
> the same key the classic UI uses
> ({{{}app.tables.selectedItems.mainHostController{}}}), so the selected hosts
> checkbox state survives a hard page refresh, matching Ember behavior.
> * The Hosts List page now initializes its filter bar and query string
> directly from any already-restored filters on mount, instead of starting
> empty and briefly issuing an unfiltered request before catching up.
> * Deep links into the Hosts List (e.g. from a service's component count, or
> a stack version's host count) still seed filters from the URL on first load,
> but no longer keep overwriting user-added filters on every subsequent poll
> refresh.
> * Resetting filters via the search bar now also clears the deep-link URL
> parameters (component/version), so a URL-seeded filter doesn't immediately
> reapply itself after being cleared.
> * Fixed the pagination footer showing "1-0 of 0 items" instead of "0-0 of 0
> items" when a filter matches no hosts.
> h2. Impact
> Matches the classic Ember UI's persistence behavior for the Hosts List page,
> removing a UX regression where filters silently reset on navigation and host
> selections were lost on refresh.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]