# HG changeset patch # User Antoine Bodin # Date 1331594659 -3600 # Node ID b571aa2a37b0aad7a31ec9dd2d69486e72f2ad73 # Parent a49102a73eff961b201d959e717e181a1964abd3 Lighten libtaz report html logs diff -r a49102a73eff -r b571aa2a37b0 libtaz/libtaz-modules/report --- a/libtaz/libtaz-modules/report Sun Mar 11 13:07:55 2012 +0000 +++ b/libtaz/libtaz-modules/report Tue Mar 13 00:24:19 2012 +0100 @@ -22,19 +22,10 @@ report_create_html() { - if ! [ -f "$log_opt" ]; then - mkdir -p "${log_opt%/*}" - cp /usr/share/slitaz/web/template.html "$log_opt" - sed -e "s/xml:lang=\"us\" lang=\"us\"/xml:lang=\"${LANG%%_*}\" lang=\"${LANG%%_*}\"/" \ - -e "s~Title of the page~SliTaz GNU/Linux - Log: $0~" \ - -e "s~Second Title~Log: $0~" -i "$log_opt" - echo '
' >> "$log_opt" - else - sed 's~
~~' -i "$log_opt" - fi + mkdir -p "${log_opt%/*}" + echo '
' >> "$log_opt" - echo -e "

$(basename "$log_command")

\n$(date)" >> "$log_opt" - [ -L "${log_opt%/*}/web" ] || ln -s /usr/share/slitaz/web "${log_opt%/*}/web" + echo -e "$(basename "$log_command")\n$(date)" >> "$log_opt" } report_start() @@ -154,14 +145,13 @@ touch $log_tmp.eob fi else - [ "$log_opt" ] && echo '
' >> "$log_opt" + [ "$log_opt" ] && echo '' >> "$log_opt" exec 3>&- 4>&- rm -f $log_tmp* unset report_pid log_opt # Stop debugging [ "$debug_opt" ] && set +vx - [ "$report_log_all" ] && create_log_index fi } @@ -211,7 +201,7 @@ message) shift echo -e "${current_bloc_display}$@" - report_message=$(echo "$@" | sed "s~$~
~g") + report_message="$@" [ "$log_opt" ] && echo -e "
$report_message
" >> "$log_opt" ;; step) @@ -219,7 +209,7 @@ [ "$open_bloc" ] && report_open_bloc [ "$step_running" ] && report_step_status echo -ne "$current_bloc_display$2\\033[70G[ \\033[1;32mR\\033[33mU\\033[31mN\\033[0;39m ]" >&3 - [ "$log_opt" ] && echo -e "
\n$2" >> "$log_opt" + [ "$log_opt" ] && echo -e "
\n$2" >> "$log_opt" export step_running="$2" report_listen ;; @@ -274,7 +264,7 @@ end-sublog) [ "$log_opt" ] || continue export log_list="${log_list#* }" - echo '
' >> "$log_opt" + echo '
' >> "$log_opt" # Grep the summary of sublog (main action + status) and put # it in the main log, plus a link. [ "$log_list" ] && { sed -n '/
/,$p' $log_opt | \ @@ -371,7 +361,7 @@ report_term_to_html() { - report_decolorize | sed -e 's~<~\<~' -e 's~>~\>~' -e 's/$/
/' -e 's~STDERR: \(.*\)~\1<\/span>~' -e 's~ ~\ \ \ \ ~' + report_decolorize | sed -e 's~<~\<~' -e 's~>~\>~' -e 's~STDERR: \(.*\)~\1<\/span>~' -e 's~ ~\ \ \ \ ~' } report_decolorize() @@ -411,20 +401,3 @@ done } -create_log_index() -{ - cd $SLITAZ_LOG - cp -f /usr/share/slitaz/web/template.html index.html - sed -e "s/xml:lang=\"us\" lang=\"us\"/xml:lang=\"${LANG%%_*}\" lang=\"${LANG%%_*}\"/" \ - -e "s~Title of the page~SliTaz GNU/Linux - Logs Index~" \ - -e "s~Second Title~Logs Index~" -i index.html - echo '
' >> index.html - for log in $(ls -t */*); do - log_title=$(grep '

.*

' $log | sed 's~

\(.*\)

~\1~') - log_date=$(date -r $log) - log_status=$(grep '
' $log | sed -e 1!d -e 's~<.*"\(.*\)">~\1~') - echo -e "
$log_date: $log_title
" >> index.html - done - echo -e '
' >> index.html - chmod 666 index.html -} diff -r a49102a73eff -r b571aa2a37b0 libtaz/web/favicon.ico Binary file libtaz/web/favicon.ico has changed diff -r a49102a73eff -r b571aa2a37b0 libtaz/web/header-img.png Binary file libtaz/web/header-img.png has changed diff -r a49102a73eff -r b571aa2a37b0 libtaz/web/logo.png Binary file libtaz/web/logo.png has changed diff -r a49102a73eff -r b571aa2a37b0 libtaz/web/slitaz.css --- a/libtaz/web/slitaz.css Sun Mar 11 13:07:55 2012 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,545 +0,0 @@ -/* - CSS style for SliTaz Network - (c) 2012 SliTaz GNU/Linux -*/ - -html { - min-height: 102%; -} - -body { - background: #ffffff; - color: black; - font: 13px sans-serif, vernada, arial; - margin: 0; - border-top: 34px solid #f1f1f1; -} -a { text-decoration: underline; color: #103a5e; } -a:hover { text-decoration: none; color: blue; } -img { border: 0pt none; } - -/* Accessibility */ - -#access { - position: absolute; - top: 4px; - right: 0px; - text-align: right; - width: auto; - margin: 0; - padding: 4px 4px 4px 20px; - font-size: 11px; - font-weight: bold; -} - -#access a { - background: transparent; - color: #0F314E; - text-decoration: none; -} -#access a:hover { color: #b64b22; } -#access img { vertical-align: middle; } - -/* Header */ - -#header { - background: #351a0a url(header-img.png) no-repeat top right; - color: black; - width: 100%; - height: 42px; - border-top: 1px solid black; - border-bottom: 1px solid #999; - margin-bottom: 33px; -} - -#titre { - position: absolute; - font-size: 14px; - font-weight: bolder ; - left: 180px; - top: 4px; -} - -#logo { - position: absolute; - float: left; - left: 16px; - top: -10px; - width: 200px; - height: 74px; -} - -/* Side bar */ - -#nav { - position: absolute; - top: 102px; - right: 80px; - color: #555555; - float: right; - width: 250px; - line-height: 1.5em; - text-align: left; - font-size: 12px; -} - -#nav h4 { - font-size: 120%; - color: #666666; - font-weight: bold; - margin: 0; - padding: 0 0 1px 0; - border-bottom: 1px solid #cecece; -} - -#nav a { - color: #0F314E; - background: inherit; - display: block; - text-decoration: none; - font-weight: bold; -} - -#nav a:hover { - color: #b64b22; - text-decoration: none; - display: block; -} - -#nav .nav_box ul { - list-style-type: none; - margin: 0; - padding: 10px 24px 10px 0px; - background-color: inherit; -} - -#nav li { display: inline; } - -#nav ul { - -moz-border-radius: 8px; - -webkit-border-radius: 8px; - border-radius: 8px; - list-style-type: none; - margin: 10px 0; - padding: 10px 24px 10px 24px; - background-color: #eaeaea; -} - -.nav_box { - margin: 10px 0; - padding: 10px 24px 10px 24px; - background-color: #eaeaea; - text-align: justify; -} - -#nav .nav_box p { line-height: 1.3em; } - -#nav .nav_box p a { - display: inline; - font-weight: normal; - text-decoration: underline; -} - -#nav .nav_box p a:hover { - text-decoration: none; - color: blue; - background: inherit; -} - -/* Page content */ - -#content, #content-full { - background: white; - color: black; - text-align: justify; - height: auto; - margin: 6px 320px 0px 0px; - padding: 0px 40px 60px 80px; -} -#content-full { - margin: 0; - padding: 0px 80px 40px 80px; -} -#content li, #content-full li { - line-height: 1.5em; - text-align: left; -} -#news li { - list-style-type: square; - border-bottom: 1px dotted #BEBEBE; - margin-left: -25px; - padding: 4px 0px 4px 0px; -} -#news a { text-decoration: none; } - -/* Box and block. */ - -.infobox { - margin: 20px 60px; - padding: 12px; - background: #f8f8f8; -} -.infobox img { vertical-align: middle; } -.infobox:hover { background-color: #FBFBFB; } -.block { - /*padding-bottom: 35%;*/ - color: black; - min-height: 200px; - margin-bottom: 40px; -} -.block ul { - list-style-type: none; - margin: 0; - padding: 0 20px; -} -.block_left { - width: 46%; - float: left; - background-color: #eaeaea; - margin: 4px 2px; - padding: 0 10px 10px 10px; -} -.block_right { - width: 46%; - float: right; - background-color: #eaeaea; - margin: 4px 2px; - padding: 0 10px 10px 10px; -} -#block_top { - color: black; - background-color: #eaeaea; - min-height: 180px; - margin-bottom: 40px; - margin-right: 340px; - padding: 0 10px; -} -#block_nav { - width: 300px; - min-height: 180px; - float: right; - background-color: #eaeaea; - margin: 0; - padding: 0 10px; -} -.nav_box, .infobox, .block_left, .block_right, #block_top, -#block_nav, #footer { - -moz-border-radius: 8px; - -webkit-border-radius: 8px; - border-radius: 8px; - -moz-box-shadow: 0 1px 3px #666; - -webkit-box-shadow: 0 1px 3px #666; - box-shadow: 0 1px 3px #666; - /* CSS3 transition */ - -webkit-transition-property: background-color; - -webkit-transition-duration: 2s; - -moz-transition-property: background-color; - -moz-transition-duration: 2s; - transition-property: background-color; - transition-duration: 2s; -} -#block_nav { font-weight: bold; } -#block_nav a { text-decoration: none; } -#block_nav li a:hover { color: #b64b22; } -#block_nav ul { margin: 0; list-style-type: none; } -#block_nav h3 { font-size: 110%; } -.nav_box:hover, .block_left:hover, .block_right:hover, -#block_top:hover, #block_nav:hover, #footer:hover { - background-color: #f8f8f8; -} -.right_box { - width: 50%; - float: right; -} -/* Text transform at 45deg */ -.floor { - color: #999999; - font-size: 20px; - -webkit-transform: rotate(-45deg) skew(15deg, 15deg); - -moz-transform: rotate(-45deg) skew(15deg, 15deg); - -o-transform: rotate(-45deg) skew(15deg, 15deg); - -ms-transform: rotate(-45deg) skew(15deg, 15deg); - transform: rotate(-45deg) skew(15deg, 15deg); -} -#twitter, .feedbox { - margin-top: 20px; - -moz-border-radius: 8px; - -webkit-border-radius: 8px; - border-radius: 8px; - -moz-box-shadow: 0 1px 3px #666; - -webkit-box-shadow: 0 1px 3px #666; - box-shadow: 0 1px 3px #666; -} -.feedbox { - background-color: #f9f9f9; - padding: 10px 20px; - margin: 20px 100px; -} -.feedbox div { - height: 320px; - overflow: auto; -} -.feedbox ul { list-style-type: none; margin: 0; } - -/* Button */ - -.button { margin-left: 20px; } -.button a { - background-color: #b64b22; - color: #ffffff; - margin-right: 6px; - padding: 6px 10px; - font-size: 14px; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - border-radius: 4px; - -moz-box-shadow: 0 1px 3px #666; - -webkit-box-shadow: 0 1px 3px #666; - box-shadow: 0 1px 3px #666; -} -.button a:hover, input[type=submit]:hover { - background-color: #a3431f; - color: #ffffff; -} -input[type=submit] { - border: 1px solid #b64b22; - background-color: #b64b22; - color: white; - font-weight: bold; - cursor: pointer; - padding: 3px 10px; - font-size: 14px; - -moz-border-radius: 2px; - -webkit-border-radius: 2px; - border-radius: 2px; - -moz-box-shadow: 0 0 5px #666; - -webkit-box-shadow: 0 0 5px#666; - box-shadow: 0 0 5px #666; - margin-left: -5px; -} -input[type=text] { - border: 1px solid #333333; - padding: 3px; - width: 100%; -} - -/* Clouds */ - -#cloud { - padding: 10px 0px; - line-height: 3em; - text-align: center; -} -#cloud a { padding: 0 2px; color: #444444; } -#cloud a.tag1 { font-size: 0.7em; font-weight: 100; } -#cloud a.tag2 { font-size: 0.8em; font-weight: 200; } -#cloud a.tag3 { font-size: 0.9em; font-weight: 300; } -#cloud a.tag4 { font-size: 1.0em; font-weight: 400; } -#cloud a.tag5 { font-size: 1.2em; font-weight: 500; } -#cloud a.tag6 { font-size: 1.4em; font-weight: 600; } -#cloud a.tag7 { font-size: 1.6em; font-weight: 700; } -#cloud a.tag8 { font-size: 1.8em; font-weight: 800; } -#cloud a.tag9 { font-size: 2.2em; font-weight: 900; } -#cloud a.tag10 { font-size: 2.5em; font-weight: 900; } - -/* Slideshow and gallery */ - -#slideshow -{ - overflow: hidden; - margin: 10px auto 10px; - position: relative; - width: 260px; - height: 163px; -} - -#slideshow img -{ - border: 0; - width: 260px; - height: 163px; -} - -#gallery { text-align: center; } - -/* HTML styles */ - -h1 { - color: #444444; - background: transparent; - text-align: left; - margin: 0px 0px 4px 0px; - font-size: 150%; - font-weight: bold; - padding: 5px 0 0 10px; -} - -h2 { - color: #b64b22; - padding: 0; - margin: 20px 0 0 0; - font-size: 130%; - font-weight: bold; -} - -h3 { - font-weight: bold; - color: #666666; - background: transparent; -} - -h3 img, h2 img { - vertical-align: middle; - width: 20px; - height: 20px; - padding-right: 4px; -} -code, tt { - font-size: 12px; - color: #669900; -} - -pre, pre.script { - padding: 10px; - color: black; - background: #E8E8E8; - border: 1px inset #606060; -} - -/* Packages pages */ - -.pkg_nav { - border-top: 1px solid black; - margin-top: 10px; - padding-top: 10px; -} - -pre.package { - padding: 0px; - color: black; - background: white; - border: 0px solid #fff; -} - -p.get { - text-align: center; - padding: 10px; - color: black; - background: #F3F3F3; - border: 1px solid #DEDEDE; - border-radius: 4px; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; -} -p.get a { - font-weight: bold; - text-decoration: none; -} -.pkgs-search { - text-align: center; - padding: 40px 20px 80px 20px; -} - -#footer { - margin: 0px 80px 80px 80px; - padding: 10px; - background: #eaeaea; - color: #666666; - height: 180px; - clear: both; - border-radius: 8px; - -moz-border-radius: 8px; - -webkit-border-radius: 8px; - -moz-box-shadow: 0 1px 3px #666; - -webkit-box-shadow: 0 1px 3px #666; - box-shadow: 0 1px 3px #666; -} - -#footer a { color: #666666; } -#footer a:hover { color: #333333; } -#footer ul { list-style-type: none; } -#footer li { padding: 2px; } -#footer h4 { margin: 0 20px; font-size: 125%; } - -.year:after { - /* content: "2007-2012"; */ - content: "2012"; -} - -/* Report style */ - -#report { - margin: 5px; -} - -#report div { - padding: 3px; - margin: 0px; - outline: 1px solid white -} - -#report div.message { - background: transparent; - border: black 1px solid; - border-left: black 3px solid; -} - -#report div.ok { - background: #d2ffd2; - border: green 1px solid; - border-left: green 3px solid; -} - -#report div.warning { - background: #ffffd2; - border: yellow 1px solid; - border-left: yellow 3px solid; -} - -#report div.failed { - background: #ffd2d2; - border: red 1px solid; - border-left: red 3px solid; -} - -#report span.error { - background: red; - padding: 0px; - margin: 0px; - border: 0px; - width: 100%; - display: inline-block; -} - -#report pre { - background: black; - color: white; - padding: 3px; - margin: 0px; - border: 0px; - word-wrap: break-word; - white-space: normal; -} - -#report h1 { - display: inline; -} - -#report h2 { - display: inline; -} - -#report h3 { - display: inline; -} - -#report h4 { - display: inline; -} - -#report h5 { - display: inline; -} - -#report h6 { - display: inline; -} diff -r a49102a73eff -r b571aa2a37b0 libtaz/web/template.html --- a/libtaz/web/template.html Sun Mar 11 13:07:55 2012 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ - - - - Title of the page - - - - - - - -