PaloAltoNetworks / panhandler

Panhandler is a tool to manage config snippets and Skillets for PAN-OS devices
Apache License 2.0
41 stars 19 forks source link

FR: Any skillet should be able to specify an output template #177

Closed nembery closed 3 years ago

nembery commented 4 years ago

Add a label called output_template that's value is a relative path to a jinja2 template to load and render using the results / output of the skillet. Currently, REST type skillets simply show the raw JSON or text output on the results screen. To format the results at all, currently requires the skillet builder to create a workflow to kick off their skillet then another template skillet to display the results.

I feel this is common enough that we can just bake it in. After a skillet executes, check the metadata config for a label called 'output_template' and if found, attempt to load and render it. The rendered output will then be sent to the results screen