From 5f66893038dc27550ef3ffe7ce9f2100b9162293 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Mon, 10 Jul 2017 09:44:34 -0400 Subject: [PATCH 1/8] Post-release version bump --- netbox/netbox/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py index 539f68015e..8e6376677c 100644 --- a/netbox/netbox/settings.py +++ b/netbox/netbox/settings.py @@ -13,7 +13,7 @@ ) -VERSION = '2.0.9' +VERSION = '2.0.10-dev' # Import required configuration parameters ALLOWED_HOSTS = DATABASE = SECRET_KEY = None From dc77400ab110b33defcfbd4cd614256238bf26bc Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Tue, 11 Jul 2017 14:36:59 -0400 Subject: [PATCH 2/8] Fixes #1333: Corrected label on is_console_server field of DeviceType bulk edit form --- netbox/dcim/forms.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/netbox/dcim/forms.py b/netbox/dcim/forms.py index e05ffec502..0571123987 100644 --- a/netbox/dcim/forms.py +++ b/netbox/dcim/forms.py @@ -402,7 +402,9 @@ class DeviceTypeBulkEditForm(BootstrapMixin, CustomFieldBulkEditForm): u_height = forms.IntegerField(min_value=1, required=False) is_full_depth = forms.NullBooleanField(required=False, widget=BulkEditNullBooleanSelect, label='Is full depth') interface_ordering = forms.ChoiceField(choices=add_blank_choice(IFACE_ORDERING_CHOICES), required=False) - is_console_server = forms.NullBooleanField(required=False, widget=BulkEditNullBooleanSelect, label='Is full depth') + is_console_server = forms.NullBooleanField( + required=False, widget=BulkEditNullBooleanSelect, label='Is a console server' + ) is_pdu = forms.NullBooleanField(required=False, widget=BulkEditNullBooleanSelect, label='Is a PDU') is_network_device = forms.NullBooleanField( required=False, widget=BulkEditNullBooleanSelect, label='Is a network device' From af9fa85cc1ec3ae9704d7d03a741c19ff8019bdd Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Wed, 12 Jul 2017 10:06:13 -0400 Subject: [PATCH 3/8] Fixes #1312: Catch error when attempting to activate a user key with an invalid private key --- netbox/secrets/admin.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/netbox/secrets/admin.py b/netbox/secrets/admin.py index 3780dccd2a..ac7a91fd6e 100644 --- a/netbox/secrets/admin.py +++ b/netbox/secrets/admin.py @@ -42,13 +42,15 @@ def activate_selected(modeladmin, request, queryset): if 'activate' in request.POST: form = ActivateUserKeyForm(request.POST) if form.is_valid(): - try: - master_key = my_userkey.get_master_key(form.cleaned_data['secret_key']) + master_key = my_userkey.get_master_key(form.cleaned_data['secret_key']) + if master_key is not None: for uk in form.cleaned_data['_selected_action']: uk.activate(master_key) return redirect('admin:secrets_userkey_changelist') - except ValueError: - messages.error(request, "Invalid private key provided. Unable to retrieve master key.") + else: + messages.error( + request, "Invalid private key provided. Unable to retrieve master key.", extra_tags='error' + ) else: form = ActivateUserKeyForm(initial={'_selected_action': request.POST.getlist(admin.ACTION_CHECKBOX_NAME)}) From e54c74d972dede178621b2fdfa9150c1710545ad Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Wed, 12 Jul 2017 10:31:16 -0400 Subject: [PATCH 4/8] Fixes #1338: Allow importing prefixes with "container" status --- netbox/ipam/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/ipam/forms.py b/netbox/ipam/forms.py index a5c3923a57..0a987e7355 100644 --- a/netbox/ipam/forms.py +++ b/netbox/ipam/forms.py @@ -264,7 +264,7 @@ class PrefixCSVForm(forms.ModelForm): required=False ) status = CSVChoiceField( - choices=IPADDRESS_STATUS_CHOICES, + choices=PREFIX_STATUS_CHOICES, help_text='Operational status' ) role = forms.ModelChoiceField( From 6f37e97c67cf6dd9f5d5b381be3fcef7758a7c6d Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Wed, 12 Jul 2017 14:05:01 -0400 Subject: [PATCH 5/8] Fixes #1339: Fixed disappearing checkbox column under django-tables2 v1.7+ --- netbox/utilities/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/utilities/views.py b/netbox/utilities/views.py index 055f9fbbac..3dec16e7a3 100644 --- a/netbox/utilities/views.py +++ b/netbox/utilities/views.py @@ -123,7 +123,7 @@ def get(self, request): # Construct the table based on the user's permissions table = self.table(self.queryset) if 'pk' in table.base_columns and (permissions['change'] or permissions['delete']): - table.base_columns['pk'].visible = True + table.columns.show('pk') # Apply the request context paginate = { From 280f55a875eb0d34c3de890ea4ebb63590bcd089 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 13 Jul 2017 11:39:59 -0400 Subject: [PATCH 6/8] Require django-tables2 v1.7+ --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 21382bb6ca..8cd72419f7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,7 +6,7 @@ django-debug-toolbar>=1.7 django-filter>=1.0.2 django-mptt==0.8.7 django-rest-swagger>=2.1.0 -django-tables2>=1.6.0 +django-tables2>=1.7.0 djangorestframework>=3.6.2 graphviz>=0.6 Markdown>=2.6.7 From 2f32e11f537820c954e58a1aebe23cf925b190f0 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 13 Jul 2017 11:44:29 -0400 Subject: [PATCH 7/8] Fixes #1342: Allow designation of users and groups when creating/editing a secret role --- netbox/secrets/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/secrets/forms.py b/netbox/secrets/forms.py index aafa9c4b11..e71bb92fad 100644 --- a/netbox/secrets/forms.py +++ b/netbox/secrets/forms.py @@ -40,7 +40,7 @@ class SecretRoleForm(BootstrapMixin, forms.ModelForm): class Meta: model = SecretRole - fields = ['name', 'slug'] + fields = ['name', 'slug', 'users', 'groups'] # From d0dc505220c98822d5c2779ca0f8ee62adea6726 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Fri, 14 Jul 2017 10:07:21 -0400 Subject: [PATCH 8/8] Release v2.0.10 --- netbox/netbox/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py index 8e6376677c..af84e323b8 100644 --- a/netbox/netbox/settings.py +++ b/netbox/netbox/settings.py @@ -13,7 +13,7 @@ ) -VERSION = '2.0.10-dev' +VERSION = '2.0.10' # Import required configuration parameters ALLOWED_HOSTS = DATABASE = SECRET_KEY = None