2010-03-30 Miguel de Dios <miguel.dedios@artica.es>
* include/ajax/visual_console_builder.ajax.php: some cleaned the source code...need more. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2529 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
61c68e4840
commit
c3e8829b33
|
@ -1,4 +1,9 @@
|
|||
2010-03-29 Miguel de Dios <miguel.dedios@artica.es>
|
||||
2010-03-30 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/ajax/visual_console_builder.ajax.php: some cleaned the source
|
||||
code...need more.
|
||||
|
||||
2010-03-30 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_visual_map.php,
|
||||
godmode/reporting/visual_console_builder.wizard.php,
|
||||
|
|
|
@ -165,68 +165,12 @@ switch ($action) {
|
|||
echo json_encode($backgroundFields);
|
||||
break;
|
||||
case 'percentile_bar':
|
||||
$elementFields = get_db_row_filter('tlayout_data', array('id' => $id_element));
|
||||
$elementFields['agent_name'] = get_agent_name($elementFields['id_agent']);
|
||||
|
||||
$elementFields['width_percentile'] = $elementFields['width'];
|
||||
$elementFields['max_percentile'] = $elementFields['height'];
|
||||
|
||||
if ($elementFields['id_agent'] != 0) {
|
||||
$modules = get_agent_modules ($elementFields['id_agent'], false, array('disabled' => 0, 'id_agente' => $elementFields['id_agent']));
|
||||
|
||||
$elementFields['modules_html'] = '<option value="0">--</option>';
|
||||
foreach ($modules as $id => $name) {
|
||||
$elementFields['modules_html'] .= '<option value="' . $id . '">' . $name . '</option>';
|
||||
}
|
||||
}
|
||||
else {
|
||||
$elementFields['modules_html'] = '<option value="0">' . __('Any') . '</option>';
|
||||
}
|
||||
|
||||
echo json_encode($elementFields);
|
||||
break;
|
||||
case 'static_graph':
|
||||
$elementFields = get_db_row_filter('tlayout_data', array('id' => $id_element));
|
||||
$elementFields['agent_name'] = get_agent_name($elementFields['id_agent']);
|
||||
|
||||
if ($elementFields['id_agent'] != 0) {
|
||||
$modules = get_agent_modules ($elementFields['id_agent'], false, array('disabled' => 0, 'id_agente' => $elementFields['id_agent']));
|
||||
|
||||
$elementFields['modules_html'] = '<option value="0">--</option>';
|
||||
foreach ($modules as $id => $name) {
|
||||
$elementFields['modules_html'] .= '<option value="' . $id . '">' . $name . '</option>';
|
||||
}
|
||||
}
|
||||
else {
|
||||
$elementFields['modules_html'] = '<option value="0">' . __('Any') . '</option>';
|
||||
}
|
||||
|
||||
echo json_encode($elementFields);
|
||||
break;
|
||||
case 'module_graph':
|
||||
$elementFields = get_db_row_filter('tlayout_data', array('id' => $id_element));
|
||||
$elementFields['agent_name'] = get_agent_name($elementFields['id_agent']);
|
||||
$elementFields['width_module_graph'] = $elementFields['width'];
|
||||
$elementFields['height_module_graph'] = $elementFields['height'];
|
||||
|
||||
if ($elementFields['id_agent'] != 0) {
|
||||
$modules = get_agent_modules ($elementFields['id_agent'], false, array('disabled' => 0, 'id_agente' => $elementFields['id_agent']));
|
||||
|
||||
$elementFields['modules_html'] = '<option value="0">--</option>';
|
||||
foreach ($modules as $id => $name) {
|
||||
$elementFields['modules_html'] .= '<option value="' . $id . '">' . $name . '</option>';
|
||||
}
|
||||
}
|
||||
else {
|
||||
$elementFields['modules_html'] = '<option value="0">' . __('Any') . '</option>';
|
||||
}
|
||||
|
||||
echo json_encode($elementFields);
|
||||
break;
|
||||
case 'simple_value':
|
||||
$elementFields = get_db_row_filter('tlayout_data', array('id' => $id_element));
|
||||
$elementFields['agent_name'] = get_agent_name($elementFields['id_agent']);
|
||||
|
||||
//Make the html of select box of modules about id_agent.
|
||||
if ($elementFields['id_agent'] != 0) {
|
||||
$modules = get_agent_modules ($elementFields['id_agent'], false, array('disabled' => 0, 'id_agente' => $elementFields['id_agent']));
|
||||
|
||||
|
@ -238,7 +182,16 @@ switch ($action) {
|
|||
else {
|
||||
$elementFields['modules_html'] = '<option value="0">' . __('Any') . '</option>';
|
||||
}
|
||||
|
||||
switch ($type) {
|
||||
case 'percentile_bar':
|
||||
$elementFields['width_percentile'] = $elementFields['width'];
|
||||
$elementFields['max_percentile'] = $elementFields['height'];
|
||||
break;
|
||||
case 'module_graph':
|
||||
$elementFields['width_module_graph'] = $elementFields['width'];
|
||||
$elementFields['height_module_graph'] = $elementFields['height'];
|
||||
break;
|
||||
}
|
||||
echo json_encode($elementFields);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue