Added posting results line to results screen
This commit is contained in:
parent
41b8d632ae
commit
1d9c3b1869
1 changed files with 22 additions and 17 deletions
|
|
@ -1034,25 +1034,30 @@ def run_hw_tests(state):
|
||||||
show_results(state)
|
show_results(state)
|
||||||
|
|
||||||
# Post disk results
|
# Post disk results
|
||||||
for disk in state.disks:
|
if not state.ost.disabled:
|
||||||
state.ost.post_device_results(disk, state.ticket_id)
|
print_standard('Posting results to osTicket...')
|
||||||
|
for disk in state.disks:
|
||||||
|
state.ost.post_device_results(disk, state.ticket_id)
|
||||||
|
|
||||||
# Check if disk checkbox needs updating
|
# Check if disk checkbox needs updating
|
||||||
all_disks_passed = True
|
all_disks_passed = True
|
||||||
disk_failures = False
|
disk_failures = False
|
||||||
for disk in state.disks:
|
for disk in state.disks:
|
||||||
if disk.checkbox is None:
|
if disk.checkbox is None:
|
||||||
# Aborted/Unknown/etc
|
# Aborted/Unknown/etc
|
||||||
all_disks_passed = False
|
all_disks_passed = False
|
||||||
else:
|
else:
|
||||||
all_disks_passed &= disk.checkbox
|
all_disks_passed &= disk.checkbox
|
||||||
disk_failures |= not disk.checkbox
|
disk_failures |= not disk.checkbox
|
||||||
|
|
||||||
# Update checkbox if necessary
|
# Update checkbox if necessary
|
||||||
if disk_failures:
|
if disk_failures:
|
||||||
state.ost.set_disk_failed(state.ticket_id)
|
state.ost.set_disk_failed(state.ticket_id)
|
||||||
elif all_disks_passed:
|
elif all_disks_passed:
|
||||||
state.ost.set_disk_passed(state.ticket_id)
|
state.ost.set_disk_passed(state.ticket_id)
|
||||||
|
|
||||||
|
# Spacer
|
||||||
|
print_standard(' ')
|
||||||
|
|
||||||
# Check for osTicket errors
|
# Check for osTicket errors
|
||||||
if state.ost.errors:
|
if state.ost.errors:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue