| \n";
}
}
echo "\n"; // $use_filter_shard = $filter_shard; $use_filter_server = $filter_server; $use_filter_service = $filter_service; $use_filter_entity = $filter_entity; if (!isset($use_filter_shard) || $use_filter_shard == "") $use_filter_shard = "*"; if (!isset($use_filter_server) || $use_filter_server == "") $use_filter_server = "*"; if (!isset($use_filter_service) || $use_filter_service == "") $use_filter_service = "*"; if (!isset($use_filter_entity) || $use_filter_entity == "") $use_filter_entity = "*"; $view_filter = $use_filter_shard.".".$use_filter_server.".".$use_filter_service.".".$use_filter_entity; $selAllShards = false; for ($i=0; $i |
\n";
$i = 1;
echo "
|
|
Refresh rate |
---|
Selection |
---|
$s |
\n";
$queryErrors = array();
// update values
if ($upd_values)
{
unset($update);
$tid = $current_tid;
foreach ($HTTP_VARS as $var => $value)
if (strncmp($var, "override_", 9) == 0)
$overriden[substr($var, 9)]=$value;
$shardAccessForbidden = array();
foreach ($HTTP_VARS as $var => $value)
{
if (strncmp($var, "updvar_", 7) == 0)
{
$vv = substr($var, 7);
$prevValue = $GLOBALS["prevvar_$vv"];
$var_split = explode("|", $vv);
$shard = $var_split[0];
$var_split = $var_split[count($var_split)-1];
$override = $overriden[$var_split];
if ($shardLockState[$shard]['lock_state'] != 1)
{
if (!$shardAccessForbidden[$shard])
{
$shardAccessForbidden[$shard] = true;
$queryErrors[] = "You can't update values on shard '$shard', access is not locked for you";
}
continue;
}
if ($value != $prevValue)
{
$address = str_replace("|", ".", $vv);
$update[] = "$address=$value";
}
else if (isset($override) && $override != "" && $override != $prevValue)
{
$address = str_replace("|", ".", $vv);
$update[] = "$address=$override";
}
}
else if (strncmp($var, "current_select_", 15) == 0)
{
$sel[] = $value;
}
}
$sel = array_unique($sel);
if (isset($update) && count($update > 0))
{
if (count($update) > 1)
{
$query = "[".join(",", $update)."]";
$query = factorizeQuery($query);
}
else
$query = $update[0];
$executeQuery = $query;
$bef = microtime();
logUser($uid, "UPDATE=".$executeQuery);
$qstate = nel_query($executeQuery, $updateResult);
$aft = microtime();
list($usec, $sec) = explode(" ", $bef);
$bef = ((float)$sec + (float)$usec);
list($usec, $sec) = explode(" ", $aft);
$aft = ((float)$sec + (float)$usec);
$tm = (int)(($aft-$bef)*1000.0);
$queryResult = "Executed $executeQuery $tm milliseconds computation time \n"; } } else if (isset($executeQuery)) { $bef = microtime(); $qstate = nel_query($executeQuery, $updateResult); $aft = microtime(); list($usec, $sec) = explode(" ", $bef); $bef = ((float)$sec + (float)$usec); list($usec, $sec) = explode(" ", $aft); $aft = ((float)$sec + (float)$usec); $tm = (int)(($aft-$bef)*1000.0); $queryResult = "Executed $executeQuery $tm milliseconds computation time \n"; } if ($updateResult) { buildVariableEnv($uid, $gid, $tid, $vardisp, $bounds, $privilege, $tree, $condensed, $autoDisplay); displayResult($updateResult, $vardisp, $bounds, $privilege); } else { // send select request if (count($sel) > 0) $sel = array_unique($sel); if (count($sel) == 1 && $sel[0] == "") unset($sel); $queryResult = displayViewTable($uid, $gid, $tid, $sel); } echo "\n"; $i=0; if (count($sel) > 0) foreach ($sel as $selec) echo "\n"; if (isset($tid) && $tid != "") { $result = sqlquery("SELECT view_row.name AS name, variable.vid AS vid FROM view_row, variable WHERE tid='$tid' AND variable.command='command' AND view_row.vid=variable.vid ORDER BY ordering"); if ($result && sqlnumrows($result) > 0) { echo " Service commands The commands are sent to all services seen in the view above \n"; echo "Command parameters \n"; echo " Result of command '$fullPath $execServParams': \n"; echo "
Execution errors:\n"; foreach ($queryErrors as $error) echo " $error\n"; } echo " $queryResult\n"; echo " |
| \n";
echo "