Skip to content

Commit 4504f2f

Browse files
committed
fix(dashboard): deliver the logoHeight branding key to the console
The console gained a logoHeight option, but the config.json template picks branding keys through an allow-list that did not include it, so the key was dropped and the option could never take effect in a shipped chart. Add logoHeight to the allow-list. Assisted-by: LLM Signed-off-by: IvanHunters <[email protected]>
1 parent e097693 commit 4504f2f

2 files changed

Lines changed: 35 additions & 1 deletion

File tree

‎packages/system/dashboard/templates/configmap.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
a private registry) are dropped: this config.json is now a static asset
1313
reachable by anyone past the proxy, and Keycloak reads its keys from
1414
_cluster.branding directly. */}}
15-
{{- $config := pick $branding "titleText" "tenantText" "footerText" "logoText" "logoSvg" "iconSvg" }}
15+
{{- $config := pick $branding "titleText" "tenantText" "footerText" "logoText" "logoSvg" "logoHeight" "iconSvg" }}
1616
{{- /* Require digits then a dot (v1.5.0 / 1.5.0), so a tagless ref whose last
1717
":"-segment is a repo path with a port (ghcr.io:443/.../console -> last
1818
"443/.../console") does not get mistaken for a version. */}}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
suite: console config.json logoHeight wiring
2+
templates:
3+
- templates/configmap.yaml
4+
5+
release:
6+
name: dashboard
7+
namespace: cozy-dashboard
8+
9+
# logoHeight lets a square branding logo be shown larger than the default. The
10+
# key must survive the pick allow-list in configmap.yaml, otherwise the console
11+
# option is dead because config.json never carries the value.
12+
13+
tests:
14+
- it: writes logoHeight when branding.logoHeight is set
15+
set:
16+
_cluster:
17+
root-host: example.org
18+
branding:
19+
logoHeight: 48
20+
asserts:
21+
- matchRegex:
22+
path: data["config.json"]
23+
pattern: '"logoHeight":48'
24+
25+
- it: omits logoHeight when branding.logoHeight is unset
26+
set:
27+
_cluster:
28+
root-host: example.org
29+
branding:
30+
logoSvg: ABC
31+
asserts:
32+
- notMatchRegex:
33+
path: data["config.json"]
34+
pattern: logoHeight

0 commit comments

Comments
 (0)