Skip to content

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

Merged
crenshaw-dev merged 1 commit intorelease-2.8from
cherry-pick-22caf9-release-2.8
Jul 27, 2023
Merged

fix(ui): display valuesobject if set (cherry-pick #14257)#14755
crenshaw-dev merged 1 commit intorelease-2.8from
cherry-pick-22caf9-release-2.8

Conversation

@gcp-cherry-pick-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
@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.

2 participants