diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control
index 4ead22711f..6771606f50 100644
--- a/pandora_agents/unix/DEBIAN/control
+++ b/pandora_agents/unix/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-agent-unix
-Version: 7.0NG.735-190614
+Version: 7.0NG.735-190625
Architecture: all
Priority: optional
Section: admin
diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh
index 0a62096fb5..fe7628e999 100644
--- a/pandora_agents/unix/DEBIAN/make_deb_package.sh
+++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-pandora_version="7.0NG.735-190614"
+pandora_version="7.0NG.735-190625"
echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent
index 23dc9f3f4c..6bbb463b49 100755
--- a/pandora_agents/unix/pandora_agent
+++ b/pandora_agents/unix/pandora_agent
@@ -42,7 +42,7 @@ my $Sem = undef;
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.735';
-use constant AGENT_BUILD => '190614';
+use constant AGENT_BUILD => '190625';
# Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000;
diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec
index fcc42de22c..8f580504eb 100644
--- a/pandora_agents/unix/pandora_agent.redhat.spec
+++ b/pandora_agents/unix/pandora_agent.redhat.spec
@@ -3,7 +3,7 @@
#
%define name pandorafms_agent_unix
%define version 7.0NG.735
-%define release 190614
+%define release 190625
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}
diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec
index 14d90f0833..28023a28f3 100644
--- a/pandora_agents/unix/pandora_agent.spec
+++ b/pandora_agents/unix/pandora_agent.spec
@@ -3,7 +3,7 @@
#
%define name pandorafms_agent_unix
%define version 7.0NG.735
-%define release 190614
+%define release 190625
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}
diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer
index cf65cbba4a..879ff79eac 100755
--- a/pandora_agents/unix/pandora_agent_installer
+++ b/pandora_agents/unix/pandora_agent_installer
@@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.735"
-PI_BUILD="190614"
+PI_BUILD="190625"
OS_NAME=`uname -s`
FORCE=0
diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi
index eaa9573fe6..21e38fb13b 100644
--- a/pandora_agents/win32/installer/pandora.mpi
+++ b/pandora_agents/win32/installer/pandora.mpi
@@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
-{190614}
+{190625}
ViewReadme
{Yes}
diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc
index 8724546822..2194b622ac 100644
--- a/pandora_agents/win32/pandora.cc
+++ b/pandora_agents/win32/pandora.cc
@@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1
-#define PANDORA_VERSION ("7.0NG.735(Build 190614)")
+#define PANDORA_VERSION ("7.0NG.735(Build 190625)")
string pandora_path;
string pandora_dir;
diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc
index 67a1d6e71d..f328ab299c 100644
--- a/pandora_agents/win32/versioninfo.rc
+++ b/pandora_agents/win32/versioninfo.rc
@@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent"
- VALUE "ProductVersion", "(7.0NG.735(Build 190614))"
+ VALUE "ProductVersion", "(7.0NG.735(Build 190625))"
VALUE "FileVersion", "1.0.0.0"
END
END
diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control
index c653917fdc..8a166990ab 100644
--- a/pandora_console/DEBIAN/control
+++ b/pandora_console/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-console
-Version: 7.0NG.735-190614
+Version: 7.0NG.735-190625
Architecture: all
Priority: optional
Section: admin
diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh
index 1f20583f54..2d45e0aa49 100644
--- a/pandora_console/DEBIAN/make_deb_package.sh
+++ b/pandora_console/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-pandora_version="7.0NG.735-190614"
+pandora_version="7.0NG.735-190625"
package_pear=0
package_pandora=1
diff --git a/pandora_console/extensions/agents_modules.php b/pandora_console/extensions/agents_modules.php
index b5860068d8..97657f5189 100644
--- a/pandora_console/extensions/agents_modules.php
+++ b/pandora_console/extensions/agents_modules.php
@@ -1,23 +1,24 @@
'.__('Group').'';
$filter_groups = html_print_select_groups(false, 'AR', true, 'group_id', $group_id, '', '', '', true, false, true, '', false, 'width: auto;');
$filter_recursion_label = ''.__('Recursion').' ';
$filter_recursion = html_print_checkbox('recursion', 1, 0, true);
- // groups module
+ // Groups module.
$filter_module_groups_label = ''.__('Module group').' ';
$filter_module_groups = html_print_select_from_sql(
'SELECT * FROM tmodule_group ORDER BY name',
@@ -146,7 +147,7 @@ function mainAgentsModules()
'width: auto;'
);
- // agent
+ // Agent.
$agents = agents_get_group_agents($group_id);
if ((empty($agents)) || $agents == -1) {
$agents = [];
@@ -155,7 +156,7 @@ function mainAgentsModules()
$filter_agents_label = ''.__('Agents').' ';
$filter_agents = html_print_select($agents, 'id_agents2[]', $agents_id, '', '', 0, true, true, true, '', false, 'min-width: 180px; max-width: 200px;');
- // type show
+ // Type show.
$selection = [
0 => __('Show common modules'),
1 => __('Show all modules'),
@@ -163,12 +164,12 @@ function mainAgentsModules()
$filter_type_show_label = ''.__('Show common modules').' ';
$filter_type_show = html_print_select($selection, 'selection_agent_module', $selection_a_m, '', '', 0, true, false, true, '', false, 'min-width: 180px;');
- // modules
+ // Modules.
$all_modules = select_modules_for_agent_group($group_id, $agents_id, $selection_a_m, false);
$filter_modules_label = ''.__('Module').' ';
$filter_modules = html_print_select($all_modules, 'module[]', $modules_selected, '', '', 0, true, true, false, '', false, 'min-width: 180px; max-width: 200px;');
- // update
+ // Update.
$filter_update = html_print_submit_button(__('Update item'), 'edit_item', false, 'class="sub upd"', true);
$onheader = [
@@ -178,8 +179,11 @@ function mainAgentsModules()
'combo_groups' => $filter_groups,
];
- // Old style table, we need a lot of special formatting,don't use table function
- // Prepare old-style table
+ /*
+ * Old style table, we need a lot of special formatting,don't use table function.
+ * Prepare old-style table.
+ */
+
if ($config['pure'] == 0) {
// Header.
ui_print_page_header(
@@ -200,38 +204,51 @@ function mainAgentsModules()
$full_modules = urlencode(implode(';', $full_modules_selected));
$full_agents = urlencode(implode(';', $full_agents_id));
- $url = " index.php?sec=view&sec2=extensions/agents_modules&pure=0&offset=$offset
+ $url = 'index.php?sec=view&sec2=extensions/agents_modules&pure=0&offset=$offset
&group_id=$group_id&modulegroup=$modulegroup&refresh=$refr&full_modules_selected=$full_modules
- &full_agents_id=$full_agents&selection_agent_module=$selection_a_m";
+ &full_agents_id=$full_agents&selection_agent_module=$selection_a_m';
} else {
- $url = " index.php?sec=view&sec2=extensions/agents_modules&pure=0&offset=$offset&group_id=$group_id&modulegroup=$modulegroup&refresh=$refr";
+ $url = 'index.php?sec=view&sec2=extensions/agents_modules&pure=0&offset=$offset&group_id=$group_id&modulegroup=$modulegroup&refresh=$refr';
}
- // Floating menu - Start
+ // Floating menu - Start.
echo '
';
echo '';
echo '
';
- // Floating menu - End
+ // Floating menu - End.
ui_require_jquery_file('countdown');
}
if ($config['pure'] != 1) {
- echo '';
+ $show_filters = '';
+ ui_toggle($show_filters, __('Filters'));
}
if ($agents_id[0] != -1) {
@@ -291,7 +308,7 @@ function mainAgentsModules()
$count = 0;
foreach ($agents as $agent) {
- // TODO TAGS agents_get_modules
+ // TODO TAGS agents_get_modules.
$module = agents_get_modules(
$agent,
false,
@@ -339,7 +356,7 @@ function mainAgentsModules()
}
}
} else {
- // TODO TAGS agents_get_modules
+ // TODO TAGS agents_get_modules.
$all_modules = agents_get_modules(
$agents,
false,
@@ -414,11 +431,11 @@ function mainAgentsModules()
if ($hor_offset > 0) {
$new_hor_offset = ($hor_offset - $block);
- echo ""."".html_print_image(
- 'images/arrow_left.png',
+ echo " ".html_print_image(
+ 'images/arrow_left_green.png',
true,
['title' => __('Previous modules')]
- ).' '.' ';
+ ).'';
}
$nmodules = 0;
@@ -440,11 +457,11 @@ function mainAgentsModules()
if (($hor_offset + $block) < $nmodules) {
$new_hor_offset = ($hor_offset + $block);
- echo ""."".html_print_image(
- 'images/arrow.png',
+ echo " ".html_print_image(
+ 'images/arrow_right_green.png',
true,
['title' => __('More modules')]
- ).' '.' ';
+ ).'';
}
echo '';
@@ -457,12 +474,12 @@ function mainAgentsModules()
$filter_agents['id_grupo'] = $group_id;
}
- // Prepare pagination
- $url = 'index.php?extension_in_menu=estado&sec=extensions&sec2=extensions/agents_modules&save_serialize=1&'.'hor_offset='.$hor_offset.'&selection_a_m='.$selection_a_m;
+ // Prepare pagination.
+ $url = 'index.php?extension_in_menu=estado&sec=extensions&sec2=extensions/agents_modules&save_serialize=1&hor_offset='.$hor_offset.'&selection_a_m='.$selection_a_m;
ui_pagination($total_pagination, $url);
foreach ($agents as $agent) {
- // Get stats for this group
+ // Get stats for this group.
$agent_status = agents_get_status($agent['id_agente']);
$alias = db_get_row('tagente', 'id_agente', $agent['id_agente']);
if (empty($alias['alias'])) {
@@ -471,29 +488,29 @@ function mainAgentsModules()
switch ($agent_status) {
case 4:
- // Alert fired status
+ // Alert fired status.
$rowcolor = 'group_view_alrm';
break;
case 1:
- // Critical status
+ // Critical status.
$rowcolor = 'group_view_crit';
break;
case 2:
- // Warning status
+ // Warning status.
$rowcolor = 'group_view_warn';
break;
case 0:
- // Normal status
+ // Normal status.
$rowcolor = 'group_view_ok';
break;
case 3:
case -1:
default:
- // Unknown status
+ // Unknown status.
$rowcolor = 'group_view_unk';
break;
}
@@ -502,7 +519,7 @@ function mainAgentsModules()
echo "
".$alias['alias'].' ';
- // TODO TAGS agents_get_modules
+ // TODO TAGS agents_get_modules.
$agent_modules = agents_get_modules($agent['id_agente'], false, $filter_module_group, true, true);
$nmodules = 0;
@@ -572,18 +589,23 @@ function mainAgentsModules()
echo '';
- echo "";
+ $show_legend = "
";
+ $show_legend .= "
+
".__('Orange cell when the module has fired alerts').'
';
+ $show_legend .= "
+
".__('Red cell when the module has a critical status').'
+
';
+ $show_legend .= "
+
".__('Yellow cell when the module has a warning status').'
';
+ $show_legend .= "
+
".__('Green cell when the module has a normal status').'
';
+ $show_legend .= "
+
".__('Grey cell when the module has an unknown status').'
';
+ $show_legend .= "
+
".__("Cell turns blue when the module is in 'not initialize' status").'
';
+ $show_legend .= '
';
+ ui_toggle($show_legend, __('Legend'));
- echo '
';
- echo "".__('Legend').' ';
- echo "
".__('Orange cell when the module has fired alerts').' ';
- echo "
".__('Red cell when the module has a critical status').' ';
- echo "
".__('Yellow cell when the module has a warning status').' ';
- echo "
".__('Green cell when the module has a normal status').' ';
- echo "
".__('Grey cell when the module has an unknown status').' ';
- echo "
".__("Cell turns blue when the module is in 'not initialize' status").' ';
- echo '
';
- echo '
';
$pure_var = $config['pure'];
if ($pure_var) {
$pure_var = 1;
@@ -627,16 +649,14 @@ $ignored_params['refresh'] = '';
$.each($('.th_class_module_r'), function (i, elem) {
id = $(elem).attr('id').replace('th_module_r_', '');
$("#th_module_r_" + id).height(($("#div_module_r_" + id).width() + 10) + 'px');
-
- //$("#div_module_r_" + id).css('margin-top', (max_width - $("#div_module_r_" + id).width()) + 'px');
$("#div_module_r_" + id).css('margin-top', (max_width - 20) + 'px');
$("#div_module_r_" + id).show();
});
- var refr =" . $refr . ";
- var pure =" . $pure_var . ";
- var href ='" . ui_get_url_refresh ($ignored_params) . "';
-
+ var refr = '';
+ var pure = '';
+ var href =' ';
+
if (pure) {
var startCountDown = function (duration, cb) {
$('div.vc-countdown').countdown('destroy');
@@ -646,7 +666,7 @@ $ignored_params['refresh'] = '';
$('div.vc-countdown').countdown({
until: t,
format: 'MS',
- layout: '(%M%nn%M:%S%nn%S Until refresh)',
+ layout: '(%M%nn%M:%S%nn%S ) ',
alwaysExpire: true,
onExpiry: function () {
$('div.vc-countdown').countdown('destroy');
@@ -655,8 +675,11 @@ $ignored_params['refresh'] = '';
}
});
}
-
- startCountDown(refr, false);
+
+ if(refr>0){
+ startCountDown(refr, false);
+ }
+
var controls = document.getElementById('vc-controls');
autoHideElement(controls, 1000);
diff --git a/pandora_console/extensions/module_groups.php b/pandora_console/extensions/module_groups.php
index 9e750be932..d9843f9860 100644
--- a/pandora_console/extensions/module_groups.php
+++ b/pandora_console/extensions/module_groups.php
@@ -1,17 +1,32 @@
0, 1, 0)) AS alerts_module_count,
- SUM(IF($condition_warning, 1, 0)) AS warning_module_count,
- SUM(IF($condition_unknown, 1, 0)) AS unknown_module_count,
- SUM(IF($condition_not_init, 1, 0)) AS notInit_module_count,
- SUM(IF($condition_critical, 1, 0)) AS critical_module_count,
- SUM(IF($condition_normal, 1, 0)) AS normal_module_count,
- COUNT(tae.id_agente_modulo) AS total_count,
- tmg.id_mg,
- tmg.name as n,
- tg.id_grupo
- FROM (
- SELECT tam.id_agente_modulo,
- tam.id_module_group,
- ta.id_grupo AS g,
- tae.estado,
- SUM(IF(tatm.last_fired <> 0, 1, 0)) AS alert_fired
- FROM tagente_modulo tam
- LEFT JOIN talert_template_modules tatm
- ON tatm.id_agent_module = tam.id_agente_modulo
- AND tatm.times_fired = 1
- LEFT JOIN tagente_estado tae
- ON tae.id_agente_modulo = tam.id_agente_modulo
- INNER JOIN tagente ta
- ON ta.id_agente = tam.id_agente
- WHERE ta.disabled = 0
- AND tam.disabled = 0
- AND tam.delete_pending = 0
- AND ta.id_grupo IN ($ids_group)
- GROUP BY tam.id_agente_modulo
- UNION ALL
- SELECT tam.id_agente_modulo,
- tam.id_module_group,
- tasg.id_group AS g,
- tae.estado,
- SUM(IF(tatm.last_fired <> 0, 1, 0)) AS alert_fired
- FROM tagente_modulo tam
- LEFT JOIN talert_template_modules tatm
- ON tatm.id_agent_module = tam.id_agente_modulo
- AND tatm.times_fired = 1
- LEFT JOIN tagente_estado tae
- ON tae.id_agente_modulo = tam.id_agente_modulo
- INNER JOIN tagente ta
- ON ta.id_agente = tam.id_agente
- INNER JOIN tagent_secondary_group tasg
- ON ta.id_agente = tasg.id_agent
- WHERE ta.disabled = 0
- AND tam.disabled = 0
- AND tam.delete_pending = 0
- AND tasg.id_group IN ($ids_group)
- GROUP BY tam.id_agente_modulo, tasg.id_group
- ) AS tae
- RIGHT JOIN tgrupo tg
- ON tg.id_grupo = tae.g
- INNER JOIN (
- SELECT * FROM tmodule_group
- UNION ALL
- SELECT 0 AS 'id_mg', 'Nothing' AS 'name'
- ) AS tmg
- ON tae.id_module_group = tmg.id_mg
- GROUP BY tae.g, tmg.id_mg";
+ $sql = sprintf(
+ "SELECT SUM(IF(tae.alert_fired <> 0, 1, 0)) AS alerts_module_count,
+ SUM(IF(%s, 1, 0)) AS warning_module_count,
+ SUM(IF(%s, 1, 0)) AS unknown_module_count,
+ SUM(IF(%s, 1, 0)) AS notInit_module_count,
+ SUM(IF(%s, 1, 0)) AS critical_module_count,
+ SUM(IF(%s, 1, 0)) AS normal_module_count,
+ COUNT(tae.id_agente_modulo) AS total_count,
+ tmg.id_mg,
+ tmg.name as n,
+ tg.id_grupo
+ FROM (
+ SELECT tam.id_agente_modulo,
+ tam.id_module_group,
+ ta.id_grupo AS g,
+ tae.estado,
+ SUM(IF(tatm.last_fired <> 0, 1, 0)) AS alert_fired
+ FROM tagente_modulo tam
+ LEFT JOIN talert_template_modules tatm
+ ON tatm.id_agent_module = tam.id_agente_modulo
+ AND tatm.times_fired = 1
+ LEFT JOIN tagente_estado tae
+ ON tae.id_agente_modulo = tam.id_agente_modulo
+ INNER JOIN tagente ta
+ ON ta.id_agente = tam.id_agente
+ WHERE ta.disabled = 0
+ AND tam.disabled = 0
+ AND tam.delete_pending = 0
+ AND ta.id_grupo IN (%s)
+ GROUP BY tam.id_agente_modulo
+ UNION ALL
+ SELECT tam.id_agente_modulo,
+ tam.id_module_group,
+ tasg.id_group AS g,
+ tae.estado,
+ SUM(IF(tatm.last_fired <> 0, 1, 0)) AS alert_fired
+ FROM tagente_modulo tam
+ LEFT JOIN talert_template_modules tatm
+ ON tatm.id_agent_module = tam.id_agente_modulo
+ AND tatm.times_fired = 1
+ LEFT JOIN tagente_estado tae
+ ON tae.id_agente_modulo = tam.id_agente_modulo
+ INNER JOIN tagente ta
+ ON ta.id_agente = tam.id_agente
+ INNER JOIN tagent_secondary_group tasg
+ ON ta.id_agente = tasg.id_agent
+ WHERE ta.disabled = 0
+ AND tam.disabled = 0
+ AND tam.delete_pending = 0
+ AND tasg.id_group IN (%s)
+ GROUP BY tam.id_agente_modulo, tasg.id_group
+ ) AS tae
+ RIGHT JOIN tgrupo tg
+ ON tg.id_grupo = tae.g
+ INNER JOIN (
+ SELECT * FROM tmodule_group
+ UNION ALL
+ SELECT 0 AS 'id_mg', 'Nothing' AS 'name'
+ ) AS tmg
+ ON tae.id_module_group = tmg.id_mg
+ GROUP BY tae.g, tmg.id_mg",
+ $condition_warning,
+ $condition_unknown,
+ $condition_not_init,
+ $condition_critical,
+ $condition_normal,
+ $ids_group,
+ $ids_group
+ );
$array_data_prev = db_get_all_rows_sql($sql);
@@ -220,9 +253,21 @@ function mainModuleGroups()
echo '';
echo '';
+ $cell_style = '
+ min-width: 60px;
+ width: 100%;
+ margin: 0;
+ overflow:hidden;
+ text-align: center;
+ padding: 5px;
+ padding-bottom:10px;
+ font-size: 18px;
+ text-align: center;
+ ';
+
if (true) {
$table = new StdClass();
- $table->style[0] = 'color: #ffffff; background-color: #373737; font-weight: bolder; padding-right: 10px; min-width: 230px;';
+ $table->style[0] = 'color: #ffffff; background-color: #373737; font-weight: bolder; min-width: 230px;';
$table->width = '100%';
$head[0] = __('Groups');
@@ -248,28 +293,28 @@ function mainModuleGroups()
$color = '#FFA631';
// Orange when the cell for this model group and agent has at least one alert fired.
} else if ($array_data[$key][$k]['critical_module_count'] != 0) {
- $color = '#FC4444';
+ $color = '#e63c52';
// Red when the cell for this model group and agent has at least one module in critical state and the rest in any state.
} else if ($array_data[$key][$k]['warning_module_count'] != 0) {
- $color = '#FAD403';
+ $color = '#f3b200';
// Yellow when the cell for this model group and agent has at least one in warning state and the rest in green state.
} else if ($array_data[$key][$k]['unknown_module_count'] != 0) {
$color = '#B2B2B2 ';
// Grey when the cell for this model group and agent has at least one module in unknown state and the rest in any state.
} else if ($array_data[$key][$k]['normal_module_count'] != 0) {
- $color = '#80BA27';
+ $color = '#82b92e';
// Green when the cell for this model group and agent has OK state all modules.
} else if ($array_data[$key][$k]['notInit_module_count'] != 0) {
$color = '#5BB6E5';
// Blue when the cell for this module group and all modules have not init value.
}
- $data[$i][$j] = "";
+ $data[$i][$j] = "
';
} else {
- $data[$i][$j] = "
";
+ $data[$i][$j] = "
";
$data[$i][$j] .= 0;
$data[$i][$j] .= '
';
}
@@ -278,7 +323,7 @@ function mainModuleGroups()
}
} else {
foreach ($value['gm'] as $k => $v) {
- $data[$i][$j] = "
";
+ $data[$i][$j] = "
";
$data[$i][$j] .= 0;
$data[$i][$j] .= '
';
$j++;
diff --git a/pandora_console/extensions/realtime_graphs/realtime_graphs.css b/pandora_console/extensions/realtime_graphs/realtime_graphs.css
index ab6c94e238..2219c6152a 100644
--- a/pandora_console/extensions/realtime_graphs/realtime_graphs.css
+++ b/pandora_console/extensions/realtime_graphs/realtime_graphs.css
@@ -11,5 +11,5 @@
#graph_container {
width: 800px;
- margin: 20px auto !important;
+ margin: 20px auto;
}
diff --git a/pandora_console/extras/delete_files/delete_files.txt b/pandora_console/extras/delete_files/delete_files.txt
deleted file mode 100644
index 82ce1527aa..0000000000
--- a/pandora_console/extras/delete_files/delete_files.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-/general/login_identification_wizard.php
-/general/login_required.php
-/godmode/update_manager/update_manager.messages.php
\ No newline at end of file
diff --git a/pandora_console/general/footer.php b/pandora_console/general/footer.php
index b35123b5d3..dcc894989b 100644
--- a/pandora_console/general/footer.php
+++ b/pandora_console/general/footer.php
@@ -20,6 +20,8 @@ if (isset($_SERVER['REQUEST_TIME'])) {
$time = get_system_time();
}
+ui_require_css_file('footer');
+
$license_file = 'general/license/pandora_info_'.$config['language'].'.html';
if (! file_exists($config['homedir'].$license_file)) {
$license_file = 'general/license/pandora_info_en.html';
@@ -41,9 +43,17 @@ if ($current_package == 0) {
$build_package_version = $current_package;
}
-echo sprintf(__('%s %s - Build %s - MR %s', get_product_name(), $pandora_version, $build_package_version, $config['MR']));
+echo __(
+ '%s %s - Build %s - MR %s',
+ get_product_name(),
+ $pandora_version,
+ $build_package_version,
+ $config['MR']
+);
+echo '
';
+echo '
'.__('Page generated on %s', date('Y-m-d H:i:s')).' ';
+
-echo ' ';
if (isset($config['debug'])) {
$cache_info = [];
diff --git a/pandora_console/general/login_page.php b/pandora_console/general/login_page.php
index 86dccfa53a..4fbdf93140 100755
--- a/pandora_console/general/login_page.php
+++ b/pandora_console/general/login_page.php
@@ -19,8 +19,8 @@ if (isset($config['homedir'])) {
ui_require_css_file('login');
-require_once $homedir.'include/functions_ui.php';
-require_once $homedir.'include/functions.php';
+require_once __DIR__.'/../include/functions_ui.php';
+require_once __DIR__.'/../include/functions.php';
require_once __DIR__.'/../include/functions_html.php';
@@ -518,6 +518,7 @@ if ($login_screen == 'error_authconfig' || $login_screen == 'error_emptyconfig'
ui_require_css_file('dialog');
ui_require_css_file('jquery-ui.min', 'include/styles/js/');
ui_require_jquery_file('jquery-ui.min');
+ui_require_jquery_file('jquery-ui_custom');
?>
-
-
-
-
-
-
- class = 'databox';
- $table->cellpadding = 4;
- $table->cellspacing = 4;
- $table->head = [];
- $table->data = [];
- $table->headstyle[0] = 'text-align:center;';
- $table->width = '100%';
- $table->head[0] = ''.__('%s Overview', get_product_name()).' ';
- $table->head_colspan[0] = 4;
+echo '';
- // Indicators.
- $tdata = [];
- $stats = reporting_get_stats_indicators($data, 120, 10, false);
- $status = '
';
- foreach ($stats as $stat) {
- $status .= ''.$stat['title'].' '.$stat['graph'].' ';
- }
+//
+// Overview Table.
+//
+$table = new stdClass();
+$table->class = 'no-class';
+$table->cellpadding = 4;
+$table->cellspacing = 4;
+$table->head = [];
+$table->data = [];
+$table->headstyle[0] = 'text-align:center;';
+$table->width = '100%';
+$table->head_colspan[0] = 4;
- $status .= '
';
- $table->data[0][0] = $status;
- $table->rowclass[] = '';
+// Indicators.
+$tdata = [];
+$stats = reporting_get_stats_indicators($data, 120, 10, false);
+$status = '
';
+foreach ($stats as $stat) {
+ $status .= ''.$stat['title'].' '.$stat['graph'].' ';
+}
- $table->data[] = $tdata;
+$status .= '
';
+$table->data[0][0] = $status;
+$table->rowclass[] = '';
- // Alerts.
- $tdata = [];
- $tdata[0] = reporting_get_stats_alerts($data);
- $table->rowclass[] = '';
- $table->data[] = $tdata;
+$table->data[] = $tdata;
- // Modules by status.
- $tdata = [];
- $tdata[0] = reporting_get_stats_modules_status($data, 180, 100);
- $table->rowclass[] = '';
- $table->data[] = $tdata;
+// Alerts.
+$tdata = [];
+$tdata[0] = reporting_get_stats_alerts($data);
+$table->rowclass[] = '';
+$table->data[] = $tdata;
- // Total agents and modules.
- $tdata = [];
- $tdata[0] = reporting_get_stats_agents_monitors($data);
- $table->rowclass[] = '';
- $table->data[] = $tdata;
+// Modules by status.
+$tdata = [];
+$tdata[0] = reporting_get_stats_modules_status($data, 180, 100);
+$table->rowclass[] = '';
+$table->data[] = $tdata;
- // Users.
- if (users_is_admin()) {
- $tdata = [];
- $tdata[0] = reporting_get_stats_users($data);
- $table->rowclass[] = '';
- $table->data[] = $tdata;
- }
+// Total agents and modules.
+$tdata = [];
+$tdata[0] = reporting_get_stats_agents_monitors($data);
+$table->rowclass[] = '';
+$table->data[] = $tdata;
- html_print_table($table);
- unset($table);
- ?>
-
-
-
-
-
-
-
- rowclass[] = '';
+ $table->data[] = $tdata;
+}
+
+ui_toggle(
+ html_print_table($table, true),
+ __('%s Overview', get_product_name()),
+ '',
+ 'overview',
+ false
+);
+unset($table);
+
+echo '';
+
+// News.
+$options = [];
+$options['id_user'] = $config['id_user'];
+$options['modal'] = false;
+$options['limit'] = 3;
+$news = get_news($options);
- if (!empty($news)) {
- // NEWS BOARD.
- echo '
';
+if (!empty($news)) {
+ ui_require_css_file('news');
+ // NEWS BOARD.
+ if ($config['prominent_time'] == 'timestamp') {
+ $comparation_suffix = '';
+ } else {
+ $comparation_suffix = __('ago');
+ }
- echo '
';
- echo ''.__('News board').' ';
- if ($config['prominent_time'] == 'timestamp') {
- $comparation_suffix = '';
- } else {
- $comparation_suffix = __('ago');
- }
+ $output_news = '';
+ foreach ($news as $article) {
+ $image = false;
+ if ($article['text'] == '<p style="text-align: center; font-size: 13px;">Hello, congratulations, if you've arrived here you already have an operational monitoring console. Remember that our forums and online documentation are available 24x7 to get you out of any trouble. You can replace this message with a personalized one at Admin tools -&gt; Site news.</p> ') {
+ $image = true;
+ }
- foreach ($news as $article) {
- $image = false;
- if ($article['text'] == '<p style="text-align: center; font-size: 13px;">Hello, congratulations, if you've arrived here you already have an operational monitoring console. Remember that our forums and online documentation are available 24x7 to get you out of any trouble. You can replace this message with a personalized one at Admin tools -&gt; Site news.</p> ') {
- $image = true;
- }
+ $text_bbdd = io_safe_output($article['text']);
+ $text = html_entity_decode($text_bbdd);
+ $output_news .= '
'.$article['subject'].' ';
+ $output_news .= '
';
+ $output_news .= '
'.__('by').' '.$article['author'].' '.ui_print_timestamp($article['timestamp'], true).' '.$comparation_suffix.'
';
+ if ($image) {
+ $output_news .= '
';
+ }
- $text_bbdd = io_safe_output($article['text']);
- $text = html_entity_decode($text_bbdd);
- echo '
'.$article['subject'].' ';
- echo '
'.__('by').' '.$article['author'].' '.ui_print_timestamp($article['timestamp'], true).' '.$comparation_suffix.' ';
- echo '
';
- if ($image) {
- echo ' ';
- }
+ $output_news .= nl2br($text);
+ $output_news .= '';
+ }
- echo nl2br($text);
- echo ' ';
- }
+ $output_news .= '
';
- echo '
';
- echo '
';
- // News board.
- echo '
';
+ // News board.
+ ui_toggle(
+ $output_news,
+ __('News board'),
+ '',
+ 'news',
+ false
+ );
+ // END OF NEWS BOARD.
+}
- // END OF NEWS BOARD.
- }
-
- // LAST ACTIVITY.
- // Show last activity from this user.
- echo '
';
-
- $table = new stdClass();
- $table->class = 'info_table';
- $table->cellpadding = 0;
- $table->cellspacing = 0;
- $table->width = '100%';
- // Don't specify px.
- $table->data = [];
- $table->size = [];
- $table->size[0] = '5%';
- $table->size[1] = '15%';
- $table->size[2] = '15%';
- $table->size[3] = '10%';
- $table->size[4] = '25%';
- $table->head = [];
- $table->head[0] = __('User');
- $table->head[1] = __('Action');
- $table->head[2] = __('Date');
- $table->head[3] = __('Source IP');
- $table->head[4] = __('Comments');
- $table->title = '
'.__('This is your last activity performed on the %s console', get_product_name()).' ';
- $sql = sprintf(
- 'SELECT id_usuario,accion, ip_origen,descripcion,utimestamp
- FROM tsesion
- WHERE (`utimestamp` > UNIX_TIMESTAMP(NOW()) - '.SECONDS_1WEEK.")
- AND `id_usuario` = '%s' ORDER BY `utimestamp` DESC LIMIT 10",
- $config['id_user']
- );
+// LAST ACTIVITY.
+// Show last activity from this user.
+$table = new stdClass();
+$table->class = 'no-td-padding info_table';
+$table->cellpadding = 0;
+$table->cellspacing = 0;
+$table->width = '100%';
+// Don't specify px.
+$table->data = [];
+$table->size = [];
+$table->headstyle = [];
+$table->size[0] = '5%';
+$table->size[1] = '15%';
+$table->headstyle[1] = 'min-width: 12em;';
+$table->size[2] = '5%';
+$table->headstyle[2] = 'min-width: 65px;';
+$table->size[3] = '10%';
+$table->size[4] = '25%';
+$table->head = [];
+$table->head[0] = __('User');
+$table->head[1] = __('Action');
+$table->head[2] = __('Date');
+$table->head[3] = __('Source IP');
+$table->head[4] = __('Comments');
+$table->align[4] = 'left';
+$sql = sprintf(
+ 'SELECT id_usuario,accion, ip_origen,descripcion,utimestamp
+ FROM tsesion
+ WHERE (`utimestamp` > UNIX_TIMESTAMP(NOW()) - '.SECONDS_1WEEK.")
+ AND `id_usuario` = '%s' ORDER BY `utimestamp` DESC LIMIT 10",
+ $config['id_user']
+);
- $sessions = db_get_all_rows_sql($sql);
+$sessions = db_get_all_rows_sql($sql);
- if ($sessions === false) {
- $sessions = [];
- }
+if ($sessions === false) {
+ $sessions = [];
+}
- foreach ($sessions as $session) {
- $data = [];
- $session_id_usuario = $session['id_usuario'];
- $session_ip_origen = $session['ip_origen'];
+foreach ($sessions as $session) {
+ $data = [];
+ $session_id_usuario = $session['id_usuario'];
+ $session_ip_origen = $session['ip_origen'];
+ $data[0] = '
'.$session_id_usuario.' ';
+ $data[1] = ui_print_session_action_icon($session['accion'], true).' '.$session['accion'];
+ $data[2] = ui_print_help_tip(
+ date($config['date_format'], $session['utimestamp']),
+ true
+ ).human_time_comparation($session['utimestamp'], 'tiny');
+ $data[3] = $session_ip_origen;
+ $description = str_replace([',', ', '], ', ', $session['descripcion']);
+ if (strlen($description) > 100) {
+ $data[4] = '
'.io_safe_output(substr($description, 0, 150).'...').'
';
+ } else {
+ $data[4] = '
'.io_safe_output($description).'
';
+ }
- $data[0] = '
'.$session_id_usuario.' ';
- $data[1] = ui_print_session_action_icon($session['accion'], true).' '.$session['accion'];
- $data[2] = ui_print_help_tip(
- date($config['date_format'], $session['utimestamp']),
- true
- ).human_time_comparation($session['utimestamp'], 'tiny');
- $data[3] = $session_ip_origen;
- $description = str_replace([',', ', '], ', ', $session['descripcion']);
- if (strlen($description) > 100) {
- $data[4] = '
'.io_safe_output(substr($description, 0, 150).'...').'
';
- } else {
- $data[4] = '
'.io_safe_output($description).'
';
- }
+ array_push($table->data, $data);
+}
- array_push($table->data, $data);
- }
+$activity .= html_print_table($table, true);
+unset($table);
- echo "
";
- html_print_table($table);
- unset($table);
- echo '
';
- echo '
';
- // END OF LAST ACTIVIYY.
- ?>
-
-
-
-
-
-
+ui_toggle(
+ $activity,
+ __('Latest activity'),
+ '',
+ 'activity',
+ false,
+ false,
+ '',
+ 'white-box-content padded'
+);
+// END OF LAST ACTIVIYY.
+// Close right panel.
+echo '
';
+
+// Close welcome panel.
+echo '
';
diff --git a/pandora_console/general/main_menu.php b/pandora_console/general/main_menu.php
index 877f171090..ca6c0fd473 100644
--- a/pandora_console/general/main_menu.php
+++ b/pandora_console/general/main_menu.php
@@ -30,12 +30,6 @@ $(document).ready(function(){
}
});
-
-// Set the height of the menu.
-$(window).on('load', function (){
- $("#menu_full").height($("#container").height());
-});
-
data[1] = $data;
$form = '
';
-ui_toggle($form, __('Filter'), '', false);
+ui_toggle($form, __('Filter'), '', '', false);
$filter = '1=1';
diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php
index dfdd7390c3..7c6a3ab03b 100644
--- a/pandora_console/godmode/agentes/agent_manager.php
+++ b/pandora_console/godmode/agentes/agent_manager.php
@@ -176,7 +176,7 @@ if ($disk_conf_delete) {
@unlink($filename['conf']);
}
-echo '
';
// QR code div.
- $table_qr_code = '';
+ $table_qr_code = '
';
$table_qr_code .= '
'.__('QR Code Agent view').':
';
$table_qr_code .= '
';
if ($id_agente) {
@@ -401,7 +401,7 @@ $table_description .= html_print_textarea(
// QR code.
echo '
-
+
'.$table_agent_name.$table_alias.$table_ip.$table_primary_group.'
'.$table_interval.$table_os.$table_server.$table_description.'
';
@@ -413,8 +413,8 @@ echo '
';
if (enterprise_installed()) {
$secondary_groups_selected = enterprise_hook('agents_get_secondary_groups', [$id_agente]);
- $table_adv_secondary_groups = '
'.__('Secondary groups').':
';
- $table_adv_secondary_groups_left = html_print_select_groups(
+ $adv_secondary_groups_label = '
'.__('Secondary groups').':
';
+ $adv_secondary_groups_left = html_print_select_groups(
false,
// Use the current user to select the groups.
'AR',
@@ -441,7 +441,7 @@ if (enterprise_installed()) {
// CSS classnames (default).
false,
// Not disabled (default).
- 'width:50%; min-width:170px;',
+ 'min-width:170px;',
// Inline styles (default).
false,
// Option style select (default).
@@ -455,7 +455,7 @@ if (enterprise_installed()) {
// Do not show the primary group in this selection.
);
- $table_adv_secondary_groups_arrows = html_print_input_image(
+ $adv_secondary_groups_arrows = html_print_input_image(
'add_secondary',
'images/darrowright_green.png',
1,
@@ -479,7 +479,7 @@ if (enterprise_installed()) {
]
);
- $table_adv_secondary_groups_right .= html_print_select(
+ $adv_secondary_groups_right .= html_print_select(
$secondary_groups_selected['for_select'],
// Values.
'secondary_groups_selected',
@@ -502,7 +502,7 @@ if (enterprise_installed()) {
// Class.
false,
// Disabled.
- 'width:50%; min-width:170px;'
+ 'min-width:170px;'
// Style.
);
@@ -579,7 +579,7 @@ if (enterprise_installed()) {
}
-$table_adv_parent = '
'.__('Parent').':
';
+$table_adv_parent = '
'.__('Parent').': ';
$params = [];
$params['return'] = true;
$params['show_helptip'] = true;
@@ -648,13 +648,15 @@ $table_adv_module_mode .= html_print_radio_button_extended(
$table_adv_module_mode .= '
';
// Status (Disabled / Enabled).
-$table_adv_status = '
'.__('Disabled').': '.ui_print_help_tip(__('If the remote configuration is enabled, it will also go into standby mode when disabling it.'), true).'
';
+$table_adv_status = '
';
$table_adv_status .= html_print_checkbox_switch(
'disabled',
1,
$disabled,
true
-).'
';
+);
+$table_adv_status .= '
'.__('Disabled').': '.ui_print_help_tip(__('If the remote configuration is enabled, it will also go into standby mode when disabling it.'), true).'
';
+$table_adv_status .= '
';
// Url address.
if (enterprise_installed()) {
@@ -665,7 +667,14 @@ if (enterprise_installed()) {
'',
45,
255,
- true
+ true,
+ false,
+ false,
+ '',
+ '',
+ '',
+ // Autocomplete.
+ 'new-password'
).'
';
} else {
$table_adv_url = '
';
@@ -679,9 +688,11 @@ if (enterprise_installed()) {
).'
';
}
-$table_adv_quiet = '
'.__('Quiet').': ';
+$table_adv_quiet = '
';
+$table_adv_quiet .= html_print_checkbox_switch('quiet', 1, $quiet, true);
+$table_adv_quiet .= '
'.__('Quiet').': ';
$table_adv_quiet .= ui_print_help_tip(__('The agent still runs but the alerts and events will be stop'), true).'
';
-$table_adv_quiet .= html_print_checkbox_switch('quiet', 1, $quiet, true).'
';
+$table_adv_quiet .= '
';
$listIcons = gis_get_array_list_icons();
@@ -753,31 +764,46 @@ if ($config['activate_gis']) {
// General display distribution.
-$table_adv_options = $table_adv_secondary_groups.'
-
- '.$table_adv_secondary_groups_left.'
+$table_adv_options = '
+
+ '.$adv_secondary_groups_label.'
+
+ '.$adv_secondary_groups_left.'
+
+
+ '.$adv_secondary_groups_arrows.'
+
+
+ '.$adv_secondary_groups_right.'
+
-
- '.$table_adv_secondary_groups_arrows.'
-
-
- '.$table_adv_secondary_groups_right.'
-
-
-
-
'.$table_adv_parent.$table_adv_module_mode.$table_adv_cascade;
+
+ '.$table_adv_parent.$table_adv_module_mode.$table_adv_cascade;
if ($new_agent) {
// If agent is new, show custom id as old style format.
$table_adv_options .= $custom_id_div;
}
-$table_adv_options .= $table_adv_gis.'
-
'.$table_adv_agent_icon.$table_adv_url.$table_adv_quiet.$table_adv_status.$table_adv_remote.$table_adv_safe.'
-
';
+$table_adv_options .= '
';
+
+$table_adv_options .= '
+
+ '.$table_adv_gis.$table_adv_agent_icon.$table_adv_url.$table_adv_quiet.$table_adv_status.$table_adv_remote.$table_adv_safe.'
+
';
+
echo '
';
- ui_toggle($table_adv_options, __('Advanced options'), '', true, false, 'white_box white_box_opened');
+ui_toggle(
+ $table_adv_options,
+ __('Advanced options'),
+ '',
+ '',
+ true,
+ false,
+ 'white_box white_box_opened',
+ 'no-border flex'
+);
echo '
';
@@ -831,7 +857,7 @@ foreach ($fields as $field) {
$custom_value = '';
}
- $table->rowstyle[$i] = 'cursor: pointer;';
+ $table->rowstyle[$i] = 'cursor: pointer;user-select: none;';
if (!empty($custom_value)) {
$table->rowstyle[($i + 1)] = 'display: table-row;';
} else {
@@ -895,14 +921,16 @@ foreach ($fields as $field) {
if (!empty($fields)) {
echo '
';
- ui_toggle(
- html_print_table($table, true),
- __('Custom fields'),
- '',
- true,
- false,
- 'white_box white_box_opened'
- );
+ ui_toggle(
+ html_print_table($table, true),
+ __('Custom fields'),
+ '',
+ '',
+ true,
+ false,
+ 'white_box white_box_opened',
+ 'no-border'
+ );
echo '
';
}
diff --git a/pandora_console/godmode/agentes/agent_wizard.snmp_interfaces_explorer.php b/pandora_console/godmode/agentes/agent_wizard.snmp_interfaces_explorer.php
index 5730fea501..b08dc62c4f 100644
--- a/pandora_console/godmode/agentes/agent_wizard.snmp_interfaces_explorer.php
+++ b/pandora_console/godmode/agentes/agent_wizard.snmp_interfaces_explorer.php
@@ -322,7 +322,7 @@ if ($create_modules) {
} else if (preg_match('/ifAdminStatus/', $name_array[1])) {
$module_type = 2;
} else if (preg_match('/ifOperStatus/', $name_array[1])) {
- $module_type = 18;
+ $module_type = 2;
} else {
$module_type = 4;
}
@@ -608,11 +608,11 @@ ui_require_jquery_file('bgiframe');
$(document).ready (function () {
var inputActive = true;
-
+
$(document).data('text_for_module', $("#none_text").html());
-
+
$("#id_snmp").change(snmp_changed_by_multiple_snmp);
-
+
$("#snmp_version").change(function () {
if (this.value == "3") {
$("#snmp3_options").css("display", "");
@@ -621,7 +621,7 @@ $(document).ready (function () {
$("#snmp3_options").css("display", "none");
}
});
-
+
$("#walk_form").submit(function() {
$("#submit-snmp_walk").disable ();
$("#oid_loading").show ();
@@ -632,15 +632,15 @@ $(document).ready (function () {
function snmp_changed_by_multiple_snmp (event, id_snmp, selected) {
var idSNMP = Array();
-
+
jQuery.each ($("#id_snmp option:selected"), function (i, val) {
idSNMP.push($(val).val());
});
$('#module').attr ('disabled', 1);
$('#module').empty ();
$('#module').append ($('
').html ("Loading...").attr ("value", 0));
-
- jQuery.post ('ajax.php',
+
+ jQuery.post ('ajax.php',
{"page" : "godmode/agentes/agent_manager",
"get_modules_json_for_multiple_snmp": 1,
"id_snmp[]": idSNMP,
@@ -655,7 +655,7 @@ function snmp_changed_by_multiple_snmp (event, id_snmp, selected) {
$('#module').fadeIn ('normal');
c++;
});
-
+
if (c == 0) {
if (typeof($(document).data('text_for_module')) != 'undefined') {
$('#module').append ($('
').html ($(document).data('text_for_module')).attr("value", 0).prop('selected', true));
@@ -666,11 +666,11 @@ function snmp_changed_by_multiple_snmp (event, id_snmp, selected) {
}
else {
var anyText = $("#any_text").html(); //Trick for catch the translate text.
-
+
if (anyText == null) {
anyText = 'Any';
}
-
+
$('#module').append ($('
').html (anyText).attr ("value", 0).prop('selected', true));
}
}
@@ -684,4 +684,3 @@ function snmp_changed_by_multiple_snmp (event, id_snmp, selected) {
/* ]]> */
-
diff --git a/pandora_console/godmode/agentes/module_manager_editor.php b/pandora_console/godmode/agentes/module_manager_editor.php
index cee4825faa..b340761265 100644
--- a/pandora_console/godmode/agentes/module_manager_editor.php
+++ b/pandora_console/godmode/agentes/module_manager_editor.php
@@ -583,7 +583,13 @@ echo '
';
// TODO: Change to the ui_print_error system
echo '