# HG changeset patch # User Aleksej Bobylev # Date 1528288295 -10800 # Node ID 7e99c6e7eb42d40164044b95ef1862a6176af12d # Parent 96814879ba1b096b4f06ec49afba4af516f7574a lighttpd/index.cgi: rework this one more time; show parts immediately (this is fast), then request and update only webstat part diff -r 96814879ba1b -r 7e99c6e7eb42 lighttpd/index.cgi --- a/lighttpd/index.cgi Wed Jun 06 13:39:19 2018 +0300 +++ b/lighttpd/index.cgi Wed Jun 06 15:31:35 2018 +0300 @@ -876,20 +876,7 @@ # Generate part of the main page part() { - if [ -z "$nojs" ]; then - case $1 in - webstat) - echo -n "
" - # Show previous webstat, it will be updated seamless then - nojs=1; part webstat noupdate; unset nojs - echo "
" - ;; - *) - echo "
" - ;; - esac - return - fi + echo -n "
" case $1 in summary) @@ -916,7 +903,7 @@ ;; webstat) # Do we need to update the statistics? - if [ -z "$2" -a "$activity" -nt "$webstat" ]; then update_webstat; fi + if [ -n "$nojs" -a "$activity" -nt "$webstat" ]; then update_webstat; fi . $webstat pct=0; [ "$rtotal" -gt 0 ] && pct=$(( ($rcooked * 100) / $rtotal )) @@ -931,6 +918,7 @@ Packages$ptotal$pcooked$punbuilt$pblocked$pbroken EOT + if [ -z "$nojs" ]; then echo ""; fi ;; activity) tac $activity | head -n12 | sed 's|cooker.cgi?pkg=||; @@ -993,6 +981,7 @@ fi ;; esac + echo "
" } @@ -1128,6 +1117,7 @@ EOT + unset nojs part summary part webstat