diff --git a/.eslintrc.js b/.eslintrc.js index 4f439aa7..34772c9b 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -30,6 +30,7 @@ module.exports = { // disable eslint no-shadow as it's causing false positives on typescript enums 'no-shadow': 'off', 'prettier/prettier': ['error'], + '@typescript-eslint/no-explicit-any': 'warn', // '@typescript-eslint/naming-convention': [ // 'error', // { diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 81c7b58d..fbe39988 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -7,6 +7,11 @@ assignees: '' --- +**FreqUI Version** + +- Version of freqUI: _____ (Available in the top right corner of the UI) +- version of freqtrade: _____ (`freqtrade -V` or `docker compose run --rm freqtrade -V` for Freqtrade running in docker) + **Describe the bug** A clear and concise description of what the bug is. diff --git a/.github/dependabot.yml b/.github/dependabot.yml index c7a13288..d0912cd0 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -23,7 +23,7 @@ updates: day: "wednesday" time: "03:00" timezone: "UTC" - open-pull-requests-limit: 10 + open-pull-requests-limit: 20 target-branch: main - package-ecosystem: "github-actions" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 69768a3c..76baf589 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,10 +21,10 @@ jobs: strategy: matrix: os: [ ubuntu-22.04 ] - node: [ "16", "18", "19", "20"] + node: [ "16", "18", "20"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-node@v3 with: @@ -42,7 +42,7 @@ jobs: run: yarn test:unit - name: Run Component tests - uses: cypress-io/github-action@v5 + uses: cypress-io/github-action@v6 with: # we have already installed everything install: false @@ -50,7 +50,7 @@ jobs: command: yarn cypress run --component - name: Cypress run - uses: cypress-io/github-action@v5 + uses: cypress-io/github-action@v6 with: # build: yarn build start: yarn serve --host diff --git a/Dockerfile b/Dockerfile index b0d288d9..da977c99 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:20.4.0-alpine as ui-builder +FROM node:20.6.1-alpine as ui-builder RUN mkdir /app @@ -19,7 +19,7 @@ COPY . /app # webpack and node17 RUN NODE_OPTIONS=--openssl-legacy-provider yarn build -FROM nginx:1.25.1-alpine +FROM nginx:1.25.2-alpine COPY --from=ui-builder /app/dist /etc/nginx/html COPY --from=ui-builder /app/nginx.conf /etc/nginx/nginx.conf EXPOSE 80 diff --git a/cypress/e2e/trade.cy.ts b/cypress/e2e/trade.cy.ts index 6fd04c2b..d9541dba 100644 --- a/cypress/e2e/trade.cy.ts +++ b/cypress/e2e/trade.cy.ts @@ -9,6 +9,9 @@ function tradeMocks() { cy.intercept('GET', '**/api/v1/blacklist', { fixture: 'blacklist.json' }).as('Blacklist'); cy.intercept('GET', '**/api/v1/locks', { fixture: 'locks_empty.json' }).as('Locks'); cy.intercept('GET', '**/api/v1/performance', { fixture: 'performance.json' }).as('Performance'); + cy.intercept('POST', '**/api/v1/reload_config', { fixture: 'reload_config.json' }).as( + 'ReloadConfig', + ); } describe('Trade', () => { @@ -60,5 +63,18 @@ describe('Trade', () => { cy.get('.drag-header').contains('Closed Trades').scrollIntoView().should('be.visible'); cy.get('span').contains('TRX/USDT').should('be.visible'); cy.get('td').contains('8070.5').should('be.visible'); + // Scroll to top + cy.contains('Multi Pane').scrollIntoView().should('be.visible'); + cy.get('button[title*="Reload Config "]').click(); + + // Reload Modal open + cy.get('.modal-dialog > .modal-content > .modal-footer > .btn-primary') + .filter(':visible') + .contains('Ok') + .should('be.visible') + .click(); + + // Alert is visible + cy.contains('Config reloaded successfully.').scrollIntoView().should('be.visible'); }); }); diff --git a/cypress/fixtures/backtest/backtest_get_end.json b/cypress/fixtures/backtest/backtest_get_end.json index a461d6f8..d9676eb6 100644 --- a/cypress/fixtures/backtest/backtest_get_end.json +++ b/cypress/fixtures/backtest/backtest_get_end.json @@ -6,6 +6,13 @@ "progress": 1.0, "trade_count": null, "backtest_result": { + "metadata": { + "SampleStrategy": { + "strategy": "SampleStrategy", + "run_id": "0afc3cf414b6da90210f458078a6b06055b0c4e7", + "filename": "backtest-result-2023-08-03_04-02-20" + } + }, "strategy": { "SampleStrategy": { "trades": [ diff --git a/cypress/fixtures/profit.json b/cypress/fixtures/profit.json index ed1acad3..8099f282 100644 --- a/cypress/fixtures/profit.json +++ b/cypress/fixtures/profit.json @@ -19,6 +19,7 @@ "closed_trade_count": 149, "first_trade_date": "a year ago", "first_trade_timestamp": 1626021644985, + "bot_start_timestamp": 1625021644985, "latest_trade_date": "5 days ago", "latest_trade_timestamp": 1661828800529, "avg_duration": "7:59:54", diff --git a/cypress/fixtures/reload_config.json b/cypress/fixtures/reload_config.json new file mode 100644 index 00000000..8bf541c6 --- /dev/null +++ b/cypress/fixtures/reload_config.json @@ -0,0 +1,3 @@ +{ + "status": "Config reloaded successfully." +} diff --git a/package.json b/package.json index 9bf5e811..8f45b681 100644 --- a/package.json +++ b/package.json @@ -17,55 +17,55 @@ }, "dependencies": { "@popperjs/core": "^2.11.8", - "@vuepic/vue-datepicker": "^5.4.0", - "@vueuse/core": "^10.2.1", - "@vueuse/integrations": "^10.2.1", - "axios": "^1.4.0", - "bootstrap": "^5.3.0", - "bootstrap-vue-next": "^0.8.13", - "core-js": "^3.31.1", + "@vuepic/vue-datepicker": "^6.1.0", + "@vueuse/core": "^10.4.1", + "@vueuse/integrations": "^10.4.1", + "axios": "^1.5.0", + "bootstrap": "^5.3.1", + "bootstrap-vue-next": "^0.12.3", + "core-js": "^3.32.2", "date-fns": "^2.30.0", "date-fns-tz": "^2.0.0", - "echarts": "^5.4.2", + "echarts": "^5.4.3", "favico.js": "^0.3.10", "humanize-duration": "^3.29.0", - "pinia": "^2.1.4", - "pinia-plugin-persistedstate": "^3.1.0", + "pinia": "^2.1.6", + "pinia-plugin-persistedstate": "^3.2.0", "sortablejs": "^1.15.0", "vue": "^3.3.2", "vue-class-component": "^7.2.5", - "vue-demi": "^0.14.1", - "vue-echarts": "^6.6.0", + "vue-demi": "^0.14.6", + "vue-echarts": "^6.6.1", "vue-router": "^4.2.4", "vue-select": "^4.0.0-beta.6", "vue3-drr-grid-layout": "^1.9.7" }, "devDependencies": { - "@cypress/vite-dev-server": "^5.0.5", - "@cypress/vue": "^5.0.5", - "@iconify-json/mdi": "^1.1.53", + "@cypress/vite-dev-server": "^5.0.6", + "@cypress/vue": "^6.0.0", + "@iconify-json/mdi": "^1.1.54", "@types/echarts": "^4.9.18", - "@typescript-eslint/eslint-plugin": "^5.62.0", - "@typescript-eslint/parser": "^5.62.0", - "@vitejs/plugin-vue": "^4.2.3", + "@typescript-eslint/eslint-plugin": "^6.7.0", + "@typescript-eslint/parser": "^6.7.0", + "@vitejs/plugin-vue": "^4.3.4", "@vue/compiler-sfc": "3.3.4", - "@vue/eslint-config-prettier": "^7.1.0", + "@vue/eslint-config-prettier": "^8.0.0", "@vue/eslint-config-typescript": "^11.0.3", "@vue/runtime-dom": "^3.3.4", - "@vue/test-utils": "^2.4.0", - "cypress": "^12.17.1", - "eslint": "^8.44.0", + "@vue/test-utils": "^2.4.1", + "cypress": "^13.2.0", + "eslint": "^8.49.0", "eslint-plugin-prettier": "^5.0.0", - "eslint-plugin-vue": "^9.15.1", + "eslint-plugin-vue": "^9.17.0", "mutationobserver-shim": "^0.3.7", "portal-vue": "^3.0.0", - "prettier": "^3.0.0", - "sass": "^1.63.6", - "typescript": "~5.1.6", - "unplugin-icons": "^0.16.3", - "unplugin-vue-components": "^0.25.1", - "vite": "^4.4.3", - "vitest": "^0.33.0", - "vue-tsc": "^1.8.4" + "prettier": "^3.0.3", + "sass": "^1.66.1", + "typescript": "~5.2.2", + "unplugin-icons": "^0.17.0", + "unplugin-vue-components": "^0.25.2", + "vite": "^4.4.9", + "vitest": "^0.34.4", + "vue-tsc": "^1.8.11" } } diff --git a/src/components/BotRename.vue b/src/components/BotRename.vue index 1a5da6ec..ca8389ae 100644 --- a/src/components/BotRename.vue +++ b/src/components/BotRename.vue @@ -24,15 +24,18 @@ diff --git a/src/components/ftbot/BacktestResultView.vue b/src/components/ftbot/BacktestResultAnalysis.vue similarity index 87% rename from src/components/ftbot/BacktestResultView.vue rename to src/components/ftbot/BacktestResultAnalysis.vue index 67b55a45..514469a2 100644 --- a/src/components/ftbot/BacktestResultView.vue +++ b/src/components/ftbot/BacktestResultAnalysis.vue @@ -1,12 +1,12 @@