fix(ui): display valuesobject if set (cherry-pick #14257)#14755
Merged
crenshaw-dev merged 1 commit intorelease-2.8from Jul 27, 2023
Merged
fix(ui): display valuesobject if set (cherry-pick #14257)#14755crenshaw-dev merged 1 commit intorelease-2.8from
crenshaw-dev merged 1 commit intorelease-2.8from
Conversation
* 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
approved these changes
Jul 27, 2023
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.
Cherry-picked fix(ui): display valuesobject if set (#14257)
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
If
valuesObjectis present, set it to the value ofinput.spec.source.helm.valueson save, as an unmarshaled json string.Signed-off-by: Blake Pettersson blake.pettersson@gmail.com
helm.valuesto empty string on saveIf
valuesObjectexists, setinput.spec.source.helm.valuesto anempty string once
valuesObjecthas been unmarshalled from thevalues input. This is to prevent unnecessary duplication of the values.
Signed-off-by: Blake Pettersson blake.pettersson@gmail.com
Signed-off-by: Blake Pettersson blake.pettersson@gmail.com
Signed-off-by: Blake Pettersson blake.pettersson@gmail.com
This is so that we can conditionally set
source.helm.valueswithoutinadvertently 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
Signed-off-by: Blake Pettersson blake.pettersson@gmail.com
Signed-off-by: Blake Pettersson blake.pettersson@gmail.com