From 13426e1a3df985b8547455b3a0257039653603f9 Mon Sep 17 00:00:00 2001 From: Romain d'Alverny Date: Tue, 4 Sep 2012 15:28:57 +0000 Subject: try js charts --- lib.php | 110 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ test_index.php | 13 +++++++ 2 files changed, 123 insertions(+) diff --git a/lib.php b/lib.php index 48ec11f..5d1cfde 100644 --- a/lib.php +++ b/lib.php @@ -236,3 +236,113 @@ function build_stats($pkgs) $pkgs ); } + + +class mga_bs_charts +{ + + public static function js_init() + { + return << + +S; + } + + public static function js_draw_charts() + { + return << $count) { + $rows[] = sprintf("['%s', %d]", $status, $count); + } + $rows = implode(', ', $rows); + $s = << $count) { + $rows[] = sprintf("['%s', %d]", $duration, $count); + } + $rows = implode(', ', $rows); + return << $count) { + $rows[] = sprintf("['%s', %d]", $hour, $count); + } + $rows = implode(', ', $rows); + return <<
+
+
+
+
+ ', + mga_bs_charts::js_draw_status_chart($stats, 'status-chart'), + mga_bs_charts::js_draw_buildtime_chart($buildtime_stats, 'buildtime-chart'), + mga_bs_charts::js_draw_buildschedule_chart($build_dates, 'buildschedule-chart'), + mga_bs_charts::js_draw_charts(), + ''; + echo mga_bs_charts::js_init(); + ?>

Generated at . Code for this page is in http://svnweb.mageia.org/soft/build_system/web/.

-- cgit v1.2.1