Merge branch 'develop' into feature/meta-agent-cache
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-agent-unix
|
||||
Version: 6.0dev-150415
|
||||
Version: 6.0dev-150417
|
||||
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="6.0dev-150415"
|
||||
pandora_version="6.0dev-150417"
|
||||
|
||||
echo "Test if you has the tools for to make the packages."
|
||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||
|
|
|
@ -41,7 +41,7 @@ my $Sem = undef;
|
|||
my $ThreadSem = undef;
|
||||
|
||||
use constant AGENT_VERSION => '6.0dev';
|
||||
use constant AGENT_BUILD => '150415';
|
||||
use constant AGENT_BUILD => '150417';
|
||||
|
||||
# Commands to retrieve total memory information in kB
|
||||
use constant TOTALMEMORY_CMDS => {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 6.0dev
|
||||
%define release 150415
|
||||
%define release 150417
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 6.0dev
|
||||
%define release 150415
|
||||
%define release 150417
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||
{}
|
||||
|
||||
Version
|
||||
{150415}
|
||||
{150417}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
|
|
@ -257,7 +257,7 @@ Pandora_Module_Logevent::getLogEvents (list<string> &event_list, unsigned char d
|
|||
TCHAR lp_referenced_domain_name[_MAX_PATH + 1];
|
||||
DWORD cch_referenced_domain_name = _MAX_PATH + 1;
|
||||
SID_NAME_USE pe_use;
|
||||
string description;
|
||||
string description, output;
|
||||
|
||||
if (this->log_event == NULL) {
|
||||
return -1;
|
||||
|
@ -392,9 +392,19 @@ Pandora_Module_Logevent::getLogEvents (list<string> &event_list, unsigned char d
|
|||
event << "]";
|
||||
}
|
||||
|
||||
|
||||
// Remove carriage returns and new lines in between the description.
|
||||
output = "";
|
||||
for (size_t i = 0; i < description.size(); i++) {
|
||||
if (description[i] != '\n' && description[i] != '\r') {
|
||||
output += description[i];
|
||||
}
|
||||
}
|
||||
output += '\n';
|
||||
|
||||
// Print the event description
|
||||
event << " ";
|
||||
event << description;
|
||||
event << output;
|
||||
|
||||
// Add the event to the list
|
||||
event_list.push_back (event.str());
|
||||
|
|
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||
using namespace Pandora_Strutils;
|
||||
|
||||
#define PATH_SIZE _MAX_PATH+1
|
||||
#define PANDORA_VERSION ("6.0dev(Build 150415)")
|
||||
#define PANDORA_VERSION ("6.0dev(Build 150417)")
|
||||
|
||||
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", "(6.0dev(Build 150415))"
|
||||
VALUE "ProductVersion", "(6.0dev(Build 150417))"
|
||||
VALUE "FileVersion", "1.0.0.0"
|
||||
END
|
||||
END
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-console
|
||||
Version: 6.0dev-150415
|
||||
Version: 6.0dev-150417
|
||||
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="6.0dev-150415"
|
||||
pandora_version="6.0dev-150417"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -178,7 +178,10 @@ function mainModuleGroups() {
|
|||
if (!empty($agentGroups) && !empty($modelGroups)) {
|
||||
array_walk($modelGroups, 'translate'); //Translate all head titles to language is set
|
||||
|
||||
$table = null;
|
||||
$table->headstyle[] = "width: 20%";
|
||||
foreach ($modelGroups as $i => $n) {
|
||||
$table->headstyle[] = "width: 7%";
|
||||
$modelGroups[$i] = ui_print_truncate_text($n, GENERIC_SIZE_TEXT);
|
||||
}
|
||||
|
||||
|
@ -186,12 +189,11 @@ function mainModuleGroups() {
|
|||
array_unshift($head, ' ');
|
||||
|
||||
//Metaobject use in html_print_table
|
||||
$table = null;
|
||||
$table->align[0] = 'right'; //Align to right the first column.
|
||||
$table->align[0] = 'left'; //Align to left the first column.
|
||||
$table->style[0] = 'color: #ffffff; '.
|
||||
'background-color: #373737; font-weight: bolder; padding-right: 10px;';
|
||||
'background-color: #373737; font-weight: bolder; padding-right: 10px; width:20%; ';
|
||||
$table->head = $head;
|
||||
$table->width = '98%';
|
||||
$table->width = '100%';
|
||||
|
||||
//The content of table
|
||||
$tableData = array();
|
||||
|
@ -247,29 +249,29 @@ function mainModuleGroups() {
|
|||
else {
|
||||
|
||||
if ($fired) {
|
||||
$color = '#ffa300'; //Orange when the cell for this model group and agent has at least one alert fired.
|
||||
$color = '#FFA631'; //Orange when the cell for this model group and agent has at least one alert fired.
|
||||
}
|
||||
else if (array_key_exists(1, $states)) {
|
||||
$color = '#cc0000'; //Red when the cell for this model group and agent has at least one module in critical state and the rest in any state.
|
||||
$color = '#FC4444'; //Red when the cell for this model group and agent has at least one module in critical state and the rest in any state.
|
||||
$font_color = '#ffffff';
|
||||
}
|
||||
elseif (array_key_exists(2, $states)) {
|
||||
$color = '#fce94f'; //Yellow when the cell for this model group and agent has at least one in warning state and the rest in green state.
|
||||
$color = '#FAD403'; //Yellow when the cell for this model group and agent has at least one in warning state and the rest in green state.
|
||||
}
|
||||
elseif (array_key_exists(3, $states)) {
|
||||
$color = '#babdb6'; //Grey when the cell for this model group and agent has at least one module in unknown state and the rest in any state.
|
||||
$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.
|
||||
}
|
||||
elseif (array_key_exists(0, $states)) {
|
||||
$color = '#8ae234'; //Green when the cell for this model group and agent has OK state all modules.
|
||||
$color = '#80BA27'; //Green when the cell for this model group and agent has OK state all modules.
|
||||
}
|
||||
elseif (array_key_exists(5, $states)) {
|
||||
$color = '#729fcf'; // Blue when the cell for this module group and all modules have not init value.
|
||||
$color = '#5BB6E5'; // Blue when the cell for this module group and all modules have not init value.
|
||||
}
|
||||
|
||||
|
||||
$alinkStart = '<a class="info_cell" rel="ajax.php?page=extensions/module_groups&get_info_alert_module_group=1&module_group=' . $idModelGroup . '&id_agent_group=' . $idAgentGroup . '"
|
||||
href="index.php?sec=estado&sec2=operation/agentes/status_monitor&status=-1&ag_group=' . $idAgentGroup .
|
||||
'&modulegroup=' . $idModelGroup . '" style="color: ' . $font_color . '; font-size: 18px;";>';
|
||||
$alinkStart = '<a class="info_cell" rel="ajax.php?page=extensions/module_groups&get_info_alert_module_group=1&module_group=' .
|
||||
$idModelGroup . '&id_agent_group=' . $idAgentGroup . '"href="index.php?sec=estado&sec2=operation/agentes/status_monitor&status=-1&ag_group=' .
|
||||
$idAgentGroup . '&modulegroup=' . $idModelGroup . '" style="color: ' . $font_color . '; font-size: 18px;";>';
|
||||
$alinkEnd = '</a>';
|
||||
}
|
||||
|
||||
|
@ -284,13 +286,13 @@ function mainModuleGroups() {
|
|||
array_push($tableData,$row);
|
||||
}
|
||||
$table->data = $tableData;
|
||||
echo "<div style='width:98%; overflow-x:auto;'>";
|
||||
echo "<div style='width:100%; overflow-x:auto;'>";
|
||||
html_print_table($table);
|
||||
echo "</div>";
|
||||
|
||||
echo "<div class='legend_basic' style='width: 94%'>";
|
||||
echo "<div class='legend_basic' style='width: 98.6%'>";
|
||||
|
||||
echo "<table>";
|
||||
echo "<table >";
|
||||
echo "<tr><td colspan='2' style='padding-bottom: 10px;'><b>" . __('Legend') . "</b></td></tr>";
|
||||
echo "<tr><td class='legend_square_simple'><div style='background-color: " . COL_ALERTFIRED . ";'></div></td><td>" . __("Orange cell when the module group and agent have at least one alarm fired.") . "</td></tr>";
|
||||
echo "<tr><td class='legend_square_simple'><div style='background-color: " . COL_CRITICAL . ";'></div></td><td>" . __("Red cell when the module group and agent have at least one module in critical status and the others in any status") . "</td></tr>";
|
||||
|
|
|
@ -101,12 +101,12 @@ function main_net_tools () {
|
|||
function mostrarColumns(ValueSelect){
|
||||
value = ValueSelect.value;
|
||||
if ( value==3 ) {
|
||||
document.getElementById('netToolTable').width='100%';
|
||||
document.getElementById('snmpcolumn').style.display='block';
|
||||
$('netToolTable').css('width','100%');
|
||||
$('#snmpcolumn').show();
|
||||
}
|
||||
else{
|
||||
document.getElementById('netToolTable').width='100%';
|
||||
document.getElementById('snmpcolumn').style.display='none';
|
||||
$('netToolTable').css('width','100%');
|
||||
$('#snmpcolumn').hide();
|
||||
}
|
||||
}
|
||||
</script>";
|
||||
|
@ -143,7 +143,7 @@ function main_net_tools () {
|
|||
echo __("SNMP Community") . " ";
|
||||
echo "<input name=community type=text value='public'>";
|
||||
echo "</td><td>";
|
||||
echo "<input name=submit type=submit class='sub next' value='".__('Execute')."'>";
|
||||
echo "<input style='margin:0px;' name=submit type=submit class='sub next' value='".__('Execute')."'>";
|
||||
echo "</td>";
|
||||
echo "</tr></table>";
|
||||
echo "</form>";
|
||||
|
|
|
@ -42,9 +42,9 @@ function pandora_realtime_graphs () {
|
|||
$canvas .= '</div>';
|
||||
echo $canvas;
|
||||
|
||||
$table->width = '99%';
|
||||
$table->width = '100%';
|
||||
$table->id = 'table-form';
|
||||
$table->class = 'databox';
|
||||
$table->class = 'databox filters';
|
||||
$table->style = array ();
|
||||
$table->style[0] = 'font-weight: bold;';
|
||||
$table->style[1] = 'font-weight: bold;';
|
||||
|
@ -62,7 +62,7 @@ function pandora_realtime_graphs () {
|
|||
$graph = get_parameter('graph', 'cpu_load');
|
||||
$refresh = get_parameter('refresh', '1000');
|
||||
|
||||
$data['graph'] = __('Graph') . '<br>' . html_print_select ($graph_fields, 'graph', $graph, '', '', 0, true);
|
||||
$data['graph'] = __('Graph') . ' ' . html_print_select ($graph_fields, 'graph', $graph, '', '', 0, true);
|
||||
$data['reset'] = html_print_button(__('Clear graph'), 'reset', false, 'clearGraph()', 'class="sub delete"', true);
|
||||
|
||||
$refresh_fields[1000] = human_time_description_raw(1, true, 'large');
|
||||
|
@ -70,8 +70,8 @@ function pandora_realtime_graphs () {
|
|||
$refresh_fields[10000] = human_time_description_raw(10, true, 'large');
|
||||
$refresh_fields[30000] = human_time_description_raw(30, true, 'large');
|
||||
|
||||
$data['refresh'] = __('Refresh interval') . '<br>' . html_print_select ($refresh_fields, 'refresh', $refresh, '', '', 0, true);
|
||||
$data['incremental'] = __('Incremental') . '<br>' . html_print_checkbox ('incremental', 1, 0, true);
|
||||
$data['refresh'] = __('Refresh interval') . ' ' . html_print_select ($refresh_fields, 'refresh', $refresh, '', '', 0, true);
|
||||
$data['incremental'] = __('Incremental') . ' ' . html_print_checkbox ('incremental', 1, 0, true);
|
||||
|
||||
$table->data[] = $data;
|
||||
|
||||
|
@ -85,10 +85,10 @@ function pandora_realtime_graphs () {
|
|||
|
||||
$data = array();
|
||||
|
||||
$data['snmp_address'] = __('Target IP') . '<br>' . html_print_input_text ('ip_target', $snmp_address, '', 50, 255, true);
|
||||
$data['snmp_address'] = __('Target IP') . ' ' . html_print_input_text ('ip_target', $snmp_address, '', 50, 255, true);
|
||||
$table->colspan[1]['snmp_address'] = 2;
|
||||
|
||||
$data['snmp_community'] = __('Community') . '<br>' . html_print_input_text ('snmp_community', $snmp_community, '', 50, 255, true);
|
||||
$data['snmp_community'] = __('Community') . ' ' . html_print_input_text ('snmp_community', $snmp_community, '', 50, 255, true);
|
||||
$table->colspan[1]['snmp_community'] = 2;
|
||||
|
||||
$table->data[] = $data;
|
||||
|
@ -99,12 +99,11 @@ function pandora_realtime_graphs () {
|
|||
$snmp_versions['2c'] = '2c';
|
||||
|
||||
$data = array();
|
||||
$data['snmp_oid'] = __('OID') . '<br>' . html_print_input_text ('snmp_oid', $snmp_oid, '', 100, 255, true);
|
||||
$data['snmp_oid'] .= html_print_button (__('SNMP walk'), 'snmp_walk', false, 'snmpBrowserWindow()', 'class="sub next"', true);
|
||||
$data['snmp_oid'] = __('OID') . ' ' . html_print_input_text ('snmp_oid', $snmp_oid, '', 100, 255, true);
|
||||
$table->colspan[2]['snmp_oid'] = 2;
|
||||
|
||||
$data['snmp_ver'] = __('Version') . '<br>' . html_print_select ($snmp_versions, 'snmp_version', $snmp_ver, '', '', 0, true);
|
||||
|
||||
$data['snmp_ver'] = __('Version') . ' ' . html_print_select ($snmp_versions, 'snmp_version', $snmp_ver, '', '', 0, true);
|
||||
$data['snmp_ver'] .= ' ' . html_print_button (__('SNMP walk'), 'snmp_walk', false, 'snmpBrowserWindow()', 'class="sub next"', true);
|
||||
$table->colspan[2]['snmp_ver'] = 2;
|
||||
|
||||
$table->data[] = $data;
|
||||
|
|
|
@ -39,7 +39,7 @@ if (tags_has_user_acl_tags()) {
|
|||
<table border="0" width="100%">
|
||||
<tr>
|
||||
|
||||
<td width="30%" style="padding-right: 10px;" valign="top">
|
||||
<td width="25%" style="padding-right: 20px;" valign="top">
|
||||
|
||||
|
||||
<?php
|
||||
|
@ -54,7 +54,7 @@ if (tags_has_user_acl_tags()) {
|
|||
$table->cellspacing = 4;
|
||||
$table->head = array ();
|
||||
$table->data = array ();
|
||||
$table->style[0] = 'text-align:center;';
|
||||
$table->headstyle[0] = 'text-align:center;';
|
||||
$table->width = "100%";
|
||||
$table->head[0] = '<span>' . __('Pandora FMS Overview') . '</span>';
|
||||
$table->head_colspan[0] = 4;
|
||||
|
@ -103,7 +103,7 @@ if (tags_has_user_acl_tags()) {
|
|||
|
||||
</td>
|
||||
|
||||
<td width="70%" valign="top">
|
||||
<td width="75%" valign="top">
|
||||
|
||||
|
||||
<?php
|
||||
|
|
|
@ -216,7 +216,7 @@ if ($id_agente) {
|
|||
}
|
||||
</style>
|
||||
<?php
|
||||
$table->rowspan[1][2] = 7;
|
||||
$table->rowspan[1][2] = 3;
|
||||
if ($id_agente) {
|
||||
$table->data[1][2] =
|
||||
"<a id='qr_code_agent_view' href='javascript: show_dialog_qrcode(null, \"" .
|
||||
|
|
|
@ -252,6 +252,6 @@ if (!empty ($table->data)) {
|
|||
unset ($table);
|
||||
}
|
||||
else {
|
||||
echo '<div class="nf">No modules</div>';
|
||||
ui_print_empty_data ( __('No modules') ) ;
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -355,6 +355,26 @@ if ($id_agente) {
|
|||
. html_print_image ("images/wand_agent.png", true, array ( "title" => __('Agent wizard')))
|
||||
. '</a>';
|
||||
|
||||
// Hidden subtab layer
|
||||
$agent_wizard['sub_menu'] .= '<ul class="mn subsubmenu" style="display:none; float:none;">';
|
||||
$agent_wizard['sub_menu'] .= '<li class="nomn tab_godmode" style="text-align: center;">';
|
||||
$agent_wizard['sub_menu'] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=agent_wizard&wizard_section=snmp_explorer&id_agente='.$id_agente.'">'
|
||||
. html_print_image ("images/wand_snmp.png", true, array ( "title" => __('SNMP Wizard')))
|
||||
. '</a>';
|
||||
$agent_wizard['sub_menu'] .= '</li>';
|
||||
$agent_wizard['sub_menu'] .= '<li class="nomn tab_godmode" style="text-align: center;">';
|
||||
$agent_wizard['sub_menu'] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=agent_wizard&wizard_section=snmp_interfaces_explorer&id_agente='.$id_agente.'">'
|
||||
. html_print_image ("images/wand_interfaces.png", true, array ( "title" => __('SNMP Interfaces wizard')))
|
||||
. '</a>';
|
||||
$agent_wizard['sub_menu'] .= '</li>';
|
||||
$agent_wizard['sub_menu'] .= '<li class="nomn tab_godmode" style="text-align: center;">';
|
||||
$agent_wizard['sub_menu'] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=agent_wizard&wizard_section=wmi_explorer&id_agente='.$id_agente.'">'
|
||||
. html_print_image ("images/wand_wmi.png", true, array ( "title" => __('WMI Wizard')))
|
||||
. '</a>';
|
||||
$agent_wizard['sub_menu'] .= '</li>';
|
||||
$agent_wizard['sub_menu'] .= '</ul>';
|
||||
|
||||
|
||||
if ($tab == "agent_wizard")
|
||||
$agent_wizard['active'] = true;
|
||||
else
|
||||
|
@ -1539,31 +1559,8 @@ switch ($tab) {
|
|||
break;
|
||||
}
|
||||
|
||||
// Hidden subtab layer
|
||||
echo '<div id="agent_wizard_subtabs">';
|
||||
echo '<ul class="mn subsubmenu" style="background: #555555;">';
|
||||
|
||||
echo '<li class="nomn tab_godmode" style="text-align: center;">';
|
||||
echo '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=agent_wizard&wizard_section=snmp_explorer&id_agente='.$id_agente.'">'
|
||||
. html_print_image ("images/wand_snmp.png", true, array ( "title" => __('SNMP Wizard')))
|
||||
. '</a>';
|
||||
echo '<li>';
|
||||
|
||||
echo '<li class="nomn tab_godmode" style="text-align: center;">';
|
||||
echo '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=agent_wizard&wizard_section=snmp_interfaces_explorer&id_agente='.$id_agente.'">'
|
||||
. html_print_image ("images/wand_interfaces.png", true, array ( "title" => __('SNMP Interfaces wizard')))
|
||||
. '</a>';
|
||||
echo '<li>';
|
||||
|
||||
echo '<li class="nomn tab_godmode" style="text-align: center;">';
|
||||
echo '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=agent_wizard&wizard_section=wmi_explorer&id_agente='.$id_agente.'">'
|
||||
. html_print_image ("images/wand_wmi.png", true, array ( "title" => __('WMI Wizard')))
|
||||
. '</a>';
|
||||
echo '<li>';
|
||||
|
||||
echo '</ul>';
|
||||
echo '</div>';
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* <![CDATA[ */
|
||||
var wizard_tab_showed = 0;
|
||||
|
@ -1572,23 +1569,23 @@ echo '</div>';
|
|||
// Control the tab and subtab hover. When mouse leave one,
|
||||
// check if is hover the other before hide the subtab
|
||||
$('.agent_wizard_tab').hover(agent_wizard_tab_show, agent_wizard_tab_hide);
|
||||
|
||||
$('#agent_wizard_subtabs').hover(agent_wizard_tab_show, agent_wizard_tab_hide);
|
||||
|
||||
});
|
||||
|
||||
// Set the position and width of the subtab
|
||||
/*
|
||||
function agent_wizard_tab_setup() {
|
||||
$('#agent_wizard_subtabs').css('left', $('.agent_wizard_tab').offset().left-5)
|
||||
$('#agent_wizard_subtabs').css('top', $('.agent_wizard_tab').offset().top + $('.agent_wizard_tab').height() + 7)
|
||||
$('#agent_wizard_subtabs').css('width', $('.agent_wizard_tab').width() + 19)
|
||||
}
|
||||
|
||||
*/
|
||||
function agent_wizard_tab_show() {
|
||||
agent_wizard_tab_setup();
|
||||
|
||||
wizard_tab_showed = wizard_tab_showed + 1;
|
||||
|
||||
if(wizard_tab_showed == 1) {
|
||||
$('#agent_wizard_subtabs').show("fast");
|
||||
$('.subsubmenu').show("fast");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1597,14 +1594,10 @@ echo '</div>';
|
|||
|
||||
setTimeout(function() {
|
||||
if(wizard_tab_showed <= 0) {
|
||||
$('#agent_wizard_subtabs').hide("fast");
|
||||
$('.subsubmenu').hide("fast");
|
||||
}
|
||||
},500);
|
||||
},1500);
|
||||
}
|
||||
|
||||
$(window).resize(function() {
|
||||
agent_wizard_tab_setup();
|
||||
});
|
||||
|
||||
/* ]]> */
|
||||
</script>
|
||||
|
|
|
@ -126,7 +126,7 @@ if (($policy_page) || (isset($agent))) {
|
|||
echo "</table>";
|
||||
echo "</form>";
|
||||
|
||||
echo '<div style="text-align: right; width: 100%;">';
|
||||
echo '<div style="text-align: right; width: 100%;padding-top:10px;padding-bottom:10px">';
|
||||
echo "<strong>";
|
||||
echo "<a style='color: #004A1B;' target='_blank' href='http://pandorafms.com/Library/Library/'>".__("Get more modules in Pandora FMS Library")."</a>";
|
||||
echo "</strong>";
|
||||
|
@ -478,7 +478,7 @@ $total_modules = db_get_value_sql($sql_total_modules);
|
|||
$total_modules = isset ($total_modules) ? $total_modules : 0;
|
||||
|
||||
if ($modules === false) {
|
||||
echo "<div class='nf'>" . __('No available data to show') . "</div>";
|
||||
ui_print_empty_data ( __('No available data to show') );
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -674,7 +674,7 @@ if (isset($data)) {
|
|||
html_print_table ($table);
|
||||
}
|
||||
else {
|
||||
echo "<div class='nf'>" . __('No alerts defined') . "</div>";
|
||||
ui_print_empty_data ( __('No alerts defined') );
|
||||
}
|
||||
|
||||
// Create alert button
|
||||
|
|
|
@ -27,7 +27,7 @@ $menu_godmode['class'] = 'godmode';
|
|||
if (check_acl ($config['id_user'], 0, "AW") || check_acl ($config['id_user'], 0, "AD")) {
|
||||
$menu_godmode["gagente"]["text"] = __('Resources');
|
||||
$menu_godmode["gagente"]["sec2"] = "godmode/agentes/modificar_agente";
|
||||
$menu_godmode["gagente"]["id"] = "god-agents";
|
||||
$menu_godmode["gagente"]["id"] = "god-resources";
|
||||
|
||||
if (check_acl ($config['id_user'], 0, "AW")) {
|
||||
$sub = array ();
|
||||
|
@ -86,7 +86,7 @@ if (check_acl ($config['id_user'], 0, "UM")) {
|
|||
if (check_acl ($config['id_user'], 0, "PM")) {
|
||||
$menu_godmode["gmodules"]["text"] = __('Configuration');
|
||||
$menu_godmode["gmodules"]["sec2"] = "godmode/modules/manage_network_templates";
|
||||
$menu_godmode["gmodules"]["id"] = "god-modules";
|
||||
$menu_godmode["gmodules"]["id"] = "god-configuration";
|
||||
|
||||
$sub = array ();
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@ if ($servers === false) {
|
|||
}
|
||||
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->size = array ();
|
||||
|
||||
$table->style = array ();
|
||||
|
@ -46,10 +47,12 @@ $table->style[0] = 'font-weight: bold';
|
|||
$table->align = array ();
|
||||
$table->align[1] = 'center';
|
||||
$table->align[3] = 'center';
|
||||
$table->align[4] = 'center';
|
||||
$table->align[5] = 'center';
|
||||
$table->align[8] = 'center';
|
||||
|
||||
$table->headstyle[1] = 'text-align:center';
|
||||
$table->headstyle[3] = 'text-align:center';
|
||||
$table->headstyle[8] = 'text-align:center';
|
||||
|
||||
//$table->title = __('Tactical server information');
|
||||
$table->titleclass = 'tabletitle';
|
||||
$table->titlestyle = 'text-transform:uppercase;';
|
||||
|
@ -74,7 +77,7 @@ $table->data = array ();
|
|||
|
||||
foreach ($servers as $server) {
|
||||
$data = array ();
|
||||
|
||||
$table->cellclass[][3] = "progress_bar";
|
||||
$data[0] = '<span title="' . $server['version'] . '">' .
|
||||
$server['name'] . '</span>';
|
||||
|
||||
|
@ -100,12 +103,12 @@ foreach ($servers as $server) {
|
|||
$data[5] = 'N/A';
|
||||
break;
|
||||
case "export":
|
||||
$data[3] = progress_bar($server["load"], 60, 20, $server["lag_txt"], 0);
|
||||
$data[3] = progress_bar($server["load"], 100, 10, $server["lag_txt"], 0);
|
||||
$data[4] = $server["modules"] . " ".__('of')." ". $server["modules_total"];
|
||||
$data[5] = 'N/A';
|
||||
break;
|
||||
default:
|
||||
$data[3] = progress_bar($server["load"], 60, 20, $server["lag_txt"], 0);
|
||||
$data[3] = progress_bar($server["load"], 100, 10, $server["lag_txt"], 0);
|
||||
$data[4] = $server["modules"] . " ".__('of')." ". $server["modules_total"];
|
||||
$data[5] = '<span style="white-space:nowrap;">' .
|
||||
$server["lag_txt"] . '</span>';
|
||||
|
@ -153,6 +156,7 @@ foreach ($servers as $server) {
|
|||
unset($data[8]);
|
||||
}
|
||||
array_push ($table->data, $data);
|
||||
|
||||
}
|
||||
|
||||
if ($tiny) {
|
||||
|
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 447 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 440 B |
After Width: | Height: | Size: 439 B |
After Width: | Height: | Size: 448 B |
After Width: | Height: | Size: 346 B |
After Width: | Height: | Size: 391 B |
After Width: | Height: | Size: 373 B |
After Width: | Height: | Size: 448 B |
After Width: | Height: | Size: 448 B |
After Width: | Height: | Size: 422 B |
After Width: | Height: | Size: 448 B |
After Width: | Height: | Size: 422 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 408 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 430 B |
After Width: | Height: | Size: 348 B |
Before Width: | Height: | Size: 348 B After Width: | Height: | Size: 405 B |
After Width: | Height: | Size: 357 B |
Before Width: | Height: | Size: 324 B After Width: | Height: | Size: 378 B |
After Width: | Height: | Size: 351 B |
Before Width: | Height: | Size: 334 B After Width: | Height: | Size: 415 B |
After Width: | Height: | Size: 474 B |
Before Width: | Height: | Size: 440 B After Width: | Height: | Size: 499 B |
After Width: | Height: | Size: 443 B |
Before Width: | Height: | Size: 434 B After Width: | Height: | Size: 567 B |
After Width: | Height: | Size: 464 B |
After Width: | Height: | Size: 508 B |
After Width: | Height: | Size: 609 B |
Before Width: | Height: | Size: 544 B After Width: | Height: | Size: 683 B |
After Width: | Height: | Size: 344 B |
Before Width: | Height: | Size: 344 B After Width: | Height: | Size: 393 B |
After Width: | Height: | Size: 422 B |
Before Width: | Height: | Size: 383 B After Width: | Height: | Size: 422 B |
After Width: | Height: | Size: 309 B |
After Width: | Height: | Size: 387 B |
Before Width: | Height: | Size: 353 B After Width: | Height: | Size: 387 B |
|
@ -22,7 +22,7 @@
|
|||
/**
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC150415';
|
||||
$build_version = 'PC150417';
|
||||
$pandora_version = 'v6.0dev';
|
||||
|
||||
// Do not overwrite default timezone set if defined.
|
||||
|
|
|
@ -120,13 +120,13 @@ switch ($config["dbtype"]) {
|
|||
|
||||
|
||||
/* Color constants */
|
||||
define('COL_CRITICAL', '#f85858');
|
||||
define('COL_WARNING', '#ffea59');
|
||||
define('COL_CRITICAL', '#FC4444');
|
||||
define('COL_WARNING', '#FAD403');
|
||||
define('COL_WARNING_DARK', '#FFB900');
|
||||
define('COL_NORMAL', '#6EB432');
|
||||
define('COL_NORMAL', '#80BA27');
|
||||
define('COL_NOTINIT', '#3BA0FF');
|
||||
define('COL_UNKNOWN', '#AAAAAA');
|
||||
define('COL_ALERTFIRED', '#FF8800');
|
||||
define('COL_UNKNOWN', '#B2B2B2');
|
||||
define('COL_ALERTFIRED', '#FFA631');
|
||||
define('COL_MINOR', '#F099A2');
|
||||
define('COL_MAJOR', '#C97A4A');
|
||||
define('COL_INFORMATIONAL', '#E4E4E4');
|
||||
|
|
|
@ -815,7 +815,7 @@ function events_create_event ($event, $id_group, $id_agent, $status = 0,
|
|||
*
|
||||
* @return string HTML with table element
|
||||
*/
|
||||
function events_print_event_table ($filter = "", $limit = 10, $width = 440, $return = false, $agent_id = 0) {
|
||||
function events_print_event_table ($filter = "", $limit = 10, $width = 440, $return = false, $agent_id = 0, $tactical_view = false) {
|
||||
global $config;
|
||||
|
||||
if ($agent_id == 0) {
|
||||
|
@ -857,11 +857,12 @@ function events_print_event_table ($filter = "", $limit = 10, $width = 440, $ret
|
|||
}
|
||||
else {
|
||||
$table->id = 'latest_events_table';
|
||||
$table->cellpadding = 4;
|
||||
$table->cellspacing = 4;
|
||||
$table->cellpadding = 0;
|
||||
$table->cellspacing = 0;
|
||||
$table->width = $width;
|
||||
$table->class = "databox";
|
||||
$table->title = __('Latest events');
|
||||
$table->class = "databox data";
|
||||
if (!$tactical_view)
|
||||
$table->title = __('Latest events');
|
||||
$table->titleclass = 'tabletitle';
|
||||
$table->titlestyle = 'text-transform:uppercase;';
|
||||
$table->headclass = array ();
|
||||
|
@ -952,7 +953,7 @@ function events_print_event_table ($filter = "", $limit = 10, $width = 440, $ret
|
|||
$data[2] = events_print_type_img ($event["event_type"], true);
|
||||
|
||||
/* Event text */
|
||||
$data[3] = ui_print_string_substr (io_safe_output($event["evento"]), 75, true, '9');
|
||||
$data[3] = ui_print_string_substr (io_safe_output($event["evento"]), 75, true, '7.5');
|
||||
|
||||
if($agent_id == 0) {
|
||||
if ($event["id_agente"] > 0) {
|
||||
|
@ -960,7 +961,8 @@ function events_print_event_table ($filter = "", $limit = 10, $width = 440, $ret
|
|||
// Get class name, for the link color...
|
||||
$myclass = get_priority_class ($event["criticity"]);
|
||||
|
||||
$data[4] = "<a class='$myclass' href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=".$event["id_agente"]."'>".agents_get_name ($event["id_agente"]). "</A>";
|
||||
$data[4] = "<a class='$myclass' href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=".$event["id_agente"]."'>".
|
||||
agents_get_name ($event["id_agente"]). "</A>";
|
||||
|
||||
// ui_print_agent_name ($event["id_agente"], true, 25, '', true);
|
||||
// for System or SNMP generated alerts
|
||||
|
@ -974,7 +976,7 @@ function events_print_event_table ($filter = "", $limit = 10, $width = 440, $ret
|
|||
}
|
||||
|
||||
// Timestamp
|
||||
$data[5] = ui_print_timestamp ($event["timestamp"], true, array('style' => 'font-size: 8px'));
|
||||
$data[5] = ui_print_timestamp ($event["timestamp"], true, array('style' => 'font-size: 7.5pt; letter-spacing: 0.3pt;'));
|
||||
|
||||
$class = get_priority_class ($event["criticity"]);
|
||||
$cell_classes[3] = $cell_classes[4] = $cell_classes[5] = $class;
|
||||
|
@ -984,35 +986,36 @@ function events_print_event_table ($filter = "", $limit = 10, $width = 440, $ret
|
|||
}
|
||||
|
||||
$events_table = html_print_table ($table, true);
|
||||
$out = '<table width="98%"><tr><td style="width: 90%; padding-right: 10px; vertical-align: top; padding-top: 0px;">';
|
||||
$out = '<table width="100%"><tr><td style="width: 90%; vertical-align: top; padding-top: 0px;">';
|
||||
$out .= $events_table;
|
||||
|
||||
if ($agent_id != 0) {
|
||||
$out .= '</td><td style="width: 200px; vertical-align: top;">';
|
||||
$out .= '<table cellpadding=0 cellspacing=0 class="databox"><tr><td>';
|
||||
$out .= '<fieldset class="databox tactical_set">
|
||||
<legend>' .
|
||||
__('Events -by module-') .
|
||||
'</legend>' .
|
||||
graph_event_module (180, 100, $event['id_agente']) . '</fieldset>';
|
||||
$out .= '</td></tr></table>';
|
||||
if (!$tactical_view) {
|
||||
if ($agent_id != 0) {
|
||||
$out .= '</td><td style="width: 200px; vertical-align: top;">';
|
||||
$out .= '<table cellpadding=0 cellspacing=0 class="databox"><tr><td>';
|
||||
$out .= '<fieldset class="databox tactical_set">
|
||||
<legend>' .
|
||||
__('Events -by module-') .
|
||||
'</legend>' .
|
||||
graph_event_module (180, 100, $event['id_agente']) . '</fieldset>';
|
||||
$out .= '</td></tr></table>';
|
||||
}
|
||||
else {
|
||||
$out .= '</td><td style="width: 200px; vertical-align: top;">';
|
||||
$out .= '<table cellpadding=0 cellspacing=0 class="databox"><tr><td>';
|
||||
$out .= '<fieldset class="databox tactical_set">
|
||||
<legend>' .
|
||||
__('Event graph') .
|
||||
'</legend>' .
|
||||
grafico_eventos_total("", 180, 60) . '</fieldset>';
|
||||
$out .= '<fieldset class="databox tactical_set">
|
||||
<legend>' .
|
||||
__('Event graph by agent') .
|
||||
'</legend>' .
|
||||
grafico_eventos_grupo(180, 60) . '</fieldset>';
|
||||
$out .= '</td></tr></table>';
|
||||
}
|
||||
}
|
||||
else {
|
||||
$out .= '</td><td style="width: 200px; vertical-align: top;">';
|
||||
$out .= '<table cellpadding=0 cellspacing=0 class="databox"><tr><td>';
|
||||
$out .= '<fieldset class="databox tactical_set">
|
||||
<legend>' .
|
||||
__('Event graph') .
|
||||
'</legend>' .
|
||||
grafico_eventos_total("", 180, 60) . '</fieldset>';
|
||||
$out .= '<fieldset class="databox tactical_set">
|
||||
<legend>' .
|
||||
__('Event graph by agent') .
|
||||
'</legend>' .
|
||||
grafico_eventos_grupo(180, 60) . '</fieldset>';
|
||||
$out .= '</td></tr></table>';
|
||||
}
|
||||
|
||||
$out .= '</td></tr></table>';
|
||||
|
||||
unset ($table);
|
||||
|
|
|
@ -2341,7 +2341,7 @@ function graph_events_validated($width = 300, $height = 200, $url = "", $meta =
|
|||
* @param bool if the graph required is or not for metaconsole
|
||||
* @param bool if the graph required is or not for history table
|
||||
*/
|
||||
function grafico_eventos_grupo ($width = 300, $height = 200, $url = "", $meta = false, $history = false) {
|
||||
function grafico_eventos_grupo ($width = 300, $height = 200, $url = "", $meta = false, $history = false, $noWaterMark = true) {
|
||||
global $config;
|
||||
global $graphic_type;
|
||||
|
||||
|
@ -2463,9 +2463,10 @@ function grafico_eventos_grupo ($width = 300, $height = 200, $url = "", $meta =
|
|||
|
||||
// Sort the data
|
||||
arsort($data);
|
||||
|
||||
$water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png",
|
||||
'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false));
|
||||
if ($noWaterMark) {
|
||||
$water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png",
|
||||
'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false));
|
||||
}
|
||||
|
||||
return pie3d_graph($config['flash_charts'], $data, $width, $height,
|
||||
__('Other'), '', $water_mark,
|
||||
|
@ -2538,7 +2539,7 @@ function grafico_eventos_agente ($width = 300, $height = 200, $result = false, $
|
|||
*
|
||||
* @param string filter Filter for query in DB
|
||||
*/
|
||||
function grafico_eventos_total($filter = "", $width = 320, $height = 200) {
|
||||
function grafico_eventos_total($filter = "", $width = 320, $height = 200, $noWaterMark = true) {
|
||||
global $config;
|
||||
global $graphic_type;
|
||||
|
||||
|
@ -2595,10 +2596,11 @@ function grafico_eventos_total($filter = "", $width = 320, $height = 200) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$water_mark = array(
|
||||
'file' => $config['homedir'] . "/images/logo_vertical_water.png",
|
||||
'url' => ui_get_full_url("/images/logo_vertical_water.png", false, false, false));
|
||||
if ($noWaterMark) {
|
||||
$water_mark = array(
|
||||
'file' => $config['homedir'] . "/images/logo_vertical_water.png",
|
||||
'url' => ui_get_full_url("/images/logo_vertical_water.png", false, false, false));
|
||||
}
|
||||
|
||||
return pie3d_graph($config['flash_charts'], $data, $width, $height,
|
||||
__('Other'), '', $water_mark,
|
||||
|
@ -2897,6 +2899,7 @@ function grafico_modulo_boolean_data ($agent_module_id, $period, $show_events,
|
|||
if ($uncompressed_module) {
|
||||
$avg_only = 1;
|
||||
}
|
||||
$search_in_history_db = db_search_in_history_db($datelimit);
|
||||
|
||||
// Get event data (contains alert data too)
|
||||
if ($show_unknown == 1 || $show_events == 1 || $show_alerts == 1) {
|
||||
|
@ -3609,6 +3612,7 @@ function grafico_modulo_string ($agent_module_id, $period, $show_events,
|
|||
if ($uncompressed_module) {
|
||||
$avg_only = 1;
|
||||
}
|
||||
$search_in_history_db = db_search_in_history_db($datelimit);
|
||||
|
||||
// Get event data (contains alert data too)
|
||||
if ($show_events == 1 || $show_alerts == 1) {
|
||||
|
|
|
@ -32,6 +32,7 @@ function menu_print_menu (&$menu) {
|
|||
|
||||
$sec = (string) get_parameter ('sec');
|
||||
$sec2 = (string) get_parameter ('sec2');
|
||||
$menu_selected = false;
|
||||
|
||||
$allsec2 = explode('sec2=', $_SERVER['REQUEST_URI']);
|
||||
if (isset($allsec2[1])) {
|
||||
|
@ -206,7 +207,7 @@ function menu_print_menu (&$menu) {
|
|||
//This is an external link
|
||||
$submenu_output .= '<li id="'. str_replace(' ','_',$sub["text"]) . '" class="'.$class.'">';
|
||||
|
||||
if (isset ($sub["type"]) && $sub["subtype"] == "nolink") {
|
||||
if (isset ($sub["subtype"]) && $sub["subtype"] == "nolink") {
|
||||
$submenu_output .= '<div class="flecha"><div class=" SubNoLink ' . $sub_tree_class . '">'.$sub["text"].'</div></div>';
|
||||
}
|
||||
else
|
||||
|
@ -321,9 +322,10 @@ function menu_print_menu (&$menu) {
|
|||
|
||||
if (isset($sub2['title']))
|
||||
$sub_title = $sub2['title'];
|
||||
|
||||
$submenu2_list .= '<li class="'.$class.'" style="font-weight: normal;">';
|
||||
$submenu2_list .= '<a style="font-weight:normal;" href="'.$link.'"><div class="' . $sub_tree_class . '" title="' . $sub_title . '" >'.
|
||||
else
|
||||
$sub_title = '';
|
||||
$submenu2_list .= '<li class="'.$class.'" style="">';
|
||||
$submenu2_list .= '<a href="'.$link.'"><div class="' . $sub_tree_class . '" title="' . $sub_title . '" >'.
|
||||
$sub2["text"].'</div></a></li>';
|
||||
$sub_title = '';
|
||||
}
|
||||
|
|
|
@ -1645,6 +1645,23 @@ function modules_get_agentmodule_data ($id_agent_module, $period,
|
|||
$values[$key]["agent_name"] = $agent_name;
|
||||
}
|
||||
|
||||
if ($search_in_history_db) {
|
||||
$datos = array();
|
||||
foreach ($values as $key => $value) {
|
||||
$utimestamp[$key] = $value['utimestamp'];
|
||||
}
|
||||
|
||||
array_multisort($utimestamp, SORT_DESC, $values);
|
||||
foreach ($utimestamp as $key => $utimes) {
|
||||
$datos[$key] = array('utimestamp'=>$utimes,
|
||||
'data'=>$values[$key]["data"],
|
||||
'module_name'=>$values[$key]["module_name"],
|
||||
'agent_id'=>$values[$key]["agent_id"],
|
||||
'agent_name'=>$values[$key]["agent_name"]
|
||||
);
|
||||
}
|
||||
$values = $datos;
|
||||
}
|
||||
return $values;
|
||||
}
|
||||
|
||||
|
|
|
@ -400,6 +400,7 @@ function reporting_get_agentmodule_data_sum ($id_agent_module,
|
|||
return $total;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get SLA of a module.
|
||||
*
|
||||
|
@ -416,7 +417,7 @@ function reporting_get_agentmodule_data_sum ($id_agent_module,
|
|||
* @return float SLA percentage of the requested module. False if no data were
|
||||
* found
|
||||
*/
|
||||
function reporting_get_agentmodule_sla ($id_agent_module, $period = 0, $min_value = 1, $max_value = false, $date = 0, $daysWeek = null, $timeFrom = null, $timeTo = null) {
|
||||
function reporting_get_agentmodule_sla_day ($id_agent_module, $period = 0, $min_value = 1, $max_value = false, $date = 0, $daysWeek = null, $timeFrom = null, $timeTo = null) {
|
||||
global $config;
|
||||
|
||||
if (empty($id_agent_module))
|
||||
|
@ -494,6 +495,7 @@ function reporting_get_agentmodule_sla ($id_agent_module, $period = 0, $min_valu
|
|||
|
||||
// Get previous data
|
||||
$previous_data = modules_get_previous_data ($id_agent_module, $datelimit);
|
||||
|
||||
if ($previous_data !== false) {
|
||||
$previous_data['utimestamp'] = $datelimit;
|
||||
array_unshift ($interval_data, $previous_data);
|
||||
|
@ -501,6 +503,7 @@ function reporting_get_agentmodule_sla ($id_agent_module, $period = 0, $min_valu
|
|||
|
||||
// Get next data
|
||||
$next_data = modules_get_next_data ($id_agent_module, $date);
|
||||
|
||||
if ($next_data !== false) {
|
||||
$next_data['utimestamp'] = $date;
|
||||
array_push ($interval_data, $next_data);
|
||||
|
@ -541,6 +544,8 @@ function reporting_get_agentmodule_sla ($id_agent_module, $period = 0, $min_valu
|
|||
$previous_status = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
foreach ($interval_data as $data) {
|
||||
// Previous status was critical
|
||||
if ($previous_status == 1) {
|
||||
|
@ -570,6 +575,226 @@ function reporting_get_agentmodule_sla ($id_agent_module, $period = 0, $min_valu
|
|||
// Return the percentage of SLA compliance
|
||||
return (float) (100 - ($bad_period / $period) * 100);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get SLA of a module.
|
||||
*
|
||||
* @param int Agent module to calculate SLA
|
||||
* @param int Period to check the SLA compliance.
|
||||
* @param int Minimum data value the module in the right interval
|
||||
* @param int Maximum data value the module in the right interval. False will
|
||||
* ignore max value
|
||||
* @param int Beginning date of the report in UNIX time (current date by default).
|
||||
* @param array $dayWeek Array of days week to extract as array('monday' => false, 'tuesday' => true....), and by default is null.
|
||||
* @param string $timeFrom Time in the day to start to extract in mysql format, by default null.
|
||||
* @param string $timeTo Time in the day to end to extract in mysql format, by default null.
|
||||
*
|
||||
* @return float SLA percentage of the requested module. False if no data were
|
||||
* found
|
||||
*/
|
||||
function reporting_get_agentmodule_sla ($id_agent_module, $period = 0,
|
||||
$min_value = 1, $max_value = false, $date = 0, $daysWeek = null,
|
||||
$timeFrom = null, $timeTo = null) {
|
||||
|
||||
global $config;
|
||||
|
||||
if (empty($id_agent_module))
|
||||
return false;
|
||||
|
||||
// Set initial conditions
|
||||
$bad_period = 0;
|
||||
// Limit date to start searching data
|
||||
$datelimit = $date - $period;
|
||||
$search_in_history_db = db_search_in_history_db($datelimit);
|
||||
|
||||
// Initialize variables
|
||||
if (empty ($date)) {
|
||||
$date = get_system_time ();
|
||||
}
|
||||
if ($daysWeek === null) {
|
||||
$daysWeek = array();
|
||||
}
|
||||
|
||||
|
||||
// Calculate the SLA for large time without hours
|
||||
if ($timeFrom == $timeTo) {
|
||||
// Get interval data
|
||||
$sql = sprintf ('SELECT *
|
||||
FROM tagente_datos
|
||||
WHERE id_agente_modulo = %d
|
||||
AND utimestamp > %d AND utimestamp <= %d',
|
||||
$id_agent_module, $datelimit, $date);
|
||||
|
||||
//Add the working times (mon - tue - wed ...) and from time to time
|
||||
$days = array();
|
||||
//Translate to mysql week days
|
||||
if ($daysWeek) {
|
||||
foreach ($daysWeek as $key => $value) {
|
||||
if (!$value) {
|
||||
if ($key == 'monday') {
|
||||
$days[] = 2;
|
||||
}
|
||||
if ($key == 'tuesday') {
|
||||
$days[] = 3;
|
||||
}
|
||||
if ($key == 'wednesday') {
|
||||
$days[] = 4;
|
||||
}
|
||||
if ($key == 'thursday') {
|
||||
$days[] = 5;
|
||||
}
|
||||
if ($key == 'friday') {
|
||||
$days[] = 6;
|
||||
}
|
||||
if ($key == 'saturday') {
|
||||
$days[] = 7;
|
||||
}
|
||||
if ($key == 'sunday') {
|
||||
$days[] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (count($days) > 0) {
|
||||
$sql .= ' AND DAYOFWEEK(FROM_UNIXTIME(utimestamp)) NOT IN (' . implode(',', $days) . ')';
|
||||
}
|
||||
|
||||
$sql .= "\n";
|
||||
$sql .= ' ORDER BY utimestamp ASC';
|
||||
$interval_data = db_get_all_rows_sql ($sql, $search_in_history_db);
|
||||
|
||||
if ($interval_data === false) {
|
||||
$interval_data = array ();
|
||||
}
|
||||
|
||||
// Calculate planned downtime dates
|
||||
$downtime_dates = reporting_get_planned_downtimes_intervals($id_agent_module, $datelimit, $date);
|
||||
|
||||
// Get previous data
|
||||
$previous_data = modules_get_previous_data ($id_agent_module, $datelimit);
|
||||
|
||||
if ($previous_data !== false) {
|
||||
$previous_data['utimestamp'] = $datelimit;
|
||||
array_unshift ($interval_data, $previous_data);
|
||||
}
|
||||
|
||||
// Get next data
|
||||
$next_data = modules_get_next_data ($id_agent_module, $date);
|
||||
|
||||
if ($next_data !== false) {
|
||||
$next_data['utimestamp'] = $date;
|
||||
array_push ($interval_data, $next_data);
|
||||
}
|
||||
else if (count ($interval_data) > 0) {
|
||||
// Propagate the last known data to the end of the interval
|
||||
$next_data = array_pop ($interval_data);
|
||||
array_push ($interval_data, $next_data);
|
||||
$next_data['utimestamp'] = $date;
|
||||
array_push ($interval_data, $next_data);
|
||||
}
|
||||
|
||||
if (count ($interval_data) < 2) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
$first_data = array_shift ($interval_data);
|
||||
|
||||
// Do not count the empty start of an interval as 0
|
||||
if ($first_data['utimestamp'] != $datelimit) {
|
||||
$period = $date - $first_data['utimestamp'];
|
||||
}
|
||||
|
||||
$previous_utimestamp = $first_data['utimestamp'];
|
||||
if ((($max_value > $min_value AND ($first_data['datos'] > $max_value OR $first_data['datos'] < $min_value))) OR
|
||||
($max_value <= $min_value AND $first_data['datos'] < $min_value)) {
|
||||
|
||||
$previous_status = 1;
|
||||
foreach ($downtime_dates as $date_dt) {
|
||||
if (($date_dt['date_from'] <= $previous_utimestamp) AND ($date_dt['date_to'] >= $previous_utimestamp)) {
|
||||
$previous_status = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
$previous_status = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
foreach ($interval_data as $data) {
|
||||
// Previous status was critical
|
||||
if ($previous_status == 1) {
|
||||
$bad_period += $data['utimestamp'] - $previous_utimestamp;
|
||||
}
|
||||
|
||||
if (array_key_exists('datos', $data)) {
|
||||
// Re-calculate previous status for the next data
|
||||
if ((($max_value > $min_value AND ($data['datos'] > $max_value OR $data['datos'] < $min_value))) OR
|
||||
($max_value <= $min_value AND $data['datos'] < $min_value)) {
|
||||
|
||||
$previous_status = 1;
|
||||
foreach ($downtime_dates as $date_dt) {
|
||||
if (($date_dt['date_from'] <= $data['utimestamp']) AND ($date_dt['date_to'] >= $data['utimestamp'])) {
|
||||
$previous_status = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
$previous_status = 0;
|
||||
}
|
||||
}
|
||||
|
||||
$previous_utimestamp = $data['utimestamp'];
|
||||
}
|
||||
|
||||
// Return the percentage of SLA compliance
|
||||
return (float) (100 - ($bad_period / $period) * 100);
|
||||
}
|
||||
elseif ($period <= SECONDS_1DAY) {
|
||||
|
||||
|
||||
return reporting_get_agentmodule_sla_day(
|
||||
$id_agent_module,
|
||||
$period,
|
||||
$min_value,
|
||||
$max_value,
|
||||
$date,
|
||||
$daysWeek,
|
||||
$timeFrom,
|
||||
$timeTo);
|
||||
}
|
||||
else {
|
||||
// Extract the data each day
|
||||
|
||||
$sla = 0;
|
||||
|
||||
$i = 0;
|
||||
for ($interval = 0; $interval <= $period; $interval = $interval + SECONDS_1DAY) {
|
||||
$datelimit = $date - $interval;
|
||||
|
||||
$sla_day = reporting_get_agentmodule_sla(
|
||||
$id_agent_module,
|
||||
SECONDS_1DAY,
|
||||
$min_value,
|
||||
$max_value,
|
||||
$datelimit + $interval,
|
||||
$daysWeek,
|
||||
$timeFrom, $timeTo);
|
||||
|
||||
|
||||
$sla += $sla_day;
|
||||
$i++;
|
||||
}
|
||||
|
||||
$sla = $sla / $i;
|
||||
|
||||
return $sla;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Get several SLA data for an agentmodule within a period divided on subperiods
|
||||
*
|
||||
|
@ -1288,7 +1513,7 @@ function reporting_get_stats_servers($tiny = true) {
|
|||
$table_srv->style[1] = $table_srv->style[3] = 'text-align: left; padding: 5px;';
|
||||
|
||||
$tdata = array();
|
||||
$tdata[0] = html_print_image('images/module.png', true, array('title' => __('Total running modules'), 'width' => '25px'));
|
||||
$tdata[0] = html_print_image('images/module.png', true, array('title' => __('Total running modules'), ));
|
||||
$tdata[1] = '<span class="big_data">' . format_numeric($server_performance ["total_modules"]) . '</span>';
|
||||
|
||||
$tdata[2] = '<span class="med_data">' . format_numeric($server_performance ["total_modules_rate"], 2) . '</span>';
|
||||
|
@ -1304,7 +1529,7 @@ function reporting_get_stats_servers($tiny = true) {
|
|||
$table_srv->data[] = $tdata;
|
||||
|
||||
$tdata = array();
|
||||
$tdata[0] = html_print_image('images/database.png', true, array('title' => __('Local modules'), 'width' => '25px'));
|
||||
$tdata[0] = html_print_image('images/database.png', true, array('title' => __('Local modules')));
|
||||
$tdata[1] = '<span class="big_data">' . format_numeric($server_performance ["total_local_modules"]) . '</span>';
|
||||
|
||||
$tdata[2] = '<span class="med_data">' .
|
||||
|
@ -1316,7 +1541,7 @@ function reporting_get_stats_servers($tiny = true) {
|
|||
|
||||
if ($tiny) {
|
||||
$tdata = array();
|
||||
$tdata[0] = html_print_image('images/network.png', true, array('title' => __('Remote modules'), 'width' => '25px'));
|
||||
$tdata[0] = html_print_image('images/network.png', true, array('title' => __('Remote modules')));
|
||||
$tdata[1] = '<span class="big_data">' . format_numeric($server_performance ["total_remote_modules"]) . '</span>';
|
||||
|
||||
$tdata[2] = '<span class="med_data">' . format_numeric($server_performance ["remote_modules_rate"], 2) . '</span>';
|
||||
|
@ -1328,7 +1553,7 @@ function reporting_get_stats_servers($tiny = true) {
|
|||
else {
|
||||
if (isset($server_performance ["total_network_modules"])) {
|
||||
$tdata = array();
|
||||
$tdata[0] = html_print_image('images/network.png', true, array('title' => __('Network modules'), 'width' => '25px'));
|
||||
$tdata[0] = html_print_image('images/network.png', true, array('title' => __('Network modules')));
|
||||
$tdata[1] = '<span class="big_data">' . format_numeric($server_performance ["total_network_modules"]) . '</span>';
|
||||
|
||||
$tdata[2] = '<span class="med_data">' .
|
||||
|
@ -1342,7 +1567,7 @@ function reporting_get_stats_servers($tiny = true) {
|
|||
|
||||
if (isset($server_performance ["total_plugin_modules"])) {
|
||||
$tdata = array();
|
||||
$tdata[0] = html_print_image('images/plugin.png', true, array('title' => __('Plugin modules'), 'width' => '25px'));
|
||||
$tdata[0] = html_print_image('images/plugin.png', true, array('title' => __('Plugin modules')));
|
||||
$tdata[1] = '<span class="big_data">' . format_numeric($server_performance ["total_plugin_modules"]) . '</span>';
|
||||
|
||||
$tdata[2] = '<span class="med_data">' . format_numeric($server_performance ["plugin_modules_rate"], 2) . '</span>';
|
||||
|
@ -1354,7 +1579,7 @@ function reporting_get_stats_servers($tiny = true) {
|
|||
|
||||
if (isset($server_performance ["total_prediction_modules"])) {
|
||||
$tdata = array();
|
||||
$tdata[0] = html_print_image('images/chart_bar.png', true, array('title' => __('Prediction modules'), 'width' => '25px'));
|
||||
$tdata[0] = html_print_image('images/chart_bar.png', true, array('title' => __('Prediction modules')));
|
||||
$tdata[1] = '<span class="big_data">' . format_numeric($server_performance ["total_prediction_modules"]) . '</span>';
|
||||
|
||||
$tdata[2] = '<span class="med_data">' . format_numeric($server_performance ["prediction_modules_rate"], 2) . '</span>';
|
||||
|
@ -1366,7 +1591,7 @@ function reporting_get_stats_servers($tiny = true) {
|
|||
|
||||
if (isset($server_performance ["total_wmi_modules"])) {
|
||||
$tdata = array();
|
||||
$tdata[0] = html_print_image('images/wmi.png', true, array('title' => __('WMI modules'), 'width' => '25px'));
|
||||
$tdata[0] = html_print_image('images/wmi.png', true, array('title' => __('WMI modules')));
|
||||
$tdata[1] = '<span class="big_data">' . format_numeric($server_performance ["total_wmi_modules"]) . '</span>';
|
||||
|
||||
$tdata[2] = '<span class="med_data">' . format_numeric($server_performance ["wmi_modules_rate"], 2) . '</span>';
|
||||
|
@ -1378,7 +1603,7 @@ function reporting_get_stats_servers($tiny = true) {
|
|||
|
||||
if (isset($server_performance ["total_web_modules"])) {
|
||||
$tdata = array();
|
||||
$tdata[0] = html_print_image('images/world.png', true, array('title' => __('Web modules'), 'width' => '25px'));
|
||||
$tdata[0] = html_print_image('images/world.png', true, array('title' => __('Web modules')));
|
||||
$tdata[1] = '<span class="big_data">' .
|
||||
format_numeric($server_performance ["total_web_modules"]) .
|
||||
'</span>';
|
||||
|
@ -1417,7 +1642,7 @@ function reporting_get_stats_servers($tiny = true) {
|
|||
|
||||
$tdata = array();
|
||||
$tdata[0] = html_print_image('images/lightning_go.png', true,
|
||||
array('title' => __('Total events'), 'width' => '25px'));
|
||||
array('title' => __('Total events')));
|
||||
$tdata[1] = '<span class="big_data">' .
|
||||
format_numeric($system_events) . '</span>';
|
||||
|
||||
|
|
|
@ -931,7 +931,7 @@ function ui_print_string_substr ($string, $cutoff = 16, $return = false, $fontsi
|
|||
$font_size_mod = "";
|
||||
|
||||
if ($fontsize > 0) {
|
||||
$font_size_mod = "style='font-size: ".$fontsize."px'";
|
||||
$font_size_mod = "style='font-size: ".$fontsize."pt'";
|
||||
}
|
||||
$string = '<span '.$font_size_mod.' title="'.io_safe_input($string2).'">'.mb_substr ($string2, 0, $cutoff, "UTF-8").$string3.'</span>';
|
||||
|
||||
|
@ -2095,6 +2095,9 @@ function ui_toggle($code, $name, $title = '', $hidden_default = true, $return =
|
|||
$output .= '<a href="javascript:" id="tgl_ctrl_'.$uniqid.'">' . html_print_image ($original, true, array ("title" => $title, "id" => "image_".$uniqid)) . ' <b>'.$name.'</b></a>';
|
||||
$output .= '<br />';
|
||||
|
||||
if (!defined("METACONSOLE"))
|
||||
$output .= '<br />';
|
||||
|
||||
// Code into a div
|
||||
$output .= "<div id='tgl_div_".$uniqid."' style='".$style."'>\n";
|
||||
$output .= $code;
|
||||
|
@ -2434,7 +2437,10 @@ function ui_print_page_header ($title, $icon = "", $return = false, $help = "",
|
|||
|
||||
$buffer .= '<li class="' . $class . '">';
|
||||
$buffer .= $option['text'];
|
||||
if (isset($option['sub_menu']))
|
||||
$buffer .= $option['sub_menu'];
|
||||
$buffer .= '</li>';
|
||||
|
||||
}
|
||||
else {
|
||||
$buffer .= '<li class="nomn">';
|
||||
|
|
|
@ -81,36 +81,30 @@ li:hover ul { display: block; }
|
|||
min-height: 35px !important;
|
||||
height: 35px;
|
||||
width: 160px;
|
||||
font-weight: normal !important;
|
||||
}
|
||||
|
||||
.submenu li a {
|
||||
#background-color: #222;
|
||||
#border-style: none;
|
||||
#border-color: #666;
|
||||
.sub_subMenu.selected{
|
||||
font-weight: bold !important;
|
||||
}
|
||||
|
||||
.submenu2 li a {
|
||||
#background-color: #222;
|
||||
margin-left: 0px;
|
||||
padding-left: 0px;
|
||||
display:block;
|
||||
}
|
||||
|
||||
.submenu2 li a:hover {
|
||||
#background-color: #111 !important;
|
||||
}
|
||||
|
||||
.menu li img.toggle {
|
||||
visibility: hidden;
|
||||
float:right;
|
||||
/* Positions it back where it should be */
|
||||
border-left: 1px;
|
||||
}
|
||||
|
||||
.menu li.has_submenu > a > div {
|
||||
background: url(../../images/arrow.png) no-repeat 90% 50%;
|
||||
z-index: 1; /* Positions it on top of the rest */
|
||||
}
|
||||
.menu li.has_submenu .flecha{
|
||||
.menu li.has_submenu .flecha {
|
||||
background: url(../../images/arrow.png) no-repeat 90% 50%;
|
||||
z-index: 1; /* Positions it on top of the rest */
|
||||
}
|
||||
|
@ -119,14 +113,10 @@ li:hover ul { display: block; }
|
|||
background-color: #E4E4E4 !important;
|
||||
}
|
||||
|
||||
.submenu_not_selected a, .submenu2_not_selected a {
|
||||
.menu li.submenu_not_selected a, .menu li.submenu2_not_selected a {
|
||||
font-weight: normal !important;
|
||||
}
|
||||
|
||||
.menu li.submenu_selected a {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.submenu_selected {
|
||||
margin-bottom: 0px !important;
|
||||
box-shadow: inset 4px 0 #80BA27 !important;
|
||||
|
@ -145,90 +135,66 @@ li:hover ul { display: block; }
|
|||
|
||||
/* Icons specified here */
|
||||
#icon_oper-networkconsole {
|
||||
background: url(../../images/op_network.png) no-repeat 50% 50%;
|
||||
background: url(../../images/op_network.menu.png) no-repeat 50% 50%;
|
||||
}
|
||||
#icon_oper-agents {
|
||||
border-top-right-radius: 5px;
|
||||
border-right-style: solid;
|
||||
border-right-width: 0px;
|
||||
background: url(../../images/op_monitoring.png) no-repeat 50% 50%;
|
||||
background: url(../../images/op_monitoring.menu.png) no-repeat 50% 50%;
|
||||
}
|
||||
#icon_oper-events {
|
||||
background: url(../../images/op_events.png) no-repeat 50% 50%;
|
||||
background: url(../../images/op_events.menu.png) no-repeat 50% 50%;
|
||||
}
|
||||
|
||||
/* users */
|
||||
#icon_oper-users {
|
||||
background: url(../../images/op_workspace.png) no-repeat 50% 50%;
|
||||
background: url(../../images/op_workspace.menu.png) no-repeat 50% 50%;
|
||||
}
|
||||
/* trap console */
|
||||
#icon_oper-snmpc, #icon_god-snmpc {
|
||||
background: url(../../images/op_snmp.png) no-repeat 50% 50%;
|
||||
background: url(../../images/op_snmp.menu.png) no-repeat 50% 50%;
|
||||
}
|
||||
#icon_oper-reporting {
|
||||
background: url(../../images/op_reporting.png) no-repeat 50% 50%;
|
||||
background: url(../../images/op_reporting.menu.png) no-repeat 50% 50%;
|
||||
}
|
||||
#icon_oper-gismaps {
|
||||
background: url(../../images/op_gis.png) no-repeat 50% 50%;
|
||||
background: url(../../images/op_gis.menu.png) no-repeat 50% 50%;
|
||||
}
|
||||
#icon_oper-netflow {
|
||||
background: url(../../images/op_netflow.png) no-repeat 50% 50%;
|
||||
background: url(../../images/op_netflow.menu.png) no-repeat 50% 50%;
|
||||
}
|
||||
#icon_oper-extensions, #icon_god-extensions {
|
||||
background: url(../../images/extensions.png) no-repeat 50% 50%;
|
||||
#icon_oper-extensions {
|
||||
background: url(../../images/extensions.menu.png) no-repeat 50% 50%;
|
||||
}
|
||||
|
||||
/* Godmode images */
|
||||
#icon_god-gismaps {
|
||||
background: url(../../images/gm_gis.png) no-repeat 50% 50%;
|
||||
#icon_god-resources {
|
||||
background: url(../../images/gm_resources.menu.png) no-repeat 50% 50%;
|
||||
}
|
||||
#icon_god-agents {
|
||||
background: url(../../images/gm_monitoring.png) no-repeat 50% 50%;
|
||||
}
|
||||
#icon_god-massive {
|
||||
background: url(../../images/gm_massive_operations.png) no-repeat 50% 50%;
|
||||
}
|
||||
#icon_god-services {
|
||||
background: url(../../images/box.png) no-repeat 50% 50%;
|
||||
}
|
||||
#icon_god-modules {
|
||||
background: url(../../images/gm_modules.png) no-repeat 50% 50%;
|
||||
#icon_god-configuration {
|
||||
background: url(../../images/gm_configuration.menu.png) no-repeat 50% 50%;
|
||||
}
|
||||
#icon_god-alerts {
|
||||
background: url(../../images/gm_alerts.png) no-repeat 50% 50%;
|
||||
}
|
||||
#icon_god-dbmaint {
|
||||
background: url(../../images/gm_db.png) no-repeat 50% 50%;
|
||||
background: url(../../images/gm_alerts.menu.png) no-repeat 50% 50%;
|
||||
}
|
||||
#icon_god-users {
|
||||
background: url(../../images/gm_users.png) no-repeat 50% 50%;
|
||||
background: url(../../images/gm_users.menu.png) no-repeat 50% 50%;
|
||||
}
|
||||
#icon_god-reporting {
|
||||
background: url(../../images/reporting_edit.png) no-repeat 50% 50%;
|
||||
background: url(../../images/reporting_edit.menu.png) no-repeat 50% 50%;
|
||||
}
|
||||
#icon_god-servers {
|
||||
background: url(../../images/gm_servers.png) no-repeat 50% 50%;
|
||||
}
|
||||
#icon_god-audit {
|
||||
background: url(../../images/gm_log.png) no-repeat 50% 50%;
|
||||
}
|
||||
#icon_god-netflow {
|
||||
background: url(../../images/gm_netflow.png) no-repeat 50% 50%;
|
||||
background: url(../../images/gm_servers.menu.png) no-repeat 50% 50%;
|
||||
}
|
||||
#icon_god-setup {
|
||||
background: url(../../images/gm_setup.png) no-repeat 50% 50%;
|
||||
}
|
||||
#icon_god-policies {
|
||||
background: url(../../images/gm_policies.png) no-repeat 50% 50%;
|
||||
}
|
||||
#icon_oper-inventory {
|
||||
background: url(../../images/page_white_text.png) no-repeat 50% 50%;
|
||||
}
|
||||
#icon_god-tag {
|
||||
background: url(../../images/tag_red.png) no-repeat 50% 50%;
|
||||
background: url(../../images/gm_setup.menu.png) no-repeat 50% 50%;
|
||||
}
|
||||
#icon_god-events {
|
||||
background: url(../../images/gm_events.png) no-repeat 50% 50%;
|
||||
background: url(../../images/gm_events.menu.png) no-repeat 50% 50%;
|
||||
}
|
||||
#icon_god-extensions {
|
||||
background: url(../../images/builder.menu.png) no-repeat 50% 50%;
|
||||
}
|
||||
|
||||
#menu_container {
|
||||
|
|
|
@ -315,7 +315,7 @@ div#menu {
|
|||
width: 45px;
|
||||
float: left;
|
||||
height: 828px;
|
||||
z-index: 999;
|
||||
z-index: 2000;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
|
@ -613,12 +613,6 @@ input:-webkit-autofill {
|
|||
/* END OF LOGIN STYLES */
|
||||
/***********************/
|
||||
|
||||
label {
|
||||
display: block;
|
||||
padding-top: 4px;
|
||||
font-weight: bold;
|
||||
text-align: left;
|
||||
}
|
||||
th > label {
|
||||
padding-top: 7px;
|
||||
}
|
||||
|
@ -665,6 +659,7 @@ input.target, input.search, input.copy, input.add, input.graph,
|
|||
input.percentile, input.binary, input.camera, input.config,
|
||||
input.cancel, input.default, input.filter, input.pdf {
|
||||
padding-right: 30px;
|
||||
margin-top: 15px;
|
||||
height: 23px;
|
||||
|
||||
}
|
||||
|
@ -1149,10 +1144,6 @@ div.title_line {
|
|||
#menu_tab li:hover a {
|
||||
/*background: #b2b08a url("../../images/arrow.png") no-repeat right 3px;*/
|
||||
}
|
||||
#menu_tab li:hover ul a, #menu_tab .mn ul {
|
||||
background: #db6351;
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
#menu_tab li.nomn {
|
||||
min-width: 30px;
|
||||
|
@ -1316,6 +1307,11 @@ span.rmess, span.nrmess {
|
|||
-moz-border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
padding-bottom: 5px;
|
||||
|
||||
}
|
||||
.databox_color{
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
table.databox {
|
||||
|
@ -1335,8 +1331,10 @@ table.databox {
|
|||
}
|
||||
|
||||
.databox th {
|
||||
padding: 5px 7px;
|
||||
padding: 9px 7px;
|
||||
font-weight: normal;
|
||||
color: #fff;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.databox th * {
|
||||
|
@ -1359,8 +1357,9 @@ table.databox {
|
|||
.tactical_set{
|
||||
background: #FFF;
|
||||
border: 1px solid #E2E2E2;
|
||||
margin-left: 10%;
|
||||
width: 71%;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
/* For use in Netflow */
|
||||
|
@ -1723,7 +1722,7 @@ form#filter_form {
|
|||
}
|
||||
ul.action_list {
|
||||
margin: 0;
|
||||
list-style: none inside url(../../images/arrow.png);
|
||||
list-style: none inside circle;
|
||||
}
|
||||
ul.action_list li div {
|
||||
margin-left: 15px;
|
||||
|
@ -2259,10 +2258,6 @@ li.links a:hover {
|
|||
background-color: #222222 !important;
|
||||
}
|
||||
|
||||
.menu li.submenu_selected a {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.operation {
|
||||
background-color: #333 !important;
|
||||
}
|
||||
|
@ -2460,7 +2455,7 @@ input.search_input {
|
|||
margin-top: 8px !important;
|
||||
}
|
||||
|
||||
a>img, td>img, td>input, td>span {
|
||||
a>img, td>input, td>span {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
|
@ -2831,8 +2826,9 @@ table#policy_modules td * {
|
|||
}
|
||||
|
||||
.status_tactical{
|
||||
width: 78%;
|
||||
margin-left: 10%;
|
||||
width: 100%;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
background-color: #FFF !important;
|
||||
padding: 10px;
|
||||
border: 1px solid #E2E2E2;
|
||||
|
@ -2857,8 +2853,28 @@ table#policy_modules td * {
|
|||
}
|
||||
|
||||
.databox.data td{
|
||||
padding-left: 5px;
|
||||
border: 1px solid #E2E2E2;
|
||||
padding-left: 10px;
|
||||
border: 1px solid #EFEFEF;
|
||||
}
|
||||
|
||||
.databox .search{
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
.databox.data td.progress_bar img{
|
||||
border: 3px solid #000;
|
||||
border-radius: 100px;
|
||||
}
|
||||
|
||||
.databox td{
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
padding-top: 7px;
|
||||
padding-bottom: 7px;
|
||||
}
|
||||
.databox.pies fieldset.tactical_set{
|
||||
width:70% !important;
|
||||
height: 285px;
|
||||
}
|
||||
|
||||
.difference{
|
||||
|
@ -2909,10 +2925,24 @@ table#policy_modules td * {
|
|||
background: none !important ;
|
||||
}
|
||||
|
||||
.subsubmenu{
|
||||
position: absolute;
|
||||
float: right;
|
||||
z-index: 9999;
|
||||
display: none;
|
||||
margin-top: 6px !important ;
|
||||
left: 0px !important;
|
||||
}
|
||||
.subsubmenu li{
|
||||
margin-top: 0px !important ;
|
||||
}
|
||||
|
||||
.databox.filters td{
|
||||
padding: 10px;
|
||||
}
|
||||
.databox_color td{
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.godmode, .menu_icon ul li{
|
||||
background-color: #222;
|
||||
|
@ -2923,6 +2953,10 @@ table#policy_modules td * {
|
|||
|
||||
.godmode{
|
||||
border-top: 4px solid !important;
|
||||
padding-bottom: 4px !important;
|
||||
border-bottom-right-radius: 5px;
|
||||
border-right-style: solid;
|
||||
border-right-width: 0px;
|
||||
}
|
||||
/* The items with the class 'spinner' will rotate */
|
||||
/* Not supported on IE9 and below */
|
||||
|
|
|
@ -155,7 +155,7 @@ div.tree-table-cell.tree-table-cell-tree {
|
|||
|
||||
div.tree-table-cell.tree-table-cell-detail {
|
||||
padding-left: 10px;
|
||||
width: 350px;
|
||||
width: 550px;
|
||||
}
|
||||
|
||||
div.tree-element-detail-closed {
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
<div style='height: 10px'>
|
||||
<?php
|
||||
$version = '6.0dev';
|
||||
$build = '150415';
|
||||
$build = '150417';
|
||||
$banner = "v$version Build $build";
|
||||
|
||||
error_reporting(0);
|
||||
|
|
|
@ -574,7 +574,7 @@ if (!empty ($table->data)) {
|
|||
echo '</form>';
|
||||
}
|
||||
else {
|
||||
echo '<div class="nf">'.__('No alerts found').'</div>';
|
||||
ui_print_empty_data ( __('No alerts found') );
|
||||
}
|
||||
|
||||
//strict user hidden
|
||||
|
|
|
@ -49,15 +49,17 @@ else {
|
|||
|
||||
if ($fields === false) {
|
||||
$fields = array();
|
||||
echo "<div class='nf'>". __("No fields defined"). "</div>";
|
||||
ui_print_empty_data ( __("No fields defined") );
|
||||
}
|
||||
else {
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->head = array ();
|
||||
$table->head[0] = __('Field');
|
||||
$table->size[0] = "20%";
|
||||
$table->head[1] = __('Display on front') .
|
||||
ui_print_help_tip (__('The fields with display on front enabled will be displayed into the agent details'), true);
|
||||
$table->size[1] = "10%";
|
||||
$table->head[2] = __('Description');
|
||||
$table->align = array ();
|
||||
$table->align[1] = 'center';
|
||||
|
|
|
@ -100,7 +100,7 @@ $table_agent->cellstyle[count($table_agent->data)][2] =
|
|||
$status_img = agents_detail_view_status_img ($agent["critical_count"],
|
||||
$agent["warning_count"], $agent["unknown_count"], $agent["total_count"],
|
||||
$agent["notinit_count"]);
|
||||
$data[5] = $status_img;
|
||||
$data[2] .= " " .$status_img;
|
||||
|
||||
$table_agent->data[] = $data;
|
||||
$table_agent->rowclass[] = '';
|
||||
|
@ -492,13 +492,13 @@ $table->style = array_fill(0, 3, 'vertical-align: top;');
|
|||
$data = array();
|
||||
$data[0] = html_print_table($table_agent, true);
|
||||
$data[0] .=
|
||||
'<table width=450px class="databox" style="">
|
||||
'<br /> <table width=455px class="databox" style="">
|
||||
<tr><th>' .
|
||||
__('Events (24h)') .
|
||||
'</th></tr>' .
|
||||
'<tr><td style="text-align:center;">' .
|
||||
'<tr><td style="text-align:center;"><br />' .
|
||||
graph_graphic_agentevents ($id_agente, 450, 15, SECONDS_1DAY, '', true) .
|
||||
'</td></tr>' .
|
||||
'<br /></td></tr>' .
|
||||
'</table>';
|
||||
|
||||
// ACCESS RATE GRAPH
|
||||
|
|
|
@ -49,7 +49,7 @@ foreach ($_GET as $key => $value) {
|
|||
echo "<div style='margin-bottom: 30px;'></div>";
|
||||
|
||||
/* Map with the current position */
|
||||
echo "<div id=\"" . $agent_name . "_agent_map\" style=\"border:1px solid black; width:98%; height: 30em;\"></div>";
|
||||
echo "<div id=\"" . $agent_name . "_agent_map\" style=\"border:1px solid black; width:100%; height: 30em;\"></div>";
|
||||
|
||||
if (!gis_get_agent_map($id_agente, "500px", "100%", true, true, $period)) {
|
||||
ui_print_error_message(__("There is no default map. Please go to the setup for to set a default map."));
|
||||
|
@ -125,8 +125,7 @@ $result = db_get_all_rows_sql ($sql, true);
|
|||
|
||||
|
||||
if ($result === false) {
|
||||
echo "<div class='nf'>" .
|
||||
__('This agent doesn\'t have any GIS data.') . "</div>";
|
||||
ui_print_empty_data( __('This agent doesn\'t have any GIS data.') );
|
||||
}
|
||||
else {
|
||||
ui_pagination ($countData, false) ;
|
||||
|
|
|
@ -106,17 +106,12 @@ if (empty($modules)) {
|
|||
}
|
||||
|
||||
$table = null;
|
||||
$table->width = '98%';
|
||||
$table->width = '100%';
|
||||
|
||||
$table->style[0] = 'font-weight: bolder; text-align: right;';
|
||||
$table->style[1] = '';
|
||||
$table->style[2] = 'font-weight: bolder; text-align: right;';
|
||||
|
||||
$table->valign[0] = 'top';
|
||||
$table->valign[1] = 'top';
|
||||
$table->valign[2] = 'top';
|
||||
$table->valign[3] = 'top';
|
||||
|
||||
$table->rowspan[0][0] = 6;
|
||||
$table->rowspan[0][1] = 6;
|
||||
|
||||
|
@ -174,7 +169,11 @@ else
|
|||
$date = $utime;
|
||||
|
||||
if ($combined) {
|
||||
echo "<h4>" . __('Combined graph') . '</h4>';
|
||||
|
||||
echo "<div style='width: 555px;'><strong style='font-size:9pt;'>" . __('Combined graph') . '</strong> ';
|
||||
html_print_button(__('Save as custom graph'), 'save_custom_graph',
|
||||
false, 'save_custom_graph();', 'class="sub add" style="margin:0px"');
|
||||
echo "</div>";
|
||||
|
||||
custom_graphs_print(0,
|
||||
$height,
|
||||
|
@ -186,11 +185,6 @@ if ($combined) {
|
|||
false,
|
||||
'white',
|
||||
$modules);
|
||||
|
||||
echo "<div style='width: 555px; text-align: right;'>";
|
||||
html_print_button(__('Save as custom graph'), 'save_custom_graph',
|
||||
false, 'save_custom_graph();', 'class="sub save"');
|
||||
echo "</div>";
|
||||
}
|
||||
else {
|
||||
foreach ($modules as $id_module) {
|
||||
|
@ -220,7 +214,7 @@ echo "<div style='clear: both;'></div>";
|
|||
//Dialog to save the custom graph
|
||||
echo "<div id='dialog_save_custom_graph' style='display: none;'>";
|
||||
$table = null;
|
||||
$table->width = '98%';
|
||||
$table->width = '100%';
|
||||
$table->style[0] = 'font-weight: bolder; text-align: right;';
|
||||
$table->data[0][0] = __('Name custom graph');
|
||||
$table->data[0][1] =
|
||||
|
|
|
@ -119,8 +119,8 @@ if (!empty($result_groups)) {
|
|||
echo '<table cellpadding="0" cellspacing="0" style="margin-top:10px;" class="databox data" border="0" width="100%">';
|
||||
echo "<tr>";
|
||||
echo "<th colspan=2 ></th>";
|
||||
echo "<th colspan=3 class='difference'>" . __("Agents") . "</th>";
|
||||
echo "<th colspan=6 >" . __("Modules") . "</th>";
|
||||
echo "<th colspan=3 class='difference' style='text-align:center'>" . __("Agents") . "</th>";
|
||||
echo "<th colspan=6 style='text-align:center'>" . __("Modules") . "</th>";
|
||||
echo "</tr>";
|
||||
|
||||
echo "<tr>";
|
||||
|
|
|
@ -159,7 +159,7 @@ if (!empty($all_data)) {
|
|||
}
|
||||
|
||||
echo '<table border=0 style="width:100%;"><tr>';
|
||||
echo '<td style="vertical-align: top; min-width: 180px; width:25%; padding-right: 10px; vertical-align: top; padding-top: 0px;" id="leftcolumn">';
|
||||
echo '<td style="vertical-align: top; min-width: 180px; width:25%; padding-right: 20px; vertical-align: top; padding-top: 0px;" id="leftcolumn">';
|
||||
// ---------------------------------------------------------------------
|
||||
// The status horizontal bars (Global health, Monitor sanity...
|
||||
// ---------------------------------------------------------------------
|
||||
|
@ -216,7 +216,7 @@ html_print_table($table);
|
|||
|
||||
echo '</td>'; //Left column
|
||||
|
||||
echo '<td style="vertical-align: top; width: 56%; padding-top: 0px;" id="rightcolumn">';
|
||||
echo '<td style="vertical-align: top; width: 75%; padding-top: 0px;" id="rightcolumn">';
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
|
@ -229,7 +229,7 @@ if (!empty($acltags)) {
|
|||
$tags_condition = tags_get_acl_tags_event_condition($acltags, false, $user_strict);
|
||||
|
||||
if (!empty($tags_condition)) {
|
||||
$events = events_print_event_table ("estado<>1 AND ($tags_condition)", 10, "100%",true);
|
||||
$events = events_print_event_table ("estado<>1 AND ($tags_condition)", 10, "100%",true,false,true);
|
||||
ui_toggle($events, __('Latest events'));
|
||||
}
|
||||
}
|
||||
|
@ -240,8 +240,22 @@ if (!empty($acltags)) {
|
|||
if ($is_admin) {
|
||||
$tiny = true;
|
||||
require($config['homedir'] . '/godmode/servers/servers.build_table.php');
|
||||
|
||||
}
|
||||
|
||||
$out .= '<table cellpadding=0 cellspacing=0 class="databox pies" style="margin-top:15px;" width=100%><tr><td>';
|
||||
$out .= '<fieldset class="databox tactical_set">
|
||||
<legend>' .
|
||||
__('Event graph') .
|
||||
'</legend>' .
|
||||
grafico_eventos_total("", 250, 150, false) . '</fieldset>';
|
||||
$out .="</td><td>";
|
||||
$out .= '<fieldset class="databox tactical_set">
|
||||
<legend>' .
|
||||
__('Event graph by agent') .
|
||||
'</legend>' .
|
||||
grafico_eventos_grupo(250, 150, "", false, false, false) . '</fieldset>';
|
||||
$out .= '</td></tr></table>';
|
||||
echo $out;
|
||||
|
||||
echo '</td>';
|
||||
echo '</tr></table>';
|
||||
|
|
|
@ -120,6 +120,7 @@ if (!defined('METACONSOLE')) {
|
|||
|
||||
$table = new StdClass();
|
||||
$table->width = "100%";
|
||||
$table->class='databox filters';
|
||||
$table->data = array();
|
||||
$table->rowspan = array();
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 6.0dev
|
||||
%define release 150415
|
||||
%define release 150417
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 6.0dev
|
||||
%define release 150415
|
||||
%define release 150417
|
||||
%define httpd_name httpd
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name apache2
|
||||
|
|
|
@ -38,7 +38,7 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
|
|||
('graph_res','5'),
|
||||
('step_compact','1'),
|
||||
('db_scheme_version','6.0dev'),
|
||||
('db_scheme_build','PD150415'),
|
||||
('db_scheme_build','PD150417'),
|
||||
('show_unknown','0'),
|
||||
('show_lastalerts','1'),
|
||||
('style','pandora'),
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-server
|
||||
Version: 6.0dev-150415
|
||||
Version: 6.0dev-150417
|
||||
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="6.0dev-150415"
|
||||
pandora_version="6.0dev-150417"
|
||||
|
||||
package_cpan=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -43,7 +43,7 @@ our @EXPORT = qw(
|
|||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "6.0dev";
|
||||
my $pandora_build = "150415";
|
||||
my $pandora_build = "150417";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
# Setup hash
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_server
|
||||
%define version 6.0dev
|
||||
%define release 150415
|
||||
%define release 150417
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_server
|
||||
%define version 6.0dev
|
||||
%define release 150415
|
||||
%define release 150417
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -33,7 +33,7 @@ use PandoraFMS::Tools;
|
|||
use PandoraFMS::DB;
|
||||
|
||||
# version: define current version
|
||||
my $version = "6.0dev PS150415";
|
||||
my $version = "6.0dev PS150417";
|
||||
|
||||
# Pandora server configuration
|
||||
my %conf;
|
||||
|
|
|
@ -35,7 +35,7 @@ use Encode::Locale;
|
|||
Encode::Locale::decode_argv;
|
||||
|
||||
# version: define current version
|
||||
my $version = "6.0dev PS150415";
|
||||
my $version = "6.0dev PS150417";
|
||||
|
||||
# save program name for logging
|
||||
my $progname = basename($0);
|
||||
|
|