diff options
author | Tom Willemsen <tom.willemsen@archlinux.us> | 2011-04-28 13:00:27 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-04-28 13:18:29 -0500 |
commit | 00e096ddf0654d32e67ac8bc47f3de01ed7e740b (patch) | |
tree | 70885935cb7e3e90af07f42708a9d04d818d8e4e | |
parent | f4229daac60fa90cbf8d77bfdffd88a467869b3c (diff) |
isotests: style cleanup, ui improvements
* Using radio buttons for widgets is smarter.
* Model names cleanup.
* Test.ms: totally un-descriptive field name, should be modules.
* models, Iso: Likely need more than a date field here. Removed date
and added name.
* get_success_test/get_failed_test: now on abstract superclass
* tests.py: I wasn't using these, so I might as well remove it.
* admin.py: convention is not to use * imports.
* models.py: "# Create your models here." -> not needed.
* urls.py: I wasn't using info_dict anymore; I had a blank second
pattern definition, and I should follow indentation patterns from
elsewhere in the project.
* views.py, add: switched to using mostly direct_to_template to
avoid some of the boilerplate.
* isotest/templates: was old, not used.
* I had 4 + 1 templates, but only two views- these other
ones were old, unnecessary and not wired up.
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r-- | isotests/admin.py | 12 | ||||
-rw-r--r-- | isotests/fixtures/hardware.json | 12 | ||||
-rw-r--r-- | isotests/models.py | 135 | ||||
-rw-r--r-- | isotests/templates/iso_list.html | 2 | ||||
-rw-r--r-- | isotests/tests.py | 23 | ||||
-rw-r--r-- | isotests/urls.py | 12 | ||||
-rw-r--r-- | isotests/views.py | 66 | ||||
-rw-r--r-- | templates/isotests/iso_list.html | 18 | ||||
-rw-r--r-- | templates/isotests/results.html | 364 | ||||
-rw-r--r-- | templates/isotests/test_list.html | 18 |
10 files changed, 279 insertions, 383 deletions
diff --git a/isotests/admin.py b/isotests/admin.py index b03ddea3..0cde0f83 100644 --- a/isotests/admin.py +++ b/isotests/admin.py @@ -1,14 +1,16 @@ -from isotests.models import * +from isotests.models import Iso, Architecture, IsoType, BootType +from isotests.models import HardwareType, InstallType, Source +from isotests.models import ClockChoice, Filesystem, Module, Bootloader from django.contrib import admin admin.site.register(Iso) admin.site.register(Architecture) -admin.site.register(Isotype) -admin.site.register(Boottype) -admin.site.register(Hardware) +admin.site.register(IsoType) +admin.site.register(BootType) +admin.site.register(HardwareType) admin.site.register(InstallType) admin.site.register(Source) -admin.site.register(Clockchoice) +admin.site.register(ClockChoice) admin.site.register(Filesystem) admin.site.register(Module) admin.site.register(Bootloader) diff --git a/isotests/fixtures/hardware.json b/isotests/fixtures/hardware.json index c9169146..335a50f6 100644 --- a/isotests/fixtures/hardware.json +++ b/isotests/fixtures/hardware.json @@ -1,42 +1,42 @@ [ { "pk": 1, - "model": "isotests.hardware", + "model": "isotests.hardwaretype", "fields": { "name": "virtualbox" } }, { "pk": 2, - "model": "isotests.hardware", + "model": "isotests.hardwaretype", "fields": { "name": "qemu" } }, { "pk": 3, - "model": "isotests.hardware", + "model": "isotests.hardwaretype", "fields": { "name": "intel i686" } }, { "pk": 4, - "model": "isotests.hardware", + "model": "isotests.hardwaretype", "fields": { "name": "intel x86_64" } }, { "pk": 5, - "model": "isotests.hardware", + "model": "isotests.hardwaretype", "fields": { "name": "amd i686" } }, { "pk": 6, - "model": "isotests.hardware", + "model": "isotests.hardwaretype", "fields": { "name": "amd x86_64" } diff --git a/isotests/models.py b/isotests/models.py index d9cfc78c..bffb2d94 100644 --- a/isotests/models.py +++ b/isotests/models.py @@ -1,128 +1,77 @@ from django.db import models from django.db.models import Max -from datetime import datetime -# Create your models here. -class Iso(models.Model): - date = models.DateField() - - def __unicode__(self): - return str(self.date) +class IsoOption(models.Model): + class Meta: + abstract = True -class Architecture(models.Model): name = models.CharField(max_length=200) def __unicode__(self): - return self.name + return str(self.name) def get_success_test(self): - return self.test_set.filter(success=True).aggregate(Max('iso__date'))['iso__date__max'] - def get_failed_test(self): - return self.test_set.filter(success=False).aggregate(Max('iso__date'))['iso__date__max'] - -class Isotype(models.Model): - name = models.CharField(max_length=200) + test = self.test_set.filter(success=True).annotate(Max('iso__id')) + if test: + return test[0].iso.name + return None - def __unicode__(self): - return self.name - def get_success_test(self): - return self.test_set.filter(success=True).aggregate(Max('iso__date'))['iso__date__max'] def get_failed_test(self): - return self.test_set.filter(success=False).aggregate(Max('iso__date'))['iso__date__max'] + test = self.test_set.filter(success=False).annotate(Max('iso__id')) + if test: + return test[0].iso.name + return None -class Boottype(models.Model): - name = models.CharField(max_length=200) +class Iso(models.Model): + name = models.CharField(max_length=500) + active = models.BooleanField(default=True) def __unicode__(self): return self.name - def get_success_test(self): - return self.test_set.filter(success=True).aggregate(Max('iso__date'))['iso__date__max'] - def get_failed_test(self): - return self.test_set.filter(success=False).aggregate(Max('iso__date'))['iso__date__max'] -class Hardware(models.Model): - name = models.CharField(max_length=200) +class Architecture(IsoOption): + pass - def __unicode__(self): - return self.name - def get_success_test(self): - return self.test_set.filter(success=True).aggregate(Max('iso__date'))['iso__date__max'] - def get_failed_test(self): - return self.test_set.filter(success=False).aggregate(Max('iso__date'))['iso__date__max'] +class IsoType(IsoOption): + pass -class InstallType(models.Model): - name = models.CharField(max_length=200) +class BootType(IsoOption): + pass - def __unicode__(self): - return self.name - def get_success_test(self): - return self.test_set.filter(success=True).aggregate(Max('iso__date'))['iso__date__max'] - def get_failed_test(self): - return self.test_set.filter(success=False).aggregate(Max('iso__date'))['iso__date__max'] +class HardwareType(IsoOption): + pass -class Source(models.Model): - name = models.CharField(max_length=200) +class InstallType(IsoOption): + pass - def __unicode__(self): - return self.name - def get_success_test(self): - return self.test_set.filter(success=True).aggregate(Max('iso__date'))['iso__date__max'] - def get_failed_test(self): - return self.test_set.filter(success=False).aggregate(Max('iso__date'))['iso__date__max'] - -class Clockchoice(models.Model): - name = models.CharField(max_length=200) - - def __unicode__(self): - return self.name - def get_success_test(self): - return self.test_set.filter(success=True).aggregate(Max('iso__date'))['iso__date__max'] - def get_failed_test(self): - return self.test_set.filter(success=False).aggregate(Max('iso__date'))['iso__date__max'] - -class Filesystem(models.Model): - name = models.CharField(max_length=200) - - def __unicode__(self): - return self.name - def get_success_test(self): - return self.test_set.filter(success=True).aggregate(Max('iso__date'))['iso__date__max'] - def get_failed_test(self): - return self.test_set.filter(success=False).aggregate(Max('iso__date'))['iso__date__max'] +class Source(IsoOption): + pass -class Module(models.Model): - name = models.CharField(max_length=200) +class ClockChoice(IsoOption): + pass - def __unicode__(self): - return self.name - def get_success_test(self): - return self.test_set.filter(success=True).aggregate(Max('iso__date'))['iso__date__max'] - def get_failed_test(self): - return self.test_set.filter(success=False).aggregate(Max('iso__date'))['iso__date__max'] +class Filesystem(IsoOption): + pass -class Bootloader(models.Model): - name = models.CharField(max_length=200) +class Module(IsoOption): + pass - def __unicode__(self): - return self.name - def get_success_test(self): - return self.test_set.filter(success=True).aggregate(Max('iso__date'))['iso__date__max'] - def get_failed_test(self): - return self.test_set.filter(success=False).aggregate(Max('iso__date'))['iso__date__max'] +class Bootloader(IsoOption): + pass class Test(models.Model): user_name = models.CharField(max_length=500) user_email = models.EmailField() iso = models.ForeignKey(Iso) - arch = models.ForeignKey(Architecture) - isotype = models.ForeignKey(Isotype) - boottype = models.ForeignKey(Boottype) - hardwaretype = models.ForeignKey(Hardware) - installtype = models.ForeignKey(InstallType) + architecture = models.ForeignKey(Architecture) + iso_type = models.ForeignKey(IsoType) + boot_type = models.ForeignKey(BootType) + hardware_type = models.ForeignKey(HardwareType) + install_type = models.ForeignKey(InstallType) source = models.ForeignKey(Source) - clock = models.ForeignKey(Clockchoice) + clock_choice = models.ForeignKey(ClockChoice) filesystem = models.ForeignKey(Filesystem) - ms = models.ManyToManyField(Module, null=True, blank=True) + modules = models.ManyToManyField(Module, null=True, blank=True) rollback = models.BooleanField() rollback_filesystem = models.ForeignKey(Filesystem, related_name="rollback_test", null=True, blank=True) diff --git a/isotests/templates/iso_list.html b/isotests/templates/iso_list.html deleted file mode 100644 index 06572739..00000000 --- a/isotests/templates/iso_list.html +++ /dev/null @@ -1,2 +0,0 @@ -hello there -bla diff --git a/isotests/tests.py b/isotests/tests.py deleted file mode 100644 index 2247054b..00000000 --- a/isotests/tests.py +++ /dev/null @@ -1,23 +0,0 @@ -""" -This file demonstrates two different styles of tests (one doctest and one -unittest). These will both pass when you run "manage.py test". - -Replace these with more appropriate tests for your application. -""" - -from django.test import TestCase - -class SimpleTest(TestCase): - def test_basic_addition(self): - """ - Tests that 1 + 1 always equals 2. - """ - self.failUnlessEqual(1 + 1, 2) - -__test__ = {"doctest": """ -Another way to test that 1 + 1 is equal to 2. - ->>> 1 + 1 == 2 -True -"""} - diff --git a/isotests/urls.py b/isotests/urls.py index e28497aa..f60f0bc9 100644 --- a/isotests/urls.py +++ b/isotests/urls.py @@ -1,16 +1,8 @@ from django.conf.urls.defaults import patterns -from isotests.models import Test - -info_dict = { - 'queryset': Test.objects.all() -} urlpatterns = patterns('isotests.views', - (r'^$', 'view_results'), - (r'^add/$', 'add_result') - ) - -urlpatterns += patterns('', + (r'^$', 'view_results'), + (r'^add/$', 'add_result') ) # vim: set ts=4 sw=4 et: diff --git a/isotests/views.py b/isotests/views.py index 738fa90d..cb7f23c5 100644 --- a/isotests/views.py +++ b/isotests/views.py @@ -1,50 +1,64 @@ -# Create your views here. from django.http import HttpResponse, HttpResponseRedirect -from django.forms import ModelForm, DateField -from isotests.models import * -from django.shortcuts import render_to_response -from django.template import RequestContext, Context, loader +from django.forms import ModelForm, RadioSelect, CheckboxSelectMultiple +from django.forms import ModelChoiceField +from isotests.models import Iso, Architecture, IsoType, BootType +from isotests.models import HardwareType, InstallType, Source, Test +from isotests.models import ClockChoice, Filesystem, Module, Bootloader +from django.template import Context, loader +from django.views.generic.simple import direct_to_template class TestForm(ModelForm): class Meta: model = Test + widgets = { + "architecture": RadioSelect(), + "iso_type": RadioSelect(), + "boot_type": RadioSelect(), + "hardware_type": RadioSelect(), + "install_type": RadioSelect(), + "source": RadioSelect(), + "clock_choice": RadioSelect(), + "filesystem": RadioSelect(), + "rollback_filesystem": RadioSelect(), + "bootloader": RadioSelect(), + "modules": CheckboxSelectMultiple(), + "rollback_modules": CheckboxSelectMultiple(), + } + iso = ModelChoiceField(queryset=Iso.objects.filter(active=True)) def add_result(request): - if request.method == 'POST': # If the form has been submitted... - form = TestForm(request.POST) # A form bound to the post data - if form.is_valid(): # All validation rules pass + if request.method == 'POST': + form = TestForm(request.POST) + if form.is_valid(): form.save() - return HttpResponseRedirect('/isotests') # Redirect after POST + return HttpResponseRedirect('/isotests') else: - form = TestForm() # An unbound form + form = TestForm() - return render_to_response('isotests/add.html', { 'form': form, }, - context_instance=RequestContext(request)) + context = {'form': form} + return direct_to_template(request, 'isotests/add.html', context) def view_results(request): - result_success_list = Test.objects.filter(success=True) - result_failed_list = Test.objects.filter(success=False) - architecture_list = Architecture.objects.all() - isotype_list = Isotype.objects.all() - boottype_list = Boottype.objects.all() - hardware_list = Hardware.objects.all() - installtype_list = InstallType.objects.all() + iso_type_list = IsoType.objects.all() + boot_type_list = BootType.objects.all() + hardware_type_list = HardwareType.objects.all() + install_type_list = InstallType.objects.all() source_list = Source.objects.all() - clockchoice_list = Clockchoice.objects.all() + clock_choice_list = ClockChoice.objects.all() module_list = Module.objects.all() filesystem_list = Filesystem.objects.all() bootloader_list = Bootloader.objects.all() t = loader.get_template("isotests/results.html") c = Context({ - 'arch_choices': architecture_list, - 'isotype_choices': isotype_list, - 'boottype_choices': boottype_list, - 'hardware_list': hardware_list, - 'installtype_list': installtype_list, + 'architecture_list': architecture_list, + 'iso_type_list': iso_type_list, + 'boot_type_list': boot_type_list, + 'hardware_type_list': hardware_type_list, + 'install_type_list': install_type_list, 'source_list': source_list, - 'clock_choices': clockchoice_list, + 'clock_choices_list': clock_choice_list, 'filesystem_list': filesystem_list, 'module_list': module_list, 'bootloader_list': bootloader_list, diff --git a/templates/isotests/iso_list.html b/templates/isotests/iso_list.html deleted file mode 100644 index f94bbe1a..00000000 --- a/templates/isotests/iso_list.html +++ /dev/null @@ -1,18 +0,0 @@ -{% extends "base.html" %} - -{% block title %}Arch Linux - Testresults{% endblock %} - -{% block content %} -{% if object_list %} -<div class="box"> - <h2>Arch releng iso buid test results</h2> - <ul> - {% for iso in object_list %} - <li><a href="/tests/{{ iso.id }}/">{{ iso }}</a></li> - {% endfor %} - </ul> - {% else %} - <p>No tests are available.</p> - {% endif %} -</div> -{% endblock %} diff --git a/templates/isotests/results.html b/templates/isotests/results.html index 3e43ae47..b773056a 100644 --- a/templates/isotests/results.html +++ b/templates/isotests/results.html @@ -4,187 +4,187 @@ {% block content %} <div class="box"> - <h2>Arch releng iso build test results</h2> - <table> - <tr> - <td> - <h3>image arch</h3> - </td> - </tr> - {% if arch_choices %} - {% for arch in arch_choices %} - <tr> - <td>{{ arch.name }}</td> - <td>{{ arch.get_success_test|default_if_none:"Never succeeded" }}</td> - <td>{{ arch.get_failed_test|default_if_none:"Never failed" }}</td> - </tr> - {% endfor %} - {% endif %} - <tr> - <td> - <h3>image type</h3> - </td> - </tr> - {% if isotype_choices %} - {% for isotype in isotype_choices %} - <tr> - <td>{{ isotype.name }}</td> - <td>{{ isotype.get_success_test|default_if_none:"Never succeeded" }}</td> - <td>{{ isotype.get_failed_test|default_if_none:"Never failed" }}</td> - </tr> - {% endfor %} - {% endif %} - <tr> - <td> - <h3>image boot</h3> - </td> - </tr> - {% if boottype_choices %} - {% for boottype in boottype_choices %} - <tr> - <td>{{ boottype.name }}</td> - <td>{{ boottype.get_success_test|default_if_none:"Never succeeded" }}</td> - <td>{{ boottype.get_failed_test|default_if_none:"Never failed" }}</td> - </tr> - {% endfor %} - {% endif %} - <tr> - <td> - <h3>hardware type</h3> - </td> - </tr> - {% if hardware_list %} - {% for hardware in hardware_list %} - <tr> - <td>{{ hardware.name }}</td> - <td>{{ hardware.get_success_test|default_if_none:"Never succeeded" }}</td> - <td>{{ hardware.get_failed_test|default_if_none:"Never failed" }}</td> - </tr> - {% endfor %} - {% endif %} - <tr> - <td> - <h3>install type</h3> - </td> - </tr> - {% if installtype_list %} - {% for installtype in installtype_list %} - <tr> - <td>{{ installtype.name }}</td> - <td>{{ installtype.get_success_test|default_if_none:"Never succeeded" }}</td> - <td>{{ installtype.get_failed_test|default_if_none:"Never failed" }}</td> - </tr> - {% endfor %} - {% endif %} - <tr> - <td> - <h3>source selection</h3> - </td> - </tr> - {% if source_list %} - {% for source in source_list %} - <tr> - <td>{{ source.name }}</td> - <td>{{ source.get_success_test|default_if_none:"Never succeeded" }}</td> - <td>{{ source.get_failed_test|default_if_none:"Never failed" }}</td> - </tr> - {% endfor %} - {% endif %} - <tr> - <td> - <h3>clock</h3> - </td> - </tr> - {% if clock_choices %} - {% for clock in clock_choices %} - <tr> - <td>{{ clock.name }}</td> - <td>{{ clock.get_success_test|default_if_none:"Never succeeded" }}</td> - <td>{{ clock.get_failed_test|default_if_none:"Never failed" }}</td> - </tr> - {% endfor %} - {% endif %} - <tr> - <td> - <h3>partitioning/filesystems</h3> - </td> - </tr> - {% if filesystem_list %} - {% for filesystem in filesystem_list %} - <tr> - <td>{{ filesystem.name }}</td> - <td>{{ filesystem.get_success_test|default_if_none:"Never succeeded" }}</td> - <td>{{ filesystem.get_failed_test|default_if_none:"Never failed" }}</td> - </tr> - {% endfor %} - {% endif %} - <tr> - <td> - <h3>fancy stuff</h3> - </td> - </tr> - {% if module_list %} - {% for module in module_list %} - <tr> - <td>{{ module.name }}</td> - <td>{{ module.get_success_test|default_if_none:"Never succeeded" }}</td> - <td>{{ module.get_failed_test|default_if_none:"Never failed" }}</td> - </tr> - {% endfor %} - {% endif %} - <tr> - <td> - <h3>rollback</h3> - </td> - </tr> - <tr> - <td>yes</td> - </tr> - <tr> - <td>no</td> - </tr> - <tr> - <td> - <h4>rollback: partitioning/filesystems</h4> - </td> - </tr> - {% if filesystem_list %} - {% for filesystem in filesystem_list %} - <tr> - <td>{{ filesystem.name }}</td> - <td>{{ filesystem.get_success_test|default_if_none:"Never succeeded" }}</td> - <td>{{ filesystem.get_failed_test|default_if_none:"Never failed" }}</td> - </tr> - {% endfor %} - {% endif %} - <tr> - <td> - <h4>rollback: fancy stuff</h4> - </td> - </tr> - {% if module_list %} - {% for module in module_list %} - <tr> - <td>{{ module.name }}</td> - <td>{{ module.get_success_test|default_if_none:"Never succeeded" }}</td> - <td>{{ module.get_failed_test|default_if_none:"Never failed" }}</td> - </tr> - {% endfor %} - {% endif %} - <tr> - <td> - <h3>bootloader</h3> - </td> - </tr> - {% if bootloader_list %} - {% for bootloader in bootloader_list %} - <tr> - <td>{{ bootloader.name }}</td> - <td>{{ bootloader.get_success_test|default_if_none:"Never succeeded" }}</td> - <td>{{ bootloader.get_failed_test|default_if_none:"Never failed" }}</td> - </tr> - {% endfor %} - {% endif %} - </table> + <h2>Arch releng iso build test results</h2> + <table> + <tr> + <td> + <h3>image arch</h3> + </td> + </tr> + {% if architecture_list %} + {% for architecture in architecture_list %} + <tr> + <td>{{ architecture.name }}</td> + <td>{{ architecture.get_success_test|default_if_none:"Never succeeded" }}</td> + <td>{{ architecture.get_failed_test|default_if_none:"Never failed" }}</td> + </tr> + {% endfor %} + {% endif %} + <tr> + <td> + <h3>image type</h3> + </td> + </tr> + {% if iso_type_list %} + {% for iso_type in iso_type_list %} + <tr> + <td>{{ iso_type.name }}</td> + <td>{{ iso_type.get_success_test|default_if_none:"Never succeeded" }}</td> + <td>{{ iso_type.get_failed_test|default_if_none:"Never failed" }}</td> + </tr> + {% endfor %} + {% endif %} + <tr> + <td> + <h3>image boot</h3> + </td> + </tr> + {% if boot_type_list %} + {% for boot_type in boot_type_list %} + <tr> + <td>{{ boot_type.name }}</td> + <td>{{ boot_type.get_success_test|default_if_none:"Never succeeded" }}</td> + <td>{{ boot_type.get_failed_test|default_if_none:"Never failed" }}</td> + </tr> + {% endfor %} + {% endif %} + <tr> + <td> + <h3>hardware type</h3> + </td> + </tr> + {% if hardware_type_list %} + {% for hardware_type in hardware_type_list %} + <tr> + <td>{{ hardware_type.name }}</td> + <td>{{ hardware_type.get_success_test|default_if_none:"Never succeeded" }}</td> + <td>{{ hardware_type.get_failed_test|default_if_none:"Never failed" }}</td> + </tr> + {% endfor %} + {% endif %} + <tr> + <td> + <h3>install type</h3> + </td> + </tr> + {% if install_type_list %} + {% for install_type in install_type_list %} + <tr> + <td>{{ install_type.name }}</td> + <td>{{ install_type.get_success_test|default_if_none:"Never succeeded" }}</td> + <td>{{ install_type.get_failed_test|default_if_none:"Never failed" }}</td> + </tr> + {% endfor %} + {% endif %} + <tr> + <td> + <h3>source selection</h3> + </td> + </tr> + {% if source_list %} + {% for source in source_list %} + <tr> + <td>{{ source.name }}</td> + <td>{{ source.get_success_test|default_if_none:"Never succeeded" }}</td> + <td>{{ source.get_failed_test|default_if_none:"Never failed" }}</td> + </tr> + {% endfor %} + {% endif %} + <tr> + <td> + <h3>clock</h3> + </td> + </tr> + {% if clock_choices_list %} + {% for clock_choice in clock_choices_list %} + <tr> + <td>{{ clock_choice.name }}</td> + <td>{{ clock_choice.get_success_test|default_if_none:"Never succeeded" }}</td> + <td>{{ clock_choice.get_failed_test|default_if_none:"Never failed" }}</td> + </tr> + {% endfor %} + {% endif %} + <tr> + <td> + <h3>partitioning/filesystems</h3> + </td> + </tr> + {% if filesystem_list %} + {% for filesystem in filesystem_list %} + <tr> + <td>{{ filesystem.name }}</td> + <td>{{ filesystem.get_success_test|default_if_none:"Never succeeded" }}</td> + <td>{{ filesystem.get_failed_test|default_if_none:"Never failed" }}</td> + </tr> + {% endfor %} + {% endif %} + <tr> + <td> + <h3>fancy stuff</h3> + </td> + </tr> + {% if module_list %} + {% for module in module_list %} + <tr> + <td>{{ module.name }}</td> + <td>{{ module.get_success_test|default_if_none:"Never succeeded" }}</td> + <td>{{ module.get_failed_test|default_if_none:"Never failed" }}</td> + </tr> + {% endfor %} + {% endif %} + <tr> + <td> + <h3>rollback</h3> + </td> + </tr> + <tr> + <td>yes</td> + </tr> + <tr> + <td>no</td> + </tr> + <tr> + <td> + <h4>rollback: partitioning/filesystems</h4> + </td> + </tr> + {% if filesystem_list %} + {% for filesystem in filesystem_list %} + <tr> + <td>{{ filesystem.name }}</td> + <td>{{ filesystem.get_success_test|default_if_none:"Never succeeded" }}</td> + <td>{{ filesystem.get_failed_test|default_if_none:"Never failed" }}</td> + </tr> + {% endfor %} + {% endif %} + <tr> + <td> + <h4>rollback: fancy stuff</h4> + </td> + </tr> + {% if module_list %} + {% for module in module_list %} + <tr> + <td>{{ module.name }}</td> + <td>{{ module.get_success_test|default_if_none:"Never succeeded" }}</td> + <td>{{ module.get_failed_test|default_if_none:"Never failed" }}</td> + </tr> + {% endfor %} + {% endif %} + <tr> + <td> + <h3>bootloader</h3> + </td> + </tr> + {% if bootloader_list %} + {% for bootloader in bootloader_list %} + <tr> + <td>{{ bootloader.name }}</td> + <td>{{ bootloader.get_success_test|default_if_none:"Never succeeded" }}</td> + <td>{{ bootloader.get_failed_test|default_if_none:"Never failed" }}</td> + </tr> + {% endfor %} + {% endif %} + </table> </div> {% endblock %} diff --git a/templates/isotests/test_list.html b/templates/isotests/test_list.html deleted file mode 100644 index 1ef39a4c..00000000 --- a/templates/isotests/test_list.html +++ /dev/null @@ -1,18 +0,0 @@ -{% extends "base.html" %} - -{% block title %}Arch Linux - Testresults{% endblock %} - -{% block content %} -<div class="box"> - <h2>Arch releng iso build test results</h2> - {% if object_list %} - <ul> - {% for test in object_list %} - <li><a href="/tests/{{ test.id }}/">{{ test.iso }}</a></li> - {% endfor %} - </ul> - {% else %} - <p>No test results are available.</p> - {% endif %} -</div> -{% endblock %} |