diff --git a/netbox/project-static/dist/netbox.js b/netbox/project-static/dist/netbox.js index 5be587985..049559b98 100644 Binary files a/netbox/project-static/dist/netbox.js and b/netbox/project-static/dist/netbox.js differ diff --git a/netbox/project-static/dist/netbox.js.map b/netbox/project-static/dist/netbox.js.map index 18d935cea..061af7870 100644 Binary files a/netbox/project-static/dist/netbox.js.map and b/netbox/project-static/dist/netbox.js.map differ diff --git a/netbox/project-static/src/dashboard.ts b/netbox/project-static/src/dashboard.ts index 7389ff35d..80680b264 100644 --- a/netbox/project-static/src/dashboard.ts +++ b/netbox/project-static/src/dashboard.ts @@ -4,16 +4,28 @@ import { apiPatch, hasError } from './util'; function lockDashboard(): void { const dashboard = document.getElementById('dashboard') as any; + const gridUnlockButton = document.getElementById('unlock_dashboard') as HTMLButtonElement; + const gridLockButton = document.getElementById('lock_dashboard') as HTMLButtonElement; if (dashboard) { dashboard.gridstack.disable(); } + if (gridUnlockButton && gridLockButton) { + gridUnlockButton.classList.remove('invisible'); + gridLockButton.classList.add('invisible'); + } } function unlockDashboard(): void { const dashboard = document.getElementById('dashboard') as any; + const gridUnlockButton = document.getElementById('unlock_dashboard') as HTMLButtonElement; + const gridLockButton = document.getElementById('lock_dashboard') as HTMLButtonElement; if (dashboard) { dashboard.gridstack.enable(); } + if (gridUnlockButton && gridLockButton) { + gridUnlockButton.classList.add('invisible'); + gridLockButton.classList.remove('invisible'); + } } async function saveDashboardLayout( diff --git a/netbox/templates/home.html b/netbox/templates/home.html index 31c0f1798..a90d095cb 100644 --- a/netbox/templates/home.html +++ b/netbox/templates/home.html @@ -42,7 +42,8 @@