-
-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New frontend #287
New frontend #287
Conversation
@linusg what I've seen so far is mouth-watering; please don't stop! :-) I pulled in this branch and symlinked as so: cd docroot/
ln -s ../public . before launching the Recorder. I get the new page when opening What I see server-side, is dozens of queries to the API, and this occurs periodically every few (10?) seconds:
|
So you see the header at the top, but no map tiles and data show up? Can you please open the "Network" tab in the developer tools of your browser ( I created the new directory (
Yes - I believe what you're seeing is this, since all users and devices will be shown by default (yet another config value!): recorder/public/static/main.js Lines 186 to 197 in 2e04e65
(Is there a possibility of getting the history for multiple users/devices at once? Omitting them yields and the ten second interval might be a WebSocket message coming in: recorder/public/static/main.js Lines 126 to 130 in 2e04e65
My thoughts behind this were: whenever the WebSocket reports a new last location, pull the same information again from HTTP API endpoint because the WebSocket data contains less information. Also, fetch the history so points and the line will update as well. We should probably disable this by default and make it configurable (e.g. |
Loaded in Firefox, and I see map and points. Hmm. (No 404s in debugger). Chrome shows the header only with no errors in JS console, and Safari (all on Mac) shows a single 404 for
Right you are: the API queries are due to Websocket traffic. I've narrowed this Recorder down to a single user and when I publish 3 individual OwnTracks positions I clearly see this on Recorder's console:
So you'd like
Yes, please. I know of users with 30 or 40 devices (vehicles) reporting at a frequency of around a minute. |
Not necessarily - but that or doing one request for each device shown are the only options available :) |
I can not load this in chorme. The leavlet map seams to have height: 0px. But I see network traffic which looks goot. When I start it in firefox, I`ve got SAML error in the api endpoint (I use owntrack with apache mellon and saml auth). I will try to debug this later on. |
Update: I can confirm the map is not displaying in Chromium, for some reason some of the CSS is missing/not applied - I see no 404s though, so same as @tabacha. For various reasons I decided to not continue developing this as a new feature for https://github.com/owntracks/recorder but rather continue as an independent project, because:
Of course the source code will be free to use and modify, and people interested can just grab their copy, do a production build and configure their server of choice to serve the content of the resulting |
Good luck. |
This is NOT finished yet - just for some people to have a look. I'll add commits as I continue development.
Please add suggestions and feedback of all kinds in the issue thread #284. I'll update this ToDo list then.
ToDo
https://fonts.gstatic.com/s/notosans/v7/...
URLs inpublic/static/vendor/noto-sans@7/noto-sans.css
Example:
https://my.owntracks.org?from=2019-01-01&to=2019-01-29&user=linus&device=ipad&layer=last,line,heatmap&zoom=12¢er=48.12345,8.12345
Features
Maybe I'll compile a list of all features here in the future. For now just one specific one:
Configuration
You can basically copy parts of the configuration object from
public/static/config/default.js
topublic/static/config/custom.js
, and change values, e.g.:That means a lot of things can be tweaked: tile server, accent color, default start and end date, heatmap colors, map zoom levels, ... More to come!
Warning: you might end up with something like this 😉