From 46c984fcfd5071487f8076508df2e68e5f2aa995 Mon Sep 17 00:00:00 2001 From: Mike van Rossum Date: Sat, 30 Jun 2018 00:33:53 +0700 Subject: [PATCH] update live gekko to 0.6 events --- web/vue/public/favicon.ico | Bin 1150 -> 0 bytes .../backtester/result/roundtripTable.vue | 2 +- web/vue/src/components/gekko/list.vue | 10 +- web/vue/src/components/gekko/new.vue | 8 +- ...{singleStratrunner.vue => singleGekko.vue} | 164 +++++++++++------- web/vue/src/main.js | 6 +- 6 files changed, 110 insertions(+), 80 deletions(-) delete mode 100644 web/vue/public/favicon.ico rename web/vue/src/components/gekko/{singleStratrunner.vue => singleGekko.vue} (51%) diff --git a/web/vue/public/favicon.ico b/web/vue/public/favicon.ico deleted file mode 100644 index c7b9a43c8cd16d0b434adaf513fcacb340809a11..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1150 zcmchVOGsN$5QZm2NTI$erQpKHrdQX(jn+pVxKN`Ng)RzW5+8_2Xb@Y)Dkd6tq9V8u z3WAh^C@KZ1kA;tohzs}b3NC_*QmUXr$oP*rH(2mdT{z*(KX=aj=bX$9kqMvFRKj;Q zwI&d~A);J>5-PDega~WT5us%#Dc(Y}C4WpP?+fS;FaZ*z_CFzgiW=w{I02=q_TUz( z?=^H2uwoIK1n%|Ay21~QgjV1emYtWttJdz^L#=DjJ@Ex*9UPc*7<=rZo*_NAh4PxA zqkso~Ioa1y$e+3kIkXi29YNLi&lW}vY6C}ut4{8ou(7w=$_=$v{yJ$h?y!&bJfq*( zL_NQRF37$6e>%9erGV?p^lRFD?|5J_eupXaS;QluyrOmBT>PJhirMYb*i?(4Tf=j~?VvnUlY_ zDCVuuk3E&T9aP~Cr-0i-MaKUjf_|U!=R&t}_CfD=d${p~HH`BPaqb9aXT}UI$iGRg z>0^GlZ`vM4?;$*LhfI(RG|XK4GF+@-W*W}YJT5&2N_ZyZuaM_Ry=%PWx>r0P(Rc?> jRc4}SfGA>*agjwN{7E7DEm(*)%rSx{B0<6wBoglxJAy|R diff --git a/web/vue/src/components/backtester/result/roundtripTable.vue b/web/vue/src/components/backtester/result/roundtripTable.vue index ece286adb..81268d5a3 100644 --- a/web/vue/src/components/backtester/result/roundtripTable.vue +++ b/web/vue/src/components/backtester/result/roundtripTable.vue @@ -36,7 +36,7 @@ export default { methods: { diff: n => moment.duration(n).humanize(), humanizeDuration: (n) => window.humanizeDuration(n), - fmt: mom => moment.unix(mom).utc().format('YYYY-MM-DD HH:mm'), + fmt: mom => moment(mom).utc().format('YYYY-MM-DD HH:mm'), round: n => (+n).toFixed(3), }, } diff --git a/web/vue/src/components/gekko/list.vue b/web/vue/src/components/gekko/list.vue index f16262f99..bd09e28bd 100644 --- a/web/vue/src/components/gekko/list.vue +++ b/web/vue/src/components/gekko/list.vue @@ -15,7 +15,7 @@ th last update th duration tbody - tr.clickable(v-for='gekko in watchers', v-on:click='$router.push({path: `live-gekkos/watcher/${gekko.id}`})') + tr.clickable(v-for='gekko in watchers', v-on:click='$router.push({path: `live-gekkos/${gekko.id}`})') td {{ gekko.config.watch.exchange }} td {{ gekko.config.watch.currency }} td {{ gekko.config.watch.asset }} @@ -41,7 +41,7 @@ th type th trades tbody - tr.clickable(v-for='gekko in stratrunners', v-on:click='$router.push({path: `live-gekkos/stratrunner/${gekko.id}`})') + tr.clickable(v-for='gekko in stratrunners', v-on:click='$router.push({path: `live-gekkos/${gekko.id}`})') td {{ gekko.config.watch.exchange }} td {{ gekko.config.watch.currency }} td {{ gekko.config.watch.asset }} @@ -53,10 +53,10 @@ td template(v-if='!gekko.report') 0 template(v-if='gekko.report') {{ round(gekko.report.profit) }} {{ gekko.watch.currency }} + td {{ gekko.logType }} td - template(v-if='gekko.trader') {{ gekko.trader }} - td - template(v-if='gekko.trades') {{ gekko.trades.length }} + template(v-if='!gekko.events.trades') 0 + template(v-if='gekko.events.trades') {{ gekko.events.trades.length }} .hr h2 Start a new live Gekko router-link.btn--primary(to='/live-gekkos/new') Start a new live Gekko! diff --git a/web/vue/src/components/gekko/new.vue b/web/vue/src/components/gekko/new.vue index 544db89c0..32311955f 100644 --- a/web/vue/src/components/gekko/new.vue +++ b/web/vue/src/components/gekko/new.vue @@ -4,7 +4,7 @@ gekko-config-builder(v-on:config='updateConfig') .hr .txt--center(v-if='config.valid') - a.w100--s.my1.btn--primary(href='#', v-on:click.prevent='start') Start + a.w100--s.my1.btn--primary(href='#', v-on:click.prevent='start', v-if="!pendingStratrunner") Start