diff --git a/networks/tests/test_network_changes.py b/networks/tests/test_network_changes.py index 294e34be..877c2bcb 100644 --- a/networks/tests/test_network_changes.py +++ b/networks/tests/test_network_changes.py @@ -142,11 +142,11 @@ class NetworkChangeTests(SimpleTestCase): net.net.update.assert_not_called() def test_the_xml_editor_expands_no_entity(self): - # a file of the panel's host named by an external entity is not read into the check + # a file of the panel's host named by an external entity is not read: no DTD is taken net = self.network() xml = (']>' "&name;") - with self.assertRaisesRegex(OperationError, "must define network lab"): + with self.assertRaisesRegex(OperationError, "may not declare a DTD"): net.edit_network(xml) def test_the_xml_editor_takes_an_encoding_declaration(self): diff --git a/nwfilters/templates/nwfilter.html b/nwfilters/templates/nwfilter.html index f2fed219..b3e584ac 100644 --- a/nwfilters/templates/nwfilter.html +++ b/nwfilters/templates/nwfilter.html @@ -50,8 +50,8 @@ @@ -120,13 +121,11 @@ {{ rule.direction }} {{ rule.priority }} {{ rule.statematch }} - {{ rule.directives }} + {% for protocol in rule.protocols %}
{{ protocol.name }}{% for attribute, value in protocol.attributes %} {{ attribute }}={{ value }}{% endfor %}
{% endfor %}
{% csrf_token %} - - - - + + @@ -146,6 +145,7 @@ editor.getSession().setMode("ace/mode/xml"); var edit_input = $('input[name="edit_xml"]'); + edit_input.val(editor.getSession().getValue()); editor.getSession().on("change",function () { edit_input.val(editor.getSession().getValue()); }); @@ -154,6 +154,7 @@ rule_editor.getSession().setMode("ace/mode/xml"); var rule_input = $('input[name="nwfilterrule_xml"]'); + rule_input.val(rule_editor.getSession().getValue()); rule_editor.getSession().on("change",function () { rule_input.val(rule_editor.getSession().getValue()); }); diff --git a/nwfilters/templates/nwfilters.html b/nwfilters/templates/nwfilters.html index 27daaa79..847116df 100644 --- a/nwfilters/templates/nwfilters.html +++ b/nwfilters/templates/nwfilters.html @@ -29,7 +29,7 @@ # {% trans "UUID" %} {% trans "Name" %} - {% trans "Action" %} + {% trans "Action" %} @@ -38,29 +38,6 @@ {{ forloop.counter }} {{ nwfilter.uuid }} {{ nwfilter.name }} - - - -