intro.adoc 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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::dashboards/intro/preview.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. [#categorize-dashboards-in-the-sidebar]
  70. == Categorize dashboards in the sidebar
  71. When you have several root dashboards, you can group them under collapsible category headings in the sidebar with an optional `category` field on each root dashboard:
  72. [source,yaml]
  73. .`config.yaml`
  74. ----
  75. dashboards:
  76. - title: My Servers
  77. category: Infrastructure
  78. contents:
  79. - title: Ping All Servers
  80. - title: My Containers
  81. category: Infrastructure
  82. contents:
  83. - title: Restart nginx
  84. - title: Status Board
  85. category: Monitoring
  86. contents:
  87. - title: Show uptime
  88. - title: Misc Tools
  89. contents:
  90. - title: Hello World
  91. ----
  92. Dashboards that share the same `category` value are grouped together. Category order follows the first time each category appears in the config among dashboards the user can see. Dashboards without a `category` appear above the category sections. Nested items under `contents` do not use `category`.
  93. Categories are shown when `sectionNavigationStyle` is `sidebar` (the default). See xref:advanced_configuration/webui.adoc#section-navgiation-style[Section Navigation Style].
  94. == What's Next?
  95. Now that you understand dashboards, explore these related features:
  96. * xref:dashboards/2-fieldsets.adoc[Learn about fieldsets] - Group actions visually on dashboards
  97. * xref:dashboards/3-folders.adoc[Organize with folders] - Create folder structures for better organization
  98. * xref:dashboards/4-displays.adoc[Add displays] - Show information alongside actions
  99. * xref:dashboards/faq-display-hyperlinks.adoc[FAQ: Hyperlinks in displays] - Clickable links in display components
  100. * xref:dashboards/5-output-views.adoc[Configure output views] - Customize how action output is displayed
  101. * xref:entities/intro.adoc[Use entities with dashboards] - Dynamically generate actions from entity files
  102. * xref:dashboards/examples.adoc[View dashboard examples] - See complete dashboard configurations
  103. * xref:dashboards/css.adoc[Customize dashboard styling] - Change the appearance of dashboard components