diff --git a/netbox/extras/constants.py b/netbox/extras/constants.py index 6d9f78001..49e29cbba 100644 --- a/netbox/extras/constants.py +++ b/netbox/extras/constants.py @@ -22,7 +22,7 @@ DEFAULT_DASHBOARD = [ { 'widget': 'extras.ObjectCountsWidget', 'width': 4, - 'height': 2, + 'height': 5, 'title': 'Organization', 'config': { 'models': [ @@ -35,7 +35,7 @@ DEFAULT_DASHBOARD = [ { 'widget': 'extras.ObjectCountsWidget', 'width': 4, - 'height': 3, + 'height': 8, 'title': 'IPAM', 'config': { 'models': [ @@ -51,7 +51,7 @@ DEFAULT_DASHBOARD = [ { 'widget': 'extras.NoteWidget', 'width': 4, - 'height': 2, + 'height': 4, 'title': 'Welcome!', 'color': 'green', 'config': { @@ -65,7 +65,7 @@ DEFAULT_DASHBOARD = [ { 'widget': 'extras.ObjectCountsWidget', 'width': 4, - 'height': 2, + 'height': 4, 'title': 'Circuits', 'config': { 'models': [ @@ -78,7 +78,7 @@ DEFAULT_DASHBOARD = [ { 'widget': 'extras.RSSFeedWidget', 'width': 4, - 'height': 4, + 'height': 8, 'title': 'NetBox News', 'config': { 'feed_url': 'http://netbox.dev/rss/', @@ -89,7 +89,7 @@ DEFAULT_DASHBOARD = [ { 'widget': 'extras.ObjectCountsWidget', 'width': 4, - 'height': 3, + 'height': 6, 'title': 'DCIM', 'config': { 'models': [ @@ -104,7 +104,7 @@ DEFAULT_DASHBOARD = [ { 'widget': 'extras.ObjectCountsWidget', 'width': 4, - 'height': 2, + 'height': 4, 'title': 'Virtualization', 'config': { 'models': [ @@ -116,7 +116,7 @@ DEFAULT_DASHBOARD = [ { 'widget': 'extras.ObjectListWidget', 'width': 12, - 'height': 5, + 'height': 10, 'title': 'Change Log', 'color': 'blue', 'config': { diff --git a/netbox/extras/dashboard/widgets.py b/netbox/extras/dashboard/widgets.py index dc68e1388..5c5d2fe31 100644 --- a/netbox/extras/dashboard/widgets.py +++ b/netbox/extras/dashboard/widgets.py @@ -133,7 +133,7 @@ class NoteWidget(DashboardWidget): ) def render(self, request): - return render_markdown(self.config.get('content')) + return render_markdown(self.config.get('content'), "mt-3") @register_widget diff --git a/netbox/project-static/dist/netbox-dark.css b/netbox/project-static/dist/netbox-dark.css index 11110069e..c42b520e8 100644 Binary files a/netbox/project-static/dist/netbox-dark.css and b/netbox/project-static/dist/netbox-dark.css differ diff --git a/netbox/project-static/dist/netbox-light.css b/netbox/project-static/dist/netbox-light.css index 8a3c83af9..873d69370 100644 Binary files a/netbox/project-static/dist/netbox-light.css and b/netbox/project-static/dist/netbox-light.css differ diff --git a/netbox/project-static/dist/netbox-print.css b/netbox/project-static/dist/netbox-print.css index ef2682e0a..cc515e0ec 100644 Binary files a/netbox/project-static/dist/netbox-print.css and b/netbox/project-static/dist/netbox-print.css differ diff --git a/netbox/project-static/dist/netbox.js b/netbox/project-static/dist/netbox.js index 8caaaa9a0..5be587985 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 0201e7bf8..18d935cea 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 df200fffd..7389ff35d 100644 --- a/netbox/project-static/src/dashboard.ts +++ b/netbox/project-static/src/dashboard.ts @@ -35,7 +35,7 @@ export function initDashboard(): void { // Initialize the grid let grid = GridStack.init({ - cellHeight: 100, + cellHeight: 48, disableDrag: true, disableResize: true, draggable: { diff --git a/netbox/project-static/styles/netbox.scss b/netbox/project-static/styles/netbox.scss index b294d67bd..3b2b2ac31 100644 --- a/netbox/project-static/styles/netbox.scss +++ b/netbox/project-static/styles/netbox.scss @@ -109,6 +109,20 @@ table td > .progress { } } +// Remove scrollbars from grid stack cards on Explorer and Firefox +.grid-stack-item-content > .card-body:not(:has(.htmx-container)) { + /* Internet Explorer 10+ */ + -ms-overflow-style: none; + /* Firefox */ + scrollbar-width: none; +} + +// Remove scrollbars from grid stack cards on Safari and Chrome +.grid-stack-item-content > .card-body:not(:has(.htmx-container))::-webkit-scrollbar { + display: none; +} + +// Cards .card > .table.table-flush { margin-bottom: 0; overflow: hidden; @@ -662,6 +676,14 @@ span.color-label { } } +// Override the default GridStack style for the resize handle. +.ui-resizable-se { + bottom: 0 !important; + right: 0 !important; + background-image: none !important; +} + +// Floating forms .form-floating { position: relative; @@ -744,7 +766,7 @@ textarea.form-control[name='csv'] { font-family: $font-family-monospace; } -.card:not(:only-of-type) { +.card:not(:only-of-type) + div:not(.ui-resizable-handle) { margin-bottom: $spacer; } diff --git a/netbox/templates/extras/dashboard/widget.html b/netbox/templates/extras/dashboard/widget.html index 1559363d3..d0026ac57 100644 --- a/netbox/templates/extras/dashboard/widget.html +++ b/netbox/templates/extras/dashboard/widget.html @@ -9,7 +9,7 @@ gs-id="{{ widget.id }}" >