Commit Graph

293 Commits

Author SHA1 Message Date
Daniel Roschka a5ebc7bad7 Ship jQuery with binder
Up to now jQuery has been the only resource required by binder which users had
to load from the internet. To enable binder to work in environments where no
internet access is available this commit adds jQuery 2.1.3 to binders static
files so no internet access is necessary anymore for using binder.
2015-04-01 15:22:13 +02:00
Daniel Roschka 479d79cd3f Fix contents of requirements.txt
Removes unneccessary beautifulsoup4 requirement from requirements.txt and adds
necessary requirement on Django.
2015-04-01 12:51:30 +02:00
jeffrey forman 6557f2c099 clean up how we parse multiple items in the selected list when deleting multiple records 2015-03-31 21:43:26 -04:00
Daniel Roschka 1af0f6cd43 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.
2015-03-29 21:05:23 +02:00
Daniel Roschka a6747b4f25 Removed the checking for the exception message when trying to produce an
IntegrityError, because that message differs based on the environment.
2015-03-29 19:47:58 +02:00
Daniel Roschka 95b86434ff Fixes outstanding failing tests
Fixes three failing tests.
For test_ipinfo_ResolutionFail it fixes the following issues:
* failing when no network is available
* failing when Google changes the ip addresses of the service
* failing when the order of returned ip addresses is different
For test_DeleteRecordInitial_Empty and test_DeleteRecordInitial it fixes a not
existing BindServer object.
2015-03-29 19:03:53 +02:00
Daniel Roschka 6a769e4cbb Fixes the behavior for not existing BIND servers
When requesting one of binders BIND server specific URLs for a server not
present in binders database currently uncatched exceptions are thrown.

This commit fixes that for all URLs containing the server name, by instead of
throwing an uncatched exception, returning a proper HTTP 404 status code.
2015-03-29 14:04:43 +02:00
Daniel Roschka 30d812f838 Removed the initial migrations for binders models again as they are now part of
another pull request. The only migration left is the one for the newly added
field.
2015-03-28 18:48:25 +01:00
Daniel Roschka a3d97f97d2 Added initial migrations for binders models. 2015-03-28 18:46:55 +01:00
jeffrey forman 0da5e9ba89 Merge branch 'Dunedan-htm-to-html' 2015-03-28 08:55:51 -04:00
jeffrey forman e0768ae67a Merge branch 'htm-to-html' of https://github.com/Dunedan/binder into Dunedan-htm-to-html 2015-03-28 08:53:35 -04:00
Jeffrey Forman ef87c412b7 Merge pull request #19 from Dunedan/fix-cancel-buttons
Fixes some problems introduced with 448d18f
2015-03-27 22:15:12 -04:00
Daniel Roschka 77eda58f37 Make the port for DNS queries per server configurable.
While it might not be that common to have a DNS server listening on a
non-standard port for DNS queries, it's also useful for local testing.

I used the opportunity to add model migrations as well to enable smooth model
upgrades.
2015-03-27 19:30:03 +01:00
Daniel Roschka 8be9a4b2e3 Renaming all templates from *.htm to *.html
When using Djangos "makemessages" command to collect strings for i18n it only
considers templates with a file extenions of .txt and .html by default. For
more details see:
https://docs.djangoproject.com/en/dev/topics/i18n/translation/#message-files

Also when Django is refering to default template names (e.g. for error handling
or accounts) it always refers to file names with .html as file extension.

To avoid hassle in the future this commit aligns the file extension used for
templates to Djangos default of .html.
2015-03-26 22:13:42 +01:00
jeffrey forman 8082262871 git push origin masterMerge branch 'Dunedan-secret-secret-key' 2015-03-25 22:20:27 -04:00
jeffrey forman cbd0716c8f Merge branch 'secret-secret-key' of https://github.com/Dunedan/binder into Dunedan-secret-secret-key 2015-03-25 22:02:36 -04:00
jeffrey forman f645c41ee6 git push origin masterMerge branch 'Dunedan-admin-form-validation' 2015-03-25 21:40:48 -04:00
jeffrey forman 9d16c0554c Merge branch 'admin-form-validation' of https://github.com/Dunedan/binder into Dunedan-admin-form-validation 2015-03-25 21:37:33 -04:00
Jeffrey Forman 8679f1cc5f Merge pull request #16 from Dunedan/fix-form-data
Fixes missing form data when rendering the add record template after an error.
2015-03-25 21:24:58 -04:00
Daniel Roschka 270bb80921 Commit 448d18f8f9 introduced some problems, which
are fixed in this commit:
* Cancel links were converted to buttons, by simply wrapping them into a
  <button>-element, causing them to act as submit buttons, as submit is the
  default action for buttons, instead of cancel buttons. Instead the proper
  bootstrap code for showing links as buttons is used now.
* add_cname_record_form.htm hasn't been adjusted to show a button instead of a
  link for cancelling. I converted that to a button now as well.
2015-03-25 18:48:13 +01:00
jeffrey forman 7073cbbf8d Merge branch 'Dunedan-select-default-key' 2015-03-24 20:48:34 -04:00
jeffrey forman 5c90f80e8d Merge branch 'select-default-key' of https://github.com/Dunedan/binder into Dunedan-select-default-key
Conflicts:
	binder/templates/bcommon/list_zone.htm
2015-03-24 20:48:15 -04:00
jeffrey forman 84704d879e Merge branch 'Dunedan-form-cancel-buttons' 2015-03-24 20:21:42 -04:00
jeffrey forman 448d18f8f9 make every cancel/delete action link a button 2015-03-24 20:19:30 -04:00
Daniel Roschka 9eb3726889 Makes SECRET_KEY secret
To quote from Djangos documentation:
"The secret key must be a large random value and it must be kept secret."
https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/#secret-key

This commit achieves that by generating a file containing a random string
when running the first time and by using this string as SECRET_KEY from then
on.
2015-03-24 22:43:18 +01:00
jeffrey forman 7a83de8c84 Merge branch 'form-cancel-buttons' of https://github.com/Dunedan/binder into Dunedan-form-cancel-buttons 2015-03-23 22:07:00 -04:00
Daniel Roschka f509fd6dbf Added validation for the admin forms.
Especially the validation of the key should be helpful, as it prevents users to
store wrongly formatted keys.
2015-03-23 21:51:31 +01:00
Daniel Roschka 382cf4ae26 Fixes missing form data when rendering the add record template after an error. 2015-03-23 21:10:15 +01:00
Daniel Roschka 0b21800bae Fixed the name of the variable holding the key on the add CNAME page. 2015-03-23 18:39:08 +01:00
Daniel Roschka a449443340 Automatically select the default key for the current server when doing actions.
This commit introduces automatic selection of the default TSIG key for all
available actions (add, delete). For enabling that it has been necessary to
provide the whole BindServer object to the template, which caused some
additional changes.

I also took the opportunity to unify some styling (indentation, linebreaks) of
the HTML templates.
2015-03-22 21:20:12 +01:00
Daniel Roschka c3e454e88b Added the cancel link on the page for adding CNAME records as well. 2015-03-22 20:52:46 +01:00
jeffrey forman 19f891c27a fix the text associated with an hmac-md5 tsig key 2015-03-22 14:32:07 -04:00
Jeffrey Forman fb7d27da20 Merge pull request #13 from Dunedan/fix-tsig-algorithms
Fix binder to work with TSIG keys not using dnspythons default algorithm
2015-03-22 14:15:09 -04:00
Jeffrey Forman fb43a9aa5a Merge pull request #12 from Dunedan/fix-errorhandling-for-incorrect-keys
Fixes error handling for broken TSIG keys.
2015-03-22 14:10:32 -04:00
Jeffrey Forman 78f097e681 Merge pull request #11 from Dunedan/small-model-improvements
Some small improvements for the models.
2015-03-22 14:07:30 -04:00
Daniel Roschka 1671bc4c2f Added buttons to cancel forms and fixed the styling of some buttons. 2015-03-22 18:34:40 +01:00
Daniel Roschka a19719a41b Fix binder to work with TSIG keys not using dnspythons default algorithm
binder has been broken to work with signatures created with anything but
dnspythons default TSIG algorithm, which currently is HMAC-MD5.
This commit fixes that by properly using the algorithm stored for the key.
2015-03-22 18:07:06 +01:00
Daniel Roschka 43fe909ec6 Fixes error handling for broken TSIG keys.
The error handling for broken TSIG keys wasn't working for two reasons:
* the import of binascii has been missing, producing a NameError once an
  exception occured
* The exception handler was refering to a non-existant variable key_name.

This commit fixes both issues.
2015-03-22 17:03:50 +01:00
Daniel Roschka 763d132b0f Some small improvements for the models.
* Added help texts to all fields to make adding servers and keys in the admin
  interface more convenient.
* Added a default ordering for servers and keys.
* Added unique constraints, so there can be only on key per name and one server
  per hostname as this has already already been an implicit constraint in the
  code.
2015-03-22 15:47:05 +01:00
jeffrey forman cb44c457ec add initial requirements.txt file 2015-03-22 09:46:33 -04:00
jeffrey forman 27ec2e218c add mention about zone-statistics for named.conf 2015-03-21 22:36:38 -04:00
jeffrey forman 4abce94d42 fix references to beautifulsoup libraries (bs4 rather than bs3) 2015-03-21 20:51:08 -04:00
Jeffrey Forman f0f897fad6 fix models test reason for test where no statistics port is specified 2014-12-24 17:15:06 -05:00
Jeffrey Forman da4bbed5d7 update tests for django >1.6, disable integration tests until I can figure out a good local solution 2014-12-24 17:14:33 -05:00
Jeffrey Forman e732cf3613 add TEST_RUNNER specification to be django >1.6 friendly 2014-12-21 19:24:35 -05:00
Jeffrey Forman 1ff21cb4ab add wsgi.py to binder project for use with apache 2014-10-08 09:44:29 -04:00
Jeffrey Forman 06c1b268b4 make template_dirs in settings a tuple to play nice with django 1.7 2014-10-06 21:58:09 -04:00
Jeffrey Forman f9f9309fe9 beautifulsoup is not a required module for binder itself, remove from models 2014-10-06 13:02:30 -04:00
Jeffrey Forman 9e9190bf84 convert to setup.py packaging, which can be used with fpm.
add manifest file to include static and template  files
2014-03-02 10:05:42 -05:00
Jeffrey Forman e78b215327 add script to tag release and build deb 2014-01-20 21:01:09 -05:00