Skip to content

Commit

Permalink
Show advanced param with value only if default defined and different …
Browse files Browse the repository at this point in the history
…from default

Signed-off-by: Florian Hotze <[email protected]>
  • Loading branch information
florian-h05 committed Dec 3, 2024
1 parent 4bbfe9f commit 361f7a2
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,8 @@ export default {
return finalParameters.filter((p) =>
// parameter is not advanced: always show
!p.advanced ||
// parameter is advanced: show only if
(notNullNotUndefined(p.default) && notNullNotUndefined(this.configuration[p.name])
// default defined and value differs from default
? this.configuration[p.name].toString() !== p.default
// no default defined, but value is set and not empty
: notNullNotUndefined(this.configuration[p.name]) && this.configuration[p.name].toString().length > 0)
// parameter is advanced: show only if default is defined and value is different from default
(notNullNotUndefined(p.default) && notNullNotUndefined(this.configuration[p.name]) && this.configuration[p.name].toString() !== p.default)
)
}
},
Expand Down

0 comments on commit 361f7a2

Please sign in to comment.