function CreateAxes(GRAPHAxes $axes, $flags = 0) { $itemlist = $this->GetCachedItems(REQUEST::NEED_AXISINFO, $flags & CACHESet::CACHE_ITEMS ? $flags | REQUEST::NEED_AXISINFO : REQUEST::NEED_AXISINFO | REQUEST::ONLY_AXISINFO); $size = $this->GetWidth(); for ($i = 0; $i < $size; $i++) { $axes->GetAxis(is_array($itemlist[$i]) ? $itemlist[$i]['axis'] : false); } }
function __construct(REQUEST $req = NULL, DATABASE $db, &$info, $flags = 0) { parent::__construct($props, $flags); if ($flags & GRAPHAxes::PRIVATE_AXES) { $prefix = "{$req->props['db_server']}__{$req->props['db_name']}__"; } else { $prefix = ""; } if (!$info['table']) { throw new ADEIException("The axes table is not specified in the reader configuration"); } if (!$info['id']) { throw new ADEIException("The id column for axes table is not specified in the reader configuration"); } $query = ""; if (is_array($info['properties'])) { foreach ($info['properties'] as $prop => $col) { $query .= ", {$col} AS {$prop}"; } } $axes = $db->Query("SELECT {$info['id']} AS axis_id{$query} FROM {$this->col_quote}{$info['table']}{$this->col_quote}"); foreach ($axes as $axis) { $this->axis_info[$prefix . $axis['axis_id']] = $axis; } }
function __construct(REQUEST $props = NULL, $munin_axes) { parent::__construct($props); $this->req = $props; $this->default_axis = false; $this->axes = array(); $this->aids = array(); foreach ($munin_axes as $axis_key => $axis) { $this->axis_info[$axis_key] = $axis; } }
function CreateAxes($flags = 0) { $axes = new GRAPHAxes($this->req, $flags); $req = $this->srctree->GetSourceRequests(); foreach ($req as $sreq) { $rdr = $this->CreateReader($sreq); $extra = $rdr->CreateExtraAxes(); if ($extra) { $axes->Add($extra); } } return $axes; }
function ConfigureAxis(GRAPHAxes $axes, INTERVAL $iv, array &$data, array &$spec) { foreach ($data as $key => &$info) { foreach ($info['values'] as $i => &$channel) { $axis = $axes->GetAxis($info['axis'][$i]); $axis->RegisterChannel($info['time'], $channel, $info['items'][$i]); } } $axes->Normalize(); $axes->Enumerate(); $spec['xaxis'] = $this->ConfigureTimeAxis($iv, $data, $spec); $spec['yaxis'] = $this->ConfigureYAxis($axes, $iv, $data, $spec); return array(&$spec['xaxis'], &$spec['yaxis']); }
$list = array("-" => _("All Measurements"), "*-*" => _("Everything")); foreach ($elist as $db) { $list[$db['start'] . '-' . $db['stop']] = $db['name']; } if ($menu) { $list["0"] = _("Custom"); } break; case 'axes': try { $req = new SERVERRequest($_GET); $rdr = $req->CreateReader(); $axes = $rdr->CreateAxes(); } catch (ADEIException $ae) { $req = new REQUEST($_GET); $axes = new GRAPHAxes($req, $flags); } $list = $axes->GetAxesInfo(); $mode = PASSTHROUGH_MODE; break; case 'window_modes': $list = array("0" => _("All")); foreach ($ADEI_TIMINGS as $opt => $value) { $list["{$value}"] = $opt; } if ($menu) { $list["-1"] = _("Custom"); } break; case 'aggregation_modes': $list = array(CACHE::TYPE_AUTO => _("Auto"), CACHE::TYPE_MINMAX => _("MIN-MAX"), CACHE::TYPE_MEAN => _("MEAN"));