Skip to content

Commit

Permalink
Configure default dashboard
Browse files Browse the repository at this point in the history
Apply defaults from 4.2.4 but remove news widget to avoid pulling
content from the internet.

Signed-off-by: Georg Pfuetzenreuter <[email protected]>
  • Loading branch information
tacerus committed Feb 27, 2025
1 parent 2bc63ab commit 792dc45
Showing 1 changed file with 105 additions and 0 deletions.
105 changes: 105 additions & 0 deletions configuration/extra.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,108 @@
# from datetime import datetime
# now = datetime.now().strftime("%d/%m/%Y %H:%M:%S")
# BANNER_TOP = f'<marquee width="200px">This instance started on {now}.</marquee>'

DEFAULT_DASHBOARD = [
{
'widget': 'extras.BookmarksWidget',
'width': 4,
'height': 5,
'title': 'Bookmarks',
'color': 'orange',
},
{
'widget': 'extras.ObjectCountsWidget',
'width': 4,
'height': 2,
'title': 'Organization',
'config': {
'models': [
'dcim.site',
'tenancy.tenant',
'tenancy.contact',
]
}
},
{
'widget': 'extras.NoteWidget',
'width': 4,
'height': 2,
'title': 'Welcome!',
'color': 'green',
'config': {
'content': (
'This is your personal dashboard. Feel free to customize it by rearranging, resizing, or removing '
'widgets. You can also add new widgets using the "add widget" button below. Any changes affect only '
'_your_ dashboard, so feel free to experiment!'
)
}
},
{
'widget': 'extras.ObjectCountsWidget',
'width': 4,
'height': 3,
'title': 'IPAM',
'config': {
'models': [
'ipam.vrf',
'ipam.aggregate',
'ipam.prefix',
'ipam.iprange',
'ipam.ipaddress',
'ipam.vlan',
]
}
},
{
'widget': 'extras.ObjectCountsWidget',
'width': 4,
'height': 3,
'title': 'Circuits',
'config': {
'models': [
'circuits.provider',
'circuits.circuit',
'circuits.providernetwork',
'circuits.provideraccount',
]
}
},
{
'widget': 'extras.ObjectCountsWidget',
'width': 4,
'height': 3,
'title': 'DCIM',
'config': {
'models': [
'dcim.site',
'dcim.rack',
'dcim.devicetype',
'dcim.device',
'dcim.cable',
],
}
},
{
'widget': 'extras.ObjectCountsWidget',
'width': 4,
'height': 2,
'title': 'Virtualization',
'config': {
'models': [
'virtualization.cluster',
'virtualization.virtualmachine',
]
}
},
{
'widget': 'extras.ObjectListWidget',
'width': 12,
'height': 5,
'title': 'Change Log',
'color': 'blue',
'config': {
'model': 'core.objectchange',
'page_size': 25,
}
},
]

0 comments on commit 792dc45

Please sign in to comment.