[dashboards] Refactor defaults and placeholders #279
Merged
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.
This is a breaking change for the defaults and placeholders handling in
dashboards. We removed the "defaults" option for dashboards, so that
users must now set the cluster / namespace in all plugins. Before this
they were optional in all plugins which had a cluster(s) or namespace(s)
option. As a replacement for this we introduced two new special
variables. These are
__cluster
and__namespace
which containing thecluster and namespace of an Application or a Team were the dashboard is
used.
We also changed the behavior of placeholders, so that they are now more
like variables. This means placeholders must now be used with the
following syntax
{% .<placeholder-name> %}
. The old{{.<placeholder-name> }}
syntax doesn't work anymore.Another change is that the defaults (cluster / namespace) in the CRDs
are now replaced on the server side and not in the frontend anymore.
This shouldn't have any effect for the end user.