mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-10 18:23:50 +00:00
Add endpoint to stop / reset backtesting
This commit is contained in:
parent
1ed25a309f
commit
6a6ee6d718
|
@ -594,5 +594,14 @@ export default {
|
|||
commit('updateBacktestResult', result.data.backtest_result);
|
||||
}
|
||||
},
|
||||
async removeBacktest({ commit }) {
|
||||
try {
|
||||
const result = await api.delete('/backtest');
|
||||
commit('updateBacktestRunning', result.data.running);
|
||||
return Promise.resolve(result.data);
|
||||
} catch (err) {
|
||||
return Promise.reject(err);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -14,6 +14,9 @@
|
|||
<b-button variant="primary" :disabled="backtestRunning" @click="pollBacktest">
|
||||
Load backtest result
|
||||
</b-button>
|
||||
<b-button variant="primary" :disabled="backtestRunning" @click="removeBacktest">
|
||||
Reset Backtest
|
||||
</b-button>
|
||||
</div>
|
||||
<div v-if="hasBacktestResult" class="text-center w-100 mt-2">
|
||||
<b-tabs content-class="mt-3" class="mt-3">
|
||||
|
@ -83,6 +86,8 @@ export default class Backtesting extends Vue {
|
|||
|
||||
@ftbot.Action pollBacktest!: () => void;
|
||||
|
||||
@ftbot.Action removeBacktest!: () => void;
|
||||
|
||||
get hasBacktestResult() {
|
||||
return Object.keys(this.backtestResult).length !== 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user