mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-10 18:23:50 +00:00
stop the timer and show error messages
This commit is contained in:
parent
e8c50a167a
commit
2f07024f11
|
@ -136,7 +136,7 @@ watch(
|
|||
|
||||
<style lang="scss">
|
||||
.pairlist {
|
||||
padding: 1rem 1rem;
|
||||
padding: 1rem 0;
|
||||
width: 100%;
|
||||
border: 1px solid white;
|
||||
text-align: left;
|
||||
|
|
|
@ -279,9 +279,12 @@ export interface PairlistsResponse {
|
|||
}
|
||||
|
||||
export interface PairlistEvalResponse {
|
||||
detail?: string;
|
||||
method?: string[];
|
||||
whitelist?: string[];
|
||||
error?: string;
|
||||
status: string;
|
||||
result?: {
|
||||
method: string[];
|
||||
whitelist: string[];
|
||||
};
|
||||
}
|
||||
|
||||
export interface Pairlist {
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<div>
|
||||
<div>
|
||||
<b-form-select v-model="selectedConfig" :options="configsSelectOptions"></b-form-select>
|
||||
<p>{{ progressMessage }}</p>
|
||||
<b-button :disabled="evaluating" @click="test">Test</b-button>
|
||||
<div>
|
||||
<code v-if="whitelist.length > 0">{{ whitelist }}</code>
|
||||
|
@ -57,16 +58,18 @@ const test = async () => {
|
|||
whitelist.value = [];
|
||||
const res = await botStore.activeBot.evaluatePairlist(payload);
|
||||
console.log(res);
|
||||
progressMessage.value = res.status;
|
||||
const evalIntervalId = setInterval(async () => {
|
||||
const res = await botStore.activeBot.getPairlistEvalStatus();
|
||||
|
||||
if (res.whitelist) {
|
||||
whitelist.value = res.whitelist;
|
||||
if (res.status === 'success' && res.result) {
|
||||
whitelist.value = res.result.whitelist;
|
||||
clearInterval(evalIntervalId);
|
||||
evaluating.value = false;
|
||||
progressMessage.value = '';
|
||||
} else if (res.detail) {
|
||||
progressMessage.value = res.detail;
|
||||
} else if (res.error) {
|
||||
progressMessage.value = res.error;
|
||||
clearInterval(evalIntervalId);
|
||||
evaluating.value = false;
|
||||
}
|
||||
}, 1000);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user