51 lines
1.1 KiB
Plaintext
51 lines
1.1 KiB
Plaintext
[#folders]
|
|
= Folders (Directories)
|
|
|
|
Folders (Directories) are a good way to group up actions in the same way that you would
|
|
organize files on your computer into directories.
|
|
|
|
image::dashboards/folders/folders.png[]
|
|
|
|
You must first create a dashboard to use a directory, and then you "reference" actions that you
|
|
want in that folder based on the action name. Anything without a "contents" property is treated
|
|
as an action.
|
|
|
|
Let's look at the example below with 4 actions, 2 top level folders and 1 subfolder.
|
|
|
|
.`config.yaml`
|
|
[source,yaml]
|
|
----
|
|
actions:
|
|
- title: Action 1
|
|
shell: echo "action1"
|
|
|
|
- title: Action 2
|
|
shell: echo "action2"
|
|
|
|
- title: Action 3
|
|
shell: echo "action3"
|
|
|
|
- title: Action 4
|
|
shell: echo "action4"
|
|
|
|
dashboards:
|
|
- title: My First Dashboard
|
|
contents:
|
|
- title: Fieldset 1
|
|
type: fieldset
|
|
contents:
|
|
- title: Folder 1
|
|
contents:
|
|
- title: Action 1
|
|
- title: Action 2
|
|
|
|
- title: Subfolder 2
|
|
contents:
|
|
- title: Action 3
|
|
|
|
- title: Folder 2
|
|
contents:
|
|
- title: Action 4
|
|
|
|
----
|