2011-04-28 11:59:53 -07:00
|
|
|
from django import forms
|
2011-04-28 12:46:36 -07:00
|
|
|
from django.conf import settings
|
2011-08-17 07:01:07 -07:00
|
|
|
from django.db.models import Count, Max
|
2011-04-28 15:52:16 -07:00
|
|
|
from django.http import Http404
|
|
|
|
from django.shortcuts import get_object_or_404, redirect
|
isotests: various changes and updates
* isotests/fixtures/clockchoices.json: changed 'default' to 'unchanged'
* isotests/fixtures/filesystems.json: removed 'check the installed
system' line from one of the options
* isotests/fixtures/modules.json: added
'ext2','ext3','ext4','swap','xfs','jfs','reiserFS'
* isotests/models.py:
* Added RollbackOption abstract class that adds the functions
get_rollback_success_test and get_rollback_failed_test on top of
the IsoOption abstract class for use with the Filesystem and
Module classes since Test uses these both in 2 ways (regular and
rollback). This keeps them seperated.
* renamed the related names of these properties from rollback_test
to rollback_test_set (seems more in-tune with the other relations)
* isotests/views.py:
* changed the order of the fields, the automatic order makes no
sense.
* Added help texts to the fields success, filesystem,
rollback_filesystem and rollback_modules.
* Removed help text from modules (made no sense)
* Added a website field, should remain empty, a simplistic way to
hopefully reduce spambot entries.
* templates/isotests/results.html:
* Removed the rollback yes/no section
* The rollback labels should check get_rollback_success_test and
get_rollback_failed_test.
* Rollback checkbox removed.
* Clearly tell users that success must only be selected if everything
works right.
* Clearly tell users to only fill in the rollback options if they did a
rollback.
* Added a thanks page that tells people thanks.
* Added links between the pages.
* Added links to lists with tests of either a specific iso or of any
iso where a specific option was selected.
Signed-off-by: Dan McGee <dan@archlinux.org>
Conflicts:
templates/isotests/results.html
2011-04-28 11:19:42 -07:00
|
|
|
from django.views.generic.simple import direct_to_template
|
|
|
|
|
2011-04-28 11:59:53 -07:00
|
|
|
from .models import (Architecture, BootType, Bootloader, ClockChoice,
|
|
|
|
Filesystem, HardwareType, InstallType, Iso, IsoType, Module, Source,
|
|
|
|
Test)
|
2011-03-01 09:47:03 -08:00
|
|
|
|
2011-05-02 09:18:39 -07:00
|
|
|
def standard_field(model, empty_label=None, help_text=None, required=True):
|
2011-04-28 13:29:38 -07:00
|
|
|
return forms.ModelChoiceField(queryset=model.objects.all(),
|
2011-05-02 09:18:39 -07:00
|
|
|
widget=forms.RadioSelect(), empty_label=empty_label,
|
|
|
|
help_text=help_text, required=required)
|
2011-04-28 13:29:38 -07:00
|
|
|
|
2011-04-28 11:59:53 -07:00
|
|
|
class TestForm(forms.ModelForm):
|
2011-05-12 08:33:46 -07:00
|
|
|
iso = forms.ModelChoiceField(queryset=Iso.objects.filter(
|
|
|
|
active=True).order_by('-id'))
|
2011-04-28 13:29:38 -07:00
|
|
|
architecture = standard_field(Architecture)
|
|
|
|
iso_type = standard_field(IsoType)
|
|
|
|
boot_type = standard_field(BootType)
|
|
|
|
hardware_type = standard_field(HardwareType)
|
|
|
|
install_type = standard_field(InstallType)
|
|
|
|
source = standard_field(Source)
|
|
|
|
clock_choice = standard_field(ClockChoice)
|
|
|
|
filesystem = standard_field(Filesystem,
|
2011-05-15 10:30:10 -07:00
|
|
|
help_text="Verify /etc/fstab, `df -hT` output and commands like " \
|
|
|
|
"lvdisplay for special modules.")
|
2011-04-28 13:05:12 -07:00
|
|
|
modules = forms.ModelMultipleChoiceField(queryset=Module.objects.all(),
|
|
|
|
help_text="", widget=forms.CheckboxSelectMultiple(), required=False)
|
2011-05-08 09:02:55 -07:00
|
|
|
bootloader = standard_field(Bootloader,
|
2011-05-15 10:30:10 -07:00
|
|
|
help_text="Verify that the entries in the bootloader config looks OK.")
|
2011-04-29 07:33:30 -07:00
|
|
|
rollback_filesystem = standard_field(Filesystem,
|
2011-04-28 13:05:12 -07:00
|
|
|
help_text="If you did a rollback followed by a new attempt to setup " \
|
2011-05-08 09:02:56 -07:00
|
|
|
"your blockdevices/filesystems, select which option you took here.",
|
2011-05-02 09:18:39 -07:00
|
|
|
empty_label="N/A (did not rollback)", required=False)
|
2011-04-28 13:05:12 -07:00
|
|
|
rollback_modules = forms.ModelMultipleChoiceField(queryset=Module.objects.all(),
|
2011-05-08 09:02:56 -07:00
|
|
|
help_text="If you did a rollback followed by a new attempt to setup " \
|
|
|
|
"your blockdevices/filesystems, select which option you took here.",
|
2011-04-28 13:05:12 -07:00
|
|
|
widget=forms.CheckboxSelectMultiple(), required=False)
|
2011-05-24 14:28:26 -07:00
|
|
|
success = forms.BooleanField(
|
|
|
|
help_text="Only check this if everything went fine. " \
|
|
|
|
"If you ran into problems please create a ticket on <a " \
|
|
|
|
"href=\"https://bugs.archlinux.org/index.php?project=6\">the " \
|
|
|
|
"bugtracker</a> (or check that one already exists) and link to " \
|
|
|
|
"it in the comments.",
|
|
|
|
required=False)
|
2011-04-28 13:05:12 -07:00
|
|
|
website = forms.CharField(label='',
|
|
|
|
widget=forms.TextInput(attrs={'style': 'display:none;'}), required=False)
|
|
|
|
|
2011-03-01 09:47:03 -08:00
|
|
|
class Meta:
|
|
|
|
model = Test
|
isotests: various changes and updates
* isotests/fixtures/clockchoices.json: changed 'default' to 'unchanged'
* isotests/fixtures/filesystems.json: removed 'check the installed
system' line from one of the options
* isotests/fixtures/modules.json: added
'ext2','ext3','ext4','swap','xfs','jfs','reiserFS'
* isotests/models.py:
* Added RollbackOption abstract class that adds the functions
get_rollback_success_test and get_rollback_failed_test on top of
the IsoOption abstract class for use with the Filesystem and
Module classes since Test uses these both in 2 ways (regular and
rollback). This keeps them seperated.
* renamed the related names of these properties from rollback_test
to rollback_test_set (seems more in-tune with the other relations)
* isotests/views.py:
* changed the order of the fields, the automatic order makes no
sense.
* Added help texts to the fields success, filesystem,
rollback_filesystem and rollback_modules.
* Removed help text from modules (made no sense)
* Added a website field, should remain empty, a simplistic way to
hopefully reduce spambot entries.
* templates/isotests/results.html:
* Removed the rollback yes/no section
* The rollback labels should check get_rollback_success_test and
get_rollback_failed_test.
* Rollback checkbox removed.
* Clearly tell users that success must only be selected if everything
works right.
* Clearly tell users to only fill in the rollback options if they did a
rollback.
* Added a thanks page that tells people thanks.
* Added links between the pages.
* Added links to lists with tests of either a specific iso or of any
iso where a specific option was selected.
Signed-off-by: Dan McGee <dan@archlinux.org>
Conflicts:
templates/isotests/results.html
2011-04-28 11:19:42 -07:00
|
|
|
fields = ("user_name", "user_email", "iso", "architecture",
|
|
|
|
"iso_type", "boot_type", "hardware_type",
|
|
|
|
"install_type", "source", "clock_choice", "filesystem",
|
2011-04-28 15:44:43 -07:00
|
|
|
"modules", "bootloader", "rollback_filesystem",
|
|
|
|
"rollback_modules", "success", "comments")
|
2011-04-28 11:00:27 -07:00
|
|
|
widgets = {
|
2011-04-28 11:59:53 -07:00
|
|
|
"modules": forms.CheckboxSelectMultiple(),
|
2011-04-28 11:00:27 -07:00
|
|
|
}
|
2011-03-01 09:47:03 -08:00
|
|
|
|
2011-04-28 15:44:43 -07:00
|
|
|
def submit_test_result(request):
|
isotests: various changes and updates
* isotests/fixtures/clockchoices.json: changed 'default' to 'unchanged'
* isotests/fixtures/filesystems.json: removed 'check the installed
system' line from one of the options
* isotests/fixtures/modules.json: added
'ext2','ext3','ext4','swap','xfs','jfs','reiserFS'
* isotests/models.py:
* Added RollbackOption abstract class that adds the functions
get_rollback_success_test and get_rollback_failed_test on top of
the IsoOption abstract class for use with the Filesystem and
Module classes since Test uses these both in 2 ways (regular and
rollback). This keeps them seperated.
* renamed the related names of these properties from rollback_test
to rollback_test_set (seems more in-tune with the other relations)
* isotests/views.py:
* changed the order of the fields, the automatic order makes no
sense.
* Added help texts to the fields success, filesystem,
rollback_filesystem and rollback_modules.
* Removed help text from modules (made no sense)
* Added a website field, should remain empty, a simplistic way to
hopefully reduce spambot entries.
* templates/isotests/results.html:
* Removed the rollback yes/no section
* The rollback labels should check get_rollback_success_test and
get_rollback_failed_test.
* Rollback checkbox removed.
* Clearly tell users that success must only be selected if everything
works right.
* Clearly tell users to only fill in the rollback options if they did a
rollback.
* Added a thanks page that tells people thanks.
* Added links between the pages.
* Added links to lists with tests of either a specific iso or of any
iso where a specific option was selected.
Signed-off-by: Dan McGee <dan@archlinux.org>
Conflicts:
templates/isotests/results.html
2011-04-28 11:19:42 -07:00
|
|
|
if request.POST:
|
2011-04-28 11:00:27 -07:00
|
|
|
form = TestForm(request.POST)
|
isotests: various changes and updates
* isotests/fixtures/clockchoices.json: changed 'default' to 'unchanged'
* isotests/fixtures/filesystems.json: removed 'check the installed
system' line from one of the options
* isotests/fixtures/modules.json: added
'ext2','ext3','ext4','swap','xfs','jfs','reiserFS'
* isotests/models.py:
* Added RollbackOption abstract class that adds the functions
get_rollback_success_test and get_rollback_failed_test on top of
the IsoOption abstract class for use with the Filesystem and
Module classes since Test uses these both in 2 ways (regular and
rollback). This keeps them seperated.
* renamed the related names of these properties from rollback_test
to rollback_test_set (seems more in-tune with the other relations)
* isotests/views.py:
* changed the order of the fields, the automatic order makes no
sense.
* Added help texts to the fields success, filesystem,
rollback_filesystem and rollback_modules.
* Removed help text from modules (made no sense)
* Added a website field, should remain empty, a simplistic way to
hopefully reduce spambot entries.
* templates/isotests/results.html:
* Removed the rollback yes/no section
* The rollback labels should check get_rollback_success_test and
get_rollback_failed_test.
* Rollback checkbox removed.
* Clearly tell users that success must only be selected if everything
works right.
* Clearly tell users to only fill in the rollback options if they did a
rollback.
* Added a thanks page that tells people thanks.
* Added links between the pages.
* Added links to lists with tests of either a specific iso or of any
iso where a specific option was selected.
Signed-off-by: Dan McGee <dan@archlinux.org>
Conflicts:
templates/isotests/results.html
2011-04-28 11:19:42 -07:00
|
|
|
if form.is_valid() and request.POST['website'] == '':
|
2011-04-28 13:04:45 -07:00
|
|
|
test = form.save(commit=False)
|
|
|
|
test.ip_address = request.META.get("REMOTE_ADDR", None)
|
|
|
|
test.save()
|
2011-05-02 09:25:40 -07:00
|
|
|
form.save_m2m()
|
2011-04-28 15:52:16 -07:00
|
|
|
return redirect('releng-test-thanks')
|
2011-03-01 09:47:03 -08:00
|
|
|
else:
|
2011-04-28 11:00:27 -07:00
|
|
|
form = TestForm()
|
2011-03-01 09:47:03 -08:00
|
|
|
|
2011-04-28 11:00:27 -07:00
|
|
|
context = {'form': form}
|
2011-04-28 15:58:13 -07:00
|
|
|
return direct_to_template(request, 'releng/add.html', context)
|
2011-03-01 11:43:37 -08:00
|
|
|
|
2011-05-10 12:38:37 -07:00
|
|
|
def calculate_option_overview(field_name):
|
|
|
|
field = Test._meta.get_field(field_name)
|
|
|
|
model = field.rel.to
|
|
|
|
is_rollback = field_name.startswith('rollback_')
|
2011-04-28 15:44:43 -07:00
|
|
|
option = {
|
|
|
|
'option': model,
|
2012-03-23 18:16:58 -07:00
|
|
|
'field_name': field_name,
|
2011-08-17 18:53:57 -07:00
|
|
|
'name': model._meta.verbose_name,
|
2011-04-28 15:44:43 -07:00
|
|
|
'is_rollback': is_rollback,
|
|
|
|
'values': []
|
|
|
|
}
|
2011-08-17 07:01:07 -07:00
|
|
|
if not is_rollback:
|
|
|
|
successes = dict(model.objects.values_list('pk').filter(
|
|
|
|
test__success=True).annotate(latest=Max('test__iso__id')))
|
|
|
|
failures = dict(model.objects.values_list('pk').filter(
|
|
|
|
test__success=False).annotate(latest=Max('test__iso__id')))
|
|
|
|
else:
|
|
|
|
successes = dict(model.objects.values_list('pk').filter(
|
|
|
|
rollback_test_set__success=True).annotate(
|
|
|
|
latest=Max('rollback_test_set__iso__id')))
|
|
|
|
failures = dict(model.objects.values_list('pk').filter(
|
|
|
|
rollback_test_set__success=False).annotate(
|
|
|
|
latest=Max('rollback_test_set__iso__id')))
|
|
|
|
|
2011-04-28 15:44:43 -07:00
|
|
|
for value in model.objects.all():
|
2011-08-17 07:01:07 -07:00
|
|
|
data = {
|
|
|
|
'value': value,
|
|
|
|
'success': successes.get(value.pk),
|
|
|
|
'failure': failures.get(value.pk),
|
|
|
|
}
|
2011-04-28 15:44:43 -07:00
|
|
|
option['values'].append(data)
|
|
|
|
|
|
|
|
return option
|
|
|
|
|
2011-08-17 07:01:07 -07:00
|
|
|
def options_fetch_iso(options):
|
|
|
|
'''Replaces the Iso PK with a full Iso model object in a list of options
|
|
|
|
used on the overview page. We do it this way to only have to query the Iso
|
|
|
|
table once rather than once per option.'''
|
|
|
|
# collect all necessary Iso PKs
|
|
|
|
all_pks = set()
|
|
|
|
for option in options:
|
|
|
|
all_pks.update(v['success'] for v in option['values'])
|
|
|
|
all_pks.update(v['failure'] for v in option['values'])
|
|
|
|
|
|
|
|
all_pks.discard(None)
|
|
|
|
all_isos = Iso.objects.in_bulk(all_pks)
|
|
|
|
|
|
|
|
for option in options:
|
|
|
|
for value in option['values']:
|
|
|
|
value['success'] = all_isos.get(value['success'])
|
|
|
|
value['failure'] = all_isos.get(value['failure'])
|
|
|
|
|
|
|
|
return options
|
|
|
|
|
2011-04-28 15:44:43 -07:00
|
|
|
def test_results_overview(request):
|
|
|
|
# data structure produced:
|
|
|
|
# [ { option, name, is_rollback, values: [ { value, success, failure } ... ] } ... ]
|
|
|
|
all_options = []
|
2011-05-10 12:38:37 -07:00
|
|
|
fields = [ 'architecture', 'iso_type', 'boot_type', 'hardware_type',
|
|
|
|
'install_type', 'source', 'clock_choice', 'filesystem', 'modules',
|
|
|
|
'bootloader', 'rollback_filesystem', 'rollback_modules' ]
|
|
|
|
for field in fields:
|
|
|
|
all_options.append(calculate_option_overview(field))
|
2011-03-01 11:43:37 -08:00
|
|
|
|
2011-08-17 07:01:07 -07:00
|
|
|
all_options = options_fetch_iso(all_options)
|
|
|
|
|
2011-04-28 11:59:53 -07:00
|
|
|
context = {
|
2011-04-28 15:44:43 -07:00
|
|
|
'options': all_options,
|
2011-04-28 12:46:36 -07:00
|
|
|
'iso_url': settings.ISO_LIST_URL,
|
2011-04-28 11:59:53 -07:00
|
|
|
}
|
2011-04-28 15:58:13 -07:00
|
|
|
return direct_to_template(request, 'releng/results.html', context)
|
isotests: various changes and updates
* isotests/fixtures/clockchoices.json: changed 'default' to 'unchanged'
* isotests/fixtures/filesystems.json: removed 'check the installed
system' line from one of the options
* isotests/fixtures/modules.json: added
'ext2','ext3','ext4','swap','xfs','jfs','reiserFS'
* isotests/models.py:
* Added RollbackOption abstract class that adds the functions
get_rollback_success_test and get_rollback_failed_test on top of
the IsoOption abstract class for use with the Filesystem and
Module classes since Test uses these both in 2 ways (regular and
rollback). This keeps them seperated.
* renamed the related names of these properties from rollback_test
to rollback_test_set (seems more in-tune with the other relations)
* isotests/views.py:
* changed the order of the fields, the automatic order makes no
sense.
* Added help texts to the fields success, filesystem,
rollback_filesystem and rollback_modules.
* Removed help text from modules (made no sense)
* Added a website field, should remain empty, a simplistic way to
hopefully reduce spambot entries.
* templates/isotests/results.html:
* Removed the rollback yes/no section
* The rollback labels should check get_rollback_success_test and
get_rollback_failed_test.
* Rollback checkbox removed.
* Clearly tell users that success must only be selected if everything
works right.
* Clearly tell users to only fill in the rollback options if they did a
rollback.
* Added a thanks page that tells people thanks.
* Added links between the pages.
* Added links to lists with tests of either a specific iso or of any
iso where a specific option was selected.
Signed-off-by: Dan McGee <dan@archlinux.org>
Conflicts:
templates/isotests/results.html
2011-04-28 11:19:42 -07:00
|
|
|
|
2011-04-28 15:44:43 -07:00
|
|
|
def test_results_iso(request, iso_id):
|
|
|
|
iso = get_object_or_404(Iso, pk=iso_id)
|
2011-08-17 06:11:23 -07:00
|
|
|
test_list = iso.test_set.select_related()
|
isotests: various changes and updates
* isotests/fixtures/clockchoices.json: changed 'default' to 'unchanged'
* isotests/fixtures/filesystems.json: removed 'check the installed
system' line from one of the options
* isotests/fixtures/modules.json: added
'ext2','ext3','ext4','swap','xfs','jfs','reiserFS'
* isotests/models.py:
* Added RollbackOption abstract class that adds the functions
get_rollback_success_test and get_rollback_failed_test on top of
the IsoOption abstract class for use with the Filesystem and
Module classes since Test uses these both in 2 ways (regular and
rollback). This keeps them seperated.
* renamed the related names of these properties from rollback_test
to rollback_test_set (seems more in-tune with the other relations)
* isotests/views.py:
* changed the order of the fields, the automatic order makes no
sense.
* Added help texts to the fields success, filesystem,
rollback_filesystem and rollback_modules.
* Removed help text from modules (made no sense)
* Added a website field, should remain empty, a simplistic way to
hopefully reduce spambot entries.
* templates/isotests/results.html:
* Removed the rollback yes/no section
* The rollback labels should check get_rollback_success_test and
get_rollback_failed_test.
* Rollback checkbox removed.
* Clearly tell users that success must only be selected if everything
works right.
* Clearly tell users to only fill in the rollback options if they did a
rollback.
* Added a thanks page that tells people thanks.
* Added links between the pages.
* Added links to lists with tests of either a specific iso or of any
iso where a specific option was selected.
Signed-off-by: Dan McGee <dan@archlinux.org>
Conflicts:
templates/isotests/results.html
2011-04-28 11:19:42 -07:00
|
|
|
context = {
|
|
|
|
'iso_name': iso.name,
|
|
|
|
'test_list': test_list
|
|
|
|
}
|
2011-04-28 15:58:13 -07:00
|
|
|
return direct_to_template(request, 'releng/result_list.html', context)
|
isotests: various changes and updates
* isotests/fixtures/clockchoices.json: changed 'default' to 'unchanged'
* isotests/fixtures/filesystems.json: removed 'check the installed
system' line from one of the options
* isotests/fixtures/modules.json: added
'ext2','ext3','ext4','swap','xfs','jfs','reiserFS'
* isotests/models.py:
* Added RollbackOption abstract class that adds the functions
get_rollback_success_test and get_rollback_failed_test on top of
the IsoOption abstract class for use with the Filesystem and
Module classes since Test uses these both in 2 ways (regular and
rollback). This keeps them seperated.
* renamed the related names of these properties from rollback_test
to rollback_test_set (seems more in-tune with the other relations)
* isotests/views.py:
* changed the order of the fields, the automatic order makes no
sense.
* Added help texts to the fields success, filesystem,
rollback_filesystem and rollback_modules.
* Removed help text from modules (made no sense)
* Added a website field, should remain empty, a simplistic way to
hopefully reduce spambot entries.
* templates/isotests/results.html:
* Removed the rollback yes/no section
* The rollback labels should check get_rollback_success_test and
get_rollback_failed_test.
* Rollback checkbox removed.
* Clearly tell users that success must only be selected if everything
works right.
* Clearly tell users to only fill in the rollback options if they did a
rollback.
* Added a thanks page that tells people thanks.
* Added links between the pages.
* Added links to lists with tests of either a specific iso or of any
iso where a specific option was selected.
Signed-off-by: Dan McGee <dan@archlinux.org>
Conflicts:
templates/isotests/results.html
2011-04-28 11:19:42 -07:00
|
|
|
|
2011-04-28 15:44:43 -07:00
|
|
|
def test_results_for(request, option, value):
|
|
|
|
if option not in Test._meta.get_all_field_names():
|
|
|
|
raise Http404
|
|
|
|
option_model = getattr(Test, option).field.rel.to
|
2011-08-17 18:53:57 -07:00
|
|
|
option_model.verbose_name = option_model._meta.verbose_name
|
2011-04-28 15:44:43 -07:00
|
|
|
real_value = get_object_or_404(option_model, pk=value)
|
2011-08-17 06:11:23 -07:00
|
|
|
test_list = real_value.test_set.select_related().order_by(
|
|
|
|
'-iso__name', '-pk')
|
isotests: various changes and updates
* isotests/fixtures/clockchoices.json: changed 'default' to 'unchanged'
* isotests/fixtures/filesystems.json: removed 'check the installed
system' line from one of the options
* isotests/fixtures/modules.json: added
'ext2','ext3','ext4','swap','xfs','jfs','reiserFS'
* isotests/models.py:
* Added RollbackOption abstract class that adds the functions
get_rollback_success_test and get_rollback_failed_test on top of
the IsoOption abstract class for use with the Filesystem and
Module classes since Test uses these both in 2 ways (regular and
rollback). This keeps them seperated.
* renamed the related names of these properties from rollback_test
to rollback_test_set (seems more in-tune with the other relations)
* isotests/views.py:
* changed the order of the fields, the automatic order makes no
sense.
* Added help texts to the fields success, filesystem,
rollback_filesystem and rollback_modules.
* Removed help text from modules (made no sense)
* Added a website field, should remain empty, a simplistic way to
hopefully reduce spambot entries.
* templates/isotests/results.html:
* Removed the rollback yes/no section
* The rollback labels should check get_rollback_success_test and
get_rollback_failed_test.
* Rollback checkbox removed.
* Clearly tell users that success must only be selected if everything
works right.
* Clearly tell users to only fill in the rollback options if they did a
rollback.
* Added a thanks page that tells people thanks.
* Added links between the pages.
* Added links to lists with tests of either a specific iso or of any
iso where a specific option was selected.
Signed-off-by: Dan McGee <dan@archlinux.org>
Conflicts:
templates/isotests/results.html
2011-04-28 11:19:42 -07:00
|
|
|
context = {
|
2011-08-17 18:53:57 -07:00
|
|
|
'option': option_model,
|
2011-04-28 15:44:43 -07:00
|
|
|
'value': real_value,
|
|
|
|
'value_id': value,
|
isotests: various changes and updates
* isotests/fixtures/clockchoices.json: changed 'default' to 'unchanged'
* isotests/fixtures/filesystems.json: removed 'check the installed
system' line from one of the options
* isotests/fixtures/modules.json: added
'ext2','ext3','ext4','swap','xfs','jfs','reiserFS'
* isotests/models.py:
* Added RollbackOption abstract class that adds the functions
get_rollback_success_test and get_rollback_failed_test on top of
the IsoOption abstract class for use with the Filesystem and
Module classes since Test uses these both in 2 ways (regular and
rollback). This keeps them seperated.
* renamed the related names of these properties from rollback_test
to rollback_test_set (seems more in-tune with the other relations)
* isotests/views.py:
* changed the order of the fields, the automatic order makes no
sense.
* Added help texts to the fields success, filesystem,
rollback_filesystem and rollback_modules.
* Removed help text from modules (made no sense)
* Added a website field, should remain empty, a simplistic way to
hopefully reduce spambot entries.
* templates/isotests/results.html:
* Removed the rollback yes/no section
* The rollback labels should check get_rollback_success_test and
get_rollback_failed_test.
* Rollback checkbox removed.
* Clearly tell users that success must only be selected if everything
works right.
* Clearly tell users to only fill in the rollback options if they did a
rollback.
* Added a thanks page that tells people thanks.
* Added links between the pages.
* Added links to lists with tests of either a specific iso or of any
iso where a specific option was selected.
Signed-off-by: Dan McGee <dan@archlinux.org>
Conflicts:
templates/isotests/results.html
2011-04-28 11:19:42 -07:00
|
|
|
'test_list': test_list
|
|
|
|
}
|
2011-04-28 15:58:13 -07:00
|
|
|
return direct_to_template(request, 'releng/result_list.html', context)
|
isotests: various changes and updates
* isotests/fixtures/clockchoices.json: changed 'default' to 'unchanged'
* isotests/fixtures/filesystems.json: removed 'check the installed
system' line from one of the options
* isotests/fixtures/modules.json: added
'ext2','ext3','ext4','swap','xfs','jfs','reiserFS'
* isotests/models.py:
* Added RollbackOption abstract class that adds the functions
get_rollback_success_test and get_rollback_failed_test on top of
the IsoOption abstract class for use with the Filesystem and
Module classes since Test uses these both in 2 ways (regular and
rollback). This keeps them seperated.
* renamed the related names of these properties from rollback_test
to rollback_test_set (seems more in-tune with the other relations)
* isotests/views.py:
* changed the order of the fields, the automatic order makes no
sense.
* Added help texts to the fields success, filesystem,
rollback_filesystem and rollback_modules.
* Removed help text from modules (made no sense)
* Added a website field, should remain empty, a simplistic way to
hopefully reduce spambot entries.
* templates/isotests/results.html:
* Removed the rollback yes/no section
* The rollback labels should check get_rollback_success_test and
get_rollback_failed_test.
* Rollback checkbox removed.
* Clearly tell users that success must only be selected if everything
works right.
* Clearly tell users to only fill in the rollback options if they did a
rollback.
* Added a thanks page that tells people thanks.
* Added links between the pages.
* Added links to lists with tests of either a specific iso or of any
iso where a specific option was selected.
Signed-off-by: Dan McGee <dan@archlinux.org>
Conflicts:
templates/isotests/results.html
2011-04-28 11:19:42 -07:00
|
|
|
|
2011-04-28 15:44:43 -07:00
|
|
|
def submit_test_thanks(request):
|
2011-04-28 15:58:13 -07:00
|
|
|
return direct_to_template(request, "releng/thanks.html", None)
|
2011-04-28 10:43:01 -07:00
|
|
|
|
2011-08-16 16:26:23 -07:00
|
|
|
def iso_overview(request):
|
|
|
|
isos = Iso.objects.all().order_by('-pk')
|
2012-04-17 13:36:33 -07:00
|
|
|
successes = dict(Iso.objects.values_list('pk').filter(
|
|
|
|
test__success=True).annotate(ct=Count('test')))
|
|
|
|
failures = dict(Iso.objects.values_list('pk').filter(
|
|
|
|
test__success=False).annotate(ct=Count('test')))
|
2011-08-16 16:26:23 -07:00
|
|
|
for iso in isos:
|
|
|
|
iso.successes = successes.get(iso.pk, 0)
|
|
|
|
iso.failures = failures.get(iso.pk, 0)
|
|
|
|
|
2012-04-17 13:36:33 -07:00
|
|
|
# only show "useful" rows, currently active ISOs or those with results
|
|
|
|
isos = [iso for iso in isos if
|
|
|
|
iso.active == True or iso.successes > 0 or iso.failures > 0]
|
|
|
|
|
2011-08-16 16:26:23 -07:00
|
|
|
context = {
|
|
|
|
'isos': isos
|
|
|
|
}
|
|
|
|
return direct_to_template(request, 'releng/iso_overview.html', context)
|
|
|
|
|
2011-04-28 10:43:01 -07:00
|
|
|
# vim: set ts=4 sw=4 et:
|