diff --git a/static/hub.js b/static/hub.js index 4a14e2c..cb7aa3d 100644 --- a/static/hub.js +++ b/static/hub.js @@ -301,7 +301,6 @@ online: 0, offline: 0, positions: 0, - sheets: 0, pnl: 0, premium: 0, cash: 0, @@ -314,10 +313,6 @@ function addOnlineMetrics(bucket, snap) { const brief = snap.positions_brief || snap.positions || []; bucket.positions += brief.length; - brief.forEach(function (p) { - const sheets = numOrNull(p && p.sheets); - if (sheets != null) bucket.sheets += sheets; - }); const pnl = snap.pnl && snap.pnl.unrealized_usdt != null ? numOrNull(snap.pnl.unrealized_usdt) @@ -369,12 +364,6 @@ } function renderAggCards(bucket) { - const posText = - bucket.positions > 0 - ? bucket.positions + - " 笔" + - (bucket.sheets > 0 ? " / " + Math.round(bucket.sheets) + " 张" : "") - : "0"; const items = [ { label: "在线", @@ -386,7 +375,7 @@ value: String(bucket.offline), cls: bucket.offline > 0 ? "status-off" : "", }, - { label: "仓位合计", value: posText }, + { label: "仓位合计", value: String(bucket.positions) }, { label: "浮盈合计", value: bucket.hasPnl ? fmtPnl(bucket.pnl) : "—", @@ -446,13 +435,7 @@ bucket.offline + "" + "