mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-26 04:55:15 +00:00
Merge pull request #1181 from freqtrade/dependabot/npm_and_yarn/main/bootstrap-vue-next-0.8.0
build(deps): bump bootstrap-vue-next from 0.7.3 to 0.8.0
This commit is contained in:
commit
c06e290290
|
@ -11,7 +11,7 @@ describe('Settings', () => {
|
||||||
cy.wait('@ShowConf');
|
cy.wait('@ShowConf');
|
||||||
// cy.wait('@Strategies');
|
// cy.wait('@Strategies');
|
||||||
|
|
||||||
cy.get('[id=avatar-drop]').parent().click();
|
cy.get('[id=avatar-drop]').should('be.visible').parent().click();
|
||||||
cy.get('.dropdown-menu > [href="/settings"]').click();
|
cy.get('.dropdown-menu > [href="/settings"]').click();
|
||||||
cy.contains('FreqUI Settings');
|
cy.contains('FreqUI Settings');
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
"@vueuse/core": "^9.13.0",
|
"@vueuse/core": "^9.13.0",
|
||||||
"axios": "^1.3.4",
|
"axios": "^1.3.4",
|
||||||
"bootstrap": "^5.2.3",
|
"bootstrap": "^5.2.3",
|
||||||
"bootstrap-vue-next": "^0.7.3",
|
"bootstrap-vue-next": "^0.8.0",
|
||||||
"core-js": "^3.30.0",
|
"core-js": "^3.30.0",
|
||||||
"date-fns": "^2.29.3",
|
"date-fns": "^2.29.3",
|
||||||
"date-fns-tz": "^2.0.0",
|
"date-fns-tz": "^2.0.0",
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
small
|
small
|
||||||
hover
|
hover
|
||||||
stacked="sm"
|
stacked="sm"
|
||||||
:items="backtestResult.exit_reason_summary || backtestResult.sell_reason_summary"
|
:items="(backtestResult.exit_reason_summary || backtestResult.sell_reason_summary) as unknown as TableItem[]"
|
||||||
:fields="perExitReason"
|
:fields="perExitReason"
|
||||||
>
|
>
|
||||||
</b-table>
|
</b-table>
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
small
|
small
|
||||||
hover
|
hover
|
||||||
stacked="sm"
|
stacked="sm"
|
||||||
:items="backtestResult.results_per_pair"
|
:items="backtestResult.results_per_pair as unknown as TableItem[]"
|
||||||
:fields="perPairFields"
|
:fields="perPairFields"
|
||||||
>
|
>
|
||||||
</b-table>
|
</b-table>
|
||||||
|
@ -68,6 +68,7 @@ import {
|
||||||
formatPrice,
|
formatPrice,
|
||||||
humanizeDurationFromSeconds,
|
humanizeDurationFromSeconds,
|
||||||
} from '@/shared/formatters';
|
} from '@/shared/formatters';
|
||||||
|
import { TableField, TableItem } from 'bootstrap-vue-next';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
backtestResult: { required: true, type: Object as () => StrategyBacktestResult },
|
backtestResult: { required: true, type: Object as () => StrategyBacktestResult },
|
||||||
|
@ -389,12 +390,12 @@ const perExitReason = computed(() => {
|
||||||
{ key: 'losses', label: 'Losses' },
|
{ key: 'losses', label: 'Losses' },
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
const backtestResultFields: Array<Record<string, string>> = [
|
const backtestResultFields: TableField[] = [
|
||||||
{ key: 'metric', label: 'Metric' },
|
{ key: 'metric', label: 'Metric' },
|
||||||
{ key: 'value', label: 'Value' },
|
{ key: 'value', label: 'Value' },
|
||||||
];
|
];
|
||||||
|
|
||||||
const backtestsettingFields: Array<Record<string, string>> = [
|
const backtestsettingFields: TableField[] = [
|
||||||
{ key: 'setting', label: 'Setting' },
|
{ key: 'setting', label: 'Setting' },
|
||||||
{ key: 'value', label: 'Value' },
|
{ key: 'value', label: 'Value' },
|
||||||
];
|
];
|
||||||
|
|
|
@ -58,6 +58,7 @@ import { formatPrice } from '@/shared/formatters';
|
||||||
import { defineComponent, computed } from 'vue';
|
import { defineComponent, computed } from 'vue';
|
||||||
import { useBotStore } from '@/stores/ftbotwrapper';
|
import { useBotStore } from '@/stores/ftbotwrapper';
|
||||||
import { ProfitInterface, ComparisonTableItems } from '@/types';
|
import { ProfitInterface, ComparisonTableItems } from '@/types';
|
||||||
|
import { TableField, TableItem } from 'bootstrap-vue-next';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'BotComparisonList',
|
name: 'BotComparisonList',
|
||||||
|
@ -65,7 +66,7 @@ export default defineComponent({
|
||||||
setup() {
|
setup() {
|
||||||
const botStore = useBotStore();
|
const botStore = useBotStore();
|
||||||
|
|
||||||
const tableFields: Record<string, string | Function>[] = [
|
const tableFields: TableField[] = [
|
||||||
{ key: 'botName', label: 'Bot' },
|
{ key: 'botName', label: 'Bot' },
|
||||||
{ key: 'trades', label: 'Trades' },
|
{ key: 'trades', label: 'Trades' },
|
||||||
{ key: 'profitOpen', label: 'Open Profit' },
|
{ key: 'profitOpen', label: 'Open Profit' },
|
||||||
|
@ -74,7 +75,7 @@ export default defineComponent({
|
||||||
{ key: 'winVsLoss', label: 'W/L' },
|
{ key: 'winVsLoss', label: 'W/L' },
|
||||||
];
|
];
|
||||||
|
|
||||||
const tableItems = computed(() => {
|
const tableItems = computed<TableItem[]>(() => {
|
||||||
const val: ComparisonTableItems[] = [];
|
const val: ComparisonTableItems[] = [];
|
||||||
const summary: ComparisonTableItems = {
|
const summary: ComparisonTableItems = {
|
||||||
botId: undefined,
|
botId: undefined,
|
||||||
|
@ -121,7 +122,7 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
val.push(summary);
|
val.push(summary);
|
||||||
return val;
|
return val as unknown as TableItem[];
|
||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -20,8 +20,9 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent, computed, onMounted } from 'vue';
|
import { defineComponent, computed, onMounted } from 'vue';
|
||||||
import DailyChart from '@/components/charts/DailyChart.vue';
|
import DailyChart from '@/components/charts/DailyChart.vue';
|
||||||
import { formatPercent, formatPrice } from '@/shared/formatters';
|
import { formatPercent } from '@/shared/formatters';
|
||||||
import { useBotStore } from '@/stores/ftbotwrapper';
|
import { useBotStore } from '@/stores/ftbotwrapper';
|
||||||
|
import { TableField } from 'bootstrap-vue-next';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'DailyStats',
|
name: 'DailyStats',
|
||||||
|
@ -30,20 +31,28 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
const botStore = useBotStore();
|
const botStore = useBotStore();
|
||||||
const dailyFields = computed(() => {
|
const dailyFields = computed<TableField[]>(() => {
|
||||||
return [
|
const res: TableField[] = [
|
||||||
{ key: 'date', label: 'Day' },
|
{ key: 'date', label: 'Day' },
|
||||||
{ key: 'abs_profit', label: 'Profit', formatter: (value) => formatPrice(value) },
|
{
|
||||||
|
key: 'abs_profit',
|
||||||
|
label: 'Profit',
|
||||||
|
// formatter: (value: unknown) => formatPrice(value as number),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
key: 'fiat_value',
|
key: 'fiat_value',
|
||||||
label: `In ${botStore.activeBot.dailyStats.fiat_display_currency}`,
|
label: `In ${botStore.activeBot.dailyStats.fiat_display_currency}`,
|
||||||
formatter: (value) => formatPrice(value, 2),
|
// formatter: (value: unknown) => formatPrice(value as number, 2),
|
||||||
},
|
},
|
||||||
{ key: 'trade_count', label: 'Trades' },
|
{ key: 'trade_count', label: 'Trades' },
|
||||||
botStore.activeBot.botApiVersion >= 2.16
|
|
||||||
? { key: 'rel_profit', label: 'Profit%', formatter: (value) => formatPercent(value, 2) }
|
|
||||||
: null,
|
|
||||||
];
|
];
|
||||||
|
if (botStore.activeBot.botApiVersion >= 2.16)
|
||||||
|
res.push({
|
||||||
|
key: 'rel_profit',
|
||||||
|
label: 'Profit%',
|
||||||
|
formatter: (value: unknown) => formatPercent(value as number, 2),
|
||||||
|
});
|
||||||
|
return res;
|
||||||
});
|
});
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
botStore.activeBot.getDaily();
|
botStore.activeBot.getDaily();
|
||||||
|
|
|
@ -15,19 +15,20 @@
|
||||||
import { formatPrice } from '@/shared/formatters';
|
import { formatPrice } from '@/shared/formatters';
|
||||||
import { defineComponent, computed } from 'vue';
|
import { defineComponent, computed } from 'vue';
|
||||||
import { useBotStore } from '@/stores/ftbotwrapper';
|
import { useBotStore } from '@/stores/ftbotwrapper';
|
||||||
|
import { TableField } from 'bootstrap-vue-next';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'Performance',
|
name: 'Performance',
|
||||||
setup() {
|
setup() {
|
||||||
const botStore = useBotStore();
|
const botStore = useBotStore();
|
||||||
const tableFields = computed(() => {
|
const tableFields = computed<TableField[]>(() => {
|
||||||
return [
|
return [
|
||||||
{ key: 'pair', label: 'Pair' },
|
{ key: 'pair', label: 'Pair' },
|
||||||
{ key: 'profit', label: 'Profit %' },
|
{ key: 'profit', label: 'Profit %' },
|
||||||
{
|
{
|
||||||
key: 'profit_abs',
|
key: 'profit_abs',
|
||||||
label: `Profit ${botStore.activeBot.botState?.stake_currency}`,
|
label: `Profit ${botStore.activeBot.botState?.stake_currency}`,
|
||||||
formatter: (v: number) => formatPrice(v, 5),
|
formatter: (v: unknown) => formatPrice(v as number, 5),
|
||||||
},
|
},
|
||||||
{ key: 'count', label: 'Count' },
|
{ key: 'count', label: 'Count' },
|
||||||
];
|
];
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
t.pair.toLowerCase().includes(filterText.toLowerCase()) ||
|
t.pair.toLowerCase().includes(filterText.toLowerCase()) ||
|
||||||
t.exit_reason?.toLowerCase().includes(filterText.toLowerCase()) ||
|
t.exit_reason?.toLowerCase().includes(filterText.toLowerCase()) ||
|
||||||
t.enter_tag?.toLowerCase().includes(filterText.toLowerCase()),
|
t.enter_tag?.toLowerCase().includes(filterText.toLowerCase()),
|
||||||
)
|
) as unknown as TableItem[]
|
||||||
"
|
"
|
||||||
:fields="tableFields"
|
:fields="tableFields"
|
||||||
show-empty
|
show-empty
|
||||||
|
@ -104,6 +104,7 @@ import ForceExitForm from '@/components/ftbot/ForceExitForm.vue';
|
||||||
import { ref, computed, watch } from 'vue';
|
import { ref, computed, watch } from 'vue';
|
||||||
import { useBotStore } from '@/stores/ftbotwrapper';
|
import { useBotStore } from '@/stores/ftbotwrapper';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
|
import { TableField, TableItem } from 'bootstrap-vue-next';
|
||||||
|
|
||||||
enum ModalReasons {
|
enum ModalReasons {
|
||||||
removeTrade,
|
removeTrade,
|
||||||
|
@ -134,8 +135,8 @@ const removeTradeVisible = ref(false);
|
||||||
const confirmExitText = ref('');
|
const confirmExitText = ref('');
|
||||||
const confirmExitValue = ref<ModalReasons | null>(null);
|
const confirmExitValue = ref<ModalReasons | null>(null);
|
||||||
|
|
||||||
const openFields: Record<string, string | Function>[] = [{ key: 'actions' }];
|
const openFields: TableField[] = [{ key: 'actions' }];
|
||||||
const closedFields: Record<string, string | Function>[] = [
|
const closedFields: TableField[] = [
|
||||||
{ key: 'close_timestamp', label: 'Close date' },
|
{ key: 'close_timestamp', label: 'Close date' },
|
||||||
{ key: 'exit_reason', label: 'Close Reason' },
|
{ key: 'exit_reason', label: 'Close Reason' },
|
||||||
];
|
];
|
||||||
|
@ -146,8 +147,8 @@ const rows = computed(() => {
|
||||||
return props.trades.length;
|
return props.trades.length;
|
||||||
});
|
});
|
||||||
|
|
||||||
const tableFields: Record<string, string | Function>[] = [
|
const tableFields: TableField[] = [
|
||||||
props.multiBotView ? { key: 'botName', label: 'Bot' } : {},
|
props.multiBotView ? { key: 'botName', label: 'Bot' } : { key: 'actions' },
|
||||||
{ key: 'trade_id', label: 'ID' },
|
{ key: 'trade_id', label: 'ID' },
|
||||||
{ key: 'pair', label: 'Pair' },
|
{ key: 'pair', label: 'Pair' },
|
||||||
{ key: 'amount', label: 'Amount' },
|
{ key: 'amount', label: 'Amount' },
|
||||||
|
@ -158,19 +159,24 @@ const tableFields: Record<string, string | Function>[] = [
|
||||||
{
|
{
|
||||||
key: 'open_rate',
|
key: 'open_rate',
|
||||||
label: 'Open rate',
|
label: 'Open rate',
|
||||||
formatter: (value: number) => formatPrice(value),
|
formatter: (value: unknown) => formatPrice(value as number),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: props.activeTrades ? 'current_rate' : 'close_rate',
|
key: props.activeTrades ? 'current_rate' : 'close_rate',
|
||||||
label: props.activeTrades ? 'Current rate' : 'Close rate',
|
label: props.activeTrades ? 'Current rate' : 'Close rate',
|
||||||
formatter: (value: number) => formatPrice(value),
|
formatter: (value: unknown) => formatPrice(value as number),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'profit',
|
key: 'profit',
|
||||||
label: props.activeTrades ? 'Current profit %' : 'Profit %',
|
label: props.activeTrades ? 'Current profit %' : 'Profit %',
|
||||||
formatter: (value: number, key, item: Trade) => {
|
|
||||||
const percent = formatPercent(item.profit_ratio, 2);
|
formatter: (value: unknown, key?: string, item?: unknown) => {
|
||||||
return `${percent} ${`(${formatPriceWithDecimals(item.profit_abs)})`}`;
|
if (!item) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
const typedItem = item as Trade;
|
||||||
|
const percent = formatPercent(typedItem.profit_ratio, 2);
|
||||||
|
return `${percent} ${`(${formatPriceWithDecimals(typedItem.profit_abs)})`}`;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{ key: 'open_timestamp', label: 'Open date' },
|
{ key: 'open_timestamp', label: 'Open date' },
|
||||||
|
|
Loading…
Reference in New Issue
Block a user