实时汇总按实际实例模式显示:仅有 sim 或 live 时只显示对应行。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+9
-2
@@ -452,6 +452,14 @@
|
|||||||
"</tr>"
|
"</tr>"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
const rows = [];
|
||||||
|
if (s.sim.machines > 0) rows.push(modeRow("sim", "sim", s.sim));
|
||||||
|
if (s.live.machines > 0) rows.push(modeRow("live", "live", s.live));
|
||||||
|
if (!rows.length) {
|
||||||
|
box.hidden = true;
|
||||||
|
box.innerHTML = "";
|
||||||
|
return;
|
||||||
|
}
|
||||||
box.hidden = false;
|
box.hidden = false;
|
||||||
box.innerHTML =
|
box.innerHTML =
|
||||||
'<div class="overview-mode-wrap">' +
|
'<div class="overview-mode-wrap">' +
|
||||||
@@ -460,8 +468,7 @@
|
|||||||
"<thead><tr>" +
|
"<thead><tr>" +
|
||||||
"<th>模式</th><th>在线</th><th>离线</th><th>仓位</th><th>浮盈</th><th>权利金</th><th>余额</th>" +
|
"<th>模式</th><th>在线</th><th>离线</th><th>仓位</th><th>浮盈</th><th>权利金</th><th>余额</th>" +
|
||||||
"</tr></thead><tbody>" +
|
"</tr></thead><tbody>" +
|
||||||
modeRow("sim", "sim", s.sim) +
|
rows.join("") +
|
||||||
modeRow("live", "live", s.live) +
|
|
||||||
"</tbody></table></div>";
|
"</tbody></table></div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,6 @@
|
|||||||
<div id="overview-grid"></div>
|
<div id="overview-grid"></div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
<script src="{{ url_for('static', filename='hub.js') }}?v=17"></script>
|
<script src="{{ url_for('static', filename='hub.js') }}?v=18"></script>
|
||||||
<script>HubOverview.boot();</script>
|
<script>HubOverview.boot();</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
Reference in New Issue
Block a user