Uploaded image for project: 'Migration Toolkit for Red Hat Openshift Project Lead'
  1. Migration Toolkit for Red Hat Openshift Project Lead
  2. MTRHO-104

Enable the project switcher bar at the top of the management page and wizard, handle all-projects state properly

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False
    • No

      See early attempt at this that was closed: https://github.com/konveyor/crane-ui-plugin/pull/66

      By changing the URL prefix to `/k8s/ns/:namespace/*` the console automatically shows this project switcher at the top of the page. However, when doing this, if the user selects "All projects" in the bar the UI ends up on a 404 page. We can likely work around this by handling that `all-namespaces` route, but there is a bug in the console that prevents this (BZ coming soon for that, will edit it in here).

      ![161318810-66093b91-aef7-4fe0-b75e-a365a9efe997](https://user-images.githubusercontent.com/811963/179118012-1ea3ac14-d562-4381-9c7c-7db6956b6405.png)

      However, the URL prefix change is possibly not the best way of implementing this. Comparing to the Add page and Pipelines page, we see they do this without using `/k8s` in their URL (which is intended for pages representing individual k8s resources) by using components that are not currently exposed by the plugin SDK, `CreateProjectListPage` and `NamespacedPage`. I attempted a PR to add these to the SDK but it needs reevaluation: https://github.com/openshift/console/pull/11823

      Also, currently when you reach the management page without a project selected, you reach a stub page that just directs you to the Projects page where you can select and create a project, then you have to navigate back to our management page. Using `CreateProjectListPage` to handle the "all projects" state is a better solution.

            mikejturley Mike Turley
            migeng.robot MigEng Robot
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: