Merge branch 'develop' into 'ent-6677-error-sql-en-item-group-alert-report-metaconsola'

Conflicts:
pandora_console/include/functions_alerts.php
This commit is contained in:
fbsanchez 2020-10-30 13:33:52 +01:00
commit 6267af774b
45 changed files with 814 additions and 599 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix package: pandorafms-agent-unix
Version: 7.0NG.750-201029 Version: 7.0NG.750-201030
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

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

View File

@ -55,7 +55,7 @@ my $Sem = undef;
my $ThreadSem = undef; my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.750'; use constant AGENT_VERSION => '7.0NG.750';
use constant AGENT_BUILD => '201029'; use constant AGENT_BUILD => '201030';
# Agent log default file size maximum and instances # Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000; use constant DEFAULT_MAX_LOG_SIZE => 600000;

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_agent_unix %define name pandorafms_agent_unix
%define version 7.0NG.750 %define version 7.0NG.750
%define release 201029 %define release 201030
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_agent_unix %define name pandorafms_agent_unix
%define version 7.0NG.750 %define version 7.0NG.750
%define release 201029 %define release 201030
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}

View File

@ -10,7 +10,7 @@
# ********************************************************************** # **********************************************************************
PI_VERSION="7.0NG.750" PI_VERSION="7.0NG.750"
PI_BUILD="201029" PI_BUILD="201030"
OS_NAME=`uname -s` OS_NAME=`uname -s`
FORCE=0 FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{} {}
Version Version
{201029} {201030}
ViewReadme ViewReadme
{Yes} {Yes}

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils; using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1 #define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("7.0NG.750(Build 201029)") #define PANDORA_VERSION ("7.0NG.750(Build 201030)")
string pandora_path; string pandora_path;
string pandora_dir; string pandora_dir;

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST" VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent" VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(7.0NG.750(Build 201029))" VALUE "ProductVersion", "(7.0NG.750(Build 201030))"
VALUE "FileVersion", "1.0.0.0" VALUE "FileVersion", "1.0.0.0"
END END
END END

View File

@ -1,5 +1,5 @@
package: pandorafms-console package: pandorafms-console
Version: 7.0NG.750-201029 Version: 7.0NG.750-201030
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
pandora_version="7.0NG.750-201029" pandora_version="7.0NG.750-201030"
package_pear=0 package_pear=0
package_pandora=1 package_pandora=1

View File

@ -92,7 +92,11 @@ function output_xml_report($id)
$group = db_get_value('nombre', 'tgrupo', 'id_grupo', $report['id_group']); $group = db_get_value('nombre', 'tgrupo', 'id_grupo', $report['id_group']);
echo '<group><![CDATA['.io_safe_output($group)."]]></group>\n"; echo '<group><![CDATA['.io_safe_output($group)."]]></group>\n";
$items = db_get_all_rows_field_filter('treport_content', 'id_report', $report['id_report']); $items = db_get_all_rows_field_filter(
'treport_content',
'id_report',
$report['id_report']
);
foreach ($items as $item) { foreach ($items as $item) {
echo "<item>\n"; echo "<item>\n";
echo '<type>'.io_safe_output($item['type'])."</type>\n"; echo '<type>'.io_safe_output($item['type'])."</type>\n";

View File

@ -37,8 +37,16 @@ function insert_item_report($report_id, $values)
ui_print_result_message( ui_print_result_message(
$result, $result,
sprintf(__("Success add '%s' item in report '%s'."), $values['type'], $name), sprintf(
sprintf(__("Error create '%s' item in report '%s'."), $values['type'], $name) __("Success add '%s' item in report '%s'."),
$values['type'],
$name
),
sprintf(
__("Error create '%s' item in report '%s'."),
$values['type'],
$name
)
); );
} }
} }
@ -55,9 +63,12 @@ function process_upload_xml_report($xml, $group_filter=0)
$posible_name = $values['name']; $posible_name = $values['name'];
$exist = true; $exist = true;
$loops = 30; $loops = 30;
// Loops to exit or tries // Loops to exit or tries.
while ($exist && $loops > 0) { while ($exist && $loops > 0) {
$exist = (bool) db_get_row_filter('treport', ['name' => io_safe_input($posible_name)]); $exist = (bool) db_get_row_filter(
'treport',
['name' => io_safe_input($posible_name)]
);
if ($exist) { if ($exist) {
$loops--; $loops--;
@ -74,7 +85,7 @@ function process_upload_xml_report($xml, $group_filter=0)
); );
break; break;
} else if ($loops != 30) { } else if ($loops != 30) {
ui_print_error_message( ui_print_warning_message(
sprintf( sprintf(
__("Warning create '%s' report, the name exist, the report have a name %s."), __("Warning create '%s' report, the name exist, the report have a name %s."),
$reportElement->name, $reportElement->name,
@ -89,13 +100,22 @@ function process_upload_xml_report($xml, $group_filter=0)
break; break;
} }
$id_group = db_get_value('id_grupo', 'tgrupo', 'nombre', $reportElement->group); if (isset($reportElement->group) === true
if ($id_group === false) { && empty($reportElement->group) === false
ui_print_error_message(__("Error the report haven't group.")); ) {
break; $id_group = db_get_value(
'id_grupo',
'tgrupo',
'nombre',
$reportElement->group
);
if ($id_group === false) {
ui_print_error_message(__("Error the report haven't group."));
break;
}
} }
if (isset($reportElement->description)) { if (isset($reportElement->description) === true) {
$values['description'] = $reportElement->description; $values['description'] = $reportElement->description;
} }
@ -108,9 +128,19 @@ function process_upload_xml_report($xml, $group_filter=0)
); );
if ($id_report) { if ($id_report) {
db_pandora_audit('Report management', 'Create report '.$id_report, false, false); db_pandora_audit(
'Report management',
'Create report '.$id_report,
false,
false
);
} else { } else {
db_pandora_audit('Report management', 'Fail to create report', false, false); db_pandora_audit(
'Report management',
'Fail to create report',
false,
false
);
break; break;
} }
@ -119,45 +149,52 @@ function process_upload_xml_report($xml, $group_filter=0)
$values = []; $values = [];
$values['id_report'] = $id_report; $values['id_report'] = $id_report;
if (isset($item['description'])) { if (isset($item['description']) === true) {
$values['description'] = io_safe_input($item['description']); $values['description'] = io_safe_input($item['description']);
} }
if (isset($item['period'])) { if (isset($item['period']) === true) {
$values['period'] = io_safe_input($item['period']); $values['period'] = io_safe_input($item['period']);
} }
if (isset($item['type'])) { if (isset($item['type']) === true) {
$values['type'] = io_safe_input($item['type']); $values['type'] = io_safe_input($item['type']);
} }
$agents_item = []; $agents_item = [];
if (isset($item['agent'])) { if (isset($item['agent']) === true) {
$agents = agents_get_agents( $agents = agents_get_agents(
['id_grupo' => $group_filter], ['id_grupo' => $group_filter],
[ [
'id_agente', 'id_agente',
'nombre', 'alias',
] ]
); );
$agent_clean = str_replace(['[', ']'], '', $item['agent']); $agent_clean = str_replace(
[
'[',
']',
],
'',
io_safe_output($item['agent'])
);
$regular_expresion = ($agent_clean != $item['agent']); $regular_expresion = ($agent_clean != $item['agent']);
foreach ($agents as $agent) { foreach ($agents as $agent) {
if ($regular_expresion) { if ($regular_expresion) {
if ((bool) preg_match('/'.$agent_clean.'/', io_safe_output($agent['nombre']))) { if ((bool) preg_match('/'.$agent_clean.'/', io_safe_output($agent['alias']))) {
$agents_item[$agent['id_agente']]['name'] = $agent['nombre']; $agents_item[$agent['id_agente']]['name'] = $agent['alias'];
} }
} else { } else {
if ($agent_clean == io_safe_output($agent['nombre'])) { if ($agent_clean == io_safe_output($agent['alias'])) {
$agents_item[$agent['id_agente']]['name'] = $agent['nombre']; $agents_item[$agent['id_agente']]['name'] = $agent['alias'];
} }
} }
} }
} }
if (isset($item['module'])) { if (isset($item['module']) === true) {
$module_clean = str_replace(['[', ']'], '', $item['module']); $module_clean = str_replace(['[', ']'], '', $item['module']);
$regular_expresion = ($module_clean != $item['module']); $regular_expresion = ($module_clean != $item['module']);

View File

@ -31,4 +31,6 @@ ALTER TABLE `treport` ADD COLUMN `index_render` tinyint(1) NOT NULL DEFAULT 1;
ALTER TABLE `treport_template` ADD COLUMN `cover_page_render` tinyint(1) NOT NULL DEFAULT 1; ALTER TABLE `treport_template` ADD COLUMN `cover_page_render` tinyint(1) NOT NULL DEFAULT 1;
ALTER TABLE `treport_template` ADD COLUMN `index_render` tinyint(1) NOT NULL DEFAULT 1; ALTER TABLE `treport_template` ADD COLUMN `index_render` tinyint(1) NOT NULL DEFAULT 1;
UPDATE `tconfig` SET value = '{"0.00000038580247":"Seconds&#x20;to&#x20;months","0.00000165343915":"Seconds&#x20;to&#x20;weeks","0.00001157407407":"Seconds&#x20;to&#x20;days","0.01666666666667":"Seconds&#x20;to&#x20;minutes","0.00000000093132":"Bytes&#x20;to&#x20;Gigabytes","0.00000095367432":"Bytes&#x20;to&#x20;Megabytes","0.00097656250000":"Bytes&#x20;to&#x20;Kilobytes","0.00000001653439":"Timeticks&#x20;to&#x20;weeks","0.00000011574074":"Timeticks&#x20;to&#x20;days"}' WHERE token = 'post_process_custom_values';
COMMIT; COMMIT;

View File

@ -1405,6 +1405,7 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES ('cr_incident_type', '');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('cr_incident_status', ''); INSERT INTO `tconfig` (`token`, `value`) VALUES ('cr_incident_status', '');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('cr_incident_title', ''); INSERT INTO `tconfig` (`token`, `value`) VALUES ('cr_incident_title', '');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('cr_incident_content', ''); INSERT INTO `tconfig` (`token`, `value`) VALUES ('cr_incident_content', '');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('post_process_custom_values', '{"0.00000038580247":"Seconds&#x20;to&#x20;months","0.00000165343915":"Seconds&#x20;to&#x20;weeks","0.00001157407407":"Seconds&#x20;to&#x20;days","0.01666666666667":"Seconds&#x20;to&#x20;minutes","0.00000000093132":"Bytes&#x20;to&#x20;Gigabytes","0.00000095367432":"Bytes&#x20;to&#x20;Megabytes","0.00097656250000":"Bytes&#x20;to&#x20;Kilobytes","0.00000001653439":"Timeticks&#x20;to&#x20;weeks","0.00000011574074":"Timeticks&#x20;to&#x20;days"}');
-- --------------------------------------------------------------------- -- ---------------------------------------------------------------------
-- Table `tconfig_os` -- Table `tconfig_os`

View File

@ -114,7 +114,9 @@ if ($get_comments) {
sprintf( sprintf(
' HAVING max_id_evento = %d', ' HAVING max_id_evento = %d',
$event['id_evento'] $event['id_evento']
) ),
// True for show comments of validated events.
true
); );
if ($events !== false) { if ($events !== false) {
$event = $events[0]; $event = $events[0];

View File

@ -20,7 +20,7 @@
/** /**
* Pandora build version and version * Pandora build version and version
*/ */
$build_version = 'PC201029'; $build_version = 'PC201030';
$pandora_version = 'v7.0NG.750'; $pandora_version = 'v7.0NG.750';
// Do not overwrite default timezone set if defined. // Do not overwrite default timezone set if defined.

View File

@ -673,15 +673,16 @@ function events_update_status($id_evento, $status, $filter=null, $history=false)
/** /**
* Retrieve all events filtered. * Retrieve all events filtered.
* *
* @param array $fields Fields to retrieve. * @param array $fields Fields to retrieve.
* @param array $filter Filters to be applied. * @param array $filter Filters to be applied.
* @param integer $offset Offset (pagination). * @param integer $offset Offset (pagination).
* @param integer $limit Limit (pagination). * @param integer $limit Limit (pagination).
* @param string $order Sort order. * @param string $order Sort order.
* @param string $sort_field Sort field. * @param string $sort_field Sort field.
* @param boolean $history Apply on historical table. * @param boolean $history Apply on historical table.
* @param boolean $return_sql Return SQL (true) or execute it (false). * @param boolean $return_sql Return SQL (true) or execute it (false).
* @param string $having Having filter. * @param string $having Having filter.
* @param boolean $validatedEvents If true, evaluate validated events.
* *
* @return array Events. * @return array Events.
* @throws Exception On error. * @throws Exception On error.
@ -695,7 +696,8 @@ function events_get_all(
$sort_field=null, $sort_field=null,
$history=false, $history=false,
$return_sql=false, $return_sql=false,
$having='' $having='',
$validatedEvents=false
) { ) {
global $config; global $config;
@ -912,10 +914,20 @@ function events_get_all(
break; break;
case EVENT_NO_VALIDATED: case EVENT_NO_VALIDATED:
// Show comments in validated events.
$validatedState = '';
if ($validatedEvents === true) {
$validatedState = sprintf(
'OR estado = %d',
EVENT_VALIDATE
);
}
$sql_filters[] = sprintf( $sql_filters[] = sprintf(
' AND (estado = %d OR estado = %d)', ' AND (estado = %d OR estado = %d %s)',
EVENT_NEW, EVENT_NEW,
EVENT_PROCESS EVENT_PROCESS,
$validatedState
); );
break; break;
} }
@ -1540,26 +1552,18 @@ function events_get_event($id, $fields=false, $meta=false, $history=false)
/** /**
* Retrieve all events ungrouped. * Retrieve all events ungrouped.
* *
* @param string $sql_post Sql_post. * @param string $sql_post Sql_post.
* @param integer $offset Offset. * @param boolean $meta Meta.
* @param integer $pagination Pagination. * @param boolean $history History.
* @param boolean $meta Meta. * @param boolean $returnSql Only Query.
* @param boolean $history History.
* @param boolean $total Total.
* @param boolean $history_db History_db.
* @param string $order Order.
* *
* @return mixed Array of events or false. * @return mixed Array of events or false.
*/ */
function events_get_events_no_grouped( function events_get_events_no_grouped(
$sql_post, $sql_post,
$offset=0,
$pagination=1,
$meta=false, $meta=false,
$history=false, $history=false,
$total=false, $returnSql=false
$history_db=false,
$order='ASC'
) { ) {
global $config; global $config;
@ -1569,7 +1573,11 @@ function events_get_events_no_grouped(
$sql .= events_get_secondary_groups_left_join($table); $sql .= events_get_secondary_groups_left_join($table);
$sql .= $sql_post; $sql .= $sql_post;
$events = db_get_all_rows_sql($sql, $history_db); if ($returnSql === true) {
return $sql;
}
$events = db_get_all_rows_sql($sql, $history);
return $events; return $events;
} }
@ -1622,29 +1630,59 @@ function events_get_events_grouped(
$event_lj = events_get_secondary_groups_left_join($table); $event_lj = events_get_secondary_groups_left_join($table);
if ($total) { if ($total) {
$sql = "SELECT COUNT(*) FROM (SELECT id_evento $sql = "SELECT COUNT(*) FROM (SELECT id_evento
FROM $table te $event_lj FROM $table te $event_lj ".$sql_post.'
WHERE 1=1 ".$sql_post.'
GROUP BY estado, evento, id_agente, id_agentmodule'.$groupby_extra.') AS t'; GROUP BY estado, evento, id_agente, id_agentmodule'.$groupby_extra.') AS t';
} else { } else {
$sql = "SELECT *, MAX(id_evento) AS id_evento, $sql = sprintf(
GROUP_CONCAT(DISTINCT user_comment SEPARATOR '<br>') AS user_comment, 'SELECT *,
GROUP_CONCAT(DISTINCT id_evento SEPARATOR ',') AS similar_ids, MAX(id_evento) AS id_evento,
COUNT(id_evento) AS event_rep, MAX(utimestamp) AS timestamp_rep, GROUP_CONCAT(
MIN(utimestamp) AS timestamp_rep_min, DISTINCT user_comment SEPARATOR "<br>"
(SELECT owner_user FROM $table WHERE id_evento = MAX(te.id_evento)) owner_user, ) AS user_comment,
(SELECT id_usuario FROM $table WHERE id_evento = MAX(te.id_evento)) id_usuario, GROUP_CONCAT(
(SELECT id_agente FROM $table WHERE id_evento = MAX(te.id_evento)) id_agente, DISTINCT id_evento SEPARATOR ","
(SELECT criticity FROM $table WHERE id_evento = MAX(te.id_evento)) AS criticity, ) AS similar_ids,
(SELECT ack_utimestamp FROM $table WHERE id_evento = MAX(te.id_evento)) AS ack_utimestamp, COUNT(id_evento) AS event_rep, MAX(utimestamp) AS timestamp_rep,
(SELECT nombre FROM tagente_modulo WHERE id_agente_modulo = te.id_agentmodule) AS module_name MIN(utimestamp) AS timestamp_rep_min,
FROM $table te $event_lj (SELECT owner_user
WHERE 1=1 ".$sql_post.' FROM %s
GROUP BY estado, evento, id_agente, id_agentmodule'.$groupby_extra; WHERE id_evento = MAX(te.id_evento)) AS owner_user,
$sql .= ' '.events_get_sql_order($sort_field, $order, 2); (SELECT id_usuario
$sql .= ' LIMIT '.$offset.','.$pagination; FROM %s
WHERE id_evento = MAX(te.id_evento)) AS id_usuario,
(SELECT id_agente
FROM %s
WHERE id_evento = MAX(te.id_evento)) AS id_agente,
(SELECT criticity
FROM %s
WHERE id_evento = MAX(te.id_evento)) AS criticity,
(SELECT ack_utimestamp
FROM %s
WHERE id_evento = MAX(te.id_evento)) AS ack_utimestamp,
(SELECT nombre
FROM tagente_modulo
WHERE id_agente_modulo = te.id_agentmodule) AS module_name
FROM %s te %s
%s
GROUP BY estado, evento, id_agente, id_agentmodule %s
%s
LIMIT %d, %d',
$table,
$table,
$table,
$table,
$table,
$table,
$event_lj,
$sql_post,
$groupby_extra,
events_get_sql_order($sort_field, $order, 2),
$offset,
$pagination
);
} }
// Extract the events by filter (or not) from db // Extract the events by filter (or not) from db.
$events = db_get_all_rows_sql($sql, $history_db); $events = db_get_all_rows_sql($sql, $history_db);
if ($total) { if ($total) {
@ -2959,7 +2997,8 @@ function events_get_agent(
$type = []; $type = [];
foreach ($filter_event_type as $event_type) { foreach ($filter_event_type as $event_type) {
if ($event_type != '') { if ($event_type != '') {
// If normal, warning, could be several (going_up_warning, going_down_warning... too complex. // If normal, warning, could be several
// (going_up_warning, going_down_warning... too complex.
// Shown to user only "warning, critical and normal". // Shown to user only "warning, critical and normal".
if ($event_type == 'warning' || $event_type == 'critical' || $event_type == 'normal') { if ($event_type == 'warning' || $event_type == 'critical' || $event_type == 'normal') {
$type[] = " event_type LIKE '%".$event_type."%' "; $type[] = " event_type LIKE '%".$event_type."%' ";
@ -2979,10 +3018,10 @@ function events_get_agent(
} }
if ($events_group) { if ($events_group) {
$sql_where .= sprintf( $secondary_groups = sprintf(
' INNER JOIN tgrupo tg ' INNER JOIN tgrupo tg
ON (te.id_grupo = tg.id_grupo AND tg.id_grupo = %s) ON (te.id_grupo = tg.id_grupo AND tg.id_grupo IN (%s))
OR (tg.id_grupo = tasg.id_group AND tasg.id_group = %s) OR (tg.id_grupo = tasg.id_group AND tasg.id_group IN (%s))
WHERE utimestamp > %d WHERE utimestamp > %d
AND utimestamp <= %d ', AND utimestamp <= %d ',
join(',', $id_group), join(',', $id_group),
@ -2990,22 +3029,27 @@ function events_get_agent(
$datelimit, $datelimit,
$date $date
); );
} else if ($events_module) { $sql_where = $secondary_groups.' '.$sql_where;
$sql_where .= sprintf(
' AND id_agentmodule = %d AND utimestamp > %d
AND utimestamp <= %d ',
$id_agent_module,
$datelimit,
$date
);
} else { } else {
$sql_where .= sprintf( $sql_where = ' WHERE 1=1 '.$sql_where;
' AND id_agente = %d AND utimestamp > %d
AND utimestamp <= %d ', if ($events_module) {
$id_agent, $sql_where .= sprintf(
$datelimit, ' AND id_agentmodule = %d AND utimestamp > %d
$date AND utimestamp <= %d ',
); $id_agent_module,
$datelimit,
$date
);
} else {
$sql_where .= sprintf(
' AND id_agente = %d AND utimestamp > %d
AND utimestamp <= %d ',
$id_agent,
$datelimit,
$date
);
}
} }
if (is_metaconsole() && $id_server) { if (is_metaconsole() && $id_server) {
@ -3025,11 +3069,7 @@ function events_get_agent(
} else { } else {
return events_get_events_no_grouped( return events_get_events_no_grouped(
$sql_where, $sql_where,
0,
1000,
(is_metaconsole() && $id_server) ? true : false, (is_metaconsole() && $id_server) ? true : false,
false,
false,
$history $history
); );
} }
@ -3682,6 +3722,38 @@ function events_get_response_target(
$event_response = db_get_row('tevent_response', 'id', $response_id); $event_response = db_get_row('tevent_response', 'id', $response_id);
$target = io_safe_output($event_response['target']); $target = io_safe_output($event_response['target']);
if (strpos($target, '_agent_alias_') !== false) {
if ($meta) {
$agente_table_name = 'tmetaconsole_agent';
$filter = [
'id_tagente' => $event['id_agente'],
'id_tmetaconsole_setup' => $server_id,
];
} else {
$agente_table_name = 'tagente';
$filter = ['id_agente' => $event['id_agente']];
}
$alias = db_get_value_filter('alias', $agente_table_name, $filter);
$target = str_replace('_agent_alias_', io_safe_output($alias), $target);
}
if (strpos($target, '_agent_name_') !== false) {
if ($meta) {
$agente_table_name = 'tmetaconsole_agent';
$filter = [
'id_tagente' => $event['id_agente'],
'id_tmetaconsole_setup' => $server_id,
];
} else {
$agente_table_name = 'tagente';
$filter = ['id_agente' => $event['id_agente']];
}
$name = db_get_value_filter('nombre', $agente_table_name, $filter);
$target = str_replace('_agent_name_', io_safe_output($name), $target);
}
// Substitute each macro. // Substitute each macro.
if (strpos($target, '_agent_address_') !== false) { if (strpos($target, '_agent_address_') !== false) {
if ($meta) { if ($meta) {
@ -3761,7 +3833,7 @@ function events_get_response_target(
if (strpos($target, '_group_name_') !== false) { if (strpos($target, '_group_name_') !== false) {
$target = str_replace( $target = str_replace(
'_group_name_', '_group_name_',
groups_get_name($event['id_grupo'], true), io_safe_output(groups_get_name($event['id_grupo'], true)),
$target $target
); );
} }
@ -3777,7 +3849,7 @@ function events_get_response_target(
if (strpos($target, '_event_date_') !== false) { if (strpos($target, '_event_date_') !== false) {
$target = str_replace( $target = str_replace(
'_event_date_', '_event_date_',
date($config['date_format'], $event['utimestamp']), io_safe_output(date($config['date_format'], $event['utimestamp'])),
$target $target
); );
} }
@ -3801,7 +3873,7 @@ function events_get_response_target(
if (strpos($target, '_alert_id_') !== false) { if (strpos($target, '_alert_id_') !== false) {
$target = str_replace( $target = str_replace(
'_alert_id_', '_alert_id_',
empty($event['is_alert_am']) ? __('N/A') : $event['is_alert_am'], empty($event['id_alert_am']) ? __('N/A') : $event['id_alert_am'],
$target $target
); );
} }
@ -3883,6 +3955,15 @@ function events_get_response_target(
$target = str_replace('_current_user_', $config['id_user'], $target); $target = str_replace('_current_user_', $config['id_user'], $target);
} }
// This will replace the macro with the command timeout value.
if (strpos($target, '_command_timeout_') !== false) {
$target = str_replace(
'_command_timeout_',
$event_response['command_timeout'],
$target
);
}
return $target; return $target;
} }
@ -6963,7 +7044,7 @@ function events_get_field_value_by_event_id(
if (strpos($value, '_group_name_') !== false) { if (strpos($value, '_group_name_') !== false) {
$value = str_replace( $value = str_replace(
'_group_name_', '_group_name_',
groups_get_name($event['id_grupo'], true), io_safe_output(groups_get_name($event['id_grupo'], true)),
$value $value
); );
} }
@ -6979,7 +7060,9 @@ function events_get_field_value_by_event_id(
if (strpos($value, '_event_date_') !== false) { if (strpos($value, '_event_date_') !== false) {
$value = str_replace( $value = str_replace(
'_event_date_', '_event_date_',
date($config['date_format'], $event['utimestamp']), io_safe_output(
date($config['date_format'], $event['utimestamp'])
),
$value $value
); );
} }

View File

@ -2541,13 +2541,9 @@ function graphic_agentaccess(
} else { } else {
$options['generals']['pdf']['width'] = 350; $options['generals']['pdf']['width'] = 350;
$options['generals']['pdf']['height'] = 125; $options['generals']['pdf']['height'] = 125;
if (!empty($data_array)) { $imgbase64 = '<img src="data:image/jpg;base64,';
$imgbase64 = '<img src="data:image/jpg;base64,'; $imgbase64 .= vbar_graph($data_array, $options, 2);
$imgbase64 .= vbar_graph($data_array, $options, 2); $imgbase64 .= '" />';
$imgbase64 .= '" />';
} else {
$imgbase64 .= vbar_graph($data_array, $options, 2);
}
return $imgbase64; return $imgbase64;
} }

View File

@ -2957,7 +2957,7 @@ function reporting_group_report($report, $content)
if (empty($id_group)) { if (empty($id_group)) {
$events = []; $events = [];
} else { } else {
$sql_where = sprintf(' AND id_grupo IN (%s) AND estado<>1 ', implode(',', $id_group)); $sql_where = sprintf(' WHERE id_grupo IN (%s) AND estado<>1 ', implode(',', $id_group));
$events = events_get_events_grouped( $events = events_get_events_grouped(
$sql_where, $sql_where,
0, 0,

View File

@ -802,7 +802,7 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false)
$events_graph = '<div style="width: 100%; height: 90px; display: flex; flex-direction: row; justify-content: center;">'; $events_graph = '<div style="width: 100%; height: 90px; display: flex; flex-direction: row; justify-content: center;">';
$events_graph .= graph_graphic_agentevents( $events_graph .= graph_graphic_agentevents(
$id_agente, $id_agente,
'385px;', '340px;margin:0',
45, 45,
SECONDS_1DAY, SECONDS_1DAY,
'', '',

View File

@ -1,425 +1,424 @@
(function ($) { (function($) {
var options = { var options = {
export: { export: {
export_data: false, // or true export_data: false, // or true
labels_long: null, labels_long: null,
homeurl: "", homeurl: ""
}, }
}; };
function init(plot) { function init(plot) {
plot.exportDataCSV = function (args) { plot.exportDataCSV = function(args) {
//amount = plot.getOptions().export.type, //amount = plot.getOptions().export.type,
//options = options || {}; //options = options || {};
// Options // Options
var type = "csv"; var type = "csv";
type = type.toLowerCase().trim(); type = type.toLowerCase().trim();
var graphData, var graphData,
dataObject, dataObject,
dataObjects = plot.getData(), dataObjects = plot.getData(),
result = []; result = [];
// Throw errors // Throw errors
var retrieveDataOject = function (dataObjects) { var retrieveDataOject = function(dataObjects) {
var result; var result;
if (typeof dataObjects === "undefined") if (typeof dataObjects === "undefined")
throw new Error("Empty parameter"); throw new Error("Empty parameter");
// Try to retrieve the avg set (not 100% reliable, I know) // Try to retrieve the avg set (not 100% reliable, I know)
if (dataObjects.length == 1) { if (dataObjects.length == 1) {
result = dataObjects.shift(); result = dataObjects.shift();
} }
if (dataObjects.length > 1) { if (dataObjects.length > 1) {
dataObjects.forEach(function (element) { dataObjects.forEach(function(element) {
if (/^Avg.:/i.test(element.label)) result = element; if (/^Avg.:/i.test(element.label)) result = element;
}); });
// If the avg set is missing, retrieve the first set // If the avg set is missing, retrieve the first set
if (typeof result === "undefined") result = dataObjects.shift(); if (typeof result === "undefined") result = dataObjects.shift();
} }
if (typeof result === "undefined") throw new Error("Empty result"); if (typeof result === "undefined") throw new Error("Empty result");
return result; return result;
}; };
// Throw errors // Throw errors
var processDataObject = function (dataObject) { var processDataObject = function(dataObject) {
var result; var result;
if (typeof dataObject === "undefined") if (typeof dataObject === "undefined")
throw new Error("Empty parameter"); throw new Error("Empty parameter");
if ( if (
typeof dataObject.data === "undefined" || typeof dataObject.data === "undefined" ||
!(dataObject.data instanceof Array) !(dataObject.data instanceof Array)
) )
throw new Error("Object malformed"); throw new Error("Object malformed");
/* { /* {
* head: [<column>,<column>,...,<column>], * head: [<column>,<column>,...,<column>],
* data: [ * data: [
* [<data>,<data>,...,<data>], * [<data>,<data>,...,<data>],
* [<data>,<data>,...,<data>], * [<data>,<data>,...,<data>],
* ..., * ...,
* [<data>,<data>,...,<data>], * [<data>,<data>,...,<data>],
* ] * ]
* } * }
*/ */
if (type === "csv") { if (type === "csv") {
result = { result = {
head: ["timestap", "date", "value", "label"], head: ["timestamp", "date", "value", "label"],
data: [], data: []
}; };
dataObject.data.forEach(function (item, index) { dataObject.data.forEach(function(item, index) {
var timestap = item[0]; var timestamp = item[0];
var d = new Date(item[0]); var d = new Date(item[0]);
var monthNames = [ var monthNames = [
"Jan", "Jan",
"Feb", "Feb",
"Mar", "Mar",
"Apr", "Apr",
"May", "May",
"Jun", "Jun",
"Jul", "Jul",
"Aug", "Aug",
"Sep", "Sep",
"Oct", "Oct",
"Nov", "Nov",
"Dec", "Dec"
]; ];
date_format = date_format =
(d.getDate() < 10 ? "0" : "") + (d.getDate() < 10 ? "0" : "") +
d.getDate() + d.getDate() +
" " + " " +
monthNames[d.getMonth()] + monthNames[d.getMonth()] +
" " + " " +
d.getFullYear() + d.getFullYear() +
" " + " " +
(d.getHours() < 10 ? "0" : "") + (d.getHours() < 10 ? "0" : "") +
d.getHours() + d.getHours() +
":" + ":" +
(d.getMinutes() < 10 ? "0" : "") + (d.getMinutes() < 10 ? "0" : "") +
d.getMinutes() + d.getMinutes() +
":" + ":" +
(d.getSeconds() < 10 ? "0" : "") + (d.getSeconds() < 10 ? "0" : "") +
d.getSeconds(); d.getSeconds();
var date = date_format; var date = date_format;
var value = item[1]; var value = item[1];
var clean_label = plot.getOptions().export.labels_long[ var clean_label = plot.getOptions().export.labels_long[
dataObject.label dataObject.label
]; ];
clean_label = clean_label.replace(new RegExp("&#x20;", "g"), " "); clean_label = clean_label.replace(new RegExp("&#x20;", "g"), " ");
result.data.push([timestap, date, value, clean_label]); result.data.push([timestamp, date, value, clean_label]);
}); });
} else if (type === "json") { } else if (type === "json") {
/* [ /* [
* { * {
* 'date': <date>, * 'date': <date>,
* 'value': <value> * 'value': <value>
* } * }
* ], * ],
* [ * [
* { * {
* 'date': <date>, * 'date': <date>,
* 'value': <value> * 'value': <value>
* } * }
* ], * ],
* ..., * ...,
* [ * [
* { * {
* 'date': <date>, * 'date': <date>,
* 'value': <value> * 'value': <value>
* } * }
* ] * ]
*/ */
result = []; result = [];
dataObject.data.forEach(function (item, index) { dataObject.data.forEach(function(item, index) {
var date = "", var date = "",
value = item[1]; value = item[1];
// Long labels are preferred // Long labels are preferred
if (typeof labels_long[index] !== "undefined") if (typeof labels_long[index] !== "undefined")
date = labels_long[index]; date = labels_long[index];
else if (typeof labels[index] !== "undefined") date = labels[index]; else if (typeof labels[index] !== "undefined") date = labels[index];
result.push({ result.push({
date: date, date: date,
value: value, value: value,
label: dataObject.label, label: dataObject.label
}); });
}); });
} }
if (typeof result === "undefined") throw new Error("Empty result"); if (typeof result === "undefined") throw new Error("Empty result");
return result; return result;
}; };
try { try {
var elements = []; var elements = [];
dataObject = retrieveDataOject(dataObjects); dataObject = retrieveDataOject(dataObjects);
if (dataObject) { if (dataObject) {
elements.push(processDataObject(dataObject)); elements.push(processDataObject(dataObject));
} }
dataObjects.forEach(function (element) { dataObjects.forEach(function(element) {
elements.push(processDataObject(element)); elements.push(processDataObject(element));
}); });
graphData = elements; graphData = elements;
// Transform the object data into a string
// cause PHP has limitations in the number
// of POST params received.
var graphDataStr = JSON.stringify(graphData);
// Transform the object data into a string // Build form
// cause PHP has limitations in the number var $form = $("<form></form>"),
// of POST params received. $dataInput = $("<input>"),
var graphDataStr = JSON.stringify(graphData); $typeInput = $("<input>"),
$separatorInput = $("<input>"),
$excelInput = $("<input>");
// Build form $dataInput
var $form = $("<form></form>"), .prop("name", "data")
$dataInput = $("<input>"), .prop("type", "text")
$typeInput = $("<input>"), .prop("value", graphDataStr);
$separatorInput = $("<input>"),
$excelInput = $("<input>");
$dataInput $typeInput
.prop("name", "data") .prop("name", "type")
.prop("type", "text") .prop("type", "text")
.prop("value", graphDataStr); .prop("value", type);
$typeInput $separatorInput
.prop("name", "type") .prop("name", "separator")
.prop("type", "text") .prop("type", "text")
.prop("value", type); .prop("value", ";");
$separatorInput $excelInput
.prop("name", "separator") .prop("name", "excel_encoding")
.prop("type", "text") .prop("type", "text")
.prop("value", ";"); .prop("value", 0);
$excelInput $form
.prop("name", "excel_encoding") .prop("method", "POST")
.prop("type", "text") .prop(
.prop("value", 0); "action",
plot.getOptions().export.homeurl + "include/graphs/export_data.php"
)
.append($dataInput, $typeInput, $separatorInput, $excelInput)
.hide()
// Firefox made me write into the DOM for this :(
.appendTo("body")
.submit();
} catch (e) {
alert("There was an error exporting the data");
}
};
$form plot.exportDataJSON = function(args) {
.prop("method", "POST") //amount = plot.getOptions().export.type,
.prop( //options = options || {};
"action",
plot.getOptions().export.homeurl + "include/graphs/export_data.php"
)
.append($dataInput, $typeInput, $separatorInput, $excelInput)
.hide()
// Firefox made me write into the DOM for this :(
.appendTo("body")
.submit();
} catch (e) {
alert("There was an error exporting the data");
}
};
plot.exportDataJSON = function (args) { // Options
//amount = plot.getOptions().export.type, var type = "json";
//options = options || {}; type = type.toLowerCase().trim();
// Options var graphData,
var type = "json"; dataObject,
type = type.toLowerCase().trim(); dataObjects = plot.getData(),
result = [];
var graphData, // Throw errors
dataObject, var retrieveDataOject = function(dataObjects) {
dataObjects = plot.getData(), var result;
result = [];
// Throw errors if (typeof dataObjects === "undefined")
var retrieveDataOject = function (dataObjects) { throw new Error("Empty parameter");
var result;
if (typeof dataObjects === "undefined") // Try to retrieve the avg set (not 100% reliable, I know)
throw new Error("Empty parameter"); if (dataObjects.length == 1) {
result = dataObjects.shift();
}
if (dataObjects.length > 1) {
dataObjects.forEach(function(element) {
if (/^Avg.:/i.test(element.label)) result = element;
});
// Try to retrieve the avg set (not 100% reliable, I know) // If the avg set is missing, retrieve the first set
if (dataObjects.length == 1) { if (typeof result === "undefined") result = dataObjects.shift();
result = dataObjects.shift(); }
}
if (dataObjects.length > 1) {
dataObjects.forEach(function (element) {
if (/^Avg.:/i.test(element.label)) result = element;
});
// If the avg set is missing, retrieve the first set if (typeof result === "undefined") throw new Error("Empty result");
if (typeof result === "undefined") result = dataObjects.shift();
}
if (typeof result === "undefined") throw new Error("Empty result"); return result;
};
return result; // Throw errors
}; var processDataObject = function(dataObject) {
var result;
// Throw errors if (typeof dataObject === "undefined")
var processDataObject = function (dataObject) { throw new Error("Empty parameter");
var result;
if (typeof dataObject === "undefined") if (
throw new Error("Empty parameter"); typeof dataObject.data === "undefined" ||
!(dataObject.data instanceof Array)
)
throw new Error("Object malformed");
if ( /* {
typeof dataObject.data === "undefined" || * head: [<column>,<column>,...,<column>],
!(dataObject.data instanceof Array) * data: [
) * [<data>,<data>,...,<data>],
throw new Error("Object malformed"); * [<data>,<data>,...,<data>],
* ...,
* [<data>,<data>,...,<data>],
* ]
* }
*/
if (type === "csv") {
result = {
head: ["date", "value", "label"],
data: []
};
/* { dataObject.data.forEach(function(item, index) {
* head: [<column>,<column>,...,<column>], var date = "",
* data: [ value = item[1];
* [<data>,<data>,...,<data>],
* [<data>,<data>,...,<data>],
* ...,
* [<data>,<data>,...,<data>],
* ]
* }
*/
if (type === "csv") {
result = {
head: ["date", "value", "label"],
data: [],
};
dataObject.data.forEach(function (item, index) { // Long labels are preferred
var date = "", if (
value = item[1]; typeof plot.getOptions().export.labels_long[index] !== "undefined"
)
date = plot.getOptions().export.labels_long[index];
else if (typeof labels[index] !== "undefined") date = labels[index];
// Long labels are preferred result.data.push([date, value, dataObject.label]);
if ( });
typeof plot.getOptions().export.labels_long[index] !== "undefined" } else if (type === "json") {
) /* [
date = plot.getOptions().export.labels_long[index]; * {
else if (typeof labels[index] !== "undefined") date = labels[index]; * 'date': <date>,
* 'value': <value>
* }
* ],
* [
* {
* 'date': <date>,
* 'value': <value>
* }
* ],
* ...,
* [
* {
* 'date': <date>,
* 'value': <value>
* }
* ]
*/
result = [];
result.data.push([date, value, dataObject.label]); dataObject.data.forEach(function(item, index) {
}); var date = "",
} else if (type === "json") { value = item[1];
/* [
* {
* 'date': <date>,
* 'value': <value>
* }
* ],
* [
* {
* 'date': <date>,
* 'value': <value>
* }
* ],
* ...,
* [
* {
* 'date': <date>,
* 'value': <value>
* }
* ]
*/
result = [];
dataObject.data.forEach(function (item, index) { // Long labels are preferred
var date = "", if (typeof labels_long[index] !== "undefined")
value = item[1]; date = labels_long[index];
else if (typeof labels[index] !== "undefined") date = labels[index];
// Long labels are preferred result.push({
if (typeof labels_long[index] !== "undefined") date: date,
date = labels_long[index]; value: value,
else if (typeof labels[index] !== "undefined") date = labels[index]; label: dataObject.label
});
});
}
result.push({ if (typeof result === "undefined") throw new Error("Empty result");
date: date,
value: value,
label: dataObject.label,
});
});
}
if (typeof result === "undefined") throw new Error("Empty result"); return result;
};
return result; try {
}; var elements = [];
var custom_graph = $("input:hidden[name=custom_graph]").value;
try { if (custom_graph) {
var elements = []; dataObject = retrieveDataOject(dataObjects);
var custom_graph = $("input:hidden[name=custom_graph]").value; dataObjects.forEach(function(element) {
elements.push(processDataObject(element));
});
graphData = elements;
} else {
dataObject = retrieveDataOject(dataObjects);
elements.push(processDataObject(dataObject));
graphData = elements;
}
if (custom_graph) { // Transform the object data into a string
dataObject = retrieveDataOject(dataObjects); // cause PHP has limitations in the number
dataObjects.forEach(function (element) { // of POST params received.
elements.push(processDataObject(element)); var graphDataStr = JSON.stringify(graphData);
});
graphData = elements;
} else {
dataObject = retrieveDataOject(dataObjects);
elements.push(processDataObject(dataObject));
graphData = elements;
}
// Transform the object data into a string // Build form
// cause PHP has limitations in the number var $form = $("<form></form>"),
// of POST params received. $dataInput = $("<input>"),
var graphDataStr = JSON.stringify(graphData); $typeInput = $("<input>"),
$separatorInput = $("<input>"),
$excelInput = $("<input>");
// Build form $dataInput
var $form = $("<form></form>"), .prop("name", "data")
$dataInput = $("<input>"), .prop("type", "text")
$typeInput = $("<input>"), .prop("value", graphDataStr);
$separatorInput = $("<input>"),
$excelInput = $("<input>");
$dataInput $typeInput
.prop("name", "data") .prop("name", "type")
.prop("type", "text") .prop("type", "text")
.prop("value", graphDataStr); .prop("value", type);
$typeInput $separatorInput
.prop("name", "type") .prop("name", "separator")
.prop("type", "text") .prop("type", "text")
.prop("value", type); .prop("value", ";");
$separatorInput $excelInput
.prop("name", "separator") .prop("name", "excel_encoding")
.prop("type", "text") .prop("type", "text")
.prop("value", ";"); .prop("value", 0);
$excelInput $form
.prop("name", "excel_encoding") .prop("method", "POST")
.prop("type", "text") .prop(
.prop("value", 0); "action",
plot.getOptions().export.homeurl + "include/graphs/export_data.php"
)
.append($dataInput, $typeInput, $separatorInput, $excelInput)
.hide()
// Firefox made me write into the DOM for this :(
.appendTo("body")
.submit();
} catch (e) {
alert("There was an error exporting the data");
}
};
}
$form $.plot.plugins.push({
.prop("method", "POST") init: init,
.prop( options: options,
"action", name: "exportdata",
plot.getOptions().export.homeurl + "include/graphs/export_data.php" version: "0.1"
) });
.append($dataInput, $typeInput, $separatorInput, $excelInput)
.hide()
// Firefox made me write into the DOM for this :(
.appendTo("body")
.submit();
} catch (e) {
alert("There was an error exporting the data");
}
};
}
$.plot.plugins.push({
init: init,
options: options,
name: "exportdata",
version: "0.1",
});
})(jQuery); })(jQuery);

View File

@ -346,13 +346,7 @@ function menu_graph(
$threshold = true; $threshold = true;
} }
$return .= "<div id='general_menu_$graph_id' class='menu_graph' style=' $return .= "<div id='general_menu_$graph_id' class='menu_graph'>";
width: 20px;
height: 150px;
left:100%;
position: absolute;
top: 0px;
background-color: tranparent;'>";
$return .= "<div id='menu_$graph_id' "."style='display: none; ".'text-align: center;'.'position: relative;'."border-bottom: 0px;'> $return .= "<div id='menu_$graph_id' "."style='display: none; ".'text-align: center;'.'position: relative;'."border-bottom: 0px;'>
<a href='javascript:'><img id='menu_cancelzoom_$graph_id' src='".$params['homeurl']."images/zoom_cross_grey.disabled.png' alt='".__('Cancel zoom')."' title='".__('Cancel zoom')."'></a>"; <a href='javascript:'><img id='menu_cancelzoom_$graph_id' src='".$params['homeurl']."images/zoom_cross_grey.disabled.png' alt='".__('Cancel zoom')."' title='".__('Cancel zoom')."'></a>";
if ($threshold) { if ($threshold) {
@ -745,13 +739,12 @@ function flot_slicesbar_graph(
// Set some containers to legend, graph, timestamp tooltip, etc. // Set some containers to legend, graph, timestamp tooltip, etc.
$height = ((int) $height + 15); $height = ((int) $height + 15);
if ($stat_win) {
$return = "<div id='$graph_id' class='noresizevc graph $adapt_key' style='width: ".$width.'%; height: '.$height."px; display: inline-block;'></div>";
} else {
$return = "<div id='$graph_id' class='noresizevc graph $adapt_key' style='width: ".$width.'%; height: '.$height."px;'></div>";
}
$return .= "<div id='value_$graph_id' style='display:none; position:absolute; background:#fff; border: solid 1px #aaa; padding: 2px'></div>"; $style = 'width:'.$width.'%;';
$style .= 'height:'.$height.'px;';
$return = "<div id='".$graph_id."' class='noresizevc graph ".$adapt_key."' style='".$style."'></div>";
$return .= "<div id='value_".$graph_id."' style='display:none; position:absolute; background:#fff; border: solid 1px #aaa; padding: 2px'></div>";
// Set a weird separator to serialize and unserialize // Set a weird separator to serialize and unserialize
// passing data from php to javascript. // passing data from php to javascript.

View File

@ -786,13 +786,12 @@ function post_process_select_events_unit(name, selected) {
function post_process_select_events(name) { function post_process_select_events(name) {
$("." + name + "_toggler").click(function() { $("." + name + "_toggler").click(function() {
var value = $("#text-" + name + "_text").val(); var value = $("#text-" + name + "_text").val();
var count = $("#" + name + "_select option").filter(function(i, item) { var count = $("#" + name + "_select option").filter(function(i, item) {
if (Number($(item).val()) == Number(value)) return true; if (Number($(item).val()) == Number(value)) return true;
else return false; else return false;
}).length; }).length;
if (count != 1) { if (count < 1) {
$("#" + name + "_select").append( $("#" + name + "_select").append(
$("<option>") $("<option>")
.val(value) .val(value)

View File

@ -12,6 +12,8 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
/*global $, _*/
var TreeController = { var TreeController = {
controllers: [], controllers: [],
getController: function() { getController: function() {
@ -38,12 +40,35 @@ var TreeController = {
return; return;
} }
function _recursiveGroupsCount(elements, childGroupsLength) {
if (typeof childGroupsLength === "undefined") {
childGroupsLength = 0;
}
_.each(elements, function(element) {
if (typeof element.children !== "undefined") {
childGroupsLength = _recursiveGroupsCount(
element.children,
childGroupsLength
);
childGroupsLength += element.children.length;
}
});
return childGroupsLength;
}
// Load branch // Load branch
function _processGroup(container, elements, rootGroup) { function _processGroup(container, elements, rootGroup) {
var $group = $("<ul></ul>"); var $group = $("<ul></ul>");
var childGroupsLength = _recursiveGroupsCount(elements);
// First group // First group.
if (typeof rootGroup != "undefined" && rootGroup == true) { if (typeof rootGroup != "undefined" && rootGroup == true) {
var messageLength = controller.tree.length;
if (childGroupsLength > 0) {
messageLength = childGroupsLength + controller.tree.length;
}
$group $group
.addClass("tree-root") .addClass("tree-root")
.hide() .hide()
@ -54,13 +79,12 @@ var TreeController = {
'images/pandora.png" />' + 'images/pandora.png" />' +
"<span class='margin-left-1'>" + "<span class='margin-left-1'>" +
(controller.tree.length > 0 (controller.tree.length > 0
? controller.foundMessage + ": " + controller.tree.length ? controller.foundMessage + ": " + messageLength
: "") + : "") +
"</div>" "</div>"
); );
} } else {
// Normal group // Normal group.
else {
$group.addClass("tree-group").hide(); $group.addClass("tree-group").hide();
} }

View File

@ -462,6 +462,10 @@ select:-internal-list-box {
width: 120px; width: 120px;
max-width: 120px; max-width: 120px;
} }
.w200px {
width: 200px;
max-width: 200px;
}
.w240px { .w240px {
width: 240px; width: 240px;
max-width: 240px; max-width: 240px;
@ -3074,6 +3078,12 @@ div#stat-win-module-graph div.nodata_container {
} }
.menu_graph { .menu_graph {
width: 30px;
height: 150px;
left: 100%;
position: absolute;
top: 0px;
background-color: transparent;
-moz-border-top-right-radius: 6px; -moz-border-top-right-radius: 6px;
-webkit-border-top-right-radius: 6px; -webkit-border-top-right-radius: 6px;
border-top-right-radius: 6px; border-top-right-radius: 6px;
@ -5866,7 +5876,7 @@ table.table_modal_alternate tr td:first-child {
} }
.flot-text { .flot-text {
width: 101%; width: 100%;
} }
/*Font header feedback*/ /*Font header feedback*/

View File

@ -129,7 +129,7 @@
<div style='height: 10px'> <div style='height: 10px'>
<?php <?php
$version = '7.0NG.750'; $version = '7.0NG.750';
$build = '201029'; $build = '201030';
$banner = "v$version Build $build"; $banner = "v$version Build $build";
error_reporting(0); error_reporting(0);

View File

@ -731,7 +731,7 @@ class Events
$system = System::getInstance(); $system = System::getInstance();
// --------------Fill the SQL POST------------------------------- // --------------Fill the SQL POST-------------------------------
$sql_post = ''; $sql_post = ' WHERE 1=1 ';
switch ($this->status) { switch ($this->status) {
case 0: case 0:

View File

@ -35,6 +35,7 @@ require_once $config['homedir'].'/include/functions_graph.php';
require_once $config['homedir'].'/include/functions_modules.php'; require_once $config['homedir'].'/include/functions_modules.php';
require_once $config['homedir'].'/include/functions_agents.php'; require_once $config['homedir'].'/include/functions_agents.php';
require_once $config['homedir'].'/include/functions_tags.php'; require_once $config['homedir'].'/include/functions_tags.php';
require_once $config['homedir'].'/include/php_to_js_values.php';
enterprise_include_once('include/functions_agents.php'); enterprise_include_once('include/functions_agents.php');
check_login(); check_login();

View File

@ -1,6 +1,5 @@
<?php <?php
// This file is an example on how things must NEVER be done.
// Pandora FMS - http://pandorafms.com // Pandora FMS - http://pandorafms.com
// ================================================== // ==================================================
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas // Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
@ -41,7 +40,7 @@ if (! defined('METACONSOLE')) {
$buttons['fields'] = [ $buttons['fields'] = [
'active' => false, 'active' => false,
'text' => '<a href="index.php?sec=view&sec2=operation/agentes/status_monitor&amp;section=fields">'.html_print_image('images/custom_columns.png', true, ['title' => __('Custom fields')]).'</a>', 'text' => '<a href="index.php?sec=view&sec2=operation/agentes/status_monitor&section=fields">'.html_print_image('images/custom_columns.png', true, ['title' => __('Custom fields')]).'</a>',
'operation' => true, 'operation' => true,
]; ];
@ -79,22 +78,27 @@ if (! defined('METACONSOLE')) {
ui_meta_print_header(__('Monitor view')); ui_meta_print_header(__('Monitor view'));
} }
$ag_freestring = (string) get_parameter('ag_freestring'); $recursion = get_parameter_switch('recursion', false);
$moduletype = (string) get_parameter('moduletype'); if ($recursion === false) {
$datatype = (string) get_parameter('datatype'); $recursion = get_parameter('recursion', false);
$ag_modulename = (string) get_parameter('ag_modulename'); }
$refr = (int) get_parameter('refr', 0);
$offset = (int) get_parameter('offset', 0); $ag_freestring = (string) get_parameter('ag_freestring');
$status = (int) get_parameter('status', 4); $moduletype = (string) get_parameter('moduletype');
$modulegroup = (int) get_parameter('modulegroup', -1); $datatype = (string) get_parameter('datatype');
$tag_filter = (int) get_parameter('tag_filter', 0); $ag_modulename = (string) get_parameter('ag_modulename');
$min_hours_status = (string) get_parameter('min_hours_status', ''); $refr = (int) get_parameter('refr', 0);
// Sort functionality $offset = (int) get_parameter('offset', 0);
$sortField = get_parameter('sort_field'); $status = (int) get_parameter('status', 4);
$sort = get_parameter('sort', 'none'); $modulegroup = (int) get_parameter('modulegroup', -1);
// When the previous page was a visualmap and show only one module $tag_filter = (int) get_parameter('tag_filter', 0);
$id_module = (int) get_parameter('id_module', 0); $min_hours_status = (string) get_parameter('min_hours_status', '');
$ag_custom_fields = (array) get_parameter('ag_custom_fields', []); // Sort functionality.
$sortField = get_parameter('sort_field');
$sort = get_parameter('sort', 'none');
// When the previous page was a visualmap and show only one module.
$id_module = (int) get_parameter('id_module', 0);
$ag_custom_fields = (array) get_parameter('ag_custom_fields', []);
$module_option = (int) get_parameter('module_option', 1); $module_option = (int) get_parameter('module_option', 1);
$autosearch = false; $autosearch = false;
@ -161,11 +165,22 @@ if (is_numeric($ag_group)) {
// Agent group selector // Agent group selector
if (!is_metaconsole()) { if (!is_metaconsole()) {
if ($ag_group > 0 && check_acl($config['id_user'], $ag_group, 'AR')) { if ($ag_group > 0 && check_acl($config['id_user'], $ag_group, 'AR')) {
$sql_conditions_group = sprintf( if ($recursion) {
' AND (tagente.id_grupo = %d OR tasg.id_group = %d)', $all_groups = groups_get_children_ids($ag_group, true);
$ag_group,
$ag_group // User has explicit permission on group 1 ?
); $sql_conditions_group = sprintf(
' AND (tagente.id_grupo IN (%s) OR tasg.id_group IN (%s)) ',
implode(',', $all_groups),
implode(',', $all_groups)
);
} else {
$sql_conditions_group = sprintf(
' AND (tagente.id_grupo = %d OR tasg.id_group = %d)',
$ag_group,
$ag_group
);
}
} else if ($user_groups != '') { } else if ($user_groups != '') {
// User has explicit permission on group 1 ? // User has explicit permission on group 1 ?
$sql_conditions_group = ' AND ( $sql_conditions_group = ' AND (
@ -175,11 +190,22 @@ if (!is_metaconsole()) {
} }
} else { } else {
if (((int) $ag_group !== 0) && (check_acl($config['id_user'], $id_ag_group, 'AR'))) { if (((int) $ag_group !== 0) && (check_acl($config['id_user'], $id_ag_group, 'AR'))) {
$sql_conditions_group = sprintf( if ($recursion) {
' AND (tagente.id_grupo IN (%s) OR tasg.id_group IN (%s))', $all_groups = groups_get_children_ids($ag_group, true);
$ag_group,
$ag_group // User has explicit permission on group 1 ?
); $sql_conditions_group = sprintf(
' AND (tagente.id_grupo IN (%s) OR tasg.id_group IN (%s)) ',
implode(',', $all_groups),
implode(',', $all_groups)
);
} else {
$sql_conditions_group = sprintf(
' AND (tagente.id_grupo IN (%s) OR tasg.id_group IN (%s))',
$ag_group,
$ag_group
);
}
} else if ($user_groups != '') { } else if ($user_groups != '') {
// User has explicit permission on group 1 ? // User has explicit permission on group 1 ?
$sql_conditions_group = ' AND ( $sql_conditions_group = ' AND (
@ -355,7 +381,8 @@ $table->style[3] = 'font-weight: bold;';
$table->style[4] = 'font-weight: bold;'; $table->style[4] = 'font-weight: bold;';
$table->data[0][0] = __('Group'); $table->data[0][0] = __('Group');
$table->data[0][1] = html_print_select_groups( $table->data[0][1] = '<div class="flex flex-row-vcenter w290px"><div class="w200px">';
$table->data[0][1] .= html_print_select_groups(
$config['id_user'], $config['id_user'],
'AR', 'AR',
true, true,
@ -375,6 +402,18 @@ $table->data[0][1] = html_print_select_groups(
'id_grupo', 'id_grupo',
false false
); );
$table->data[0][1] .= '</div><div>';
$table->data[0][1] .= html_print_input(
[
'type' => 'checkbox',
'name' => 'recursion',
'return' => true,
'checked' => $recursion,
'value' => 1,
]
);
$table->data[0][1] .= __('Recursion');
$table->data[0][1] .= '</div></div>';
$fields = []; $fields = [];
$fields[AGENT_MODULE_STATUS_NORMAL] = __('Normal'); $fields[AGENT_MODULE_STATUS_NORMAL] = __('Normal');
@ -701,8 +740,7 @@ foreach ($custom_fields as $custom_field) {
$table_custom_fields->data[] = $row; $table_custom_fields->data[] = $row;
} }
$filters = '<form method="post" action="index.php?sec=view&sec2=operation/agentes/status_monitor&refr='.$refr.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&module_option='.$module_option.'&ag_modulename='.$ag_modulename.'&moduletype='.$moduletype.'&datatype='.$datatype.'&status='.$status.'&sort_field='.$sortField.'&sort='.$sort.'&pure='.$config['pure'].$ag_custom_fields_params.'">';
$filters = '<form method="post" action="index.php?sec=view&amp;sec2=operation/agentes/status_monitor&amp;refr='.$refr.'&amp;ag_group='.$ag_group.'&amp;ag_freestring='.$ag_freestring.'&amp;module_option='.$module_option.'&amp;ag_modulename='.$ag_modulename.'&amp;moduletype='.$moduletype.'&amp;datatype='.$datatype.'&amp;status='.$status.'&amp;sort_field='.$sortField.'&amp;sort='.$sort.'&amp;pure='.$config['pure'].$ag_custom_fields_params.'">';
if (is_metaconsole()) { if (is_metaconsole()) {
$table->colspan[4][0] = 7; $table->colspan[4][0] = 7;
$table->cellstyle[4][0] = 'padding: 10px;'; $table->cellstyle[4][0] = 'padding: 10px;';
@ -970,7 +1008,7 @@ switch ($sortField) {
} }
$sql = 'SELECT $sql = 'SELECT
(SELECT GROUP_CONCAT(ttag.name SEPARATOR \',\') (SELECT GROUP_CONCAT(ttag.name SEPARATOR \',\')
FROM ttag FROM ttag
WHERE ttag.id_tag IN ( WHERE ttag.id_tag IN (
SELECT ttag_module.id_tag SELECT ttag_module.id_tag
@ -1014,6 +1052,7 @@ $sql = 'SELECT
ORDER BY '.$order['field'].' '.$order['order'].' ORDER BY '.$order['field'].' '.$order['order'].'
LIMIT '.$offset.','.$limit_sql; LIMIT '.$offset.','.$limit_sql;
// We do not show the modules until the user searches with the filter // We do not show the modules until the user searches with the filter
if ($autosearch) { if ($autosearch) {
if (! defined('METACONSOLE')) { if (! defined('METACONSOLE')) {
@ -1102,17 +1141,51 @@ if (($config['dbtype'] == 'oracle') && ($result !== false)) {
// Urls to sort the table. // Urls to sort the table.
$url_agent_name = 'index.php?sec=view&amp;sec2=operation/agentes/status_monitor&amp;refr='.$refr.'&amp;datatype='.$datatype.'&amp;moduletype='.$moduletype.'&amp;modulegroup='.$modulegroup.'&amp;offset='.$offset.'&amp;ag_group='.$ag_group.'&amp;ag_freestring='.$ag_freestring.'&amp;ag_modulename='.$ag_modulename.'&amp;status='.$status.$ag_custom_fields_params.'&amp;sort_field=agent_alias&amp;sort='; $url_agent_name = 'index.php?sec=view&sec2=operation/agentes/status_monitor';
$url_type = 'index.php?sec=view&amp;sec2=operation/agentes/status_monitor&amp;datatype='.$datatype.'&amp;moduletype='.$moduletype.'&amp;refr='.$refr.'&amp;modulegroup='.$modulegroup.'&amp;offset='.$offset.'&amp;ag_group='.$ag_group.'&amp;ag_freestring='.$ag_freestring.'&amp;ag_modulename='.$ag_modulename.'&amp;status='.$status.$ag_custom_fields_params.'&amp;sort_field=type&amp;sort='; $url_type = 'index.php?sec=view&sec2=operation/agentes/status_monitor';
$url_module_name = 'index.php?sec=view&amp;sec2=operation/agentes/status_monitor&amp;datatype='.$datatype.'&amp;moduletype='.$moduletype.'&amp;refr='.$refr.'&amp;modulegroup='.$modulegroup.'&amp;offset='.$offset.'&amp;ag_group='.$ag_group.'&amp;ag_freestring='.$ag_freestring.'&amp;ag_modulename='.$ag_modulename.'&amp;status='.$status.$ag_custom_fields_params.'&amp;sort_field=module_name&amp;sort='; $url_module_name = 'index.php?sec=view&sec2=operation/agentes/status_monitor';
$url_server_type = 'index.php?sec=view&amp;sec2=operation/agentes/status_monitor&amp;datatype='.$datatype.'&amp;moduletype='.$moduletype.'&amp;refr='.$refr.'&amp;modulegroup='.$modulegroup.'&amp;offset='.$offset.'&amp;ag_group='.$ag_group.'&amp;ag_freestring='.$ag_freestring.'&amp;ag_modulename='.$ag_modulename.'&amp;status='.$status.$ag_custom_fields_params.'&amp;sort_field=moduletype&amp;sort='; $url_server_type = 'index.php?sec=view&sec2=operation/agentes/status_monitor';
$url_interval = 'index.php?sec=view&amp;sec2=operation/agentes/status_monitor&amp;datatype='.$datatype.'&amp;moduletype='.$moduletype.'&amp;refr='.$refr.'&amp;modulegroup='.$modulegroup.'&amp;offset='.$offset.'&amp;ag_group='.$ag_group.'&amp;ag_freestring='.$ag_freestring.'&amp;ag_modulename='.$ag_modulename.'&amp;status='.$status.$ag_custom_fields_params.'&amp;sort_field=interval&amp;sort='; $url_interval = 'index.php?sec=view&sec2=operation/agentes/status_monitor';
$url_status = 'index.php?sec=view&amp;sec2=operation/agentes/status_monitor&amp;datatype='.$datatype.'&amp;moduletype='.$moduletype.'&amp;refr='.$refr.'&amp;modulegroup='.$modulegroup.'&amp;offset='.$offset.'&amp;ag_group='.$ag_group.'&amp;ag_freestring='.$ag_freestring.'&amp;ag_modulename='.$ag_modulename.'&amp;status='.$status.$ag_custom_fields_params.'&amp;sort_field=status&amp;sort='; $url_status = 'index.php?sec=view&sec2=operation/agentes/status_monitor';
$url_status = 'index.php?sec=view&amp;sec2=operation/agentes/status_monitor&amp;datatype='.$datatype.'&amp;moduletype='.$moduletype.'&amp;refr='.$refr.'&amp;modulegroup='.$modulegroup.'&amp;offset='.$offset.'&amp;ag_group='.$ag_group.'&amp;ag_freestring='.$ag_freestring.'&amp;ag_modulename='.$ag_modulename.'&amp;status='.$status.$ag_custom_fields_params.'&amp;sort_field=last_status_change&amp;sort='; $url_status = 'index.php?sec=view&sec2=operation/agentes/status_monitor';
$url_data = 'index.php?sec=view&amp;sec2=operation/agentes/status_monitor&amp;datatype='.$datatype.'&amp;moduletype='.$moduletype.'&amp;refr='.$refr.'&amp;modulegroup='.$modulegroup.'&amp;offset='.$offset.'&amp;ag_group='.$ag_group.'&amp;ag_freestring='.$ag_freestring.'&amp;ag_modulename='.$ag_modulename.'&amp;status='.$status.$ag_custom_fields_params.'&amp;sort_field=data&amp;sort='; $url_data = 'index.php?sec=view&sec2=operation/agentes/status_monitor';
$url_timestamp_up = 'index.php?sec=view&amp;sec2=operation/agentes/status_monitor&amp;datatype='.$datatype.'&amp;moduletype='.$moduletype.'&amp;refr='.$refr.'&amp;offset='.$offset.'&amp;ag_group='.$ag_group.'&amp;ag_freestring='.$ag_freestring.'&amp;ag_modulename='.$ag_modulename.'&amp;status='.$status.$ag_custom_fields_params.'&amp;sort_field=timestamp&amp;sort=up'; $url_timestamp_up = 'index.php?sec=view&sec2=operation/agentes/status_monitor';
$url_timestamp_down = 'index.php?sec=view&amp;sec2=operation/agentes/status_monitor&amp;datatype='.$datatype.'&amp;moduletype='.$moduletype.'&amp;refr='.$refr.'&amp;modulegroup='.$modulegroup.'&amp;offset='.$offset.'&amp;ag_group='.$ag_group.'&amp;ag_freestring='.$ag_freestring.'&amp;ag_modulename='.$ag_modulename.'&amp;status='.$status.$ag_custom_fields_params.'&amp;sort_field=timestamp&amp;sort=down'; $url_timestamp_down = 'index.php?sec=view&sec2=operation/agentes/status_monitor';
$url_agent_name .= '&refr='.$refr.'&datatype='.$datatype.'&moduletype='.$moduletype.'&modulegroup='.$modulegroup.'&offset='.$offset.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&ag_modulename='.$ag_modulename.'&status='.$status.$ag_custom_fields_params;
$url_type .= '&datatype='.$datatype.'&moduletype='.$moduletype.'&refr='.$refr.'&modulegroup='.$modulegroup.'&offset='.$offset.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&ag_modulename='.$ag_modulename.'&status='.$status.$ag_custom_fields_params;
$url_module_name .= '&datatype='.$datatype.'&moduletype='.$moduletype.'&refr='.$refr.'&modulegroup='.$modulegroup.'&offset='.$offset.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&ag_modulename='.$ag_modulename.'&status='.$status.$ag_custom_fields_params;
$url_server_type .= '&datatype='.$datatype.'&moduletype='.$moduletype.'&refr='.$refr.'&modulegroup='.$modulegroup.'&offset='.$offset.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&ag_modulename='.$ag_modulename.'&status='.$status.$ag_custom_fields_params;
$url_interval .= '&datatype='.$datatype.'&moduletype='.$moduletype.'&refr='.$refr.'&modulegroup='.$modulegroup.'&offset='.$offset.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&ag_modulename='.$ag_modulename.'&status='.$status.$ag_custom_fields_params;
$url_status .= '&datatype='.$datatype.'&moduletype='.$moduletype.'&refr='.$refr.'&modulegroup='.$modulegroup.'&offset='.$offset.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&ag_modulename='.$ag_modulename.'&status='.$status.$ag_custom_fields_params;
$url_status .= '&datatype='.$datatype.'&moduletype='.$moduletype.'&refr='.$refr.'&modulegroup='.$modulegroup.'&offset='.$offset.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&ag_modulename='.$ag_modulename.'&status='.$status.$ag_custom_fields_params;
$url_data .= '&datatype='.$datatype.'&moduletype='.$moduletype.'&refr='.$refr.'&modulegroup='.$modulegroup.'&offset='.$offset.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&ag_modulename='.$ag_modulename.'&status='.$status.$ag_custom_fields_params;
$url_timestamp_up .= '&datatype='.$datatype.'&moduletype='.$moduletype.'&refr='.$refr.'&offset='.$offset.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&ag_modulename='.$ag_modulename.'&status='.$status.$ag_custom_fields_params;
$url_timestamp_down .= '&datatype='.$datatype.'&moduletype='.$moduletype.'&refr='.$refr.'&modulegroup='.$modulegroup.'&offset='.$offset.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&ag_modulename='.$ag_modulename.'&status='.$status.$ag_custom_fields_params;
// Holy god...
$url_agent_name .= '&recursion='.$recursion;
$url_type .= '&recursion='.$recursion;
$url_module_name .= '&recursion='.$recursion;
$url_server_type .= '&recursion='.$recursion;
$url_interval .= '&recursion='.$recursion;
$url_status .= '&recursion='.$recursion;
$url_status .= '&recursion='.$recursion;
$url_data .= '&recursion='.$recursion;
$url_timestamp_up .= '&recursion='.$recursion;
$url_timestamp_down .= '&recursion='.$recursion;
$url_agent_name .= '&sort_field=agent_alias&sort=';
$url_type .= '&sort_field=type&sort=';
$url_module_name .= '&sort_field=module_name&sort=';
$url_server_type .= '&sort_field=moduletype&sort=';
$url_interval .= '&sort_field=interval&sort=';
$url_status .= '&sort_field=status&sort=';
$url_status .= '&sort_field=last_status_change&sort=';
$url_data .= '&sort_field=data&sort=';
$url_timestamp_up .= '&sort_field=timestamp&sort=up';
$url_timestamp_down .= '&sort_field=timestamp&sort=down';
// Start Build List Result // Start Build List Result
if (!empty($result)) { if (!empty($result)) {
@ -1276,9 +1349,9 @@ if (!empty($result)) {
} }
if (is_metaconsole()) { if (is_metaconsole()) {
$data[0] = '<a href="?sec=gmodules&amp;sec2=advanced/policymanager&amp;id='.$policyInfo['id_policy'].'">'.html_print_image($img, true, ['title' => $title]).'</a>'; $data[0] = '<a href="?sec=gmodules&sec2=advanced/policymanager&id='.$policyInfo['id_policy'].'">'.html_print_image($img, true, ['title' => $title]).'</a>';
} else { } else {
$data[0] = '<a href="?sec=gmodules&amp;sec2=enterprise/godmode/policies/policies&amp;id='.$policyInfo['id_policy'].'">'.html_print_image($img, true, ['title' => $title]).'</a>'; $data[0] = '<a href="?sec=gmodules&sec2=enterprise/godmode/policies/policies&id='.$policyInfo['id_policy'].'">'.html_print_image($img, true, ['title' => $title]).'</a>';
} }
} }
@ -1293,7 +1366,7 @@ if (!empty($result)) {
// TODO: Calculate hash access before to use it more simply like other sections. I.E. Events view // TODO: Calculate hash access before to use it more simply like other sections. I.E. Events view
if (defined('METACONSOLE')) { if (defined('METACONSOLE')) {
$agent_link = '<a href="'.$row['server_url'].'index.php?'.'sec=estado&amp;'.'sec2=operation/agentes/ver_agente&amp;'.'id_agente='.$row['id_agent'].'&amp;'.'loginhash=auto&amp;'.'loginhash_data='.$row['hashdata'].'&amp;'.'loginhash_user='.str_rot13($row['user']).'">'; $agent_link = '<a href="'.$row['server_url'].'index.php?'.'sec=estado&'.'sec2=operation/agentes/ver_agente&'.'id_agente='.$row['id_agent'].'&'.'loginhash=auto&'.'loginhash_data='.$row['hashdata'].'&'.'loginhash_user='.str_rot13($row['user']).'">';
$agent_alias = ui_print_truncate_text( $agent_alias = ui_print_truncate_text(
$agent_alias, $agent_alias,
'agent_small', 'agent_small',
@ -1309,7 +1382,7 @@ if (!empty($result)) {
$data[1] = $agent_alias; $data[1] = $agent_alias;
} }
} else { } else {
$data[1] = '<strong><a href="index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;id_agente='.$row['id_agent'].'">'; $data[1] = '<strong><a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$row['id_agent'].'">';
$data[1] .= ui_print_truncate_text($agent_alias, 'agent_medium', false, true, false, '[&hellip;]', 'font-size:7.5pt;'); $data[1] .= ui_print_truncate_text($agent_alias, 'agent_medium', false, true, false, '[&hellip;]', 'font-size:7.5pt;');
$data[1] .= '</a></strong>'; $data[1] .= '</a></strong>';
} }
@ -1325,9 +1398,9 @@ if (!empty($result)) {
$show_edit_icon = false; $show_edit_icon = false;
} }
$url_edit_module = $row['server_url'].'index.php?'.'sec=gagente&amp;'.'sec2=godmode/agentes/configurar_agente&amp;'.'id_agente='.$row['id_agent'].'&amp;'.'tab=module&amp;'.'id_agent_module='.$row['id_agente_modulo'].'&amp;'.'edit_module=1'.'&amp;loginhash=auto&amp;loginhash_data='.$row['hashdata'].'&amp;loginhash_user='.str_rot13($row['user']); $url_edit_module = $row['server_url'].'index.php?'.'sec=gagente&'.'sec2=godmode/agentes/configurar_agente&'.'id_agente='.$row['id_agent'].'&'.'tab=module&'.'id_agent_module='.$row['id_agente_modulo'].'&'.'edit_module=1'.'&loginhash=auto&loginhash_data='.$row['hashdata'].'&loginhash_user='.str_rot13($row['user']);
} else { } else {
$url_edit_module = 'index.php?'.'sec=gagente&amp;'.'sec2=godmode/agentes/configurar_agente&amp;'.'id_agente='.$row['id_agent'].'&amp;'.'tab=module&amp;'.'id_agent_module='.$row['id_agente_modulo'].'&amp;'.'edit_module=1'; $url_edit_module = 'index.php?'.'sec=gagente&'.'sec2=godmode/agentes/configurar_agente&'.'id_agente='.$row['id_agent'].'&'.'tab=module&'.'id_agent_module='.$row['id_agente_modulo'].'&'.'edit_module=1';
} }
if ($show_edit_icon) { if ($show_edit_icon) {
@ -1750,24 +1823,13 @@ if (!empty($result)) {
// End Build List Result. // End Build List Result.
echo "<div id='monitor_details_window'></div>"; echo "<div id='monitor_details_window'></div>";
// Strict user hidden.
echo '<div id="strict_hidden" style="display:none;">';
html_print_input_text('strict_user_hidden', $strict_user);
echo '</div>';
enterprise_hook('close_meta_frame'); enterprise_hook('close_meta_frame');
ui_require_javascript_file('pandora_modules'); ui_require_javascript_file('pandora_modules');
?> ?>
<script type='text/javascript'> <script type="text/javascript">
$(document).ready (function () {
if ($('#ag_group').val() != 0) {
$('#tag_filter').css('display', 'none');
$('#tag_td').css('display', 'none');
}
});
$('#moduletype').click(function() { $('#moduletype').click(function() {
jQuery.get ( jQuery.get (
@ -1789,17 +1851,6 @@ $('#moduletype').click(function() {
return false; return false;
}); });
$('#ag_group').change (function () {
strict_user = $('#text-strict_user_hidden').val();
if (($('#ag_group').val() != 0) && (strict_user != 0)) {
$('#tag_filter').css('display', 'none');
$('#tag_td').css('display', 'none');
} else {
$('#tag_filter').css('display', '');
$('#tag_td').css('display', '');
}
});
function toggle_full_value(id) { function toggle_full_value(id) {
text = $('#hidden_value_module_' + id).html(); text = $('#hidden_value_module_' + id).html();

View File

@ -311,7 +311,7 @@ if ($user_filter != 0 && empty($id_name) && !$update_from_filter_table) {
} }
// Build the condition of the events query. // Build the condition of the events query.
$sql_post = ''; $sql_post = ' WHERE 1=1 ';
$id_user = $config['id_user']; $id_user = $config['id_user'];
@ -1214,7 +1214,7 @@ if ($group_rep == 0) {
$sql = 'SELECT COUNT(DISTINCT id_evento) $sql = 'SELECT COUNT(DISTINCT id_evento)
FROM $event_table te FROM $event_table te
$event_lj $event_lj
WHERE 1=1 $sql_post'; $sql_post';
$total_events = (int) db_get_sql($sql); $total_events = (int) db_get_sql($sql);
} else if ($group_rep == 1) { } else if ($group_rep == 1) {
$total_events = events_get_events_grouped( $total_events = events_get_events_grouped(

View File

@ -77,7 +77,7 @@ $table->data[0][2] = __('Type');
$table->data[0][3] = html_print_checkbox('alert_fired', 'alert_fired', true, true, false, 'changeType();').__('Alert fired').'<br />'.html_print_checkbox('critical', 'critical', true, true, false, 'changeType();').__('Monitor critical').'<br />'.html_print_checkbox('unknown', 'unknown', true, true, false, 'changeType();').__('Monitor unknown').'<br />'.html_print_checkbox('warning', 'warning', true, true, false, 'changeType();').__('Monitor warning').'<br />'; $table->data[0][3] = html_print_checkbox('alert_fired', 'alert_fired', true, true, false, 'changeType();').__('Alert fired').'<br />'.html_print_checkbox('critical', 'critical', true, true, false, 'changeType();').__('Monitor critical').'<br />'.html_print_checkbox('unknown', 'unknown', true, true, false, 'changeType();').__('Monitor unknown').'<br />'.html_print_checkbox('warning', 'warning', true, true, false, 'changeType();').__('Monitor warning').'<br />';
$table->data[1][0] = __('Agent'); $table->data[1][0] = __('Agent');
$table->data[1][1] = html_print_select($agents, 'id_agents[]', true, false, '', '', true, true, '', '', '', 'width:120px; height:100px', '', false, '', '', true); $table->data[1][1] = html_print_select($agents, 'id_agents[]', true, false, '', '', true, true, '', '', '', 'max-width:200px; height:100px', '', false, '', '', true);
$table->data[1][2] = __('Event'); $table->data[1][2] = __('Event');
$table->data[1][3] = html_print_textarea('events_fired', 200, 20, '', 'readonly="readonly" style="max-height:100px; background: #ddd; resize:none;"', true); $table->data[1][3] = html_print_textarea('events_fired', 200, 20, '', 'readonly="readonly" style="max-height:100px; background: #ddd; resize:none;"', true);
@ -152,10 +152,26 @@ function changeGroup() {
} }
function changeType() { function changeType() {
alert_fired = $("input[name=alert_fired]").attr('checked'); alert_fired = false;
critical = $("input[name=critical]").attr('checked'); critical = false;
warning = $("input[name=warning]").attr('checked'); warning = false;
unknown = $("input[name=unknown]").attr('checked'); unknown = false;
if($("input[name=alert_fired]").is(':checked') ) {
alert_fired = true;
}
if($("input[name=critical]").is(':checked') ) {
critical = true;
}
if($("input[name=warning]").is(':checked') ) {
warning = true;
}
if($("input[name=unknown]").is(':checked') ) {
unknown = true;
}
} }
function toggleButton() { function toggleButton() {
@ -256,9 +272,6 @@ $(document).ready (function () {
setInterval("check_event()", (10 * 1000)); //10 seconds between ajax request setInterval("check_event()", (10 * 1000)); //10 seconds between ajax request
$("#table1").css("background-color", "#fff"); $("#table1").css("background-color", "#fff");
$("#table2").css("background-color", "#fff"); $("#table2").css("background-color", "#fff");
group_width = $("#group").width();
$("#id_agents").width(group_width + 9);
}); });
</script> </script>

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_console %define name pandorafms_console
%define version 7.0NG.750 %define version 7.0NG.750
%define release 201029 %define release 201030
# User and Group under which Apache is running # User and Group under which Apache is running
%define httpd_name httpd %define httpd_name httpd

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_console %define name pandorafms_console
%define version 7.0NG.750 %define version 7.0NG.750
%define release 201029 %define release 201030
# User and Group under which Apache is running # User and Group under which Apache is running
%define httpd_name httpd %define httpd_name httpd

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_console %define name pandorafms_console
%define version 7.0NG.750 %define version 7.0NG.750
%define release 201029 %define release 201030
%define httpd_name httpd %define httpd_name httpd
# User and Group under which Apache is running # User and Group under which Apache is running
%define httpd_name apache2 %define httpd_name apache2

View File

@ -113,7 +113,7 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
('identification_reminder', 1), ('identification_reminder', 1),
('identification_reminder_timestamp', 0), ('identification_reminder_timestamp', 0),
('current_package_enterprise', 750), ('current_package_enterprise', 750),
('post_process_custom_values', '{"0.00000038580247":"Seconds&#x20;to&#x20;months","0.00000165343915":"Seconds&#x20;to&#x20;weeks","0.00001157407407":"Seconds&#x20;to&#x20;days","0.01666666666667":"Seconds&#x20;to&#x20;minutes","0.00000000093132":"Bytes&#x20;to&#x20;Gigabytes","0.00000095367432":"Bytes&#x20;to&#x20;Megabytes","0.0009765625":"Bytes&#x20;to&#x20;Kilobytes","0.00000001653439":"Timeticks&#x20;to&#x20;weeks","0.00000011574074":"Timeticks&#x20;to&#x20;days"}'), ('post_process_custom_values', '{"0.00000038580247":"Seconds&#x20;to&#x20;months","0.00000165343915":"Seconds&#x20;to&#x20;weeks","0.00001157407407":"Seconds&#x20;to&#x20;days","0.01666666666667":"Seconds&#x20;to&#x20;minutes","0.00000000093132":"Bytes&#x20;to&#x20;Gigabytes","0.00000095367432":"Bytes&#x20;to&#x20;Megabytes","0.00097656250000":"Bytes&#x20;to&#x20;Kilobytes","0.00000001653439":"Timeticks&#x20;to&#x20;weeks","0.00000011574074":"Timeticks&#x20;to&#x20;days"}'),
('custom_docs_logo', 'default_docs.png'), ('custom_docs_logo', 'default_docs.png'),
('custom_support_logo', 'default_support.png'), ('custom_support_logo', 'default_support.png'),
('custom_logo_white_bg_preview', 'pandora_logo_head_white_bg.png'), ('custom_logo_white_bg_preview', 'pandora_logo_head_white_bg.png'),
@ -2747,4 +2747,4 @@ SELECT @plugin_id := `id` FROM `tplugin` WHERE `name` = @plugin_name;
INSERT IGNORE INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `unit`, `wizard_level`, `macros`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `critical_inverse`, `warning_inverse`, `id_category`, `tags`, `disabled_types_event`, `module_macros`, `min_ff_event_normal`, `min_ff_event_warning`, `min_ff_event_critical`, `ff_type`, `each_ff`, `dynamic_interval`, `dynamic_max`, `dynamic_min`, `dynamic_next`, `dynamic_two_tailed`, `module_type`, `protocol`, `manufacturer_id`, `execution_type`, `scan_type`, `value`, `value_operations`, `module_enabled`, `name_oid`, `query_class`, `query_key_field`, `scan_filters`, `query_filters`, `enabled`) VALUES (@component_id,@component_name,@component_description,@group_id,1,0,0,0,0,'','','','',0,9,0,'','','',0,0,0,80.00,90.00,'',90.00,0.00,'',0,'','','',0,0,0.000000000000000,'%','nowizard',CONCAT('{\"extra_field_1\":\"Size\",\"extra_field_2\":\"FreeSpace\",\"satellite_execution\":\"/etc/pandora/satellite_plugins/wizard_wmi_module&#x20;-host&#x20;&quot;_address_&quot;&#x20;-namespace&#x20;&quot;_namespace_wmi_&quot;&#x20;-user&#x20;&quot;_user_wmi_&quot;&#x20;-pass&#x20;&quot;_pass_wmi_&quot;&#x20;-wmiClass&#x20;&quot;_class_wmi_&quot;&#x20;-fieldsList&#x20;&quot;_field_wmi_1_,_field_wmi_2_&quot;&#x20;-queryFilter&#x20;&quot;DeviceID&#x20;=&#x20;&#039;_DeviceID_&#039;&quot;&#x20;-operation&#x20;&quot;&#40;&#40;_f1_&#x20;-&#x20;_f2_&#41;&#x20;*&#x20;100&#41;&#x20;/&#x20;_f1_&quot;&#x20;-wmicPath&#x20;/usr/bin/wmic\",\"value_operation\":\"&#40;&#40;_Size_&#x20;-&#x20;_FreeSpace_&#41;&#x20;*&#x20;100&#41;&#x20;/&#x20;_Size_\",\"server_plugin\":\"',@plugin_id,'\",\"_field2__wmi_field\":\"_namespace_wmi_\",\"_field1__wmi_field\":\"_address_\",\"_field4__wmi_field\":\"_pass_wmi_\",\"_field3__wmi_field\":\"_user_wmi_\",\"_field6__wmi_field\":\"_field_wmi_1_,_field_wmi_2_\",\"_field5__wmi_field\":\"_class_wmi_\",\"_field8__wmi_field\":\"&#40;&#40;_f1_&#x20;-&#x20;_f2_&#41;&#x20;*&#x20;100&#41;&#x20;/&#x20;_f1_\",\"_field7__wmi_field\":\"DeviceID&#x20;=&#x20;&#039;_DeviceID_&#039;\",\"field0_wmi_field\":\"\"}'),'','','',0,0,0,'','{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,1,'wmi','',2,2,'','',1,'','Win32_LogicalDisk','DeviceID','','{\"scan\":\"DriveType&#x20;=&#x20;3\",\"execution\":\"\",\"field\":\"\",\"key_string\":\"\"}',1); INSERT IGNORE INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `unit`, `wizard_level`, `macros`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `critical_inverse`, `warning_inverse`, `id_category`, `tags`, `disabled_types_event`, `module_macros`, `min_ff_event_normal`, `min_ff_event_warning`, `min_ff_event_critical`, `ff_type`, `each_ff`, `dynamic_interval`, `dynamic_max`, `dynamic_min`, `dynamic_next`, `dynamic_two_tailed`, `module_type`, `protocol`, `manufacturer_id`, `execution_type`, `scan_type`, `value`, `value_operations`, `module_enabled`, `name_oid`, `query_class`, `query_key_field`, `scan_filters`, `query_filters`, `enabled`) VALUES (@component_id,@component_name,@component_description,@group_id,1,0,0,0,0,'','','','',0,9,0,'','','',0,0,0,80.00,90.00,'',90.00,0.00,'',0,'','','',0,0,0.000000000000000,'%','nowizard',CONCAT('{\"extra_field_1\":\"Size\",\"extra_field_2\":\"FreeSpace\",\"satellite_execution\":\"/etc/pandora/satellite_plugins/wizard_wmi_module&#x20;-host&#x20;&quot;_address_&quot;&#x20;-namespace&#x20;&quot;_namespace_wmi_&quot;&#x20;-user&#x20;&quot;_user_wmi_&quot;&#x20;-pass&#x20;&quot;_pass_wmi_&quot;&#x20;-wmiClass&#x20;&quot;_class_wmi_&quot;&#x20;-fieldsList&#x20;&quot;_field_wmi_1_,_field_wmi_2_&quot;&#x20;-queryFilter&#x20;&quot;DeviceID&#x20;=&#x20;&#039;_DeviceID_&#039;&quot;&#x20;-operation&#x20;&quot;&#40;&#40;_f1_&#x20;-&#x20;_f2_&#41;&#x20;*&#x20;100&#41;&#x20;/&#x20;_f1_&quot;&#x20;-wmicPath&#x20;/usr/bin/wmic\",\"value_operation\":\"&#40;&#40;_Size_&#x20;-&#x20;_FreeSpace_&#41;&#x20;*&#x20;100&#41;&#x20;/&#x20;_Size_\",\"server_plugin\":\"',@plugin_id,'\",\"_field2__wmi_field\":\"_namespace_wmi_\",\"_field1__wmi_field\":\"_address_\",\"_field4__wmi_field\":\"_pass_wmi_\",\"_field3__wmi_field\":\"_user_wmi_\",\"_field6__wmi_field\":\"_field_wmi_1_,_field_wmi_2_\",\"_field5__wmi_field\":\"_class_wmi_\",\"_field8__wmi_field\":\"&#40;&#40;_f1_&#x20;-&#x20;_f2_&#41;&#x20;*&#x20;100&#41;&#x20;/&#x20;_f1_\",\"_field7__wmi_field\":\"DeviceID&#x20;=&#x20;&#039;_DeviceID_&#039;\",\"field0_wmi_field\":\"\"}'),'','','',0,0,0,'','{\"going_unknown\":0}','',0,0,0,0,0,0,0,0,0,0,1,'wmi','',2,2,'','',1,'','Win32_LogicalDisk','DeviceID','','{\"scan\":\"DriveType&#x20;=&#x20;3\",\"execution\":\"\",\"field\":\"\",\"key_string\":\"\"}',1);
INSERT IGNORE INTO `tpen` VALUES (171,'dlink','D-Link Systems, Inc.'),(14988,'mikrotik','MikroTik'),(6486,'alcatel','Alcatel-Lucent Enterprise'),(41112,'ubiquiti','Ubiquiti Networks, Inc.'),(207,'telesis','Allied Telesis, Inc.'),(10002,'frogfoot','Frogfoot Networks'),(2,'ibm','IBM'),(4,'unix','Unix'),(63,'apple','Apple Computer, Inc.'),(674,'dell','Dell Inc.'),(111,'oracle','Oracle'),(116,'hitachi','Hitachi, Ltd.'),(173,'netlink','Netlink'),(188,'ascom','Ascom'),(6574,'synology','Synology Inc.'),(3861,'fujitsu','Fujitsu Network Communications, Inc.'),(53526,'dell','Dell ATC'),(52627,'apple','Apple Inc'),(19464,'hitachi','Hitachi Communication Technologies, Ltd.'),(13062,'ascom','Ascom'); INSERT IGNORE INTO `tpen` VALUES (171,'dlink','D-Link Systems, Inc.'),(14988,'mikrotik','MikroTik'),(6486,'alcatel','Alcatel-Lucent Enterprise'),(41112,'ubiquiti','Ubiquiti Networks, Inc.'),(207,'telesis','Allied Telesis, Inc.'),(10002,'frogfoot','Frogfoot Networks'),(2,'ibm','IBM'),(4,'unix','Unix'),(63,'apple','Apple Computer, Inc.'),(674,'dell','Dell Inc.'),(111,'oracle','Oracle'),(116,'hitachi','Hitachi, Ltd.'),(173,'netlink','Netlink'),(188,'ascom','Ascom'),(6574,'synology','Synology Inc.'),(3861,'fujitsu','Fujitsu Network Communications, Inc.'),(53526,'dell','Dell ATC'),(52627,'apple','Apple Inc'),(19464,'hitachi','Hitachi Communication Technologies, Ltd.'),(13062,'ascom','Ascom');

View File

@ -1,5 +1,5 @@
package: pandorafms-server package: pandorafms-server
Version: 7.0NG.750-201029 Version: 7.0NG.750-201030
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
pandora_version="7.0NG.750-201029" pandora_version="7.0NG.750-201030"
package_cpan=0 package_cpan=0
package_pandora=1 package_pandora=1

View File

@ -45,7 +45,7 @@ our @EXPORT = qw(
# version: Defines actual version of Pandora Server for this module only # version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.750"; my $pandora_version = "7.0NG.750";
my $pandora_build = "201029"; my $pandora_build = "201030";
our $VERSION = $pandora_version." ".$pandora_build; our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash # Setup hash

View File

@ -34,7 +34,7 @@ our @ISA = qw(Exporter);
# version: Defines actual version of Pandora Server for this module only # version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.750"; my $pandora_version = "7.0NG.750";
my $pandora_build = "201029"; my $pandora_build = "201030";
our $VERSION = $pandora_version." ".$pandora_build; our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] ); our %EXPORT_TAGS = ( 'all' => [ qw() ] );

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_server %define name pandorafms_server
%define version 7.0NG.750 %define version 7.0NG.750
%define release 201029 %define release 201030
Summary: Pandora FMS Server Summary: Pandora FMS Server
Name: %{name} Name: %{name}

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_server %define name pandorafms_server
%define version 7.0NG.750 %define version 7.0NG.750
%define release 201029 %define release 201030
Summary: Pandora FMS Server Summary: Pandora FMS Server
Name: %{name} Name: %{name}

View File

@ -9,7 +9,7 @@
# ********************************************************************** # **********************************************************************
PI_VERSION="7.0NG.750" PI_VERSION="7.0NG.750"
PI_BUILD="201029" PI_BUILD="201030"
MODE=$1 MODE=$1
if [ $# -gt 1 ]; then if [ $# -gt 1 ]; then

View File

@ -35,7 +35,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB; use PandoraFMS::DB;
# version: define current version # version: define current version
my $version = "7.0NG.750 PS201029"; my $version = "7.0NG.750 PS201030";
# Pandora server configuration # Pandora server configuration
my %conf; my %conf;

View File

@ -36,7 +36,7 @@ use Encode::Locale;
Encode::Locale::decode_argv; Encode::Locale::decode_argv;
# version: define current version # version: define current version
my $version = "7.0NG.750 PS201029"; my $version = "7.0NG.750 PS201030";
# save program name for logging # save program name for logging
my $progname = basename($0); my $progname = basename($0);