console icon indicating copy to clipboard operation
console copied to clipboard

[WIP] Add extension point to enable customized create project modal for dynamic plugins

Open sg00dwin opened this issue 9 months ago • 5 comments

sg00dwin avatar May 06 '24 19:05 sg00dwin

I just realized that we probably need to change the existing createNamespaceModal, createProjectModal, and createNamespaceOrProjectModal functions to use the useModal hook from the dynamic plugin SDK. The createModalLauncher function, part of our internal app, passes a different set of props than the launcher returned by useModal. We will want the new extension point to use props from the stable SDK API, not from our internal app.

TheRealJon avatar May 09 '24 16:05 TheRealJon

I just realized that we probably need to change the existing createNamespaceModal, createProjectModal, and createNamespaceOrProjectModal functions to use the useModal hook from the dynamic plugin SDK. The createModalLauncher function, part of our internal app, passes a different set of props than the launcher returned by useModal. We will want the new extension point to use props from the stable SDK API, not from our internal app.

This also means that these functions will need to be migrated to hooks

TheRealJon avatar May 09 '24 16:05 TheRealJon

/retest-required

sg00dwin avatar May 30 '24 20:05 sg00dwin

@sg00dwin: This pull request references CONSOLE-3792 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.17.0" version, but no target version was set.

In response to this:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

openshift-ci-robot avatar May 31 '24 16:05 openshift-ci-robot

/retest-required

sg00dwin avatar Jun 04 '24 15:06 sg00dwin

/retest-required

sg00dwin avatar Jun 10 '24 14:06 sg00dwin

/test e2e-gcp-console

sg00dwin avatar Jun 10 '24 20:06 sg00dwin

QE Approver /assign @yapei

Docs Approver: /assign @opayne1

PX Approver: /assign @RickJWagner

sg00dwin avatar Jun 11 '24 12:06 sg00dwin

/lgtm cancel

Since I helped implement this, I'll let someone else tag it.

TheRealJon avatar Jun 11 '24 15:06 TheRealJon

/label px-approved

RickJWagner avatar Jun 11 '24 18:06 RickJWagner

tested following scenarios:

  1. verify Create Project modal is using customized modal on several pages(project lists page; getting started page; project dropdown)
  2. check Create Namespace modal, there is some problem here, user is unable to open the Default network policy dropdown Screenshot 2024-06-12 at 2 20 54 PM

yapei avatar Jun 12 '24 06:06 yapei

also one more question: customized namespace creation modal is not supported/implemented in this PR, right? Do we plan to support it in future?

yapei avatar Jun 12 '24 06:06 yapei

/label docs-approved

opayne1 avatar Jun 13 '24 16:06 opayne1

also one more question: customized namespace creation modal is not supported/implemented in this PR, right? Do we plan to support it in future?

That is not implemented with this PR and there are no plans to support it.

sg00dwin avatar Jun 17 '24 14:06 sg00dwin

Create Namespace modal still have some issues

  • user need click twice to successfully switch to Deny all inbound traffic
  • the dropdown item changed back to No restrictions after user clicks on Create button

https://github.com/openshift/console/assets/12692381/d6cd7f7b-96f2-4b34-84d3-e87993d9ef7f

yapei avatar Jun 18 '24 08:06 yapei

Hi @yapei I've pushed updates for those issues.

sg00dwin avatar Jun 21 '24 17:06 sg00dwin

  1. Create Namespace modal showing Default network policy with text allow Screenshot 2024-06-24 at 11 28 40 AM

  2. When creating a Namespace with Deny all inbound traffic , no NetworkPolicy is created but we expect a default-deny networkpolicy should be created

yapei avatar Jun 24 '24 03:06 yapei

I have pushed further updates for those issues. Please review. namespace-select

sg00dwin avatar Jun 24 '24 16:06 sg00dwin

/retest

sg00dwin avatar Jun 25 '24 14:06 sg00dwin

@sg00dwin: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

openshift-ci[bot] avatar Jun 26 '24 20:06 openshift-ci[bot]

@sg00dwin thanks for all the updates, now everything works fine /label qe-approved

yapei avatar Jun 27 '24 02:06 yapei

@sg00dwin: This pull request references CONSOLE-3792 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.17.0" version, but no target version was set.

In response to this:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

openshift-ci-robot avatar Jun 27 '24 02:06 openshift-ci-robot

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jhadvig, rhamilto, sg00dwin

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

openshift-ci[bot] avatar Jun 28 '24 08:06 openshift-ci[bot]

[ART PR BUILD NOTIFIER]

This PR has been included in build openshift-enterprise-console-container-v4.17.0-202406282112.p0.g2d4941b.assembly.stream.el9 for distgit openshift-enterprise-console. All builds following this will include this PR.

openshift-bot avatar Jun 28 '24 22:06 openshift-bot