From 20e40dd99e8fdd317eae4383a9f66667aece77c6 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Wed, 8 Oct 2014 18:11:56 +0200 Subject: reproducible: display nice status icon in package view --- bin/reproducible_stats.sh | 29 +++++++++++++++++++---- userContent/static/error.png | Bin 925 -> 653 bytes userContent/static/weather-clear.png | Bin 952 -> 682 bytes userContent/static/weather-few-clouds-night.png | Bin 1211 -> 965 bytes userContent/static/weather-severe-alert.png | Bin 1537 -> 977 bytes userContent/static/weather-showers-scattered.png | Bin 1667 -> 1045 bytes userContent/static/weather-showers.png | Bin 1528 -> 959 bytes userContent/static/weather-storm.png | Bin 1593 -> 1031 bytes 8 files changed, 24 insertions(+), 5 deletions(-) diff --git a/bin/reproducible_stats.sh b/bin/reproducible_stats.sh index b30bfa2b..4ad224e9 100755 --- a/bin/reproducible_stats.sh +++ b/bin/reproducible_stats.sh @@ -88,9 +88,27 @@ EOF init_navi_frame() { echo "" > $NAVI echo "" >> $NAVI - echo "
$1 " >> $NAVI - echo "($2) " >> $NAVI - echo "at $3: " >> $NAVI + echo "
$1 $2" >> $NAVI + # icons taken from tango-icon-theme (0.8.90-5) + # licenced under http://creativecommons.org/licenses/publicdomain/ + case $3 in + reproducible) ICON=weather-clear.png + ;; + unreproducible) if [ "$5" != "" ] ; then + ICON=weather-showers-scattered.png + else + ICON=weather-showers.png + fi + ;; + FTBFS) ICON=weather-storm.png + ;; + 404) ICON=weather-severe-alert.png + ;; + "not for us") ICON=weather-few-clouds-night.png + ;; + esac + echo " $3" >> $NAVI + echo "at $4: " >> $NAVI } append2navi_frame() { @@ -103,9 +121,10 @@ finish_navi_frame() { process_packages() { for PKG in $@ ; do - RESULT=$(sqlite3 -init $INIT $PACKAGES_DB "SELECT build_date,version FROM source_packages WHERE name = \"$PKG\"") + RESULT=$(sqlite3 -init $INIT $PACKAGES_DB "SELECT build_date,version,status FROM source_packages WHERE name = \"$PKG\"") BUILD_DATE=$(echo $RESULT|cut -d "|" -f1) VERSION=$(echo $RESULT|cut -d "|" -f2) + STATUS=$(echo $RESULT|cut -d "|" -f3) # remove epoch EVERSION=$(echo $VERSION | cut -d ":" -f2) if $BUILDINFO_SIGNS && [ -f "/var/lib/jenkins/userContent/buildinfo/${PKG}_${EVERSION}_amd64.buildinfo" ] ; then @@ -116,7 +135,7 @@ process_packages() { FILE=$(find $(dirname $NAVI) -name $(basename $NAVI) ! -newermt "$BUILD_DATE" 2>/dev/null || true) if [ ! -f $NAVI ] || [ "$FILE" != "" ] ; then MAINLINK="" - init_navi_frame "$PKG" "$VERSION" "$BUILD_DATE" + init_navi_frame "$PKG" "$VERSION" "$STATUS" "$BUILD_DATE" "${STAR[$PKG]}" if [ -f "/var/lib/jenkins/userContent/buildinfo/${PKG}_${EVERSION}_amd64.buildinfo" ] ; then append2navi_frame " buildinfo " MAINLINK="$JENKINS_URL/userContent/buildinfo/${PKG}_${EVERSION}_amd64.buildinfo" diff --git a/userContent/static/error.png b/userContent/static/error.png index 7d6aaf6f..3bbbb4a0 100644 Binary files a/userContent/static/error.png and b/userContent/static/error.png differ diff --git a/userContent/static/weather-clear.png b/userContent/static/weather-clear.png index e17ca7ce..7dc15ea9 100644 Binary files a/userContent/static/weather-clear.png and b/userContent/static/weather-clear.png differ diff --git a/userContent/static/weather-few-clouds-night.png b/userContent/static/weather-few-clouds-night.png index 69fe49ad..d69efec9 100644 Binary files a/userContent/static/weather-few-clouds-night.png and b/userContent/static/weather-few-clouds-night.png differ diff --git a/userContent/static/weather-severe-alert.png b/userContent/static/weather-severe-alert.png index e4d09b6e..98e9f6c1 100644 Binary files a/userContent/static/weather-severe-alert.png and b/userContent/static/weather-severe-alert.png differ diff --git a/userContent/static/weather-showers-scattered.png b/userContent/static/weather-showers-scattered.png index 9eddd93d..8d10d844 100644 Binary files a/userContent/static/weather-showers-scattered.png and b/userContent/static/weather-showers-scattered.png differ diff --git a/userContent/static/weather-showers.png b/userContent/static/weather-showers.png index 4450fb1f..d9685d24 100644 Binary files a/userContent/static/weather-showers.png and b/userContent/static/weather-showers.png differ diff --git a/userContent/static/weather-storm.png b/userContent/static/weather-storm.png index 3b7ca9ce..feebe1d4 100644 Binary files a/userContent/static/weather-storm.png and b/userContent/static/weather-storm.png differ -- cgit v1.2.3-70-g09d2