Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(fix) Recurring: fails on relaunch #677

Merged
merged 28 commits into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
e7e3481
Restore Recurring order on FE
dmytroshch Jul 28, 2023
b2f3a8e
HistoryButton: moved to separated component
dmytroshch Aug 14, 2023
d85e64c
Backtest: add history/new test toggler
dmytroshch Aug 14, 2023
37a35ba
PanelButton: align text and icon
dmytroshch Aug 14, 2023
e6b136e
fetch strategy backtests
dmytroshch Aug 14, 2023
7b5bd2e
BT history: recieve data from data-server
dmytroshch Aug 15, 2023
22889b6
BT history: layout list
dmytroshch Aug 15, 2023
d14151e
BT history: restructure components and folders
dmytroshch Aug 16, 2023
23ee4e5
BT history: launch to details tab
dmytroshch Aug 16, 2023
fbdb4f0
BT history: details layout"
dmytroshch Aug 16, 2023
36e0519
fix prop validation
dmytroshch Aug 16, 2023
470ee06
BT history: fix styles
dmytroshch Aug 16, 2023
e4804a1
BT history: results
dmytroshch Aug 17, 2023
be620fd
Revert "Merge pull request #394 from dmytroshch/fix/backtest-clear"
dmytroshch Aug 17, 2023
34e3fbc
fixed: new test button
dmytroshch Aug 17, 2023
b115ac7
BT: add bt to history after execution
dmytroshch Aug 17, 2023
1b00c85
BT: log error messages during execution
dmytroshch Aug 17, 2023
6ce9cdf
BT: update initial messages
dmytroshch Aug 17, 2023
f65425c
BT: fix button style
dmytroshch Aug 17, 2023
879bb32
BT: reset tab state when strategy has changed
dmytroshch Aug 17, 2023
d15cecb
BT: change fetching history logic
dmytroshch Aug 17, 2023
a3a80fb
removed duplicated action
dmytroshch Aug 17, 2023
84a1792
rename method
dmytroshch Aug 17, 2023
4536691
BT: remove history on strategy delete
dmytroshch Aug 17, 2023
dc7efe9
BT history: move some component state properties to redux store
dmytroshch Aug 17, 2023
71e2986
AOs history: fix issue with relaunch Recurring AO
dmytroshch Aug 18, 2023
d9da1c2
Merge branch 'main' into fix/recurring-relaunch
dmytroshch Sep 6, 2023
a20461e
resolve conflits
dmytroshch Sep 6, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions public/locales/en-US/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -732,8 +732,6 @@
"updateCreds": "Update credentials"
},
"strategyEditor": {
"clearBacktestResultsModalTitle": "Confirmation Required",
"clearBacktestResultsModalText": "If you choose to continue, the current backtest results will be cleared. Do you wish to proceed?",
"unsavedChanges": "Unsaved changes",
"unsavedChangesModalTitle": "Do you need to save changes in the strategy before closing?",
"cancelThisProcess": "Cancel this process",
Expand Down Expand Up @@ -781,7 +779,9 @@
"openStartegyModalNoSelectedError": "No strategy selected",
"backtestingCreateMessage": "Create a strategy to begin backtesting",
"backtestingLoadingMessage": "Loading candles and executing strategy...",
"backtestingStartingMessage": "Press start to begin backtesting",
"backtestingStartingMessage": "Click \"Start\" to begin backtesting",
"backtestingHistoryListMessage": "Select a completed backtest and view its details",
"backtestingHistoryDetailsMessage": "Click \"More info\" to view backtest performance metrics, trades and chart table",
"exportCSV": "Export as CSV",
"exportStrategy": "Export strategy to JSON",
"historical": "Historical",
Expand Down Expand Up @@ -871,7 +871,14 @@
"lastQuarter": "Last quarter",
"lastYear": "Last year",
"lastXyears": "Last {{amount}} years",
"elapsedTime": "Elapsed time"
"elapsedTime": "Elapsed time",
"noHistoryBacktests": "No backtests in history",
"executedAt": "Executed at",
"period": "Period",
"tradingPair": "Trading Pair",
"source": "Source",
"candlesSource": "Candles ({{timeframe}}),\n\n Seed count = {{candleSeed}}",
"backtestHistoryResults": "Backtest results for"
},
"ui": {
"ok": "Okay",
Expand Down Expand Up @@ -913,7 +920,8 @@
"saveAndLaunch": "Save & Launch",
"launchNoSave": "Launch without saving",
"updateAndRestart": "Update and Restart",
"saveAndContinue": "Save and Continue"
"saveAndContinue": "Save and Continue",
"starred": "Starred"
},
"crashHandler": {
"text1": "An error occurred that caused the Bitfinex Honey UI to halt. Please, restart the application to proceed working with it",
Expand Down
21 changes: 3 additions & 18 deletions src/components/AlgoOrdersHistoryButton/AlgoOrdersHistoryButton.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,16 @@
import React, { useRef, useEffect } from 'react'
import _toUpper from 'lodash/toUpper'
import { useDispatch, useSelector } from 'react-redux'

import { useTranslation } from 'react-i18next'
import { Spinner } from '@ufx-ui/core'
import PanelButton from '../../ui/Panel/Panel.Button'
import { getShowAOsHistory } from '../../redux/selectors/ao'
import { getIsAOsHistoryLoaded } from '../../redux/selectors/ws'
import AOActions from '../../redux/actions/ao'
import useToggle from '../../hooks/useToggle'
import HistoryIcon from '../../ui/Icons/HistoryIcon'

import './style.css'
import HistoryButton from '../../ui/HistoryButton'

const AlgoOrdersHistoryButton = () => {
const [isHistoryLoading, , setIsLoading, setStopLoading] = useToggle(false)
const timeoutId = useRef(null)

const { t } = useTranslation()

const isHistoryActive = useSelector(getShowAOsHistory)
const isHistoryLoaded = useSelector(getIsAOsHistoryLoaded)

Expand Down Expand Up @@ -62,17 +54,10 @@ const AlgoOrdersHistoryButton = () => {
}, [])

return (
<PanelButton
<HistoryButton
onClick={onButtonClickHandler}
text={_toUpper(t('tradingStatePanel.history'))}
isActive={isHistoryActive}
icon={
isHistoryLoading ? (
<Spinner className='hfui-history-button__spinner' />
) : (
<HistoryIcon className='hfui-history-button__icon' width='25px' height='25px' />
)
}
isLoading={isHistoryLoading}
/>
)
}
Expand Down
Loading
Loading