Skip to content

Conversation

ricoberger
Copy link
Member

@ricoberger ricoberger commented Jan 4, 2022

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 the
cluster 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.

@ricoberger ricoberger force-pushed the dashboards-refactor-defaults-placeholders-and-variables-handling branch 2 times, most recently from f2cd3e7 to 1859737 Compare January 4, 2022 20:33
@codecov-commenter
Copy link

codecov-commenter commented Jan 4, 2022

Codecov Report

Merging #279 (626021e) into main (20acf81) will increase coverage by 0.28%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #279      +/-   ##
==========================================
+ Coverage   42.68%   42.96%   +0.28%     
==========================================
  Files          93       94       +1     
  Lines        7926     7927       +1     
==========================================
+ Hits         3383     3406      +23     
+ Misses       4506     4490      -16     
+ Partials       37       31       -6     
Impacted Files Coverage Δ
plugins/applications/pkg/teams/teams.go 100.00% <ø> (ø)
pkg/api/clusters/cluster/cluster.go 28.69% <100.00%> (-7.12%) ⬇️
pkg/api/clusters/cluster/defaults.go 100.00% <100.00%> (ø)
plugins/applications/pkg/topology/topology.go 100.00% <100.00%> (ø)
plugins/dashboards/dashboards.go 100.00% <100.00%> (+7.81%) ⬆️
plugins/dashboards/pkg/variables/variables.go 100.00% <100.00%> (ø)
plugins/users/users.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b60a725...626021e. Read the comment docs.

@ricoberger ricoberger force-pushed the dashboards-refactor-defaults-placeholders-and-variables-handling branch from 1859737 to bcc8f45 Compare January 5, 2022 19:30
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 the
cluster and namespace of an Application or a Team were the dashboard is
used.

We also changed the behaviour 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.
@ricoberger ricoberger force-pushed the dashboards-refactor-defaults-placeholders-and-variables-handling branch from bcc8f45 to 626021e Compare January 5, 2022 19:38
@ricoberger ricoberger merged commit a2d533d into main Jan 5, 2022
@ricoberger ricoberger deleted the dashboards-refactor-defaults-placeholders-and-variables-handling branch January 5, 2022 20:07
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