diff --git a/flowspec/validators.py b/flowspec/validators.py index 96bd4e7dcb47922707ddb1735d5646f66194bbf7..af39f6f71f4e6c18bff9a2038f296242b5578b2b 100644 --- a/flowspec/validators.py +++ b/flowspec/validators.py @@ -18,7 +18,7 @@ def get_network(ip): def clean_ip(address): - if address.is_private: + if False and address.is_private: return _('Private addresses not allowed') if address.version == 4 and int(address.prefixlen) == 32: diff --git a/flowspy/wsgi.py b/flowspy/wsgi.py index a570af33ad096c70f8a8f7bb0ab896ea494f5579..8d533f30a76743954d3077aa8acfdc7942a1d1f4 100644 --- a/flowspy/wsgi.py +++ b/flowspy/wsgi.py @@ -16,6 +16,8 @@ framework. import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "flowspy.settings") +os.environ['HTTPS'] = "on" +os.environ['wsgi.url_scheme'] = 'https' # This application object is used by any WSGI server configured to use this # file. This includes Django's development server, if the WSGI_APPLICATION diff --git a/requirements.txt b/requirements.txt index db767890abb6c26746728df0967bd8e6ab19b0d0..008748796fe3fe7b6bbdd35312b0592cb7d526cd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,7 +7,7 @@ django-celery==2.5.5 django-picklefield==0.2.1 django-registration==0.8 djangorestframework==2.3.14 -django-tinymce==1.5 +django-tinymce Django==1.4.5 gevent==0.13.6 git+https://code.grnet.gr/git/nxpy @@ -21,9 +21,10 @@ MySQL-python==1.2.3 ncclient==0.4.3 paramiko==1.7.7.1 pycrypto==2.6 -pyparsing==1.5.6 +pyparsing python-dateutil==1.5 python-memcached==1.48 PyYAML==3.10 South==0.7.5 wsgiref==0.1.2 +django-form-utils diff --git a/templates/flowspy/route_details.html b/templates/flowspy/route_details.html index fd0cd6f188699f748b4c3a4f5b0c60a218cf9e84..89d50cdd2bf5996f1cdb7dacbc2ccc721732f094 100644 --- a/templates/flowspy/route_details.html +++ b/templates/flowspy/route_details.html @@ -68,15 +68,8 @@ </div> <div> <h2>Statistics</h2> - <div><span id="traffic-plot-loading">(Loading data...)</span> - <h3>Number of packets (absolute)</h3> - <div><canvas id="traffic-plot-pkts-abs" width=200 height=200></canvas></div> - <h3>Number of packets (relative)</h3> - <div><canvas id="traffic-plot-pkts-rel" width=200 height=200></canvas></div> - <h3>Number of bytes (absolute)</h3> - <div><canvas id="traffic-plot-bytes-abs" width=200 height=200></canvas></div> - <h3>Number of bytes (relative)</h3> - <div><canvas id="traffic-plot-bytes-rel" width=200 height=200></canvas></div> + <div><canvas id="traffic-plot" width=550 height=150></canvas></div> + <div>Number of packets <span id="traffic-plot-loading">(Loading)</span> </div> <div><a href="{% url routestats route.name %}">Download raw data in JSON</a></div> </div> diff --git a/utils/proxy.py b/utils/proxy.py index a28d889b0cf5a43847cb1cf83ef3ecaf3dec9abd..8014a6d8a0fda1e596e38a880de419daa10fdb36 100644 --- a/utils/proxy.py +++ b/utils/proxy.py @@ -180,8 +180,9 @@ class Applier(object): logger.info("Requesting a replace operation") route.operation = operation device = device.export(netconf_config=True) - logger.debug(ET.tostring(device)) - return ET.tostring(device) + result = ET.tostring(device) + logger.error(result) + return result else: return False