Commit Graph

204 Commits

Author SHA1 Message Date
jeffrey forman f38f96660f Merge branch 'Dunedan-ship-jquery' 2015-04-05 07:23:09 -04:00
jeffrey forman 796cb06055 Merge branch 'ship-jquery' of https://github.com/Dunedan/binder into Dunedan-ship-jquery 2015-04-05 07:22:23 -04:00
Jeffrey Forman fb7fab8306 Merge pull request #29 from Dunedan/fix-requirements
Fix contents of requirements.txt
2015-04-04 22:09:24 -04:00
jeffrey forman acd55f34aa Merge branch 'Dunedan-404-for-not-existing-servers' 2015-04-04 22:08:22 -04:00
jeffrey forman b62af7b64d fix UI tests that werent updated to match the new templates 2015-04-04 22:07:49 -04:00
jeffrey forman 5c35b2306e delete commented out HTML that was forgotten from before 2015-04-04 22:07:37 -04:00
jeffrey forman 880eee067d localhost wont always have an IPv6 address assigned to it 2015-04-04 20:33:53 -04:00
jeffrey forman 12654bd3a5 Merge branch 'fix-failing-tests' of https://github.com/Dunedan/binder into Dunedan-404-for-not-existing-servers 2015-04-04 20:28:31 -04:00
jeffrey forman a099a43250 Merge branch '404-for-not-existing-servers' of https://github.com/Dunedan/binder into Dunedan-404-for-not-existing-servers 2015-04-03 22:13:42 -04:00
Jeffrey Forman 2fef6d07af Merge pull request #23 from Dunedan/add-migrations
Added initial migrations for binders models.
2015-04-02 21:55:11 -04:00
Jeffrey Forman 074d62453f Merge pull request #22 from Dunedan/configurable-dns-port
Make the port for DNS queries per server configurable.
2015-04-02 21:54:23 -04:00
jeffrey forman 41f78b3eff move to bootstrap 3 (3.3.4). fairly significant template update 2015-04-01 21:28:56 -04:00
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 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