constants.py 1011 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. from django.contrib.contenttypes.models import ContentType
  2. # Webhook content types
  3. HTTP_CONTENT_TYPE_JSON = 'application/json'
  4. # Dashboard
  5. DEFAULT_DASHBOARD = [
  6. {
  7. 'widget': 'extras.ObjectCountsWidget',
  8. 'width': 4,
  9. 'height': 3,
  10. 'title': 'IPAM',
  11. 'config': {
  12. 'models': [
  13. 'ipam.aggregate',
  14. 'ipam.prefix',
  15. 'ipam.ipaddress',
  16. ]
  17. }
  18. },
  19. {
  20. 'widget': 'extras.ObjectCountsWidget',
  21. 'width': 4,
  22. 'height': 3,
  23. 'title': 'DCIM',
  24. 'config': {
  25. 'models': [
  26. 'dcim.site',
  27. 'dcim.rack',
  28. 'dcim.device',
  29. ]
  30. }
  31. },
  32. {
  33. 'widget': 'extras.NoteWidget',
  34. 'width': 4,
  35. 'height': 3,
  36. 'config': {
  37. 'content': 'Welcome to **NetBox**!'
  38. }
  39. },
  40. {
  41. 'widget': 'extras.ChangeLogWidget',
  42. 'width': 12,
  43. 'height': 6,
  44. },
  45. ]