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

fix(ui): display valuesobject if set (cherry-pick #14257) #14755

Merged
merged 1 commit into from
Jul 27, 2023

Conversation

gcp-cherry-pick-bot[bot]
Copy link

Cherry-picked fix(ui): display valuesobject if set (#14257)

  • fix: display valuesobject if set

With #11538 we now have the ability to set helm values as an object
instead of a string, but we also need to be able to correctly display
it in the UI if it is set.

Signed-off-by: Blake Pettersson blake.pettersson@gmail.com

  • fix: set valuesobject on save

If valuesObject is present, set it to the value of
input.spec.source.helm.values on save, as an unmarshaled json string.

Signed-off-by: Blake Pettersson blake.pettersson@gmail.com

  • fix: set helm.values to empty string on save

If valuesObject exists, set input.spec.source.helm.values to an
empty string once valuesObject has been unmarshalled from the
values input. This is to prevent unnecessary duplication of the values.

Signed-off-by: Blake Pettersson blake.pettersson@gmail.com

  • chore: eslint

Signed-off-by: Blake Pettersson blake.pettersson@gmail.com

  • chore: eslint

Signed-off-by: Blake Pettersson blake.pettersson@gmail.com

  • fix: deep clone app

This is so that we can conditionally set source.helm.values without
inadvertently affecting other parts of the app. Only when the edit
button is pressed do we toggle source.helm.values.

Signed-off-by: Blake Pettersson blake.pettersson@gmail.com

  • chore: eslint

Signed-off-by: Blake Pettersson blake.pettersson@gmail.com


Signed-off-by: Blake Pettersson blake.pettersson@gmail.com

* fix: display valuesobject if set

With #11538 we now have the ability to set helm values as an object
instead of a string, but we also need to be able to correctly display
it in the UI if it is set.

Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>

* fix: set valuesobject on save

If `valuesObject` is present, set it to the value of
`input.spec.source.helm.values` on save, as an unmarshaled json string.

Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>

* fix: set `helm.values` to empty string on save

If `valuesObject` exists, set `input.spec.source.helm.values` to an
empty string once `valuesObject` has been unmarshalled from the
values input. This is to prevent unnecessary duplication of the values.

Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>

* chore: eslint

Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>

* chore: eslint

Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>

* fix: deep clone app

This is so that we can conditionally set `source.helm.values` without
inadvertently affecting other parts of the app. Only when the edit
button is pressed do we toggle `source.helm.values`.

Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>

* chore: eslint

Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>

---------

Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
@crenshaw-dev crenshaw-dev merged commit 34f6e86 into release-2.8 Jul 27, 2023
6 of 12 checks passed
@crenshaw-dev crenshaw-dev deleted the cherry-pick-22caf9-release-2.8 branch July 27, 2023 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants