Skip to content

Commit d28450c

Browse files
committed
Merge branch 'bugfix/ARTESCA-17585' into q/133.0
2 parents f8f9b83 + b5a7fd9 commit d28450c

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

ui/src/components/PlatformGlobalHealthBarFederated.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,13 @@ export default function PlatformGlobalHealthBarFederated({
3434
* The prometheus client could not be initialized in the parent component rendering it.
3535
*/
3636
useLayoutEffect(() => {
37-
if (token) {
37+
if (prometheusUrl) {
3838
initializePrometheus(prometheusUrl);
39+
}
40+
}, [prometheusUrl]);
41+
42+
useLayoutEffect(() => {
43+
if (token) {
3944
setHeaders({ Authorization: `Bearer ${token}` });
4045
}
4146
}, [prometheusUrl, token]);

0 commit comments

Comments
 (0)