EOSEssentials / EOSTracker

🗄EOS Tracker: Real time block explorer for EOS Blockchain
https://eostracker.io
GNU General Public License v3.0
168 stars 101 forks source link

how change refresh time for dashboard? #65

Closed newbieh4cker closed 6 years ago

newbieh4cker commented 6 years ago

in src\app\dashboard\dashboard\dashboard.component.ts file.

I've changed every timer function as timer(0, 500). installed with "npm install --unsafe-perm --no-optional" command.

but When I go to dash board page, refresh time is still 15~20 seconds.

How can I change it to 5 sec?

kesar commented 6 years ago

That's probably the caching in the API side, are you using your own API or taking the one from eostracker api?

newbieh4cker commented 6 years ago

@kesar I'm using EOSTracker-API

kesar commented 6 years ago

https://github.com/EOSEssentials/EOSTracker-API/blob/master/src/AppBundle/Controller/DefaultController.php#L24

you need to remove cache or set it to a lower interval like 1

newbieh4cker commented 6 years ago

@kesar here is a thing. When I use "https://api.eostracker.io" as apiUrl, it works good. But, using my local api(cloend from EOSTracker-API), dashboard returns

main.1c5e95c051495cd32a3f.js:5000 ERROR TypeError: t.map is not a function

tianyangj commented 6 years ago

@newbieh4cker If you are using "map" operator, make sure you import {map} from 'rxjs/operators'.

newbieh4cker commented 6 years ago

@tianyangj Since It's working great with "api.eostracker.io", I think problem is EOSTracker-API. But I'm not sure which file is causing problem.

tianyangj commented 6 years ago

If the issue is in EOSTracker-API, please open issue in that repo. I am closing this thread.