From fb703b6c81c66d9749848ea8753f7e22151c9b56 Mon Sep 17 00:00:00 2001 From: Richard Date: Mon, 6 Jul 2026 19:58:23 +0200 Subject: [PATCH] feat: Jobs infrastructure, endpoints, UI and worker prioritization --- src/Predictalytics.Api/ApiConfiguration.cs | 1 + src/Predictalytics.Api/wwwroot/css/style.css | 22 +++++- src/Predictalytics.Api/wwwroot/index.html | 66 ++++++++++++++++-- src/Predictalytics.Api/wwwroot/js/app.js | 69 ++++++++++++++++++- .../Data/AppDbContext.cs | 13 ++++ .../DependencyInjection.cs | 1 + .../Migrations/AppDbContextModelSnapshot.cs | 55 +++++++++++++++ .../Services/TradeHistoryWorker.cs | 53 ++++++++++++-- .../Services/TraderAnalyticsWorker.cs | 67 ++++++++++++++---- 9 files changed, 321 insertions(+), 26 deletions(-) diff --git a/src/Predictalytics.Api/ApiConfiguration.cs b/src/Predictalytics.Api/ApiConfiguration.cs index 56ce9f9..a0e6b75 100644 --- a/src/Predictalytics.Api/ApiConfiguration.cs +++ b/src/Predictalytics.Api/ApiConfiguration.cs @@ -30,6 +30,7 @@ public static class ApiConfiguration app.MapTraderEndpoints(); app.MapAlertEndpoints(); app.MapMarketEndpoints(); + app.MapJobEndpoints(); // Health check app.MapGet("/api/health", () => Results.Ok(new { Status = "OK", Timestamp = DateTime.UtcNow })); diff --git a/src/Predictalytics.Api/wwwroot/css/style.css b/src/Predictalytics.Api/wwwroot/css/style.css index e4eeb33..c4cbad4 100644 --- a/src/Predictalytics.Api/wwwroot/css/style.css +++ b/src/Predictalytics.Api/wwwroot/css/style.css @@ -447,9 +447,25 @@ body { .btn-primary { background: var(--primary); color: #000; border: none; border-radius: 6px; cursor: pointer; font-weight: bold; transition: all 0.2s; } .btn-primary:hover { filter: brightness(1.1); } .tabs-nav { display: flex; gap: 12px; margin-bottom: 24px; border-bottom: 1px solid var(--border); padding-bottom: 8px; flex-wrap: wrap; align-items: center; } -.btn-tab { white-space: nowrap; padding: 8px 16px; border-radius: 6px; font-size: 14px; transition: background 0.2s; } -.btn-tab:hover { background: var(--bg-input); } -.btn-tab.active { background: var(--bg-input); color: var(--primary) !important; border-bottom: 2px solid var(--primary) !important; } +.btn-tab { + white-space: nowrap; + padding: 8px 16px; + border-radius: 6px; + font-size: 14px; + font-weight: 600; + transition: all 0.2s; + background: transparent; + color: var(--text-muted); + border: none; + cursor: pointer; +} +.btn-tab:hover { background: var(--bg-input); color: var(--text-primary); } +.btn-tab.active { + background: var(--bg-input); + color: var(--primary) !important; + border-bottom: 2px solid var(--primary) !important; + border-radius: 6px 6px 0 0; +} .stat-group { margin-bottom: 16px; } .stat-label { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.5px; margin-bottom: 4px; } .stat-value { font-size: 15px; font-weight: 600; color: var(--text-primary); } diff --git a/src/Predictalytics.Api/wwwroot/index.html b/src/Predictalytics.Api/wwwroot/index.html index 75e69d1..8a318be 100644 --- a/src/Predictalytics.Api/wwwroot/index.html +++ b/src/Predictalytics.Api/wwwroot/index.html @@ -35,6 +35,10 @@ Alerts + + + Jobs +