Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editors for Nephio-specific resources (1st batch). #58

Merged

Conversation

kamilmadejek
Copy link
Collaborator

@kamilmadejek kamilmadejek commented Aug 27, 2024

This PR adds three new editor UIs for resource types which are specific to Nephio:

  • infra.nephio.org/v1alpha1/WorkloadCluster
  • infra.nephio.org/v1alpha1/Token
  • req.nephio.org/v1alpha1/Capacity

At this moment, the Web UI project does not support GUI editor functionality for any of Nephio-specific resource types. This PR is the beginning of a bigger effort which aims to close this gap and provide graphical editors for all relevant Nephio resources.

This PR follows previously established practices and editor creation conventions, which involve significant code repetition. Following PRs will aim to rework existing and new editors in a way which promotes code reuse and adheres to DRY principles.


image

Example of WorkloadCluster editor.


Additional tweaks and fixes include:

  • Added LOCAL_PROXY configuration mode, which makes it possible for WebUI developers to connect application to a Kubernetes proxy. SSH port forwarding can be used to easily connect to a remote cluster.
  • Created useSetStateAndCall React hook which aims to limit undesirable usage of useEffect hook for reacting to state changes.

@nephio-prow nephio-prow bot requested review from efiacor and liamfallon August 27, 2024 17:23
Copy link

linux-foundation-easycla bot commented Aug 27, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@kamilmadejek
Copy link
Collaborator Author

This time I'm publishing the PR from my private account (with linked Samsung email), so it seems I have to go through CLA authorization again. Hopefully it will be cleared soon.

@kamilmadejek
Copy link
Collaborator Author

/easycla

@radoslawc
Copy link

Note to the reviewers and approvers: please ignore result of GitHub action: 'Generate Dependabot Configuration / run_python_script (pull_request)' it has no impact and status was added by error.

@kamilmadejek
Copy link
Collaborator Author

Hi @liamfallon @efiacor

I created this PR in an unfortunate moment, when it went unnoticed, buried beneath the avalanche of auto-generated Dependabot PRs 🙂

Now that we have this matter sorted out, I would be grateful if you could take a look at it.

@efiacor
Copy link

efiacor commented Aug 29, 2024

Hi @liamfallon @efiacor

I created this PR in an unfortunate moment, when it went unnoticed, buried beneath the avalanche of auto-generated Dependabot PRs 🙂

Now that we have this matter sorted out, I would be grateful if you could take a look at it.

Hi @kamilmadejek , this looks interesting.
Would you have an easy way to deploy these changes so we can take a look?

@kamilmadejek
Copy link
Collaborator Author

Hi @efiacor, sure, I'll try to prepare this for Monday.

@kamilmadejek
Copy link
Collaborator Author

kamilmadejek commented Sep 2, 2024

Hi @efiacor, I managed to prepare a Web UI deployment with these changes. I will share access details using a private channel.

The work done in this PR is quite rudimentary - it adds three relatively simple editors for Nephio-specific resources. These new editors are implemented in a similar way to already existing editors, thus they share their drawbacks (code duplication, some pre-existing bugs and quirks etc.). This PR serves mostly as my introduction to the topic.

I am currently prototyping a new approach for implementing editors, which aims to make their development more streamlined and the code more maintainable.

@efiacor
Copy link

efiacor commented Sep 4, 2024

/approve

@nephio-prow nephio-prow bot added the approved label Sep 4, 2024
@liamfallon
Copy link
Member

/approve
/lgtm

Copy link

nephio-prow bot commented Sep 4, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: efiacor, kamilmadejek, liamfallon

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

@radoslawc radoslawc merged commit 3ed685b into nephio-project:main Sep 4, 2024
9 checks passed
@kamilmadejek kamilmadejek deleted the nephio-resources-editors branch September 4, 2024 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants