intro.adoc 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. [#dashboards]
  2. = Dashboards
  3. OliveTin generates a default view of actions which is useful for simple OliveTin use cases - this is always called "Actions" and cannot be renamed. The Actions view also does not support entities, fieldsets or folders.
  4. If you want to start organizing OliveTin actions more effectively, then **Dashboards** are for you!
  5. One of the biggest reasons to use Dashboards as opposed to just the "Actions" section, is that dashboards allow you to use xref:dashboards/3-folders.adoc[Folders], and dashboards really start to get exciting when you start using xref:entities/intro.adoc[entities] and displays.
  6. image::dashboard.png[]
  7. == Dashboards pull actions from the default view
  8. Dashboards are a way of pulling actions from the default "actions" view, and organizing them into groups - either into folders, or fieldsets. Because dashboards literally do "pull" actions from the default view, you cannot use an action in multiple dashboards - and every action must have a unique title.
  9. == Example configuration
  10. [source,yaml]
  11. .`config.yaml`
  12. ----
  13. # Actions MUST be defined in the actions section, not in the dashboards
  14. # section. The dashboards only "link" to actions by their title.
  15. actions:
  16. - title: Ping All Servers
  17. shell: echo "ping all..."
  18. - title: '{{ server.name }} Wake on Lan'
  19. shell: 'wol {{ server.name }}'
  20. timeout: 10
  21. entity: server
  22. - title: '{{ server.name }} Power Off'
  23. shell: 'ssh root@{{ server.name }} "poweroff"'
  24. timeout: 10
  25. entity: server
  26. # Dashboards are a way of taking actions from the default "actions" view, and
  27. # organizing them into groups - either into folders, or fieldsets.
  28. #
  29. # The only way to properly use entities, are to use them with a `fieldset` on
  30. # a dashboard.
  31. dashboards:
  32. # Top level items are dashboards.
  33. - title: My Servers
  34. contents:
  35. # On dashboards, all items need to be in a "fieldset". If you don't
  36. # specify a fieldset, actions will be assigned to a fieldset with a title
  37. # called "default".
  38. - title: All Servers
  39. type: fieldset
  40. contents:
  41. # The contents of a dashboard will try to look for an action with a
  42. # matching title IF the `contents: ` property is empty.
  43. - title: Ping All Servers
  44. # If you create an item with some "contents:", OliveTin will show that as
  45. # directory.
  46. - title: Hypervisors
  47. contents:
  48. - title: Ping hypervisor1
  49. - title: Ping hypervisor2
  50. # If you specify `type: fieldset` and some `contents`, it will show your
  51. # actions grouped together without a folder.
  52. - type: fieldset
  53. entity: server
  54. title: 'Server: {{ server.hostname }}'
  55. contents:
  56. # By default OliveTin will look for an action with a matching title
  57. # and put it on the dashboard.
  58. #
  59. # Fieldsets also support `type: display`, which can display arbitary
  60. # text. This is useful for displaying things like a container's state.
  61. - type: display
  62. title: |
  63. Hostname: <strong>{{ server.name }}</strong>
  64. IP Address: <strong>{{ server.ip }}</strong>
  65. # These are the actions (defined above) that we want on the dashboard.
  66. - title: '{{ server.name }} Wake on Lan'
  67. - title: '{{ server.name }} Power Off'
  68. ----
  69. == What's Next?
  70. Now that you understand dashboards, explore these related features:
  71. * xref:dashboards/2-fieldsets.adoc[Learn about fieldsets] - Group actions visually on dashboards
  72. * xref:dashboards/3-folders.adoc[Organize with folders] - Create folder structures for better organization
  73. * xref:dashboards/4-displays.adoc[Add displays] - Show information alongside actions
  74. * xref:dashboards/5-output-views.adoc[Configure output views] - Customize how action output is displayed
  75. * xref:entities/intro.adoc[Use entities with dashboards] - Dynamically generate actions from entity files
  76. * xref:dashboards/examples.adoc[View dashboard examples] - See complete dashboard configurations
  77. * xref:dashboards/css.adoc[Customize dashboard styling] - Change the appearance of dashboard components