5-output-views.adoc 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. [#output-views]
  2. = Most recent action output
  3. This is considered an advanced and experimental feature at the moment.
  4. The `stdout-most-recent-execution` view is a way to display the most recent output of an action on a dashboard. This is useful for actions that are run on a schedule, or actions that are run on startup. This is a picture of what it looks like:
  5. image::mre.png[]
  6. To set this up, here is the configuration you need to add to your `config.yaml` file;
  7. [source,yaml]
  8. ----
  9. actions:
  10. - title: Get status
  11. id: status_command
  12. shell: date
  13. execOnStartup: true
  14. execOnCron:
  15. - "*/1 * * * *"
  16. dashboards:
  17. - title: Control Panel
  18. contents:
  19. - title: Status
  20. type: fieldset
  21. contents:
  22. - type: stdout-most-recent-execution
  23. title: status_command
  24. ----
  25. Note that the output only refreshes with the browser, not when the button is clicked.
  26. As this is an experimental feature, please look at options for xref:troubleshooting/wheretofindhelp.adoc[support] if you need help getting it to work.