mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-26 09:16:10 -06:00
Docs and defaults
This commit is contained in:
parent
b03ce4d1d6
commit
b891bd1889
@ -11,6 +11,7 @@ This parameter must specify an iterable of dictionaries, each representing a dis
|
||||
* `height`: Default widget height, in rows
|
||||
* `title`: Widget title
|
||||
* `color`: Color of the widget's title bar, specified by name
|
||||
* `icon_name`: Icon name from Material design icons (e.g. "earth")
|
||||
* `config`: Dictionary mapping of any widget configuration parameters
|
||||
|
||||
A brief example configuration is provided below.
|
||||
@ -20,8 +21,9 @@ DEFAULT_DASHBOARD = [
|
||||
{
|
||||
'widget': 'extras.ObjectCountsWidget',
|
||||
'width': 4,
|
||||
'height': 2,
|
||||
'height': 5,
|
||||
'title': 'Organization',
|
||||
'icon_name': 'domain',
|
||||
'config': {
|
||||
'models': [
|
||||
'dcim.site',
|
||||
@ -32,13 +34,19 @@ DEFAULT_DASHBOARD = [
|
||||
},
|
||||
{
|
||||
'widget': 'extras.ObjectCountsWidget',
|
||||
'width': 4,
|
||||
'height': 8,
|
||||
'title': 'IPAM',
|
||||
'color': 'blue',
|
||||
'icon_name': 'counter',
|
||||
'config': {
|
||||
'models': [
|
||||
'ipam.vrf',
|
||||
'ipam.aggregate',
|
||||
'ipam.prefix',
|
||||
'ipam.iprange',
|
||||
'ipam.ipaddress',
|
||||
'ipam.vlan',
|
||||
]
|
||||
}
|
||||
},
|
||||
|
@ -24,6 +24,7 @@ DEFAULT_DASHBOARD = [
|
||||
'width': 4,
|
||||
'height': 5,
|
||||
'title': 'Organization',
|
||||
'icon_name': 'domain',
|
||||
'config': {
|
||||
'models': [
|
||||
'dcim.site',
|
||||
@ -37,6 +38,7 @@ DEFAULT_DASHBOARD = [
|
||||
'width': 4,
|
||||
'height': 8,
|
||||
'title': 'IPAM',
|
||||
'icon_name': 'counter',
|
||||
'config': {
|
||||
'models': [
|
||||
'ipam.vrf',
|
||||
@ -67,6 +69,7 @@ DEFAULT_DASHBOARD = [
|
||||
'width': 4,
|
||||
'height': 4,
|
||||
'title': 'Circuits',
|
||||
'icon_name': 'transit-connection-variant',
|
||||
'config': {
|
||||
'models': [
|
||||
'circuits.provider',
|
||||
@ -80,6 +83,7 @@ DEFAULT_DASHBOARD = [
|
||||
'width': 4,
|
||||
'height': 8,
|
||||
'title': 'NetBox News',
|
||||
'icon_name': 'newspaper-variant-outline',
|
||||
'config': {
|
||||
'feed_url': 'http://netbox.dev/rss/',
|
||||
'max_entries': 10,
|
||||
@ -91,6 +95,7 @@ DEFAULT_DASHBOARD = [
|
||||
'width': 4,
|
||||
'height': 6,
|
||||
'title': 'DCIM',
|
||||
'icon_name': 'server',
|
||||
'config': {
|
||||
'models': [
|
||||
'dcim.site',
|
||||
@ -106,6 +111,7 @@ DEFAULT_DASHBOARD = [
|
||||
'width': 4,
|
||||
'height': 4,
|
||||
'title': 'Virtualization',
|
||||
'icon_name': 'monitor',
|
||||
'config': {
|
||||
'models': [
|
||||
'virtualization.cluster',
|
||||
@ -118,6 +124,7 @@ DEFAULT_DASHBOARD = [
|
||||
'width': 12,
|
||||
'height': 10,
|
||||
'title': 'Change Log',
|
||||
'icon_name': 'clipboard-clock',
|
||||
'color': 'blue',
|
||||
'config': {
|
||||
'model': 'extras.objectchange',
|
||||
|
@ -72,6 +72,7 @@ def get_default_dashboard():
|
||||
'class': widget['widget'],
|
||||
'title': widget.get('title'),
|
||||
'color': widget.get('color'),
|
||||
'icon_name': widget.get('icon_name'),
|
||||
'config': widget.get('config', {}),
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user