diff --git a/backend/device_registry/templates/device_info_security.html b/backend/device_registry/templates/device_info_security.html index 6bb8f96f7..6f8d26545 100644 --- a/backend/device_registry/templates/device_info_security.html +++ b/backend/device_registry/templates/device_info_security.html @@ -232,7 +232,7 @@
OpenSSH
{% if has_global_policy %} - +
@@ -269,10 +269,12 @@
OpenSSH
{% if ports_choices %}
-
IP
+
- @@ -350,10 +352,12 @@
OpenSSH
{% csrf_token %}
-
+ + {% if firewall.policy == 1 %} Blocked{% elif firewall.policy == 2 %}Allowed{% endif %} IP
+
- + @@ -436,10 +440,9 @@
OpenSSH
{% block scripts %} {% endblock %} diff --git a/backend/device_registry/tests/test_all.py b/backend/device_registry/tests/test_all.py index c5c6980fe..03f9164b6 100644 --- a/backend/device_registry/tests/test_all.py +++ b/backend/device_registry/tests/test_all.py @@ -529,8 +529,7 @@ def test_open_ports(self): response = self.client.get(self.url2) self.assertEqual(response.status_code, 200) self.assertContains(response, 'Firewall Ports Policy') - self.assertContains(response, '') + self.assertInHTML('Allowed', response.rendered_content) def test_open_ports_global_policy(self): self.client.login(username='test', password='123') @@ -562,7 +561,7 @@ def test_open_connections(self): self.assertListEqual(portscan.block_networks, [['192.168.1.177', False]]) response = self.client.get(self.url2) self.assertEqual(response.status_code, 200) - self.assertContains(response, '') + self.assertInHTML('Blocked', response.rendered_content) def test_open_connections_global_policy(self): self.client.login(username='test', password='123')
Blocked + + Blocked IP Rem addr Rem portAllowedBlocked