diff --git a/frontend/static/css/hide-deny-icon.css b/frontend/static/css/hide-deny-icon.css new file mode 100644 index 00000000..4f89c381 --- /dev/null +++ b/frontend/static/css/hide-deny-icon.css @@ -0,0 +1,17 @@ +/** + * Hide deny symbol inside circular progress indicators + * This keeps the red circle but removes the minus/stop icon inside it + */ + +/* Hide the deny/minus symbol that's created by pseudo-elements */ +.hourly-cap-status.danger .hourly-cap-icon:before, +.hourly-cap-status.danger .hourly-cap-icon::before { + display: none !important; +} + +/* Also remove any other minus/stop symbols that might be in the SVG */ +.api-progress-circle .deny-symbol, +.api-progress-circle .stop-symbol, +.api-progress-circle .minus-symbol { + display: none !important; +} diff --git a/frontend/static/js/new-main.js b/frontend/static/js/new-main.js index 2da053cb..5a3d8540 100644 --- a/frontend/static/js/new-main.js +++ b/frontend/static/js/new-main.js @@ -2041,6 +2041,10 @@ let huntarrUI = { }) .then(data => { if (data.success && data.stats) { + // Store raw stats data globally for tooltips to access + window.mediaStats = data.stats; + + // Update display this.updateStatsDisplay(data.stats); } else { console.error('Failed to load statistics:', data.message || 'Unknown error'); @@ -2069,7 +2073,7 @@ let huntarrUI = { }); }, - // Format large numbers with appropriate suffixes (K, MIL, BIL, TRI) + // Format large numbers with appropriate suffixes (K, M, B, T) formatLargeNumber: function(num) { if (num < 1000) { // 0-999: Display as is @@ -2084,20 +2088,20 @@ let huntarrUI = { // 100,000-999,999: Display with K (no decimal) (e.g., 982K) return Math.floor(num / 1000) + 'K'; } else if (num < 10000000) { - // 1,000,000-9,999,999: Display with single decimal and MIL (e.g., 9.7 MIL) - return (num / 1000000).toFixed(1) + ' MIL'; + // 1,000,000-9,999,999: Display with single decimal and M (e.g., 9.7M) + return (num / 1000000).toFixed(1) + 'M'; } else if (num < 100000000) { - // 10,000,000-99,999,999: Display with single decimal and MIL (e.g., 99.7 MIL) - return (num / 1000000).toFixed(1) + ' MIL'; + // 10,000,000-99,999,999: Display with single decimal and M (e.g., 99.7M) + return (num / 1000000).toFixed(1) + 'M'; } else if (num < 1000000000) { - // 100,000,000-999,999,999: Display with MIL (no decimal) - return Math.floor(num / 1000000) + ' MIL'; + // 100,000,000-999,999,999: Display with M (no decimal) + return Math.floor(num / 1000000) + 'M'; } else if (num < 1000000000000) { - // 1B - 999B: Display with single decimal and BIL - return (num / 1000000000).toFixed(1) + ' BIL'; + // 1B - 999B: Display with single decimal and B + return (num / 1000000000).toFixed(1) + 'B'; } else { - // 1T+: Display with TRI - return (num / 1000000000000).toFixed(1) + ' TRI'; + // 1T+: Display with T + return (num / 1000000000000).toFixed(1) + 'T'; } }, diff --git a/frontend/static/js/stats-tooltips.js b/frontend/static/js/stats-tooltips.js index 35c8eccf..1a15b0e2 100644 --- a/frontend/static/js/stats-tooltips.js +++ b/frontend/static/js/stats-tooltips.js @@ -119,7 +119,15 @@ function showStatsTooltip(e) { const target = e.currentTarget; const app = target.getAttribute('data-app'); const type = target.getAttribute('data-type'); - const rawValue = parseInt(target.textContent.replace(/[^0-9]/g, '') || '0'); + + // Try to get exact value from API data if available via window.mediaStats + let rawValue; + if (window.mediaStats && window.mediaStats[app] && typeof window.mediaStats[app][type] !== 'undefined') { + rawValue = window.mediaStats[app][type]; + } else { + // Fallback to parsing from display text + rawValue = parseInt(target.textContent.replace(/[^0-9]/g, '') || '0'); + } // App-specific details with proper color coding const appDetails = { @@ -170,10 +178,6 @@ function showStatsTooltip(e) { Monthly average: ${monthlyAvg} - -