97 lines
3.7 KiB
HTML
97 lines
3.7 KiB
HTML
|
|
{% extends "admin/base_site.html" %}
|
|||
|
|
{% load static %}
|
|||
|
|
|
|||
|
|
{% block extrastyle %}
|
|||
|
|
{{ block.super }}
|
|||
|
|
<link rel="stylesheet" href="{% static 'css/node_traffic.css' %}">
|
|||
|
|
{% endblock %}
|
|||
|
|
|
|||
|
|
{% block extrahead %}
|
|||
|
|
{{ block.super }}
|
|||
|
|
<script defer src="{% static 'js/node_traffic.js' %}"></script>
|
|||
|
|
{% endblock %}
|
|||
|
|
|
|||
|
|
{% block breadcrumbs %}
|
|||
|
|
<div class="breadcrumbs">
|
|||
|
|
<a href="{% url 'admin:index' %}">业务流程</a>
|
|||
|
|
<span>›</span>
|
|||
|
|
<a href="{% url 'admin:index' %}#workflow-nodes">节点运维</a>
|
|||
|
|
<span>›</span>
|
|||
|
|
节点实时流量
|
|||
|
|
</div>
|
|||
|
|
{% endblock %}
|
|||
|
|
|
|||
|
|
{% block content %}
|
|||
|
|
<main class="traffic-monitor" data-endpoint="{% url 'admin-node-traffic-data' %}">
|
|||
|
|
<section class="traffic-hero">
|
|||
|
|
<div>
|
|||
|
|
<span class="traffic-eyebrow">节点运维 · 容量与流量</span>
|
|||
|
|
<h1>节点实时流量监控</h1>
|
|||
|
|
<p>查看每个业务节点的实时吞吐、在线状态和历史趋势。页面仅展示纵横家节点名称,不显示底层专网地址。</p>
|
|||
|
|
</div>
|
|||
|
|
<div class="traffic-live" id="traffic-live"><i></i><span>正在连接监控数据</span></div>
|
|||
|
|
</section>
|
|||
|
|
|
|||
|
|
<section class="traffic-toolbar" aria-label="趋势时间范围">
|
|||
|
|
<div class="traffic-range" role="group">
|
|||
|
|
<button type="button" data-minutes="15">15 分钟</button>
|
|||
|
|
<button type="button" data-minutes="60" class="is-active">1 小时</button>
|
|||
|
|
<button type="button" data-minutes="360">6 小时</button>
|
|||
|
|
<button type="button" data-minutes="1440">24 小时</button>
|
|||
|
|
</div>
|
|||
|
|
<div class="traffic-refresh"><span id="traffic-updated">尚未刷新</span><b>每 5 秒自动刷新</b></div>
|
|||
|
|
</section>
|
|||
|
|
|
|||
|
|
<section class="traffic-node-strip" id="traffic-nodes" aria-label="业务节点">
|
|||
|
|
<div class="traffic-loading">正在读取 {{ node_count }} 个节点……</div>
|
|||
|
|
</section>
|
|||
|
|
|
|||
|
|
<section class="traffic-summary" aria-live="polite">
|
|||
|
|
<article class="metric-card metric-card--down">
|
|||
|
|
<span>实时下载</span>
|
|||
|
|
<strong id="current-download">--</strong>
|
|||
|
|
<small>当前采样速度</small>
|
|||
|
|
</article>
|
|||
|
|
<article class="metric-card metric-card--up">
|
|||
|
|
<span>实时上传</span>
|
|||
|
|
<strong id="current-upload">--</strong>
|
|||
|
|
<small>当前采样速度</small>
|
|||
|
|
</article>
|
|||
|
|
<article class="metric-card">
|
|||
|
|
<span>累计流量</span>
|
|||
|
|
<strong id="total-traffic">--</strong>
|
|||
|
|
<small id="total-breakdown">上传 -- · 下载 --</small>
|
|||
|
|
</article>
|
|||
|
|
<article class="metric-card">
|
|||
|
|
<span>已下发订阅</span>
|
|||
|
|
<strong id="active-subscriptions">--</strong>
|
|||
|
|
<small id="last-seen">等待节点上报</small>
|
|||
|
|
</article>
|
|||
|
|
</section>
|
|||
|
|
|
|||
|
|
<section class="traffic-chart-card">
|
|||
|
|
<div class="traffic-chart-heading">
|
|||
|
|
<div>
|
|||
|
|
<span class="traffic-eyebrow">实时趋势</span>
|
|||
|
|
<h2 id="chart-title">请选择节点</h2>
|
|||
|
|
</div>
|
|||
|
|
<div class="traffic-legend">
|
|||
|
|
<span><i class="legend-download"></i>下载</span>
|
|||
|
|
<span><i class="legend-upload"></i>上传</span>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="traffic-chart-wrap">
|
|||
|
|
<canvas id="traffic-chart" role="img" aria-label="节点上传和下载速度趋势"></canvas>
|
|||
|
|
<div class="traffic-empty" id="traffic-empty">等待节点上报流量数据</div>
|
|||
|
|
<div class="traffic-tooltip" id="traffic-tooltip" hidden></div>
|
|||
|
|
</div>
|
|||
|
|
</section>
|
|||
|
|
|
|||
|
|
<section class="traffic-help">
|
|||
|
|
<div><b>怎么看图?</b><span>蓝线是下载,青线是上传;折线升高代表节点当前承载的流量变大。</span></div>
|
|||
|
|
<div><b>何时扩容?</b><span>速度长期接近线路带宽、用户明显变慢或节点反复离线时,再进入节点配置评估扩容。</span></div>
|
|||
|
|
<a href="/admin/control/node/">进入节点配置</a>
|
|||
|
|
</section>
|
|||
|
|
</main>
|
|||
|
|
{% endblock %}
|