From 774fd95a1869937aa3916a7bfae20f886c3c186c Mon Sep 17 00:00:00 2001 From: kanoi Date: Tue, 22 Mar 2016 08:49:00 +1100 Subject: [PATCH] php - add 4 more workers to the shift graph --- pool/page_usperf.php | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/pool/page_usperf.php b/pool/page_usperf.php index d99591b0..813808c7 100644 --- a/pool/page_usperf.php +++ b/pool/page_usperf.php @@ -30,7 +30,8 @@ function dousperf($data, $user) // This also defines how many worker fields there are $cols = array('#0000c0', '#00dd00', '#e06020', '#b020e0'); - $nc = count($cols); + $cols2 = array('#2090e0', '#e0c040', '#ff6090', '#90e040'); + $nc = count($cols)+count($cols2); $workers = 'all'; if (isset($_COOKIE['workers'])) @@ -93,9 +94,24 @@ function dousperf($data, $user) $datacols .= ','; $datacols .= $col; } - $oncl = "wch();location.href=\"".makeURL('usperf')."\""; $pg .= "
"; + + # the rest of the workers/colours go below the graph + $pg2 = '
'; + foreach ($cols2 as $col) + { + $i++; + $pg2 .= " Worker$i"; + $pg2 .= ":"; + $pg2 .= " "; + + if ($i > 1) + $datacols .= ','; + $datacols .= $col; + } + $pg2 .= "
\n"; + foreach ($cbx as $nam => $txt) { $pg .= ' '; @@ -107,6 +123,7 @@ function dousperf($data, $user) $pg .= '
'; $pg .= 'A graph will show here if your browser supports html5/canvas'; $pg .= "
\n"; + $pg .= $pg2; $data = str_replace(array("\\","'"), array("\\\\","\\'"), $ans['DATA']); $data .= $fld_sep . 'cols' . $val_sep . $datacols; $pg .= "