forked from strongswan/strongTNC
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
246 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
{% extends 'swid/tags_list.html' %} | ||
|
||
{% load i18n %} | ||
|
||
{% block title %}{{ object.unique_id }}{% endblock %} | ||
|
||
{% block hero %} | ||
<h1>{{ object.unique_id }}</h1> | ||
{% endblock %} | ||
|
||
{% block detail %} | ||
<div class="container-fluid"> | ||
<div class="row-fluid"> | ||
{% if object %} | ||
<h4>Tag Info</h4> | ||
<div class="row-fluid"> | ||
<div class="span8"> | ||
<table class="table" border="0"> | ||
<tbody> | ||
<tr> | ||
<td><strong>{% trans 'Name' %}</strong></td> | ||
<td>{{ object.package_name }}</td> | ||
</tr> | ||
<tr> | ||
<td><strong>{% trans 'Version' %}</strong></td> | ||
<td>{{ object.version }}</td> | ||
</tr> | ||
<tr> | ||
<td><strong>{% trans 'Unique ID' %}</strong></td> | ||
<td>{{ object.unique_id }}</td> | ||
</tr> | ||
<tr> | ||
<td><strong>{% trans 'Entities' %}</strong></td> | ||
<td> | ||
{% for er in entityroles %} | ||
{{ er.entity.name }} ({{ er.get_role_display }}) | ||
{% if not forloop.last %} | ||
<br/> | ||
{% endif %} | ||
{% endfor %} | ||
</td> | ||
</tr> | ||
<tr> | ||
<td><strong>{% trans 'Regids' %}</strong></td> | ||
<td> | ||
{% for er in entityroles %} | ||
{{ er.entity.regid }} | ||
{% if not forloop.last %} | ||
<br/> | ||
{% endif %} | ||
{% endfor %} | ||
</td> | ||
</tr> | ||
<tr> | ||
<td><strong>{% trans 'Software IDs' %}</strong></td> | ||
<td> | ||
{% for er in entityroles %} | ||
{{ er.get_software_id }} | ||
{% if not forloop.last %} | ||
<br/> | ||
{% endif %} | ||
{% endfor %} | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
<a class="btn btn-primary" href="#swidTagXmlModal" data-toggle="modal"> | ||
<i class="icon-file icon-white"></i>{% trans 'View raw SWID tag' %} | ||
</a> | ||
</div> | ||
</div> | ||
<hr> | ||
|
||
<h4>Devices</h4> | ||
<div class="row-fluid"> | ||
{% if object.sessions.count %} | ||
<table class="table table-hover table-striped"> | ||
<thead> | ||
<tr> | ||
<td>{% trans 'Description' %}</td> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for session in object.sessions.all %} | ||
<tr> | ||
<td><a href="{% url 'device' session.device.pk %}">{{ session.device }}</a></td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
{% else %} | ||
<p>No files found</p> | ||
{% endif %} | ||
</div> | ||
<hr> | ||
|
||
<h4>Files</h4> | ||
<div class="row-fluid"> | ||
{% if object.files.count %} | ||
<table class="table table-hover table-striped"> | ||
<thead> | ||
<tr> | ||
<td>{% trans 'Name' %}</td> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for file in object.files.all %} | ||
<tr> | ||
<td><a href="{% url 'file' file.pk %}">{{ file.directory.path }}/{{ file.name }}</a> | ||
</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
{% else %} | ||
<p>No files found</p> | ||
{% endif %} | ||
</div> | ||
<hr> | ||
|
||
<div id="swidTagXmlModal" class="modal hide fade" tabindex="-1" role="dialog" aria-hidden="true"> | ||
<div class="modal-header"> | ||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> | ||
<h3 id="deleteModalLabel">{% trans 'SWID tag' %}: {{ object.unique_id }}</h3> | ||
</div> | ||
<div class="modal-body"> | ||
<pre class="raw-xml">{{ object.swid_xml }}</pre> | ||
</div> | ||
<div class="modal-footer"> | ||
<a class="btn btn-info" data-dismiss="modal">Ok</a> | ||
</div> | ||
</div> | ||
{% endif %} | ||
</div> | ||
</div> | ||
|
||
{% endblock %} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
{% extends "tncapp/base.html" %} | ||
|
||
{% load i18n %} | ||
|
||
{% block title %}SWID tags{% endblock %} | ||
|
||
{% block hero %} | ||
<h1>SWID tags</h1> | ||
{% endblock %} | ||
|
||
{% block content %} | ||
<div class="container-fluid"> | ||
<div class="row-fluid"> | ||
<div class="span3" id="line"> | ||
<h4>{% trans "Tag" %}</h4> | ||
<hr> | ||
<div class="row-fluid"> | ||
{% if object_list.count %} | ||
<form class="form-search pull-center" action="/tags/search" method="get"> | ||
<div class="input-append"> | ||
<input type="text" class="input input-small search-query" name="q" placeholder="Filter" | ||
value="{{ query }}" autofocus> | ||
<button type="submit" class="btn"><i class="icon-search"></i></button> | ||
</div> | ||
</form> | ||
|
||
<table class="table table-hover"> | ||
<tbody> | ||
{% for tag in object_list %} | ||
<tr> | ||
<td><a href="{% url 'swid_tag_detail' tag.pk %}">{{ tag.unique_id }}</a></td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
{% endif %} | ||
{% comment %} | ||
{% if tag|length >= 50 %} | ||
{% if tags.paginator.num_pages > 1 %} | ||
<div class="pagination pagination-mini pagination-centered"> | ||
<ul> | ||
{% if tags.has_previous %} | ||
<li><a | ||
href="?{% if query %}q={{ query }}&{% endif %}page={{ tags.previous_page_number }}">«</a> | ||
</li> | ||
{% else %} | ||
<li class="disabled"><a href="">«</a></li> | ||
{% endif %} | ||
<li><a | ||
href="?{% if query %}q={{ query }}&{% endif %}page={{ tags.number }}">Page {{ tags.number }} | ||
of {{ tags.paginator.num_pages }}</a></li> | ||
{% if tags.has_next %} | ||
<li><a | ||
href="?{% if query %}q={{ query }}&{% endif %}page={{ tags.next_page_number }}">»</a> | ||
</li> | ||
{% else %} | ||
<li class="disabled"><a href="">»</a></li> | ||
{% endif %} | ||
</ul> | ||
</div> | ||
{% endif %} | ||
{% endif %} | ||
{% endcomment %} | ||
</div> | ||
</div> | ||
|
||
<div class="span9" id="content"> | ||
{% block detail %}{% endblock %} | ||
</div> | ||
</div> | ||
</div> | ||
{% endblock %} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -115,4 +115,8 @@ table.sortable th.sorter-false { | |
|
||
.sessions-dropdown { | ||
width: 300px; | ||
} | ||
} | ||
|
||
pre.raw-xml { | ||
font-size: 10px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Does this load the raw XML tags? Since they are not displayed it would probably be a good idea to prevent Django from fetching them if they are not required to reduce memory usage.