From 1af0f6cd4388198130b1b638bdbd8311a26eef33 Mon Sep 17 00:00:00 2001 From: Daniel Roschka Date: Sun, 29 Mar 2015 21:05:23 +0200 Subject: [PATCH 1/6] Add Travis CI support To improve the code quality of binder, this commit adds support for continuous integration by using Travis CI (https://travis-ci.org/). This will ensure that every commit and every pull request will trigger test runs of the tests included in binder, helping to avoid code with broken tests. --- .travis.yml | 11 +++++++++++ README.markdown | 2 ++ 2 files changed, 13 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..b08ea74 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,11 @@ +language: python +python: + - "2.7" +env: + - DJANGO="Django>=1.6,<1.7" + - DJANGO="Django>=1.7,<1.8" +install: + - pip install -q $DJANGO + - pip install -r requirements.txt +script: + - python manage.py test \ No newline at end of file diff --git a/README.markdown b/README.markdown index 115f3ab..723fbe1 100644 --- a/README.markdown +++ b/README.markdown @@ -1,5 +1,7 @@ # Binder # +[![Build Status](https://travis-ci.org/jforman/binder.svg?branch=master)](https://travis-ci.org/jforman/binder) + A Django web application for viewing and editing BIND DNS zone records. Binder supports adding and deleting DNS records (and eventually editing in place). TSIG-authenticated transfers and updates are supported. From 8acbc5526bb49ccaca13d748e99250d13a467ee5 Mon Sep 17 00:00:00 2001 From: Daniel Roschka Date: Thu, 2 Apr 2015 07:20:02 +0200 Subject: [PATCH 2/6] Added support for Django 1.8. --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b08ea74..18f353f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,8 +4,9 @@ python: env: - DJANGO="Django>=1.6,<1.7" - DJANGO="Django>=1.7,<1.8" + - DJANGO="Django>=1.8,<1.9" install: - pip install -q $DJANGO - pip install -r requirements.txt script: - - python manage.py test \ No newline at end of file + - python manage.py test From d46ffd1abc0becaa9467eafd015216a7a4f76a83 Mon Sep 17 00:00:00 2001 From: Daniel Roschka Date: Thu, 2 Apr 2015 08:32:27 +0200 Subject: [PATCH 3/6] Clean up of various parts of the templates * Replaced tabs for indentation with proper spaces to have only spaces for indentation * Added the btn-default class to all buttons where it was missing * Added relations between labels and the elements they are labeling using the naming schema Django uses by default (might become handy in the future) * Added additional meta tags required by Bootstrap 3 * Moved the button for adding records in list_zone.html out of the table to get cleaner markup * Swapped out the used version of Bootstrap against the minified one. * Removed the commented out old code from delete_record_initial.html, because that's why we have version control --- binder/templates/base.html | 6 +- .../bcommon/add_cname_record_form.html | 38 +++++------ binder/templates/bcommon/add_record_form.html | 66 +++++++++---------- .../bcommon/delete_record_initial.html | 51 ++------------ binder/templates/bcommon/list_zone.html | 22 +++---- 5 files changed, 69 insertions(+), 114 deletions(-) diff --git a/binder/templates/base.html b/binder/templates/base.html index 5e58c32..d96b30a 100644 --- a/binder/templates/base.html +++ b/binder/templates/base.html @@ -3,7 +3,9 @@ {% block header %} Binder DNS Admin - + + + {% endblock header %} @@ -27,7 +29,7 @@
- {% block pageheader %}{% endblock pageheader %} + {% block pageheader %}{% endblock pageheader %}
diff --git a/binder/templates/bcommon/add_cname_record_form.html b/binder/templates/bcommon/add_cname_record_form.html index e67c9a0..255fac9 100644 --- a/binder/templates/bcommon/add_cname_record_form.html +++ b/binder/templates/bcommon/add_cname_record_form.html @@ -6,56 +6,56 @@
{% csrf_token %} Create CNAME record
- +
- +
- +
- +
- +
- +
- +
{% if form_errors.cname %} - + {% endif %}
- -
.{{zone_name}}
+ +
.{{zone_name}}
- +
{% for ttl, description in ttl_choices %} - + {% endfor %}
- +
- {% for key in tsig_keys %} {% empty %} @@ -65,7 +65,7 @@
- +
{% endblock body %} diff --git a/binder/templates/bcommon/add_record_form.html b/binder/templates/bcommon/add_record_form.html index d9146be..cabc7cc 100644 --- a/binder/templates/bcommon/add_record_form.html +++ b/binder/templates/bcommon/add_record_form.html @@ -6,22 +6,22 @@
{% csrf_token %} Create Record
- +
- +
- +
- +
- +
{% if form_errors.record_name %} {% endif %}
- -
.{{zone_name}}
+ +
.{{zone_name}}
@@ -40,34 +40,34 @@
{% if "in-addr.arpa" not in zone_name and "ip6.arpa" not in zone_name %} {% for type, name in record_type_choices %} -
- +
- {% if form_errors.record_data %} - + {% endif %} +
+ + {% if "in-addr.arpa" not in zone_name and "ip6.arpa" not in zone_name %} +
IP Address
+ {% else %} +
FQDN
+ {% endif %} +
@@ -75,28 +75,28 @@
{% for ttl, description in ttl_choices %} - + {% endfor %}
{% if "in-addr.arpa" not in zone_name and "ip.arpa" not in zone_name %}
- +
+ Yes +
{% endif %}
- +
- {% for key in tsig_keys %} {% empty %} @@ -106,7 +106,7 @@
- + Cancel {% endblock body %} diff --git a/binder/templates/bcommon/delete_record_initial.html b/binder/templates/bcommon/delete_record_initial.html index bcf7c71..76a0ca5 100644 --- a/binder/templates/bcommon/delete_record_initial.html +++ b/binder/templates/bcommon/delete_record_initial.html @@ -22,72 +22,29 @@ - TSIG Key +
- {% for key in tsig_keys %} {% empty %}
- + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/binder/templates/bcommon/list_zone.html b/binder/templates/bcommon/list_zone.html index 81e4785..503633f 100644 --- a/binder/templates/bcommon/list_zone.html +++ b/binder/templates/bcommon/list_zone.html @@ -4,10 +4,14 @@ {% block body %} {% if not errors %} -
{% csrf_token %} - -Add Record +Add Record +{% csrf_token %} + + + + +
@@ -18,17 +22,9 @@ - - {% for current_record in zone_array %} - + @@ -37,7 +33,7 @@
Select Name
-
- -
-
{{ current_record.rr_name }} {{ current_record.rr_ttl }} {{ current_record.rr_class }}
- +
- +
{% for ttl, description in ttl_choices %}