Uploaded image for project: 'OpenShift Console'
  1. OpenShift Console
  2. CONSOLE-4606

[METAL3] Drop createModalLauncher and use useOverlay hook instead.

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • None
    • None
    • None
    • Proposed
    • OCP Console - Sprint 278

      As part of the work on react-router v5 drop, we need to migrate from the createModalLauncher instances in our codebase and we need to use the useOverlay hook instead. 

      One such instance within METAL3 plugin is the menuActionsCreator function within host-menu-actions.tsx. We should refactor this code so that we will be able to launch . This hook would then be exposed similarly as useNodeMaintenanceActions is - via console.action/resource-provider, and consumed within BareMetalHostsDetailsPage's DetailsPage components customActionMenu prop. Some prior refactors that have been done are a good reference point for what is expected - https://github.com/openshift/console/pull/13506, https://github.com/openshift/console/pull/15078 or https://github.com/openshift/console/pull/15063 .  Additionally 
      we should refactor stopNodeMaintenanceModal as it uses confirmModal, but its not a FC/hook.
      AC:

      1. refactor menuActions and menuActionsCreator to hook form (similarly as its done in useNodeMaintenanceActions).
      2. refactor stopNodeMaintenanceModal so that we will be able to launch the used confirmModal via hook.
      3. consolidate menuActionsCreator's consumers (BareMetalHostsDetailsPage) to use the new hook form instead.

              viraj-1 Vikram Raj
              rh-ee-mziska Marek Ziska (Inactive)
              None
              None
              YaDan Pei YaDan Pei
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: