board_status/to-wiki: Fix background color of very recent test results

Test results under 16 days old display with an incorrect background color
due to the leading zero not being preset in the associated HTML color code.

Add the leading zero where needed to generate a valid HTML color code.

Change-Id: I0dfe29ec1afc409a4908073922ac31a4091f0f1f
Signed-off-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
Reviewed-on: https://review.coreboot.org/14514
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
Timothy Pearson 2016-04-25 13:33:06 -05:00
parent 698366654c
commit c410b18337
1 changed files with 3 additions and 0 deletions

View File

@ -427,6 +427,9 @@ EOF
fi
fi
lastgood_diff_hex=$(echo "obase=16; $lastgood_diff" | bc)
if [ "$lastgood_diff" -lt 16 ]; then
lastgood_diff_hex="0${lastgood_diff_hex}"
fi
cell_bgcolor="#${lastgood_diff_hex}ff00"
echo "| style=\"background:${cell_bgcolor}\" | [[#$vendor/$board|$lastgood]]"
fi