<div id="macros">
{% macro render_status(status) -%}
    {% if status == 'success' -%}
        <span data-toggle="tooltip" data-placement="bottom" title="Playbook completed successfully" class="pficon pficon-ok list-view-pf-icon-sm list-view-pf-icon-success"></span>
    {% elif status == 'failed' -%}
        <span data-toggle="tooltip" data-placement="bottom" title="Playbook completed with errors" class="pficon pficon-error-circle-o list-view-pf-icon-sm list-view-pf-icon-danger"></span>
    {% elif status == 'incomplete' -%}
        <span data-toggle="tooltip" data-placement="bottom" title="Playbook execution is either in progress or was interrupted: data will be inconsistent" class="pficon pficon-info list-view-pf-icon-sm list-view-pf-icon-info"></span>
    {% else -%}
        <span data-toggle="tooltip" data-placement="bottom" title="The status of this playbook is unknown" class="fa fa-question-circle"></span>
    {% endif -%}
{% endmacro -%}

{% macro result_page_length(length) -%}
    {% if length == 0 -%}
        "paging": false,
    {% else -%}
        "pageLength": {{ length }}
    {% endif -%}
{% endmacro -%}
</div>
