Project

General

Profile

Actions

Refactor #27451

open

Rewrite the organization switcher in react/redux

Added by Walden Raines almost 5 years ago. Updated almost 5 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Switching the organization in the org switcher causes stale state of plugin pages.

In katello, for example, if you switch the organization on the organization switcher there is no good way for the react page to know that you just updated the organization and thus the page can get confused about what organization it is on. This is especially true if you also use the in-page organization switcher (by selecting "any organization").

One possibility to fix this is to rewrite the organization switcher in react, store the organization in foreman's redux store, and for foreman's redux store to be the one source of truth for what organization is selected. After this is done we'll obviously want to refactor katello as well in order to remove independent organization tracking there.

Steps to Reproduce

  1. Starting with "Another Org" on subscription page
  2. Clicking on a sub to view the details
  3. Selecting "Any Organization"
  4. Selecting "Default Organization"
  5. Clicking the subscriptions breadcrumb
  6. Subscriptions show from "Another Org", but "Default Organization" org shows in masthead (this is the issue)
  7. If I refresh the page, we get the expected results of Default Organization's subs showing.

Context
https://github.com/Katello/katello/pull/8227#issuecomment-514687258
https://github.com/Katello/katello/pull/8052


Related issues 1 (0 open1 closed)

Related to Katello - Bug #25113: Subscriptions details page does not handle Org switch correctly.ClosedJeremy LenzActions
Actions #1

Updated by Walden Raines almost 5 years ago

  • Related to Bug #25113: Subscriptions details page does not handle Org switch correctly. added
Actions

Also available in: Atom PDF