summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2016-05-14 19:25:51 +0200
committerHolger Levsen <holger@layer-acht.org>2016-05-14 19:25:51 +0200
commit7871b3fb126d13cacc4d0c91844f0e5846cb0357 (patch)
tree64928ff67c60ec33a3bab68c355b6b269463198a
parentef3d7489cd2705de1ff9509f4ba116f43375578a (diff)
downloadjenkins.debian.net-7871b3fb126d13cacc4d0c91844f0e5846cb0357.tar.xz
reproducible debian: mark active page in navigation (misses the .py part)
-rwxr-xr-xbin/reproducible_common.sh25
-rwxr-xr-xbin/reproducible_html_dashboard.sh4
-rwxr-xr-xbin/reproducible_html_pkg_sets.sh13
-rw-r--r--userContent/reproducible/static/style.css6
4 files changed, 38 insertions, 10 deletions
diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh
index 57fb10ba..695fef90 100755
--- a/bin/reproducible_common.sh
+++ b/bin/reproducible_common.sh
@@ -214,7 +214,9 @@ write_page_header() {
fi
write_page "<ul class=\"menu\">"
write_page "<li>$SUITE/$ARCH:<ul class=\"children\">"
+ local CLASS=""
for TARGET in $ALLVIEWS ; do
+ CLASS=""
if [ "$TARGET" = "pkg_sets" ] && [ "$SUITE" = "experimental" ] ; then
# no pkg_sets are tested in experimental
continue
@@ -246,20 +248,33 @@ write_page_header() {
elif [ "$TARGET" = "arch" ] ; then
write_page "<li>Architectures:<ul class=\"children\"><li>"
for i in ${ARCHS} ; do
- write_page " <a href=\"/$SUITE/index_suite_${i}_stats.html\">$i</a>"
+ if [ "$1" = "suite_arch_stats" ] && [ "$i" = "$ARCH" ] ; then
+ CLASS=" class=\"active\""
+ fi
+ write_page " <a href=\"/$SUITE/index_suite_${i}_stats.html\"$CLASS>$i</a>"
+ CLASS=""
done
write_page "</li>"
elif [ "$TARGET" = "suite_stats" ] ; then
write_page "<li>Suites:<ul class=\"children\"><li>"
for i in $SUITES ; do
- write_page " <a href=\"/$i/index_suite_${ARCH}_stats.html\">$i</a>"
+ if [ "$1" = "suite_arch_stats" ] && [ "$i" = "$SUITE" ] ; then
+ CLASS=" class=\"active\""
+ fi
+ write_page " <a href=\"/$i/index_suite_${ARCH}_stats.html\"$CLASS>$i</a>"
+ CLASS=""
done
write_page "</li>"
elif [ "$TARGET" = "dashboard" ] ; then
- write_page "<li><a href=\"$BASEURL/index_${TARGET}.html\">${SPOKEN_TARGET}</a><ul class=\"children\">"
+ if [ "$1" = "dashboard" ] ; then
+ CLASS=" class=\"active\""
+ fi
+ write_page "<li><a href=\"$BASEURL/index_${TARGET}.html\"$CLASS>${SPOKEN_TARGET}</a><ul class=\"children\">"
else
- # finally, write link
- write_page "<li><a href=\"$BASEURL/index_${TARGET}.html\">${SPOKEN_TARGET}</a></li>"
+ if [ "$1" = "$TARGET" ] ; then
+ CLASS=" class=\"active\""
+ fi
+ write_page "<li><a href=\"$BASEURL/index_${TARGET}.html\"$CLASS>${SPOKEN_TARGET}</a></li>"
fi
# close unsorted lists (and package states loop)
if [ "$TARGET" = "all_abc" ] ; then
diff --git a/bin/reproducible_html_dashboard.sh b/bin/reproducible_html_dashboard.sh
index 6a7b01e8..b0b0768a 100755
--- a/bin/reproducible_html_dashboard.sh
+++ b/bin/reproducible_html_dashboard.sh
@@ -373,8 +373,8 @@ write_suite_arch_table() {
# create suite stats page
#
create_suite_arch_stats_page() {
- VIEW=suite_${ARCH}_stats
- PAGE=index_${VIEW}.html
+ VIEW=suite_arch_stats
+ PAGE=index_suite_${ARCH}_stats.html
MAINLABEL[0]="Reproducibility status for packages in '$SUITE' for '$ARCH'"
MAINLABEL[2]="Age in days of oldest reproducible build result in '$SUITE' for '$ARCH'"
echo "$(date -u) - starting to write $PAGE page."
diff --git a/bin/reproducible_html_pkg_sets.sh b/bin/reproducible_html_pkg_sets.sh
index 1b246d6c..8a245476 100755
--- a/bin/reproducible_html_pkg_sets.sh
+++ b/bin/reproducible_html_pkg_sets.sh
@@ -90,6 +90,8 @@ update_meta_pkg_stats() {
#
create_pkg_sets_navigation() {
local i
+ local view=$1
+ local CLASS=""
write_page "<ul><li>Tracked package sets in $SUITE/$ARCH: </li>"
write_page "<br />"
for i in $(seq 1 ${#META_PKGSET[@]}) ; do
@@ -98,11 +100,16 @@ create_pkg_sets_navigation() {
;;
*) ;;
esac
+ if [ "$i" = "$view" ] ; then
+ CLASS=" class=\"active\""
+ else
+ CLASS=""
+ fi
if [ -f $BASE/$SUITE/$ARCH/${TABLE[6]}_${META_PKGSET[$i]}.png ] ; then
THUMB="${TABLE[6]}_${META_PKGSET[$i]}-thumbnail.png"
LABEL="Reproducibility status for packages in $SUITE/$ARCH from '${META_PKGSET[$i]}'"
write_page "<li>"
- write_page "<a href=\"/$SUITE/$ARCH/pkg_set_${META_PKGSET[$i]}.html\">${META_PKGSET[$i]}</a>"
+ write_page "<a href=\"/$SUITE/$ARCH/pkg_set_${META_PKGSET[$i]}.html\"$CLASS>${META_PKGSET[$i]}</a>"
write_page "<a href=\"/$SUITE/$ARCH/pkg_set_${META_PKGSET[$i]}.html\"><img src=\"/userContent/$SUITE/$ARCH/$THUMB\" class=\"setview\" alt=\"$LABEL\" title=\"${META_PKGSET[$i]}\" name=\"${META_PKGSET[$i]}\"></a>"
write_page "</li>"
fi
@@ -121,7 +128,7 @@ create_pkg_sets_pages() {
PAGE=index_${VIEW}.html
echo "$(date -u) - starting to write $PAGE page."
write_page_header $VIEW "Overview about reproducible builds of specific package sets in $SUITE/$ARCH"
- create_pkg_sets_navigation
+ create_pkg_sets_navigation index
write_page_footer
publish_page $SUITE/$ARCH
#
@@ -132,7 +139,7 @@ create_pkg_sets_pages() {
PAGE="pkg_set_${META_PKGSET[$i]}.html"
echo "$(date -u) - starting to write $PAGE page."
write_page_header $VIEW "Overview about reproducible builds for the ${META_PKGSET[$i]} package set in $SUITE/$ARCH"
- create_pkg_sets_navigation
+ create_pkg_sets_navigation $i
write_page "<hr />"
META_RESULT=true
gather_meta_stats $i
diff --git a/userContent/reproducible/static/style.css b/userContent/reproducible/static/style.css
index 4d882d1a..e2e0f3b2 100644
--- a/userContent/reproducible/static/style.css
+++ b/userContent/reproducible/static/style.css
@@ -116,6 +116,7 @@ ul.menu {
background-color: #bfeaff;
}
+
ul.reproducible-links {
margin-top: 1em;
border-top: 1px solid #eee;
@@ -165,6 +166,11 @@ ul li {
display: inline-block;
}
+.active {
+ background-color: #bfeaff;
+}
+
+
h1 {
font-size : 250%;
padding: 0;