diff --git a/netbox_config_backup/templates/netbox_config_backup/backup.html b/netbox_config_backup/templates/netbox_config_backup/backup.html index 16cdd88..bb80566 100644 --- a/netbox_config_backup/templates/netbox_config_backup/backup.html +++ b/netbox_config_backup/templates/netbox_config_backup/backup.html @@ -1,4 +1,4 @@ -{% extends 'netbox_config_backup/base.html' %} +{% extends 'generic/object.html' %} {% load helpers %} {% block subtitle %} diff --git a/netbox_config_backup/templates/netbox_config_backup/backups.html b/netbox_config_backup/templates/netbox_config_backup/backups.html index a075653..1bea5e9 100644 --- a/netbox_config_backup/templates/netbox_config_backup/backups.html +++ b/netbox_config_backup/templates/netbox_config_backup/backups.html @@ -1,4 +1,4 @@ -{% extends 'netbox_config_backup/base.html' %} +{% extends 'generic/object.html' %} {% load helpers %} {% block subtitle %} diff --git a/netbox_config_backup/templates/netbox_config_backup/base.html b/netbox_config_backup/templates/netbox_config_backup/base.html deleted file mode 100644 index 35edaf4..0000000 --- a/netbox_config_backup/templates/netbox_config_backup/base.html +++ /dev/null @@ -1,24 +0,0 @@ -{% extends 'generic/object.html' %} -{% load helpers %} - -{% block extra_tabs %} - {% if current %} - - {% else %} - - {% endif %} - - {% if current and previous %} - - {% else %} - - {% endif %} -{% endblock %} diff --git a/netbox_config_backup/templates/netbox_config_backup/config.html b/netbox_config_backup/templates/netbox_config_backup/config.html index 10111b1..50d7869 100644 --- a/netbox_config_backup/templates/netbox_config_backup/config.html +++ b/netbox_config_backup/templates/netbox_config_backup/config.html @@ -1,4 +1,4 @@ -{% extends 'netbox_config_backup/base.html' %} +{% extends 'generic/object.html' %} {% block content %}
diff --git a/netbox_config_backup/templates/netbox_config_backup/diff.html b/netbox_config_backup/templates/netbox_config_backup/diff.html index 3b1d219..ff82ae7 100644 --- a/netbox_config_backup/templates/netbox_config_backup/diff.html +++ b/netbox_config_backup/templates/netbox_config_backup/diff.html @@ -1,4 +1,4 @@ -{% extends 'netbox_config_backup/base.html' %} +{% extends 'generic/object.html' %} {% load helpers %} {% block subtitle %} diff --git a/netbox_config_backup/templates/netbox_config_backup/switch_templates/cisco_iosxe/interface.tpl b/netbox_config_backup/templates/netbox_config_backup/switch_templates/cisco_iosxe/interface.tpl deleted file mode 100644 index 13555c4..0000000 --- a/netbox_config_backup/templates/netbox_config_backup/switch_templates/cisco_iosxe/interface.tpl +++ /dev/null @@ -1,30 +0,0 @@ -{% for vc_interfaces in queryset %} -interface {{interface.name}}{% if interface.description %} - description {{interface.description}}{% endif %} - {% if interface.mode == None %} - {% if interface.vrf != None %} - vrf member {{address.vrf.name}}{% endfor %} - {% endif %} - {% if interface.ip_addresses %} - {% for address in interface.ip_addresses.all() if address.family == 4 %} - ip address {{ address.address }}{% if address.role == "secondary" %} secondary{% endif %} - {% endfor %} - {% for address in interface.ip_addresses.all() if address.family == 6 %} - ipv6 address {{ address.address }} - {% endfor %} - {% if - hsrp version 2 - hsrp {{interface.untagged_vlan.vid}} ipv4 - priority 120 - preempt - authentication md5 key-chain NCG-AUTH-HSRP - timers 1 3{% for address in interface.ip_addresses.all() if address.family == 4 and address.role == "hsrp" %} - ip {{ address.address | replace('/24','') }}{% endfor %} - hsrp {{interface.untagged_vlan.vid}} ipv6 - priority 120 - preempt - authentication md5 key-chain NCG-AUTH-HSRP - timers 1 3{% for address in interface.ip_addresses.all() if address.family == 6 and address.role == "hsrp" %} - ipv6 {{ address.address | replace('/64','') }}{% endfor %} - {% endif %} -{% endfor %} \ No newline at end of file diff --git a/netbox_config_backup/views.py b/netbox_config_backup/views.py index 17ab303..2689d5e 100644 --- a/netbox_config_backup/views.py +++ b/netbox_config_backup/views.py @@ -162,6 +162,7 @@ def get(self, request, pk, current=None): return render(request, 'netbox_config_backup/config.html', { 'object': backup, + 'tab': self.tab, 'backup_config': config, 'current': current, 'previous': previous, @@ -177,7 +178,7 @@ class DiffView(ObjectView): label='Diff', ) - def get(self, request, pk, current, previous=None): + def get(self, request, pk, current=None, previous=None): backup = get_object_or_404(Backup.objects.all(), pk=pk) if current: current = get_object_or_404(BackupCommitTreeChange.objects.all(), pk=current) @@ -223,6 +224,7 @@ def get(self, request, pk, current, previous=None): return render(request, 'netbox_config_backup/diff.html', { 'object': backup, + 'tab': self.tab, 'diff': diff, 'current': current, 'previous': previous, diff --git a/setup.py b/setup.py index 6cd157b..9a2c27f 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name='netbox_config_backup', - version='1.4.2', + version='1.4.3', description='NetBox Configuration Backup', long_description='Plugin to backup device configuration', url='https://github.com/dansheps/netbox-config-backup/',