diff options
Diffstat (limited to 'zarb-ml/mageia-sysadm/2011-January/001930.html')
-rw-r--r-- | zarb-ml/mageia-sysadm/2011-January/001930.html | 223 |
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 @@ ++<?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 = "/home/schedbot/uploads"; ++$max_modified = 2; ++$title = "Mageia build system"; ++ ++chdir($upload_dir); ++$all_files = shell_exec("find \( -name '*.rpm' -o -name '*.src.rpm.info' -o -name '*.youri' -o -name '*.lock' \) ! -ctime $max_modified"); ++ ++preg_match_all("!^\./(\w+)/((\w+)/(\w+)/(\w+)/(\d+)\.(\w+)\.(\w+)\.(\d+))_?(.+)(\.src\.rpm(?:\.info)?|\.youri|\.lock)$!m", $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]["status"] = array(); ++ $pkgs[$key]["path"] = $val[2]; ++ $pkgs[$key]["version"] = $val[3]; ++ $pkgs[$key]["media"] = $val[4]; ++ $pkgs[$key]["section"] = $val[5]; ++ $pkgs[$key]["user"] = $val[7]; ++ $pkgs[$key]["host"] = $val[8]; ++ $pkgs[$key]["job"] = $val[9]; ++ } ++ ++ $status = $val[1]; ++ $pkgs[$key]["status"][$status] = 1; ++ $data = $val[10]; ++ $ext = $val[11]; ++ if ($ext == ".src.rpm.info") { ++ preg_match("!^(?:@\d+:)?(.*)!", $data, $name); ++ $pkgs[$key]["package"] = $name[1]; ++ } else if ($ext == ".src") { ++ $pkgs[$key]["status"]["src"] = 1; ++ } else if ($ext == ".youri") { ++ $pkgs[$key]["status"]["youri"] = 1; ++ } else if ($ext == ".lock") { ++ // parse build bot from $data ++ $pkgs[$key]["status"]["build"] = 1; ++ } ++} ++// sort by key in reverse order to have more recent pkgs first ++krsort($pkgs); ++?> ++<html> ++ ++<head> ++<title><? echo $title ?></title> ++<style type="text/css"> ++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; ++} ++</style> ++</head> ++ ++<body> ++<h1><? echo $title ?></h1> ++ ++<table> ++<? ++function pkg_gettype($pkg) { ++ if (array_key_exists("rejected", $pkg["status"])) ++ return "rejected"; ++ if (array_key_exists("youri", $pkg["status"])) { ++ if (array_key_exists("src", $pkg["status"])) ++ return "youri"; ++ else ++ return "uploaded"; ++ } ++ if (array_key_exists("failure", $pkg["status"])) ++ return "failure"; ++ if (array_key_exists("done", $pkg["status"])) ++ return "partial"; ++ if (array_key_exists("build", $pkg["status"])) ++ return "building"; ++ if (array_key_exists("todo", $pkg["status"])) ++ return "todo"; ++ return "unknown"; ++} ++ ++foreach ($pkgs as $key => $p) { ++ $p["type"] = pkg_gettype(&$p); ++ echo "<tr>\n"; ++ echo "<td>" . $p["user"] . "</td>\n"; ++ echo "<td>" . $p["package"] . "</td>\n"; ++ echo "<td>" . $p["version"] . "</td>\n"; ++ echo "<td>" . $p["media"] . "/" . $p["section"] . "</td>\n"; ++ $typelink = ""; ++ if ($p["type"] == "failure") { ++ $typelink = "/uploads/" . $p["type"] . "/" . $p["path"]; ++ } else if ($p["type"] == "rejected") { ++ $typelink = "/uploads/" . $p["type"] . "/" . $p["path"] . ".youri"; ++ } ++ echo "<td class='" . $p["type"] . "'>"; ++ if ($typelink) ++ echo "<a href='$typelink'>"; ++ echo $p["type"]; ++ if ($typelink) ++ echo "</a>"; ++ echo "</td>\n";; ++ echo "</tr>\n"; ++} ++?> ++</table> ++ ++</body> ++ ++</html> +-------------- next part -------------- +An HTML attachment was scrubbed... +URL: </pipermail/mageia-sysadm/attachments/20110112/e1e58ce8/attachment.html> +</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> |