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)
|
||||
|
||||
# Post disk results
|
||||
for disk in state.disks:
|
||||
state.ost.post_device_results(disk, state.ticket_id)
|
||||
if not state.ost.disabled:
|
||||
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
|
||||
all_disks_passed = True
|
||||
disk_failures = False
|
||||
for disk in state.disks:
|
||||
if disk.checkbox is None:
|
||||
# Aborted/Unknown/etc
|
||||
all_disks_passed = False
|
||||
else:
|
||||
all_disks_passed &= disk.checkbox
|
||||
disk_failures |= not disk.checkbox
|
||||
# Check if disk checkbox needs updating
|
||||
all_disks_passed = True
|
||||
disk_failures = False
|
||||
for disk in state.disks:
|
||||
if disk.checkbox is None:
|
||||
# Aborted/Unknown/etc
|
||||
all_disks_passed = False
|
||||
else:
|
||||
all_disks_passed &= disk.checkbox
|
||||
disk_failures |= not disk.checkbox
|
||||
|
||||
# Update checkbox if necessary
|
||||
if disk_failures:
|
||||
state.ost.set_disk_failed(state.ticket_id)
|
||||
elif all_disks_passed:
|
||||
state.ost.set_disk_passed(state.ticket_id)
|
||||
# Update checkbox if necessary
|
||||
if disk_failures:
|
||||
state.ost.set_disk_failed(state.ticket_id)
|
||||
elif all_disks_passed:
|
||||
state.ost.set_disk_passed(state.ticket_id)
|
||||
|
||||
# Spacer
|
||||
print_standard(' ')
|
||||
|
||||
# Check for osTicket errors
|
||||
if state.ost.errors:
|
||||
|
|
|
|||
Loading…
Reference in a new issue