Add initial funds to fleet stats and color total PnL.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -6,6 +6,7 @@ type FleetStatsRow = {
|
||||
name: string;
|
||||
ok: boolean;
|
||||
error?: string | null;
|
||||
initial_funds?: number | null;
|
||||
latest_funds?: number | null;
|
||||
groups?: number | null;
|
||||
fees_perp?: number | null;
|
||||
@@ -82,6 +83,7 @@ export default function StatsPage() {
|
||||
<thead>
|
||||
<tr>
|
||||
<th>机器名</th>
|
||||
<th>初始资金</th>
|
||||
<th>最新资金</th>
|
||||
<th>轮次</th>
|
||||
<th>永续手续费</th>
|
||||
@@ -103,6 +105,9 @@ export default function StatsPage() {
|
||||
</div>
|
||||
) : null}
|
||||
</td>
|
||||
<td className="mono">
|
||||
{row.ok ? fmt(row.initial_funds ?? 0, 2) : "—"}
|
||||
</td>
|
||||
<td className="mono">
|
||||
{row.ok ? fmt(row.latest_funds ?? 0, 2) : "—"}
|
||||
</td>
|
||||
@@ -139,6 +144,7 @@ export default function StatsPage() {
|
||||
({okRows.length}/{fleetStats.length})
|
||||
</span>
|
||||
</td>
|
||||
<td className="mono">{fmt(sum("initial_funds"), 2)}</td>
|
||||
<td className="mono">{fmt(sum("latest_funds"), 2)}</td>
|
||||
<td className="mono">{sum("groups")}</td>
|
||||
<td className="mono">{fmt(sum("fees_perp"), 4)}</td>
|
||||
|
||||
@@ -422,6 +422,18 @@ input {
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.stats-table tfoot .stats-total-row td.pnl-pos {
|
||||
color: var(--pnl-pos);
|
||||
}
|
||||
|
||||
.stats-table tfoot .stats-total-row td.pnl-neg {
|
||||
color: var(--pnl-neg);
|
||||
}
|
||||
|
||||
.stats-table tfoot .stats-total-row td.pnl-flat {
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.btn-sm {
|
||||
padding: 4px 8px;
|
||||
font-size: 0.78rem;
|
||||
|
||||
Reference in New Issue
Block a user