Merge pull request #49 from Algoteers/develop

Update FB Kinds
This commit is contained in:
benme authored and GitHub committed 2019-03-23 13:24:55 +01:00
commit 8fd86379d1
4 files changed
+21 -21

No files matched your search

+9 -9
View File
@@ -43,7 +43,7 @@ class AddClone extends Component {
month: 1,
processName: '',
//TraderBot
//TradingBot
timePeriod: '01-hs',
//Error handlers
@@ -155,7 +155,7 @@ class AddClone extends Component {
<FormHelperText>{this.state.selectedBot.kind}</FormHelperText>
</FormControl>
{ this.state.selectedBot.kind === "TRADER" &&
{ this.state.selectedBot.kind === "Trading" &&
<React.Fragment>
<Typography className={classes.typography} variant='subtitle1' align='justify'>
Available Running Modes are Backtest and Live.
@@ -327,8 +327,8 @@ class AddClone extends Component {
</React.Fragment>
}
{ (this.state.selectedBot.kind === "INDICATOR"
|| this.state.selectedBot.kind === "EXTRACTOR") &&
{ (this.state.selectedBot.kind === "Indicator"
|| this.state.selectedBot.kind === "Sensor") &&
<React.Fragment>
<TextField
select
@@ -522,7 +522,7 @@ class AddClone extends Component {
}
}
if(this.state.selectedBot.kind === "TRADER"){
if(this.state.selectedBot.kind === "Trading"){
variables.clone.runAsTeam = this.state.runAsTeam
variables.clone.processName = 'Trading-Process'
variables.clone.timePeriod = this.state.timePeriod
@@ -547,11 +547,11 @@ class AddClone extends Component {
}
getBotTypeFromKind(kind){
if(kind === 'TRADER')
if(kind === 'Trading')
return 'Trading'
else if(kind === 'INDICATOR')
else if(kind === 'Indicator')
return 'Indicator'
else if(kind === 'EXTRACTOR')
else if(kind === 'Sensor')
return 'Extraction'
}
@@ -607,7 +607,7 @@ class AddClone extends Component {
this.setState(state => ({ modeError: true }));
}
if(this.state.selectedBot.kind !== "TRADER"
if(this.state.selectedBot.kind !== "Trading"
&& this.state.processName.length < 1 ) {
isError = true
this.setState(state => ({ processNameError: true }));
+3 -3
View File
@@ -44,7 +44,7 @@ class ListClones extends Component {
</div>
<div className={classes.heading}>
<Typography className={classes.heading}>
{ clone.processName } / { clone.botType === 'TRADER' ? tradingStartModesList[clone.mode] : indicatorStartModes[clone.mode] }
{ clone.processName } / { clone.botType === 'Trading' ? tradingStartModesList[clone.mode] : indicatorStartModes[clone.mode] }
</Typography>
</div>
</ExpansionPanelSummary>
@@ -90,7 +90,7 @@ class ListClones extends Component {
<div className={classes.details}>
<div className={classes.column4}>
<Typography className={classes.cloneInfoBold}>Last Execution:</Typography>
{ (clone.botType === 'TRADER' && isDefined(clone.assetA) ) &&
{ (clone.botType === 'Trading' && isDefined(clone.assetA) ) &&
<React.Fragment>
<Typography className={classes.cloneInfoBold}>Buy Average:</Typography>
<Typography className={classes.cloneInfoBold}>Sell Average:</Typography>
@@ -102,7 +102,7 @@ class ListClones extends Component {
</div>
<div className={classes.column4}>
<Typography className={classes.cloneInfoNormal}>{ toLocalTime(clone.summaryDate) }</Typography>
{ (clone.botType === 'TRADER' && isDefined(clone.assetA) ) &&
{ (clone.botType === 'Trading' && isDefined(clone.assetA) ) &&
<React.Fragment>
<Typography className={classes.cloneInfoNormal}>{clone.buyAverage}</Typography>
<Typography className={classes.cloneInfoNormal}>{clone.sellAverage}</Typography>
+6 -6
View File
@@ -1,11 +1,11 @@
export const TRADER = 'Trading'
export const INDICATOR = 'Indicator'
export const EXTRACTION = 'Extraction'
export const Trading = 'Trading'
export const Indicator = 'Indicator'
export const Sensor = 'Extraction'
export const BotTypesEnum = [
TRADER,
INDICATOR,
EXTRACTION
Trading,
Indicator,
Sensor
]
export default BotTypesEnum
+3 -3
View File
@@ -4,7 +4,7 @@ import { KubernateError } from '../errors'
import { Client, config } from 'kubernetes-client'
import deploymentManifest from '../config/clone-deployment.json'
import { BACKTEST, COMPETITION, LIVE, NO_TIME } from '../enums/CloneMode'
import { TRADER, INDICATOR, EXTRACTION } from '../enums/BotTypes'
import { Trading, Indicator, Sensor } from '../enums/BotTypes'
const createClone = async (clone) => {
try {
@@ -82,7 +82,7 @@ const createClone = async (clone) => {
})
logger.debug('createClone Trading Configuration.')
if (clone.botType === TRADER) {
if (clone.botType === Trading) {
env.push({
'name': 'RESUME_EXECUTION',
'value': clone.resumeExecution.toString()
@@ -130,7 +130,7 @@ const createClone = async (clone) => {
'value': clone.keyId
})
}
} else if (clone.botType === INDICATOR || clone.botType === EXTRACTION) {
} else if (clone.botType === Indicator || clone.botType === Sensor) {
if (clone.mode !== NO_TIME) {
env.push({
'name': 'MIN_YEAR',