{% macro facts_table(facts, current_env, autofocus=False, condensed=False, show_node=False, show_value=True, link_facts=False, margin_top=20, margin_bottom=20) -%}
{% if show_node %}
Node |
{% else %}
Fact |
{% endif %}
{% if show_value %}
Value |
{% endif %}
{% for fact in facts %}
{% if show_node %}
{{fact.node}} |
{% else %}
{{fact.name}} |
{% endif %}
{% if show_value %}
{% if link_facts %}
{% if fact.value is mapping %}
{{fact.value|jsonprint}}
{% else %}
{{fact.value}}
{% endif %}
{% else %}
{% if fact.value is mapping %}
{{fact.value|jsonprint}}
{% else %}
{{fact.value}}
{% endif %}
{% endif %}
|
{% endif %}
{% endfor %}
{%- endmacro %}
{% macro facts_graph(facts, autofocus=False, condensed=False, show_node=False, margin_top=20, margin_bottom=20) -%}
{%- endmacro %}
{% macro reports_table(reports, reports_count, report_event_counts, current_env, condensed=False, hash_truncate=False, show_conf_col=True, show_agent_col=True, show_host_col=True, show_run_col=False, show_full_col=False, show_search_bar=False, searchable=False) -%}
{% if show_search_bar %}
{% endif %}
Only showing {{reports_count}} reports sorted by Start Time.
Start time |
Status |
{% if show_host_col %}
Hostname |
{% endif %}
{% if show_run_col %}
Run time |
{% endif %}
{% if show_full_col %}
Full report |
{% endif %}
{% if show_conf_col %}
Configuration version |
{% endif %}
{% if show_agent_col %}
Agent version |
{% endif %}
{% for report in reports %}
{% if hash_truncate %}
{% set rep_hash = "%s…"|format(report.hash_[0:10])|safe %}
{% else %}
{% set rep_hash = report.hash_ %}
{% endif %}
{% if report.failed %}
{% else %}
{% endif %}
{{report.start}} |
{% call status_counts(status=report.status, node_name=report.node, events=report_event_counts[report.hash_], report_hash=report.hash_, current_env=current_env) %}{% endcall %}
|
{% if show_host_col %}
{{ report.node }} |
{% endif %}
{% if show_run_col %}
{{report.run_time}} |
{% endif %}
{% if show_full_col %}
{{rep_hash}} |
{% endif %}
{% if show_conf_col %}
{{report.version}} |
{% endif %}
{% if show_agent_col %}
{{report.agent_version}} |
{% endif %}
{% endfor %}
{%- endmacro %}
{% macro status_counts(caller, status, node_name, events, current_env, unreported_time=False, report_hash=False) -%}
{{status}}
{% if status == 'unreported' %}
{{ unreported_time }}
{% else %}
{% if events['failures'] %}{{events['failures']}}{% else %}0{% endif%}
{% if events['successes'] %}{{events['successes']}}{% else %}0{% endif%}
{% if events['skips'] %}{{events['skips']}}{% else %}0{% endif%}
{% endif %}
{%- endmacro %}
{% macro render_pagination(pagination) -%}
{% endmacro %}