From 18423a988892caab4905a532fe01d78db9419103 Mon Sep 17 00:00:00 2001 From: James Read Date: Thu, 23 May 2024 09:22:08 +0100 Subject: [PATCH] bugfix: Default load dashboard when it contains multiple spaces (#318) --- webui.dev/js/marshaller.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/webui.dev/js/marshaller.js b/webui.dev/js/marshaller.js index 722dc4f..474fe5a 100644 --- a/webui.dev/js/marshaller.js +++ b/webui.dev/js/marshaller.js @@ -97,8 +97,10 @@ function onExecutionFinished (evt) { } function showSection (title) { + title = title.replaceAll(' ', '') + for (const section of document.querySelectorAll('section')) { - if (section.title.replace(' ', '') === title) { + if (section.title === title) { section.style.display = 'block' } else { section.style.display = 'none' @@ -174,7 +176,7 @@ function marshalDashboardStructureToHtml (json) { } const section = document.createElement('section') - section.title = dashboard.title + section.title = dashboard.title.replaceAll(' ', '') const def = createFieldset('default', section) section.appendChild(def)