feat: Add profile creation and editing to the dashboard - #190
Open
gianlucam76 wants to merge 2 commits into
Open
gianlucam76 wants to merge 2 commits into
gianlucam76 wants to merge 2 commits into
Conversation
Member
Author
Lets the dashboard create, edit and delete `ClusterProfile`/`Profile` instances instead of only viewing them, using the new `POST`/`PUT`/`DELETE /profile` endpoints added to `ui-backend`. - **Create** (`/sveltos/profile/new`, reachable via a new "New Profile" button on the Profiles page): Kind toggle (ClusterProfile/Profile), Name/Namespace, optional Tier and Depends On, a cluster selector, and one of three content flows: Helm chart, raw YAML, or a reference to an existing ConfigMap/Secret so content can be deliberately shared across profiles. - **Edit** (a new action on the profile detail page): loads the full spec as YAML and lets it be edited directly and saved back, rather than a second constrained form — this is what lets it work on any profile regardless of how it was originally created. - **Delete**: a confirmation dialog with an explicit, off by default option to also remove referenced ConfigMap/Secret content. That checkbox only appears when the profile actually references one; a Helm only profile no longer shows an irrelevant option. Nothing is inferred or guessed: the warning says plainly that other profiles referencing the same content cannot be detected. No new dependencies. Reuses existing primitives throughout (`TagInput` for Depends On, `ToggleGroup`, `Dialog`, `Checkbox`, the existing mutation pattern via `react-query`). `PageHeading` gained a small optional `actions` slot rather than being duplicated for the new pages.
gianlucam76
force-pushed
the
create-update-profile
branch
from
September 26, 2026 12:24
a6dd380 to
09acd84
Compare
Safouene1
reviewed
Sep 28, 2026
Contributor
There was a problem hiding this comment.
The form uses 19+ independent useState calls to manage form state,
we should consider using Yup for form validation and formik
Safouene1
reviewed
Sep 28, 2026
Safouene1
requested changes
Sep 28, 2026
Safouene1
left a comment
Contributor
There was a problem hiding this comment.
Overall, excellent work on this PR! 🎉 The profile creation, editing, and deletion workflow is well-structured and comprehensive, a couple of minor tweaks since it's our first Form using proper libraries to handle validation and state management really matters
Replace the hand-rolled YAML serializer with js-yaml so the event YAML view and the profile edit page share one implementation. Multi-line values now render as block scalars and empty strings are quoted.
gianlucam76
force-pushed
the
create-update-profile
branch
from
September 28, 2026 15:58
20f3b29 to
32fb43c
Compare
Member
Author
|
@Safouene1 took care of one comment. Filed an issue for the other comment. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Lets the dashboard create, edit and delete
ClusterProfile/Profileinstances instead of only viewing them, using the newPOST/PUT/DELETE /profileendpoints added toui-backend./sveltos/profile/new, reachable via a new "New Profile" button on the Profiles page): Kind toggle (ClusterProfile/Profile), Name/Namespace, optional Tier and Depends On, a cluster selector, and one of three content flows: Helm chart, raw YAML, or a reference to an existing ConfigMap/Secret so content can be deliberately shared across profiles.No new dependencies. Reuses existing primitives throughout (
TagInputfor Depends On,ToggleGroup,Dialog,Checkbox, the existing mutation pattern viareact-query).PageHeadinggained a small optionalactionsslot rather than being duplicated for the new pages.