# HG changeset patch # User Christophe Lincoln # Date 1390156461 -3600 # Node ID 224ad32edb21bf2f2af17e58052628f5e6071eda # Parent 1e3eb0df6a4a95ed68e799c7a82f85d6f59ee3c7 Add pangolin web interface and update pangolin tool diff -r 1e3eb0df6a4a -r 224ad32edb21 pangolin/pangolin --- a/pangolin/pangolin Wed Jan 15 15:47:36 2014 +0100 +++ b/pangolin/pangolin Sun Jan 19 19:34:21 2014 +0100 @@ -53,7 +53,7 @@ newline boldify "Updating: www.slitaz.org..." cd ${WEBSITE} && hg pull -u - newline;; + newline ;; up-forum) # Update forum.slitaz.org theme newline @@ -78,10 +78,17 @@ cp -a slitaz-mercurial-style/* $PYTHON_LIB/site-packages/mercurial chown -R root.root $PYTHON_LIB/site-packages/mercurial/templates newline ;; + up-pangolin) + # Update pangolin.slitaz.org + newline + boldify "Updating: pangolin.slitaz.org..." + cd ${REPOS}/slitaz-forge && hg pull -u + cp -a pangolin/web/* $WWW/pangolin.slitaz.org/public_html + newline ;; adduser) [ ! "$2" ] && echo "Missing user name arg" && exit 0 [ ! "$3" ] && echo "Missing password arg" && exit 0 - htpasswd -b $HGUSERS $2 $3 ;; + htpasswd -b ${HGUSERS} $2 $3 ;; stats) # Echo some stats. newline diff -r 1e3eb0df6a4a -r 224ad32edb21 pangolin/web/HEADER.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pangolin/web/HEADER.html Sun Jan 19 19:34:21 2014 +0100 @@ -0,0 +1,252 @@ + + + + + SliTaz Pizza + + + + + + +
+ diff -r 1e3eb0df6a4a -r 224ad32edb21 pangolin/web/favicon.ico Binary file pangolin/web/favicon.ico has changed diff -r 1e3eb0df6a4a -r 224ad32edb21 pangolin/web/graphs.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pangolin/web/graphs.php Sun Jan 19 19:34:21 2014 +0100 @@ -0,0 +1,134 @@ + + + + Pangolin RRD stats + + + + + + + + + + + + + +
+ + + +
+

Codename: pangolin

+

+ This is the SliTaz GNU/Linux main server and build host. + The server runs naturally SliTaz and provides some services + to all contributors such as: secure access, disk space, a + public directory or cron jobs. +

+

+ Pangolin CPU is a - + = 1024) { x /= 1024; ". + "n++ }; y=1; while (x > 2) { x /= 2; y *= 2}; ". + "printf \"%d%cB RAM\",y,substr(\"MG\",n,1) }' ")?> + - Located in Paris, + France. +

+
+
+ + +
+ +
+'."\n"; +} + +function graphic($res, $img='') +{ + global $myurl; + if (!$img) $img=$res; + echo ""; + echo "\n"; + one_graphic($img."-day.png",$res." daily"); + echo ""; + if (isset($_GET['stats']) && $_GET['stats'] == $res) { + one_graphic($img."-week.png",$res." weekly"); + one_graphic($img."-month.png",$res." monthly"); + one_graphic($img."-year.png",$res." yearly"); + } +} + +echo "

CPU

\n"; +graphic("cpu"); +echo "

Memory

\n"; +graphic("memory"); +echo "

Disk

\n"; +graphic("disk"); +echo "

Network

\n"; +$eth = array(); +exec("/sbin/route -n | awk '{ if (/^0.0.0.0/) print $8 }'", $eth); +graphic("net",$eth[0]); + +?> + + +
+ + + + + + diff -r 1e3eb0df6a4a -r 224ad32edb21 pangolin/web/images/archive.png Binary file pangolin/web/images/archive.png has changed diff -r 1e3eb0df6a4a -r 224ad32edb21 pangolin/web/images/development.png Binary file pangolin/web/images/development.png has changed diff -r 1e3eb0df6a4a -r 224ad32edb21 pangolin/web/images/down.png Binary file pangolin/web/images/down.png has changed diff -r 1e3eb0df6a4a -r 224ad32edb21 pangolin/web/images/download.png Binary file pangolin/web/images/download.png has changed diff -r 1e3eb0df6a4a -r 224ad32edb21 pangolin/web/images/info.png Binary file pangolin/web/images/info.png has changed diff -r 1e3eb0df6a4a -r 224ad32edb21 pangolin/web/images/iso.png Binary file pangolin/web/images/iso.png has changed diff -r 1e3eb0df6a4a -r 224ad32edb21 pangolin/web/images/logo.png Binary file pangolin/web/images/logo.png has changed diff -r 1e3eb0df6a4a -r 224ad32edb21 pangolin/web/images/monitor.png Binary file pangolin/web/images/monitor.png has changed diff -r 1e3eb0df6a4a -r 224ad32edb21 pangolin/web/images/network.png Binary file pangolin/web/images/network.png has changed diff -r 1e3eb0df6a4a -r 224ad32edb21 pangolin/web/images/open.png Binary file pangolin/web/images/open.png has changed diff -r 1e3eb0df6a4a -r 224ad32edb21 pangolin/web/images/paypal.png Binary file pangolin/web/images/paypal.png has changed diff -r 1e3eb0df6a4a -r 224ad32edb21 pangolin/web/images/slitaz-doc.png Binary file pangolin/web/images/slitaz-doc.png has changed diff -r 1e3eb0df6a4a -r 224ad32edb21 pangolin/web/images/tazpkg.png Binary file pangolin/web/images/tazpkg.png has changed diff -r 1e3eb0df6a4a -r 224ad32edb21 pangolin/web/index.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pangolin/web/index.php Sun Jan 19 19:34:21 2014 +0100 @@ -0,0 +1,305 @@ + + + + SliTaz Pangolin + + + + + + + + + + + + + +
+ +
+

development.pngDevelopers Corner

+ + +
+ +
+

Codename: pangolin - Maintainer: erjo

+

+ This is the SliTaz GNU/Linux main server and build host. + The server runs naturally SliTaz and provides some services + to all contributors. +

+

+ Pangolin CPU is a - + = 1024) { x /= 1024; ". + "n++ }; y=1; while (x > 2) { x /= 2; y *= 2}; ". + "printf \"%d%cB RAM\",y,substr(\"MG\",n,1) }' ")?> + - Located in Paris, + France. Pangolin is also monitored by RRDtool which provides + graphical stats. +

+
+
+ + +
+ +

graphsSystem stats

+ +

Uptime

+ +
+
+
+ +

Disk usage

+
+
+
+ +

Network

+
+
+
+ +

vhostsVirtual hosts

+ + + +

vhostsOther hosts

+ +

+ These services are hosted by some individual sponsors who gracefully offer + resources to the SliTaz project. +

+ + + +

mirrorsMirrors

+ Most mirrors are updated using the url: rsync://mirror.slitaz.org/slitaz/ + (stats) +
+rsync -azH --delete rsync://mirror.slitaz.org/slitaz/ /local/slitaz/mirror/ 
+ New mirrors should be announced on the + mailing list. +
    + /dev/null 2>&1" ; + break; + default : + return FALSE; + } + if (shell_exec("$cmd && echo -n OK") == "OK") { + fwrite($output_url_handler,$link."\n"); + return TRUE; + } + return FALSE; + } + return shell_exec("grep -qs ^$link$ $mirrors_url_file && echo -n OK") == "OK"; +} + +if (! file_exists($mirrors_url_file)) { + $output_url_file = tempnam('/tmp','mkmirrors'); + $output_url_handler = fopen($output_url_file, "w"); + fwrite($output_url_handler,"http://mirror.slitaz.org/\n"); + fwrite($output_url_handler,"rsync://mirror.slitaz.org/\n"); +} + +# Flags icons from http://www.famfamfam.com/lab/icons/flags/famfamfam_flag_icons.zip +foreach (array( + array( "flag" => "ch", + "http" => "http://mirror.switch.ch/ftp/mirror/slitaz/", + "ftp" => "ftp://mirror.switch.ch/mirror/slitaz/"), + array( "flag" => "us", + "http" => "http://www.gtlib.gatech.edu/pub/slitaz/", + "ftp" => "ftp://ftp.gtlib.gatech.edu/pub/slitaz/", + "rsync" => "rsync://www.gtlib.gatech.edu/slitaz/"), + array( "flag" => "fr", + "http" => "http://download.tuxfamily.org/slitaz/", + "ftp" => "ftp://download.tuxfamily.org/slitaz/", + "rsync" => "rsync://download.tuxfamily.org/pub/slitaz/"), + array( "flag" => "fr", + "http" => "http://www.linuxembarque.com/slitaz/mirror/"), + array( "flag" => "cn", + "http" => "http://mirror.lupaworld.com/slitaz/"), + array( "flag" => "cn", + "http" => "http://ks.lupaworld.com/slitaz/"), + array( "flag" => "br", + "http" => "http://slitaz.c3sl.ufpr.br/", + "ftp" => "ftp://slitaz.c3sl.ufpr.br/slitaz/", + "rsync" => "rsync://slitaz.c3sl.ufpr.br/slitaz/"), + array( "flag" => "it", + "http" => "http://slitaz.mirror.garr.it/mirrors/slitaz/", + "ftp" => "ftp://slitaz.mirror.garr.it/mirrors/slitaz/", + "rsync" => "rsync://slitaz.mirror.garr.it/mirrors/slitaz/"), + array( "flag" => "si", + "http" => "http://mirror.drustvo-dns.si/slitaz/"), + array( "flag" => "si", + "ftp" => "ftp://ftp.pina.si/slitaz/"), + array( "flag" => "us", + "http" => "http://distro.ibiblio.org/pub/linux/distributions/slitaz/", + "ftp" => "ftp://distro.ibiblio.org/pub/linux/distributions/slitaz/"), + array( "flag" => "nl", + "http" => "http://ftp.vim.org/ftp/os/Linux/distr/slitaz/", + "ftp" => "ftp://ftp.vim.org/mirror/os/Linux/distr/slitaz/"), + array( "flag" => "nl", + "http" => "http://ftp.nedit.org/ftp/ftp/pub/os/Linux/distr/slitaz/", + "ftp" => "ftp://ftp.nedit.org/ftp/ftp/pub/os/Linux/distr/slitaz/"), + array( "flag" => "ch", + "http" => "http://ftp.ch.xemacs.org/ftp/pool/2/mirror/slitaz/", + "ftp" => "ftp://ftp.ch.xemacs.org//pool/2/mirror/slitaz/"), + array( "flag" => "de", + "http" => "http://ftp.uni-stuttgart.de/slitaz/", + "ftp" => "ftp://ftp.uni-stuttgart.de/slitaz/"), + array( "flag" => "ro", + "http" => "http://ftp.info.uvt.ro/pub/slitaz/", + "ftp" => "ftp://ftp.info.uvt.ro/pub/slitaz/", + "rsync" => "rsync://ftp.info.uvt.ro/ftp/pub/slitaz/"), + array( "flag" => "au", + "http" => "http://mirror.iprimus.com/slitaz/"), + array( "flag" => "au", + "http" => "http://mirror01.ipgn.com.au/slitaz/"), + array( "flag" => "us", + "http" => "http://mirror.clarkson.edu/slitaz/", + "rsync" => "rsync://mirror.clarkson.edu/slitaz/")) as $mirror) { + $flag = "pics/website/".$mirror["flag"].".png"; + $head = TRUE; + foreach(array("http", "ftp", "rsync") as $proto) { + if (!isset($mirror[$proto])) continue; + $link = $mirror[$proto]; + if (!test_url($link, $proto)) continue; + $serveur = parse_url($link, PHP_URL_HOST); + if ($head) echo << + map + $link +EOT; + else echo <<$proto +EOT; + $head = FALSE; + } + if ($head) continue; + echo " \n"; +} + +if ($output_url_file != "") { + fclose($output_url_handler); + rename($output_url_file, $mirrors_url_file); + chmod($mirrors_url_file, 0644); +} + +?> +
+ + +
+ + + + + + diff -r 1e3eb0df6a4a -r 224ad32edb21 pangolin/web/mirrors --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pangolin/web/mirrors Sun Jan 19 19:34:21 2014 +0100 @@ -0,0 +1,28 @@ +http://mirror.slitaz.org/ +rsync://mirror.slitaz.org/ +http://mirror.switch.ch/ftp/mirror/slitaz/ +ftp://mirror.switch.ch/mirror/slitaz/ +http://www.gtlib.gatech.edu/pub/slitaz/ +ftp://ftp.gtlib.gatech.edu/pub/slitaz/ +http://download.tuxfamily.org/slitaz/ +ftp://download.tuxfamily.org/slitaz/ +rsync://download.tuxfamily.org/pub/slitaz/ +http://slitaz.c3sl.ufpr.br/ +ftp://slitaz.c3sl.ufpr.br/slitaz/ +rsync://slitaz.c3sl.ufpr.br/slitaz/ +http://slitaz.mirror.garr.it/mirrors/slitaz/ +ftp://slitaz.mirror.garr.it/mirrors/slitaz/ +http://distro.ibiblio.org/pub/linux/distributions/slitaz/ +ftp://distro.ibiblio.org/pub/linux/distributions/slitaz/ +http://ftp.vim.org/ftp/os/Linux/distr/slitaz/ +ftp://ftp.vim.org/mirror/os/Linux/distr/slitaz/ +http://ftp.nedit.org/ftp/ftp/pub/os/Linux/distr/slitaz/ +ftp://ftp.nedit.org/ftp/ftp/pub/os/Linux/distr/slitaz/ +http://ftp.ch.xemacs.org/ftp/pool/2/mirror/slitaz/ +ftp://ftp.ch.xemacs.org//pool/2/mirror/slitaz/ +http://ftp.uni-stuttgart.de/slitaz/ +ftp://ftp.uni-stuttgart.de/slitaz/ +http://ftp.info.uvt.ro/pub/slitaz/ +ftp://ftp.info.uvt.ro/pub/slitaz/ +http://mirror01.ipgn.com.au/slitaz/ +http://mirror.clarkson.edu/slitaz/ diff -r 1e3eb0df6a4a -r 224ad32edb21 pangolin/web/robots.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pangolin/web/robots.txt Sun Jan 19 19:34:21 2014 +0100 @@ -0,0 +1,4 @@ +User-agent: * +Disallow: /lib/ +Disallow: /README +Disallow: diff -r 1e3eb0df6a4a -r 224ad32edb21 pangolin/web/slitaz.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pangolin/web/slitaz.css Sun Jan 19 19:34:21 2014 +0100 @@ -0,0 +1,374 @@ +/* + CSS style for SliTaz Network - (C) 2014 SliTaz GNU/Linux +*/ + +html { + min-height: 102%; +} + +body { + background: #ffffff; + color: black; + font: 13px sans-serif, vernada, arial; + margin: 0; + min-width: 780px; + height: 100%; +} + +a { text-decoration: underline; color: #215090; } +a:hover { text-decoration: none; color: blue; } +img { border: 0pt none; vertical-align: middle; } +h2 { color: #444; } +h3 { color: #666; font-size: 140%; } +h4 { color: #888; font-size: 120%; } +pre { + background-color: #f8f8f8; + border: 1px solid #ddd; + padding: 10px; +} + +/* Header */ + +#header { + height: 40px; + background: #222; +} + +#header h1 { + margin: 0; + padding: 8px 0 0 42px; + width: 250px; +} + +#header h1 a { + color: white; + text-decoration: none; + font-size: 20px; + font-style: italic; +} + +#header h1 a:hover, #network a:hover, #network span { + color: #afafaf; +} + +/* Logo */ + +#logo { + background: url(images/logo.png) no-repeat left; + position: absolute; + float: left; + left: 0px; + top: 0px; + width: 40px; + height: 40px; +} + +/* SliTaz Network */ + +#network { + float: right; + padding: 14px 5px 0; + font-size: 12px; +} + +#network a, #network span { padding: 0 4px; } +#network span { font-weight: bold; } + +/* Block */ + +#block { + min-height: 180px; + background: #ccc; + padding: 20px 10% 0px; + text-align: center; + color: #222; + border-bottom: 1px solid #afafaf; +} + +#block_info { + text-align: justify; + width: 48%; + padding: 10px 10px 0 0; +} + +#block a, #network a { + color: #fff; + font-weight: bold; + text-decoration: none; +} + +#block h4 { + color: #222; + margin: 0px; + font-weight: bold; + font-size: 110%; +} + +#block_info p { margin: 6px 0; padding: 0 12px 0 0; } +#block_info a { font-weight: normal; color: #215090; } +#block_info a:hover { text-decoration: underline; } +#block ul { list-style-type: square; } +#block_nav a:hover { color: #afafaf; } + +/* Navigation */ + +#block_nav { + background: #666; + padding: 10px 10px 20px; + text-align: justify; + width: 48%; + float: right; +} + +#block_nav ul { + list-style-type: none; + margin: 6px 0; + padding: 0; +} + +#block_nav h4 img { + margin: 0 4px 0 0; + padding: 0; +} + +/* Languages */ + +#lang { + padding: 6px; + font-size: 11px; + position: absolute; + right: 0px; +} + +#lang a { + text-decoration: none; + padding: 0 2px; +} + +#lang a:hover { + text-decoration: underline; +} + +.box #lang { text-align: center; position: relative; + font-size: 13px; } /* for /i18n page */ + +/* Content */ + +#content { + padding: 30px 80px; + text-align: justify; +} + +.news li { + list-style-type: square; + border-bottom: 1px dotted #BEBEBE; + margin-left: -25px; + padding: 4px 0px 4px 0px; +} + +.news a, .feed-grid a { text-decoration: none; } +.news p a { text-decoration: underline; } +.news p a:hover { text-decoration: none; } +#twitter { margin: 20px 0; text-align: center; } +#gallery { text-align: center; } + +#sponsor { + font-size: 90%; + background-color: #fbfbfb; + border: 2px solid #ddd; + width: 200px; + height: 160px; + float: right; + text-align: center; + margin: 10px 0px 20px 20px; +} + +/* Classes */ + +.right_box { width: 48%; float: right; } +.left_box { width: 48%; float: left; } + +.box { + margin: 20px 60px; + padding: 12px; + background: #efefef; + border: 1px solid #ddd; +} + +.box-dl, .box-up { + margin: 20px 60px; + padding: 12px 12px 12px 66px; + min-height: 48px; + border: 1px solid #ddd; + vertical-align: middle; +} +.box-dl { + background: url("/images/download.png") no-repeat 12px 12px #efefef; +} +.box-up { + background: url("/images/update.png") no-repeat center left #efefef; +} +.box-dl p { color: #456; } + +.searchbox { + margin: 20px 80px; + padding: 12px; + background: #f8f8f8; + text-align: center; + border: 1px solid #ddd; +} + +/* Activity Box */ + +.activity { + margin: 0 0 20px; + background: #efefef; + padding: 5px 2px 0; + border: 1px solid #ddd; +} +.activity div { padding: 5px 10px; background: #fff; margin-top: 5px; } +.activity p { margin: 0; padding: 5px 10px; font-weight: bold; } +.activity a { text-decoration: none; } +.activity ul { list-style-type: none; + margin: 4px 0; padding: 0 4px; line-height: 150%; } +.activity_more { text-align: right; } +.activity_more a { font-weight: normal; color: #000; padding: 0 4px; } +.activity_more a:hover { text-decoration: underline; } + +.activity span, .news span { + color: #666; + font-size: 11px; + font-weight: normal; +} + +/* Button */ + +#block_info .button a { + background-color: #666; + color: #ffffff; + margin: 0px 4px; + padding: 6px 10px; + font-size: 12px; + text-decoration: none; + font-weight: bold; +} +#block_info .button a:hover, input[type=submit]:hover { + background-color: #444; + color: #ffffff; +} + +/* Round corner */ + +#block_nav, pre, .box, .box-dl, .box-up, .searchbox, .button a, #twitter, .activity, +.activity div, #sponsor { + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; +} + +/* Form */ + +input[type=submit] { + border: 1px solid #666; + background-color: #666; + color: white; + font-weight: bold; + cursor: pointer; + padding: 4px 10px; + font-size: 14px; + margin-left: -5px; + -webkit-border-top-right-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -moz-border-radius-topright: 4px; + -moz-border-radius-bottomright: 4px; + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; +} + +input[type=submit]:hover { background-color: #444; } + +input[type=text] { + border: 1px solid #333333; + padding: 4px; + height: 17px; + width: 100%; + -webkit-border-top-left-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -moz-border-radius-topleft: 4px; + -moz-border-radius-bottomleft: 4px; + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; +} + +/* Footer */ + +#footer { + background: #f1f1f1; + text-align: center; + border-top: 1px solid #ddd; + padding: 40px; + color: #666; + clear: both; + margin-bottom: -2%; +} + +#footer a { color: #666; padding: 0 2px; } + +.year:after { + /* content: "2007-2014"; */ + content: "2014"; +} + +p, li { + -moz-hyphens: auto; + -webkit-hyphens: auto; + hyphens: auto; +} + + +/* --- SEARCH --- */ + +input.gsc-search-button { + border: 1px solid #b64b22; + background-color: #b64b22; + color: white; + font-weight: bold; + cursor: pointer; + padding: 2px 10px; + font-size: 14px; + margin-left: -4px; + -webkit-border-top-right-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -moz-border-radius-topright: 4px; + -moz-border-radius-bottomright: 4px; + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; +} + +.gs-webResult.gs-result a.gs-title:link, +.gs-webResult.gs-result a.gs-title:link b { + color: #103a5e; +} + +#cse { + margin-bottom: 120px; + width:100%; +} + + +/* --- GALLERY --- */ + +#gallery div { + width: 496px; + border: none; + border-radius: 12px; + padding-bottom: 8px; + margin: 12px auto; + webkit-box-shadow: 0 0 6px rgba(0,0,0,0.5); + -moz-box-shadow: 0 0 6px rgba(0,0,0,0.5); + box-shadow: 0 0 6px rgba(0,0,0,0.5); +} +#gallery img { + width: 480px; + margin: 8px; +}