board_status/to-wiki: Indicate age of test results by background color
A major issue with the board-status Wiki page is that it shows all test results equally regardless of age. As a test result ages it becomes more likely that the board no longer works peroperly under coreboot due to code churn. Visually indicate board-test status "at a glance" by smoothly fading the background color of the test result from green to yellow as the test result ages. This patch sets the full yellow transition to 255 days after test for programming convenience, however the number of days required to fully "stale" a test result could be modified relatively easily. Change-Id: I5a076a6cc17d53fda8e4681e38074fc1f46c0e12 Signed-off-by: Timothy Pearson <tpearson@raptorengineeringinc.com> Reviewed-on: https://review.coreboot.org/14457 Reviewed-by: Vladimir Serbinenko <phcoder@gmail.com> Tested-by: build bot (Jenkins)
This commit is contained in:
parent
3383a25f91
commit
7501b6c285
|
@ -412,7 +412,23 @@ EOF
|
||||||
if [ -z "$lastgood" ]; then
|
if [ -z "$lastgood" ]; then
|
||||||
echo "| style=\"background:red\" | Unknown"
|
echo "| style=\"background:red\" | Unknown"
|
||||||
else
|
else
|
||||||
echo "| style=\"background:lime\" | [[#$vendor/$board|$lastgood]]"
|
lastgood_diff=0
|
||||||
|
lastgood_ts=$(date -d "$lastgood" "+%s")
|
||||||
|
if [ "$lastgood_ts" != "" ]; then
|
||||||
|
current_ts=$(date "+%s")
|
||||||
|
if [ "$lastgood_ts" -lt "$current_ts" ]; then
|
||||||
|
lastgood_diff=$(( current_ts - lastgood_ts ))
|
||||||
|
# Convert seconds to days
|
||||||
|
lastgood_diff=$(( lastgood_diff / 86400 ))
|
||||||
|
# Set maximum age at 255 days for convenience of code
|
||||||
|
if [ $lastgood_diff -gt 255 ]; then
|
||||||
|
lastgood_diff=255
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
lastgood_diff_hex=$(echo "obase=16; $lastgood_diff" | bc)
|
||||||
|
cell_bgcolor="#${lastgood_diff_hex}ff00"
|
||||||
|
echo "| style=\"background:${cell_bgcolor}\" | [[#$vendor/$board|$lastgood]]"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "| $northbridge_nice"
|
echo "| $northbridge_nice"
|
||||||
|
|
Loading…
Reference in New Issue