entity-directories.adoc 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. = Entity Directories
  2. NOTE: Entity directories were added in 3000.6.0.
  3. Entity directories are a way of grouping actions together based on a single entity instance.
  4. For example, if you have a `server` entity, you can create a directory called `servers` and then add all the actions that you want to apply to all servers to that directory.
  5. In the default config, **More Options** is an **entity directory** because it's parent is a fieldset that is defined with an `entity` property.
  6. [source,yaml]
  7. ----
  8. - type: fieldset
  9. entity: server
  10. title: 'Server: {{ .CurrentEntity.hostname }}'
  11. contents:
  12. # By default OliveTin will look for an action with a matching title
  13. # and put it on the dashboard.
  14. #
  15. # Fieldsets also support `type: display`, which can display arbitary
  16. # text. This is useful for displaying things like a container's state.
  17. - type: display
  18. title: |
  19. Hostname: <strong>{{ server.name }}</strong>
  20. IP Address: <strong>{{ server.ip }}</strong>
  21. # These are the actions (defined above) that we want on the dashboard.
  22. - title: '{{ server.name }} Wake on Lan'
  23. - title: '{{ server.name }} Power Off'
  24. - title: More Options
  25. type: directory
  26. contents:
  27. - title: '{{ server.name }} Print server name'
  28. ----