mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-22 19:15:15 +00:00
Add Pairlock view
This commit is contained in:
parent
11f967aa05
commit
8ec31cbb35
39
src/components/ftbot/PairLockList.vue
Normal file
39
src/components/ftbot/PairLockList.vue
Normal file
|
@ -0,0 +1,39 @@
|
|||
<template>
|
||||
<div>
|
||||
<div class="mb-2">
|
||||
<label class="mr-auto h3">Pair Locks</label>
|
||||
<b-button class="float-right" size="sm" @click="getLocks">↻</b-button>
|
||||
</div>
|
||||
<div>
|
||||
<b-table class="table-sm" :items="locks.locks" :fields="tableFields"> </b-table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { timestampms } from '@/shared/formatters';
|
||||
import { LockResponse } from '@/types';
|
||||
import { Component, Vue } from 'vue-property-decorator';
|
||||
import { namespace } from 'vuex-class';
|
||||
|
||||
const ftbot = namespace('ftbot');
|
||||
|
||||
@Component({})
|
||||
export default class PairLockList extends Vue {
|
||||
@ftbot.Action getLocks;
|
||||
|
||||
@ftbot.State locks!: LockResponse;
|
||||
|
||||
timestampms = timestampms;
|
||||
|
||||
get tableFields() {
|
||||
return [
|
||||
{ key: 'pair', label: 'Pair' },
|
||||
{ key: 'lock_end_timestamp', label: 'Until', formatter: 'timestampms' },
|
||||
{ key: 'reason', label: 'Reason' },
|
||||
];
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -75,6 +75,7 @@ export default new Vuex.Store({
|
|||
// Refresh data that's needed in near realtime
|
||||
dispatch('ftbot/getOpenTrades');
|
||||
dispatch('ftbot/getState');
|
||||
dispatch('ftbot/getLocks');
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
|
@ -64,7 +64,7 @@ export default {
|
|||
strategyList: [],
|
||||
strategy: {},
|
||||
pairlist: [],
|
||||
currentLocks: [],
|
||||
locks: [],
|
||||
},
|
||||
getters: {
|
||||
[BotStoreGetters.plotConfig](state) {
|
||||
|
|
|
@ -29,7 +29,7 @@ export enum LayoutActions {
|
|||
resetTradingLayout = 'resetTradingLayout',
|
||||
}
|
||||
|
||||
enum LayoutMutations {
|
||||
export enum LayoutMutations {
|
||||
setDashboardLayout = 'setDashboardLayout',
|
||||
setTradingLayout = 'setTradingLayout',
|
||||
}
|
||||
|
|
|
@ -45,6 +45,9 @@
|
|||
<b-tab title="Pairlist" lazy>
|
||||
<FTBotAPIPairList />
|
||||
</b-tab>
|
||||
<b-tab title="Pair Locks" lazy>
|
||||
<PairLockList />
|
||||
</b-tab>
|
||||
</b-tabs>
|
||||
</DraggableContainer>
|
||||
</GridItem>
|
||||
|
@ -143,6 +146,7 @@ import BotStatus from '@/components/ftbot/BotStatus.vue';
|
|||
import Balance from '@/components/ftbot/Balance.vue';
|
||||
import DailyStats from '@/components/ftbot/DailyStats.vue';
|
||||
import FTBotAPIPairList from '@/components/ftbot/FTBotAPIPairList.vue';
|
||||
import PairLockList from '@/components/ftbot/PairLockList.vue';
|
||||
import TradeDetail from '@/components/ftbot/TradeDetail.vue';
|
||||
import ReloadControl from '@/components/ftbot/ReloadControl.vue';
|
||||
import LogViewer from '@/components/ftbot/LogViewer.vue';
|
||||
|
@ -168,6 +172,7 @@ const layoutNs = namespace('layout');
|
|||
Balance,
|
||||
DailyStats,
|
||||
FTBotAPIPairList,
|
||||
PairLockList,
|
||||
TradeDetail,
|
||||
ReloadControl,
|
||||
LogViewer,
|
||||
|
|
Loading…
Reference in New Issue
Block a user