feat: only shows top level monitors on dashboard and children on dedicated page

This commit is contained in:
Brock H Caldwell
2025-11-05 22:35:12 -06:00
parent 55ab9d840e
commit a9031df3c3
4 changed files with 21 additions and 1 deletions

View File

@@ -23,7 +23,12 @@ export default class extends Controller {
}
if (null !== content && undefined !== content && "" !== content) {
document.dispatchEvent(new CustomEvent('showPreviewContentModal', {detail: {heading: heading, content: content}}))
if (['', null, undefined].includes(monitor.getAttribute('parent-id'))) {
window.location.href = `/monitors/${monitor.getAttribute('monitor-id')}`;
} else {
document.dispatchEvent(new CustomEvent('showPreviewContentModal', {detail: {heading: heading, content: content}}))
}
}
})
})