{% extends "base.html" %} {% from "_macros.html" import crumbs %} {% block title %}{{ host.name }} — Host Agent — Steward{% endblock %} {% block breadcrumb %}{{ crumbs([("Hosts", "/hosts/"), (host.name, "/hosts/" ~ host.id), ("Metrics", "")]) }}{% endblock %} {% macro fmt_bps(v) %} {%- if v is none -%}— {%- elif v >= 1048576 -%}{{ "%.1f"|format(v / 1048576) }} MB/s {%- elif v >= 1024 -%}{{ "%.1f"|format(v / 1024) }} KB/s {%- else -%}{{ "%.0f"|format(v) }} B/s {%- endif -%} {% endmacro %} {% macro fmt_bytes(v) %} {%- if v is none -%}— {%- elif v >= 1125899906842624 -%}{{ "%.1f"|format(v / 1125899906842624) }} PB {%- elif v >= 1099511627776 -%}{{ "%.1f"|format(v / 1099511627776) }} TB {%- elif v >= 1073741824 -%}{{ "%.1f"|format(v / 1073741824) }} GB {%- elif v >= 1048576 -%}{{ "%.0f"|format(v / 1048576) }} MB {%- else -%}{{ "%.0f"|format(v / 1024) }} KB {%- endif -%} {% endmacro %} {% macro bar(pct) %} {%- set p = pct if pct is not none else 0 -%}
{% endmacro %} {% block content %}