{% extends "layout.html" %} {% block head %} {{ super() }} {% endblock head %} {% block content %}

资源概览

虚拟机 TOP 10

CPU

{% for item in guests_current_top_10_ret.data.cpu_load %} {% if item.guest_uuid not in guests_mapping_by_uuid %}{% continue %}{% endif %} {% endfor %}
实例 负载
{{ guests_mapping_by_uuid[item.guest_uuid].label }}/{{ guests_mapping_by_uuid[item.guest_uuid].remark }}

网络流量

{% for item in guests_current_top_10_ret.data.rt_bytes %} {% if item.guest_uuid not in guests_mapping_by_uuid %}{% continue %}{% endif %} {% endfor %}
实例 流量
{{ guests_mapping_by_uuid[item.guest_uuid].label }}/{{ guests_mapping_by_uuid[item.guest_uuid].remark }} {% if item.rt_bytes * 8 >= 1000**3 %} {{ '%0.1f'| format(item.rt_bytes * 8 / 1000**3) }} Gbps {% elif item.rt_bytes * 8 >= 1000**2 %} {{ '%0.1f'| format(item.rt_bytes * 8 / 1000**2) }} Mbps {% elif item.rt_bytes * 8 >= 1000 %} {{ '%0.1f'| format(item.rt_bytes * 8 / 1000) }} kbps {% else %} {{ item.rt_bytes * 8 }} bps {% endif %}
{% endblock content %}