Uh oh!
There was an error while loading. Please reload this page.
Web view improvements (update interval, settings) - #286
Conversation
Why? The bot has a slow cycle. Since my bot is running at 1 min cycle, 30 sec is optimal for getting reasonable updates and not wasting bandwidth on mobile. In any case, please make it configurable, I see 2 options:
|
ckcollab
commented
Mar 31, 2017
Interval ~10seconds -- I love watching the log flying around right after I make changes, etc. across all my coins (and their prices). I'm used to streaming output so I like it as up-to-date as possible :) I mean, ideally it should be configurable based on preferences. I could add a button/slider/drop down to set this value? |
rnevet
commented
Mar 31, 2017
We have already some URL options. |
ckcollab
commented
Mar 31, 2017
Oh. I wasn't even aware of the URL options! I skimmed over that in the docs. ...maybe I can add a nice little section for managing all of these options... :) For my reference http://poloniexlendingbot.readthedocs.io/en/latest/configuration.html#lendingbot-html-options |
rnevet
commented
Mar 31, 2017
That would be great, never got to that. |
rnevet
commented
Apr 1, 2017
Just use prettyFloat instead of printFloat. |
rnevet
commented
Apr 2, 2017
Actually I would like the time views to be selectable by checkboxes in the settings as well, personally I would look at daily, monthly only. |
rnevet
commented
Apr 3, 2017
btw, I was working here to add "Total Account Value": |
| if (currency == "BTC") { | ||
| return displayUnit.formatValue(earnings) + " <span class=" + currencyClass + ">" + displayUnit.name + "</span> / " + name + "<br/>" | ||
| } else if (currency == "USD" || currency == "USDT") { | ||
| return printFloat(earnings, 2) + " <span class=" + currencyClass + ">" + currency + "</span> / "+ name + "<br/>"; |
There was a problem hiding this comment.
I suggest we just use prettyFloat(earnings,2) instead of trying to guess which currency is a Fiat one.
There was a problem hiding this comment.
That would change behavior for quite a few coins, I think we want to see Satoshi level resolution most of the times?
There was a problem hiding this comment.
What other currencies should we add here? Some currencies may need special printing, in this case for USD it makes sense.
There was a problem hiding this comment.
Also, the other currencies in this function use printFloat, you want to go in and change these to the style you prefer?
There was a problem hiding this comment.
@ckcollab "EUR" for example and actually any currency supported by https://blockchain.info/api/exchange_rates_api
I'm thinking about using the prettyFloat as it will provide an accuracy of 2 decimals for any coin and I think that should be good enough, no? or should we make the accuracy configurable?
I'm open for suggestions.
There was a problem hiding this comment.
Suggestion: I also add EUR, but maintain consistency with the surrounding code. Then in a separate PR we decide how to handle this particular problem.
| total_cell.innerHTML = "Total holdings"; | ||
| total_cell = total_row.appendChild(document.createElement("th")); | ||
| total_cell.setAttribute("colspan", 2); | ||
| total_cell.innerHTML = prettyFloat(totalCoinsOverall, 2) + " USD"; |
There was a problem hiding this comment.
USD? I guess it should be earningsOutputCoin
There was a problem hiding this comment.
Since you're doing this in another PR I'll pull this stuff
rnevet
commented
Apr 5, 2017
If you need a Gear icon you can use one from http://fontawesome.io/icons/ |
ckcollab
commented
Apr 6, 2017
Just using the Bootstrap one, is fontawesome also included? Probably not necessary to have two icon libs when we only have the 1 page. |
ckcollab
commented
Apr 14, 2017
Goahead and replace, I don't mind :)
Added a check for this.
I'd rather not, very very busy! Glad to share what little I could given I use this all the time, thanks for all the hard work! |
rnevet
commented
Apr 14, 2017
It is great! We will build upon. :) |
I move to merge in its current state, since I don't want to muck around with multiple branches while trying to change a single icon. @rnevet I leave final decision to you. |
@Evanito I've made the rest of the changes and minor fixes in this branch https://github.com/Mikadily/poloniexlendingbot/tree/web_setting. Made a PR back to @ckcollab and when he merges it, it should appear here. (Otherwise we can create a new PR from web_setting branch.) |
Replace printFloat with prettyfloat for Fiat currencies (doesn't display .00)
…o get bad data set (sets localStorage without checking if it's valid)
As btcDisplayUnitsModes isn't a list of strings a simple indexOf won't match the mode.
new header with collapsing menu
@yura-pakhuchiy can you test this as well? |
yura-pakhuchiy
commented
Apr 16, 2017
LGTM! I had exactly the same idea for settings dialog on webpage itself for quite some time. I have never found time to implement it. @ckcollab@rnevet Greak work! Small things which can be improved:
|
rnevet
commented
Apr 16, 2017
@ckcollab Thanks! |
ckcollab
commented
Apr 16, 2017
@rnevet my pleasure, thanks for this project! |
laxdog
commented
May 3, 2017
ckcollab
commented
May 3, 2017
Least I could do :) |
Todo
Limit USD view to only show 2 decimal placesBelieve this is being handed off to Total Account Holdings feature?Description
This makes the page update every 10 seconds instead of every 30.
TESTING STAGE
Currently testing this for 24hrs
Types of changes
Checklist: