fix: correct timeframe display in Bot Status for scalping strategies
- Add selectedTimeframes to automation status API response to show actual running timeframes - Update Bot Status UI to display selectedTimeframes from API instead of local config state - Fix issue where Bot Status showed '1h' instead of scalping timeframes '5m, 15m, 30m' - Ensure selectedTimeframes are properly stored in database settings and retrieved in status - Bot Status now correctly reflects the actual running automation configuration UI Changes: - Bot Status timeframes now shows: '5m, 15m, 30m' for scalping instead of '1h' - Analysis Timer correctly shows 2-minute intervals for scalping strategies - Status display is now synchronized with actual automation configuration Backend Changes: - Store selectedTimeframes in automation session settings - Include selectedTimeframes in getStatus() API response - Enhanced interval detection to support settings-based timeframes
This commit is contained in:
@@ -364,7 +364,7 @@ export default function AutomationPageV2() {
|
||||
<div className="p-2 bg-gray-800/30 rounded-lg mb-3">
|
||||
<div className="text-xs text-gray-400">
|
||||
Selected: <span className="text-cyan-400">
|
||||
{config.selectedTimeframes.map(tf => timeframes.find(t => t.value === tf)?.label).filter(Boolean).join(', ')}
|
||||
{(status.selectedTimeframes || [status.timeframe]).map(tf => timeframes.find(t => t.value === tf)?.label || tf).filter(Boolean).join(', ')}
|
||||
</span>
|
||||
</div>
|
||||
<div className="text-xs text-gray-500 mt-1">
|
||||
@@ -499,7 +499,7 @@ export default function AutomationPageV2() {
|
||||
<div className="flex justify-between">
|
||||
<span className="text-gray-300">Timeframes:</span>
|
||||
<span className="text-cyan-400 font-semibold text-xs">
|
||||
{config.selectedTimeframes.map(tf => timeframes.find(t => t.value === tf)?.label).filter(Boolean).join(', ')}
|
||||
{(status.selectedTimeframes || [status.timeframe]).map(tf => timeframes.find(t => t.value === tf)?.label || tf).filter(Boolean).join(', ')}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user