Merge pull request #18 from AAVikings/master

Adding fixes for add clone and kubernetes names
This commit is contained in:
z@tOr authored and GitHub committed 2019-02-05 21:52:08 -03:00
commit 5b05bb4a4e
5 files changed
+36 -19

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@superalgos/operations-client",
"version": "0.0.8",
"version": "0.0.11",
"description": "Superalgos Operations client-side web app",
"main": "src/index.js",
"dependencies": {
+2 -2
View File
@@ -1,8 +1,8 @@
import gql from 'graphql-tag';
export const GET_ALL_TEAMS_QUERY = gql`
query Teams_FbByTeamMember {
teams_FbByTeamMember {
query {
teams_TeamsByOwner {
id
name
slug
+14 -1
View File
@@ -1,8 +1,21 @@
const types = [ 'Live', 'Competition', 'Backtest' ]
const startModes = [ 'All Months', 'One Month', 'No Time' ]
const availableMonths = ["January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December"]
const startModes = [
{
name: 'All Months',
value: 'allMonths'
},
{
name: 'One Month',
value: 'oneMonth'
},
{
name: 'No Time',
value: 'noTime'
}
]
const exchanges = [
{
id: '1',
+18 -14
View File
@@ -119,7 +119,7 @@ class AddClone extends Component {
)
}
if(!isDefined(data.teams_FbByTeamMember)){
if(!isDefined(data.teams_TeamsByOwner)){
return (
<Select
value='noteams'
@@ -132,7 +132,7 @@ class AddClone extends Component {
</Select>
)
} else{
this.teams = data.teams_FbByTeamMember
this.teams = data.teams_TeamsByOwner
}
return (
@@ -145,10 +145,12 @@ class AddClone extends Component {
onChange={e => this.setSelectedBot(e.target.value)}
>
{
data.teams_FbByTeamMember.fb.map(financialBeing => (
<MenuItem key={financialBeing.id} value={financialBeing.id}>
{data.teams_FbByTeamMember.name + '/' + financialBeing.name}
</MenuItem>
data.teams_TeamsByOwner.map(team => (
team.fb.map(financialBeing => (
<MenuItem key={financialBeing.id} value={financialBeing.id}>
{team.name + '/' + financialBeing.name}
</MenuItem>
))
))
}
</Select>
@@ -289,8 +291,8 @@ class AddClone extends Component {
fullWidth
>
{startModes.map(option => (
<MenuItem key={option} value={option}>
{option}
<MenuItem key={option.value} value={option.value}>
{option.name}
</MenuItem>
))}
</TextField>
@@ -371,7 +373,7 @@ class AddClone extends Component {
<Typography className={classes.typography} variant='subtitle1' align='justify'>
You will your clone information under Active Clones until it finishes the execution, then it will moved to the History.
You will be able to query your clone information under Active Clones until it finishes the execution, then it will moved to the History.
</Typography>
<div className={classes.actionButton} >
@@ -410,11 +412,13 @@ class AddClone extends Component {
setSelectedBot(botId){
if(isDefined(this.teams)){
for (var i = 0; i < this.teams.fb.length; i++) {
if(this.teams.fb[i].id === botId){
this.setState({selectedBot:this.teams.fb[i]})
this.setState({teamId:this.teams.id})
return
for (var j = 0; j < this.teams.length; j++) {
for (var i = 0; i < this.teams[j].fb.length; i++) {
if(this.teams[j].fb[i].id === botId){
this.setState({selectedBot:this.teams[j].fb[i]})
this.setState({teamId:this.teams[j].id})
return
}
}
}
}
+1 -1
View File
@@ -17,7 +17,7 @@ const cloneDetails = async(authId, team, clone) => {
clone.kind = selectedBot.kind
clone.teamSlug = team.slug
clone.botSlug = selectedBot.slug
clone.cloneName = clone.teamSlug + '-' + clone.botSlug + '-' + clone.mode.toLowerCase()
clone.cloneName = (clone.teamSlug + '-' + clone.botSlug + '-' + clone.mode).toLowerCase()
clone.teamName = team.name
clone.botName = selectedBot.name
clone.botAvatar = selectedBot.avatar