debug: affichage des valeurs false, true, on, off
This commit is contained in:
parent
566fc0e40c
commit
c0aef550ab
@ -39,6 +39,25 @@ function displayStats($ieeeAddress, $fn, $property, $startDate, $endDate)
|
|||||||
//print_r($mohaDB);
|
//print_r($mohaDB);
|
||||||
if ($mohaDB->affected_rows != 0)
|
if ($mohaDB->affected_rows != 0)
|
||||||
{
|
{
|
||||||
|
$n = $mohaDB->affected_rows;
|
||||||
|
for($i=0;$i<$n;$i++)
|
||||||
|
{
|
||||||
|
//echo $i . "======>";
|
||||||
|
if (strtolower($datas[$i]["value"]) == "on" or strtolower($datas[$i]["value"]) == "true")
|
||||||
|
{
|
||||||
|
//echo "setting value to : 1 =>" . __FILE__ . ":" . __LINE__ . EOLH;
|
||||||
|
$datas[$i]["value"] = 1;
|
||||||
|
}elseif (strtolower($datas[$i]["value"]) == "off" or strtolower($datas[$i]["value"]) == "false")
|
||||||
|
{
|
||||||
|
//echo "setting value to : 0 =>" . __FILE__ . ":" . __LINE__ . EOLH;
|
||||||
|
$datas[$i]["value"] = 0;
|
||||||
|
}
|
||||||
|
/*else
|
||||||
|
{
|
||||||
|
//echo "strange value : " . $datas[$i]["value"] . " => " . __FILE__ . ":" . __LINE__ .EOLH;
|
||||||
|
}*/
|
||||||
|
//var_dump($datas);
|
||||||
|
}
|
||||||
print diagramDisplay($datas);
|
print diagramDisplay($datas);
|
||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
|
@ -23,7 +23,7 @@ if (empty($indexIeeeAddress))
|
|||||||
// print_r($devices);
|
// print_r($devices);
|
||||||
print '<form method="GET" action="display_stats.php">';
|
print '<form method="GET" action="display_stats.php">';
|
||||||
//print '<input type="hidden" name="fn" value="">';
|
//print '<input type="hidden" name="fn" value="">';
|
||||||
print '<label for="devicesSelectList">' . _("Choose a device:") . '</label>
|
print '<label for="devicesSelectList">' . _("Choose a property to display:") . '</label>
|
||||||
<select name="device" id="devicesSelectList">' ;
|
<select name="device" id="devicesSelectList">' ;
|
||||||
foreach ($devices as $value)
|
foreach ($devices as $value)
|
||||||
{
|
{
|
||||||
@ -33,6 +33,8 @@ if (empty($indexIeeeAddress))
|
|||||||
$devicesList[$value["device"]][] = $value["property"];
|
$devicesList[$value["device"]][] = $value["property"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
array_multisort($devicesList);
|
||||||
|
|
||||||
//$devicesList = array_intersect_key($indexIeeeAddress, $tmp);
|
//$devicesList = array_intersect_key($indexIeeeAddress, $tmp);
|
||||||
//print_r($devicesList);
|
//print_r($devicesList);
|
||||||
foreach($devicesList as $ieeeAddress => $array)
|
foreach($devicesList as $ieeeAddress => $array)
|
||||||
|
Loading…
Reference in New Issue
Block a user