mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-23 11:35:14 +00:00
parent
25e0bace6d
commit
4e171457fe
|
@ -124,9 +124,12 @@ import { PlotConfig, EMPTY_PLOTCONFIG, IndicatorConfig } from '@/types';
|
||||||
import { getCustomPlotConfig } from '@/shared/storage';
|
import { getCustomPlotConfig } from '@/shared/storage';
|
||||||
import PlotIndicator from '@/components/charts/PlotIndicator.vue';
|
import PlotIndicator from '@/components/charts/PlotIndicator.vue';
|
||||||
import { BotStoreGetters } from '@/store/modules/ftbot';
|
import { BotStoreGetters } from '@/store/modules/ftbot';
|
||||||
|
import { AlertActions } from '@/store/modules/alerts';
|
||||||
|
|
||||||
const ftbot = namespace('ftbot');
|
const ftbot = namespace('ftbot');
|
||||||
|
|
||||||
|
const alerts = namespace('alerts');
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
components: { PlotIndicator },
|
components: { PlotIndicator },
|
||||||
})
|
})
|
||||||
|
@ -202,6 +205,8 @@ export default class PlotConfigurator extends Vue {
|
||||||
|
|
||||||
@ftbot.Getter [BotStoreGetters.plotConfigName]!: string;
|
@ftbot.Getter [BotStoreGetters.plotConfigName]!: string;
|
||||||
|
|
||||||
|
@alerts.Action [AlertActions.addAlert];
|
||||||
|
|
||||||
get plotConfigJson() {
|
get plotConfigJson() {
|
||||||
return JSON.stringify(this.plotConfig, null, 2);
|
return JSON.stringify(this.plotConfig, null, 2);
|
||||||
}
|
}
|
||||||
|
@ -334,9 +339,14 @@ export default class PlotConfigurator extends Vue {
|
||||||
}
|
}
|
||||||
|
|
||||||
async loadPlotConfigFromStrategy() {
|
async loadPlotConfigFromStrategy() {
|
||||||
await this.getStrategyPlotConfig();
|
try {
|
||||||
this.plotConfig = this.strategyPlotConfig;
|
await this.getStrategyPlotConfig();
|
||||||
this.emitPlotConfig();
|
this.plotConfig = this.strategyPlotConfig;
|
||||||
|
this.emitPlotConfig();
|
||||||
|
} catch (data) {
|
||||||
|
//
|
||||||
|
this.addAlert({ message: 'Failed to load Plot configuration from Strategy.' });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -159,7 +159,12 @@ export function createBotSubStore(botId: string) {
|
||||||
[BotStoreGetters.refreshNow](state, getters, rootState, rootGetters): boolean {
|
[BotStoreGetters.refreshNow](state, getters, rootState, rootGetters): boolean {
|
||||||
const bgRefresh = rootGetters['uiSettings/backgroundSync'];
|
const bgRefresh = rootGetters['uiSettings/backgroundSync'];
|
||||||
const selectedBot = rootGetters['ftbot/selectedBot'];
|
const selectedBot = rootGetters['ftbot/selectedBot'];
|
||||||
if ((selectedBot === botId || bgRefresh) && getters.autoRefresh && getters.isBotOnline) {
|
if (
|
||||||
|
(selectedBot === botId || bgRefresh) &&
|
||||||
|
getters.autoRefresh &&
|
||||||
|
getters.isBotOnline &&
|
||||||
|
!getters.isWebserverMode
|
||||||
|
) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -633,9 +638,11 @@ export function createBotSubStore(botId: string) {
|
||||||
// TODO: Remove this fix when fix in freqtrade is populated further.
|
// TODO: Remove this fix when fix in freqtrade is populated further.
|
||||||
plotConfig.subplots = {};
|
plotConfig.subplots = {};
|
||||||
}
|
}
|
||||||
return commit('updatePlotConfig', result.data);
|
commit('updatePlotConfig', result.data);
|
||||||
|
return Promise.resolve();
|
||||||
} catch (data) {
|
} catch (data) {
|
||||||
return console.error(data);
|
console.error(data);
|
||||||
|
return Promise.reject(data);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[BotStoreActions.setPlotConfigName]({ commit }, plotConfigName: string) {
|
[BotStoreActions.setPlotConfigName]({ commit }, plotConfigName: string) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user