2012-03-12 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_visual_map.php, godmode/reporting/visual_console_builder.wizard.php, godmode/reporting/visual_console_builder.php: added lost feature to set into the wizard the kind of label ("agent", "module", "agent-module" or empty). git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5739 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
00e89cc78e
commit
7e49bb8135
|
@ -1,3 +1,10 @@
|
|||
2012-03-12 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_visual_map.php,
|
||||
godmode/reporting/visual_console_builder.wizard.php,
|
||||
godmode/reporting/visual_console_builder.php: added lost feature to set into
|
||||
the wizard the kind of label ("agent", "module", "agent-module" or empty).
|
||||
|
||||
2012-03-12 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/ajax/agent.php: added the query "get_agents_group" for getting the
|
||||
|
|
|
@ -177,6 +177,7 @@ switch ($activeTab) {
|
|||
$max_value = (int) get_parameter ("max_value", 0);
|
||||
$type_percentile = get_parameter ("type_percentile", 'percentile');
|
||||
$value_show = get_parameter ("value_show", 'percent');
|
||||
$label_type = get_parameter ("label_type", 'agent_module');
|
||||
|
||||
$message = '';
|
||||
|
||||
|
@ -199,7 +200,7 @@ switch ($activeTab) {
|
|||
$message .= visual_map_process_wizard_add_modules($id_modules,
|
||||
$image, $idVisualConsole, $range, $width, $height,
|
||||
$period, $process_value, $percentileitem_width,
|
||||
$max_value, $type_percentile, $value_show, $type);
|
||||
$max_value, $type_percentile, $value_show, $label_type, $type);
|
||||
}
|
||||
else {
|
||||
$id_modules = array();
|
||||
|
@ -215,7 +216,7 @@ switch ($activeTab) {
|
|||
$message .= visual_map_process_wizard_add_modules($id_modules,
|
||||
$image, $idVisualConsole, $range, $width, $height,
|
||||
$period, $process_value, $percentileitem_width,
|
||||
$max_value, $type_percentile, $value_show, $type);
|
||||
$max_value, $type_percentile, $value_show, $label_type, $type);
|
||||
}
|
||||
$statusProcessInDB = array('flag' => true, 'message' => $message);
|
||||
}
|
||||
|
|
|
@ -132,6 +132,14 @@ $table->rowstyle["all_4"] = 'display: none;';
|
|||
$table->data["all_4"][0] = __('Modules');
|
||||
$table->data["all_4"][1] = html_print_select (array (), 'module[]', 0, false, __('None'), -1, true, true);
|
||||
|
||||
$table->rowstyle["all_5"] = 'display: none;';
|
||||
$table->data["all_5"][0] = __('Label');
|
||||
$label_type = array ('agent_module' => __('Agent - Module'),
|
||||
'module' => __('Module'),
|
||||
'agent' => __('Agent'),
|
||||
'none' => __('None'));
|
||||
$table->data["all_5"][1] = html_print_select ($label_type, 'label_type', 'agent_module', '', '', '', true);
|
||||
|
||||
echo '<form method="post"
|
||||
action="index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=' . $activeTab . '&id_visual_console=' . $visualConsole["id"] . '"
|
||||
onsubmit="if (! confirm(\''.__('Are you sure to add many elements\nin visual map?').'\')) return false; else return check_fields();">';
|
||||
|
@ -204,7 +212,6 @@ $(document).ready (function () {
|
|||
});
|
||||
|
||||
function check_fields() {
|
||||
console.log(999);
|
||||
switch ($("#type").val()) {
|
||||
case "<?php echo PERCENTILE_BAR;?>":
|
||||
case "<?php echo MODULE_GRAPH;?>":
|
||||
|
|
|
@ -398,7 +398,7 @@ function visual_map_process_wizard_add ($id_agents, $image, $id_layout, $range,
|
|||
*/
|
||||
function visual_map_process_wizard_add_modules ($id_modules, $image, $id_layout,
|
||||
$range, $width = 0, $height = 0, $period, $process_value, $percentileitem_width,
|
||||
$max_value, $type_percentile, $value_show, $type) {
|
||||
$max_value, $type_percentile, $value_show, $label_type, $type) {
|
||||
if (empty ($id_modules)) {
|
||||
$return = ui_print_error_message (__('No modules selected'), '', true);
|
||||
return $return;
|
||||
|
@ -441,8 +441,25 @@ function visual_map_process_wizard_add_modules ($id_modules, $image, $id_layout,
|
|||
break;
|
||||
}
|
||||
|
||||
$label = ui_print_truncate_text(agents_get_name ($id_agent), 8, false, true, false, '…', false);
|
||||
$label .= " - " . ui_print_truncate_text(modules_get_agentmodule_name($id_module), 8, false, true, false, '…', false);
|
||||
switch ($label_type) {
|
||||
case 'agent_module':
|
||||
default:
|
||||
$agent_label = ui_print_truncate_text(agents_get_name ($id_agent), 8, false, true, false, '…', false);
|
||||
$module_label = ui_print_truncate_text(modules_get_agentmodule_name($id_module), 8, false, true, false, '…', false);
|
||||
$label = $agent_label . " - " . $module_label;
|
||||
break;
|
||||
case 'module':
|
||||
$module_label = ui_print_truncate_text(modules_get_agentmodule_name($id_module), 8, false, true, false, '…', false);
|
||||
$label = $module_label;
|
||||
break;
|
||||
case 'agent':
|
||||
$agent_label = ui_print_truncate_text(agents_get_name ($id_agent), 8, false, true, false, '…', false);
|
||||
$label = $agent_label;
|
||||
break;
|
||||
case 'none':
|
||||
$label = '';
|
||||
break;
|
||||
}
|
||||
$label = io_safe_input($label);
|
||||
|
||||
$values = array ('type' => $value_type,
|
||||
|
|
Loading…
Reference in New Issue