Merge remote-tracking branch 'origin/develop' into ent-4697-cicd-pandorafms
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-agent-unix
|
||||
Version: 7.0NG.742-200102
|
||||
Version: 7.0NG.742-200108
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.742-200102"
|
||||
pandora_version="7.0NG.742-200108"
|
||||
|
||||
echo "Test if you has the tools for to make the packages."
|
||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||
|
|
|
@ -55,7 +55,7 @@ my $Sem = undef;
|
|||
my $ThreadSem = undef;
|
||||
|
||||
use constant AGENT_VERSION => '7.0NG.742';
|
||||
use constant AGENT_BUILD => '200102';
|
||||
use constant AGENT_BUILD => '200108';
|
||||
|
||||
# Agent log default file size maximum and instances
|
||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||
|
@ -2882,7 +2882,7 @@ sub cron_valid_date {
|
|||
my $utime;
|
||||
eval {
|
||||
local $SIG{__DIE__} = sub {};
|
||||
$utime = timelocal(0, $min, $hour, $mday, $month, $year);
|
||||
$utime = strftime("%s", 0, $min, $hour, $mday, $month, $year);
|
||||
};
|
||||
if ($@) {
|
||||
return 0;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 7.0NG.742
|
||||
%define release 200102
|
||||
%define release 200108
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 7.0NG.742
|
||||
%define release 200102
|
||||
%define release 200108
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.742"
|
||||
PI_BUILD="200102"
|
||||
PI_BUILD="200108"
|
||||
OS_NAME=`uname -s`
|
||||
|
||||
FORCE=0
|
||||
|
|
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||
{}
|
||||
|
||||
Version
|
||||
{200102}
|
||||
{200108}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
|
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||
using namespace Pandora_Strutils;
|
||||
|
||||
#define PATH_SIZE _MAX_PATH+1
|
||||
#define PANDORA_VERSION ("7.0NG.742(Build 200102)")
|
||||
#define PANDORA_VERSION ("7.0NG.742(Build 200108)")
|
||||
|
||||
string pandora_path;
|
||||
string pandora_dir;
|
||||
|
|
|
@ -11,7 +11,7 @@ BEGIN
|
|||
VALUE "LegalCopyright", "Artica ST"
|
||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||
VALUE "ProductVersion", "(7.0NG.742(Build 200102))"
|
||||
VALUE "ProductVersion", "(7.0NG.742(Build 200108))"
|
||||
VALUE "FileVersion", "1.0.0.0"
|
||||
END
|
||||
END
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-console
|
||||
Version: 7.0NG.742-200102
|
||||
Version: 7.0NG.742-200108
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.742-200102"
|
||||
pandora_version="7.0NG.742-200108"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -40,7 +40,7 @@ if (!empty($news)) {
|
|||
// Prints news dialog template
|
||||
echo '<div id="news_dialog" title="" style="display: none;">';
|
||||
|
||||
echo '<div style="position:absolute; top:30px; left: 10px; text-align: left; right:0%; height:70px; min-width:560px; width: 95%; margin: 0 auto; border: 1px solid #FFF; line-height: 19px;">';
|
||||
echo '<div style="position:absolute; top:30px; left: 10px; text-align: left; right:0%; height:70px; min-width:560px; width: 95%; margin: 0 auto; line-height: 19px;">';
|
||||
echo '<span style="display: block; height: 260px; overflow: auto; text-align: justify; padding: 5px 15px 4px 10px; background: #ECECEC; border-radius: 4px;" id="new_text"></span>';
|
||||
echo '<span style="font-size: 12px; display: block; margin-top: 20px;" id="new_author"></span>';
|
||||
echo '<span style="font-size: 12px; display: block; font-style: italic;" id="new_timestamp"></span>';
|
||||
|
|
|
@ -612,17 +612,19 @@ if (enterprise_installed()) {
|
|||
$cascade_protection,
|
||||
true
|
||||
).__('Cascade protection').' ';
|
||||
|
||||
$table_adv_parent .= __('Module').' '.html_print_select(
|
||||
$modules_values,
|
||||
'cascade_protection_module',
|
||||
$cascade_protection_module,
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
$table_adv_parent .= __('Module').' '.html_print_select(
|
||||
$modules_values,
|
||||
'cascade_protection_module',
|
||||
$cascade_protection_module,
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
true
|
||||
).'</div></div>';
|
||||
$table_adv_parent .= '</div></div>';
|
||||
|
||||
// Learn mode / Normal mode.
|
||||
$table_adv_module_mode = '<div class="label_select"><p class="input_label">'.__('Module definition').': </p>';
|
||||
|
@ -667,7 +669,7 @@ $table_adv_status .= html_print_checkbox_switch(
|
|||
$disabled,
|
||||
true
|
||||
);
|
||||
$table_adv_status .= '<p class="input_label input_label_simple">'.__('Disabled').': '.ui_print_help_tip(__('If the remote configuration is enabled, it will also go into standby mode when disabling it.'), true).'</p>';
|
||||
$table_adv_status .= '<p class="input_label input_label_simple">'.__('Disabled mode').': '.ui_print_help_tip(__('If the remote configuration is enabled, it will also go into standby mode when disabling it.'), true).'</p>';
|
||||
$table_adv_status .= '</div>';
|
||||
|
||||
// Url address.
|
||||
|
|
|
@ -59,52 +59,36 @@ switch ($action) {
|
|||
$resultOperationDB = false;
|
||||
} else if (!empty($ids_serialize)) {
|
||||
$ids = explode('|', $ids_serialize);
|
||||
|
||||
switch ($config['dbtype']) {
|
||||
case 'mysql':
|
||||
$items = db_get_all_rows_sql(
|
||||
'
|
||||
SELECT id_gs, `field_order`
|
||||
FROM tgraph_source
|
||||
WHERE id_graph = '.$id_graph.'
|
||||
ORDER BY `field_order`'
|
||||
);
|
||||
break;
|
||||
}
|
||||
$items = db_get_all_rows_sql(
|
||||
'SELECT id_gs, `field_order`
|
||||
FROM tgraph_source
|
||||
WHERE id_graph = '.$id_graph.'
|
||||
ORDER BY `field_order`'
|
||||
);
|
||||
|
||||
if ($items === false) {
|
||||
$items = [];
|
||||
}
|
||||
|
||||
|
||||
// Clean the repeated order values
|
||||
// Clean the repeated order values.
|
||||
$order_temp = 1;
|
||||
foreach ($items as $item) {
|
||||
switch ($config['dbtype']) {
|
||||
case 'mysql':
|
||||
db_process_sql_update(
|
||||
'tgraph_source',
|
||||
['`field_order`' => $order_temp],
|
||||
['id_gs' => $item['id_rc']]
|
||||
);
|
||||
break;
|
||||
}
|
||||
db_process_sql_update(
|
||||
'tgraph_source',
|
||||
['`field_order`' => $order_temp],
|
||||
['id_gs' => $item['id_rc']]
|
||||
);
|
||||
|
||||
$order_temp++;
|
||||
}
|
||||
|
||||
|
||||
switch ($config['dbtype']) {
|
||||
case 'mysql':
|
||||
$items = db_get_all_rows_sql(
|
||||
'
|
||||
SELECT id_gs, `field_order`
|
||||
FROM tgraph_source
|
||||
WHERE id_graph = '.$id_graph.'
|
||||
ORDER BY `field_order`'
|
||||
);
|
||||
break;
|
||||
}
|
||||
$items = db_get_all_rows_sql(
|
||||
'SELECT id_gs, `field_order`
|
||||
FROM tgraph_source
|
||||
WHERE id_graph = '.$id_graph.'
|
||||
ORDER BY `field_order`'
|
||||
);
|
||||
|
||||
if ($items === false) {
|
||||
$items = [];
|
||||
|
@ -116,7 +100,7 @@ switch ($action) {
|
|||
|
||||
$temp = [];
|
||||
foreach ($items as $item) {
|
||||
// Remove the contents from the block to sort
|
||||
// Remove the contents from the block to sort.
|
||||
if (array_search($item['id_gs'], $ids) === false) {
|
||||
$temp[$item['field_order']] = $item['id_gs'];
|
||||
}
|
||||
|
@ -150,16 +134,11 @@ switch ($action) {
|
|||
|
||||
|
||||
foreach ($items as $order => $id) {
|
||||
switch ($config['dbtype']) {
|
||||
case 'mysql':
|
||||
|
||||
db_process_sql_update(
|
||||
'tgraph_source',
|
||||
['`field_order`' => ($order + 1)],
|
||||
['id_gs' => $id]
|
||||
);
|
||||
break;
|
||||
}
|
||||
db_process_sql_update(
|
||||
'tgraph_source',
|
||||
['`field_order`' => ($order + 1)],
|
||||
['id_gs' => $id]
|
||||
);
|
||||
}
|
||||
|
||||
$resultOperationDB = true;
|
||||
|
@ -211,7 +190,7 @@ if ($editGraph) {
|
|||
$weights = implode(',', $weight_array);
|
||||
}
|
||||
|
||||
// Modules table
|
||||
// Modules table.
|
||||
if (count($module_array) > 0) {
|
||||
echo "<table width='100%' cellpadding=4 cellpadding=4 class='databox filters'>";
|
||||
echo '<tr>
|
||||
|
@ -224,7 +203,7 @@ if (count($module_array) > 0) {
|
|||
<th>'.__('Sort').'</th>';
|
||||
$color = 0;
|
||||
for ($a = 0; $a < count($module_array); $a++) {
|
||||
// Calculate table line color
|
||||
// Calculate table line color.
|
||||
if ($color == 1) {
|
||||
$tdcolor = 'datos';
|
||||
$color = 0;
|
||||
|
@ -332,7 +311,7 @@ echo '</form>';
|
|||
echo '<br>';
|
||||
|
||||
|
||||
// Configuration form
|
||||
// Configuration form.
|
||||
echo '<span id ="none_text" style="display: none;">'.__('None').'</span>';
|
||||
echo "<form method='post' action='index.php?sec=reporting&sec2=godmode/reporting/graph_builder&tab=graph_editor&add_module=1&edit_graph=1&id=".$id_graph."'>";
|
||||
|
||||
|
@ -352,7 +331,7 @@ echo "<td colspan='3'>".html_print_select_groups(
|
|||
true
|
||||
).'</td>';
|
||||
echo '</tr><tr>';
|
||||
echo "<td style='vertical-align: top;'>".__('Agents').'</td>';
|
||||
echo "<td style='vertical-align: top;'>".__('Agents').ui_print_help_tip(__('If you select several agents, only the common modules will be displayed'), true).'</td>';
|
||||
echo '<td></td>';
|
||||
echo "<td style='vertical-align: top;'>".__('Modules').'</td>';
|
||||
echo '</tr><tr>';
|
||||
|
|
|
@ -15,7 +15,7 @@ global $config;
|
|||
|
||||
check_login();
|
||||
|
||||
// Visual console required
|
||||
// Visual console required.
|
||||
if (empty($visualConsole)) {
|
||||
db_pandora_audit(
|
||||
'ACL Violation',
|
||||
|
@ -425,7 +425,7 @@ $table->data['all_one_item_per_agent'][1] .= html_print_input_hidden(
|
|||
|
||||
|
||||
$table->rowstyle['all_4'] = 'display: none;';
|
||||
$table->data['all_4'][0] = __('Agents');
|
||||
$table->data['all_4'][0] = __('Agents').ui_print_help_tip(__('If you select several agents, only the common modules will be displayed'), true);
|
||||
|
||||
$agents_list = [];
|
||||
if (!is_metaconsole()) {
|
||||
|
@ -506,7 +506,7 @@ $table->data['all_8'][1] = html_print_select(
|
|||
VISUAL_MAP_WIZARD_PARENTS_NONE,
|
||||
true
|
||||
);
|
||||
$table->data['all_8'][2] = '<span id="parent_column_2_item_in_visual_map">'.__('Item in the map').'</span>'.'<span id="parent_column_2_relationship">'.ui_print_help_tip(
|
||||
$table->data['all_8'][2] = '<span id="parent_column_2_item_in_visual_map">'.__('Item in the map').'</span><span id="parent_column_2_relationship">'.ui_print_help_tip(
|
||||
__('The parenting relationships in %s will be drawn on the map.', get_product_name()),
|
||||
true
|
||||
).'</span>';
|
||||
|
|
|
@ -1038,8 +1038,13 @@ $row++;
|
|||
|
||||
$row++;
|
||||
|
||||
$table_report->data[$row][0] = __('PDF font size');
|
||||
$table_report->data[$row][1] = "<input type ='number' value=".$config['font_size_item_report']." size='1' name='font_size_item_report' min='1' max='9' step='0.1'>";
|
||||
$table_report->data[$row][0] = __('PDF font size (px)');
|
||||
$table_report->data[$row][1] = "<input type ='number' value=".$config['global_font_size_report']." name='global_font_size_report' min='1' max='50' step='1'>";
|
||||
|
||||
$row++;
|
||||
|
||||
$table_report->data[$row][0] = __('HTML font size for SLA (em)');
|
||||
$table_report->data[$row][1] = "<input type ='number' value=".$config['font_size_item_report']." name='font_size_item_report' min='1' max='9' step='0.1'>";
|
||||
|
||||
$row++;
|
||||
|
||||
|
@ -1049,6 +1054,7 @@ $row++;
|
|||
true
|
||||
);
|
||||
$table_report->data[$row][1] = html_print_input_text('graph_image_height', $config['graph_image_height'], '', 20, 20, true);
|
||||
|
||||
$row++;
|
||||
|
||||
$interval_description = [
|
||||
|
|
|
@ -101,7 +101,7 @@
|
|||
width: 15px;
|
||||
}
|
||||
.fileupload_form ul li div {
|
||||
display: block;
|
||||
display: block !important;
|
||||
}
|
||||
.fileupload_form ul li.working span {
|
||||
background-position: 0 -12px;
|
||||
|
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 1.8 KiB |
|
@ -266,9 +266,10 @@ if ($install_package) {
|
|||
[$version]
|
||||
);
|
||||
|
||||
$product_name = io_safe_output(get_product_name());
|
||||
db_pandora_audit(
|
||||
'Update '.get_product_name(),
|
||||
"Update version: $version of ".get_product_name().' by '.$config['id_user']
|
||||
'Update '.$product_name,
|
||||
"Update version: $version of ".$product_name.' by '.$config['id_user']
|
||||
);
|
||||
|
||||
$return['status'] = 'success';
|
||||
|
|
|
@ -1283,7 +1283,7 @@ switch ($action) {
|
|||
[
|
||||
'disabled' => 0,
|
||||
'id_agente' => $elementFields['id_agent'],
|
||||
'tagente_modulo.id_tipo_modulo IN' => '(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,18,17,23,3,10,33)',
|
||||
'tagente_modulo.id_tipo_modulo IN' => '(17,23,3,10,33)',
|
||||
]
|
||||
);
|
||||
|
||||
|
|
|
@ -396,7 +396,11 @@ class WelcomeWindow extends Wizard
|
|||
$logo_url = ENTERPRISE_DIR.'/';
|
||||
}
|
||||
|
||||
$logo_url .= 'images/custom_logo/'.$config['custom_logo_white_bg'];
|
||||
if (empty($config['custom_logo_white_bg']) === false) {
|
||||
$logo_url .= 'images/custom_logo/'.$config['custom_logo_white_bg'];
|
||||
} else {
|
||||
$logo_url .= 'images/custom_logo/pandora_logo_head_white_bg.png';
|
||||
}
|
||||
|
||||
$inputs = [
|
||||
[
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
/**
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC200102';
|
||||
$build_version = 'PC200108';
|
||||
$pandora_version = 'v7.0NG.742';
|
||||
|
||||
// Do not overwrite default timezone set if defined.
|
||||
|
|
|
@ -1286,7 +1286,11 @@ function config_update_config()
|
|||
|
||||
// Juanma (06/05/2014) New feature: Custom front page for reports.
|
||||
if (!config_update_value('font_size_item_report', get_parameter('font_size_item_report', 2))) {
|
||||
$error_update[] = __('Font size for items reports');
|
||||
$error_update[] = __('HTML font size for SLA (em)');
|
||||
}
|
||||
|
||||
if (!config_update_value('global_font_size_report', get_parameter('global_font_size_report', 14))) {
|
||||
$error_update[] = __('PDF font size (px)');
|
||||
}
|
||||
|
||||
if (!config_update_value('interval_description', (string) get_parameter('interval_description', 'large'))) {
|
||||
|
@ -1407,19 +1411,35 @@ function config_update_config()
|
|||
$error_update[] = __('Database password');
|
||||
}
|
||||
|
||||
if (!config_update_value('history_db_days', get_parameter('history_db_days'))) {
|
||||
$history_db_days = get_parameter('history_db_days');
|
||||
if (!is_numeric($history_db_days)
|
||||
|| $history_db_days <= 0
|
||||
|| !config_update_value('history_db_days', $history_db_days)
|
||||
) {
|
||||
$error_update[] = __('Days');
|
||||
}
|
||||
|
||||
if (!config_update_value('history_event_days', get_parameter('history_event_days'))) {
|
||||
$history_event_days = get_parameter('history_event_days');
|
||||
if (!is_numeric($history_event_days)
|
||||
|| $history_event_days <= 0
|
||||
|| !config_update_value('history_event_days', $history_event_days)
|
||||
) {
|
||||
$error_update[] = __('Event Days');
|
||||
}
|
||||
|
||||
if (!config_update_value('history_db_step', get_parameter('history_db_step'))) {
|
||||
$history_db_step = get_parameter('history_db_step');
|
||||
if (!is_numeric($history_db_step)
|
||||
|| $history_db_step <= 0
|
||||
|| !config_update_value('history_db_step', $history_db_step)
|
||||
) {
|
||||
$error_update[] = __('Step');
|
||||
}
|
||||
|
||||
if (!config_update_value('history_db_delay', get_parameter('history_db_delay'))) {
|
||||
$history_db_delay = get_parameter('history_db_delay');
|
||||
if (!is_numeric($history_db_delay)
|
||||
|| $history_db_delay <= 0
|
||||
|| !config_update_value('history_db_delay', $history_db_delay)
|
||||
) {
|
||||
$error_update[] = __('Delay');
|
||||
}
|
||||
break;
|
||||
|
@ -2817,6 +2837,10 @@ function config_process_config()
|
|||
config_update_value('font_size_item_report', 2);
|
||||
}
|
||||
|
||||
if (!isset($config['global_font_size_report'])) {
|
||||
config_update_value('global_font_size_report', 14);
|
||||
}
|
||||
|
||||
if (!isset($config['interval_description'])) {
|
||||
config_update_value('interval_description', 'large');
|
||||
}
|
||||
|
|
|
@ -1183,7 +1183,7 @@ function html_print_extended_select_for_cron($hour='*', $minute='*', $mday='*',
|
|||
}
|
||||
|
||||
// Month days
|
||||
for ($i = 0; $i < 31; $i++) {
|
||||
for ($i = 1; $i <= 31; $i++) {
|
||||
$mdays[$i] = $i;
|
||||
}
|
||||
|
||||
|
@ -3071,9 +3071,12 @@ function html_print_autocomplete_modules(
|
|||
['style' => 'background: url(images/search_module.png) no-repeat right;']
|
||||
);
|
||||
html_print_input_hidden($name.'_hidden', $id_agent_module);
|
||||
ui_print_help_tip(__('Type at least two characters to search the module.'), false);
|
||||
|
||||
$javascript_ajax_page = ui_get_full_url('ajax.php', false, false, false, false);
|
||||
if (!is_metaconsole()) {
|
||||
ui_print_help_tip(__('Type at least two characters to search the module.'), false);
|
||||
}
|
||||
|
||||
$javascript_ajax_page = ui_get_full_url('ajax.php', false, false, false);
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
function escapeHTML (str)
|
||||
|
|
|
@ -314,7 +314,7 @@ function profile_print_profile_table($id)
|
|||
$tags = tags_get_all_tags();
|
||||
$data['tags'] = html_print_select($tags, 'assign_tags[]', '', '', __('Any'), '', true, true);
|
||||
|
||||
$data['hierarchy'] = html_print_checkbox('no_hierarchy', 1, false, true).ui_print_help_icon('no_hierarchy', true);
|
||||
$data['hierarchy'] = html_print_checkbox('no_hierarchy', 1, false, true);
|
||||
|
||||
$data['actions'] = html_print_input_image('add', 'images/add.png', 1, '', true);
|
||||
$data['actions'] .= html_print_input_hidden('id', $id, true);
|
||||
|
|
|
@ -760,7 +760,7 @@ function reporting_make_reporting_data(
|
|||
continue;
|
||||
}
|
||||
|
||||
$report['contents'][] = $report_control;
|
||||
$report['contents'][] = $report_control;
|
||||
break;
|
||||
|
||||
case 'top_n':
|
||||
|
@ -1775,6 +1775,27 @@ function reporting_event_report_group(
|
|||
$event_graph_by_criticity = $event_filter['event_graph_by_criticity'];
|
||||
$event_graph_validated_vs_unvalidated = $event_filter['event_graph_validated_vs_unvalidated'];
|
||||
|
||||
if (isset($content['recursion']) && $content['recursion'] == 1 && $content['id_group'] != 0) {
|
||||
$propagate = db_get_value(
|
||||
'propagate',
|
||||
'tgrupo',
|
||||
'id_grupo',
|
||||
$content['id_group']
|
||||
);
|
||||
|
||||
if ($propagate) {
|
||||
$children = groups_get_children($content['id_group']);
|
||||
$_groups = [ $content['id_group'] ];
|
||||
if (!empty($children)) {
|
||||
foreach ($children as $child) {
|
||||
$_groups[] = (int) $child['id_grupo'];
|
||||
}
|
||||
}
|
||||
|
||||
$content['id_group'] = $_groups;
|
||||
}
|
||||
}
|
||||
|
||||
$data = events_get_agent(
|
||||
false,
|
||||
$content['period'],
|
||||
|
|
|
@ -447,9 +447,9 @@ function reporting_html_SLA($table, $item, $mini, $pdf=0)
|
|||
$interval_description = $config['interval_description'];
|
||||
|
||||
if ($mini) {
|
||||
$font_size = '1.5';
|
||||
$font_size = '1.5em';
|
||||
} else {
|
||||
$font_size = $config['font_size_item_report'];
|
||||
$font_size = $config['font_size_item_report'].'em';
|
||||
}
|
||||
|
||||
$metaconsole_on = is_metaconsole();
|
||||
|
@ -588,18 +588,18 @@ function reporting_html_SLA($table, $item, $mini, $pdf=0)
|
|||
$row[] = round($sla['sla_limit'], 2).'%';
|
||||
|
||||
if (reporting_sla_is_not_init_from_array($sla)) {
|
||||
$row[] = '<span style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_NOTINIT.';">'.__('N/A').'</span>';
|
||||
$row[] = '<span style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_NOTINIT.';">'.__('Not init').'</span>';
|
||||
$row[] = '<span style="font-weight: bold; font-size: '.$font_size.' !important; color: '.COL_NOTINIT.';">'.__('N/A').'</span>';
|
||||
$row[] = '<span style="font-weight: bold; font-size: '.$font_size.' !important; color: '.COL_NOTINIT.';">'.__('Not init').'</span>';
|
||||
} else if (reporting_sla_is_ignored_from_array($sla)) {
|
||||
$row[] = '<span style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_IGNORED.';">'.__('N/A').'</span>';
|
||||
$row[] = '<span style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_IGNORED.';">'.__('No data').'</span>';
|
||||
$row[] = '<span style="font-weight: bold; font-size: '.$font_size.' !important; color: '.COL_IGNORED.';">'.__('N/A').'</span>';
|
||||
$row[] = '<span style="font-weight: bold; font-size: '.$font_size.' !important; color: '.COL_IGNORED.';">'.__('No data').'</span>';
|
||||
// Normal calculation.
|
||||
} else if ($sla['sla_status']) {
|
||||
$row[] = '<span style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_NORMAL.';">'.sla_truncate($sla['sla_value'], $config['graph_precision']).'%</span>';
|
||||
$row[] = '<span style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_NORMAL.';">'.__('OK').'</span>';
|
||||
$row[] = '<span style="font-weight: bold; font-size: '.$font_size.' !important; color: '.COL_NORMAL.';">'.sla_truncate($sla['sla_value'], $config['graph_precision']).'%</span>';
|
||||
$row[] = '<span style="font-weight: bold; font-size: '.$font_size.' !important; color: '.COL_NORMAL.';">'.__('OK').'</span>';
|
||||
} else {
|
||||
$row[] = '<span style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_CRITICAL.';">'.sla_truncate($sla['sla_value'], $config['graph_precision']).'%</span>';
|
||||
$row[] = '<span style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_CRITICAL.';">'.__('Fail').'</span>';
|
||||
$row[] = '<span style="font-weight: bold; font-size: '.$font_size.' !important; color: '.COL_CRITICAL.';">'.sla_truncate($sla['sla_value'], $config['graph_precision']).'%</span>';
|
||||
$row[] = '<span style="font-weight: bold; font-size: '.$font_size.' !important; color: '.COL_CRITICAL.';">'.__('Fail').'</span>';
|
||||
}
|
||||
|
||||
// Second table for time globals.
|
||||
|
@ -2310,7 +2310,6 @@ function reporting_html_network_interfaces_report($table, $item, $pdf=0)
|
|||
$table_agent->head = [];
|
||||
$table_agent->head[0] = __('Agent').' '.$agent['agent'];
|
||||
$table_agent->headstyle = [];
|
||||
$table_agent->headstyle[0] = 'font-size: 16px;';
|
||||
$table_agent->style[0] = 'text-align: center';
|
||||
|
||||
$table_agent->data['interfaces'] = '';
|
||||
|
@ -2399,7 +2398,6 @@ function reporting_html_alert_report($table, $item, $pdf=0)
|
|||
'',
|
||||
true
|
||||
);
|
||||
return true;
|
||||
}
|
||||
|
||||
$table1->head['agent'] = __('Agent');
|
||||
|
@ -2503,9 +2501,9 @@ function reporting_html_monitor_report($table, $item, $mini, $pdf=0)
|
|||
global $config;
|
||||
|
||||
if ($mini) {
|
||||
$font_size = '1.5';
|
||||
$font_size = '1.5em';
|
||||
} else {
|
||||
$font_size = $config['font_size_item_report'];
|
||||
$font_size = $config['font_size_item_report'].'em';
|
||||
}
|
||||
|
||||
$table->colspan['module']['cell'] = 3;
|
||||
|
@ -2516,10 +2514,10 @@ function reporting_html_monitor_report($table, $item, $mini, $pdf=0)
|
|||
$table1->head = [];
|
||||
$table1->data = [];
|
||||
if ($item['data']['unknown'] == 1) {
|
||||
$table1->data['data']['unknown'] = '<p style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_UNKNOWN.';">';
|
||||
$table1->data['data']['unknown'] = '<p style="font-weight: bold; font-size: '.$font_size.' !important; color: '.COL_UNKNOWN.';">';
|
||||
$table1->data['data']['unknown'] .= __('Unknown').'</p>';
|
||||
} else {
|
||||
$table1->data['data']['ok'] = '<p style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_NORMAL.';">';
|
||||
$table1->data['data']['ok'] = '<p style="font-weight: bold; font-size: '.$font_size.' !important; color: '.COL_NORMAL.';">';
|
||||
$table1->data['data']['ok'] .= html_print_image(
|
||||
'images/module_ok.png',
|
||||
true
|
||||
|
@ -2530,7 +2528,7 @@ function reporting_html_monitor_report($table, $item, $mini, $pdf=0)
|
|||
)
|
||||
).' %</p>';
|
||||
|
||||
$table1->data['data']['fail'] = '<p style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_CRITICAL.';">';
|
||||
$table1->data['data']['fail'] = '<p style="font-weight: bold; font-size: '.$font_size.' !important; color: '.COL_CRITICAL.';">';
|
||||
$table1->data['data']['fail'] .= html_print_image(
|
||||
'images/module_critical.png',
|
||||
true
|
||||
|
@ -2750,9 +2748,9 @@ function reporting_html_value(&$table, $item, $mini, $only_value=false, $check_e
|
|||
global $config;
|
||||
|
||||
if ($mini) {
|
||||
$font_size = '1.5';
|
||||
$font_size = '1.5em';
|
||||
} else {
|
||||
$font_size = $config['font_size_item_report'];
|
||||
$font_size = $config['font_size_item_report'].'em';
|
||||
}
|
||||
|
||||
if (isset($item['visual_format']) && $item['visual_format'] != 0
|
||||
|
@ -2867,7 +2865,7 @@ function reporting_html_value(&$table, $item, $mini, $only_value=false, $check_e
|
|||
$table->colspan['data']['cell'] = 3;
|
||||
$table->cellstyle['data']['cell'] = 'text-align: left;';
|
||||
|
||||
$table->data['data']['cell'] = '<p style="font: bold '.$font_size.'em Arial, Sans-serif; color: #000000;">';
|
||||
$table->data['data']['cell'] = '<p style="font-weight: bold; font-size: '.$font_size.'; color: #000000;">';
|
||||
|
||||
if ($check_empty && empty($item['data']['value'])) {
|
||||
$table->data['data']['cell'] .= __('Unknown');
|
||||
|
@ -3021,6 +3019,7 @@ function reporting_html_availability($table, $item, $pdf=0)
|
|||
|
||||
global $config;
|
||||
|
||||
$font_size = $config['font_size_item_report'].'em';
|
||||
$interval_description = $config['interval_description'];
|
||||
|
||||
if (!empty($item['data'])) {
|
||||
|
@ -3227,7 +3226,7 @@ function reporting_html_availability($table, $item, $pdf=0)
|
|||
$table_row[] = '';
|
||||
};
|
||||
|
||||
$table_row[] = '<span style="font-size: 1.2em; font-weight:bold;">'.sla_truncate($row['SLA'], $config['graph_precision']).'%</span>';
|
||||
$table_row[] = '<span style="font-size: '.$font_size.'; font-weight:bold;">'.sla_truncate($row['SLA'], $config['graph_precision']).'%</span>';
|
||||
|
||||
$table_row2 = [];
|
||||
$table_row2[] = $row['agent'];
|
||||
|
@ -3323,7 +3322,7 @@ function reporting_html_availability($table, $item, $pdf=0)
|
|||
$item['resume']['min'],
|
||||
$config['graph_precision']
|
||||
).'%',
|
||||
'avg' => '<span style="font-size: 1.2em; font-weight:bold;">'.sla_truncate($item['resume']['avg'], $config['graph_precision']).'%</span>',
|
||||
'avg' => '<span style="font-size: '.$font_size.'; font-weight:bold;">'.sla_truncate($item['resume']['avg'], $config['graph_precision']).'%</span>',
|
||||
];
|
||||
if ($item['fields']['agent_max_value'] == false) {
|
||||
$table1->head['max_text'] = '';
|
||||
|
@ -3380,6 +3379,14 @@ function reporting_html_availability_graph($table, $item, $pdf=0)
|
|||
global $config;
|
||||
$metaconsole_on = is_metaconsole();
|
||||
|
||||
$font_size = $config['font_size_item_report'].'em';
|
||||
|
||||
if ($pdf) {
|
||||
$font_mini = '9px';
|
||||
} else {
|
||||
$font_mini = 'inherit';
|
||||
}
|
||||
|
||||
if ($metaconsole_on !== false) {
|
||||
$hack_metaconsole = '../../';
|
||||
} else {
|
||||
|
@ -3443,8 +3450,9 @@ function reporting_html_availability_graph($table, $item, $pdf=0)
|
|||
|
||||
$table1->data[0][0] = $chart['agent'].'<br />'.$chart['module'];
|
||||
$table1->data[0][1] = $chart['chart'];
|
||||
$table1->data[0][2] = "<span style = 'font: bold 2em Arial, Sans-serif; color: ".$color."'>".$sla_value.'</span>';
|
||||
$table1->data[0][3] = $checks_resume;
|
||||
$table1->data[0][2] = "<span style = 'font-weight: bold; font-size: ".$font_size.'; color: '.$color."'>".$sla_value.'</span>';
|
||||
$table1->data[0][3] = "<span style = 'font-size: ".$font_mini.";'>".$checks_resume.'</span>';
|
||||
|
||||
$tables_chart .= html_print_table(
|
||||
$table1,
|
||||
true
|
||||
|
@ -3464,8 +3472,10 @@ function reporting_html_availability_graph($table, $item, $pdf=0)
|
|||
}
|
||||
|
||||
$title = '';
|
||||
$checks_resume_text = $checks_resume;
|
||||
$sla_value_text = "<span style = 'font: bold 2em Arial, Sans-serif; color: ".$color."'>".$sla_value.'</span>';
|
||||
$checks_resume_text = '<span style = "font-size: '.$font_mini.';">';
|
||||
$checks_resume_text .= $checks_resume;
|
||||
$checks_resume_text .= '</span>';
|
||||
$sla_value_text = "<span style = 'font-weight: bold; font-size: ".$font_size.' !important; color: '.$color."'>".$sla_value.'</span>';
|
||||
switch ($item['data'][$k_chart]['failover']) {
|
||||
case 'primary':
|
||||
$title = '<b>'.__('Primary').'</b>';
|
||||
|
@ -3482,8 +3492,8 @@ function reporting_html_availability_graph($table, $item, $pdf=0)
|
|||
case 'result':
|
||||
default:
|
||||
$title = '<b>'.__('Result').'</b>';
|
||||
$sla_value_text = "<span style = 'font: bold 3em Arial, Sans-serif; color: ".$color."'>".$sla_value.'</span>';
|
||||
$checks_resume_text = '<span style = "font-size: 12pt;">';
|
||||
$sla_value_text = "<span style = 'font-weight: bold; font-size: ".$font_size.' !important; color: '.$color."'>".$sla_value.'</span>';
|
||||
$checks_resume_text = '<span style = "font-size: '.$font_mini.';">';
|
||||
$checks_resume_text .= $checks_resume;
|
||||
$checks_resume_text .= '</span>';
|
||||
break;
|
||||
|
@ -5123,19 +5133,6 @@ function reporting_html_planned_downtimes_table($planned_downtimes)
|
|||
$table->style = [];
|
||||
$table->data = [];
|
||||
|
||||
if ($for_pdf) {
|
||||
$table->titlestyle = 'background: #373737; color: #FFF; display: table-cell; font-size: 12px; border: 1px solid grey';
|
||||
$table->class = 'table_sla';
|
||||
|
||||
for ($i = 0; $i < count($table->head); $i++) {
|
||||
$table->headstyle[$i] = 'background: #666; color: #FFF; display: table-cell; font-size: 11px; border: 1px solid grey';
|
||||
}
|
||||
|
||||
for ($i = 0; $i < count($table->head); $i++) {
|
||||
$table->style[$i] = 'display: table-cell; font-size: 10px;';
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($planned_downtimes as $planned_downtime) {
|
||||
$data = [];
|
||||
$data[0] = $planned_downtime['name'];
|
||||
|
|
|
@ -39,6 +39,9 @@ function reporting_xml_get_report($report, $filename, $return=false)
|
|||
}
|
||||
}
|
||||
|
||||
// Remove entities.
|
||||
$report = io_safe_output($report);
|
||||
|
||||
$xml = null;
|
||||
$xml = array2XML($report, 'report', $xml);
|
||||
$xml = preg_replace('/(<[^>]+>)(<[^>]+>)(<[^>]+>)/', "$1\n$2\n$3", $xml);
|
||||
|
|
|
@ -47,37 +47,13 @@ function tactical_get_data($id_user=false, $user_strict=false, $acltags, $return
|
|||
}
|
||||
|
||||
if (!empty($user_groups_ids)) {
|
||||
switch ($config['dbtype']) {
|
||||
case 'mysql':
|
||||
$list_groups = db_get_all_rows_sql(
|
||||
'
|
||||
SELECT *
|
||||
FROM tgrupo
|
||||
WHERE id_grupo IN ('.$user_groups_ids.')
|
||||
ORDER BY nombre COLLATE utf8_general_ci ASC'
|
||||
);
|
||||
break;
|
||||
|
||||
case 'postgresql':
|
||||
$list_groups = db_get_all_rows_sql(
|
||||
'
|
||||
SELECT *
|
||||
FROM tgrupo
|
||||
WHERE id_grupo IN ('.$user_groups_ids.')
|
||||
ORDER BY nombre ASC'
|
||||
);
|
||||
break;
|
||||
|
||||
case 'oracle':
|
||||
$list_groups = db_get_all_rows_sql(
|
||||
'
|
||||
SELECT *
|
||||
FROM tgrupo
|
||||
WHERE id_grupo IN ('.$user_groups_ids.')
|
||||
ORDER BY nombre ASC'
|
||||
);
|
||||
break;
|
||||
}
|
||||
$list_groups = db_get_all_rows_sql(
|
||||
'
|
||||
SELECT *
|
||||
FROM tgrupo
|
||||
WHERE id_grupo IN ('.$user_groups_ids.')
|
||||
ORDER BY nombre COLLATE utf8_general_ci ASC'
|
||||
);
|
||||
}
|
||||
|
||||
$list = [];
|
||||
|
@ -242,14 +218,36 @@ function tactical_get_data($id_user=false, $user_strict=false, $acltags, $return
|
|||
|
||||
$list['_server_sanity_'] = format_numeric((100 - $list['_module_sanity_']), 1);
|
||||
} else if (($config['realtimestats'] == 0)) {
|
||||
$group_stat = db_get_all_rows_sql(
|
||||
"SELECT
|
||||
SUM(ta.normal_count) as normal, SUM(ta.critical_count) as critical,
|
||||
SUM(ta.warning_count) as warning,SUM(ta.unknown_count) as unknown,
|
||||
SUM(ta.notinit_count) as not_init, SUM(fired_count) as alerts_fired
|
||||
FROM tagente ta
|
||||
WHERE disabled = 0 AND id_grupo IN ($user_groups_ids)"
|
||||
);
|
||||
if (users_is_admin()) {
|
||||
$group_stat = db_get_all_rows_sql(
|
||||
sprintf(
|
||||
'SELECT
|
||||
SUM(ta.normal_count) as normal, SUM(ta.critical_count) as critical,
|
||||
SUM(ta.warning_count) as warning,SUM(ta.unknown_count) as unknown,
|
||||
SUM(ta.notinit_count) as not_init, SUM(ta.fired_count) as alerts_fired
|
||||
FROM tagente ta
|
||||
WHERE ta.disabled = 0 AND ta.id_grupo IN (%s)
|
||||
',
|
||||
$user_groups_ids
|
||||
)
|
||||
);
|
||||
} else {
|
||||
$group_stat = db_get_all_rows_sql(
|
||||
sprintf(
|
||||
'SELECT
|
||||
SUM(ta.normal_count) as normal, SUM(ta.critical_count) as critical,
|
||||
SUM(ta.warning_count) as warning,SUM(ta.unknown_count) as unknown,
|
||||
SUM(ta.notinit_count) as not_init, SUM(ta.fired_count) as alerts_fired
|
||||
FROM tagente ta
|
||||
LEFT JOIN tagent_secondary_group tasg
|
||||
ON ta.id_agente = tasg.id_agent
|
||||
WHERE ta.disabled = 0 AND
|
||||
(ta.id_grupo IN ( %s ) OR tasg.id_group IN ( %s ))',
|
||||
$user_groups_ids,
|
||||
$user_groups_ids
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
$list['_agents_unknown_'] = $group_stat[0]['unknown'];
|
||||
$list['_monitors_alerts_fired_'] = $group_stat[0]['alerts_fired'];
|
||||
|
@ -303,19 +301,41 @@ function tactical_get_data($id_user=false, $user_strict=false, $acltags, $return
|
|||
|
||||
$list['_server_sanity_'] = format_numeric((100 - $list['_module_sanity_']), 1);
|
||||
} else {
|
||||
$_tag_condition = '';
|
||||
$result_list = db_get_all_rows_sql(
|
||||
"SELECT COUNT(*) as contado, estado
|
||||
FROM tagente_estado tae INNER JOIN tagente ta
|
||||
ON tae.id_agente = ta.id_agente
|
||||
AND ta.disabled = 0
|
||||
AND ta.id_grupo IN ( $user_groups_ids )
|
||||
INNER JOIN tagente_modulo tam
|
||||
ON tae.id_agente_modulo = tam.id_agente_modulo
|
||||
AND tam.disabled = 0
|
||||
$_tag_condition
|
||||
GROUP BY estado"
|
||||
);
|
||||
if (users_is_admin()) {
|
||||
$result_list = db_get_all_rows_sql(
|
||||
sprintf(
|
||||
'SELECT COUNT(*) as contado, estado FROM tagente_estado tae
|
||||
INNER JOIN tagente ta
|
||||
ON tae.id_agente = ta.id_agente
|
||||
AND ta.disabled = 0
|
||||
AND ta.id_grupo IN ( %s )
|
||||
INNER JOIN tagente_modulo tam
|
||||
ON tae.id_agente_modulo = tam.id_agente_modulo
|
||||
AND tam.disabled = 0
|
||||
GROUP BY estado',
|
||||
$user_groups_ids
|
||||
)
|
||||
);
|
||||
} else {
|
||||
$result_list = db_get_all_rows_sql(
|
||||
sprintf(
|
||||
'SELECT COUNT(*) as contado, estado
|
||||
FROM tagente_estado tae
|
||||
INNER JOIN tagente ta
|
||||
ON tae.id_agente = ta.id_agente
|
||||
AND ta.disabled = 0
|
||||
INNER JOIN tagente_modulo tam
|
||||
ON tae.id_agente_modulo = tam.id_agente_modulo
|
||||
AND tam.disabled = 0
|
||||
LEFT JOIN tagent_secondary_group tasg
|
||||
ON ta.id_agente = tasg.id_agent
|
||||
WHERE (ta.id_grupo IN ( %s ) OR tasg.id_group IN ( %s ))
|
||||
GROUP BY estado',
|
||||
$user_groups_ids,
|
||||
$user_groups_ids
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
if (empty($result_list)) {
|
||||
$result_list = [];
|
||||
|
|
|
@ -776,9 +776,9 @@ function ui_print_os_icon(
|
|||
}
|
||||
|
||||
if (is_metaconsole()) {
|
||||
$no_in_meta = true;
|
||||
} else {
|
||||
$no_in_meta = false;
|
||||
} else {
|
||||
$no_in_meta = true;
|
||||
}
|
||||
|
||||
$icon = (string) db_get_value('icon_name', 'tconfig_os', 'id_os', (int) $id_os);
|
||||
|
@ -1144,7 +1144,7 @@ function ui_format_alert_row(
|
|||
|
||||
$data[$index['agent_name']] = $disabledHtmlStart;
|
||||
if ($agent == 0) {
|
||||
$data[$index['module_name']] .= ui_print_truncate_text(isset($alert['agent_module_name']) ? $alert['agent_module_name'] : modules_get_agentmodule_name($alert['id_agent_module']), 'module_small', false, true, true, '[…]', 'font-size: 7.2pt');
|
||||
$data[$index['module_name']] .= ui_print_truncate_text(isset($alert['agent_module_name']) ? $alert['agent_module_name'] : modules_get_agentmodule_name($alert['id_agent_module']), 'module_small', false, true, true, '[…]', '');
|
||||
} else {
|
||||
if (defined('METACONSOLE')) {
|
||||
$agent_name = $alert['agent_name'];
|
||||
|
@ -1155,16 +1155,16 @@ function ui_format_alert_row(
|
|||
}
|
||||
|
||||
if (defined('METACONSOLE') || !can_user_access_node()) {
|
||||
$data[$index['agent_name']] = ui_print_truncate_text($agent_name, 'agent_small', false, true, false, '[…]', 'font-size:7.5pt;');
|
||||
$data[$index['agent_name']] = ui_print_truncate_text($agent_name, 'agent_small', false, true, true, '[…]', '');
|
||||
} else {
|
||||
if ($agent_style !== false) {
|
||||
$data[$index['agent_name']] .= '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$id_agent.'"> <span style="font-size: 7pt;font-weight:bold" title ="'.$agente['nombre'].'">'.$agente['alias'].'</span></a>';
|
||||
$data[$index['agent_name']] .= '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$id_agent.'"> <span style="font-weight:bold" title ="'.$agente['nombre'].'">'.$agente['alias'].'</span></a>';
|
||||
} else {
|
||||
$data[$index['agent_name']] .= '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$id_agent.'"> <span style="font-size: 7pt;font-weight:bold" title ="'.$agente['nombre'].'">'.$agente['alias'].'</span></a>';
|
||||
$data[$index['agent_name']] .= '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$id_agent.'"> <span style="font-weight:bold" title ="'.$agente['nombre'].'">'.$agente['alias'].'</span></a>';
|
||||
}
|
||||
}
|
||||
|
||||
$data[$index['module_name']] = ui_print_truncate_text(isset($alert['agent_module_name']) ? $alert['agent_module_name'] : modules_get_agentmodule_name($alert['id_agent_module']), 'module_small', false, true, true, '[…]', 'font-size: 7.2pt');
|
||||
$data[$index['module_name']] = ui_print_truncate_text(isset($alert['agent_module_name']) ? $alert['agent_module_name'] : modules_get_agentmodule_name($alert['id_agent_module']), 'module_small', false, true, true, '[…]', '');
|
||||
}
|
||||
|
||||
$data[$index['agent_name']] .= $disabledHtmlEnd;
|
||||
|
@ -1184,7 +1184,7 @@ function ui_format_alert_row(
|
|||
FROM talert_templates WHERE id = '.$alert['id_alert_template']
|
||||
);
|
||||
|
||||
$data[$index['description']] .= $disabledHtmlStart.ui_print_truncate_text(io_safe_output($description), 'description', false, true, true, '[…]', 'font-size: 7.1pt').$disabledHtmlEnd;
|
||||
$data[$index['description']] .= $disabledHtmlStart.ui_print_truncate_text(io_safe_output($description), 'description', false, true, true, '[…]', '').$disabledHtmlEnd;
|
||||
|
||||
$actions = alerts_get_alert_agent_module_actions($alert['id'], false, $alert['server_data']['id']);
|
||||
|
||||
|
|
|
@ -762,7 +762,7 @@ function newsletter_wiz_modal(
|
|||
__('Cancel'),
|
||||
'cancel_newsletter',
|
||||
false,
|
||||
'class="ui-widget ui-state-default ui-corner-all ui-button-text-only sub upd submit-cancel" style="color: red; width:100px;"',
|
||||
'class="ui-widget ui-state-default ui-corner-all ui-button-text-only sub upd submit-cancel" style="width:100px;"',
|
||||
true
|
||||
);
|
||||
$output .= '</div>';
|
||||
|
@ -1166,7 +1166,7 @@ function update_manager_install_package_step2()
|
|||
}
|
||||
|
||||
update_manager_enterprise_set_version($version);
|
||||
$product_name = get_product_name();
|
||||
$product_name = io_safe_output(get_product_name());
|
||||
|
||||
// Generate audit entry.
|
||||
db_pandora_audit(
|
||||
|
|
|
@ -86,6 +86,7 @@
|
|||
}
|
||||
.defaultSkin table.mceLayout tr.mceLast td {
|
||||
border-bottom: 1px solid #ccc;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
.defaultSkin table.mceToolbar,
|
||||
.defaultSkin tr.mceFirst .mceToolbar tr td,
|
||||
|
|
|
@ -737,7 +737,7 @@ var TreeController = {
|
|||
}
|
||||
|
||||
$graphImage.addClass("module-graph").click(function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
if (element.statusImageHTML.indexOf("data:image") != -1) {
|
||||
try {
|
||||
winopeng_var(
|
||||
|
@ -776,7 +776,7 @@ var TreeController = {
|
|||
'images/binary.png" /> '
|
||||
);
|
||||
$dataImage.addClass("module-data").click(function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
try {
|
||||
var serverName =
|
||||
|
|
|
@ -289,7 +289,7 @@ li.ui-tabs-tab.ui-corner-top.ui-state-default.ui-tab {
|
|||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
li.ui-tabs-tab.ui-corner-top.ui-state-default.ui-tab.ui-tabs-active.ui-state-active {
|
||||
border-bottom: 1px solid #fff;
|
||||
border-bottom: 2px solid #fff;
|
||||
}
|
||||
|
||||
tr.group {
|
||||
|
|
|
@ -27,6 +27,7 @@ div#page,
|
|||
#menu_tab_frame,
|
||||
#menu_tab_frame_view,
|
||||
#menu_tab_frame_view_bc,
|
||||
ul.subsubmenu li,
|
||||
input.search_input,
|
||||
.filters input,
|
||||
input#text-id_parent.ac_input,
|
||||
|
@ -100,6 +101,18 @@ table.widget_list td.datos2 {
|
|||
background-color: inherit;
|
||||
}
|
||||
|
||||
/* Change inputs with autocomplete */
|
||||
input:-webkit-autofill,
|
||||
input:-webkit-autofill:hover,
|
||||
input:-webkit-autofill:focus,
|
||||
input:-webkit-autofill:active {
|
||||
-webkit-box-shadow: 0 0 0 30px #111 inset !important;
|
||||
}
|
||||
|
||||
input:-webkit-autofill {
|
||||
-webkit-text-fill-color: #fff !important;
|
||||
}
|
||||
|
||||
/* messages */
|
||||
.container {
|
||||
background-color: #222;
|
||||
|
@ -251,6 +264,10 @@ table.table_modal_alternate tr:nth-child(even) td {
|
|||
filter: brightness(2.5) contrast(50%);
|
||||
}
|
||||
|
||||
a.pandora_pagination {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* firts_task.css */
|
||||
.new_task,
|
||||
div.new_task_cluster,
|
||||
|
@ -337,11 +354,16 @@ table#diagnostic_info tbody td div {
|
|||
color: #fff;
|
||||
}
|
||||
|
||||
.ui-widget-content.ui-autocomplete,
|
||||
.ui-widget-content.ui-autocomplete a {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.ui-state-default,
|
||||
.ui-widget-content .ui-state-default,
|
||||
.ui-widget-header .ui-state-default {
|
||||
background-color: #222;
|
||||
color: #fff;
|
||||
background-color: #222 !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.ui-state-active,
|
||||
|
@ -366,6 +388,11 @@ ul.ui-tabs-nav.ui-corner-all.ui-helper-reset.ui-helper-clearfix.ui-widget-header
|
|||
filter: brightness(2);
|
||||
}
|
||||
|
||||
.ui-dialog .ui-dialog-buttonpane button {
|
||||
background-color: transparent;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* notifications */
|
||||
#notification-wrapper::before {
|
||||
border-bottom-color: #111;
|
||||
|
@ -393,6 +420,17 @@ div#box_online * {
|
|||
color: #555;
|
||||
}
|
||||
|
||||
/* news dialog */
|
||||
#news_dialog #new_text {
|
||||
background: #222 !important;
|
||||
}
|
||||
|
||||
/* ipam */
|
||||
.tooltipster-content {
|
||||
background: #222 !important;
|
||||
}
|
||||
|
||||
/* licence */
|
||||
div#code_license_dialog div#code,
|
||||
div#form_activate_licence #code {
|
||||
margin-top: 20px;
|
||||
|
|
|
@ -129,7 +129,7 @@
|
|||
<div style='height: 10px'>
|
||||
<?php
|
||||
$version = '7.0NG.742';
|
||||
$build = '200102';
|
||||
$build = '200108';
|
||||
$banner = "v$version Build $build";
|
||||
|
||||
error_reporting(0);
|
||||
|
|
|
@ -1485,7 +1485,8 @@ if (!empty($result)) {
|
|||
|
||||
// Avoid the check on the metaconsole. Too slow to show/hide an icon depending on the permissions
|
||||
if (!is_metaconsole()) {
|
||||
$acl_graphs = check_acl($config['id_user'], $row['id_group'], 'RR');
|
||||
$agent_groups = agents_get_all_groups_agent($row['id_agent'], $row['id_group']);
|
||||
$acl_graphs = check_acl_one_of_groups($config['id_user'], $agent_groups, 'RR');
|
||||
} else {
|
||||
$acl_graphs = true;
|
||||
}
|
||||
|
@ -1709,7 +1710,9 @@ if (!empty($result)) {
|
|||
|
||||
html_print_table($table);
|
||||
|
||||
ui_pagination($count, false, $offset, 0, false, 'offset', true, 'pagination-bottom');
|
||||
if ($count_modules > $config['block_size']) {
|
||||
ui_pagination($count_modules, false, $offset, 0, false, 'offset', true, 'pagination-bottom');
|
||||
}
|
||||
} else {
|
||||
if ($first_interaction) {
|
||||
ui_print_info_message(['no_close' => true, 'message' => __('This group doesn\'t have any monitor')]);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.742
|
||||
%define release 200102
|
||||
%define release 200108
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.742
|
||||
%define release 200102
|
||||
%define release 200108
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.742
|
||||
%define release 200102
|
||||
%define release 200108
|
||||
%define httpd_name httpd
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name apache2
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-server
|
||||
Version: 7.0NG.742-200102
|
||||
Version: 7.0NG.742-200108
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.742-200102"
|
||||
pandora_version="7.0NG.742-200108"
|
||||
|
||||
package_cpan=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -45,7 +45,7 @@ our @EXPORT = qw(
|
|||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "7.0NG.742";
|
||||
my $pandora_build = "200102";
|
||||
my $pandora_build = "200108";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
# Setup hash
|
||||
|
|
|
@ -1660,7 +1660,9 @@ sub pandora_process_module ($$$$$$$$$;$) {
|
|||
pandora_update_module_on_error ($pa_config, $module, $dbh);
|
||||
return;
|
||||
}
|
||||
my $last_try = ($1 == 0) ? 0 : timelocal($6, $5, $4, $3, $2 - 1, $1 - 1900);
|
||||
|
||||
my $last_try = ($1 == 0) ? 0 : strftime("%s", $6, $5, $4, $3, $2 - 1, $1 - 1900);
|
||||
|
||||
my $save = ($module->{'history_data'} == 1 && ($agent_status->{'datos'} ne $processed_data || $last_try < ($utimestamp - 86400))) ? 1 : 0;
|
||||
|
||||
# Received stale data. Save module data if needed and return.
|
||||
|
@ -3823,7 +3825,7 @@ sub pandora_evaluate_snmp_alerts ($$$$$$$$$) {
|
|||
# Check time threshold
|
||||
$alert->{'last_fired'} = '1970-01-01 00:00:00' unless defined ($alert->{'last_fired'});
|
||||
return unless ($alert->{'last_fired'} =~ /(\d+)\-(\d+)\-(\d+) +(\d+):(\d+):(\d+)/);
|
||||
my $last_fired = ($1 > 0) ? timelocal($6, $5, $4, $3, $2 - 1, $1 - 1900) : 0;
|
||||
my $last_fired = ($1 > 0) ? strftime("%s", $6, $5, $4, $3, $2 - 1, $1 - 1900) : 0;
|
||||
|
||||
my $utimestamp = time ();
|
||||
my $timestamp = strftime ("%Y-%m-%d %H:%M:%S", localtime($utimestamp));
|
||||
|
|
|
@ -309,7 +309,7 @@ sub process_xml_data ($$$$$) {
|
|||
my $utimestamp = 0;
|
||||
eval {
|
||||
if ($timestamp =~ /(\d+)[\/|\-](\d+)[\/|\-](\d+) +(\d+):(\d+):(\d+)/) {
|
||||
$utimestamp = timelocal($6, $5, $4, $3, $2 -1 , $1 - 1900);
|
||||
$utimestamp = strftime("%s", $6, $5, $4, $3, $2 -1 , $1 - 1900);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -837,7 +837,7 @@ sub process_module_data ($$$$$$$$$$) {
|
|||
}
|
||||
my $utimestamp;
|
||||
eval {
|
||||
$utimestamp = timelocal($6, $5, $4, $3, $2 - 1, $1 - 1900);
|
||||
$utimestamp = strftime("%s", $6, $5, $4, $3, $2 - 1, $1 - 1900);
|
||||
};
|
||||
if ($@) {
|
||||
logger($pa_config, "Invalid timestamp '$timestamp' from module '$module_name' agent '$agent_name'.", 3);
|
||||
|
|
|
@ -32,7 +32,7 @@ our @ISA = qw(Exporter);
|
|||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "7.0NG.742";
|
||||
my $pandora_build = "200102";
|
||||
my $pandora_build = "200108";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
||||
|
@ -2382,7 +2382,7 @@ sub get_unix_time {
|
|||
eval {
|
||||
use Time::Local;
|
||||
my ($mday,$mon,$year,$hour,$min,$sec) = split(/[\s$separator_dates$separator_hours]+/, $str_time);
|
||||
$time = timelocal($sec,$min,$hour,$mday,$mon-1,$year);
|
||||
$time = strftime("%s", $sec,$min,$hour,$mday,$mon-1,$year);
|
||||
};
|
||||
if ($@) {
|
||||
return 0;
|
||||
|
|
|
@ -1734,7 +1734,7 @@ sub cron_valid_date {
|
|||
my $utime;
|
||||
eval {
|
||||
local $SIG{__DIE__} = sub {};
|
||||
$utime = timelocal(0, $min, $hour, $mday, $month, $year);
|
||||
$utime = strftime("%s", 0, $min, $hour, $mday, $month, $year);
|
||||
};
|
||||
if ($@) {
|
||||
return 0;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_server
|
||||
%define version 7.0NG.742
|
||||
%define release 200102
|
||||
%define release 200108
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_server
|
||||
%define version 7.0NG.742
|
||||
%define release 200102
|
||||
%define release 200108
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.742"
|
||||
PI_BUILD="200102"
|
||||
PI_BUILD="200108"
|
||||
|
||||
MODE=$1
|
||||
if [ $# -gt 1 ]; then
|
||||
|
|
|
@ -216,7 +216,7 @@ sub process_module_data ($$$$$$$$$) {
|
|||
$timestamp !~ /(\d+)\-(\d+)\-(\d+) +(\d+):(\d+):(\d+)/) {
|
||||
}
|
||||
my $utimestamp;
|
||||
$utimestamp = timelocal($6, $5, $4, $3, $2 - 1, $1 - 1900);
|
||||
$utimestamp = strftime("%s", $6, $5, $4, $3, $2 - 1, $1 - 1900);
|
||||
|
||||
my %data_object;
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ use PandoraFMS::Config;
|
|||
use PandoraFMS::DB;
|
||||
|
||||
# version: define current version
|
||||
my $version = "7.0NG.742 PS200102";
|
||||
my $version = "7.0NG.742 PS200108";
|
||||
|
||||
# Pandora server configuration
|
||||
my %conf;
|
||||
|
|
|
@ -36,7 +36,7 @@ use Encode::Locale;
|
|||
Encode::Locale::decode_argv;
|
||||
|
||||
# version: define current version
|
||||
my $version = "7.0NG.742 PS200102";
|
||||
my $version = "7.0NG.742 PS200108";
|
||||
|
||||
# save program name for logging
|
||||
my $progname = basename($0);
|
||||
|
@ -640,9 +640,9 @@ sub pandora_delete_module_data ($$) {
|
|||
my $buffer = 1000;
|
||||
|
||||
while(1) {
|
||||
my $nd = get_db_value ($dbh, 'SELECT count(id_agente_modulo) FROM tagente_datos_string WHERE id_agente_modulo=?', $id_module);
|
||||
my $ndinc = get_db_value ($dbh, 'SELECT count(id_agente_modulo) FROM tagente_datos_string WHERE id_agente_modulo=?', $id_module);
|
||||
my $ndlog4x = get_db_value ($dbh, 'SELECT count(id_agente_modulo) FROM tagente_datos_string WHERE id_agente_modulo=?', $id_module);
|
||||
my $nd = get_db_value ($dbh, 'SELECT count(id_agente_modulo) FROM tagente_datos WHERE id_agente_modulo=?', $id_module);
|
||||
my $ndinc = get_db_value ($dbh, 'SELECT count(id_agente_modulo) FROM tagente_datos_inc WHERE id_agente_modulo=?', $id_module);
|
||||
my $ndlog4x = get_db_value ($dbh, 'SELECT count(id_agente_modulo) FROM tagente_datos_log4x WHERE id_agente_modulo=?', $id_module);
|
||||
my $ndstring = get_db_value ($dbh, 'SELECT count(id_agente_modulo) FROM tagente_datos_string WHERE id_agente_modulo=?', $id_module);
|
||||
|
||||
my $ntot = $nd + $ndinc + $ndlog4x + $ndstring;
|
||||
|
@ -652,19 +652,19 @@ sub pandora_delete_module_data ($$) {
|
|||
}
|
||||
|
||||
if($nd > 0) {
|
||||
db_do ($dbh, 'DELETE FROM tagente_datos WHERE id_agente_modulo=? LIMIT ?', $id_module, $buffer);
|
||||
db_delete_limit($dbh, 'tagente_datos', 'id_agente_modulo='.$id_module, $buffer);
|
||||
}
|
||||
|
||||
if($ndinc > 0) {
|
||||
db_do ($dbh, 'DELETE FROM tagente_datos_inc WHERE id_agente_modulo=? LIMIT ?', $id_module, $buffer);
|
||||
db_delete_limit($dbh, 'tagente_datos_inc', 'id_agente_modulo='.$id_module, $buffer);
|
||||
}
|
||||
|
||||
if($ndlog4x > 0) {
|
||||
db_do ($dbh, 'DELETE FROM tagente_datos_log4x WHERE id_agente_modulo=? LIMIT ?', $id_module, $buffer);
|
||||
db_delete_limit($dbh, 'tagente_datos_log4x', 'id_agente_modulo='.$id_module, $buffer);
|
||||
}
|
||||
|
||||
if($ndstring > 0) {
|
||||
db_do ($dbh, 'DELETE FROM tagente_datos_string WHERE id_agente_modulo=? LIMIT ?', $id_module, $buffer);
|
||||
db_delete_limit($dbh, 'tagente_datos_string', 'id_agente_modulo='.$id_module, $buffer);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4416,7 +4416,7 @@ sub cli_delete_data($) {
|
|||
|
||||
print_log "DELETING THE DATA OF THE AGENT $name\n\n";
|
||||
|
||||
pandora_delete_data($dbh, 'module', $id_agent);
|
||||
pandora_delete_data($dbh, 'agent', $id_agent);
|
||||
}
|
||||
} else {
|
||||
my $id_agent = get_agent_id($dbh,$name);
|
||||
|
@ -4424,7 +4424,7 @@ sub cli_delete_data($) {
|
|||
|
||||
print_log "DELETING THE DATA OF THE AGENT $name\n\n";
|
||||
|
||||
pandora_delete_data($dbh, 'module', $id_agent);
|
||||
pandora_delete_data($dbh, 'agent', $id_agent);
|
||||
}
|
||||
}
|
||||
elsif($opt eq '-g' || $opt eq '--g') {
|
||||
|
|
|
@ -112,13 +112,13 @@ sub generate_xml_files ($$$$$$) {
|
|||
my $time_from = get_conf_token ($conf, 'time_from', $time_now);
|
||||
die ("[error] Invalid time_from: $time_from\n\n")
|
||||
unless ($time_from =~ /(\d+)\-(\d+)\-(\d+) +(\d+):(\d+):(\d+)/);
|
||||
my $utimestamp_from = timelocal($6, $5, $4, $3, $2 - 1, $1 - 1900);
|
||||
my $utimestamp_from = strftime("%s", $6, $5, $4, $3, $2 - 1, $1 - 1900);
|
||||
|
||||
# Get time_to
|
||||
my $time_to = get_conf_token ($conf, 'time_to', $time_now);
|
||||
die ("[error] Invalid time_to: $time_to\n\n")
|
||||
unless ($time_to =~ /(\d+)\-(\d+)\-(\d+) +(\d+):(\d+):(\d+)/);
|
||||
my $utimestamp_to = timelocal($6, $5, $4, $3, $2 - 1, $1 - 1900);
|
||||
my $utimestamp_to = strftime("%s", $6, $5, $4, $3, $2 - 1, $1 - 1900);
|
||||
|
||||
my %modules_src_pointers = init_src_pointers($modules);
|
||||
|
||||
|
|