Merge branch 'develop' into feature/NewView

This commit is contained in:
m-lopez-f 2015-07-09 17:49:16 +02:00
commit 6826a1e56e
77 changed files with 564229 additions and 313057 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: 6.0dev-150707
Version: 6.0dev-150709
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="6.0dev-150707"
pandora_version="6.0dev-150709"
echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null

View File

@ -41,7 +41,7 @@ my $Sem = undef;
my $ThreadSem = undef;
use constant AGENT_VERSION => '6.0dev';
use constant AGENT_BUILD => '150707';
use constant AGENT_BUILD => '150709';
# Commands to retrieve total memory information in kB
use constant TOTALMEMORY_CMDS => {

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_agent_unix
%define version 6.0dev
%define release 150707
%define release 150709
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_agent_unix
%define version 6.0dev
%define release 150707
%define release 150709
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{150707}
{150709}
ViewReadme
{Yes}

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("6.0dev(Build 150707)")
#define PANDORA_VERSION ("6.0dev(Build 150709)")
string pandora_path;
string pandora_dir;

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(6.0dev(Build 150707))"
VALUE "ProductVersion", "(6.0dev(Build 150709))"
VALUE "FileVersion", "1.0.0.0"
END
END

View File

@ -1,5 +1,5 @@
package: pandorafms-console
Version: 6.0dev-150707
Version: 6.0dev-150709
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="6.0dev-150707"
pandora_version="6.0dev-150709"
package_pear=0
package_pandora=1

View File

@ -35,7 +35,8 @@ ui_print_info_message(
ignore it or will update its information.There are three types of detection: Based on <strong id="fuerte"> ICMP </strong>(pings),
<strong id="fuerte">SNMP</strong> (detecting the topology of networks and their interfaces), and other <strong id="fuerte"> customized </strong>
type. You can define your own customized recon script.'); ?></p>
<form action="index.php?sec=gservers&sec2=godmode/servers/manage_recontask_form&create" method="post">
<form action="index.php?sec=reporting&amp;sec2=godmode/reporting/visual_console_builder" method="post">
<?php html_print_input_hidden ('edit_layout', 1); ?>
<input type="submit" class="button_task" value="<?php echo __('Create Visual Console'); ?>" />
</form>
</div>

View File

@ -115,7 +115,10 @@ if ($update) {
$agents_ = array_keys(agents_get_group_agents($group_select, false, 'none'));
foreach ($agents_ as $id_agent) {
$filter = array('id_agente' => $id_agent);
$filter = array(
'id_agente' => $id_agent,
'delete_pending' => 0
);
$module_name = db_get_all_rows_filter('tagente_modulo', $filter, 'nombre');
if ($module_name === false)
$module_name = array();
@ -136,9 +139,20 @@ if ($update) {
$modules_ = array();
foreach ($modules_ as $module_) {
$result = process_manage_edit ($module_, $agents_);
$count++;
$success += (int)$result;
$filter = array('id_agente' => $agent_);
if (!is_numeric($module_))
$filter['nombre'] = $module_;
else
$filter['id_agente_modulo'] = $module_;
$exists = (bool) db_get_value_filter('id_agente', 'tagente_modulo', $filter);
if ($exists) {
$result = process_manage_edit ($module_, $agent_);
$count++;
$success += (int)$result;
}
}
}
}
@ -147,8 +161,7 @@ if ($update) {
__('Successfully updated') . "(" . $success . "/" . $count . ")",
__('Could not be updated'));
$info = 'Modules: ' . json_encode($modules_) .
' Agents: ' . json_encode($agents_);
$info = 'Modules: ' . json_encode($modules_) . ' Agents: ' . json_encode($agents_);
if ($success > 0) {
db_pandora_audit("Massive management", "Edit module", false, false, $info);
}

View File

@ -44,6 +44,8 @@ $id_layout = (int) get_parameter ('id_layout');
$copy_layout = (bool) get_parameter ('copy_layout');
$delete_layout = (bool) get_parameter ('delete_layout');
$refr = (int) get_parameter('refr');
$offset = (int) get_parameter('offset', 0);
$pagination = (int) get_parameter ("pagination", $config["block_size"]);
if ($delete_layout || $copy_layout) {
// Visual console required
@ -206,9 +208,6 @@ $table->head[0] = __('Map name');
$table->head[1] = __('Group');
$table->head[2] = __('Items');
if (defined("METACONSOLE"))
$table->styleTable = "margin-top:0px";
// Fix: IW was the old ACL for report editing, now is RW
//Only for RW flag
if ($vconsoles_write || $vconsoles_manage) {
@ -227,13 +226,24 @@ $table->align[4] = 'left';
// Only display maps of "All" group if user is administrator
// or has "VR" privileges, otherwise show only maps of user group
$filters['offset'] = $offset;
$filters['limit'] = $pagination;
$own_info = get_user_info ($config['id_user']);
if ($own_info['is_admin'] || $vconsoles_read)
$maps = visual_map_get_user_layouts ();
else
if (!defined('METACONSOLE')) {
$url = 'index.php?sec=reporting&amp;sec2=godmode/reporting/map_builder&pagination='.$pagination;
}
else {
$url = 'index.php?sec=screen&sec2=screens/screens&action=visualmap&pagination='.$pagination;
}
if ($own_info['is_admin'] || $vconsoles_read) {
$maps = visual_map_get_user_layouts (0,false,$filters);
$total_maps = count(visual_map_get_user_layouts());
} else {
$maps = visual_map_get_user_layouts ($config['id_user'], false,
false, false);
$filters, false);
$total_maps = count(visual_map_get_user_layouts ($config['id_user'], false,
false, false));
}
if (!$maps && !defined("METACONSOLE")) {
require_once ($config['homedir'] . "/general/firts_task/map_builder.php");
}
@ -244,6 +254,8 @@ elseif (!$maps && defined("METACONSOLE")) {
'message'=> __('There are no visual console defined yet.')));
}
else {
ui_pagination ($total_maps, $url, $offset, $pagination);
foreach ($maps as $map) {
// ACL for the visual console permission
$vconsole_write = check_acl ($config['id_user'],

View File

@ -46,11 +46,11 @@ define ('_MPDF_TTFONTPATH', 'include/fonts/');
$activeTab = get_parameter('tab', 'main');
$action = get_parameter('action', 'list');
$idReport = get_parameter('id_report', 0);
$offset = get_parameter('offset', 0);
$offset = (int) get_parameter('offset', 0);
$idItem = get_parameter('id_item', 0);
$pure = get_parameter('pure',0);
$schedule_report = get_parameter('schbutton', '');
$pagination = (int) get_parameter ("pagination", $config["block_size"]);
$strict_user = db_get_value('strict_acl', 'tusuario', 'id_user', $config['id_user']);
if ($schedule_report != '') {
@ -374,12 +374,7 @@ switch ($action) {
$table_aux->class = 'databox filters';
$table_aux->cellpadding = 0;
$table_aux->cellspacing = 0;
if (defined('METACONSOLE')) {
$table_aux->class = 'databox filters';
$table_aux->width = '100%';
$table_aux->cellpadding = 0;
$table_aux->cellspacing = 0;
}
$table_aux->colspan[0][0] = 4;
$table_aux->data[0][0] = "<b>". __("Group") . "</b>";
@ -445,7 +440,8 @@ switch ($action) {
else {
$group = false;
}
$filter['offset'] = $offset;
$filter['limit'] = $pagination;
// Filter normal and metaconsole reports
if ($config['metaconsole'] == 1 and defined('METACONSOLE'))
@ -463,9 +459,17 @@ switch ($action) {
'id_group',
'non_interactive'), $return_all_group, 'RR', $group, $strict_user);
$table = new stdClass();
$table->width = '0px';
unset($filter['offset']);
unset($filter['limit']);
$total_reports = (int) count(reports_get_reports ($filter,
array ('name'), $return_all_group, 'RR', $group, $strict_user));
if (sizeof ($reports)) {
$url = "index.php?sec=reporting&sec2=godmode/reporting/reporting_builder";
ui_pagination ($total_reports, $url, $offset, $pagination);
$table = new stdClass();
$table->id = 'report_list';
$table->width = '100%';
@ -521,7 +525,7 @@ switch ($action) {
$table->headstyle[$next] = 'text-align:left;';
}
$columnview = false;
foreach ($reports as $report) {
if (!is_user_admin ($config["id_user"])) {
@ -623,11 +627,12 @@ switch ($action) {
}
if ($edit || $delete) {
$columnview = true;
if (!isset($table->head[$next])) {
$table->head[$next] = '<span title="Operations">' . __('Op.') . '</span>';
$table->size = array ();
$table->size[$next] = '80px';
$table->style[$next] = 'text-align:center;';
$table->style[$next] = 'text-align:left;';
}
if ($edit) {
@ -652,6 +657,15 @@ switch ($action) {
array_push ($table->data, $data);
}
if ($columnview){
$count = 0;
foreach ($table->data as $datos) {
if (!isset($datos[9]))
$table->data[$count][9] = '';
$count++;
}
}
html_print_table ($table);
}
else {

View File

@ -297,12 +297,6 @@ foreach ($layoutDatas as $layoutData) {
"action=delete&" .
"id_visual_console=" . $visualConsole["id"] . "&" .
"id_element=" . $idLayoutData;
$table->data[$i + 1][5] = "";
$table->data[$i + 1][5] .= html_print_checkbox('multiple_delete_items', $idLayoutData, false, true);
$table->data[$i + 1][5] .= '<a href="' . $url_delete . '" ' .
'onclick="javascript: if (!confirm(\'' . __('Are you sure?') . '\')) return false;">' .
html_print_image('images/cross.png', true) . '</a>';
}
else {
$url_delete = "index.php?" .
@ -316,11 +310,13 @@ foreach ($layoutDatas as $layoutData) {
"id_visual_console=" . $visualConsole["id"] . "&" .
"id_element=" . $idLayoutData;
$table->data[$i + 1][5] = '<a href="' . $url_delete . '" ' .
'onclick="javascript: if (!confirm(\'' . __('Are you sure?') . '\')) return false;">' .
html_print_image('images/cross.png', true) . '</a>';
}
$table->data[$i + 1][5] = "";
$table->data[$i + 1][5] .= html_print_checkbox('multiple_delete_items', $idLayoutData, false, true);
$table->data[$i + 1][5] .= '<a href="' . $url_delete . '" ' .
'onclick="javascript: if (!confirm(\'' . __('Are you sure?') . '\')) return false;">' .
html_print_image('images/cross.png', true) . '</a>';
//Second row
$table->data[$i + 2]['icon'] = '';

View File

@ -37,7 +37,9 @@ $action = get_parameterBetweenListValues($action_name_parameter,
array('new', 'save', 'edit', 'update', 'delete', 'multiple_delete'),
'new');
$activeTab = get_parameterBetweenListValues('tab', array('data', 'list_elements', 'wizard', 'wizard_services', 'editor'), 'data');
$activeTab = get_parameterBetweenListValues('tab',
array('data', 'list_elements', 'wizard', 'wizard_services', 'editor'),
'data');
// Visual console creation tab and actions
if (empty($idVisualConsole)) {
@ -348,8 +350,22 @@ switch ($activeTab) {
// One item per agent
if ($item_per_agent == 1) {
$id_agents_result = array();
foreach ($id_agents as $id_agent_key => $id_agent_id)
$id_agents_result[] = $id_agent_id;
foreach ($id_agents as $id_agent_key => $id_agent_id) {
if (defined("METACONSOLE")) {
$row = db_get_row_filter(
'tmetaconsole_agent',
array('id_tagente' => $id_agent_id));
$id_server = $row['id_tmetaconsole_setup'];
$id_agent_id = $row['id_tagente'];
$id_agents_result[] = array(
'id_agent' => $id_agent_id,
'id_server' => $id_server);
}
else {
$id_agents_result[] = $id_agent_id;
}
}
$message .= visual_map_process_wizard_add_agents(
$id_agents_result,
@ -376,6 +392,8 @@ switch ($activeTab) {
}
else {
// One item per module
if (empty($name_modules)) {
$statusProcessInDB = array('flag' => true,
@ -383,31 +401,54 @@ switch ($activeTab) {
__('No modules selected'), '', true));
}
else {
if (defined("METACONSOLE")) {
$rows = db_get_all_rows_filter(
'tmetaconsole_agent',
array('id_tagente' => $id_agents));
$agents = array();
foreach ($rows as $row) {
$agents[$row['id_tmetaconsole_setup']][] =
$row['id_tagente'];
}
}
else {
$agents[0] = $id_agents;
}
}
foreach ($agents as $id_server => $id_agents) {
//Any module
if ($name_modules[0] == '0') {
$id_modules = array();
if ($id_server != 0) {
foreach ($name_modules as $serial_data) {
$modules_serial = explode(';', $serial_data);
foreach ($modules_serial as $data_serialized) {
$data = explode('|', $data_serialized);
$id_modules[] = $data[0];
}
if (metaconsole_connect(null, $id_server) != NOERR) {
continue;
}
}
else {
foreach ($id_agents as $id_agent) {
$id_modulo = agents_get_modules($id_agent, array('id_agente_modulo'));
if (empty($id_modulo)) $id_modulo = array();
foreach ($id_modulo as $id) {
$id_modules[] = $id['id_agente_modulo'];
}
foreach ($id_agents as $id_agent) {
$id_modulo = agents_get_modules($id_agent, array('id_agente_modulo'));
if (empty($id_modulo)) $id_modulo = array();
foreach ($id_modulo as $id) {
$id_modules[] = $id['id_agente_modulo'];
}
}
if ($id_server != 0) {
metaconsole_restore_db();
}
$message .= visual_map_process_wizard_add_modules(
$id_modules,
$image,
@ -427,39 +468,45 @@ switch ($activeTab) {
$id_server,
$kind_relationship,
$item_in_the_map);
}
else {
$id_modules = array();
if ($id_server != 0) {
foreach ($name_modules as $serial_data) {
$modules_serial = explode(';', $serial_data);
foreach ($modules_serial as $data_serialized) {
$data = explode('|', $data_serialized);
$id_modules[] = $data[0];
}
if (metaconsole_connect(null, $id_server) != NOERR) {
continue;
}
}
else {
foreach ($name_modules as $mod) {
foreach ($id_agents as $ag) {
$id_module = agents_get_modules($ag,
array('id_agente_modulo'),
array('nombre' => $mod));
if (empty($id_module))
continue;
else {
$id_module = reset($id_module);
$id_module = $id_module['id_agente_modulo'];
}
$id_modules[] = $id_module;
foreach ($name_modules as $mod) {
foreach ($id_agents as $ag) {
$id_module = agents_get_modules($ag,
array('id_agente_modulo'),
array('nombre' => $mod));
if (empty($id_module))
continue;
else {
$id_module = reset($id_module);
$id_module = $id_module['id_agente_modulo'];
}
$id_modules[] = $id_module;
}
}
if ($id_server != 0) {
metaconsole_restore_db();
}
$message .= visual_map_process_wizard_add_modules(
$id_modules,
$image,
@ -480,8 +527,12 @@ switch ($activeTab) {
$kind_relationship,
$item_in_the_map);
}
$statusProcessInDB = array('flag' => true, 'message' => $message);
}
$statusProcessInDB = array(
'flag' => true, 'message' => $message);
}
$action = 'edit';
break;

View File

@ -25,15 +25,18 @@ if (empty($visualConsole)) {
exit;
}
$strict_user = db_get_value('strict_acl', 'tusuario', 'id_user', $config['id_user']);
$strict_user = db_get_value('strict_acl', 'tusuario', 'id_user',
$config['id_user']);
// ACL for the existing visual console
// if (!isset($vconsole_read))
// $vconsole_read = check_acl ($config['id_user'], $visualConsole['id_group'], "VR");
if (!isset($vconsole_write))
$vconsole_write = check_acl ($config['id_user'], $visualConsole['id_group'], "VW");
$vconsole_write = check_acl(
$config['id_user'], $visualConsole['id_group'], "VW");
if (!isset($vconsole_manage))
$vconsole_manage = check_acl ($config['id_user'], $visualConsole['id_group'], "VM");
$vconsole_manage = check_acl(
$config['id_user'], $visualConsole['id_group'], "VM");
if (!$vconsole_write && !$vconsole_manage) {
db_pandora_audit("ACL Violation",
@ -120,7 +123,8 @@ $table->data["staticgraph"][1] = html_print_select($images_list,
$table->rowstyle["all_1"] = 'display: none;';
$table->data["all_1"][0] = __('Range between elements (px)');
$table->colspan["all_1"][1] = "3";
$table->data["all_1"][1] = html_print_input_text('range', 50, '', 5, 5, true);
$table->data["all_1"][1] = html_print_input_text('range', 50, '', 5, 5,
true);
$table->rowstyle["staticgraph_modulegraph"] = 'display: none;';
@ -129,23 +133,27 @@ $table->colspan["staticgraph_modulegraph"][1] = "3";
$table->data["staticgraph_modulegraph"][1] = __('Width').': ' .
html_print_input_text ('width', 0, '', 5, 5, true);
$table->data["staticgraph_modulegraph"][1] .= '&nbsp;&nbsp;&nbsp;' .
__('Height').': '.html_print_input_text ('height', 0, '', 5, 5, true);
__('Height') . ': ' .
html_print_input_text('height', 0, '', 5, 5, true);
$table->rowstyle["modulegraph_simplevalue"] = 'display: none;';
$table->data["modulegraph_simplevalue"][0] = __('Period');
$table->colspan["modulegraph_simplevalue"][1] = "3";
$table->data["modulegraph_simplevalue"][1] =
html_print_extended_select_for_time ('period', '', '', '', '', false, true);
html_print_extended_select_for_time('period', '', '', '', '', false,
true);
$table->rowstyle["simplevalue"] = 'display: none;';
$table->data["simplevalue"][0] = __('Process');
$table->data["simplevalue"][1] = html_print_select (
array (PROCESS_VALUE_MIN => __('Min value'),
PROCESS_VALUE_MAX => __('Max value'),
PROCESS_VALUE_AVG => __('Avg value')), 'process_value',
PROCESS_VALUE_AVG, '', __('None'), PROCESS_VALUE_NONE, true);
array (
PROCESS_VALUE_MIN => __('Min value'),
PROCESS_VALUE_MAX => __('Max value'),
PROCESS_VALUE_AVG => __('Avg value')),
'process_value', PROCESS_VALUE_AVG, '', __('None'),
PROCESS_VALUE_NONE, true);
$table->rowstyle["percentileitem_1"] = 'display: none;';
@ -164,9 +172,11 @@ $table->rowstyle["percentileitem_3"] = 'display: none;';
$table->data["percentileitem_3"][0] = __('Type');
$table->data["percentileitem_3"][1] =
html_print_radio_button_extended('type_percentile', 'percentile',
('Percentile'), 'percentile', false, '', 'style="float: left;"', true) .
('Percentile'), 'percentile', false, '', 'style="float: left;"',
true) .
html_print_radio_button_extended('type_percentile', 'bubble',
('Bubble'), 'percentile', false, '', 'style="float: left;"', true);
('Bubble'), 'percentile', false, '', 'style="float: left;"',
true);
$table->rowstyle["percentileitem_4"] = 'display: none;';
@ -183,11 +193,12 @@ if (defined('METACONSOLE')) {
$table->data["all_2"][0] = __('Servers');
if ($strict_user)
$table->data["all_2"][1] = html_print_select('','server_id',
$server_id, 'metaconsole_init();', __('All'), '0', true);
$server_id, 'metaconsole_init();', __('All'), '0', true);
else
$table->data["all_2"][1] = html_print_select_from_sql(
'SELECT id, server_name FROM tmetaconsole_setup',
'server_id', $server_id, 'metaconsole_init();', __('All'), '0', true);
'SELECT id, server_name FROM tmetaconsole_setup',
'server_id', $server_id, 'metaconsole_init();', __('All'),
'0', true);
}
@ -204,10 +215,12 @@ $table->colspan["all_one_item_per_agent"][1] = "3";
$table->data["all_one_item_per_agent"][1] = __('Yes') .
'&nbsp;&nbsp;&nbsp;' .
html_print_radio_button_extended('item_per_agent', 1, '', '', false,
'item_per_agent_change(1)', '', true).'&nbsp;&nbsp;';
'item_per_agent_change(1)', '', true) .
'&nbsp;&nbsp;';
$table->data["all_one_item_per_agent"][1] .= __('No') .
'&nbsp;&nbsp;&nbsp;' . html_print_radio_button_extended(
'item_per_agent', 0, '', 0, false, 'item_per_agent_change(0)', '', true);
'item_per_agent', 0, '', 0, false, 'item_per_agent_change(0)',
'', true);
$table->data["all_one_item_per_agent"][1] .= html_print_input_hidden(
'item_per_agent_test', 0, true);
@ -217,7 +230,9 @@ $table->data["all_4"][0] = __('Agents');
$agents_list = array();
if (!defined('METACONSOLE'))
$agents_list = agents_get_group_agents(0, false, "none", false, true);
$agents_list = agents_get_group_agents(0, false, "none", false,
true);
$table->data["all_4"][1] = html_print_select($agents_list,
'id_agents[]', 0, false, '', '', true, true);
@ -281,7 +296,8 @@ else {
}
if (defined("METACONSOLE")) {
echo "<div class='title_tactical' style='margin-top: 15px; '>" . __('Wizard') . "</div>";
echo "<div class='title_tactical' style='margin-top: 15px; '>" .
__('Wizard') . "</div>";
}
html_print_table ($table);
@ -299,9 +315,12 @@ echo '</div>';
echo '</form>';
//Trick for it have a traduct text for javascript.
echo '<span id="any_text" style="display: none;">' . __('Any') . '</span>';
echo '<span id="none_text" style="display: none;">' . __('None') . '</span>';
echo '<span id="loading_text" style="display: none;">' . __('Loading...') . '</span>';
echo '<span id="any_text" style="display: none;">' . __('Any') .
'</span>';
echo '<span id="none_text" style="display: none;">' . __('None') .
'</span>';
echo '<span id="loading_text" style="display: none;">' .
__('Loading...') . '</span>';
?>
<script type="text/javascript">
@ -360,12 +379,19 @@ $(document).ready (function () {
if (isEmptyObject(data)) {
var noneText = $("#none_text").html(); //Trick for catch the translate text.
$('#id_agents').append ($('<option></option>').html (noneText).attr ("None", "").attr('value', -1).attr('selected', true));
$('#id_agents')
.append($('<option></option>')
.html(noneText)
.attr("None", "")
.attr('value', -1)
.attr('selected', true));
}
else {
jQuery.each (data, function (i, val) {
s = js_html_entity_decode(val);
$('#id_agents').append ($('<option></option>').html (s).attr("value", i));
$('#id_agents')
.append($('<option></option>')
.html(s).attr("value", i));
});
}
@ -476,11 +502,20 @@ function item_per_agent_change(itemPerAgent) {
.attr('disabled', false);
$('#module').empty();
$('#module').append ($('<option></option>').html (<?php echo "'" . __('None') . "'"; ?>).attr("value", -1));
$('#module')
.append($('<option></option>')
.html (<?php echo "'" . __('None') . "'"; ?>)
.attr("value", -1));
$('#module').attr('disabled', true);
$('#label_type').empty();
$('#label_type').append ($('<option></option>').html (<?php echo "'" . __('Agent') . "'"; ?>).attr('value', 'agent').attr('selected', true));
$('#label_type').append ($('<option></option>').html (<?php echo "'" . __('None') . "'"; ?>).attr('value', 'none'));
$('#label_type')
.append($('<option></option>')
.html(<?php echo "'" . __('Agent') . "'"; ?>)
.attr('value', 'agent').attr('selected', true));
$('#label_type')
.append($('<option></option>')
.html(<?php echo "'" . __('None') . "'"; ?>)
.attr('value', 'none'));
$('#hidden-item_per_agent_test').val(1);
}
@ -496,10 +531,23 @@ function item_per_agent_change(itemPerAgent) {
$('#module').removeAttr('disabled');
$('#hidden-item_per_agent_test').val(0);
$('#label_type').empty();
$('#label_type').append ($('<option></option>').html (<?php echo "'" . __('Agent') . "'"; ?>).attr('value', 'agent'));
$('#label_type').append ($('<option></option>').html (<?php echo "'" . __('Agent - Module') . "'"; ?>).attr('value', 'agent_module').attr('selected', true));
$('#label_type').append ($('<option></option>').html (<?php echo "'" . __('Module') . "'"; ?>).attr('value', 'module'));
$('#label_type').append ($('<option></option>').html (<?php echo "'" . __('None') . "'"; ?>).attr('value', 'none'));
$('#label_type')
.append($('<option></option>')
.html(<?php echo "'" . __('Agent') . "'"; ?>)
.attr('value', 'agent'));
$('#label_type')
.append($('<option></option>')
.html(<?php echo "'" . __('Agent - Module') . "'"; ?>)
.attr('value', 'agent_module')
.attr('selected', true));
$('#label_type')
.append($('<option></option>')
.html(<?php echo "'" . __('Module') . "'"; ?>)
.attr('value', 'module'));
$('#label_type')
.append($('<option></option>')
.html(<?php echo "'" . __('None') . "'"; ?>)
.attr('value', 'none'));
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 303 B

After

Width:  |  Height:  |  Size: 244 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 316 B

After

Width:  |  Height:  |  Size: 259 B

View File

@ -43,8 +43,9 @@ if ($get_agents_group) {
if ($id_group != -1) {
$filter = array();
if (defined('METACONSOLE'))
if (defined('METACONSOLE')) {
$filter['id_server'] = $id_server;
}
$return = agents_get_group_agents($id_group, $filter, "none");
}

View File

@ -32,6 +32,115 @@ $change_module_relation_updates = (bool) get_parameter('change_module_relation_u
$get_id_tag = (bool) get_parameter('get_id_tag', 0);
$list_modules = (bool) get_parameter('list_modules', 0);
$get_agent_modules_json_for_multiple_agents = (bool)get_parameter(
"get_agent_modules_json_for_multiple_agents");
if ($get_agent_modules_json_for_multiple_agents) {
$idAgents = (array)get_parameter('id_agent');
$custom_condition = get_parameter('custom_condition', '');
$selection_mode = get_parameter('selection_mode', 'common');
$serialized = get_parameter('serialized', '');
$id_server = (int)get_parameter('id_server', 0);
$metaconsole_server_name = null;
$all = (string)get_parameter('all', 'all');
switch ($all) {
default:
case 'all':
$enabled = '1 = 1';
break;
case 'enabled':
$enabled = 'disabled = 0';
break;
}
$result = array();
if (defined("METACONSOLE")) {
$rows = db_get_all_rows_filter('tmetaconsole_agent',
array("id_tagente" => $idAgents),
array('id_agente', 'id_tmetaconsole_setup'));
$agents = array();
foreach ($rows as $row) {
$agents[$row['id_tmetaconsole_setup']][] =
$row['id_agente'];
}
foreach ($idAgents as $id_agent) {
$id_tmetaconsole_setup = db_get_value_filter(
'id_tmetaconsole_setup', 'tmetaconsole_agent',
array("id_tagente" => $idAgents));
if (metaconsole_connect(null, $id_tmetaconsole_setup) != NOERR) {
continue;
}
metaconsole_restore_db();
}
}
else {
$agents[0] = $idAgents;
}
$result = array();
foreach ($agents as $id_server => $agents) {
if ($id_server) {
if (metaconsole_connect(null, $id_server) != NOERR) {
continue;
}
}
$sql = 'SELECT DISTINCT(nombre)
FROM tagente_modulo t1
WHERE ' . $enabled .
io_safe_output($custom_condition) . '
AND delete_pending = 0
AND id_agente IN (' . implode(',', $idAgents) . ')';
if ($selection_mode == 'common') {
$sql .= ' AND (
SELECT count(nombre)
FROM tagente_modulo t2
WHERE delete_pending = 0 AND t1.nombre = t2.nombre
AND id_agente IN (' . implode(',', $idAgents) . ')) = (' . count($idAgents) . ')';
}
$sql .= ' ORDER BY nombre';
$nameModules = db_get_all_rows_sql($sql);
if ($nameModules == false) {
$nameModules = array();
}
$temp = array();
foreach ($nameModules as $nameModule) {
if (empty($serialized))
$temp[io_safe_output($nameModule['nombre'])] =
ui_print_truncate_text(
io_safe_output($nameModule['nombre']), 'module_medium', false, true);
else
$temp[io_safe_output($nameModule['nombre']).'$*$'.implode('|', $idAgents)] = ui_print_truncate_text(io_safe_output($nameModule['nombre']), 'module_medium', false, true);
}
if ($id_server) {
metaconsole_restore_db();
}
foreach ($temp as $i => $t) {
$result[$i] = $t;
}
}
echo json_encode($result);
return;
}
if ($get_plugin_macros) {
$id_plugin = get_parameter('id_plugin', 0);

View File

@ -22,7 +22,7 @@
/**
* Pandora build version and version
*/
$build_version = 'PC150707';
$build_version = 'PC150709';
$pandora_version = 'v6.0dev';
// Do not overwrite default timezone set if defined.

View File

@ -759,7 +759,9 @@ function agents_common_modules ($id_agent, $filter = false, $indexed = true, $ge
*
* @return array An array with all agents in the group or an empty array
*/
function agents_get_group_agents ($id_group = 0, $search = false, $case = "lower", $noACL = false, $childGroups = false) {
function agents_get_group_agents ($id_group = 0, $search = false,
$case = "lower", $noACL = false, $childGroups = false) {
global $config;
$filter = array();
@ -773,6 +775,8 @@ function agents_get_group_agents ($id_group = 0, $search = false, $case = "lower
}
}
if ($childGroups) {
if (is_array($id_group)) {
foreach ($id_group as $parent) {
@ -858,6 +862,11 @@ function agents_get_group_agents ($id_group = 0, $search = false, $case = "lower
if (defined('METACONSOLE') && isset($search['id_server'])) {
$filter['id_tmetaconsole_setup'] = $search['id_server'];
if ($filter['id_tmetaconsole_setup'] == 0) {
// All nodes
unset ($filter['id_tmetaconsole_setup']);
}
unset ($search["id_server"]);
}
@ -889,6 +898,8 @@ function agents_get_group_agents ($id_group = 0, $search = false, $case = "lower
$result = db_get_all_rows_filter($table_name, $filter, $fields);
if ($result === false)
return array (); //Return an empty array
@ -1139,8 +1150,10 @@ function agents_get_modules ($id_agent = null, $details = false,
io_safe_output(implode (",", (array) $details)),
$where);
$result = db_get_all_rows_sql ($sql);
if (empty ($result)) {
return array ();
}

View File

@ -2406,8 +2406,7 @@ function group_get_data ($id_user = false, $user_strict = false, $acltags, $retu
FROM $cache_table
WHERE disabled = 0
AND id_grupo IN ($user_groups_ids)
AND critical_count = 0
AND warning_count > 0
AND critical_count > 0
GROUP BY id_grupo";
$data_stats_critical = db_get_all_rows_sql($sql_stats_critical);
}

View File

@ -2495,19 +2495,6 @@ function reporting_header_content($mini, $content, $report, &$table,
array_push ($table->data, $data);
}
function reporting_get_agents_by_status ($data, $graph_width = 250, $graph_height = 150, $links = false) {
global $config;
@ -2519,25 +2506,25 @@ function reporting_get_agents_by_status ($data, $graph_width = 250, $graph_heigh
$agent_data = array();
$agent_data[0] = html_print_image('images/agent_critical.png', true, array('title' => __('Agents critical')));
$agent_data[1] = "<a style='color: #FC4444;' href='" . $links['agents_critical'] . "'><b><span style='font-size: 12pt; font-weight: bold; color: #FC4444;'>".format_numeric($data['agent_critical'])."</span></b></a>";
$agent_data[1] = "<a style='color: ".COL_CRITICAL.";' href='" . $links['agents_critical'] . "'><b><span style='font-size: 12pt; font-weight: bold; color: #FC4444;'>".format_numeric($data['agent_critical'])."</span></b></a>";
$agent_data[2] = html_print_image('images/agent_warning.png', true, array('title' => __('Agents warning')));
$agent_data[3] = "<a style='color: #FAD403;' href='" . $links['agents_warning'] . "'><b><span style='font-size: 12pt; font-weight: bold; color: #FAD403;'>".format_numeric($data['agent_warning'])."</span></b></a>";
$agent_data[3] = "<a style='color: ".COL_WARNING.";' href='" . $links['agents_warning'] . "'><b><span style='font-size: 12pt; font-weight: bold; color: #FAD403;'>".format_numeric($data['agent_warning'])."</span></b></a>";
$table_agent->data[] = $agent_data;
$agent_data = array();
$agent_data[0] = html_print_image('images/agent_ok.png', true, array('title' => __('Agents ok')));
$agent_data[1] = "<a style='color: #80BA27;' href='" . $links['agents_ok'] . "'><b><span style='font-size: 12pt; font-weight: bold; color: #80BA27;'>".format_numeric($data['agent_ok'])."</span></b></a>";
$agent_data[1] = "<a style='color: ".COL_NORMAL.";' href='" . $links['agents_ok'] . "'><b><span style='font-size: 12pt; font-weight: bold; color: #80BA27;'>".format_numeric($data['agent_ok'])."</span></b></a>";
$agent_data[2] = html_print_image('images/agent_unknown.png', true, array('title' => __('Agents unknown')));
$agent_data[3] = "<a style='color: #B2B2B2;' href='" . $links['agents_unknown'] . "'><b><span style='font-size: 12pt; font-weight: bold; color: #B2B2B2;'>".format_numeric($data['agent_unknown'])."</span></b></a>";
$agent_data[3] = "<a style='color: ".COL_UNKNOWN.";' href='" . $links['agents_unknown'] . "'><b><span style='font-size: 12pt; font-weight: bold; color: #B2B2B2;'>".format_numeric($data['agent_unknown'])."</span></b></a>";
$table_agent->data[] = $agent_data;
$agent_data = array();
$agent_data[0] = html_print_image('images/agent_notinit.png', true, array('title' => __('Agents not init')));
$agent_data[1] = "<a style='color: #5BB6E5;' href='" . $links['agents_not_init'] . "'><b><span style='font-size: 12pt; font-weight: bold; color: #5BB6E5;'>".format_numeric($data['agent_not_init'])."</span></b></a>";
$agent_data[1] = "<a style='color: ".COL_NOTINIT.";' href='" . $links['agents_not_init'] . "'><b><span style='font-size: 12pt; font-weight: bold; color: #5BB6E5;'>".format_numeric($data['agent_not_init'])."</span></b></a>";
$agent_data[2] = "";
$agent_data[3] = "";
@ -2781,8 +2768,8 @@ function reporting_get_event_histogram ($events) {
$colors = array(
EVENT_CRIT_MAINTENANCE => COL_MAINTENANCE,
EVENT_CRIT_INFORMATIONAL => COL_INFORMATIONAL,
EVENT_CRIT_NORMAL => COL_MINOR,
EVENT_CRIT_MINOR => COL_NORMAL,
EVENT_CRIT_NORMAL => COL_NORMAL,
EVENT_CRIT_MINOR => COL_MINOR,
EVENT_CRIT_WARNING => COL_WARNING,
EVENT_CRIT_MAJOR => COL_MAJOR,
EVENT_CRIT_CRITICAL => COL_CRITICAL

View File

@ -1167,14 +1167,16 @@ function visual_map_process_wizard_add ($id_agents, $image, $id_layout, $range,
*
* @return string Return the message status to insert DB.
*/
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, $label_type, $type, $enable_link = true,
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, $label_type, $type, $enable_link = true,
$id_server = 0, $kind_relationship = VISUAL_MAP_WIZARD_PARENTS_NONE,
$item_in_the_map = 0) {
if (empty ($id_modules)) {
$return = ui_print_error_message (__('No modules selected'), '', true);
$return = ui_print_error_message(
__('No modules selected'), '', true);
return $return;
}
@ -1190,6 +1192,7 @@ function visual_map_process_wizard_add_modules ($id_modules, $image, $id_layout,
$pos_y = $pos_y + $range;
}
if ($id_server != 0) {
$connection = db_get_row_filter('tmetaconsole_setup',
array('id' => $id_server));
@ -1310,20 +1313,23 @@ function visual_map_process_wizard_add_modules ($id_modules, $image, $id_layout,
*
* @return string Return the message status to insert DB.
*/
function visual_map_process_wizard_add_agents ($id_agents, $image, $id_layout,
$range, $width = 0, $height = 0, $period, $process_value, $percentileitem_width,
$max_value, $type_percentile, $value_show, $label_type, $type, $enable_link = 1,
$id_server = 0, $kind_relationship = VISUAL_MAP_WIZARD_PARENTS_NONE,
function visual_map_process_wizard_add_agents ($id_agents, $image,
$id_layout, $range, $width = 0, $height = 0, $period,
$process_value, $percentileitem_width, $max_value, $type_percentile,
$value_show, $label_type, $type, $enable_link = 1, $id_server = 0,
$kind_relationship = VISUAL_MAP_WIZARD_PARENTS_NONE,
$item_in_the_map = 0) {
global $config;
if (empty ($id_agents)) {
$return = ui_print_error_message (__('No agents selected'), '', true);
$return = ui_print_error_message(
__('No agents selected'), '', true);
return $return;
}
$id_agents = (array) $id_agents;
$id_agents = (array)$id_agents;
$error = false;
$pos_y = 10;
@ -1339,7 +1345,14 @@ function visual_map_process_wizard_add_agents ($id_agents, $image, $id_layout,
$relationship = false;
}
foreach ($id_agents as $id_agent) {
if (is_array($id_agent)) {
$id_a = $id_agent['id_agent'];
$id_server = $id_agent['id_server'];
$id_agent = $id_a;
}
if ($pos_x > 600) {
$pos_x = 10;
$pos_y = $pos_y + $range;
@ -1383,6 +1396,7 @@ function visual_map_process_wizard_add_agents ($id_agents, $image, $id_layout,
}
if ($id_server != 0) {
$connection = db_get_row_filter('tmetaconsole_setup',
array('id' => $id_server));
if (metaconsole_load_external_db($connection) != NOERR) {
@ -1874,8 +1888,6 @@ function visual_map_get_user_layouts ($id_user = 0, $only_names = false, $filter
if (! is_array ($filter))
$filter = array ();
$where = db_format_array_where_clause_sql ($filter);
if ($returnAllGroup)
$groups = users_get_groups ($id_user, 'RR');
else
@ -1888,6 +1900,8 @@ function visual_map_get_user_layouts ($id_user = 0, $only_names = false, $filter
$where .= sprintf ('id_group IN (%s)', implode (",", array_keys ($groups)));
}
$where .= db_format_array_where_clause_sql ($filter);
if ($where == '') {
$where = array();
}

View File

@ -201,7 +201,7 @@ function agent_changed_by_multiple_agents (event, id_agent, selected) {
jQuery.post (homedir + '/ajax.php',
{
"page": "operation/agentes/ver_agente",
"page": "include/ajax/module",
"get_agent_modules_json_for_multiple_agents": 1,
"id_agent[]": idAgents,
"all": find_modules,

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: pandora-fms\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2015-07-01 11:30+0200\n"
"PO-Revision-Date: 2015-07-01 10:34+0000\n"
"PO-Revision-Date: 2015-07-07 16:12+0000\n"
"Last-Translator: Carlos Moreno <carlos.moreno@artica.es>\n"
"Language-Team: Spanish <es@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2015-07-01 10:37+0000\n"
"X-Generator: Launchpad (build 17590)\n"
"X-Launchpad-Export-Date: 2015-07-09 07:54+0000\n"
"X-Generator: Launchpad (build 17608)\n"
#: ../../enterprise_bk/mobile/include/functions_web.php:15
#: ../../enterprise_bk/meta/general/main_header.php:125
@ -3864,7 +3864,7 @@ msgstr "No se pudo actualizar"
#: ../../enterprise_bk/godmode/reporting/reporting_builder.template_advanced.php:107
#: ../../enterprise/godmode/reporting/reporting_builder.template_advanced.php:107
msgid "Advance Options"
msgstr ""
msgstr "Opciones avanzadas"
#: ../../enterprise_bk/godmode/reporting/reporting_builder.template_advanced.php:118
#: ../../enterprise_bk/godmode/reporting/reporting_builder.advanced.php:83
@ -4999,12 +4999,12 @@ msgstr ""
#: ../../enterprise_bk/godmode/reporting/reporting_builder.template_wizard.php:283
#: ../../enterprise/godmode/reporting/reporting_builder.template_wizard.php:283
msgid "Target group"
msgstr ""
msgstr "Grupo objetivo"
#: ../../enterprise_bk/godmode/reporting/reporting_builder.template_wizard.php:310
#: ../../enterprise/godmode/reporting/reporting_builder.template_wizard.php:310
msgid "Filter by"
msgstr ""
msgstr "Filtrar por"
#: ../../enterprise_bk/godmode/reporting/reporting_builder.template_wizard.php:313
#: ../../enterprise_bk/godmode/alerts/alert_events_rules.php:400
@ -5036,7 +5036,7 @@ msgstr "Filtrar agente"
#: ../../enterprise_bk/godmode/reporting/reporting_builder.template_wizard.php:373
#: ../../enterprise/godmode/reporting/reporting_builder.template_wizard.php:373
msgid "Filter tag"
msgstr ""
msgstr "Filtro por tag"
#: ../../enterprise_bk/godmode/reporting/reporting_builder.template_wizard.php:385
#: ../../enterprise_bk/godmode/reporting/graph_template_wizard.php:173
@ -8573,7 +8573,7 @@ msgstr "Dir"
#: ../../enterprise_bk/godmode/agentes/collection_manager.php:231
#: ../../enterprise/godmode/agentes/collection_manager.php:231
msgid "No colections for this agent"
msgstr ""
msgstr "El agente no tiene colecciones"
#: ../../enterprise_bk/godmode/agentes/collections.php:48
#: ../../enterprise/godmode/agentes/collections.php:48
@ -12785,7 +12785,7 @@ msgstr "Desconocido"
#: ../../enterprise_bk/operation/services/services.service.php:86
#: ../../enterprise/operation/services/services.service.php:86
msgid "No Services"
msgstr ""
msgstr "Sin servicios"
#: ../../enterprise_bk/operation/services/services.list.php:196
#: ../../enterprise_bk/operation/services/services.service.php:124
@ -12868,7 +12868,7 @@ msgstr "PDF"
#: ../../enterprise/godmode/reporting/reporting_builder.template.php:291
#: ../../enterprise/operation/reporting/custom_reporting.php:19
msgid "JSON"
msgstr ""
msgstr "JSON"
#: ../../enterprise_bk/operation/reporting/custom_reporting.php:21
#: ../../enterprise_bk/operation/reporting/custom_reporting.php:63
@ -12891,7 +12891,7 @@ msgstr "Exportar a PDF"
#: ../../enterprise/godmode/reporting/reporting_builder.template.php:341
#: ../../enterprise/operation/reporting/custom_reporting.php:44
msgid "Export to JSON"
msgstr ""
msgstr "Exportar a JSON"
#: ../../enterprise_bk/operation/reporting/custom_reporting.php:47
#: ../../enterprise_bk/operation/reporting/custom_reporting.php:70
@ -12913,7 +12913,7 @@ msgstr "Enviar por correo-e "
#: ../../enterprise_bk/operation/menu.php:36
#: ../../enterprise/operation/menu.php:36
msgid "List of Services"
msgstr ""
msgstr "Lista de servicios"
#: ../../enterprise_bk/operation/menu.php:83
#: ../../mobile/include/functions_web.php:21
@ -14074,7 +14074,7 @@ msgstr "Vista de alertas"
#: ../../enterprise_bk/meta/general/main_header.php:102
#: ../../enterprise/meta/general/main_header.php:102
msgid "Monitors view"
msgstr "Vista de monitories"
msgstr "Vista de monitores"
#: ../../enterprise_bk/meta/general/main_header.php:116
#: ../../enterprise_bk/meta/general/logon_ok.php:43
@ -14119,7 +14119,7 @@ msgstr "Plantillas de informes"
#: ../../enterprise/meta/general/main_header.php:148
#: ../../enterprise/include/functions_reporting.php:62
msgid "Templates wizard"
msgstr "Plantillas de wizard"
msgstr "Asistente de plantillas"
#: ../../enterprise_bk/meta/general/main_header.php:155
#: ../../enterprise_bk/meta/general/logon_ok.php:60
@ -14442,32 +14442,32 @@ msgstr "Vista de grupo"
#: ../../enterprise_bk/meta/monitoring/group_view.php:74
#: ../../enterprise/meta/monitoring/group_view.php:74
msgid "Summary by status"
msgstr ""
msgstr "Resumen por estados"
#: ../../enterprise_bk/meta/monitoring/group_view.php:78
#: ../../enterprise/meta/monitoring/group_view.php:78
msgid "% Monitors Critical"
msgstr ""
msgstr "% Monitores en critico"
#: ../../enterprise_bk/meta/monitoring/group_view.php:79
#: ../../enterprise/meta/monitoring/group_view.php:79
msgid "% Monitors Warning"
msgstr ""
msgstr "% Monitores en alarma"
#: ../../enterprise_bk/meta/monitoring/group_view.php:80
#: ../../enterprise/meta/monitoring/group_view.php:80
msgid "% Monitors OK"
msgstr ""
msgstr "% Monitores en ok"
#: ../../enterprise_bk/meta/monitoring/group_view.php:81
#: ../../enterprise/meta/monitoring/group_view.php:81
msgid "% Agents Unknown"
msgstr ""
msgstr "% Monitores en desconocido"
#: ../../enterprise_bk/meta/monitoring/group_view.php:101
#: ../../enterprise/meta/monitoring/group_view.php:101
msgid "Group or Tag"
msgstr ""
msgstr "Grupo o Etiqueta"
#: ../../enterprise_bk/meta/monitoring/group_view.php:105
#: ../../enterprise_bk/meta/monitoring/tactical.php:325
@ -14869,17 +14869,17 @@ msgstr "No inicializados"
#: ../../enterprise_bk/meta/monitoring/tactical.php:336
#: ../../enterprise/meta/monitoring/tactical.php:337
msgid "Report of state"
msgstr ""
msgstr "Informe de estado"
#: ../../enterprise_bk/meta/monitoring/tactical.php:365
#: ../../enterprise/meta/monitoring/tactical.php:366
msgid "Report of events"
msgstr ""
msgstr "Informe de eventos"
#: ../../enterprise_bk/meta/monitoring/tactical.php:370
#: ../../enterprise/meta/monitoring/tactical.php:371
msgid "Info of state in events"
msgstr ""
msgstr "Información de estado en eventos"
#: ../../enterprise_bk/meta/monitoring/tactical.php:386
#: ../../enterprise/meta/monitoring/tactical.php:387
@ -15484,7 +15484,7 @@ msgstr "Error al conectar con %s"
#: ../../enterprise_bk/meta/advanced/synchronizing.component.php:302
#: ../../enterprise/meta/advanced/synchronizing.component.php:302
msgid "Synchronizing Components"
msgstr ""
msgstr "Sincronizar componentes"
#: ../../enterprise_bk/meta/advanced/synchronizing.component.php:309
#: ../../enterprise_bk/meta/advanced/synchronizing.user.php:505
@ -15875,7 +15875,7 @@ msgstr "Sólo bases de datos"
#: ../../enterprise_bk/meta/advanced/policymanager.apply.php:188
#: ../../enterprise/meta/advanced/policymanager.apply.php:188
msgid "Apply Policies"
msgstr ""
msgstr "Aplicar politicas"
#: ../../enterprise_bk/meta/advanced/policymanager.apply.php:202
#: ../../mobile/include/functions_web.php:27
@ -15936,7 +15936,7 @@ msgstr ""
#: ../../enterprise_bk/meta/advanced/synchronizing.user.php:498
#: ../../enterprise/meta/advanced/synchronizing.user.php:498
msgid "Synchronizing Users"
msgstr ""
msgstr "Sincronizar usuarios"
#: ../../enterprise_bk/meta/advanced/synchronizing.user.php:526
#: ../../godmode/massive/massive_delete_profiles.php:104
@ -16121,7 +16121,7 @@ msgstr "Creadas/actualizadas %s/%s plantillas"
#: ../../enterprise_bk/meta/advanced/synchronizing.alert.php:324
#: ../../enterprise/meta/advanced/synchronizing.alert.php:324
msgid "Synchronizing Alerts"
msgstr ""
msgstr "Sincronizar alertas"
#: ../../enterprise_bk/meta/advanced/synchronizing.group.php:103
#: ../../enterprise/meta/advanced/synchronizing.group.php:103
@ -16186,7 +16186,7 @@ msgstr "Ninguna actualización o grupo creado"
#: ../../enterprise_bk/meta/advanced/synchronizing.group.php:227
#: ../../enterprise/meta/advanced/synchronizing.group.php:227
msgid "Synchronizing Groups"
msgstr ""
msgstr "Sincronizar grupos"
#: ../../enterprise_bk/meta/advanced/synchronizing.tag.php:124
#: ../../enterprise/meta/advanced/synchronizing.tag.php:124
@ -16203,7 +16203,7 @@ msgstr "Creados/actualizados %s/%s tags"
#: ../../enterprise_bk/meta/advanced/synchronizing.tag.php:138
#: ../../enterprise/meta/advanced/synchronizing.tag.php:138
msgid "Synchronizing Tags"
msgstr ""
msgstr "Sincronizar tags"
#: ../../enterprise_bk/meta/advanced/metasetup.php:49
#: ../../enterprise/meta/advanced/metasetup.php:54
@ -16768,7 +16768,7 @@ msgstr "Filtrar por grupo"
#: ../../enterprise_bk/meta/include/functions_networkmap_meta.php:515
#: ../../enterprise/meta/include/functions_networkmap_meta.php:515
msgid "Filter by tag"
msgstr ""
msgstr "Filtrar por tag"
#: ../../enterprise_bk/meta/include/functions_networkmap_meta.php:515
#: ../../operation/agentes/alerts_status.functions.php:86
@ -17454,7 +17454,7 @@ msgstr "Consola visual"
#: ../../enterprise_bk/meta/screens/screens.networkmap.php:53
#: ../../enterprise/meta/screens/screens.networkmap.php:53
msgid "Networkmap list"
msgstr ""
msgstr "Lista de mapas de red"
#: ../../enterprise_bk/dashboard/main_dashboard.php:84
#: ../../enterprise/dashboard/main_dashboard.php:84
@ -18559,7 +18559,7 @@ msgstr "Lista de Plantillas"
#: ../../enterprise_bk/include/functions_reporting.php:82
#: ../../enterprise/include/functions_reporting.php:82
msgid "Templates Wizard"
msgstr "Plantillas Wizard"
msgstr "Asistente de plantillas"
#: ../../enterprise_bk/include/functions_reporting.php:545
#: ../../enterprise/include/functions_reporting.php:578
@ -18657,84 +18657,84 @@ msgstr "Fechas"
#: ../../enterprise/include/functions_reporting.php:1173
#: ../../enterprise/include/functions_reporting_pdf.php:1700
msgid "January"
msgstr ""
msgstr "Enero"
#: ../../enterprise_bk/include/functions_reporting.php:1108
#: ../../enterprise_bk/include/functions_reporting_pdf.php:1733
#: ../../enterprise/include/functions_reporting.php:1176
#: ../../enterprise/include/functions_reporting_pdf.php:1703
msgid "February"
msgstr ""
msgstr "Febrero"
#: ../../enterprise_bk/include/functions_reporting.php:1111
#: ../../enterprise_bk/include/functions_reporting_pdf.php:1736
#: ../../enterprise/include/functions_reporting.php:1179
#: ../../enterprise/include/functions_reporting_pdf.php:1706
msgid "March"
msgstr ""
msgstr "Marzo"
#: ../../enterprise_bk/include/functions_reporting.php:1114
#: ../../enterprise_bk/include/functions_reporting_pdf.php:1739
#: ../../enterprise/include/functions_reporting.php:1182
#: ../../enterprise/include/functions_reporting_pdf.php:1709
msgid "April"
msgstr ""
msgstr "Abril"
#: ../../enterprise_bk/include/functions_reporting.php:1117
#: ../../enterprise_bk/include/functions_reporting_pdf.php:1742
#: ../../enterprise/include/functions_reporting.php:1185
#: ../../enterprise/include/functions_reporting_pdf.php:1712
msgid "May"
msgstr ""
msgstr "Mayo"
#: ../../enterprise_bk/include/functions_reporting.php:1120
#: ../../enterprise_bk/include/functions_reporting_pdf.php:1745
#: ../../enterprise/include/functions_reporting.php:1188
#: ../../enterprise/include/functions_reporting_pdf.php:1715
msgid "June"
msgstr ""
msgstr "Junio"
#: ../../enterprise_bk/include/functions_reporting.php:1123
#: ../../enterprise_bk/include/functions_reporting_pdf.php:1748
#: ../../enterprise/include/functions_reporting.php:1191
#: ../../enterprise/include/functions_reporting_pdf.php:1718
msgid "July"
msgstr ""
msgstr "Julio"
#: ../../enterprise_bk/include/functions_reporting.php:1126
#: ../../enterprise_bk/include/functions_reporting_pdf.php:1751
#: ../../enterprise/include/functions_reporting.php:1194
#: ../../enterprise/include/functions_reporting_pdf.php:1721
msgid "August"
msgstr ""
msgstr "Agosto"
#: ../../enterprise_bk/include/functions_reporting.php:1129
#: ../../enterprise_bk/include/functions_reporting_pdf.php:1754
#: ../../enterprise/include/functions_reporting.php:1197
#: ../../enterprise/include/functions_reporting_pdf.php:1724
msgid "September"
msgstr ""
msgstr "Septiembre"
#: ../../enterprise_bk/include/functions_reporting.php:1132
#: ../../enterprise_bk/include/functions_reporting_pdf.php:1757
#: ../../enterprise/include/functions_reporting.php:1200
#: ../../enterprise/include/functions_reporting_pdf.php:1727
msgid "October"
msgstr ""
msgstr "Octubre"
#: ../../enterprise_bk/include/functions_reporting.php:1135
#: ../../enterprise_bk/include/functions_reporting_pdf.php:1760
#: ../../enterprise/include/functions_reporting.php:1203
#: ../../enterprise/include/functions_reporting_pdf.php:1730
msgid "November"
msgstr ""
msgstr "Noviembre"
#: ../../enterprise_bk/include/functions_reporting.php:1138
#: ../../enterprise_bk/include/functions_reporting_pdf.php:1763
#: ../../enterprise/include/functions_reporting.php:1206
#: ../../enterprise/include/functions_reporting_pdf.php:1733
msgid "December"
msgstr ""
msgstr "Diciembre"
#: ../../enterprise_bk/include/functions_reporting.php:1154
#: ../../enterprise_bk/include/functions_reporting.php:2295
@ -21616,7 +21616,7 @@ msgstr "Servidor de exploración de red"
#: ../../general/firts_task/collections.php:13
#: ../../general/firts_task/collections.php:22
msgid "Create Collections"
msgstr ""
msgstr "Crear colecciones"
#: ../../general/firts_task/collections.php:14
msgid ""
@ -21682,7 +21682,7 @@ msgstr "Incidentes"
#: ../../general/firts_task/incidents.php:16
#: ../../general/firts_task/incidents.php:25
msgid "Create Incidents"
msgstr ""
msgstr "Crear incidentes"
#: ../../general/firts_task/incidents.php:17
msgid ""
@ -21747,7 +21747,7 @@ msgstr ""
#: ../../general/firts_task/tags.php:13 ../../general/firts_task/tags.php:18
msgid "Create Tags"
msgstr ""
msgstr "Crear tags"
#: ../../general/firts_task/tags.php:14
msgid ""
@ -21814,7 +21814,7 @@ msgstr ""
#: ../../general/firts_task/network_map.php:15
msgid "Network Map"
msgstr ""
msgstr "Mapa de red"
#: ../../general/firts_task/network_map.php:18
#: ../../general/firts_task/network_map.php:34
@ -31006,12 +31006,12 @@ msgstr "Generado"
#: ../../enterprise/include/functions_reporting_pdf.php:2096
msgid "Report date"
msgstr ""
msgstr "Fecha del informe"
#: ../../enterprise/include/functions_reporting_pdf.php:2122
#: ../../enterprise/include/functions_netflow_pdf.php:56
msgid "Contents"
msgstr ""
msgstr "Contenido"
#: ../../enterprise/include/functions_services.php:1100
#: ../../enterprise/include/functions_services.php:1115

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -63,7 +63,7 @@
<div style='height: 10px'>
<?php
$version = '6.0dev';
$build = '150707';
$build = '150709';
$banner = "v$version Build $build";
error_reporting(0);

View File

@ -35,7 +35,6 @@ if (is_ajax ()) {
$get_agent_modules_json = (bool) get_parameter ('get_agent_modules_json');
$get_agent_status_tooltip = (bool) get_parameter ("get_agent_status_tooltip");
$get_agents_group_json = (bool) get_parameter ("get_agents_group_json");
$get_agent_modules_json_for_multiple_agents = (bool) get_parameter("get_agent_modules_json_for_multiple_agents");
$get_agent_modules_alerts_json_for_multiple_agents = (bool) get_parameter("get_agent_modules_alerts_json_for_multiple_agents");
$get_agents_json_for_multiple_modules = (bool) get_parameter("get_agents_json_for_multiple_modules");
$get_agent_modules_json_for_multiple_agents_id = (bool) get_parameter("get_agent_modules_json_for_multiple_agents_id");
@ -172,201 +171,6 @@ if (is_ajax ()) {
return;
}
if ($get_agent_modules_alerts_json_for_multiple_agents) {
$idAgents = get_parameter('id_agent');
$id_template = get_parameter('template');
$selection_mode = get_parameter('selection_mode','common');
$sql = 'SELECT DISTINCT(nombre)
FROM tagente_modulo t1, talert_template_modules t2
WHERE t2.id_agent_module = t1.id_agente_modulo
AND delete_pending = 0
AND id_alert_template = '.$id_template.'
AND id_agente IN (' . implode(',', $idAgents) . ')';
if ($selection_mode == 'common') {
$sql .= ' AND (
SELECT count(nombre)
FROM tagente_modulo t3, talert_template_modules t4
WHERE t4.id_agent_module = t3.id_agente_modulo
AND delete_pending = 0 AND t1.nombre = t3.nombre
AND id_agente IN (' . implode(',', $idAgents) . ')
AND id_alert_template = '.$id_template.') = (' . count($idAgents) . ')';
}
$sql .= ' ORDER BY t1.nombre';
$nameModules = db_get_all_rows_sql($sql);
if ($nameModules == false) {
$nameModules = array();
}
$result = array();
foreach($nameModules as $nameModule) {
$result[] = io_safe_output($nameModule['nombre']);
}
echo json_encode($result);
return;
}
if ($get_agent_modules_json_for_multiple_agents) {
$idAgents = get_parameter('id_agent');
$custom_condition = get_parameter('custom_condition', '');
$selection_mode = get_parameter('selection_mode', 'common');
$serialized = get_parameter('serialized', '');
$id_server = (int)get_parameter('id_server', 0);
$metaconsole_server_name = null;
if ($id_server != 0) {
$metaconsole_server_name = db_get_value('server_name',
'tmetaconsole_setup', 'id', $id_server);
}
$all = (string)get_parameter('all', 'all');
switch ($all) {
default:
case 'all':
$enabled = '1 = 1';
break;
case 'enabled':
$enabled = 'disabled = 0';
break;
}
if ($config ['metaconsole'] == 1 and defined('METACONSOLE')) {
$result = array();
$nameModules = array();
$temp = array();
$first = true;
$temp_element = array();
$counter = 0;
$first_elements = array();
foreach ($idAgents as $idA) {
if (empty($metaconsole_server_name)) {
if (strstr($idA, "|@_@|")) {
$row = explode ('|@_@|', $idA);
}
else {
$row = explode ('|', $idA);
}
$server_name = $row[0];
$id_agent = $row [1];
}
else {
$id_agent = $idA;
$server_name = $metaconsole_server_name;
}
// New iteration
$counter++;
//Metaconsole db connection
$connection = metaconsole_get_connection($server_name);
if (metaconsole_load_external_db($connection) != NOERR) {
//ui_print_error_message ("Error connecting to ".$server_name);
continue;
}
//Get agent's modules
$temp = agents_get_modules ($id_agent);
// Keep first element to search for common modules in next iterations
if (empty($nameModules) && $first == true) {
$first_elements = $temp;
}
$temp = array_intersect($temp, $first_elements);
// Add elements to array
if (!empty($temp)) {
// Add agent and server
foreach ($temp as $element_key => $element_value) {
//$temp_element[$element_key . '|' . $id_agent . '|' . $server_name] = $element_value;
if (!isset($temp_element[$element_value]) && $first)
$temp_element[$element_value] = $element_key . '|' . $id_agent . '|' . $server_name;
else if (isset($temp_element[$element_value]))
$temp_element[$element_value] .= ';' . $element_key . '|' . $id_agent . '|' . $server_name;
}
}
// If the result array is empty then there aren't common modules
else if (!$first)
unset($temp_element);
// First iteration flag
if (empty($nameModules) && $first == true)
$first = false;
// In last iteration we have all elements agents-servers serialized and ready to be used
if ($counter == count($idAgents)) {
if (!empty($temp_element))
foreach ($temp_element as $temp_ele_key => $temp_ele_val) {
$nameModules[$temp_ele_val] = $temp_ele_key;
}
}
//If there's only one agent selected, get out of this loop
/*if (count($idAgents) <= 1) {
//Restore db connection
metaconsole_restore_db();
break;
}*/
//$nameModules = array_intersect ($nameModules, $temp);
//Restore db connection
metaconsole_restore_db();
}
foreach ($nameModules as $nameModule_key => $nameModule_value) {
$result[$nameModule_key] = ui_print_truncate_text(io_safe_output($nameModule_value), 'module_medium', false, true);
}
}
else {
$sql = 'SELECT DISTINCT(nombre)
FROM tagente_modulo t1
WHERE ' . $enabled .
io_safe_output($custom_condition) . '
AND delete_pending = 0
AND id_agente IN (' . implode(',', $idAgents) . ')';
if ($selection_mode == 'common') {
$sql .= ' AND (
SELECT count(nombre)
FROM tagente_modulo t2
WHERE delete_pending = 0 AND t1.nombre = t2.nombre
AND id_agente IN (' . implode(',', $idAgents) . ')) = (' . count($idAgents) . ')';
}
$sql .= ' ORDER BY nombre';
$nameModules = db_get_all_rows_sql($sql);
if ($nameModules == false) {
$nameModules = array();
}
$result = array();
foreach ($nameModules as $nameModule) {
if (empty($serialized))
$result[io_safe_output($nameModule['nombre'])] =
ui_print_truncate_text(
io_safe_output($nameModule['nombre']), 'module_medium', false, true);
else
$result[io_safe_output($nameModule['nombre']).'$*$'.implode('|', $idAgents)] = ui_print_truncate_text(io_safe_output($nameModule['nombre']), 'module_medium', false, true);
}
}
echo json_encode($result);
return;
}
if ($get_agent_modules_json) {
$id_agent = (int) get_parameter ('id_agent');

View File

@ -21,7 +21,7 @@ enterprise_include_once ('include/functions_metaconsole.php');
// Login check
if (isset ($_GET["direct"])) {
if (isset ($_GET["direct"]) && $_GET["direct"]) {
/*
This is in case somebody wants to access the XML directly without
having the possibility to login and handle sessions
@ -57,7 +57,7 @@ if (isset ($_GET["direct"])) {
*/
require_once ("../../include/config.php");
require_once ("../../include/functions_reporting.php");
require_once ("../../include/auth/mysql.php");
require_once ("../../include/functions_db.php");
$nick = get_parameter ("nick");
$pass = get_parameter ("pass");
@ -84,7 +84,7 @@ if (isset ($_GET["direct"])) {
else {
require_once ("include/config.php");
require_once ("include/functions_reporting.php");
require_once ("include/auth/mysql.php");
require_once ("include/functions_db.php");
}
global $config;
@ -92,6 +92,10 @@ global $config;
check_login ();
$id_report = (int) get_parameter ('id');
$filename = (string) get_parameter ('filename');
if (empty($filename))
$filename = 'pandorafms_report_' . date('Y-m-d_His');
$date_mode = get_parameter('date_mode', 'none');
@ -138,11 +142,16 @@ unset($report['custom_logo']);
$xml = null;
$xml = array2XML($report, "report", $xml);
//~ $xml = preg_replace("/(<\/[^>]+>)/", "$1\n", $xml);
$xml = preg_replace("/(<[^>]+>)(<[^>]+>)(<[^>]+>)/", "$1\n$2\n$3", $xml);
$xml = preg_replace("/(<[^>]+>)(<[^>]+>)/", "$1\n$2", $xml);
header("Content-Type: application/xml; charset=utf-8");
header ('Content-Type: application/xml; charset=UTF-8');
header ('Content-Disposition: attachment; filename="'.$filename.'.xml"');
// Clean the output buffer
ob_clean();
echo $xml;
exit;
?>

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 6.0dev
%define release 150707
%define release 150709
# User and Group under which Apache is running
%define httpd_name httpd

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 6.0dev
%define release 150707
%define release 150709
%define httpd_name httpd
# User and Group under which Apache is running
%define httpd_name apache2

View File

@ -38,7 +38,7 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
('graph_res','5'),
('step_compact','1'),
('db_scheme_version','6.0dev'),
('db_scheme_build','PD150707'),
('db_scheme_build','PD150709'),
('show_unknown','0'),
('show_lastalerts','1'),
('style','pandora'),

View File

@ -1,5 +1,5 @@
package: pandorafms-server
Version: 6.0dev-150707
Version: 6.0dev-150709
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="6.0dev-150707"
pandora_version="6.0dev-150709"
package_cpan=0
package_pandora=1

View File

@ -43,7 +43,7 @@ our @EXPORT = qw(
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "6.0dev";
my $pandora_build = "150707";
my $pandora_build = "150709";
our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash

View File

@ -581,16 +581,24 @@ sub enterprise_load ($) {
if ($^O eq 'MSWin32') {
# If the Windows service dies the service is stopped, even inside an eval ($RUN is set to 0)!
eval 'local $SIG{__DIE__}; require PandoraFMS::Enterprise;';
} else {
}
else {
eval 'require PandoraFMS::Enterprise;';
}
# Ops
return 0 if ($@);
if ($@) {
open (STDERR, ">> " . $pa_config->{'errorlogfile'});
print STDERR $@;
close (STDERR);
return 0;
}
# Initialize the enterprise module.
PandoraFMS::Enterprise::init($pa_config);
return 1;
}

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_server
%define version 6.0dev
%define release 150707
%define release 150709
Summary: Pandora FMS Server
Name: %{name}

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_server
%define version 6.0dev
%define release 150707
%define release 150709
Summary: Pandora FMS Server
Name: %{name}

View File

@ -33,7 +33,7 @@ use PandoraFMS::Tools;
use PandoraFMS::DB;
# version: define current version
my $version = "6.0dev PS150707";
my $version = "6.0dev PS150709";
# Pandora server configuration
my %conf;

View File

@ -35,7 +35,7 @@ use Encode::Locale;
Encode::Locale::decode_argv;
# version: define current version
my $version = "6.0dev PS150707";
my $version = "6.0dev PS150709";
# save program name for logging
my $progname = basename($0);