Commit 10d555ae authored by 's avatar
Browse files

Packetloss - fixed some stats, improved timing.

GUI - better categorization/filtering of stats, 1 host to n, some fixes.


git-svn-id: file:///home/svn/mapi/trunk@1357 8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent bbe20b3b
......@@ -184,14 +184,6 @@ acronym, abbr, dfn {
padding: 0.1em 0em 0.1em 0.5em; /* MSIE multiplies float margin 2x, have to use padding */
}
.subj0 {
color: red;
}
.subj1 {
color: blue;
}
div.altitle-a { /* Do NOT remove -- altitle depends on this. */
border-width: 1px;
border-color: #2090FF;
......@@ -241,6 +233,6 @@ div.altitle-top {
}
.important:after {
content: " ( ! ) ";
content: " ! ";
background-color: #FFFF00;
}
......@@ -28,14 +28,14 @@ $packetlossTop = new packetlossTop($config->abspath($config->packetloss_home, $c
$form = array();
$form["subject0"] = new FormElement( // checkbox
"subject0",
$form["host0"] = new FormElement( // radio
"host0",
$packetlossTop->hostarr,
"" //array_keys($packetlossTop->hostarr)
);
$form["subject1"] = new FormElement( // checkbox
"subject1",
$form["host1"] = new FormElement( // checkbox
"host1",
$packetlossTop->hostarr,
"" // array_keys($packetlossTop->hostarr)
);
......@@ -50,7 +50,7 @@ $form["time_type"] = new FormElement( // radio
"predefined"
);
$form["times"] = new FormElement( // checkbox
$form["times"] = new FormElement( // checkboxes
"times",
$predefinedTimes = array(
"10m_10x_0" => "10 minutes (int 10 sec)",
......@@ -168,39 +168,63 @@ $form["features"] = new FormElement( // checkbox
)
);
$form["top"] = new FormElement(
"top",
$form["top_stats"] = new FormElement(
"top_stats",
array(
"line" => array(
"label" => "Line stats",
"description" => "Basic stats: Classic and simple view."),
"host" => array(
"label" => "Host stats",
"description" => "Advanced stats: Check this to view stats related to monitoring hosts.\nDo not forget to concretize the host(s) and stats below."),
"overall" => array(
"label" => "Overall stats",
"description" => "Show overall statistics, not specific for any of Host 1 or Host 2.\nNote: These stats should be implemented for host-to-host (line) view soon..."),
),
array(
"line",
// "host",
// "overall"
)
);
$form["top_host"] = new FormElement(
"top_host",
array(
// "basic" => "Basic",
"host0" => array(
"label" => "Host 1",
"description" => "Check this to see stats from 'Host 1' point of view too."),
"host1" => array(
"label" => "Host 2",
"description" => "Check this to see stats from 'Host 2' point of view too."),
"int_stats" => array(
"label" => "Internal statistics (\"at host\")",
"description" => "Statistics generated at host/interface.\nDue to resource limits, some flows can be ignored or dropped already at host/interface, so some informations about them appers in 'internal stats'. However, they are not counted into 'external stats', as they are simply not shipped from host/interface to packetloss application."),
"label" => "Internal stats (\"at host\")",
"description" => "Statistics generated at host/interface.\nDue to resource limits, some flows (records of flows) can be ignored or dropped already at host/interface, so some informations about them appers in 'internal stats'. However, they are not counted into 'external stats', as they are simply not shipped from host/interface to packetloss application."),
"ext_stats" => array(
"label" => "External statistics",
"description" => "Statistics generated by packetloss application."),
"label" => "External stats (\"from host\")",
"description" => "Statistics generated by packetloss application based on data received from monitoring hosts."),
"devices" => array(
"label" => "Separate interfaces",
"description" => "Show statistics per interface, not just per host."),
"description" => "Show statistics per interface, not just per host.")
),
array(
// "host0",
// "host1",
// "int_stats",
// "ext_stats",
// "devices"
)
);
$form["top_rd"] = new FormElement(
"top_rd",
array(
"rd" => array(
"label" => "Separate directions",
"description" => "Resolve from/to direction."),
"peer" => array(
"label" => "Show 'Subject 2' stats too",
"description" => "Check this to see stats related to 'Subject 2 only' too.\n(If not checked, just stats related to 'Subject 1 only' and stats related to 'both Subject 1 and Subject 2' are shown.)"),
"hosts" => array(
"label" => "\"All hosts\" statistics",
"description" => "Show overall statistics, not specific for any of Subject 1 or Subject 2.\nNote: These stats should be implemented for host-to-host view soon..."),
// "single_stats" => "Single statistics"
"description" => "Resolve from/to direction.")
),
array(
// "basic",
// "int_stats",
"ext_stats",
// "devices",
// "rd",
"peer",
// "hosts",
// "single_stats"
"rd"
)
);
......@@ -228,7 +252,7 @@ $form["top_unit"] = new FormElement(
"bytes" => array("label" => "Bytes", "description" => "Check this if you are interested in bytes counts."),
),
array(
"flows",
// "flows",
"pkts",
// "bytes",
)
......@@ -257,6 +281,14 @@ $form["time"] = new FormElement( // select - option (more selects)
$form["time"]->selectedvals[year]
);
$i = 0;
foreach($form["host1"]->elementvals as $host1id => $host1name) {
$checked1 = $form["host1"]->isChecked($host1id);
$checked0 = $form["host0"]->isChecked($host1id);
if($checked1 && $checked0) array_splice($form["host1"]->selectedvals, $i, 1);
$i++;
}
# }}}
?>
......@@ -381,6 +413,9 @@ $form["time"] = new FormElement( // select - option (more selects)
margin-top: 2em;
border-top: 5px solid #F0F0F0;
}
.table {
width: 90%;
}
.thetop {
margin-top: 2em;
}
......@@ -413,6 +448,18 @@ $form["time"] = new FormElement( // select - option (more selects)
font-size: 85%;
}
.host0 {
color: red;
}
.host1 {
color: blue;
}
.host2 {
color: green;
}
<?php if($logging) { ?>
#debug {
clear: left;
......@@ -461,23 +508,23 @@ $form["time"] = new FormElement( // select - option (more selects)
else element.className=element.className.replace(focusedRegExp,''); // XXX can not start class="focused…"
}
function switch_subjects() { // TODO length == undefined
function switch_hosts() { // TODO length == undefined
var h0i;
var h1i;
var subject0 = document.forms["form"].subject0;
var subject1 = document.forms["form"].subject1;
for(i = 0; i < subject0.length; i++)
if(subject0[i].checked) h0i = i;
for(i = 0; i < subject1.length; i++)
if(subject1[i].checked) h1i = i;
subject0[h1i].checked = true;
subject1[h0i].checked = true;
//alert(document.getElementById("_subject0_h" + h1i));
//alert(document.getElementById("_subject0_h" + h1i).className);
document.getElementById("l_subject0_h" + h0i).className = "";
document.getElementById("l_subject0_h" + h1i).className = "strong subj0";
document.getElementById("l_subject1_h" + h1i).className = "";
document.getElementById("l_subject1_h" + h0i).className = "strong subj1";
var host0 = document.forms["form"].host0;
var host1 = document.forms["form"].host1;
for(i = 0; i < host0.length; i++)
if(host0[i].checked) h0i = i;
for(i = 0; i < host1.length; i++)
if(host1[i].checked) h1i = i;
host0[h1i].checked = true;
host1[h0i].checked = true;
//alert(document.getElementById("_host0_h" + h1i));
//alert(document.getElementById("_host0_h" + h1i).className);
document.getElementById("l_host0_h" + h0i).className = "";
document.getElementById("l_host0_h" + h1i).className = "strong host0";
document.getElementById("l_host1_h" + h1i).className = "";
document.getElementById("l_host1_h" + h0i).className = "strong host1";
}
exists = false;
......@@ -510,48 +557,43 @@ $form["time"] = new FormElement( // select - option (more selects)
<div class="steps">
<form name="form" method="get" action="index.php">
<div class="step">
<h2>Step 1: Select monitoring stations:</h2>
<h2>Step 1: Select monitoring hosts</h2>
<div class="medium floatleft">
<span class="th subj0">Subject 1:</span>
<span class="th host0">Host 1:</span>
<?php
$name = $form["subject0"]->name;
foreach($form["subject0"]->elementvals as $key => $val) {
$checked = $form["subject0"]->isChecked($key);
$class = $checked ? " class=\"strong subj0\"" : "";
$name = $form["host0"]->name;
foreach($form["host0"]->elementvals as $key => $val) {
$checked = $form["host0"]->isChecked($key);
$class = $checked ? " class=\"strong host0\"" : "";
echo <<<EOD
<div class="medium tr">
<span class="th"><label id="l_${name}_$key" for="_${name}_$key"$class>$val</label></span>
<span class="td"><input id="_${name}_$key" name="${name}" type="radio" value="$key"$checked /></span>
<span class="th"><label id="l_${name}_$key" for="id_${name}_$key"$class>$val</label></span>
<span class="td"><input id="id_${name}_$key" name="${name}" type="radio" value="$key"$checked /></span>
</div>\n
EOD;
}
?>
</div>
<div class="medium floatleft">
<span class="th subj1">Subject 2:</span>
<span class="th host1">Host 2:</span>
<?php
$name = $form["subject1"]->name;
foreach($form["subject1"]->elementvals as $key => $val) {
$checked = $form["subject1"]->isChecked($key);
$class = $checked ? " class=\"strong subj1\"" : "";
$i = 1;
$name = $form["host1"]->name;
foreach($form["host1"]->elementvals as $key => $val) {
$checked = $form["host1"]->isChecked($key);
$class = $checked ? " class=\"strong host$i\"" : "";
echo <<<EOD
<div class="medium tr">
<span class="th"><label id="l_${name}_$key"for="_${name}_$key"$class>$val</label></span>
<span class="td"><input id="_${name}_$key" name="${name}" type="radio" value="$key"$checked /></span>
<span class="th"><label id="l_${name}_$key"for="id_${name}_$key"$class>$val</label></span>
<span class="td"><input id="id_${name}_$key" name="${name}[]" type="checkbox" value="$key"$checked /></span>
</div>\n
EOD;
if($class) $i++;
}
$checked = $_GET["subject1"] == "*" ? " checked=\"checked\"" : "";
echo <<<EOD
<div class="medium tr">
<span class="th"><label for="_${name}_h">All *</label></span>
<span class="td"><input id="_${name}_h" name="${name}" type="radio" value="*"$checked /></span>
</div>\n
EOD;
?>
</div>
<div class="clear"></div>
<input type="button" value="&lt;&lt;—Switch—&gt;&gt;" onclick="switch_subjects()" />
<!-- input type="button" value="&lt;&lt;—Switch—&gt;&gt;" onclick="switch_hosts()" / -->
</div>
<div class="step">
......@@ -565,8 +607,8 @@ EOD;
$class = ($key == "start_time" ? " clear" : "");
echo <<<EOD
<div class="tr$class">
<span class="th"><label for="_${name}_$key">$val</label></span>
<span class="td"><input id="_${name}_$key" name="${name}" type="radio" value="$key"$checked /></span>
<span class="th"><label for="id_${name}_$key">$val</label></span>
<span class="td"><input id="id_${name}_$key" name="${name}" type="radio" value="$key"$checked /></span>
</div>\n
EOD;
}
......@@ -582,8 +624,8 @@ EOD;
$checked = $form["times"]->isChecked($key);
echo <<<EOD
<div class="tr">
<span class="th"><label for="_$name_$key">$val</label></span>
<span class="td"><input id="_$name_$key" name="${name}[]" type="checkbox" value="$key"$checked /></span>
<span class="th"><label for="id_$name_$key">$val</label></span>
<span class="td"><input id="id_$name_$key" name="${name}[]" type="checkbox" value="$key"$checked /></span>
</div>\n
EOD;
}
......@@ -664,8 +706,8 @@ EOD;
$name = $form["time_length_number"]->name;
$key = $form["time_length_number"]->selectedvals;
echo <<<EOD
<span class="th"><label for="_$name">Time length:</label></span>
<input id="_$name" class="text right" name="$name" type="text" value="$key" size="4" onfocus="this.className+=' focused';" onblur="this.className=this.className.replace(' focused','');" />\n
<span class="th"><label for="id_$name">Time length:</label></span>
<input id="id_$name" class="text right" name="$name" type="text" value="$key" size="4" onfocus="this.className+=' focused';" onblur="this.className=this.className.replace(' focused','');" />\n
EOD;
?>
<select name="time_length_unit" size="1">
......@@ -686,8 +728,8 @@ EOD;
$name = $form["step_number"]->name;
$key = $form["step_number"]->selectedvals;
echo <<<EOD
<span class="th"><label for="_$name">Interval:</label></span>
<input id="_$name" class="text right" name="$name" type="text" value="$key" size="4" onfocus="this.className+=' focused';" onblur="this.className=this.className.replace(' focused','');" />\n
<span class="th"><label for="id_$name">Interval:</label></span>
<input id="id_$name" class="text right" name="$name" type="text" value="$key" size="4" onfocus="this.className+=' focused';" onblur="this.className=this.className.replace(' focused','');" />\n
EOD;
?>
<select name="step_unit" size="1">
......@@ -711,8 +753,8 @@ EOD;
$name = $form["constep_number"]->name;
$key = $form["constep_number"]->selectedvals;
echo <<<EOD
<span class="th"><label for="_$name">Avg / Max / Min:</label></span>
<input id="_$name" class="text right" name="$name" type="text" value="$key" size="4" onfocus="this.className+=' focused';" onblur="this.className=this.className.replace(' focused','');" />\n
<span class="th"><label for="id_$name">Avg / Max / Min:</label></span>
<input id="id_$name" class="text right" name="$name" type="text" value="$key" size="4" onfocus="this.className+=' focused';" onblur="this.className=this.className.replace(' focused','');" />\n
EOD;
?>
<select name="constep_unit" size="1">
......@@ -741,8 +783,8 @@ EOD;
$checked = $form["consolidation"]->isChecked($key);
echo <<<EOD
<div class="tr tiny">
<span class="th"><label for="_$name_$key">$val</label></span>
<span class="td"><input id="_$name_$key" name="${name}[]" type="checkbox" value="$key"$checked /></span>
<span class="th"><label for="id_$name_$key">$val</label></span>
<span class="td"><input id="id_$name_$key" name="${name}[]" type="checkbox" value="$key"$checked /></span>
</div>\n
EOD;
}
......@@ -760,8 +802,8 @@ EOD;
$checked = $form["characteristics"]->isChecked($key);
echo <<<EOD
<div class="tr">
<span class="th"><label for="_$name_$key">$val</label></span>
<span class="td"><input id="_$name_$key" name="${name}[]" type="checkbox" value="$key"$checked /></span>
<span class="th"><label for="id_$name_$key">$val</label></span>
<span class="td"><input id="id_$name_$key" name="${name}[]" type="checkbox" value="$key"$checked /></span>
</div>\n
EOD;
}
......@@ -777,8 +819,8 @@ EOD;
$checked = $form["graph_size"]->isChecked($key);
echo <<<EOD
<div class="tr">
<span class="th"><label for="_$name_$key">$val</label></span>
<span class="td"><input id="_$name_$key" type="radio" name="${name}" value="$key"$checked /></span>
<span class="th"><label for="id_$name_$key">$val</label></span>
<span class="td"><input id="id_$name_$key" type="radio" name="${name}" value="$key"$checked /></span>
</div>\n
EOD;
}
......@@ -796,8 +838,8 @@ EOD;
$checked = $form["features"]->isChecked($key);
echo <<<EOD
<div class="tr">
<span class="th"><label for="_$name_$key">$val</label></span>
<span class="td"><input id="_$name_$key" name="${name}[]" type="checkbox" value="$key"$checked /></span>
<span class="th"><label for="id_$name_$key">$val</label></span>
<span class="td"><input id="id_$name_$key" name="${name}[]" type="checkbox" value="$key"$checked /></span>
</div>\n
EOD;
}
......@@ -806,22 +848,61 @@ EOD;
</div>
<div class="step">
<h2>Step 6: Select "top" characteristics for subjects</h2>
<h2>Step 6: Select "top" characteristics</h2>
<div class="substep">
<h4>Category:</h4>
<h4>Statistics:</h4>
<?php
$name = $form["top"]->name;
foreach($form["top"]->elementvals as $key => $val) {
$checked = $form["top"]->isChecked($key);
$name = $form["top_stats"]->name;
foreach($form["top_stats"]->elementvals as $key => $val) {
$checked = $form["top_stats"]->isChecked($key);
$label = $val["label"];
$description = $val["description"];
$help = "<acronym class=\"help altitleclass_altitle-top\" title=\"$description\">?</acronym> ";
// if($key == "basic") $checked = " checked=\"checked\" disabled=\"disabled\"";
echo <<<EOD
<div class="tr">
<span class="th"><label for="_$name_$key">$help$label</label></span>
<span class="td"><input id="_$name_$key" name="${name}[]" type="checkbox" value="$key"$checked /></span>
<span class="th"><label for="id_$name_$key">$help$label</label></span>
<span class="td"><input id="id_$name_$key" name="${name}[]" type="checkbox" value="$key"$checked /></span>
</div>\n
EOD;
}
?>
<div class="clear"></div>
</div>
<div class="substep">
<h4>Host stats:</h4>
<?php
$name = $form["top_host"]->name;
foreach($form["top_host"]->elementvals as $key => $val) {
$checked = $form["top_host"]->isChecked($key);
$label = $val["label"];
$description = $val["description"];
$help = "<acronym class=\"help altitleclass_altitle-top\" title=\"$description\">?</acronym> ";
echo <<<EOD
<div class="tr">
<span class="th"><label for="id_$name_$key">$help$label</label></span>
<span class="td"><input id="id_$name_$key" name="${name}[]" type="checkbox" value="$key"$checked /></span>
</div>\n
EOD;
}
?>
<div class="clear"></div>
</div>
<div class="substep">
<h4>Direction:</h4>
<?php
$name = $form["top_rd"]->name;
foreach($form["top_rd"]->elementvals as $key => $val) {
$checked = $form["top_rd"]->isChecked($key);
$label = $val["label"];
$description = $val["description"];
$help = "<acronym class=\"help altitleclass_altitle-top\" title=\"$description\">?</acronym> ";
echo <<<EOD
<div class="tr">
<span class="th"><label for="id_$name_$key">$help$label</label></span>
<span class="td"><input id="id_$name_$key" name="${name}[]" type="checkbox" value="$key"$checked /></span>
</div>\n
EOD;
}
......@@ -838,11 +919,10 @@ EOD;
$label = $val["label"];
$description = $val["description"];
$help = "<acronym class=\"help altitleclass_altitle-top\" title=\"$description\">?</acronym> ";
// if($key == "basic") $checked = " checked=\"checked\" disabled=\"disabled\"";
echo <<<EOD
<div class="tr">
<span class="th"><label for="_$name_$key">$help$label</label></span>
<span class="td"><input id="_$name_$key" name="${name}[]" type="checkbox" value="$key"$checked /></span>
<span class="th"><label for="id_$name_$key">$help$label</label></span>
<span class="td"><input id="id_$name_$key" name="${name}[]" type="checkbox" value="$key"$checked /></span>
</div>\n
EOD;
}
......@@ -859,11 +939,10 @@ EOD;
$label = $val["label"];
$description = $val["description"];
$help = "<acronym class=\"help altitleclass_altitle-top\" title=\"$description\">?</acronym> ";
// if($key == "basic") $checked = " checked=\"checked\" disabled=\"disabled\"";
echo <<<EOD
<div class="tr">
<span class="th"><label for="_$name_$key">$help$label</label></span>
<span class="td"><input id="_$name_$key" name="${name}[]" type="checkbox" value="$key"$checked /></span>
<span class="th"><label for="id_$name_$key">$help$label</label></span>
<span class="td"><input id="id_$name_$key" name="${name}[]" type="checkbox" value="$key"$checked /></span>
</div>\n
EOD;
}
......@@ -895,14 +974,14 @@ EOD;
// $h0 = 0;
// $h1 = 0;
foreach($form["subject0"]->elementvals as $host0id => $host0name) {
$checked0 = $form["subject0"]->isChecked($host0id);
foreach($form["host0"]->elementvals as $host0id => $host0name) {
$checked0 = $form["host0"]->isChecked($host0id);
$host0rrddsid = $host0id;
// $h0++;
// $h1 = 0;
if($checked0)
foreach($form["subject1"]->elementvals as $host1id => $host1name) {
$checked1 = $form["subject1"]->isChecked($host1id);
foreach($form["host1"]->elementvals as $host1id => $host1name) {
$checked1 = $form["host1"]->isChecked($host1id);
$host1rrddsid = $host1id;
// $h1++;
// if($h1 <= $h0) continue;
......@@ -916,14 +995,16 @@ EOD;
$checked = $form["times"]->isChecked($key);
if($checked) {
list($dur, $step, $avgmaxmin) = explode("_", $key);
$end = "now";
$start = "end-$dur";
$avg = $form["consolidation"]->isChecked("avg") ? $avgmaxmin : 0;
$max = $form["consolidation"]->isChecked("max") ? $avgmaxmin : 0;
$min = $form["consolidation"]->isChecked("min") ? $avgmaxmin : 0;
$aquery = arr2query(array(
"host0rrddsid" => $host0rrddsid,
"host1rrddsid" => $host1rrddsid,
"end" => "now",
"start" => "end-$dur",
"end" => $end,
"start" => $start,
"avg" => $avg,
"min" => $min,
"max" => $max,
......@@ -933,8 +1014,8 @@ EOD;
$iquery = arr2query(array(
"host0rrddsid" => $host0rrddsid,
"host1rrddsid" => $host1rrddsid,
"end" => "now",
"start" => "end-$dur",
"end" => $end,
"start" => $start,
"avg" => $avg,
"min" => $min,
"max" => $max,
......@@ -967,6 +1048,9 @@ EOD;
}
break;
case "start_time":
$start = $seconds;
$end = ($seconds + time_to_sec($form["time_length_number"]->selectedvals, $form["time_length_unit"]->selectedvals));
$step = time_to_sec($form["step_number"]->selectedvals, $form["step_unit"]->selectedvals);
$avgmaxmin = time_to_sec($form["constep_number"]->selectedvals, $form["constep_unit"]->selectedvals);
$avg = $form["consolidation"]->isChecked("avg") ? $avgmaxmin : 0;
$max = $form["consolidation"]->isChecked("max") ? $avgmaxmin : 0;
......@@ -974,9 +1058,9 @@ EOD;
$aquery = arr2query(array(
"host0rrddsid" => $host0rrddsid,
"host1rrddsid" => $host1rrddsid,
"start" => $seconds,
"end" => ($seconds + time_to_sec($form["time_length_number"]->selectedvals, $form["time_length_unit"]->selectedvals)),
"step" => time_to_sec($form["step_number"]->selectedvals, $form["step_unit"]->selectedvals),
"start" => $start,
"end" => $end,
"step" => $step,
"avg" => $avg,
"max" => $max,
"min" => $min,
......@@ -986,9 +1070,9 @@ EOD;
$iquery = arr2query(array(
"host0rrddsid" => $host0rrddsid,
"host1rrddsid" => $host1rrddsid,
"start" => $seconds,
"end" => ($seconds + time_to_sec($form["time_length_number"]->selectedvals, $form["time_length_unit"]->selectedvals)),
"step" => time_to_sec($form["step_number"]->selectedvals, $form["step_unit"]->selectedvals),
"start" => $start,
"end" => $end,
"step" => $step,
"avg" => $avg,
"max" => $max,
"min" => $min,
......@@ -1010,7 +1094,7 @@ EOD;
if($debug) $viewsource="<span class=\"note line right\"><a href=\"graph/$key2.php?$aquery&amp;info=source\">view source</a></span>";
echo <<<EOD
<div class="graph">
<a href="graph/$key2.php?$aquery" title="User Defined: From &amp;start to &amp;end. Image dimensions: &amp;width × &amp;height.">
<a href="graph/$key2.php?$aquery" class="noaltitle" title="User Defined: From &amp;start to &amp;end. Image dimensions: &amp;width × &amp;height.">
<img src="graph/$key2.php?$iquery" width="${widthpx}px" height="${heightpx}px" alt="User Defined: From &amp;start to &amp;end. Image dimensions: &amp;width × &amp;height." title="—" />
</a>
$viewsource
......@@ -1020,6 +1104,9 @@ EOD;
}
break;
case "end_time":
$start = ($seconds - time_to_sec($form["time_length_number"]->selectedvals, $form["time_length_unit"]->selectedvals));
$end = $seconds;
$step = time_to_sec($form["step_number"]->selectedvals, $form["step_unit"]->selectedvals);
$avgmaxmin = time_to_sec($form["constep_number"]->selectedvals, $form["constep_unit"]->selectedvals);
$avg = $form["consolidation"]->isChecked("avg") ? $avgmaxmin : 0;
$max = $form["consolidation"]->isChecked("max") ? $avgmaxmin : 0;
......@@ -1027,9 +1114,9 @@ EOD;
$aquery = arr2query(array(
"host0rrddsid" => $host0rrddsid,
"host1rrddsid" => $host1rrddsid,
"start" => ($seconds - time_to_sec($form["time_length_number"]->selectedvals, $form["time_length_unit"]->selectedvals)),
"end" => $seconds,
"step" => time_to_sec($form["step_number"]->selectedvals, $form["step_unit"]->selectedvals),
"start" => $start,
"end" => $end,
"step" => $step,
"avg" => $avg,
"max" => $max,
"min" => $min,
......@@ -1039,9 +1126,9 @@ EOD;
$iquery = arr2query(array(
"host0rrddsid" => $host0rrddsid,
"host1rrddsid" => $host1rrddsid,
"start" => ($seconds - time_to_sec($form["time_length_number"]->selectedvals, $form["time_length_unit"]->selectedvals)),