GithubHelp home page GithubHelp logo

owntracks / frontend Goto Github PK

View Code? Open in Web Editor NEW
316.0 16.0 51.0 11.72 MB

๐ŸŒ Web interface for OwnTracks built with Vue.js

License: MIT License

HTML 0.80% JavaScript 52.66% Dockerfile 0.76% Vue 34.81% SCSS 10.96%
owntracks owntracks-recorder vue vuejs owntracks-ui owntracks-frontend javascript frontend

frontend's Introduction

OwnTracks

OwnTracks allows you to keep track of your own location. You can build your private location diary or share it with your family and friends. OwnTracks is open-source and uses open protocols for communication so you can be sure your data stays secure and private.

To get started, install OwnTracks on your smartphone. Afterwards you can connect it to an existing server straight away or follow the guide in our Documentation to set up your own.

Documentation

Build Status

frontend's People

Contributors

aasami avatar atjn avatar dependabot[bot] avatar dtorner avatar elu43 avatar growse avatar jmencak avatar jonas-w avatar jpmens avatar karmanyaahm avatar linusg avatar ramazansancar avatar robinmeis avatar saesh avatar sharkoz avatar wollew avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

frontend's Issues

Frontend stopped connecting to recorder.

I run owntracks recorder and frontend in swarm. After the latest recorder upgrade (version 0.8.8), the frontend stopped working properly. It is throwing:

10.0.1.11 - - [23/May/2022:07:56:26 +1000] "GET /?lat=-34.53xxx&lng=142.66xxx&zoom=6&start=2022-04-22T14%3A00%3A00&end=2022-05-23T13%3A59%3A59&layers=last,line HTTP/1.1" 200 471 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36"
10.0.1.11 - - [23/May/2022:07:56:26 +1000] "GET /config/config.js HTTP/1.1" 500 579 "https://owntracks.mydomain.com/?lat=-34.53xxx&lng=142.66xxx&zoom=6&start=2022-04-22T14%3A00%3A00&end=2022-05-23T13%3A59%3A59&layers=last,line" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36"
2022/05/23 07:56:26 [error] 9#9: *1 rewrite or internal redirection cycle while internally redirecting to "/config/config.js/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html", client: 10.0.1.11, server: , request: "GET /config/config.js HTTP/1.1", host: "owntracks.mydomain.com", referrer: "https://owntracks.mydomain.com/?lat=-34.53xxx&lng=142.66xxx&zoom=6&start=2022-04-22T14%3A00%3A00&end=2022-05-23T13%3A59%3A59&layers=last,line"
10.0.1.11 - - [23/May/2022:07:56:26 +1000] "GET /api/0/list HTTP/1.1" 502 559 "https://owntracks.mydomain.com/?lat=-34.53xxx&lng=142.66xxx&zoom=6&start=2022-04-22T14%3A00%3A00&end=2022-05-23T13%3A59%3A59&layers=last,line" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36"

I hope you can point me to the right direction in order to fix this issue...

My docker-compose.yml:

version: "3.8"

services:
  otr-recorder:
    image: owntracks/recorder
    volumes:
      - /mnt/docker/docker-volumes/owntracks:/store
    environment:
      - OTR_HOST=mosquitto.mydomain.com
      - OTR_USER=<edited>
      - OTR_PASS=<edited>
      - PUID=1000
      - PGID=1000
      - TZ=Australia/Melbourne
    networks:
      owntracks:
        aliases:
          - otr-recorder

  otr-frontend:
    image: owntracks/frontend
    environment:
      - SERVER_HOST=otr-recorder
      - SERVER_PORT=8083
      - TZ=Australia/Melbourne
    networks:
      - proxy
      - owntracks
    deploy:
      labels:
        - "traefik.enable=true"
        - "traefik.http.routers.owntracks.rule=Host(`owntracks.mydomain.com`)"
        - "traefik.http.routers.owntracks.tls.certresolver=letsencrypt"
        - "traefik.http.routers.owntracks.entrypoints=https"
        - "traefik.http.routers.owntracks.tls=true"
        - "traefik.http.routers.owntracks.middlewares=authelia@docker"
        - "traefik.http.services.owntracks.loadbalancer.server.port=80"

networks:
  owntracks:
    internal: true
  proxy:
    external: true

Subdirectory & relative paths

I have the UI hosted in a subdirectory, and the default yarn build makes every URL and include a relative path to the root.

IE

<script src="/config/config.js"></script>

I want those paths to be relative to the directory I installed it in, so I had to modify vue.config.js.

module.exports = {
  publicPath: '',
};

That fixes the yarn build to not include the leading slash.

<script src="config/config/js"></script>

Mapbox changed its api

url: "https://api.mapbox.com/v4/mapbox.dark/{z}/{x}/{y}@2x.png?access_token=xxxxxxxxxxxxxxxx",

This format isn't used anymore since 2020

The new format would be: https://api.mapbox.com/styles/v1/mapbox/dark-v10/tiles/{z}/{x}/{y}@2x?access_token= to display dark map tiles

Container just constantly restarts

Ran the docker compose, mapped the config file - container just restarts constantly.

2022/02/15 12:25:43 [emerg] 8#8: host not found in upstream "otrecorder:8083" in /etc/nginx/nginx.conf:7
nginx: [emerg] host not found in upstream "otrecorder:8083" in /etc/nginx/nginx.conf:7

Accessibility

We need to make sure the frontend is properly accessible to everyone - which it currently isn't.

  • Check default colour contrasts
  • Make sure keyboard navigation works for everything
  • Check if HTML semantics can be improved
  • Add HTML titles (especially important for icon-buttons)
  • Add ARIA attributes

Dynamic filter minAccuracy

I'll love to change the config.filter.minAccuracy value depending on the zoom level.

My use case is the following:

  • When looking at the map of a car trip (100km), the zoom level is low, I don't care if the accuracy is <100m.
  • When looking at the map of a small hike (10km), the zoom level is high, I want a good accuracy <10m.

The best implementation for me would be to have minAccuracy compatible with a mapping between the zoom level and a requested accuracy value.

Feature: Add time into the date selectors

It would be really useful to be able to select a time window as well as date. This is because the traces can get very busy even within 1 day so being able to narrow down to a time window would help massively.

Timeline feature

Would it be possible to add something similar to a timeline similar to what Googles location history offers?

Id be totally fine with manually confirming where I was and don't expect the data to be accurate enough for all of this to work without any user input.
For me this would be an amazing feature to have but i have no idea how hard an implementation would be.

Cheers!

Ignore ping?

A location ping/ping is showing up on the map in the frontend, this was not displayed in the recorder web view. It is possible to hide the ping? Or at least not include it in the autozoom?

Related to owntracks/recorder#195

First load of UI always starts at lat,lon=0.0

I've noticed in the last couple of versions the auto center does not seem to automatically work, the map starts zoomed into lat,long=0. Not a big issue, but could catch some users out since no data is shown until the user zooms out:

Screenshot 2020-02-08 at 03 45 02

Screenshot 2020-02-08 at 03 45 17

Make distance traveled calculation optional?

The new distance travelled feature is really awesome, however I think it would be a good idea to make the feature optional, since when trying to display lots of data over a long period the app now crashes while previously it didn't. This is presumably (and understandably!) due to the calculation intensive job of calculation distance.

Maybe it could be disabled by default, then enabled with a toggle whenever distance calculation is required?

manually building with yarn && frontend dist build && lower level api for old mobile (>2.1) phones

Hi,

Thanks for the potentially very cool project. A couple of major issues needing some attention.

**manually building with yarn

I got the recorder app (ot-recorder via ppa) running on ubuntu without docker. Tried docker but the setup gives no clue how to configure the docker container to the installed mosquitto service on ubuntu.

**frontend dist build

After that I tried to download and build the front end with yarn. Oh wow, troublesome. Peer dependencies fail on yarn install, and when I try to satisfy them one by one, it just gets worse.

Is there a cleaner way to build a dist of frontend I can slap into www/html? Maybe a direct download to a prebuilt dist?

**lower level api for old mobile (>android2.1) phones

The android app works well but fails to install on older devices. I got an old cm11 phone lying around that would be great as a tracking device, but a parsing error keeps popping up when I try to install the app.

Any help most welcome.

Regards

Lee

Websockets and openstreetmaps

Yesterday, my owntracks frontend is running fine, but now, the websockets and openstreetmaps are 403 forbidden. I wonder why

Can someone help me out?

owntracks

Document changing of application path

Hi all,

i would like to change the path of my frontend instance.
I observed similar behaviour as #32 when i deployed the dist folder content into a subfolder of my webroot.
Development Server worked perfectly fine. The only difference was the path. When deployed directly into a webroot there were also no issues at all.

I tried changing the public path with this guide
https://cli.vuejs.org/guide/deployment.html
but had no positive result.
Would someone be able to look into this and document this setting?

Dropdown for layer settings doesn't show on mouse click

The dropdown for the layer settings does not open if I click on it with the mouse, it only shows when I focus to it using the TAB key.

I am using Firefox 65.0.1 on MacOS 10.14.3.

BTW, are you sure you don't want to contributute this to the owntracks project ;-) ? I love the new UI and I'd hate to copy your UI files to my installation everytime the recorder gets an update.

Date/time filtering is not working

Hi.

When I try to filter in a from-to date-time mode, all collected locations are shown, not only the ones on the selected range:
image

Am I doing something wrong?

Calculate distance travelled between two dates?

Nice work on the front end, I've upgraded from an old version to the latest and it's developing really nice!

Could I request a feature to be able to calculate distance travelled (in km or miles) between two dates? Is this calculation already possible using an owntracks API?

Heatmap is broken

Not exactly sure what caused this, could be a dependency upgrade. No error in the console, <LHeatmap> exists in the component tree.

Friend-Based Views

OwnTracks Recorder has the notion of "Friends" - users who are able to view each other's positions on the mobile app. It would be amazing if there were a way to extend this to the web UI - based on the current http-authenticated user, only allow to see that user's friends on the map.

Update date/time picker to only load data on confirmation

If you select a period of time that is already a long time ago, the loading time is extended by the fact that the program immediately loads all data. Even before the user confirms the specified period.

So if the user selects a time period that starts more than a year ago, the program loads the entire last year. This leads to a crash of the tab.

Suggestions:

  1. Start loading the data only when the user presses the green check mark.
  2. A functionality for bookmarks. Allow the user to tag a period and later search for tags. -> Only the mentioned period will be loaded. I personally like this functionality very much

Thanks!

Wrong order when connecting points with line (frontend does not respect timestamps correctly)

Using the frontend (docker version):
When showing location history (line) the points are connected in the order how they are listed in the .rec file stored by otrecorder rather than using the timestamp that the client reports together with each position.
When clients loose cellular connectivity they cache positions and report them later. In otrecorder's .rec file these entries may be out of order, which is not a problem because clients report the positions together with correct timestamps.

frontend just connects the different entries "as a list" in the order how they appear in the .rec file. This occasionally creates nonsensical zig zag lines bouncing back and forth until the list follows a stringent chronological order again. Interestingly, otrecorder's built in linestring view does not suffer from this problem and connects all the points correctly in the order of the timestamps. It would be great if you could change the code in frontend to also respect the timestamps just like otrecorder linestring does.

Simple example:

These 6 locations are listed in the same chronological order as the timestamps:

2021-11-01T20:03:30Z	*                 	{"_type":"location","acc":6,"alt":398,"batt":83,"bs":1,"conn":"m","lat":40.358487,"lon":-110.03499,"tid":"P","tst":1635797010,"vac":108,"vel":3}
2021-11-01T20:05:14Z	*                 	{"_type":"location","acc":6,"alt":335,"batt":83,"bs":1,"cog":68,"conn":"m","lat":40.358936,"lon":-110.034868,"tid":"P","tst":1635797114,"vac":3,"vel":5}
2021-11-01T20:05:42Z	*                 	{"_type":"location","acc":8,"alt":339,"batt":83,"bs":1,"cog":4,"conn":"m","lat":40.359393,"lon":-110.03482,"tid":"P","tst":1635797142,"vac":3,"vel":4}
2021-11-01T20:06:43Z	*                 	{"_type":"location","acc":8,"alt":345,"batt":83,"bs":1,"cog":351,"conn":"m","lat":40.359741,"lon":-110.035266,"tid":"P","tst":1635797203,"vac":3,"vel":5}
2021-11-01T20:07:11Z	*                 	{"_type":"location","acc":8,"alt":349,"batt":83,"bs":1,"cog":326,"conn":"m","lat":40.360183,"lon":-110.03544,"tid":"P","tst":1635797231,"vac":3,"vel":4}
2021-11-01T20:07:35Z	*                 	{"_type":"location","acc":8,"alt":355,"batt":83,"bs":1,"cog":331,"conn":"m","lat":40.360581,"lon":-110.035816,"tid":"P","tst":1635797255,"vac":3,"vel":5}

These are the same locations but the last position appears higher up in the list (which happens frequently when clients loose connectivity temporarily):

2021-11-01T20:03:30Z	*                 	{"_type":"location","acc":6,"alt":398,"batt":83,"bs":1,"conn":"m","lat":40.358487,"lon":-110.03499,"tid":"P","tst":1635797010,"vac":108,"vel":3}
2021-11-01T20:05:14Z	*                 	{"_type":"location","acc":6,"alt":335,"batt":83,"bs":1,"cog":68,"conn":"m","lat":40.358936,"lon":-110.034868,"tid":"P","tst":1635797114,"vac":3,"vel":5}
2021-11-01T20:05:42Z	*                 	{"_type":"location","acc":8,"alt":339,"batt":83,"bs":1,"cog":4,"conn":"m","lat":40.359393,"lon":-110.03482,"tid":"P","tst":1635797142,"vac":3,"vel":4}
2021-11-01T20:07:35Z	*                 	{"_type":"location","acc":8,"alt":355,"batt":83,"bs":1,"cog":331,"conn":"m","lat":40.360581,"lon":-110.035816,"tid":"P","tst":1635797255,"vac":3,"vel":5}
2021-11-01T20:06:43Z	*                 	{"_type":"location","acc":8,"alt":345,"batt":83,"bs":1,"cog":351,"conn":"m","lat":40.359741,"lon":-110.035266,"tid":"P","tst":1635797203,"vac":3,"vel":5}
2021-11-01T20:07:11Z	*                 	{"_type":"location","acc":8,"alt":349,"batt":83,"bs":1,"cog":326,"conn":"m","lat":40.360183,"lon":-110.03544,"tid":"P","tst":1635797231,"vac":3,"vel":4}

frontend renders the upper list correctly and the lower list wrongly with a zig zag.
otrecorder renders both lists correctly, i.e. the render appears exactly the same for both lists as it follows the timestamps.

Map not loading at all

vue-cli-service build runs successfully but the map does not load at all.
In fact when I inspect the

element in html, it's completely empty.

Change default time span thats loaded

Another nice change would be changing the default time span that's loaded when opening the web interface.
The current default is one month. I'd much rather set it to a week or something like this because it would speed up loading times a lot, especially if I'm just checking something that has happened a few days ago.

IMO the best option would be an option in the GUI to let the user select between, lets say, today, a week and a month.
And whatever the user chooses would be the new default for when the frontend is being loaded

Only showing last location

As of 2.3.1 (running in docker) I am only seeing the last data point and the history/heatmap features are no longer working. I can confirm the recorder app is still able to show historical data. There are no javascript errors in the console (other than a missing config.js). Anyone else facing similar issue?

Heatmap?

The heatmap shown on the screenshots in the readme looks amazing. How was this created? I can't see an option in the frontend.

Is this feature yet to be implemented? Keep up the good work, this front end UI looks really promising ๐Ÿ‘

Accuracy filtering

This could either be exposed to the UI or just a config option. Location points with a accuracy below a certain threshold should then not be displayed or included in the distance calculation.

Not sure if this should be part of the recorder's API or just a frontend thing.

BaseURI to support OwnTracks not running at domain root

This is amazing...SOOO much nicer than having to remember the custom URL scheme to filter data in the default recorder! :)

Just one issue: in my setup, I use a reverse proxy to serve the recorder under a subpath of the domain (i.e. https://domain.com/owntracks). Although the default UI works, this retrieves no data.

The fix is easy: prepend all the '/api/...' URLs in static/main.js with a baseURI.

OSM Map not loading with reverse proxy

Hello,

I am using this frontend with the Owntracks Recorder, running in a LXC container with Proxmox. The path is /var/spool/owntracks/recorder.
The MQTT broker is also running in the same container. The address of this container is 192.168.2.155.

When I access to the frontend with http://192.168.2.155:8083 it's working very well, I can see my device.

I need to access to the frontend via https, so I created a proxy with Nginx. Here is the configuration (I will set https later) :

server {
    listen       80;
    server_name  192.168.2.155;
    location / {
        root   html;
        index  index.html index.htm;
    }

    # Proxy and upgrade WebSocket connection
    location /owntracks/ws {
        rewrite ^/owntracks/(.*)    /$1 break;
        proxy_pass      http://192.168.2.155:8083;
        proxy_http_version  1.1;
        proxy_set_header    Upgrade $http_upgrade;
        proxy_set_header    Connection "upgrade";
        proxy_set_header    Host $host;
        proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;
    }

    location /owntracks/ {
        proxy_pass      http://192.168.2.155:8083/;
        proxy_http_version  1.1;
        proxy_set_header    Host $host;
        proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header    X-Real-IP $remote_addr;
    }

    # OwnTracks Recorder Views                                                             
    location /owntracks/view/ {
         proxy_buffering         off;            # Chrome
         proxy_pass              http://192.168.2.155:8083/view;
         proxy_http_version      1.1;
         proxy_set_header        Host $host;
         proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
         proxy_set_header        X-Real-IP $remote_addr;
    }
    location /owntracks/static/ {
         proxy_pass              http://192.168.2.155:8083/static;
         proxy_http_version      1.1;
         proxy_set_header        Host $host;
         proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
         proxy_set_header        X-Real-IP $remote_addr;
    }

    # HTTP Mode
    location /owntracks/pub/ {
        auth_basic              "OwnTracks pub";
        auth_basic_user_file    /usr/local/etc/nginx/owntracks.htpasswd;
        proxy_pass              http://192.168.2.155:8083/pub;
        proxy_http_version      1.1;
        proxy_set_header        Host $host;
        proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header        X-Real-IP $remote_addr;

        # Optionally force Recorder to use username from Basic
        # authentication user. Whether or not client sets
        # X-Limit-U and/or uses ?u= parameter, the user will
        # be set to $remote_user.
        proxy_set_header        X-Limit-U $remote_user;
    }
}

I also changed the baseUrl in the config file in /var/spool/owntracks/recorder/config/config.js :

const startDateTime = new Date();
startDateTime.setHours(0, 0, 0, 0);

// Here you can overwite the default configuration values
window.owntracks = window.owntracks || {};
window.owntracks.config = {
  locale: "fr-FR",
  startDateTime,
  api: {
   baseUrl: "http://192.168.2.155/owntracks/",
  },
};

But then, when I access the frontend via http://192.168.2.155/owntracks , the frontend is loading with the blue upside bar, the data is loading as well because I can select my device, but the rest of the page stays blank without the OSM map.

As you can see on the attached screenshots, with address/owntracks, the browser console is loading nothing from OSM, but with address/8083 it does.
Capture
Capture2

Any idea what could cause my problem ? I have the same problem with Apache2. The map is working well in a view I created at address/owntracks/view/xyz though.

Thank you very much !

Noob Guide

Hi,

Is there anyone out there that can teach me how to establish this? I am having trouble setting this up (mqtt, owntracks recorder, and owntracks frontend). I can't get it to work. a noob guide tutorial for docker cli will be helpful.

Optimise for mobile

I almost always use this on my desktop computer, and rarely on a tablet - so there's never been any optimisation for small viewports.

For me it's definitely still not a priority though. I'm not interested in looking at my OwnTracks history on a 5" screen. Now I'm intrigued...

LTileLayer adding wms layer

Hi! i want to custom layer from server as wms. how can i?
e.g

LTileLayer: {
    baseUrl: "*****/geoserver/vega-api/wms?",
    layers: [
      {
        name: "Municipios",
        visible: true,
        layers: "vega_api:municipio"
      },
      {
        name: "Estados",
        visible: true,
        layers: "vega_api:estado"
      }
    ]
  }

The frontend is only showing up once, then switching back to standard view on reload

I have a weird issue and I guess it is no bug in owntracks/frontend, but in my nginx configuration. But I am really lost and hoped that the experts here can point me to a solution. If I open owntracks on my private domain it shows the nice map of owntracks/frontend.

But all selections like daterange, which are parsed to the domain are ignored, so I see always everything. And when I press i.e. reload, the old interface is loaded. It seems that frontend is only shown using the domain without anything behind it like the coordinates. That seems strange to me but I can't find the reason.

I installed owntracks first and it works. I wanted a nicer frontend and installed owntracks/frontend using docker-compose following the instructions:

owntracks-ui:
     image: owntracks/frontend
     ports:
      - "9122:80"
     volumes:
       - /home/andi/owntracks/ui-data/config.js:/usr/share/nginx/html/config/config.js
     environment:
       - SERVER_HOST=otrecorder # the UI needs to know where the recorder is
       - SERVER_PORT=8083
     restart: unless-stopped

I had to change the "ports" from "80:80" like mentioned in the docs because otherwise I got an error, that the port 80 is already in use.

I think the problem is in my nginx reverse proxy configuration which looks like this:

server {
    server_name  <mydomain>;

    # Proxy and upgrade WebSocket connection
    location /ws {
        rewrite ^/owntracks/(.*)    /$1 break;
        proxy_pass      http://127.0.0.1:8083;
        proxy_http_version  1.1;
        proxy_set_header    Upgrade $http_upgrade;
        proxy_set_header    Connection "upgrade";
        proxy_set_header    Host $host;
        proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;
    }

    location / {
        proxy_pass      http://127.0.0.1:8083/;
        proxy_http_version  1.1;
        proxy_set_header    Host $host;
        proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header    X-Real-IP $remote_addr;
    }

    # OwnTracks Recorder Views
    location /view/ {
         proxy_buffering         off;            # Chrome
         proxy_pass              http://127.0.0.1:8083/view/;
         proxy_http_version      1.1;
         proxy_set_header        Host $host;
         proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
         proxy_set_header        X-Real-IP $remote_addr;
    }
    location /static/ {
         proxy_pass              http://127.0.0.1:8083/static/;
         proxy_http_version      1.1;
         proxy_set_header        Host $host;
         proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
         proxy_set_header        X-Real-IP $remote_addr;
    }

    # HTTP Mode
    location /pub {
        #auth_basic              "OwnTracks pub";
        #auth_basic_user_file    /usr/local/etc/nginx/owntracks.htpasswd;
        proxy_pass              http://127.0.0.1:8083/pub;
        proxy_http_version      1.1;
        proxy_set_header        Host $host;
        proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header        X-Real-IP $remote_addr;

        # Optionally force Recorder to use username from Basic
        # authentication user. Whether or not client sets
        # X-Limit-U and/or uses ?u= parameter, the user will
        # be set to $remote_user.
        proxy_set_header        X-Limit-U $remote_user;
    }

    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/<mydomain>/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/<mydomain>/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
    }

I would really appreciate any help of the experts here.

Install manually fails

Trying to install on Debian 9.12. Are any dependencies missing?

Step 1:

$ yarn install
yarn install v1.22.0
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > [email protected]" has unmet peer dependency "@types/leaflet@^1.5.7".
warning " > [email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "babel-jest > babel-preset-jest > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning " > @vue/[email protected]" has unmet peer dependency "prettier@>= 1.13.0".
warning " > [email protected]" has unmet peer dependency "@babel/core@^7.0.0".
warning "babel-jest > [email protected]" has unmet peer dependency "@babel/core@^7.0.0".
warning "babel-jest > babel-preset-jest > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning " > [email protected]" has unmet peer dependency "prettier@>= 1.13.0".
warning " > [email protected]" has unmet peer dependency "webpack@^1 || ^2 || ^3 || ^4".
warning " > [email protected]" has unmet peer dependency "webpack@^4.36.0 || ^5.0.0".
[4/4] Building fresh packages...
Done in 34.41s.

Step 2:

$ yarn build
yarn run v1.22.0
$ vue-cli-service build
module.js:550
    throw err;
    ^

Error: Cannot find module 'vue-cli-plugin-i18n'
    at Function.Module._resolveFilename (module.js:548:15)
    at Function.Module._load (module.js:475:25)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at idToPlugin (/home/ckrey/.config/yarn/global/node_modules/@vue/cli-service/lib/Service.js:149:14)
    at Object.keys.concat.filter.map.id (/home/ckrey/.config/yarn/global/node_modules/@vue/cli-service/lib/Service.js:188:20)
    at Array.map (<anonymous>)
    at Service.resolvePlugins (/home/ckrey/.config/yarn/global/node_modules/@vue/cli-service/lib/Service.js:174:10)
    at new Service (/home/ckrey/.config/yarn/global/node_modules/@vue/cli-service/lib/Service.js:33:25)
    at Object.<anonymous> (/home/ckrey/.config/yarn/global/node_modules/@vue/cli-service/bin/vue-cli-service.js:15:17)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

GeoJson Download

I'll like to download my selected location data as GeoJson so that I could import it in other app.
The current Download button downloads it in a format that isn't standard. (Is it ?) I don't actually know what to do with this format.

Can't find servers name

I'm changing the location services provider so it's not Google anymore, I'm deegoogling. Following this guide, point 3: https://www.reddit.com/r/degoogle/comments/cldohl/how_to_degoogle_lineageos_in_2019/

As all that providers are not good enough I was suggested to use Owntracks instead, however after reading the booklet and installing your app I can't find any info of your server, so I don't know which one should I put. What is the direction of your servers to use them for location services?

Cannot view historic data?

When I select a date time frame using the data pickers the trace data for that time period is not shown.

The data is available as shown on the Recorder web view:

Screenshot 2019-09-29 at 01 51 46

Screenshot 2019-09-29 at 01 50 55

Inspecting the network page I can see that it looks the frontend successfully obtained the data for the requested period but the data was not displayed on the map:

Screenshot 2019-09-29 at 01 57 04

I'm running the latest docker version of the frontend:
Screenshot 2019-09-29 at 01 52 05

Docker Container Won't Start

I'm trying to run Owntracks Frontend (owntracks/frontend:latest) in a Docker container via Portainer and the command to start it is:

/bin/sh -c /bin/sh -c " envsubst \${SERVER_HOST} \${SERVER_PORT} \${LISTEN_PORT} < /etc/nginx/nginx.tmpl > /etc/nginx/nginx.conf && nginx -g daemon off; || ( env; cat /etc/nginx/nginx.conf ) "

The environment vars are:

SERVER_HOST 192.168.2.232
SERVER_PORT 80
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
NGINX_VERSION 1.17.10
NJS_VERSION 0.3.9
PKG_RELEASE 1
LISTEN_PORT 80

Unfortunately, the container starts and stops immediately reporting:

\${SERVER_PORT}: line 1: syntax error: unterminated quoted string

I've poked around trying to fix this for way too long. What am I missing?

Road to v2

Hi everyone!

I finally published my sources for v2 (4d971d5)!

See progress and changes in #16

Many parts are written from scratch, now using a Node.js based development workflow including a build step using Babel, Vue single file components, Sass and Webpack.

I'm considering replacing the current styles with Tailwind CSS.

My roadmap for the next few weeks, not necessarily in that order:

  • Fix existing bugs in the current implementation:
    • Most importantly the heatmap which is not working yet
    • All reported bugs that were inherited from v1, e.g. dropdown issues in some browsers
    • cors-proxy WebSocket connection can't be established
  • Document every possible config option
  • Document all public functions (https://devdocs.io/jsdoc/)
  • Add tests, at least for util and API functions. I'm comfortable writing tests for React but not yet for Vue.
  • Implement all requested (new) features as of now. Features that'll be requested in the future will land in v2.1+, exceptions can be made for PRs by others and simple stuff.

After that I'll do a proper beta release, wait for more bug reports and fixes and then do the initial stable release.

I'll not work on fixes or features for v1 anymore, I think my time is much better spent getting v2 out now. Inherited bugs will of course be resolved as stated above.

As always: any suggestions, bug reports, feature requests and help with implementing them are highly appreciated!

Outlier filtering

I did, in fact, not take a trip into the River Thames.

image

We could do this by calculating the average speed between points for example, a sudden spike is an outlier. (great idea from @growse)

Not sure if this should be part of the recorder's API or just a frontend thing.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.