{% from "_monitoring_widgets.html" import normalized_widget, metric_value with context %} {% macro compact_graph(graph, chart='line') -%} {% if graph %}
{% if chart in ('pie', 'donut') and graph.slices %}
{% set r = '10.5' if chart == 'pie' else '15.9155' %}{% for sl in graph.slices %}{{ sl.label }}: {{ sl.display }} ({{ sl.percent }} %){% endfor %}

Latest values

{% else %}{% for series in graph.series[:2] %}
{{ series.label }}{{ series.latest_display }}
{% if chart == 'bar' and series.bars %}{% for b in series.bars %}{% endfor %}{% else %}{% if chart == 'area' and series.area %}{% endif %}{% endif %}
{% endfor %}{% endif %}
{% endif %} {%- endmacro %} {% macro chart_menu(capability, inventory, session, chart, own) -%}
{% for key, label in chart_types %}{% endfor %}
{%- endmacro %} {% macro capability_card(capability, inventory, session) -%} {% set state_class = 'status-success' if capability.display_state == 'Fresh' else 'status-warning' if capability.display_state in ['Stale', 'Not collected'] else 'status-neutral' %}
{% set source_feature = (feature_by_capability or {}).get(capability.id) %}

{{ capability.name }} {{ fresh_tag(capability.id) }}{% if source_feature and source_feature.source %} {{ source_feature.source }}{% endif %}

{{ capability.description }}

{% set own_chart = ((view_prefs or {}).get('charts') or {}).get(capability.id) %}{% set chart = own_chart or (view_prefs or {}).get('chart') or 'line' %}
{% if capability.graph and chart_types %}{{ chart_menu(capability, inventory, session, chart, own_chart) }}{% endif %}{% if state_class == 'status-warning' %}{% else %}{{ capability.display_state }}{% endif %}
{% set cid = capability.id|replace('.', '-') %}
{% if capability.graph %}{% endif %} {% if capability.widget %}{% endif %}
{% if capability.graph %}{% endif %}{% if capability.widget %}{% endif %}
{% if capability.widget and capability.widget.kind == 'normalized_metric_list' and capability.widget.summary %}{{ metric_value(capability.widget.summary) }} {% elif capability.widget and capability.widget.kind == 'interface_cumulative_totals' %}{{ capability.widget.observed_interface_count }} observed interfaces{{ capability.widget.nonzero_total_count }} active traffic pairs · {{ capability.widget.zero_total_count }} all-zero pairs {% elif capability.state == 'not_collected' %}No current normalized value {% elif capability.state == 'supported_not_configured' %}No approved monitoring path configured {% endif %}
{{ compact_graph(capability.graph, chart) }} {% set feature = (feature_by_capability or {}).get(capability.id) %}{% if feature %}
{% endif %}
{% if capability.graph %}
{% if capability.graph %}
{% for series in capability.graph.series %}
{{ series.latest_display }}{{ series.label }} current{{ series.sample_count }} samples · min/max {{ series.range_display }}
{% endfor %}
{% endif %}
{% endif %} {% if capability.widget %}
{% if capability.widget %}{{ normalized_widget(capability.widget, complete=true) }}{% elif capability.state == 'not_collected' %}

Normalized telemetry has not been collected yet.

{% endif %}
{% endif %}
{% if capability.options %}
{% if capability.id in ['capability.interface-traffic', 'capability.interfaces', 'capability.guests'] %}
May use a lot of resources. On large devices (for example routers with many interfaces or hosts with many guests) this check can take long and load the device and this Portal every minute.
{% endif %}
{% elif capability.state == 'supported_not_configured' %}

No approved monitoring path is currently available for assignment.

{% endif %}

{{ capability.state_description }}

Capability identifier: {{ capability.id }}

{% if capability.policy %}

Platform profile policy: {{ capability.policy }}.

{% endif %}{% if capability.bindings %}

Configured monitoring source:

    {% for binding in capability.bindings %}
  • {{ binding.id }}{{ binding.profile_name }} · {{ binding.collector_type }}{% if binding.assigned %} · operator assigned{% endif %}
  • {% endfor %}
{% endif %}
{%- endmacro %}