Only load one strategy from historic result

This commit is contained in:
Matthias 2022-04-13 06:59:03 +02:00
parent bef7202554
commit 4f744a402d
2 changed files with 3 additions and 3 deletions

View File

@ -18,7 +18,7 @@
:key="idx"
class="d-flex justify-content-between align-items-center py-1 mb-1"
button
@click="getBacktestHistoryResult(res.filename)"
@click="getBacktestHistoryResult(res)"
>
<strong>{{ res.strategy }}</strong>
backtested on: {{ timestampms(res.backtest_start_time * 1000) }}

View File

@ -1067,9 +1067,9 @@ export function createBotSubStore(botId: string, botName: string) {
const result = await api.get<BacktestHistoryEntry[]>('/backtest/history');
commit('setBacktestHistory', result.data);
},
async [BotStoreActions.getBacktestHistoryResult]({ commit }, filename: string) {
async [BotStoreActions.getBacktestHistoryResult]({ commit }, payload: BacktestHistoryEntry) {
const result = await api.get<BacktestStatus>('/backtest/history/result', {
params: { filename: filename },
params: { filename: payload.filename, strategy: payload.strategy },
});
if (result.data.backtest_result) {
commit('updateBacktestResult', result.data.backtest_result);