You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Himanshu Maurya (Jira)" <ji...@apache.org> on 2026/09/04 09:43:00 UTC

[jira] [Updated] (AMBARI-26645) Ambari Web React: Persist Hosts List filters and selection across navigation; fix pagination display when empty

     [ https://issues.apache.org/jira/browse/AMBARI-26645?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Himanshu Maurya updated AMBARI-26645:
-------------------------------------
    Description: 
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.

  was:
h2. Summary

Follow-up to AMBARI-26635. Consolidates the remaining duplicated polling in {{ServiceContext}} (dashboard/services/hosts) into a single centralized fetch, and fixes several bugs where stale UI state or duplicated polling caused incorrect behavior or stuck backend requests.
h2. Performance improvements
 * {{CachedServiceApi}} ran its own self-contained 30-second cache and independent polling loop, separate from {{{}ServiceContext{}}}'s own polling. Removed the redundant cache/loop; the API now always fetches live and notifies subscribers directly, eliminating a class of stale-cache bugs.
 * {{ServiceContext}} was running *three overlapping 5-second polling loops* against the same {{{}/services{}}}/{{{}/components{}}} endpoints (one inside {{{}CachedServiceApi{}}}, one hand-rolled timeout loop for service states/alerts, and one via {{usePolling}} for maintenance/stale-config data). Consolidated into a single poll that drives all derived state, cutting duplicate backend load roughly 3x on the dashboard and hosts pages.
 * Added WebSocket-driven instant state merges for {{/events/hostcomponents}} and {{/events/services}} so component/service state updates apply immediately instead of waiting for the next 5-second poll.
 * {{{}HostsList{}}}, the Hosts detail page, and {{RestartWarning}} each independently re-fetched the same {{/components}} endpoint on their own timers; they now reuse the centralized polled data from {{{}ServiceContext{}}}, removing 3 more duplicate pollers.
 * Several per-service config-updater hooks (HDFS, HBase, Pinot, Ranger, Spark3, Trino, YARN) re-rendered and cleared their component data even when a poll cycle returned an empty component list; they now skip the update in that case, preventing a UI flicker/reset on every empty response.
 * Added a session-level cache for the Quicklinks stack-metadata endpoint, which was being re-fetched on every service switch even though the underlying config rarely changes.

h2. Bug fixes
 * Hosts list page: the host status tooltip listed the wrong "down" components because it read a field ({{{}HostRoles.state{}}}) that doesn't exist on the mapped host-component shape; corrected to read {{{}workStatus{}}}.
 * Ambari Views ({{{}/views/...{}}} pages) had an extra 80px bottom padding inherited from the general dashboard layout, causing an unnecessary gap/scroll area under the view iframe; padding is now suppressed specifically on Views routes.
 * The "Test DB Connection" action could route through the cluster-less action endpoint ({{{}POST /requests{}}}) when a new service was being added to an already-installed cluster (not yet "installed" itself). That produced a request with {{clusterID=-1}} that the backend {{ActionScheduler}} could never resolve, leaving it stuck in {{PENDING}} forever and blocking all subsequent background requests. The routing decision now keys off cluster existence rather than service-install state, and an empty resolved host now fails the check immediately instead of posting a request that the backend would reject.

h2. Impact

Further reduces redundant polling load on the Ambari server from the Modern UI (dashboard, hosts, and service pages) beyond AMBARI-26635, and fixes a request-starvation bug that could stall all background operations until server restart.


> 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
>
>
> 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: issues-unsubscribe@ambari.apache.org
For additional commands, e-mail: issues-help@ambari.apache.org