File tree 3 files changed +10
-2
lines changed
salt/metalk8s/addons/ui/deployed
3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -377,6 +377,7 @@ def _get_parts(self) -> Iterator[str]:
377
377
"ThemeConfig" : textwrap .indent (
378
378
UI_THEME_OPTIONS .read_text (encoding = "utf-8" ), 12 * " "
379
379
),
380
+ "ShellUIVersion" : versions .SHELL_UI_VERSION ,
380
381
},
381
382
file_dep = [UI_THEME_OPTIONS ],
382
383
),
Original file line number Diff line number Diff line change 7
7
for use in tests and documentation as well.
8
8
"""
9
9
import operator
10
+ import json
10
11
11
12
from collections import namedtuple
12
13
from pathlib import Path
@@ -39,7 +40,8 @@ def load_version_information() -> None:
39
40
globals ()[var ] = value .strip ()
40
41
41
42
42
- VERSION_FILE = (Path (__file__ ) / "../../../VERSION" ).resolve ()
43
+ REPO_ROOT = (Path (__file__ ) / "../../../" ).resolve ()
44
+ VERSION_FILE = REPO_ROOT / "VERSION"
43
45
44
46
# Metalk8s version.
45
47
# (Those declarations are not mandatory, but they help pylint and mypy).
@@ -53,6 +55,11 @@ def load_version_information() -> None:
53
55
SHORT_VERSION : str = "{}.{}" .format (VERSION_MAJOR , VERSION_MINOR )
54
56
VERSION : str = "{}.{}{}" .format (SHORT_VERSION , VERSION_PATCH , VERSION_SUFFIX )
55
57
58
+ # Get shell ui version from package.json
59
+ shell_ui_package_contents = (REPO_ROOT / "shell-ui/package.json" ).read_text (
60
+ encoding = "utf-8"
61
+ )
62
+ SHELL_UI_VERSION : str = json .loads (shell_ui_package_contents )["version" ]
56
63
57
64
# }}}
58
65
# Container images {{{
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ Create metalk8s-ui ConfigMap:
46
46
"url_grafana": "/grafana",
47
47
"url_doc": "/docs",
48
48
"url_alertmanager": "/api/alertmanager",
49
- "url_navbar": "/shell/solution-ui-navbar.1.0.0 .js",
49
+ "url_navbar": "/shell/solution-ui-navbar.@@ShellUIVersion .js",
50
50
"url_navbar_config": "/shell/config.json"
51
51
}
52
52
You can’t perform that action at this time.
0 commit comments