summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-sysadm/2011-January/001930.html
diff options
context:
space:
mode:
Diffstat (limited to 'zarb-ml/mageia-sysadm/2011-January/001930.html')
-rw-r--r--zarb-ml/mageia-sysadm/2011-January/001930.html223
1 files changed, 223 insertions, 0 deletions
diff --git a/zarb-ml/mageia-sysadm/2011-January/001930.html b/zarb-ml/mageia-sysadm/2011-January/001930.html
new file mode 100644
index 000000000..464456f7e
--- /dev/null
+++ b/zarb-ml/mageia-sysadm/2011-January/001930.html
@@ -0,0 +1,223 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<HTML>
+ <HEAD>
+ <TITLE> [Mageia-sysadm] [268] Import blino's web interface
+ </TITLE>
+ <LINK REL="Index" HREF="index.html" >
+ <LINK REL="made" HREF="mailto:mageia-sysadm%40mageia.org?Subject=Re%3A%20%5BMageia-sysadm%5D%20%5B268%5D%20Import%20blino%27s%20web%20interface&In-Reply-To=%3C20110112114210.7FEFB421F5%40valstar.mageia.org%3E">
+ <META NAME="robots" CONTENT="index,nofollow">
+ <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
+ <LINK REL="Previous" HREF="001929.html">
+ <LINK REL="Next" HREF="001931.html">
+ </HEAD>
+ <BODY BGCOLOR="#ffffff">
+ <H1>[Mageia-sysadm] [268] Import blino's web interface</H1>
+ <B>root at mageia.org</B>
+ <A HREF="mailto:mageia-sysadm%40mageia.org?Subject=Re%3A%20%5BMageia-sysadm%5D%20%5B268%5D%20Import%20blino%27s%20web%20interface&In-Reply-To=%3C20110112114210.7FEFB421F5%40valstar.mageia.org%3E"
+ TITLE="[Mageia-sysadm] [268] Import blino's web interface">root at mageia.org
+ </A><BR>
+ <I>Wed Jan 12 12:42:10 CET 2011</I>
+ <P><UL>
+ <LI>Previous message: <A HREF="001929.html">[Mageia-sysadm] [Online] Alerte monitoring - Serveur SD-19688 Service ping up
+</A></li>
+ <LI>Next message: <A HREF="001931.html">[Mageia-sysadm] [269] Import my changes + rda's style
+</A></li>
+ <LI> <B>Messages sorted by:</B>
+ <a href="date.html#1930">[ date ]</a>
+ <a href="thread.html#1930">[ thread ]</a>
+ <a href="subject.html#1930">[ subject ]</a>
+ <a href="author.html#1930">[ author ]</a>
+ </LI>
+ </UL>
+ <HR>
+<!--beginarticle-->
+<PRE>Revision: 268
+Author: pterjan
+Date: 2011-01-12 12:42:10 +0100 (Wed, 12 Jan 2011)
+Log Message:
+-----------
+Import blino's web interface
+
+Added Paths:
+-----------
+ build_system/web/
+ build_system/web/index.php
+
+Added: build_system/web/index.php
+===================================================================
+--- build_system/web/index.php (rev 0)
++++ build_system/web/index.php 2011-01-12 11:42:10 UTC (rev 268)
+@@ -0,0 +1,137 @@
++&lt;?php
++
++/* Copyright (C) 2011 Oliver Blin *\
++/**************************************************************************\
++* This program is free software; you can redistribute it and/or modify it *
++* under the terms of the GNU General Public License aspublished by the *
++* Free Software Foundation; either version 2 of the License, or (at your *
++* option) any later version. *
++\**************************************************************************/
++
++error_reporting(E_ALL);
++
++$upload_dir = &quot;/home/schedbot/uploads&quot;;
++$max_modified = 2;
++$title = &quot;Mageia build system&quot;;
++
++chdir($upload_dir);
++$all_files = shell_exec(&quot;find \( -name '*.rpm' -o -name '*.src.rpm.info' -o -name '*.youri' -o -name '*.lock' \) ! -ctime $max_modified&quot;);
++
++preg_match_all(&quot;!^\./(\w+)/((\w+)/(\w+)/(\w+)/(\d+)\.(\w+)\.(\w+)\.(\d+))_?(.+)(\.src\.rpm(?:\.info)?|\.youri|\.lock)$!m&quot;, $all_files, $matches, PREG_SET_ORDER);
++
++$pkgs = array();
++foreach ($matches as $val) {
++ $key = $val[6];
++ if (!is_array($pkgs[$key])) {
++ $pkgs[$key] = array();
++ $pkgs[$key][&quot;status&quot;] = array();
++ $pkgs[$key][&quot;path&quot;] = $val[2];
++ $pkgs[$key][&quot;version&quot;] = $val[3];
++ $pkgs[$key][&quot;media&quot;] = $val[4];
++ $pkgs[$key][&quot;section&quot;] = $val[5];
++ $pkgs[$key][&quot;user&quot;] = $val[7];
++ $pkgs[$key][&quot;host&quot;] = $val[8];
++ $pkgs[$key][&quot;job&quot;] = $val[9];
++ }
++
++ $status = $val[1];
++ $pkgs[$key][&quot;status&quot;][$status] = 1;
++ $data = $val[10];
++ $ext = $val[11];
++ if ($ext == &quot;.src.rpm.info&quot;) {
++ preg_match(&quot;!^(?:@\d+:)?(.*)!&quot;, $data, $name);
++ $pkgs[$key][&quot;package&quot;] = $name[1];
++ } else if ($ext == &quot;.src&quot;) {
++ $pkgs[$key][&quot;status&quot;][&quot;src&quot;] = 1;
++ } else if ($ext == &quot;.youri&quot;) {
++ $pkgs[$key][&quot;status&quot;][&quot;youri&quot;] = 1;
++ } else if ($ext == &quot;.lock&quot;) {
++ // parse build bot from $data
++ $pkgs[$key][&quot;status&quot;][&quot;build&quot;] = 1;
++ }
++}
++// sort by key in reverse order to have more recent pkgs first
++krsort($pkgs);
++?&gt;
++&lt;html&gt;
++
++&lt;head&gt;
++&lt;title&gt;&lt;? echo $title ?&gt;&lt;/title&gt;
++&lt;style type=&quot;text/css&quot;&gt;
++td.todo {
++ color: black;
++}
++td.building {
++ color: fuchsia;
++}
++td.partial {
++ color: purple;
++}
++td.built {
++ color: blue;
++}
++td.youri {
++ color: olive
++}
++td.uploaded {
++ color: green;
++}
++td.failure, td.failure a, td.rejected, td.rejected a {
++ color: red;
++}
++&lt;/style&gt;
++&lt;/head&gt;
++
++&lt;body&gt;
++&lt;h1&gt;&lt;? echo $title ?&gt;&lt;/h1&gt;
++
++&lt;table&gt;
++&lt;?
++function pkg_gettype($pkg) {
++ if (array_key_exists(&quot;rejected&quot;, $pkg[&quot;status&quot;]))
++ return &quot;rejected&quot;;
++ if (array_key_exists(&quot;youri&quot;, $pkg[&quot;status&quot;])) {
++ if (array_key_exists(&quot;src&quot;, $pkg[&quot;status&quot;]))
++ return &quot;youri&quot;;
++ else
++ return &quot;uploaded&quot;;
++ }
++ if (array_key_exists(&quot;failure&quot;, $pkg[&quot;status&quot;]))
++ return &quot;failure&quot;;
++ if (array_key_exists(&quot;done&quot;, $pkg[&quot;status&quot;]))
++ return &quot;partial&quot;;
++ if (array_key_exists(&quot;build&quot;, $pkg[&quot;status&quot;]))
++ return &quot;building&quot;;
++ if (array_key_exists(&quot;todo&quot;, $pkg[&quot;status&quot;]))
++ return &quot;todo&quot;;
++ return &quot;unknown&quot;;
++}
++
++foreach ($pkgs as $key =&gt; $p) {
++ $p[&quot;type&quot;] = pkg_gettype(&amp;$p);
++ echo &quot;&lt;tr&gt;\n&quot;;
++ echo &quot;&lt;td&gt;&quot; . $p[&quot;user&quot;] . &quot;&lt;/td&gt;\n&quot;;
++ echo &quot;&lt;td&gt;&quot; . $p[&quot;package&quot;] . &quot;&lt;/td&gt;\n&quot;;
++ echo &quot;&lt;td&gt;&quot; . $p[&quot;version&quot;] . &quot;&lt;/td&gt;\n&quot;;
++ echo &quot;&lt;td&gt;&quot; . $p[&quot;media&quot;] . &quot;/&quot; . $p[&quot;section&quot;] . &quot;&lt;/td&gt;\n&quot;;
++ $typelink = &quot;&quot;;
++ if ($p[&quot;type&quot;] == &quot;failure&quot;) {
++ $typelink = &quot;/uploads/&quot; . $p[&quot;type&quot;] . &quot;/&quot; . $p[&quot;path&quot;];
++ } else if ($p[&quot;type&quot;] == &quot;rejected&quot;) {
++ $typelink = &quot;/uploads/&quot; . $p[&quot;type&quot;] . &quot;/&quot; . $p[&quot;path&quot;] . &quot;.youri&quot;;
++ }
++ echo &quot;&lt;td class='&quot; . $p[&quot;type&quot;] . &quot;'&gt;&quot;;
++ if ($typelink)
++ echo &quot;&lt;a href='$typelink'&gt;&quot;;
++ echo $p[&quot;type&quot;];
++ if ($typelink)
++ echo &quot;&lt;/a&gt;&quot;;
++ echo &quot;&lt;/td&gt;\n&quot;;;
++ echo &quot;&lt;/tr&gt;\n&quot;;
++}
++?&gt;
++&lt;/table&gt;
++
++&lt;/body&gt;
++
++&lt;/html&gt;
+-------------- next part --------------
+An HTML attachment was scrubbed...
+URL: &lt;/pipermail/mageia-sysadm/attachments/20110112/e1e58ce8/attachment.html&gt;
+</PRE>
+
+
+
+
+
+
+
+
+
+
+
+
+<!--endarticle-->
+ <HR>
+ <P><UL>
+ <!--threads-->
+ <LI>Previous message: <A HREF="001929.html">[Mageia-sysadm] [Online] Alerte monitoring - Serveur SD-19688 Service ping up
+</A></li>
+ <LI>Next message: <A HREF="001931.html">[Mageia-sysadm] [269] Import my changes + rda's style
+</A></li>
+ <LI> <B>Messages sorted by:</B>
+ <a href="date.html#1930">[ date ]</a>
+ <a href="thread.html#1930">[ thread ]</a>
+ <a href="subject.html#1930">[ subject ]</a>
+ <a href="author.html#1930">[ author ]</a>
+ </LI>
+ </UL>
+
+<hr>
+<a href="https://www.mageia.org/mailman/listinfo/mageia-sysadm">More information about the Mageia-sysadm
+mailing list</a><br>
+</body></html>