3-folders.adoc 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. [#folders]
  2. = Folders (Directories)
  3. Folders (Directories) are a good way to group up actions in the same way that you would
  4. organize files on your computer into directories.
  5. image::folders.png[]
  6. You must first create a dashboard to use a directory, and then you "reference" actions that you
  7. want in that folder based on the action name. Anything without a "contents" property is treated
  8. as an action.
  9. Let's look at the example below with 4 actions, 2 top level folders and 1 subfolder.
  10. .`config.yaml`
  11. [source,yaml]
  12. ----
  13. actions:
  14. - title: Action 1
  15. shell: echo "action1"
  16. - title: Action 2
  17. shell: echo "action2"
  18. - title: Action 3
  19. shell: echo "action3"
  20. - title: Action 4
  21. shell: echo "action4"
  22. dashboards:
  23. - title: My First Dashboard
  24. contents:
  25. - title: Fieldset 1
  26. type: fieldset
  27. contents:
  28. - title: Folder 1
  29. contents:
  30. - title: Action 1
  31. - title: Action 2
  32. - title: Subfolder 2
  33. contents:
  34. - title: Action 3
  35. - title: Folder 2
  36. contents:
  37. - title: Action 4
  38. ----