Changeset 368f6e1aef2155875dced50618c000060a039edb
- Timestamp:
- 02/20/09 19:23:48 (3 years ago)
- Author:
- Frederic Lepied <frederic.lepied@…>
- Children:
- 8e190b5404bcc72bccbbecf78e29d5c33a730180
- Parents:
- 72e8fdfdb93523240b9e923989ef66afc0e4cf14
- git-committer:
- Frederic Lepied <frederic.lepied@…> (02/20/09 19:23:48)
- Message:
-
added a page to display infos about a system and some navigation into all the systems
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r5fc8fc0
|
r368f6e1
|
|
| 12 | 12 | <div id="header"> |
| 13 | 13 | <div id="branding"> |
| 14 | | <h1 id="site-name">Test reports</h1> |
| | 14 | <h1 id="site-name"><a href="/">Test reports</a></h1> |
| 15 | 15 | </div> |
| 16 | 16 | </div> |
-
|
r5fc8fc0
|
r368f6e1
|
|
| 2 | 2 | |
| 3 | 3 | {% block content %} |
| 4 | | <h1>Versions</h1> |
| | 4 | <h2>Systems</h2> |
| | 5 | <ul> |
| | 6 | {% for system in systems %} |
| | 7 | <li><a href="/system/{{ system.id }}/">{{ system.name }}</a></li> |
| | 8 | {% endfor %} |
| | 9 | </ul> |
| | 10 | <h2>Versions</h2> |
| 5 | 11 | <ul> |
| 6 | 12 | {% for version in versions %} |
-
|
r5fc8fc0
|
r368f6e1
|
|
| 2 | 2 | |
| 3 | 3 | {% block content %} |
| | 4 | <h2>Test info</h2> |
| 4 | 5 | <table> |
| 5 | 6 | <tr><th>Name</th><td>{{ log.test_name.name }}</td></tr> |
| 6 | 7 | <tr><th>System</th><td>{{ log.system.name }}</td></tr> |
| 7 | 8 | <tr><th>Date</th><td>{{ log.date }}</td></tr> |
| | 9 | <tr><th>Status</th><td>{{ log.status }}</td></tr> |
| | 10 | {% ifequal log.status 'D' %} |
| 8 | 11 | <tr><th>Version</th><td>{{ log.version.name }}</td></tr> |
| 9 | 12 | <tr><th>Errors</th><td>{{ log.errors }}</td></tr> |
| … |
… |
|
| 19 | 22 | |
| 20 | 23 | <a href="/testcontent/{{ log.id }}/">complete log</a> |
| | 24 | {% else %} |
| | 25 | </table> |
| | 26 | {% endifequal %} |
| 21 | 27 | {% endblock %} |
-
|
rbae1bf8
|
r368f6e1
|
|
| 2 | 2 | |
| 3 | 3 | {% block content %} |
| 4 | | <h1>Test reports for version {{ version.name }}</h1> |
| | 4 | <h2>Test reports for version {{ version.name }}</h2> |
| 5 | 5 | <ul> |
| 6 | 6 | {% for log in logs %} |
-
|
r5fc8fc0
|
r368f6e1
|
|
| 2 | 2 | |
| 3 | 3 | {% block content %} |
| | 4 | <h2>Versions</h2> |
| 4 | 5 | <ul> |
| 5 | 6 | {% for log in logs %} |
| 6 | | <li><a href="/test/{{ log.id }}/">{{ log.test_name.name }}</a> ({% ifequal log.status 'D' %}{{ log.errors }} errors{% else %}{{ log.status }}{% endifequal %}</li> |
| | 7 | <li><a href="/test/{{ log.id }}/">{{ log.test_name.name }}</a> ({% ifequal log.status 'D' %}{{ log.errors }} errors{% else %}{{ log.status }}{% endifequal %})</li> |
| 7 | 8 | {% endfor %} |
| 8 | 9 | </ul> |
-
|
rbcaf349
|
r368f6e1
|
|
| 113 | 113 | def index(request): |
| 114 | 114 | versions = SystemVersion.objects.all().order_by('-id') |
| 115 | | return render_to_response('index.html', {'versions': versions}) |
| | 115 | systems = System.objects.all().order_by('name') |
| | 116 | return render_to_response('index.html', {'versions': versions, 'systems': systems}) |
| 116 | 117 | |
| 117 | 118 | def script(request, name): |
| 118 | 119 | return render_to_response(name + settings.TEST_SUFFIX, {'testname': name, 'system': 'system', 'log': None}) |
| 119 | 120 | |
| | 121 | def system(request, sysid): |
| | 122 | s = get_object_or_404(System, id=sysid) |
| | 123 | testlogs = TestLog.objects.filter(system=s).order_by('-date') |
| | 124 | logs = Log.objects.filter(system=s).order_by('-date')[0:10] |
| | 125 | return render_to_response('system.html', {'system': s, 'logs': testlogs, 'boots': logs}) |
| | 126 | |
| 120 | 127 | # views.py ends here |
-
|
rbcaf349
|
r368f6e1
|
|
| 27 | 27 | (r'^testcontent/(?P<logid>[0-9]+)/$', 'tester.views.content'), |
| 28 | 28 | (r'^script/(?P<name>.+)/$', 'tester.views.script'), |
| | 29 | (r'^system/(?P<sysid>[0-9]+)/$', 'tester.views.system'), |
| 29 | 30 | |
| 30 | 31 | # Uncomment the next line to enable the admin: |