# HG changeset patch # User Branko Majic # Date 2013-11-09 14:02:29 # Node ID b02e16dc770835dbf68a4ace4d513ce0b2ea3486 # Parent a9320f18b39960426f00e1e7cd007dac0def56e5 CONNT-17: Added tabelarised representation of communications to the project details page with colour-coding. diff --git a/conntrackt/templates/conntrackt/project_detail.html b/conntrackt/templates/conntrackt/project_detail.html --- a/conntrackt/templates/conntrackt/project_detail.html +++ b/conntrackt/templates/conntrackt/project_detail.html @@ -38,6 +38,30 @@ {% endfor %} + +{% if communications %} +
+
+

Communications

+ + + + + + {% for communication in communications %} + + + + + + + {% endfor %} + +
FromToProtocolPort
O {{ communication.source }}O {{ communication.destination }}{{ communication.protocol }}{{ communication.port }}
+
+
+{% endif %} +

Communications diagram

diff --git a/conntrackt/views.py b/conntrackt/views.py --- a/conntrackt/views.py +++ b/conntrackt/views.py @@ -177,6 +177,9 @@ class ProjectView(MultiplePermissionsReq # Add the (location, entities) tuples to context. context['location_entities'] = location_entities + # Add all project communications to context. + context['communications'] = self.object.get_project_communications_summary() + # Finally return the context. return context