Changeset - b02e16dc7708
[Not reviewed]
default
0 2 0
Branko Majic (branko) - 10 years ago 2013-11-09 14:02:29
branko@majic.rs
CONNT-17: Added tabelarised representation of communications to the project details page with colour-coding.
2 files changed with 27 insertions and 0 deletions:
0 comments (0 inline, 0 general)
conntrackt/templates/conntrackt/project_detail.html
Show inline comments
 
@@ -38,6 +38,30 @@
 
  </div>
 
  {% endfor %}
 
</div>
 

	
 
{% if communications %}
 
<div class="row">
 
  <div class="span12">
 
    <h2>Communications</h2>
 
    <table class="table table-hover table-condensed table-striped">
 
      <thead>
 
        <tr><th>From</th><th>To</th><th>Protocol</th><th>Port</th></tr>
 
      </thead>
 
      <tbody>
 
      {% for communication in communications %}
 
        <tr>
 
          <td><span class="badge" style="background-color: {{ communication.source_color }};">O</span> {{ communication.source }}</td>
 
          <td><span class="badge" style="background-color: {{ communication.destination_color }};">O</span> {{ communication.destination }}</td>
 
          <td>{{ communication.protocol }}</td>
 
          <td>{{ communication.port }}</td>
 
        </tr>
 
      {% endfor %}
 
      </tbody>
 
    </table>
 
  </div>
 
</div>
 
{% endif %}
 

	
 
<div class="row">
 
  <div class="span12">
 
    <h2>Communications diagram</h2>
conntrackt/views.py
Show inline comments
 
@@ -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
 

	
0 comments (0 inline, 0 general)