Added field to get string modules
This commit is contained in:
parent
de65e7cf27
commit
eb39d25c4b
|
@ -800,6 +800,8 @@ function readFields() {
|
|||
values['top'] = $("input[name=top]").val();
|
||||
values['agent'] = $("input[name=agent]").val();
|
||||
values['id_agent'] = $("input[name=id_agent]").val();
|
||||
values['agent_string'] = $("input[name=agent_string]").val();
|
||||
values['id_agent_string'] = $("input[name=id_agent_string]").val();
|
||||
values['module'] = $("select[name=module]").val();
|
||||
values['process_simple_value'] = $("select[name=process_value]").val();
|
||||
values['background'] = $("#background_image").val();
|
||||
|
@ -910,7 +912,7 @@ function create_button_palette_callback() {
|
|||
}
|
||||
break;
|
||||
case 'donut_graph':
|
||||
if ((values['agent'] == '')) {
|
||||
if ((values['agent_string'] == '')) {
|
||||
alert($("#message_alert_no_agent").html());
|
||||
validate = false;
|
||||
}
|
||||
|
@ -1442,11 +1444,16 @@ function loadFieldsFromDB(item) {
|
|||
if (key == 'pos_y') $("input[name=top]").val(val);
|
||||
if (key == 'agent_name') {
|
||||
$("input[name=agent]").val(val);
|
||||
$("input[name=agent_string]").val(val);
|
||||
//Reload no-sincrone the select of modules
|
||||
}
|
||||
|
||||
if (key == 'id_agent') {
|
||||
$("input[name=id_agent]").val(val);
|
||||
}
|
||||
if (key == 'id_agent_string') {
|
||||
$("input[name=id_agent_string]").val(val);
|
||||
}
|
||||
if (key == 'modules_html') {
|
||||
$("select[name=module]").empty().html(val);
|
||||
$("select[name=module]").val(moduleId);
|
||||
|
@ -1714,6 +1721,9 @@ function hiddenFields(item) {
|
|||
$("#agent_row").css('display', 'none');
|
||||
$("#agent_row." + item).css('display', '');
|
||||
|
||||
$("#agent_row_string").css('display', 'none');
|
||||
$("#agent_row_string." + item).css('display', '');
|
||||
|
||||
$("#module_row").css('display', 'none');
|
||||
$("#module_row." + item).css('display', '');
|
||||
|
||||
|
@ -1838,6 +1848,7 @@ function cleanFields(item) {
|
|||
$("input[name=left]").val(0);
|
||||
$("input[name=top]").val(0);
|
||||
$("input[name=agent]").val('');
|
||||
$("input[name=agent_string]").val('');
|
||||
$("select[name=module]").val('');
|
||||
$("select[name=process_value]").val(0);
|
||||
$("select[name=background_image]").val('');
|
||||
|
@ -2452,7 +2463,7 @@ function setDonutsGraph (id_data, values) {
|
|||
|
||||
parameter.push ({name: "page", value: "include/ajax/visual_console_builder.ajax"});
|
||||
parameter.push ({name: "action", value: "get_module_type_string"});
|
||||
parameter.push ({name: "id_agent", value: values['id_agent']});
|
||||
parameter.push ({name: "id_agent", value: values['id_agent_string']});
|
||||
parameter.push ({name: "module", value: values['module']});
|
||||
parameter.push ({name: "id_element", value: id_data});
|
||||
parameter.push ({name: "id_visual_console", value: id_visual_console});
|
||||
|
|
|
@ -113,6 +113,7 @@ $metaconsole = get_parameter('metaconsole', 0);
|
|||
$server_name = get_parameter('server_name', null);
|
||||
$server_id = (int)get_parameter('server_id', 0);
|
||||
$id_agent = get_parameter('id_agent', null);
|
||||
$id_agent_string = get_parameter('id_agent_string', null);
|
||||
$id_metaconsole = get_parameter('id_metaconsole', null);
|
||||
$id_group = (int)get_parameter('id_group', 0);
|
||||
$id_custom_graph = get_parameter('id_custom_graph', null);
|
||||
|
@ -179,7 +180,7 @@ switch ($action) {
|
|||
}
|
||||
|
||||
$is_string = db_get_value_filter ('id_tipo_modulo', 'tagente_modulo',
|
||||
array ('id_agente' => $id_agent,
|
||||
array ('id_agente' => _string,
|
||||
'id_agente_modulo' => $id_module));
|
||||
|
||||
if ($layoutData['id_metaconsole'] != 0) {
|
||||
|
@ -611,6 +612,7 @@ switch ($action) {
|
|||
}
|
||||
$values['border_color'] = $resume_color;
|
||||
$values['type'] = DONUT_GRAPH;
|
||||
$values['id_agent'] = $id_agent_string;
|
||||
|
||||
break;
|
||||
case 'box_item':
|
||||
|
@ -1013,6 +1015,7 @@ switch ($action) {
|
|||
$values['width'] = $width;
|
||||
$values['height'] = $height;
|
||||
$values['border_color'] = $resume_color;
|
||||
$values['id_agent'] = $id_agent_string;
|
||||
break;
|
||||
case 'module_graph':
|
||||
$values['type'] = MODULE_GRAPH;
|
||||
|
|
|
@ -2973,6 +2973,11 @@ function ui_print_agent_autocomplete_input($parameters) {
|
|||
else
|
||||
$metaconsole_enabled = false;
|
||||
}
|
||||
|
||||
$get_only_string_modules = false;
|
||||
if (isset($parameters['get_only_string_modules'])) {
|
||||
$get_only_string_modules = true;
|
||||
}
|
||||
|
||||
$spinner_image = html_print_image('images/spinner.gif', true, false, true);
|
||||
if (isset($parameters['spinner_image'])) {
|
||||
|
@ -3128,6 +3133,10 @@ function ui_print_agent_autocomplete_input($parameters) {
|
|||
if (' . ((int) $get_order_json) . ') {
|
||||
inputs.push ("get_order_json=1");
|
||||
}
|
||||
|
||||
if (' . ((int) $get_only_string_modules) . ') {
|
||||
inputs.push ("get_only_string_modules=1");
|
||||
}
|
||||
|
||||
if (' . ((int)$metaconsole_enabled) . ') {
|
||||
if ((' . ((int)$use_input_server) . ')
|
||||
|
|
|
@ -290,7 +290,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) {
|
|||
$form_items['agent_row'] = array();
|
||||
$form_items['agent_row']['items'] = array('static_graph',
|
||||
'percentile_bar', 'percentile_item', 'module_graph',
|
||||
'simple_value', 'datos', 'auto_sla_graph', 'bars_graph', 'donut_graph');
|
||||
'simple_value', 'datos', 'auto_sla_graph', 'bars_graph');
|
||||
$form_items['agent_row']['html'] = '<td align="left">' .
|
||||
__('Agent') . '</td>';
|
||||
$params = array();
|
||||
|
@ -320,6 +320,39 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) {
|
|||
$form_items['agent_row']['html'] .= '<td align="left">' .
|
||||
ui_print_agent_autocomplete_input($params) .
|
||||
'</td>';
|
||||
|
||||
$form_items['agent_row_string'] = array();
|
||||
$form_items['agent_row_string']['items'] = array('donut_graph');
|
||||
$form_items['agent_row_string']['html'] = '<td align="left">' .
|
||||
__('Agent') . '</td>';
|
||||
$params = array();
|
||||
$params['return'] = true;
|
||||
$params['show_helptip'] = true;
|
||||
$params['input_name'] = 'agent_string';
|
||||
$params['size'] = 30;
|
||||
$params['selectbox_id'] = 'module';
|
||||
$params['javascript_is_function_select'] = true;
|
||||
$params['use_hidden_input_idagent'] = true;
|
||||
$params['print_hidden_input_idagent'] = true;
|
||||
$params['hidden_input_idagent_name'] = 'id_agent_string';
|
||||
$params['get_order_json'] = true;
|
||||
$params['get_only_string_modules'] = true;
|
||||
if (defined('METACONSOLE')) {
|
||||
$params['javascript_ajax_page'] = '../../ajax.php';
|
||||
$params['disabled_javascript_on_blur_function'] = true;
|
||||
|
||||
$params['print_input_server'] = true;
|
||||
$params['print_input_id_server'] = true;
|
||||
$params['input_server_id'] = 'id_server_name';
|
||||
$params['input_id_server_name'] = 'id_server_metaconsole';
|
||||
$params['input_server_value'] = '';
|
||||
$params['use_input_id_server'] = true;
|
||||
$params['metaconsole_enabled'] = true;
|
||||
$params['print_hidden_input_idagent'] = true;
|
||||
}
|
||||
$form_items['agent_row_string']['html'] .= '<td align="left">' .
|
||||
ui_print_agent_autocomplete_input($params) .
|
||||
'</td>';
|
||||
|
||||
$form_items['module_row'] = array();
|
||||
$form_items['module_row']['items'] = array('static_graph',
|
||||
|
|
|
@ -589,6 +589,11 @@ if (is_ajax ()) {
|
|||
if (empty($filter))
|
||||
$filter = false;
|
||||
|
||||
$get_only_string_modules = get_parameter('get_only_string_modules', false);
|
||||
if ($get_only_string_modules) {
|
||||
$filter['tagente_modulo.id_tipo_modulo IN'] = "(17,23,3,10,33)";
|
||||
}
|
||||
|
||||
// Status selector
|
||||
if ($status_modulo == AGENT_MODULE_STATUS_NORMAL) { //Normal
|
||||
$sql_conditions .= ' estado = 0 AND utimestamp > 0 )
|
||||
|
|
Loading…
Reference in New Issue