feat: Jobs infrastructure, endpoints, UI and worker prioritization
This commit is contained in:
@@ -35,6 +35,10 @@
|
||||
<span>Alerts</span>
|
||||
<span class="badge" id="alertBadge" style="display:none">0</span>
|
||||
</a>
|
||||
<a href="#" class="nav-item" data-page="jobs">
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="2" y="7" width="20" height="14" rx="2" ry="2"/><path d="M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"/></svg>
|
||||
<span>Jobs</span>
|
||||
</a>
|
||||
</nav>
|
||||
<div class="sidebar-footer">
|
||||
<a href="/swagger" target="_blank" class="nav-item">
|
||||
@@ -126,9 +130,30 @@
|
||||
|
||||
<!-- Traders Page -->
|
||||
<section class="page" id="page-traders">
|
||||
<div style="display:flex; justify-content:space-between; align-items:center; margin-bottom:24px;">
|
||||
<div style="display:flex; align-items:center; gap:24px;">
|
||||
<div style="display:flex; justify-content:space-between; align-items:center; margin-bottom:24px; flex-wrap:wrap; gap:12px;">
|
||||
<div style="display:flex; align-items:center; gap:16px; flex-wrap:wrap;">
|
||||
<h1 class="page-title" style="margin-bottom:0">Traders</h1>
|
||||
|
||||
<select id="tradersSort" class="platform-select" onchange="loadTraders()">
|
||||
<option value="score">Sort: Combined Score</option>
|
||||
<option value="winrate">Sort: Win Rate</option>
|
||||
<option value="copyability">Sort: Copyability</option>
|
||||
<option value="pnl">Sort: Total PnL</option>
|
||||
<option value="name">Sort: Name</option>
|
||||
</select>
|
||||
|
||||
<select id="filterWinrate" class="platform-select" onchange="loadTraders()">
|
||||
<option value="all">Win Rate: All</option>
|
||||
<option value="gt50">> 50%</option>
|
||||
<option value="gt60">> 60%</option>
|
||||
</select>
|
||||
|
||||
<select id="filterCopyability" class="platform-select" onchange="loadTraders()">
|
||||
<option value="all">Copyability: All</option>
|
||||
<option value="gt50">> 50%</option>
|
||||
<option value="gt80">> 80%</option>
|
||||
</select>
|
||||
|
||||
<label style="display:flex; align-items:center; gap:8px; font-weight:600; cursor:pointer; background:var(--bg-surface); padding:8px 12px; border-radius:6px; border:1px solid var(--border);">
|
||||
<input type="checkbox" id="chk-highly-copyable" onchange="loadTraders()"> Highly Copyable
|
||||
</label>
|
||||
@@ -139,7 +164,7 @@
|
||||
<option value="Polymarket">Polymarket</option>
|
||||
<option value="Limitless">Limitless</option>
|
||||
</select>
|
||||
<input type="text" id="addWallet" placeholder="Wallet Address" class="platform-select" style="width:300px">
|
||||
<input type="text" id="addWallet" placeholder="Wallet Address" class="platform-select" style="width:200px">
|
||||
<button class="btn-sm" onclick="manualAddTrader()" style="padding:6px 16px; background:var(--accent); color:white; border:none">Add</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -158,6 +183,33 @@
|
||||
<!-- Alerts Page -->
|
||||
<section class="page" id="page-alerts"><h1 class="page-title">Alerts</h1><div class="card" id="alertsList"></div></section>
|
||||
|
||||
<!-- Jobs Page -->
|
||||
<section class="page" id="page-jobs">
|
||||
<h1 class="page-title">Background Jobs</h1>
|
||||
<div class="card">
|
||||
<div class="table-wrap">
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Job ID</th>
|
||||
<th>Job Type</th>
|
||||
<th>Status</th>
|
||||
<th>Trader</th>
|
||||
<th>Created At</th>
|
||||
<th>Started At</th>
|
||||
<th>Completed At</th>
|
||||
<th>Error Message</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="jobsBody">
|
||||
<tr><td colspan="9" style="text-align:center;">Loading jobs...</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Search Results Page -->
|
||||
<section class="page" id="page-search">
|
||||
<h1 class="page-title" id="search-title">Search Results</h1>
|
||||
@@ -309,7 +361,13 @@
|
||||
<div class="stat-label">Platform</div>
|
||||
<div class="stat-value" id="md-platform">—</div>
|
||||
</div>
|
||||
<div class="stat-group">
|
||||
<ul class="nav-links">
|
||||
<li><a href="#" onclick="showPage('page-dashboard')" class="active" id="nav-dashboard">Dashboard</a></li>
|
||||
<li><a href="#" onclick="showPage('page-traders')" id="nav-traders">Traders</a></li>
|
||||
<li><a href="#" onclick="showPage('page-markets')" id="nav-markets">Markets</a></li>
|
||||
<li><a href="#" onclick="showPage('page-alerts')" id="nav-alerts">Alerts</a></li>
|
||||
<li><a href="#" onclick="showPage('page-jobs')" id="nav-jobs">Jobs</a></li>
|
||||
</ul> <div class="stat-group">
|
||||
<div class="stat-label">Category</div>
|
||||
<div class="stat-value" id="md-category">—</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user