Skip to content

Commit

Permalink
Monitor Enhancements
Browse files Browse the repository at this point in the history
Upload required files to allow:
Fullscreen maps
Closeby icon management
Markers for Server and Monitor.
Route lines for connections between client/server
Set FavIcon
Layer management for markers

Correct Variable Capitilization

Update README.md

Correct Alias for JS and CSS (copy paste issue)

Update Control.FullScreen.js

Update setup.py

Fix Trailing whitespace

Update openvpn-monitor.py

Fix indent with tab not spaces

Update Control.FullScreen.js

fix Strings must use doublequote. (quotes)

Update Control.FullScreen.js

Strings must use doublequote

Update Control.FullScreen.js

Fix Expected method shorthand

Update Control.FullScreen.js

Expected method shorthand. (object-shorthand)

Update openvpn-monitor.py

Fix Found indentation with tabs instead of spaces
Fix Unnecessary semicolon

Update setup.py

Fix Trailing whitespace

Update Control.FullScreen.js

Move the invocation into the parens that contain the function. (wrap-iife)

Update openvpn-monitor.py

Fix Found indentation with tabs instead of spaces

Update openvpn-monitor.py

convert to bool statements to fix: The if statement can be replaced with 'var = bool(test)'
if 'marker' in vpn and vpn['marker'] == 'True':

Update openvpn-monitor.py

Trailing Whitespace

Update Control.FullScreen.js

Undo shorthand of functions. Testing proved that it broke ie11 (edge is fine)
This will be a change in the future when ie11 is removed from support

Update README.md

removed references to example .conf file
removed Alias references for js and css - move to cdnjs

Update setup.py

Remove os.walk for css and js

Delete Control.FullScreen.js

move to cdnjs

Delete oms.min.js

move to cdnjs

Delete Control.FullScreen.css

move to cdnjs

Delete icon-fullscreen-2x.png

move to cdnjs

Delete icon-fullscreen.png

move to cdnjs

Delete openvpn-monitor.conf.example

remove pending pip testing

Update openvpn-monitor.py

fix Avoid using "non-Pythonic" variable name

cdnjs - spiderfy

OverlappingSpidifier-Leaflet cdnjs commit

add missing function brackets

add git-lint-diff travis checks

replace tabs with spaces

travis-ci fixes

trailing whitespaces

travis-ci fixes

travis-ci fixes

travis-ci fixes

travis-ci fixes

travis-ci fixes

quantified code fix

fix codacy

travis-ci fixes

travis-ci fixes

travis-ci fixes

travis ci fixes

travis-ci syntax

travis-ci fixes

travis-ci fixes

travis-ci fixes

travis-ci fixes

travis-ci fixes

travis-ci fixes

travis-ci fixes

travis-ci fixes

travis-ci noqa
  • Loading branch information
kingy444 committed May 19, 2017
1 parent e0b884c commit 289ff07
Show file tree
Hide file tree
Showing 12 changed files with 346 additions and 29 deletions.
14 changes: 11 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,19 @@ language: python
python:
- "2.7"
- "3.4"
- "3.5"
addons:
apt:
packages:
- gcc
- libgeoip-dev
install: "pip install -r requirements.txt"
script: nosetests
- libcrack2-dev
install:
- "pip install tox"
- "pip install -r requirements.txt"
script:
- nosetests
- tox
env:
- TOXENV=py27-flake8
- TOXENV=py27
- TOXENV=py34
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ The below will install and configure the web application, applying relative Alia
```shell
apt-get -y install python-geoip python-ipaddr python-humanize python-bottle python-semantic-version apache2 libapache2-mod-wsgi git wget
echo "Alias /images/ /var/www/html/openvpn-monitor/images/" > /etc/apache2/conf-available/openvpn-monitor.conf
echo "Alias /images/ /var/www/html/openvpn-monitor/js/" >> /etc/apache2/conf-available/openvpn-monitor.conf
echo "Alias /images/ /var/www/html/openvpn-monitor/css/" >> /etc/apache2/conf-available/openvpn-monitor.conf
echo "WSGIScriptAlias /openvpn-monitor /var/www/html/openvpn-monitor/openvpn-monitor.py" >> /etc/apache2/conf-available/openvpn-monitor.conf
a2enconf openvpn-monitor
systemctl restart apache2
Expand Down Expand Up @@ -100,7 +98,7 @@ mv GeoLiteCity.dat GeoIPCity.dat

### Configure OpenVPN-Monitor

The example configuration file `/var/www/html/openvpn-monitor/openvpn-monitor.conf.example`
The provided configuration file `/var/www/html/openvpn-monitor/openvpn-monitor.conf`
should give some indication of how to set site name, add a logo, etc. You can
also set a default location (latitude and longitude) for the embedded maps.
If not set, the default location is Melbourne, Australia.
Expand Down
Binary file added images/favicon.ico
Binary file not shown.
Binary file added images/marker-icon-blue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/marker-icon-green.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/marker-icon-orange.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/marker-icon-red.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/route-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions openvpn-monitor.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,30 @@ site=Example
maps=True
geoip_data=/usr/share/GeoIP/GeoIPCity.dat
datetime_format=%d/%m/%Y %H:%M:%S
marker=True
externalip=0.0.0.0
pervpn_control=True
itemtype_control=True
allowFullscreen=True

[VPN1]
host=localhost
port=5555
name=Staff VPN
show_disconnect=False
externalip=0.0.0.0
#latitude=-35
#longitude=149
marker=True
connection_lines=True

#[VPN2]
#host=remotehost
#port=5555
#name=Test VPN
#show_disconnect=False
#externalip=0.0.0.0
#latitude=-35
#longitude=149
#marker=True
#connection_lines=True
287 changes: 266 additions & 21 deletions openvpn-monitor.py

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@
with open('README.md', 'r') as r:
long_description = r.read()

for dirpath, dirnames, filenames in os.walk('images/flags'):
data_files = [('share/openvpn-monitor/images/flags',
for dirpath, dirnames, filenames in os.walk('images', topdown=False):
data_files = [('share/openvpn-monitor/images',
[os.path.join(dirpath, f) for f in filenames])]

for dirpath, dirnames, filenames in os.walk('images/flags'):
data_files.append([('share/openvpn-monitor/images/flags',
[os.path.join(dirpath, f) for f in filenames])])

with open('requirements.txt') as rt:
install_requires = []
for line in rt.read().splitlines():
Expand Down
41 changes: 41 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[tox]
skipsdist = True
envlist =
py27
py34
py27-flake8

[testenv]
commands = nosetests
deps =
nose
-rrequirements.txt

[testenv:py27]
basepython = python2.7
deps =
{[testenv]deps}

[testenv:py34]
basepython = python3.4
deps =
{[testenv]deps}


[testenv:py27-flake8]
basepython = python2.7
deps =
flake8
git+https://github.com/russell/git-lint-diff.git#egg=git-lint-diff
commands = git-lint-diff --linter flake8 -- flake8

[testenv:py34-flake8]
basepython = python3.4
deps =
flake8
git+https://github.com/russell/git-lint-diff.git#egg=git-lint-diff
commands = git-lint-diff --linter flake8 -- flake8

[flake8]
builtins = _
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,*migrations*

0 comments on commit 289ff07

Please sign in to comment.