Monday 8 August 2016

Making Traccar.org server work without internet connection

/opt/traccar/web/release.html:
download all external references to cloudflare CDN for css and java libraries to a new folder:

need to clone extjs/6.0.1/classic/theme-neptune/resources into ajaxlocal
sudo mkdir /opt/traccar/web/ajaxlocal
cd //opt/traccar/web/ajaxlocal
sudo wget http://{cdn css or js library to download} 
you will also need to download http://cdnjs.cloudflare.com/ajaz/libjs/extjs/6.0.0/classic/locale/locale-en.js (if this is your chosen language

http://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.1/classic/theme-neptune/resources/theme-neptune-all_1.css
http://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.1/classic/theme-neptune/resources/theme-neptune-all_2.css


theme-neptune-all_1.css
and
theme-neptune-all_2.css
(probably a more elegant way of doing it)
download fontawesome from fontawesome.io version 4.6.3 (or whatever version is called by script - check the debug console of your browser for network resources it tries to load.
extract font-awesome css and font-awesome.min.css into the new /ajaxlocal folder
make a new folder
sudo mkdir /opt/traccar/web/fonts/

extract font-awesome/fonts into /opt/traccar/web/fonts/
cd /opt/traccar/web/fonts
sudo cp /home/pi/Downloads/font-awesome-4.6.3/fonts/* ./


edit /opt/traccar/web/locale.js to point to your ajaxlocal/locale-en.js as downloaded above so the line looks like
Ext.Loader.loadScript('ajaxlocal/locale-' + Locale.languages[Locale.language].code + '.js);

No comments:

Post a Comment