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

Add ability to customize create project modal using dynamic plugins

XMLWordPrintable

    • 5
    • False
    • None
    • False
    • OCPSTRAT-1321 - Console: Customer Happiness (RFEs) for 4.17
    • Hide
      This addition provides an extension point so dynamic plugin creators can pass a component that will be rendered in place of the default create project modal. https://github.com/openshift/console/blob/master/frontend/packages/console-dynamic-plugin-sdk/docs/console-extensions.md#consolecreate-project-modal

      The OpenShift Console dynamic plugin sdk exposes a create project modal extension that can be used to pass a component that will be rendered in place of the standard create project modal. https://github.com/openshift/console/blob/master/frontend/packages/console-dynamic-plugin-sdk/src/extensions/create-project-modal.ts

      To utilize the create modal extension point, add a Dynamic Console Plugin to your cluster. An example of such a plugin is our Openshift Console Demo Plugin. In it the create-project-modal extension point is specified within console-extensions.json. https://github.com/openshift/console/blob/master/dynamic-demo-plugin/console-extensions.json#L388-L393

      In the dynamic-demo-plugin/package.json createProjectModal is added to the list of exposedModules, https://github.com/openshift/console/blob/master/dynamic-demo-plugin/package.json#L75 which points to the CreateProjectModal.tsx that contains the custom CreateProjectModal component to be rendered in place of the default create project modal. https://github.com/openshift/console/blob/master/dynamic-demo-plugin/src/components/Modals/CreateProjectModal.tsx
      Show
      This addition provides an extension point so dynamic plugin creators can pass a component that will be rendered in place of the default create project modal. https://github.com/openshift/console/blob/master/frontend/packages/console-dynamic-plugin-sdk/docs/console-extensions.md#consolecreate-project-modal The OpenShift Console dynamic plugin sdk exposes a create project modal extension that can be used to pass a component that will be rendered in place of the standard create project modal. https://github.com/openshift/console/blob/master/frontend/packages/console-dynamic-plugin-sdk/src/extensions/create-project-modal.ts To utilize the create modal extension point, add a Dynamic Console Plugin to your cluster. An example of such a plugin is our Openshift Console Demo Plugin. In it the create-project-modal extension point is specified within console-extensions.json. https://github.com/openshift/console/blob/master/dynamic-demo-plugin/console-extensions.json#L388-L393 In the dynamic-demo-plugin/package.json createProjectModal is added to the list of exposedModules, https://github.com/openshift/console/blob/master/dynamic-demo-plugin/package.json#L75 which points to the CreateProjectModal.tsx that contains the custom CreateProjectModal component to be rendered in place of the default create project modal. https://github.com/openshift/console/blob/master/dynamic-demo-plugin/src/components/Modals/CreateProjectModal.tsx
    • Enhancement
    • OEX OCP Console - Sprint 255

      As a user, I would like to customize the modal displayed when a 'Create Project' button is clicked in the UI.

      Acceptance criteria

      • add an extension point so plugin creators can provide their own "Create Project" modal
      • the console should implement this extension point using the "useModal" hook from the dynamic plugin SDK
      • update docs with this extension point.
      • add a a custom modal to the demo plugin for testing. The modal will create a project and quota for that project.

              sgoodwin_redhat Steve goodwin
              jcaiani@redhat.com Joseph Caiani
              YaDan Pei YaDan Pei
              Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: