From 64486bc8968fd72a64136819f2ad10a08ffb2656 Mon Sep 17 00:00:00 2001 From: enriquecd Date: Fri, 14 Oct 2016 18:51:17 +0200 Subject: [PATCH] Checkbox de recursividad en paradas programadas [ext:3243 --- .../agentes/planned_downtime.editor.php | 41 ++- .../custom_logo/pandora_logo_head_3.png | Bin 3543 -> 3644 bytes .../custom_logo/pandora_logo_head_4.png | Bin 3644 -> 3543 bytes .../include/javascript/pandora_modules.js | 7 +- pandora_console/include/styles/pandora.css | 7 +- .../operation/agentes/status_monitor.php | 237 ++++++++++++++++-- .../operation/agentes/ver_agente.php | 18 +- 7 files changed, 271 insertions(+), 39 deletions(-) diff --git a/pandora_console/godmode/agentes/planned_downtime.editor.php b/pandora_console/godmode/agentes/planned_downtime.editor.php index 5ed25e4e2a..9f56a63897 100644 --- a/pandora_console/godmode/agentes/planned_downtime.editor.php +++ b/pandora_console/godmode/agentes/planned_downtime.editor.php @@ -47,6 +47,10 @@ ui_print_page_header( true, $buttons); +//recursion group filter +$recursion = get_parameter('recursion', $_POST['recursion']); + + //Initialize data $id_group = (int) get_parameter ('id_group'); $name = (string) get_parameter ('name'); @@ -628,7 +632,7 @@ echo ''; if ($id_downtime > 0) { - echo ""; + echo ""; // Show available agents to include into downtime echo '

' . __('Available agents') . ':

'; @@ -643,8 +647,31 @@ if ($id_downtime > 0) { } $filter_cond = ''; - if ($filter_group > 0) - $filter_cond = " AND id_grupo = $filter_group "; + if ($filter_group > 0){ + if($recursion){ + $rg = groups_get_id_recursive($filter_group, true); + $filter_cond .= " AND id_grupo IN ("; + + $i = 0; + $len = count($rg); + + foreach ($rg as $key) { + + if ($i == $len - 1) { + $filter_cond .= $key.")"; + }else{ + $i++; + $filter_cond .= $key.","; + } + } + + } + else{ + $filter_cond = " AND id_grupo = $filter_group "; + } + + } + $sql = sprintf("SELECT tagente.id_agente, tagente.nombre FROM tagente WHERE tagente.id_agente NOT IN ( @@ -671,17 +698,19 @@ if ($id_downtime > 0) { $disabled_add_button = true; } + echo "
"; + html_print_select_groups(false, $access, true, 'filter_group', $filter_group, '', '', '', false, false, true, '', false, 'min-width:180px;width:180px;max-width:180px;margin-right:15px;'); - html_print_select_groups(false, $access, true, 'filter_group', $filter_group, '', '', '', false, false, true, '', false, 'width:180px'); - + html_print_checkbox ("recursion", !$_POST['recursion'], $_POST['recursion'], false, false, ''); + echo __('Recursion') . ' '; echo "

"; html_print_submit_button (__('Filter by group'), '', false, 'class="sub next"',false); echo "
"; echo "
"; - echo html_print_select ($agents, "id_agents[]", '', '', '', 0, false, true, true, '', false, 'width: 180px;'); + echo html_print_select ($agents, "id_agents[]", -1, '', _("Any"), -2, false, true, true, '', false, 'width: 180px;'); echo '

' . __('Available modules:') . ui_print_help_tip (__('Only for type Quiet for downtimes.'), true) . '

'; diff --git a/pandora_console/images/custom_logo/pandora_logo_head_3.png b/pandora_console/images/custom_logo/pandora_logo_head_3.png index 275871dca6478cde9c1079b046f50c056b2cd8ab..5bce825279eb091125976f6f559222afb50e4407 100644 GIT binary patch delta 3606 zcmV+x4(ajN8@wElNq^o+L_t(|+G1cBwxDUJ-g_Ya4+0<>BnD(Q0C55k2mFVC{Xl#l zh~LBXLFM*C^*I1>1Cp5mFg6pCT>>DYd6zz1fRT|Ar0D^W-T)PH0Ad9oUl3$4RLusc zI76NLr2|k4{zKKT$L6E|SbQ`eR|tT73-b{&pOhd}pheUG1b@)*LyX9ARO@yTmIxS; z;wS;CQY(Nf#Wm0>jsOB^_$E5E5WEj6X^_Q$ ziHC70c!&jC+JEC<;bkawIsz_U1vsS`a&5OWFznR-kL)RE+5?rp8-aK}G}pi~#RF(j z>|~11@S&S0MobNOfnH}x_GX!HI(vd5uy1gvfl1mg41CO)|SK&nSz^+r8Z3}lWW z5Z{N&If7byNa{g#$OWK%`=N3S(AHoeTDJhK551&iLhl5DXi%MFr<{pW?_h~77ptL`-9IT%M^~eXL*2#Ke>Kg%A+q!$74J=j| zU}7lg6X-}-`x{i_qe(lW#i9UE%>if=8N^RSYQ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KR zY(iA!mt7Fq0P=5iU=d9N5-zc@3atXns|Mra>WvJ_&4_L+W#6DfvtH+NF2FNqn8WRPtqLoH_Mu zw1-4lF;D}TY^dgH?gJ9Rd=qV}uy=j5j?GlFNyZ`*$Y)JL5&GE?C=P3bdVdMIUzjyh za#^2EbR5+P;tZHpsuySvgCq8S=xdh|9cSYiQ?4WW@Frj_c~EAm<>09>5vL{9M>=L) zlKBx?OtHEPX_rBqRjy@FOIogBpk0vA>kDWgtc#ExSGo1rMmiT4_kgY|9VC+OeVXLm z92025u8D<2tuYhHkS8sAL4Ru%o>Jds_iLAU6bI5=q@w6e%2C>)ciiJ1HTvudZL}}O zhTjv{n^MgnUyYm)V;a9XO3Y-NX!ME=pQxlGk z2RT{Eq9n-ejcE1mW@`4~I&++eG+z>JB4l#d%PT2A>HL;K1PcMXv0#$z%zsBP%JTGjKJ zV@3c7sD7Zvx_Ryzr^sorARzfJY@C|n60dO_%{WN=hJyqKQ6T;LqP(m^p-?Ck3WY+U cQ25|432*~aW)IMziU0rr07*qoM6N<$f`%)KrT_o{ diff --git a/pandora_console/include/javascript/pandora_modules.js b/pandora_console/include/javascript/pandora_modules.js index cc8e13ae28..826ba08fed 100644 --- a/pandora_console/include/javascript/pandora_modules.js +++ b/pandora_console/include/javascript/pandora_modules.js @@ -113,6 +113,7 @@ function configure_modules_form () { js_html_entity_decode (data["name"])); $("#textarea_description").attr ("value", js_html_entity_decode (data["description"])); + $("#textarea_description").html(js_html_entity_decode (data["description"])); $("#textarea_configuration_data").val(configuration_data); $("#component_loading").hide (); $("#id_module_type").val(data["type"]); @@ -246,7 +247,7 @@ function configure_modules_form () { flag_load_plugin_component = true; $("#text-name").attr ("value", js_html_entity_decode (data["name"])); - $("#textarea_description").attr ("value", js_html_entity_decode (data["description"])); + $("#textarea_description").html (js_html_entity_decode (data["description"])); $("#id_module_type").val(data["type"]); $("#text-max").attr ("value", data["max"]); $("#text-min").attr ("value", data["min"]); @@ -262,6 +263,10 @@ function configure_modules_form () { .attr ("value", js_html_entity_decode (data["tcp_send"])); $("#textarea_tcp_rcv") .attr ("value", js_html_entity_decode (data["tcp_rcv"])); + $("#textarea_tcp_send") + .html (js_html_entity_decode (data["tcp_send"])); + $("#textarea_tcp_rcv") + .html (js_html_entity_decode (data["tcp_rcv"])); $("#text-snmp_community") .attr ("value", js_html_entity_decode (data["snmp_community"])); $("#text-snmp_oid") diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 6df6262f49..3b52414ea7 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -1248,12 +1248,13 @@ div.title_line { max-height: 26px; } #menu_tab_left li a, #menu_tab_left li span { -/* text-transform: uppercase; */ + /*text-transform: uppercase; */ padding: 0px 0px 0px 0px; color: #fff; - font-size: 8.5pt; - font-weight: normal; + font-size: 9pt; line-height: 20px; + letter-spacing:1px; + font-family: verdana; } #menu_tab_left .mn li a { display: block; diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php index 0864db5fd8..8b79245ce5 100644 --- a/pandora_console/operation/agentes/status_monitor.php +++ b/pandora_console/operation/agentes/status_monitor.php @@ -46,6 +46,8 @@ else { } $ag_freestring = get_parameter ('ag_freestring'); +$moduletype = (string) get_parameter ('moduletype'); +$datatype = (string) get_parameter ('datatype'); $ag_modulename = (string) get_parameter ('ag_modulename'); $refr = (int) get_parameter('refr', 0); $offset = (int) get_parameter ('offset', 0); @@ -88,10 +90,10 @@ $user_groups = implode (',', array_keys (users_get_groups ())); //////////////////////////////////// // Begin Build SQL sentences -$sql_from = ' FROM tagente, tagente_modulo, tagente_estado '; +$sql_from = ' FROM ttipo_modulo,tagente, tagente_modulo, tagente_estado,tmodule '; $sql_conditions_base = ' WHERE tagente.id_agente = tagente_modulo.id_agente - AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo'; + AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo AND tagente_modulo.id_tipo_modulo = ttipo_modulo.id_tipo AND tmodule.id_module = tagente_modulo.id_modulo'; $sql_conditions = ' AND tagente_modulo.disabled = 0 AND tagente.disabled = 0'; @@ -138,6 +140,16 @@ if ($ag_modulename != '') { $ag_modulename); } + +if ($datatype != '') { + $sql_conditions .= sprintf (' AND ttipo_modulo.id_tipo =' .$datatype); +} + +if ($moduletype != '') { + $sql_conditions .= sprintf (' AND tagente_modulo.id_modulo =' .$moduletype); +} + + // Freestring selector if ($ag_freestring != '') { $sql_conditions .= sprintf (' AND (tagente.nombre LIKE \'%%%s%%\' @@ -204,6 +216,7 @@ if ($tag_filter !== 0) { } + // Apply the module ACL with tags $sql_conditions_tags = ''; @@ -328,6 +341,129 @@ else { $tag_filter, '', __('All'), '', true, false, true, '', false, 'width: 150px;'); } + + + $network_available = db_get_sql ("SELECT count(*) + FROM tserver + WHERE server_type = 1"); //POSTGRESQL AND ORACLE COMPATIBLE + $wmi_available = db_get_sql ("SELECT count(*) + FROM tserver + WHERE server_type = 6"); //POSTGRESQL AND ORACLE COMPATIBLE + $plugin_available = db_get_sql ("SELECT count(*) + FROM tserver + WHERE server_type = 4"); //POSTGRESQL AND ORACLE COMPATIBLE + $prediction_available = db_get_sql ("SELECT count(*) + FROM tserver + WHERE server_type = 5"); //POSTGRESQL AND ORACLE COMPATIBLE + + // Development mode to use all servers + if ($develop_bypass) { + $network_available = 1; + $wmi_available = 1; + $plugin_available = 1; + $prediction_available = 1; + } + + $typemodules = array (); + $typemodules[1] = __('Data server module'); + if ($network_available) + $typemodules[2] = __('Network server module'); + if ($plugin_available) + $typemodules[4] = __('Plugin server module'); + if ($wmi_available) + $typemodules[6] = __('WMI server module'); + if ($prediction_available) + $typemodules[5] = __('Prediction server module'); + if (enterprise_installed()) { + $typemodules[7] = __('Web server module'); + } + + + $table->data[2][0] = ''.__('Server type').''; + + $table->data[2][1] = html_print_select ($typemodules, 'moduletype',$moduletype, '', __('All'),'', true, false, true, '', false, 'width: 150px;'); + + + $table->data[2][2] = 'data[2][2] .= 'style="display:none"'; +} + + $table->data[2][2] .= '>'.__('Data type').''; + + + $table->data[2][3] .='
'; + + + switch ($moduletype) + { + case 1: + $sql = sprintf ('SELECT id_tipo, descripcion + FROM ttipo_modulo + WHERE categoria IN (6,7,8,0,1,2,-1) order by descripcion '); + break; + case 2: + $sql = sprintf ('SELECT id_tipo, descripcion + FROM ttipo_modulo + WHERE categoria between 3 and 5 '); + break; + case 4: + $sql = sprintf ('SELECT id_tipo, descripcion + FROM ttipo_modulo + WHERE categoria between 0 and 2 '); + break; + case 6: + $sql = sprintf ('SELECT id_tipo, descripcion + FROM ttipo_modulo + WHERE categoria between 0 and 2 '); + break; + case 7: + $sql = sprintf ('SELECT id_tipo, descripcion + FROM ttipo_modulo + WHERE categoria = 9'); + break; + case 5: + $sql = sprintf ('SELECT id_tipo, descripcion + FROM ttipo_modulo + WHERE categoria = 0'); + break; + case '': + $sql = sprintf ('SELECT id_tipo, descripcion + FROM ttipo_modulo'); + break; + + } + $a = db_get_all_rows_sql($sql); + $table->data[2][3] .= ''; + + + + + $table->data[2][3] .= '
'; + + $table_custom_fields = new stdClass(); $table_custom_fields->class = 'filters'; $table_custom_fields->width = '100%'; @@ -364,13 +500,14 @@ foreach ($custom_fields as $custom_field) { $table_custom_fields->data[] = $row; } + $filters = ''; if (is_metaconsole()) { - $table->colspan[2][0] = 7; - $table->cellstyle[2][0] = 'padding: 10px;'; - $table->data[2][0] = ui_toggle( + $table->colspan[3][0] = 7; + $table->cellstyle[3][0] = 'padding: 10px;'; + $table->data[3][0] = ui_toggle( html_print_table($table_custom_fields, true), __('Advanced Options'), '', true, true); @@ -379,9 +516,9 @@ if (is_metaconsole()) { ui_toggle($filters, __('Show Options')); } else { - $table->colspan[2][0] = 7; - $table->cellstyle[2][0] = 'padding-left: 10px;'; - $table->data[2][0] = ui_toggle(html_print_table($table_custom_fields, + $table->colspan[3][0] = 7; + $table->cellstyle[3][0] = 'padding-left: 10px;'; + $table->data[3][0] = ui_toggle(html_print_table($table_custom_fields, true), __('Agent custom fields'), '', true, true); $filters .= html_print_table($table, true); @@ -441,6 +578,22 @@ switch ($sortField) { break; } break; + case 'moduletype': + switch ($sort) { + case 'up': + $selectTypeUp = $selected; + $order = array( + 'field' => 'tagente_modulo.id_modulo', + 'order' => 'ASC'); + break; + case 'down': + $selectTypeDown = $selected; + $order = array( + 'field' => 'tagente_modulo.id_modulo', + 'order' => 'DESC'); + break; + } + break; case 'module_name': switch ($sort) { case 'up': @@ -553,6 +706,7 @@ switch ($config['dbtype']) { WHERE ttag_module.id_agente_modulo = tagente_modulo.id_agente_modulo)) AS tags, tagente_modulo.id_agente_modulo, + tagente_modulo.id_modulo, tagente.intervalo AS agent_interval, tagente.nombre AS agent_name, tagente_modulo.nombre AS module_name, @@ -599,6 +753,7 @@ switch ($config['dbtype']) { WHERE ttag_module.id_agente_modulo = tagente_modulo.id_agente_modulo)) AS tags, tagente_modulo.id_agente_modulo, + tagente_modulo.id_modulo, tagente.intervalo AS agent_interval, tagente.nombre AS agent_name, tagente_modulo.nombre AS module_name, @@ -641,6 +796,7 @@ switch ($config['dbtype']) { WHERE ttag_module.id_agente_modulo = tagente_modulo.id_agente_modulo)) AS tags, tagente_modulo.id_agente_modulo, + tagente_modulo.id_modulo, tagente.intervalo AS agent_interval, tagente.nombre AS agent_name, tagente_modulo.nombre AS module_name, @@ -772,34 +928,41 @@ if (!empty($result)) { $table->head[1] = __('Agent'); if (!is_metaconsole()) { - $table->head[1] .=' ' . html_print_image('images/sort_up.png', true, array('style' => $selectAgentNameUp, 'alt' => 'up')) . '' . - '' . html_print_image('images/sort_down.png', true, array('style' => $selectAgentNameDown, 'alt' => 'down')) . ''; + $table->head[1] .=' ' . html_print_image('images/sort_up.png', true, array('style' => $selectAgentNameUp, 'alt' => 'up')) . '' . + '' . html_print_image('images/sort_down.png', true, array('style' => $selectAgentNameDown, 'alt' => 'down')) . ''; } - $table->head[2] = __('Type'); + $table->head[2] = __('Data Type'); if (!is_metaconsole()) { - $table->head[2] .= ' ' . html_print_image('images/sort_up.png', true, array('style' => $selectTypeUp, 'alt' => 'up')) . '' . - '' . html_print_image('images/sort_down.png', true, array('style' => $selectTypeDown, 'alt' => 'down')) . ''; + $table->head[2] .= ' ' . html_print_image('images/sort_up.png', true, array('style' => $selectTypeUp, 'alt' => 'up')) . '' . + '' . html_print_image('images/sort_down.png', true, array('style' => $selectTypeDown, 'alt' => 'down')) . ''; } $table->align[2] = 'left'; $table->head[3] = __('Module name'); if (!is_metaconsole()) { - $table->head[3] .= ' ' . html_print_image('images/sort_up.png', true, array('style' => $selectModuleNameUp, 'alt' => 'up')) . '' . - '' . html_print_image('images/sort_down.png', true, array('style' => $selectModuleNameDown, 'alt' => 'down')) . ''; + $table->head[3] .= ' ' . html_print_image('images/sort_up.png', true, array('style' => $selectModuleNameUp, 'alt' => 'up')) . '' . + '' . html_print_image('images/sort_down.png', true, array('style' => $selectModuleNameDown, 'alt' => 'down')) . ''; } + + $table->head[4] = __('Server type'); + if (!is_metaconsole()) { + $table->head[4] .= ' ' . html_print_image('images/sort_up.png', true, array('style' => $selectModuleNameUp, 'alt' => 'up')) . '' . + '' . html_print_image('images/sort_down.png', true, array('style' => $selectModuleNameDown, 'alt' => 'down')) . ''; + } + $table->head[5] = __('Interval'); if (!is_metaconsole()) { - $table->head[5] .= ' ' . html_print_image('images/sort_up.png', true, array('style' => $selectIntervalUp, 'alt' => 'up')) . '' . - '' . html_print_image('images/sort_down.png', true, array('style' => $selectIntervalDown, 'alt' => 'down')) . ''; + $table->head[5] .= ' ' . html_print_image('images/sort_up.png', true, array('style' => $selectIntervalUp, 'alt' => 'up')) . '' . + '' . html_print_image('images/sort_down.png', true, array('style' => $selectIntervalDown, 'alt' => 'down')) . ''; $table->align[5] = 'left'; } $table->head[6] = __('Status'); if (!is_metaconsole()) { - $table->head[6] .= ' ' . html_print_image('images/sort_up.png', true, array('style' => $selectStatusUp, 'alt' => 'up')) . '' . - '' . html_print_image('images/sort_down.png', true, array('style' => $selectStatusDown, 'alt' => 'down')) . ''; + $table->head[6] .= ' ' . html_print_image('images/sort_up.png', true, array('style' => $selectStatusUp, 'alt' => 'up')) . '' . + '' . html_print_image('images/sort_down.png', true, array('style' => $selectStatusDown, 'alt' => 'down')) . ''; } $table->align[6] = 'left'; @@ -813,14 +976,14 @@ if (!empty($result)) { $table->head[9] = __('Data'); $table->align[9] = 'left'; if ( is_metaconsole() ) { - $table->head[9] .= ' ' . html_print_image('images/sort_up.png', true, array('style' => $selectStatusUp, 'alt' => 'up')) . '' . - '' . html_print_image('images/sort_down.png', true, array('style' => $selectStatusDown, 'alt' => 'down')) . ''; + $table->head[9] .= ' ' . html_print_image('images/sort_up.png', true, array('style' => $selectStatusUp, 'alt' => 'up')) . '' . + '' . html_print_image('images/sort_down.png', true, array('style' => $selectStatusDown, 'alt' => 'down')) . ''; } $table->head[10] = __('Timestamp'); if (!is_metaconsole()) { - $table->head[10] .= ' ' . html_print_image('images/sort_up.png', true, array('style' => $selectTimestampUp, 'alt' => 'up')) . '' . - '' . html_print_image('images/sort_down.png', true, array('style' => $selectTimestampDown, 'alt' => 'down')) . ''; + $table->head[10] .= ' ' . html_print_image('images/sort_up.png', true, array('style' => $selectTimestampUp, 'alt' => 'up')) . '' . + '' . html_print_image('images/sort_down.png', true, array('style' => $selectTimestampDown, 'alt' => 'down')) . ''; $table->align[10] = 'left'; } @@ -914,6 +1077,7 @@ if (!empty($result)) { $data[1] .= ''; } + $data[2] = html_print_image('images/' . modules_show_icon_type ($row['module_type']), true); if (check_acl ($config['id_user'], $row['id_group'], 'AW')) { $show_edit_icon = true; @@ -959,7 +1123,8 @@ if (!empty($result)) { 'title' => $row['tags'], 'style' => 'width: 20px; margin-left: 3px;')); } - + $data[4] = servers_show_type ($row['id_modulo']); + $data[5] = ($row['module_interval'] == 0) ? human_time_description_raw($row['agent_interval']) : @@ -1211,7 +1376,27 @@ ui_require_javascript_file('pandora_modules'); $('#tag_filter').css('display', 'none'); $('#tag_td').css('display', 'none'); } - }); + +}); + + +$('#moduletype').click(function(){ + jQuery.get ("ajax.php", + { + "page": "general/subselect_data_module", + "module":$('#moduletype').val()}, + function (data, status){ + $("#datatypetittle").show (); + $("#datatypebox").hide () + .empty () + .append (data) + .show (); + }, + "html" + ); + + return false; + }); $('#ag_group').change (function () { strict_user = $('#text-strict_user_hidden').val(); diff --git a/pandora_console/operation/agentes/ver_agente.php b/pandora_console/operation/agentes/ver_agente.php index 5305b5f238..cb3c0531ff 100644 --- a/pandora_console/operation/agentes/ver_agente.php +++ b/pandora_console/operation/agentes/ver_agente.php @@ -42,7 +42,7 @@ if (is_ajax ()) { $get_agentmodule_status_tooltip = (bool) get_parameter ("get_agentmodule_status_tooltip"); $get_group_status_tooltip = (bool) get_parameter ("get_group_status_tooltip"); $get_agent_id = (bool) get_parameter ("get_agent_id"); - + $id_group = (int) get_parameter('id_group'); if ($get_agents_group_json) { $id_group = (int) get_parameter('id_group'); $recursion = (int) get_parameter ('recursion', 0); @@ -382,7 +382,19 @@ if (is_ajax ()) { asort($result); } else { - $sql = 'SELECT DISTINCT(nombre) + + if(implode(',', $idAgents) < 0){ + + + $sql = 'SELECT DISTINCT(nombre) FROM tagente_modulo +WHERE nombre IN ( +SELECT nombre +FROM tagente_modulo +GROUP BY nombre +HAVING count(nombre) = (SELECT count(nombre) FROM tagente_modulo))'; + } + else{ + $sql = 'SELECT DISTINCT(nombre) FROM tagente_modulo t1 WHERE ' . $filter . ' AND t1.delete_pending = 0 @@ -398,7 +410,7 @@ if (is_ajax ()) { }elseif ($selection_mode == 'unknown'){ $sql .= 'AND t1.id_agente_modulo IN (SELECT id_agente_modulo FROM tagente_estado where estado = 3 OR estado = 4)'; } - + } $sql .= ' ORDER BY nombre'; $nameModules = db_get_all_rows_sql($sql);