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