Skip to content

Commit 289ff07

Browse files
committed
Monitor Enhancements
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
1 parent e0b884c commit 289ff07

12 files changed

+346
-29
lines changed

.travis.yml

+11-3
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,19 @@ language: python
22
python:
33
- "2.7"
44
- "3.4"
5-
- "3.5"
65
addons:
76
apt:
87
packages:
98
- gcc
109
- libgeoip-dev
11-
install: "pip install -r requirements.txt"
12-
script: nosetests
10+
- libcrack2-dev
11+
install:
12+
- "pip install tox"
13+
- "pip install -r requirements.txt"
14+
script:
15+
- nosetests
16+
- tox
17+
env:
18+
- TOXENV=py27-flake8
19+
- TOXENV=py27
20+
- TOXENV=py34

README.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ The below will install and configure the web application, applying relative Alia
5151
```shell
5252
apt-get -y install python-geoip python-ipaddr python-humanize python-bottle python-semantic-version apache2 libapache2-mod-wsgi git wget
5353
echo "Alias /images/ /var/www/html/openvpn-monitor/images/" > /etc/apache2/conf-available/openvpn-monitor.conf
54-
echo "Alias /images/ /var/www/html/openvpn-monitor/js/" >> /etc/apache2/conf-available/openvpn-monitor.conf
55-
echo "Alias /images/ /var/www/html/openvpn-monitor/css/" >> /etc/apache2/conf-available/openvpn-monitor.conf
5654
echo "WSGIScriptAlias /openvpn-monitor /var/www/html/openvpn-monitor/openvpn-monitor.py" >> /etc/apache2/conf-available/openvpn-monitor.conf
5755
a2enconf openvpn-monitor
5856
systemctl restart apache2
@@ -100,7 +98,7 @@ mv GeoLiteCity.dat GeoIPCity.dat
10098

10199
### Configure OpenVPN-Monitor
102100

103-
The example configuration file `/var/www/html/openvpn-monitor/openvpn-monitor.conf.example`
101+
The provided configuration file `/var/www/html/openvpn-monitor/openvpn-monitor.conf`
104102
should give some indication of how to set site name, add a logo, etc. You can
105103
also set a default location (latitude and longitude) for the embedded maps.
106104
If not set, the default location is Melbourne, Australia.

images/favicon.ico

147 KB
Binary file not shown.

images/marker-icon-blue.png

1.43 KB
Loading

images/marker-icon-green.png

6.84 KB
Loading

images/marker-icon-orange.png

4.31 KB
Loading

images/marker-icon-red.png

1.73 KB
Loading

images/route-icon.png

522 Bytes
Loading

openvpn-monitor.conf

+21
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,30 @@ site=Example
66
maps=True
77
geoip_data=/usr/share/GeoIP/GeoIPCity.dat
88
datetime_format=%d/%m/%Y %H:%M:%S
9+
marker=True
10+
externalip=0.0.0.0
11+
pervpn_control=True
12+
itemtype_control=True
13+
allowFullscreen=True
914

1015
[VPN1]
1116
host=localhost
1217
port=5555
1318
name=Staff VPN
1419
show_disconnect=False
20+
externalip=0.0.0.0
21+
#latitude=-35
22+
#longitude=149
23+
marker=True
24+
connection_lines=True
25+
26+
#[VPN2]
27+
#host=remotehost
28+
#port=5555
29+
#name=Test VPN
30+
#show_disconnect=False
31+
#externalip=0.0.0.0
32+
#latitude=-35
33+
#longitude=149
34+
#marker=True
35+
#connection_lines=True

openvpn-monitor.py

+266-21
Large diffs are not rendered by default.

setup.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@
1111
with open('README.md', 'r') as r:
1212
long_description = r.read()
1313

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

18+
for dirpath, dirnames, filenames in os.walk('images/flags'):
19+
data_files.append([('share/openvpn-monitor/images/flags',
20+
[os.path.join(dirpath, f) for f in filenames])])
21+
1822
with open('requirements.txt') as rt:
1923
install_requires = []
2024
for line in rt.read().splitlines():

tox.ini

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
[tox]
2+
skipsdist = True
3+
envlist =
4+
py27
5+
py34
6+
py27-flake8
7+
8+
[testenv]
9+
commands = nosetests
10+
deps =
11+
nose
12+
-rrequirements.txt
13+
14+
[testenv:py27]
15+
basepython = python2.7
16+
deps =
17+
{[testenv]deps}
18+
19+
[testenv:py34]
20+
basepython = python3.4
21+
deps =
22+
{[testenv]deps}
23+
24+
25+
[testenv:py27-flake8]
26+
basepython = python2.7
27+
deps =
28+
flake8
29+
git+https://github.com/russell/git-lint-diff.git#egg=git-lint-diff
30+
commands = git-lint-diff --linter flake8 -- flake8
31+
32+
[testenv:py34-flake8]
33+
basepython = python3.4
34+
deps =
35+
flake8
36+
git+https://github.com/russell/git-lint-diff.git#egg=git-lint-diff
37+
commands = git-lint-diff --linter flake8 -- flake8
38+
39+
[flake8]
40+
builtins = _
41+
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,*migrations*

0 commit comments

Comments
 (0)