2023-02-24 16:04:00 -05:00
|
|
|
from django.contrib.contenttypes.models import ContentType
|
|
|
|
|
2023-02-28 16:21:01 -05:00
|
|
|
# Webhooks
|
2020-02-24 16:12:46 -05:00
|
|
|
HTTP_CONTENT_TYPE_JSON = 'application/json'
|
2023-02-24 16:04:00 -05:00
|
|
|
|
2023-02-28 16:21:01 -05:00
|
|
|
WEBHOOK_EVENT_TYPES = {
|
|
|
|
'create': 'created',
|
|
|
|
'update': 'updated',
|
|
|
|
'delete': 'deleted',
|
|
|
|
'job_start': 'job_started',
|
|
|
|
'job_end': 'job_ended',
|
|
|
|
}
|
|
|
|
|
2023-02-24 16:04:00 -05:00
|
|
|
# Dashboard
|
|
|
|
DEFAULT_DASHBOARD = [
|
|
|
|
{
|
|
|
|
'widget': 'extras.ObjectCountsWidget',
|
|
|
|
'width': 4,
|
|
|
|
'height': 3,
|
|
|
|
'title': 'IPAM',
|
|
|
|
'config': {
|
|
|
|
'models': [
|
|
|
|
'ipam.aggregate',
|
|
|
|
'ipam.prefix',
|
|
|
|
'ipam.ipaddress',
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'widget': 'extras.ObjectCountsWidget',
|
|
|
|
'width': 4,
|
|
|
|
'height': 3,
|
|
|
|
'title': 'DCIM',
|
|
|
|
'config': {
|
|
|
|
'models': [
|
|
|
|
'dcim.site',
|
|
|
|
'dcim.rack',
|
|
|
|
'dcim.device',
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'widget': 'extras.NoteWidget',
|
|
|
|
'width': 4,
|
|
|
|
'height': 3,
|
|
|
|
'config': {
|
|
|
|
'content': 'Welcome to **NetBox**!'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2023-03-14 08:39:18 -04:00
|
|
|
'widget': 'extras.ObjectListWidget',
|
2023-02-24 16:04:00 -05:00
|
|
|
'width': 12,
|
|
|
|
'height': 6,
|
2023-03-14 08:39:18 -04:00
|
|
|
'title': 'Change Log',
|
|
|
|
'config': {
|
|
|
|
'model': 'extras.objectchange',
|
|
|
|
}
|
2023-02-24 16:04:00 -05:00
|
|
|
},
|
|
|
|
]
|