mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Merge branch 'develop' into 'ent-4190-mejoras-para-el-menu-de-gestionar-ha'
# Conflicts: # pandora_console/extras/mr/32.sql
This commit is contained in:
commit
ebcce5cad4
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-agent-unix
|
package: pandorafms-agent-unix
|
||||||
Version: 7.0NG.738-190904
|
Version: 7.0NG.738-190912
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
pandora_version="7.0NG.738-190904"
|
pandora_version="7.0NG.738-190912"
|
||||||
|
|
||||||
echo "Test if you has the tools for to make the packages."
|
echo "Test if you has the tools for to make the packages."
|
||||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||||
|
@ -42,7 +42,7 @@ my $Sem = undef;
|
|||||||
my $ThreadSem = undef;
|
my $ThreadSem = undef;
|
||||||
|
|
||||||
use constant AGENT_VERSION => '7.0NG.738';
|
use constant AGENT_VERSION => '7.0NG.738';
|
||||||
use constant AGENT_BUILD => '190904';
|
use constant AGENT_BUILD => '190912';
|
||||||
|
|
||||||
# Agent log default file size maximum and instances
|
# Agent log default file size maximum and instances
|
||||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_agent_unix
|
%define name pandorafms_agent_unix
|
||||||
%define version 7.0NG.738
|
%define version 7.0NG.738
|
||||||
%define release 190904
|
%define release 190912
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, PERL version
|
Summary: Pandora FMS Linux agent, PERL version
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_agent_unix
|
%define name pandorafms_agent_unix
|
||||||
%define version 7.0NG.738
|
%define version 7.0NG.738
|
||||||
%define release 190904
|
%define release 190912
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, PERL version
|
Summary: Pandora FMS Linux agent, PERL version
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
# **********************************************************************
|
# **********************************************************************
|
||||||
|
|
||||||
PI_VERSION="7.0NG.738"
|
PI_VERSION="7.0NG.738"
|
||||||
PI_BUILD="190904"
|
PI_BUILD="190912"
|
||||||
OS_NAME=`uname -s`
|
OS_NAME=`uname -s`
|
||||||
|
|
||||||
FORCE=0
|
FORCE=0
|
||||||
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
Version
|
Version
|
||||||
{190904}
|
{190912}
|
||||||
|
|
||||||
ViewReadme
|
ViewReadme
|
||||||
{Yes}
|
{Yes}
|
||||||
|
@ -1214,7 +1214,8 @@ Pandora_Module_Factory::getModuleFromDefinition (string definition) {
|
|||||||
module_source,
|
module_source,
|
||||||
module_eventtype,
|
module_eventtype,
|
||||||
module_eventcode,
|
module_eventcode,
|
||||||
module_pattern);
|
module_pattern,
|
||||||
|
module_application);
|
||||||
} else if (module_wmiquery != "") {
|
} else if (module_wmiquery != "") {
|
||||||
module = new Pandora_Module_WMIQuery (module_name,
|
module = new Pandora_Module_WMIQuery (module_name,
|
||||||
module_wmiquery, module_wmicolumn);
|
module_wmiquery, module_wmicolumn);
|
||||||
|
@ -53,7 +53,7 @@ static EvtUpdateBookmarkT EvtUpdateBookmarkF = NULL;
|
|||||||
* @param name Module name.
|
* @param name Module name.
|
||||||
* @param service_name Service internal name to check.
|
* @param service_name Service internal name to check.
|
||||||
*/
|
*/
|
||||||
Pandora_Module_Logchannel::Pandora_Module_Logchannel (string name, string source, string type, string id, string pattern)
|
Pandora_Module_Logchannel::Pandora_Module_Logchannel (string name, string source, string type, string id, string pattern, string application)
|
||||||
: Pandora_Module (name) {
|
: Pandora_Module (name) {
|
||||||
int i;
|
int i;
|
||||||
vector<wstring> query;
|
vector<wstring> query;
|
||||||
@ -93,6 +93,13 @@ Pandora_Module_Logchannel::Pandora_Module_Logchannel (string name, string source
|
|||||||
query.push_back(ss.str());
|
query.push_back(ss.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set the application
|
||||||
|
if (application != "") {
|
||||||
|
wstringstream ss;
|
||||||
|
ss << L"*[System/Provider[@Name='" << application.c_str() << L"']]";
|
||||||
|
query.push_back(ss.str());
|
||||||
|
}
|
||||||
|
|
||||||
// Fill the filter
|
// Fill the filter
|
||||||
if (query.size() == 0) {
|
if (query.size() == 0) {
|
||||||
this->filter = L"*";
|
this->filter = L"*";
|
||||||
@ -579,4 +586,4 @@ Pandora_Module_Logchannel::GetMessageString(EVT_HANDLE hMetadata, EVT_HANDLE hEv
|
|||||||
}
|
}
|
||||||
|
|
||||||
return pBuffer;
|
return pBuffer;
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@ namespace Pandora_Modules {
|
|||||||
LPWSTR GetMessageString(EVT_HANDLE hMetadata, EVT_HANDLE hEvent, EVT_FORMAT_MESSAGE_FLAGS FormatId);
|
LPWSTR GetMessageString(EVT_HANDLE hMetadata, EVT_HANDLE hEvent, EVT_FORMAT_MESSAGE_FLAGS FormatId);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Pandora_Module_Logchannel (string name, string source, string type, string id, string pattern);
|
Pandora_Module_Logchannel (string name, string source, string type, string id, string pattern, string application);
|
||||||
void run ();
|
void run ();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||||||
using namespace Pandora_Strutils;
|
using namespace Pandora_Strutils;
|
||||||
|
|
||||||
#define PATH_SIZE _MAX_PATH+1
|
#define PATH_SIZE _MAX_PATH+1
|
||||||
#define PANDORA_VERSION ("7.0NG.738(Build 190904)")
|
#define PANDORA_VERSION ("7.0NG.738(Build 190912)")
|
||||||
|
|
||||||
string pandora_path;
|
string pandora_path;
|
||||||
string pandora_dir;
|
string pandora_dir;
|
||||||
|
@ -11,7 +11,7 @@ BEGIN
|
|||||||
VALUE "LegalCopyright", "Artica ST"
|
VALUE "LegalCopyright", "Artica ST"
|
||||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||||
VALUE "ProductVersion", "(7.0NG.738(Build 190904))"
|
VALUE "ProductVersion", "(7.0NG.738(Build 190912))"
|
||||||
VALUE "FileVersion", "1.0.0.0"
|
VALUE "FileVersion", "1.0.0.0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-console
|
package: pandorafms-console
|
||||||
Version: 7.0NG.738-190904
|
Version: 7.0NG.738-190912
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
pandora_version="7.0NG.738-190904"
|
pandora_version="7.0NG.738-190912"
|
||||||
|
|
||||||
package_pear=0
|
package_pear=0
|
||||||
package_pandora=1
|
package_pandora=1
|
||||||
|
@ -44,24 +44,16 @@ $groups = groups_get_all();
|
|||||||
// Add the All group to the beginning to be always the first
|
// Add the All group to the beginning to be always the first
|
||||||
// Use this instead array_unshift to keep the array keys
|
// Use this instead array_unshift to keep the array keys
|
||||||
$groups = ([0 => __('All')] + $groups);
|
$groups = ([0 => __('All')] + $groups);
|
||||||
$html = '';
|
$groups_selected = [];
|
||||||
$style = 'style="padding: 2px 10px; display: inline-block;"';
|
|
||||||
foreach ($groups as $id => $name) {
|
foreach ($groups as $id => $name) {
|
||||||
$checked = in_array($id, $file['groups']);
|
if (in_array($id, $file['groups'])) {
|
||||||
$all_checked = false;
|
$groups_selected[] = $id;
|
||||||
if ($id === 0) {
|
|
||||||
$checkbox = html_print_checkbox_extended('groups[]', $id, $checked, false, '', 'class="chkb_all"', true);
|
|
||||||
$all_checked = $checked;
|
|
||||||
} else {
|
|
||||||
$checkbox = html_print_checkbox_extended('groups[]', $id, $checked, $all_checked, '', 'class="chkb_group"', true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$html .= "<div $style>$name $checkbox</div>";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$row = [];
|
$row = [];
|
||||||
$row[0] = __('Groups');
|
$row[0] = __('Groups');
|
||||||
$row[1] = $html;
|
$row[1] = html_print_select($groups, 'groups[]', $groups_selected, '', '', '', true, true, '', '', '');
|
||||||
$table->data[] = $row;
|
$table->data[] = $row;
|
||||||
$table->colspan[][1] = 3;
|
$table->colspan[][1] = 3;
|
||||||
|
|
||||||
|
@ -193,7 +193,7 @@ function files_repo_add_file($file_input_name='upfile', $description='', $groups
|
|||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
$attachment_path = io_safe_output($config['attachment_store']);
|
$attachment_path = io_safe_output($config['attachment_store']);
|
||||||
$files_repo_path = $attachment_path.'/'.'files_repo';
|
$files_repo_path = $attachment_path.'/files_repo';
|
||||||
|
|
||||||
$result = [];
|
$result = [];
|
||||||
$result['status'] = false;
|
$result['status'] = false;
|
||||||
|
@ -11,4 +11,8 @@ ALTER TABLE `tdatabase` ADD COLUMN `ssh_pubkey` TEXT;
|
|||||||
|
|
||||||
UPDATE `tdatabase` set `label`=`host`;
|
UPDATE `tdatabase` set `label`=`host`;
|
||||||
|
|
||||||
COMMIT
|
UPDATE `tlayout_data` SET `height` = 70 , `width` = 70 WHERE `height` = 0 && `width` = 0 && image NOT LIKE '%dot%' && ((`type` IN (0,5)) ||
|
||||||
|
(`type` = 10 && `image` IS NOT NULL && `image` != '' && `image` != 'none') ||
|
||||||
|
(`type` = 11 && `image` IS NOT NULL && `image` != '' && `image` != 'none' && `show_statistics` = 0));
|
||||||
|
|
||||||
|
COMMIT;
|
||||||
|
@ -1358,7 +1358,11 @@ if ($update_module || $create_module) {
|
|||||||
|
|
||||||
$parent_module_id = (int) get_parameter('parent_module_id');
|
$parent_module_id = (int) get_parameter('parent_module_id');
|
||||||
$ip_target = (string) get_parameter('ip_target');
|
$ip_target = (string) get_parameter('ip_target');
|
||||||
if ($ip_target == '') {
|
// No autofill if the module is a webserver module.
|
||||||
|
if ($ip_target == ''
|
||||||
|
&& $id_module_type < MODULE_WEBSERVER_CHECK_LATENCY
|
||||||
|
&& $id_module_type > MODULE_WEBSERVER_RETRIEVE_STRING_DATA
|
||||||
|
) {
|
||||||
$ip_target = 'auto';
|
$ip_target = 'auto';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1381,11 +1385,7 @@ if ($update_module || $create_module) {
|
|||||||
$ff_type = (int) get_parameter('ff_type');
|
$ff_type = (int) get_parameter('ff_type');
|
||||||
$each_ff = (int) get_parameter('each_ff');
|
$each_ff = (int) get_parameter('each_ff');
|
||||||
$ff_timeout = (int) get_parameter('ff_timeout');
|
$ff_timeout = (int) get_parameter('ff_timeout');
|
||||||
$unit = (string) get_parameter('unit_select');
|
$unit = (string) get_parameter('unit');
|
||||||
if ($unit == 'none') {
|
|
||||||
$unit = (string) get_parameter('unit_text');
|
|
||||||
}
|
|
||||||
|
|
||||||
$id_tag = (array) get_parameter('id_tag_selected');
|
$id_tag = (array) get_parameter('id_tag_selected');
|
||||||
$serialize_ops = (string) get_parameter('serialize_ops');
|
$serialize_ops = (string) get_parameter('serialize_ops');
|
||||||
$critical_instructions = (string) get_parameter('critical_instructions');
|
$critical_instructions = (string) get_parameter('critical_instructions');
|
||||||
@ -2107,8 +2107,7 @@ if ($delete_module) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// MODULE DUPLICATION
|
// MODULE DUPLICATION.
|
||||||
// ==================.
|
|
||||||
if (!empty($duplicate_module)) {
|
if (!empty($duplicate_module)) {
|
||||||
// DUPLICATE agent module !
|
// DUPLICATE agent module !
|
||||||
$id_duplicate_module = $duplicate_module;
|
$id_duplicate_module = $duplicate_module;
|
||||||
@ -2154,8 +2153,46 @@ if (!empty($duplicate_module)) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// UPDATE GIS
|
// MODULE ENABLE/DISABLE.
|
||||||
// ==========.
|
if ($enable_module) {
|
||||||
|
$result = modules_change_disabled($enable_module, 0);
|
||||||
|
$modulo_nombre = db_get_row_sql('SELECT nombre FROM tagente_modulo WHERE id_agente_modulo = '.$enable_module.'');
|
||||||
|
$modulo_nombre = $modulo_nombre['nombre'];
|
||||||
|
|
||||||
|
if ($result === NOERR) {
|
||||||
|
enterprise_hook('config_agents_enable_module_conf', [$id_agente, $enable_module]);
|
||||||
|
db_pandora_audit('Module management', 'Enable #'.$enable_module.' | '.$modulo_nombre.' | '.$agent['alias']);
|
||||||
|
} else {
|
||||||
|
db_pandora_audit('Module management', 'Fail to enable #'.$enable_module.' | '.$modulo_nombre.' | '.$agent['alias']);
|
||||||
|
}
|
||||||
|
|
||||||
|
ui_print_result_message(
|
||||||
|
$result,
|
||||||
|
__('Successfully enabled'),
|
||||||
|
__('Could not be enabled')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($disable_module) {
|
||||||
|
$result = modules_change_disabled($disable_module, 1);
|
||||||
|
$modulo_nombre = db_get_row_sql('SELECT nombre FROM tagente_modulo WHERE id_agente_modulo = '.$disable_module.'');
|
||||||
|
$modulo_nombre = $modulo_nombre['nombre'];
|
||||||
|
|
||||||
|
if ($result === NOERR) {
|
||||||
|
enterprise_hook('config_agents_disable_module_conf', [$id_agente, $disable_module]);
|
||||||
|
db_pandora_audit('Module management', 'Disable #'.$disable_module.' | '.$modulo_nombre.' | '.$agent['alias']);
|
||||||
|
} else {
|
||||||
|
db_pandora_audit('Module management', 'Fail to disable #'.$disable_module.' | '.$modulo_nombre.' | '.$agent['alias']);
|
||||||
|
}
|
||||||
|
|
||||||
|
ui_print_result_message(
|
||||||
|
$result,
|
||||||
|
__('Successfully disabled'),
|
||||||
|
__('Could not be disabled')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// UPDATE GIS.
|
||||||
$updateGIS = get_parameter('update_gis', 0);
|
$updateGIS = get_parameter('update_gis', 0);
|
||||||
if ($updateGIS) {
|
if ($updateGIS) {
|
||||||
$updateGisData = get_parameter('update_gis_data');
|
$updateGisData = get_parameter('update_gis_data');
|
||||||
@ -2243,8 +2280,11 @@ switch ($tab) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'alert':
|
case 'alert':
|
||||||
// Because $id_agente is set, it will show only agent alerts.
|
/*
|
||||||
// This var is for not display create button on alert list.
|
* Because $id_agente is set, it will show only agent alerts
|
||||||
|
* This var is for not display create button on alert list
|
||||||
|
*/
|
||||||
|
|
||||||
$dont_display_alert_create_bttn = true;
|
$dont_display_alert_create_bttn = true;
|
||||||
include 'godmode/alerts/alert_list.php';
|
include 'godmode/alerts/alert_list.php';
|
||||||
break;
|
break;
|
||||||
|
@ -443,6 +443,14 @@ ui_pagination($total_agents, "index.php?sec=gagente&sec2=godmode/agentes/modific
|
|||||||
|
|
||||||
if ($agents !== false) {
|
if ($agents !== false) {
|
||||||
// Urls to sort the table.
|
// Urls to sort the table.
|
||||||
|
// Agent name size and description for Chinese and Japanese languages are adjusted
|
||||||
|
$agent_font_size = '7';
|
||||||
|
$description_font_size = '6.5';
|
||||||
|
if ($config['language'] == 'ja' || $config['language'] == 'zh_CN' || $own_info['language'] == 'ja' || $own_info['language'] == 'zh_CN') {
|
||||||
|
$agent_font_size = '15';
|
||||||
|
$description_font_size = '11';
|
||||||
|
}
|
||||||
|
|
||||||
$url_up_agente = 'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search.'&os='.$os.'&offset='.$offset.'&sort_field=name&sort=up&disabled=$disabled';
|
$url_up_agente = 'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search.'&os='.$os.'&offset='.$offset.'&sort_field=name&sort=up&disabled=$disabled';
|
||||||
$url_down_agente = 'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search.'&os='.$os.'&offset='.$offset.'&sort_field=name&sort=down&disabled=$disabled';
|
$url_down_agente = 'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search.'&os='.$os.'&offset='.$offset.'&sort_field=name&sort=down&disabled=$disabled';
|
||||||
$url_up_remote = 'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search.'&os='.$os.'&offset='.$offset.'&sort_field=remote&sort=up&disabled=$disabled';
|
$url_up_remote = 'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search.'&os='.$os.'&offset='.$offset.'&sort_field=remote&sort=up&disabled=$disabled';
|
||||||
@ -529,7 +537,7 @@ if ($agents !== false) {
|
|||||||
} else {
|
} else {
|
||||||
echo '<a alt ='.$agent['nombre']." href='index.php?sec=gagente&
|
echo '<a alt ='.$agent['nombre']." href='index.php?sec=gagente&
|
||||||
sec2=godmode/agentes/configurar_agente&tab=$main_tab&
|
sec2=godmode/agentes/configurar_agente&tab=$main_tab&
|
||||||
id_agente=".$agent['id_agente']."'>".'<span style="font-size: 7pt" title="'.$agent['nombre'].'">'.$agent['alias'].'</span>'.'</a>';
|
id_agente=".$agent['id_agente']."'>".'<span style="font-size: '.$agent_font_size.'pt" title="'.$agent['nombre'].'">'.$agent['alias'].'</span>'.'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '</strong>';
|
echo '</strong>';
|
||||||
@ -629,7 +637,7 @@ if ($agents !== false) {
|
|||||||
// Group icon and name
|
// Group icon and name
|
||||||
echo "<td class='$tdcolor' align='left' valign='middle'>".ui_print_group_icon($agent['id_grupo'], true).'</td>';
|
echo "<td class='$tdcolor' align='left' valign='middle'>".ui_print_group_icon($agent['id_grupo'], true).'</td>';
|
||||||
// Description
|
// Description
|
||||||
echo "<td class='".$tdcolor."f9'>".ui_print_truncate_text($agent['comentarios'], 'description', true, true, true, '[…]', 'font-size: 6.5pt;').'</td>';
|
echo "<td class='".$tdcolor."f9'>".ui_print_truncate_text($agent['comentarios'], 'description', true, true, true, '[…]', 'font-size: '.$description_font_size.'pt;').'</td>';
|
||||||
// Action
|
// Action
|
||||||
// When there is only one element in page it's necesary go back page.
|
// When there is only one element in page it's necesary go back page.
|
||||||
if ((count($agents) == 1) && ($offset >= $config['block_size'])) {
|
if ((count($agents) == 1) && ($offset >= $config['block_size'])) {
|
||||||
|
@ -1930,11 +1930,7 @@ function process_manage_edit($module_name, $agents_select=null, $module_status='
|
|||||||
|
|
||||||
case 'unit_select':
|
case 'unit_select':
|
||||||
if ($value != -1) {
|
if ($value != -1) {
|
||||||
if ($value == 'none') {
|
$values['unit'] = (string) get_parameter('unit');
|
||||||
$values['unit'] = (string) get_parameter('unit_text');
|
|
||||||
} else {
|
|
||||||
$values['unit'] = $value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -727,7 +727,7 @@ class ConsoleSupervisor
|
|||||||
'type' => 'NOTIF.LICENSE.LIMITED',
|
'type' => 'NOTIF.LICENSE.LIMITED',
|
||||||
'title' => __('Limited mode.'),
|
'title' => __('Limited mode.'),
|
||||||
'message' => io_safe_output($config['limited_mode']),
|
'message' => io_safe_output($config['limited_mode']),
|
||||||
'url' => 'index.php?sec=gsetup&sec2=godmode/setup/license',
|
'url' => ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/license'),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -745,7 +745,7 @@ class ConsoleSupervisor
|
|||||||
'Your license will expire in %d days. Please, contact our sales department.',
|
'Your license will expire in %d days. Please, contact our sales department.',
|
||||||
$days_to_expiry
|
$days_to_expiry
|
||||||
),
|
),
|
||||||
'url' => 'index.php?sec=gsetup&sec2=godmode/setup/license',
|
'url' => ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/license'),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
} else if ($days_to_expiry < 0) {
|
} else if ($days_to_expiry < 0) {
|
||||||
@ -755,7 +755,7 @@ class ConsoleSupervisor
|
|||||||
'type' => 'NOTIF.LICENSE.EXPIRATION',
|
'type' => 'NOTIF.LICENSE.EXPIRATION',
|
||||||
'title' => __('Expired license'),
|
'title' => __('Expired license'),
|
||||||
'message' => __('Your license has expired. Please, contact our sales department.'),
|
'message' => __('Your license has expired. Please, contact our sales department.'),
|
||||||
'url' => 'index.php?sec=gsetup&sec2=godmode/setup/license',
|
'url' => ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/license'),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
return false;
|
return false;
|
||||||
@ -832,7 +832,7 @@ class ConsoleSupervisor
|
|||||||
'Directory %s is not writable. Please, configure corresponding permissions.',
|
'Directory %s is not writable. Please, configure corresponding permissions.',
|
||||||
$config['attachment_store']
|
$config['attachment_store']
|
||||||
),
|
),
|
||||||
'url' => 'index.php?sec=general&sec2=godmode/setup/setup§ion=general',
|
'url' => ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup§ion=general'),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
@ -854,7 +854,7 @@ class ConsoleSupervisor
|
|||||||
'There are more than %d files in attachment, consider cleaning up attachment directory manually.',
|
'There are more than %d files in attachment, consider cleaning up attachment directory manually.',
|
||||||
$config['num_files_attachment']
|
$config['num_files_attachment']
|
||||||
),
|
),
|
||||||
'url' => 'index.php?sec=general&sec2=godmode/setup/setup§ion=perf',
|
'url' => ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup§ion=perf'),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -886,7 +886,7 @@ class ConsoleSupervisor
|
|||||||
'Remote configuration directory %s is not readable. Please, adjust configuration.',
|
'Remote configuration directory %s is not readable. Please, adjust configuration.',
|
||||||
$config['remote_config']
|
$config['remote_config']
|
||||||
),
|
),
|
||||||
'url' => 'index.php?sec=general&sec2=godmode/setup/setup§ion=general',
|
'url' => ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup§ion=general'),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
@ -905,7 +905,7 @@ class ConsoleSupervisor
|
|||||||
'Remote configuration directory %s is not writable. Please, adjust configuration.',
|
'Remote configuration directory %s is not writable. Please, adjust configuration.',
|
||||||
$config['remote_config'].'/conf'
|
$config['remote_config'].'/conf'
|
||||||
),
|
),
|
||||||
'url' => 'index.php?sec=general&sec2=godmode/setup/setup§ion=general',
|
'url' => ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup§ion=general'),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -923,7 +923,7 @@ class ConsoleSupervisor
|
|||||||
'Collections directory %s is not writable. Please, adjust configuration.',
|
'Collections directory %s is not writable. Please, adjust configuration.',
|
||||||
$config['remote_config'].'/collections'
|
$config['remote_config'].'/collections'
|
||||||
),
|
),
|
||||||
'url' => 'index.php?sec=general&sec2=godmode/setup/setup§ion=general',
|
'url' => ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup§ion=general'),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -941,7 +941,7 @@ class ConsoleSupervisor
|
|||||||
'MD5 directory %s is not writable. Please, adjust configuration.',
|
'MD5 directory %s is not writable. Please, adjust configuration.',
|
||||||
$config['remote_config'].'/md5'
|
$config['remote_config'].'/md5'
|
||||||
),
|
),
|
||||||
'url' => 'index.php?sec=general&sec2=godmode/setup/setup§ion=general',
|
'url' => ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup§ion=general'),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -972,7 +972,7 @@ class ConsoleSupervisor
|
|||||||
$MAX_FILES_DATA_IN,
|
$MAX_FILES_DATA_IN,
|
||||||
$config['remote_config']
|
$config['remote_config']
|
||||||
),
|
),
|
||||||
'url' => 'index.php?sec=general&sec2=godmode/setup/setup§ion=perf',
|
'url' => ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup§ion=perf'),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -995,7 +995,7 @@ class ConsoleSupervisor
|
|||||||
$MAX_BADXML_FILES_DATA_IN,
|
$MAX_BADXML_FILES_DATA_IN,
|
||||||
$config['remote_config']
|
$config['remote_config']
|
||||||
),
|
),
|
||||||
'url' => 'index.php?sec=general&sec2=godmode/setup/setup§ion=perf',
|
'url' => ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup§ion=perf'),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -1081,7 +1081,7 @@ class ConsoleSupervisor
|
|||||||
$modules_queued,
|
$modules_queued,
|
||||||
$queue['queued_modules']
|
$queue['queued_modules']
|
||||||
),
|
),
|
||||||
'url' => 'index.php?sec=gservers&sec2=godmode/servers/modificar_server&refr=60',
|
'url' => ui_get_full_url('index.php?sec=gservers&sec2=godmode/servers/modificar_server&refr=60'),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -1191,7 +1191,7 @@ class ConsoleSupervisor
|
|||||||
'type' => 'NOTIF.SERVER.STATUS.'.$server['id_server'],
|
'type' => 'NOTIF.SERVER.STATUS.'.$server['id_server'],
|
||||||
'title' => $msg,
|
'title' => $msg,
|
||||||
'message' => $description,
|
'message' => $description,
|
||||||
'url' => 'index.php?sec=gservers&sec2=godmode/servers/modificar_server&refr=60',
|
'url' => ui_get_full_url('index.php?sec=gservers&sec2=godmode/servers/modificar_server&refr=60'),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -1499,7 +1499,7 @@ class ConsoleSupervisor
|
|||||||
'type' => 'NOTIF.HISTORYDB',
|
'type' => 'NOTIF.HISTORYDB',
|
||||||
'title' => __('Historical database not available'),
|
'title' => __('Historical database not available'),
|
||||||
'message' => __('Historical database is enabled, though not accessible with the current configuration.'),
|
'message' => __('Historical database is enabled, though not accessible with the current configuration.'),
|
||||||
'url' => 'index.php?sec=general&sec2=godmode/setup/setup§ion=hist_db',
|
'url' => ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup§ion=hist_db'),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -1546,7 +1546,7 @@ class ConsoleSupervisor
|
|||||||
'Your database hasn\'t been through maintenance for 48hrs. Please, check documentation on how to perform this maintenance process on %s and enable it as soon as possible.',
|
'Your database hasn\'t been through maintenance for 48hrs. Please, check documentation on how to perform this maintenance process on %s and enable it as soon as possible.',
|
||||||
io_safe_output(get_product_name())
|
io_safe_output(get_product_name())
|
||||||
),
|
),
|
||||||
'url' => 'index.php?sec=general&sec2=godmode/setup/setup§ion=perf',
|
'url' => ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup§ion=perf'),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -1606,7 +1606,7 @@ class ConsoleSupervisor
|
|||||||
'Historical database maintenance problem.'
|
'Historical database maintenance problem.'
|
||||||
),
|
),
|
||||||
'message' => __('Your historical database hasn\'t been through maintenance for 48hrs. Please, check documentation on how to perform this maintenance process on %s and enable it as soon as possible.', get_product_name()),
|
'message' => __('Your historical database hasn\'t been through maintenance for 48hrs. Please, check documentation on how to perform this maintenance process on %s and enable it as soon as possible.', get_product_name()),
|
||||||
'url' => 'index.php?sec=general&sec2=godmode/setup/setup§ion=perf',
|
'url' => ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup§ion=perf'),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -1645,7 +1645,7 @@ class ConsoleSupervisor
|
|||||||
'type' => 'NOTIF.HISTORYDB.MR',
|
'type' => 'NOTIF.HISTORYDB.MR',
|
||||||
'title' => __('Historical database MR mismatch'),
|
'title' => __('Historical database MR mismatch'),
|
||||||
'message' => __('Your historical database is not using the same schema as the main DB. This could produce anomalies while storing historical data.'),
|
'message' => __('Your historical database is not using the same schema as the main DB. This could produce anomalies while storing historical data.'),
|
||||||
'url' => 'index.php?sec=general&sec2=godmode/setup/setup§ion=hist_db',
|
'url' => ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup§ion=hist_db'),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -1687,7 +1687,7 @@ class ConsoleSupervisor
|
|||||||
'type' => 'NOTIF.EXT.ELASTICSEARCH',
|
'type' => 'NOTIF.EXT.ELASTICSEARCH',
|
||||||
'title' => __('Log collector cannot connect to ElasticSearch'),
|
'title' => __('Log collector cannot connect to ElasticSearch'),
|
||||||
'message' => __('ElasticSearch is not available using current configuration.'),
|
'message' => __('ElasticSearch is not available using current configuration.'),
|
||||||
'url' => 'index.php?sec=general&sec2=godmode/setup/setup§ion=log',
|
'url' => ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup§ion=log'),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -1757,7 +1757,7 @@ class ConsoleSupervisor
|
|||||||
'type' => 'NOTIF.METACONSOLE.DB_CONNECTION',
|
'type' => 'NOTIF.METACONSOLE.DB_CONNECTION',
|
||||||
'title' => __('Metaconsole DB is not available.'),
|
'title' => __('Metaconsole DB is not available.'),
|
||||||
'message' => __('Cannot connect with Metaconsole DB using current configuration.'),
|
'message' => __('Cannot connect with Metaconsole DB using current configuration.'),
|
||||||
'url' => 'index.php?sec=general&sec2=godmode/setup/setup§ion=enterprise',
|
'url' => ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup§ion=enterprise'),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -1786,7 +1786,7 @@ class ConsoleSupervisor
|
|||||||
'type' => 'NOTIF.DOWNTIME',
|
'type' => 'NOTIF.DOWNTIME',
|
||||||
'title' => __('Scheduled downtime running.'),
|
'title' => __('Scheduled downtime running.'),
|
||||||
'message' => __('A scheduled downtime is running. Some monitoring data won\'t be available while downtime is taking place.'),
|
'message' => __('A scheduled downtime is running. Some monitoring data won\'t be available while downtime is taking place.'),
|
||||||
'url' => 'index.php?sec=gagente&sec2=godmode/agentes/planned_downtime.list',
|
'url' => ui_get_full_url('index.php?sec=gagente&sec2=godmode/agentes/planned_downtime.list'),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
@ -1947,7 +1947,7 @@ class ConsoleSupervisor
|
|||||||
date('M j, G:i:s ', $next_downtime_begin),
|
date('M j, G:i:s ', $next_downtime_begin),
|
||||||
date('M j, G:i:s ', $next_downtime_end)
|
date('M j, G:i:s ', $next_downtime_end)
|
||||||
),
|
),
|
||||||
'url' => 'index.php?sec=gagente&sec2=godmode/agentes/planned_downtime.list',
|
'url' => ui_get_full_url('index.php?sec=gagente&sec2=godmode/agentes/planned_downtime.list'),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
@ -2043,7 +2043,7 @@ class ConsoleSupervisor
|
|||||||
'type' => 'NOTIF.SECURITY.DEFAULT_PASSWORD',
|
'type' => 'NOTIF.SECURITY.DEFAULT_PASSWORD',
|
||||||
'title' => __('Default password for "Admin" user has not been changed'),
|
'title' => __('Default password for "Admin" user has not been changed'),
|
||||||
'message' => __('Please, change the default password since it is a commonly reported vulnerability.'),
|
'message' => __('Please, change the default password since it is a commonly reported vulnerability.'),
|
||||||
'url' => 'index.php?sec=gusuarios&sec2=godmode/users/user_list',
|
'url' => ui_get_full_url('index.php?sec=gusuarios&sec2=godmode/users/user_list'),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -2069,7 +2069,7 @@ class ConsoleSupervisor
|
|||||||
'type' => 'NOTIF.MISC.FONTPATH',
|
'type' => 'NOTIF.MISC.FONTPATH',
|
||||||
'title' => __('Default font doesn\'t exist'),
|
'title' => __('Default font doesn\'t exist'),
|
||||||
'message' => __('Your defined font doesn\'t exist or is not defined. Please, check font parameters in your config'),
|
'message' => __('Your defined font doesn\'t exist or is not defined. Please, check font parameters in your config'),
|
||||||
'url' => 'index.php?sec=gsetup&sec2=godmode/setup/setup§ion=vis',
|
'url' => ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup§ion=vis'),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -2096,7 +2096,7 @@ class ConsoleSupervisor
|
|||||||
'Your %s has the "develop_bypass" mode enabled. This is a developer mode and should be disabled in a production environment. This value is located in the main index.php file',
|
'Your %s has the "develop_bypass" mode enabled. This is a developer mode and should be disabled in a production environment. This value is located in the main index.php file',
|
||||||
get_product_name()
|
get_product_name()
|
||||||
),
|
),
|
||||||
'url' => 'index.php',
|
'url' => ui_get_full_url('index.php'),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -2119,7 +2119,7 @@ class ConsoleSupervisor
|
|||||||
'type' => 'NOTIF.MISC.EVENTSTORMPROTECTION',
|
'type' => 'NOTIF.MISC.EVENTSTORMPROTECTION',
|
||||||
'title' => __('Event storm protection is enabled.'),
|
'title' => __('Event storm protection is enabled.'),
|
||||||
'message' => __('Some events may get lost while this mode is enabled. The server must be restarted after altering this setting.'),
|
'message' => __('Some events may get lost while this mode is enabled. The server must be restarted after altering this setting.'),
|
||||||
'url' => 'index.php?sec=gsetup&sec2=godmode/setup/setup§ion=general',
|
'url' => ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup§ion=general'),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -2146,7 +2146,7 @@ class ConsoleSupervisor
|
|||||||
'type' => 'NOTIF.UPDATEMANAGER.OPENSETUP',
|
'type' => 'NOTIF.UPDATEMANAGER.OPENSETUP',
|
||||||
'title' => __('Failed to retrieve updates, please configure utility'),
|
'title' => __('Failed to retrieve updates, please configure utility'),
|
||||||
'message' => $message,
|
'message' => $message,
|
||||||
'url' => 'index.php?sec=gsetup&sec2=godmode/setup/setup§ion=general',
|
'url' => ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup§ion=general'),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -2165,8 +2165,8 @@ class ConsoleSupervisor
|
|||||||
'New %s Console update',
|
'New %s Console update',
|
||||||
get_product_name()
|
get_product_name()
|
||||||
),
|
),
|
||||||
'message' => __('There is a new update available. Please<a style="font-weight:bold;" href="index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=online"> go to Administration:Setup:Update Manager</a> for more details.'),
|
'message' => __('There is a new update available. Please<a style="font-weight:bold;" href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=online').'"> go to Administration:Setup:Update Manager</a> for more details.'),
|
||||||
'url' => 'index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=online',
|
'url' => ui_get_full_url('index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=online'),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -2204,7 +2204,7 @@ class ConsoleSupervisor
|
|||||||
'There is one or more minor releases available. <a style="font-size:8pt;font-style:italic;" target="blank" href="%s">.About minor release update</a>.',
|
'There is one or more minor releases available. <a style="font-size:8pt;font-style:italic;" target="blank" href="%s">.About minor release update</a>.',
|
||||||
$url
|
$url
|
||||||
),
|
),
|
||||||
'url' => 'index.php?sec=messages&sec2=godmode/update_manager/update_manager&tab=online',
|
'url' => ui_get_full_url('index.php?sec=messages&sec2=godmode/update_manager/update_manager&tab=online'),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -2253,7 +2253,7 @@ class ConsoleSupervisor
|
|||||||
'type' => 'NOTIF.CRON.CONFIGURED',
|
'type' => 'NOTIF.CRON.CONFIGURED',
|
||||||
'title' => __('DiscoveryConsoleTasks is not configured.'),
|
'title' => __('DiscoveryConsoleTasks is not configured.'),
|
||||||
'message' => __($message_conf_cron),
|
'message' => __($message_conf_cron),
|
||||||
'url' => 'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=tasklist',
|
'url' => ui_get_full_url('index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=tasklist'),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
/**
|
/**
|
||||||
* Pandora build version and version
|
* Pandora build version and version
|
||||||
*/
|
*/
|
||||||
$build_version = 'PC190904';
|
$build_version = 'PC190912';
|
||||||
$pandora_version = 'v7.0NG.738';
|
$pandora_version = 'v7.0NG.738';
|
||||||
|
|
||||||
// Do not overwrite default timezone set if defined.
|
// Do not overwrite default timezone set if defined.
|
||||||
|
@ -355,6 +355,12 @@ define('MODULE_PREDICTION_CLUSTER', 5);
|
|||||||
define('MODULE_PREDICTION_CLUSTER_AA', 6);
|
define('MODULE_PREDICTION_CLUSTER_AA', 6);
|
||||||
define('MODULE_PREDICTION_CLUSTER_AP', 7);
|
define('MODULE_PREDICTION_CLUSTER_AP', 7);
|
||||||
|
|
||||||
|
// Type of Webserver Modules.
|
||||||
|
define('MODULE_WEBSERVER_CHECK_LATENCY', 30);
|
||||||
|
define('MODULE_WEBSERVER_CHECK_SERVER_RESPONSE', 31);
|
||||||
|
define('MODULE_WEBSERVER_RETRIEVE_NUMERIC_DATA', 32);
|
||||||
|
define('MODULE_WEBSERVER_RETRIEVE_STRING_DATA', 33);
|
||||||
|
|
||||||
// SNMP CONSTANTS.
|
// SNMP CONSTANTS.
|
||||||
define('SNMP_DIR_MIBS', 'attachment/mibs');
|
define('SNMP_DIR_MIBS', 'attachment/mibs');
|
||||||
|
|
||||||
|
@ -2489,7 +2489,7 @@ function html_print_image(
|
|||||||
|
|
||||||
if (!is_readable($working_dir.'/enterprise/meta'.$src)) {
|
if (!is_readable($working_dir.'/enterprise/meta'.$src)) {
|
||||||
if ($isExternalLink) {
|
if ($isExternalLink) {
|
||||||
$src = ui_get_full_url($src);
|
$src = ui_get_full_url($src, false, false, false);
|
||||||
} else {
|
} else {
|
||||||
$src = ui_get_full_url('../..'.$src);
|
$src = ui_get_full_url('../..'.$src);
|
||||||
}
|
}
|
||||||
|
@ -3278,12 +3278,7 @@ function visual_map_get_color_line_status($layoutData)
|
|||||||
*/
|
*/
|
||||||
function visual_map_get_image_status_element($layoutData, $status=false)
|
function visual_map_get_image_status_element($layoutData, $status=false)
|
||||||
{
|
{
|
||||||
$metaconsole_hack = '';
|
$img = 'images/console/icons/'.$layoutData['image'];
|
||||||
if (is_metaconsole()) {
|
|
||||||
$metaconsole_hack = '../../';
|
|
||||||
}
|
|
||||||
|
|
||||||
$img = $metaconsole_hack.'images/console/icons/'.$layoutData['image'];
|
|
||||||
|
|
||||||
if ($layoutData['type'] == 5) {
|
if ($layoutData['type'] == 5) {
|
||||||
// ICON ELEMENT
|
// ICON ELEMENT
|
||||||
|
@ -91,6 +91,11 @@ function pandora_session_write($session_id, $data)
|
|||||||
{
|
{
|
||||||
$session_id = addslashes($session_id);
|
$session_id = addslashes($session_id);
|
||||||
|
|
||||||
|
// If it's an api call, the session must not be created.
|
||||||
|
if (get_parameter('op', false) && get_parameter('op2', false)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (is_ajax()) {
|
if (is_ajax()) {
|
||||||
// Avoid session upadte while processing ajax responses - notifications.
|
// Avoid session upadte while processing ajax responses - notifications.
|
||||||
if (get_parameter('check_new_notifications', false)) {
|
if (get_parameter('check_new_notifications', false)) {
|
||||||
|
@ -291,21 +291,9 @@ final class Group extends Item
|
|||||||
$width = (int) $data['width'];
|
$width = (int) $data['width'];
|
||||||
$height = (int) $data['height'];
|
$height = (int) $data['height'];
|
||||||
if ($width === 0 || $height === 0) {
|
if ($width === 0 || $height === 0) {
|
||||||
// TODO: This will be the default behaviour after we finish the
|
|
||||||
// builder. Don't delete this code.
|
|
||||||
// $sizeImage = getimagesize($config['homedir'].'/'.$imagePath);
|
|
||||||
// $data['width'] = $sizeImage[0];
|
|
||||||
// $data['height'] = $sizeImage[1];
|
|
||||||
$sizeImage = getimagesize($config['homedir'].'/'.$imagePath);
|
$sizeImage = getimagesize($config['homedir'].'/'.$imagePath);
|
||||||
$imageHeight = $sizeImage[1];
|
$data['width'] = $sizeImage[0];
|
||||||
|
$data['height'] = $sizeImage[1];
|
||||||
if ($width === 0) {
|
|
||||||
$data['width'] = 70;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($height === 0) {
|
|
||||||
$data['height'] = ($imageHeight > 70) ? 70 : $imageHeight;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$data['html'] = '<img src="'.$data['statusImageSrc'].'">';
|
$data['html'] = '<img src="'.$data['statusImageSrc'].'">';
|
||||||
|
@ -120,21 +120,9 @@ final class Icon extends Item
|
|||||||
$width = (int) $data['width'];
|
$width = (int) $data['width'];
|
||||||
$height = (int) $data['height'];
|
$height = (int) $data['height'];
|
||||||
if ($width === 0 || $height === 0) {
|
if ($width === 0 || $height === 0) {
|
||||||
// TODO: This will be the default behaviour after we finish the
|
|
||||||
// builder. Don't delete this code.
|
|
||||||
// $sizeImage = getimagesize($config['homedir'].'/'.$imagePath);
|
|
||||||
// $data['width'] = $sizeImage[0];
|
|
||||||
// $data['height'] = $sizeImage[1];
|
|
||||||
$sizeImage = getimagesize($config['homedir'].'/'.$imagePath);
|
$sizeImage = getimagesize($config['homedir'].'/'.$imagePath);
|
||||||
$imageHeight = $sizeImage[1];
|
$data['width'] = $sizeImage[0];
|
||||||
|
$data['height'] = $sizeImage[1];
|
||||||
if ($width === 0) {
|
|
||||||
$data['width'] = 70;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($height === 0) {
|
|
||||||
$data['height'] = ($imageHeight > 70) ? 70 : $imageHeight;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
|
@ -184,23 +184,9 @@ final class StaticGraph extends Item
|
|||||||
$width = (int) $data['width'];
|
$width = (int) $data['width'];
|
||||||
$height = (int) $data['height'];
|
$height = (int) $data['height'];
|
||||||
if ($width === 0 || $height === 0) {
|
if ($width === 0 || $height === 0) {
|
||||||
// TODO: This will be the default behaviour after we finish the
|
|
||||||
// builder. Don't delete this code.
|
|
||||||
// $sizeImage = getimagesize($config['homedir'].'/'.$imagePath);
|
|
||||||
// $data['width'] = $sizeImage[0];
|
|
||||||
// $data['height'] = $sizeImage[1];
|
|
||||||
// Default value. Will be replaced by a dynamic image size
|
|
||||||
// calculation after the phase 3.
|
|
||||||
$sizeImage = getimagesize($config['homedir'].'/'.$imagePath);
|
$sizeImage = getimagesize($config['homedir'].'/'.$imagePath);
|
||||||
$imageHeight = $sizeImage[1];
|
$data['width'] = $sizeImage[0];
|
||||||
|
$data['height'] = $sizeImage[1];
|
||||||
if ($width === 0) {
|
|
||||||
$data['width'] = 70;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($height === 0) {
|
|
||||||
$data['height'] = ($imageHeight > 70) ? 70 : $imageHeight;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get last value.
|
// Get last value.
|
||||||
|
@ -129,7 +129,7 @@
|
|||||||
<div style='height: 10px'>
|
<div style='height: 10px'>
|
||||||
<?php
|
<?php
|
||||||
$version = '7.0NG.738';
|
$version = '7.0NG.738';
|
||||||
$build = '190904';
|
$build = '190912';
|
||||||
$banner = "v$version Build $build";
|
$banner = "v$version Build $build";
|
||||||
|
|
||||||
error_reporting(0);
|
error_reporting(0);
|
||||||
|
@ -624,6 +624,13 @@ if (empty($agents)) {
|
|||||||
$agents = [];
|
$agents = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$agent_font_size = 'font-size: 7px';
|
||||||
|
$description_font_size = 'font-size: 6.5px';
|
||||||
|
if ($config['language'] == 'ja' || $config['language'] == 'zh_CN' || $own_info['language'] == 'ja' || $own_info['language'] == 'zh_CN') {
|
||||||
|
$agent_font_size = 'font-size: 15px';
|
||||||
|
$description_font_size = 'font-size: 11px';
|
||||||
|
}
|
||||||
|
|
||||||
// Urls to sort the table.
|
// Urls to sort the table.
|
||||||
$url_up_agente = 'index.php?sec=view&sec2=operation/agentes/estado_agente&refr='.$refr.'&offset='.$offset.'&group_id='.$group_id.'&recursion='.$recursion.'&search='.$search.'&status='.$status.'&sort_field=name&sort=up';
|
$url_up_agente = 'index.php?sec=view&sec2=operation/agentes/estado_agente&refr='.$refr.'&offset='.$offset.'&group_id='.$group_id.'&recursion='.$recursion.'&search='.$search.'&status='.$status.'&sort_field=name&sort=up';
|
||||||
$url_down_agente = 'index.php?sec=view&sec2=operation/agentes/estado_agente&refr='.$refr.'&offset='.$offset.'&group_id='.$group_id.'&recursion='.$recursion.'&search='.$search.'&status='.$status.'&sort_field=name&sort=down';
|
$url_down_agente = 'index.php?sec=view&sec2=operation/agentes/estado_agente&refr='.$refr.'&offset='.$offset.'&group_id='.$group_id.'&recursion='.$recursion.'&search='.$search.'&status='.$status.'&sort_field=name&sort=down';
|
||||||
@ -739,7 +746,7 @@ foreach ($agents as $agent) {
|
|||||||
$data[0] = '<div class="left_'.$agent['id_agente'].'">';
|
$data[0] = '<div class="left_'.$agent['id_agente'].'">';
|
||||||
$data[0] .= '<span>';
|
$data[0] .= '<span>';
|
||||||
|
|
||||||
$data[0] .= '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$agent['id_agente'].'"> <span style="font-size: 7pt;font-weight:bold" title ="'.$agent['nombre'].'">'.$agent['alias'].'</span></a>';
|
$data[0] .= '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$agent['id_agente'].'"> <span style="'.$agent_font_size.';font-weight:bold" title ="'.$agent['nombre'].'">'.$agent['alias'].'</span></a>';
|
||||||
$data[0] .= '</span>';
|
$data[0] .= '</span>';
|
||||||
|
|
||||||
if ($agent['quiet']) {
|
if ($agent['quiet']) {
|
||||||
@ -772,7 +779,7 @@ foreach ($agents as $agent) {
|
|||||||
|
|
||||||
$data[0] .= '</div></div>';
|
$data[0] .= '</div></div>';
|
||||||
|
|
||||||
$data[1] = ui_print_truncate_text($agent['description'], 'description', false, true, true, '[…]', 'font-size: 6.5pt');
|
$data[1] = ui_print_truncate_text($agent['description'], 'description', false, true, true, '[…]', $description_font_size);
|
||||||
|
|
||||||
$data[10] = '';
|
$data[10] = '';
|
||||||
|
|
||||||
|
@ -1031,15 +1031,14 @@ $adv_inputs[] = $in;
|
|||||||
// Only alert events.
|
// Only alert events.
|
||||||
$data = html_print_select(
|
$data = html_print_select(
|
||||||
[
|
[
|
||||||
'-1' => __('All'),
|
'0' => __('Filter alert events'),
|
||||||
'0' => __('Filter alert events'),
|
'1' => __('Only alert events'),
|
||||||
'1' => __('Only alert events'),
|
|
||||||
],
|
],
|
||||||
'filter_only_alert',
|
'filter_only_alert',
|
||||||
$filter_only_alert,
|
$filter_only_alert,
|
||||||
'',
|
'',
|
||||||
'',
|
__('All'),
|
||||||
'',
|
-1,
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
$in = '<div class="filter_input"><label>'.__('Alert events').'</label>';
|
$in = '<div class="filter_input"><label>'.__('Alert events').'</label>';
|
||||||
|
@ -155,7 +155,7 @@ foreach ($traps_generated_by_source as $trap) {
|
|||||||
$row['source'] = '<a href="index.php?sec=estado&sec2=godmode/agentes/configurar_agente&new_agent=1&direccion='.$trap['source'].'" title="'.__('Create agent').'">'.$trap['source'].'</a>';
|
$row['source'] = '<a href="index.php?sec=estado&sec2=godmode/agentes/configurar_agente&new_agent=1&direccion='.$trap['source'].'" title="'.__('Create agent').'">'.$trap['source'].'</a>';
|
||||||
} else {
|
} else {
|
||||||
$agent_id = $agent['id_agente'];
|
$agent_id = $agent['id_agente'];
|
||||||
$agent_name = ui_print_truncate_text($agent['nombre'], 'agent_medium', true, true, true, '[…]', '');
|
$agent_name = ui_print_truncate_text($agent['alias'], 'agent_medium', true, true, true, '[…]', '');
|
||||||
$row['source'] = "<a href=\"index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=$agent_id\" title=\"".__('View agent details').'">';
|
$row['source'] = "<a href=\"index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=$agent_id\" title=\"".__('View agent details').'">';
|
||||||
$row['source'] .= "<strong>$agent_name</strong></a>";
|
$row['source'] .= "<strong>$agent_name</strong></a>";
|
||||||
}
|
}
|
||||||
|
@ -40,6 +40,9 @@ ob_start('ui_process_page_head');
|
|||||||
// Enterprise main
|
// Enterprise main
|
||||||
enterprise_include('index.php');
|
enterprise_include('index.php');
|
||||||
|
|
||||||
|
$url_css = ui_get_full_url('include/styles/visual_maps.css', false, false, false);
|
||||||
|
echo '<link rel="stylesheet" href="'.$url_css.'" type="text/css" />';
|
||||||
|
|
||||||
require_once 'include/functions_visual_map.php';
|
require_once 'include/functions_visual_map.php';
|
||||||
|
|
||||||
$hash = get_parameter('hash');
|
$hash = get_parameter('hash');
|
||||||
@ -96,31 +99,40 @@ if ($layout) {
|
|||||||
echo '<div id="vc-container"></div>';
|
echo '<div id="vc-container"></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Floating menu - Start
|
// Floating menu - Start.
|
||||||
echo '<div id="vc-controls" style="z-index:300;">';
|
echo '<div id="vc-controls" style="z-index:300;">';
|
||||||
|
|
||||||
echo '<div id="menu_tab">';
|
echo '<div id="menu_tab">';
|
||||||
echo '<ul class="mn">';
|
echo '<ul class="mn white-box-content box-shadow flex-row">';
|
||||||
|
|
||||||
// QR code
|
// QR code.
|
||||||
echo '<li class="nomn">';
|
echo '<li class="nomn">';
|
||||||
echo '<a href="javascript: show_dialog_qrcode();">';
|
echo '<a href="javascript: show_dialog_qrcode();">';
|
||||||
echo '<img class="vc-qr" src="../../images/qrcode_icon_2.jpg"/>';
|
echo '<img class="vc-qr" src="../../images/qrcode_icon_2.jpg"/>';
|
||||||
echo '</a>';
|
echo '</a>';
|
||||||
echo '</li>';
|
echo '</li>';
|
||||||
|
|
||||||
// Countdown
|
// Countdown.
|
||||||
echo '<li class="nomn">';
|
echo '<li class="nomn">';
|
||||||
echo '<div class="vc-refr">';
|
echo '<div class="vc-refr">';
|
||||||
echo '<div class="vc-countdown"></div>';
|
|
||||||
echo '<div id="vc-refr-form">';
|
echo '<div id="vc-refr-form">';
|
||||||
echo __('Refresh').':';
|
echo __('Refresh').':';
|
||||||
echo html_print_select(get_refresh_time_array(), 'refr', $refr, '', '', 0, true, false, false);
|
echo html_print_select(
|
||||||
|
get_refresh_time_array(),
|
||||||
|
'vc-refr',
|
||||||
|
$refr,
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
0,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
false
|
||||||
|
);
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
echo '</li>';
|
echo '</li>';
|
||||||
|
|
||||||
// Console name
|
// Console name.
|
||||||
echo '<li class="nomn">';
|
echo '<li class="nomn">';
|
||||||
echo '<div class="vc-title">'.$layout_name.'</div>';
|
echo '<div class="vc-title">'.$layout_name.'</div>';
|
||||||
echo '</li>';
|
echo '</li>';
|
||||||
@ -129,15 +141,15 @@ echo '</ul>';
|
|||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
// Floating menu - End
|
|
||||||
// QR code dialog
|
// QR code dialog.
|
||||||
echo '<div style="display: none;" id="qrcode_container" title="'.__('QR code of the page').'">';
|
echo '<div style="display: none;" id="qrcode_container" title="'.__('QR code of the page').'">';
|
||||||
echo '<div id="qrcode_container_image"></div>';
|
echo '<div id="qrcode_container_image"></div>';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
||||||
ui_require_jquery_file('countdown');
|
ui_require_jquery_file('countdown', 'include/javascript/', true);
|
||||||
ui_require_javascript_file('wz_jsgraphics');
|
ui_require_javascript_file('wz_jsgraphics', 'include/javascript/', true);
|
||||||
ui_require_javascript_file('pandora_visual_console');
|
ui_require_javascript_file('pandora_visual_console', 'include/javascript/', true);
|
||||||
$ignored_params['refr'] = '';
|
$ignored_params['refr'] = '';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
@ -42,6 +42,9 @@ ob_start('ui_process_page_head');
|
|||||||
// Enterprise main.
|
// Enterprise main.
|
||||||
enterprise_include('index.php');
|
enterprise_include('index.php');
|
||||||
|
|
||||||
|
$url_css = ui_get_full_url('include/styles/visual_maps.css', false, false, false);
|
||||||
|
echo '<link rel="stylesheet" href="'.$url_css.'" type="text/css" />';
|
||||||
|
|
||||||
require_once 'include/functions_visual_map.php';
|
require_once 'include/functions_visual_map.php';
|
||||||
|
|
||||||
$hash = (string) get_parameter('hash');
|
$hash = (string) get_parameter('hash');
|
||||||
@ -134,7 +137,7 @@ if (!users_can_manage_group_all('AR')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$ignored_params['refr'] = '';
|
$ignored_params['refr'] = '';
|
||||||
ui_require_javascript_file('pandora_visual_console');
|
ui_require_javascript_file('pandora_visual_console', 'include/javascript/', true);
|
||||||
include_javascript_d3();
|
include_javascript_d3();
|
||||||
visual_map_load_client_resources();
|
visual_map_load_client_resources();
|
||||||
|
|
||||||
@ -157,6 +160,10 @@ $visualConsoleItems = VisualConsole::getItemsFromDB(
|
|||||||
var props = <?php echo (string) $visualConsole; ?>;
|
var props = <?php echo (string) $visualConsole; ?>;
|
||||||
var items = <?php echo '['.implode($visualConsoleItems, ',').']'; ?>;
|
var items = <?php echo '['.implode($visualConsoleItems, ',').']'; ?>;
|
||||||
var baseUrl = "<?php echo ui_get_full_url('/', false, false, false); ?>";
|
var baseUrl = "<?php echo ui_get_full_url('/', false, false, false); ?>";
|
||||||
|
|
||||||
|
var controls = document.getElementById('vc-controls');
|
||||||
|
autoHideElement(controls, 1000);
|
||||||
|
|
||||||
var handleUpdate = function (prevProps, newProps) {
|
var handleUpdate = function (prevProps, newProps) {
|
||||||
if (!newProps) return;
|
if (!newProps) return;
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.738
|
%define version 7.0NG.738
|
||||||
%define release 190904
|
%define release 190912
|
||||||
|
|
||||||
# User and Group under which Apache is running
|
# User and Group under which Apache is running
|
||||||
%define httpd_name httpd
|
%define httpd_name httpd
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.738
|
%define version 7.0NG.738
|
||||||
%define release 190904
|
%define release 190912
|
||||||
|
|
||||||
# User and Group under which Apache is running
|
# User and Group under which Apache is running
|
||||||
%define httpd_name httpd
|
%define httpd_name httpd
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.738
|
%define version 7.0NG.738
|
||||||
%define release 190904
|
%define release 190912
|
||||||
%define httpd_name httpd
|
%define httpd_name httpd
|
||||||
# User and Group under which Apache is running
|
# User and Group under which Apache is running
|
||||||
%define httpd_name apache2
|
%define httpd_name apache2
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-server
|
package: pandorafms-server
|
||||||
Version: 7.0NG.738-190904
|
Version: 7.0NG.738-190912
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
pandora_version="7.0NG.738-190904"
|
pandora_version="7.0NG.738-190912"
|
||||||
|
|
||||||
package_cpan=0
|
package_cpan=0
|
||||||
package_pandora=1
|
package_pandora=1
|
||||||
|
@ -45,7 +45,7 @@ our @EXPORT = qw(
|
|||||||
|
|
||||||
# version: Defines actual version of Pandora Server for this module only
|
# version: Defines actual version of Pandora Server for this module only
|
||||||
my $pandora_version = "7.0NG.738";
|
my $pandora_version = "7.0NG.738";
|
||||||
my $pandora_build = "190904";
|
my $pandora_build = "190912";
|
||||||
our $VERSION = $pandora_version." ".$pandora_build;
|
our $VERSION = $pandora_version." ".$pandora_build;
|
||||||
|
|
||||||
# Setup hash
|
# Setup hash
|
||||||
|
@ -32,7 +32,7 @@ our @ISA = qw(Exporter);
|
|||||||
|
|
||||||
# version: Defines actual version of Pandora Server for this module only
|
# version: Defines actual version of Pandora Server for this module only
|
||||||
my $pandora_version = "7.0NG.738";
|
my $pandora_version = "7.0NG.738";
|
||||||
my $pandora_build = "190904";
|
my $pandora_build = "190912";
|
||||||
our $VERSION = $pandora_version." ".$pandora_build;
|
our $VERSION = $pandora_version." ".$pandora_build;
|
||||||
|
|
||||||
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_server
|
%define name pandorafms_server
|
||||||
%define version 7.0NG.738
|
%define version 7.0NG.738
|
||||||
%define release 190904
|
%define release 190912
|
||||||
|
|
||||||
Summary: Pandora FMS Server
|
Summary: Pandora FMS Server
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_server
|
%define name pandorafms_server
|
||||||
%define version 7.0NG.738
|
%define version 7.0NG.738
|
||||||
%define release 190904
|
%define release 190912
|
||||||
|
|
||||||
Summary: Pandora FMS Server
|
Summary: Pandora FMS Server
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# **********************************************************************
|
# **********************************************************************
|
||||||
|
|
||||||
PI_VERSION="7.0NG.738"
|
PI_VERSION="7.0NG.738"
|
||||||
PI_BUILD="190904"
|
PI_BUILD="190912"
|
||||||
|
|
||||||
MODE=$1
|
MODE=$1
|
||||||
if [ $# -gt 1 ]; then
|
if [ $# -gt 1 ]; then
|
||||||
|
@ -34,7 +34,7 @@ use PandoraFMS::Config;
|
|||||||
use PandoraFMS::DB;
|
use PandoraFMS::DB;
|
||||||
|
|
||||||
# version: define current version
|
# version: define current version
|
||||||
my $version = "7.0NG.738 PS190904";
|
my $version = "7.0NG.738 PS190912";
|
||||||
|
|
||||||
# Pandora server configuration
|
# Pandora server configuration
|
||||||
my %conf;
|
my %conf;
|
||||||
@ -136,7 +136,7 @@ sub pandora_purgedb ($$) {
|
|||||||
pandora_delete_old_export_data ($dbh, $ulimit_timestamp);
|
pandora_delete_old_export_data ($dbh, $ulimit_timestamp);
|
||||||
|
|
||||||
# Delete sessions data
|
# Delete sessions data
|
||||||
pandora_delete_old_session_data ($dbh, $ulimit_timestamp);
|
pandora_delete_old_session_data (\%conf, $dbh, $ulimit_timestamp);
|
||||||
|
|
||||||
# Delete old inventory data
|
# Delete old inventory data
|
||||||
|
|
||||||
@ -678,6 +678,7 @@ sub pandora_load_config_pdb ($) {
|
|||||||
$conf->{'_netflow_nfexpire'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'netflow_nfexpire'");
|
$conf->{'_netflow_nfexpire'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'netflow_nfexpire'");
|
||||||
$conf->{'_netflow_path'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'netflow_path'");
|
$conf->{'_netflow_path'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'netflow_path'");
|
||||||
$conf->{'_delete_notinit'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'delete_notinit'");
|
$conf->{'_delete_notinit'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'delete_notinit'");
|
||||||
|
$conf->{'_session_timeout'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'session_timeout'");
|
||||||
|
|
||||||
$conf->{'_big_operation_step_datos_purge'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'big_operation_step_datos_purge'");
|
$conf->{'_big_operation_step_datos_purge'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'big_operation_step_datos_purge'");
|
||||||
$conf->{'_small_operation_step_datos_purge'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'small_operation_step_datos_purge'");
|
$conf->{'_small_operation_step_datos_purge'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'small_operation_step_datos_purge'");
|
||||||
@ -990,12 +991,28 @@ sub pandora_delete_old_export_data {
|
|||||||
# Delete old session data.
|
# Delete old session data.
|
||||||
##############################################################################
|
##############################################################################
|
||||||
sub pandora_delete_old_session_data {
|
sub pandora_delete_old_session_data {
|
||||||
my ($dbh, $ulimit_timestamp) = @_;
|
my ($conf, $dbh, $ulimit_timestamp) = @_;
|
||||||
|
|
||||||
|
my $session_timeout = $conf->{'_session_timeout'};
|
||||||
|
|
||||||
|
if ($session_timeout ne '') {
|
||||||
|
if ($session_timeout == -1) {
|
||||||
|
# The session expires in 10 years
|
||||||
|
$session_timeout = 315576000;
|
||||||
|
} else {
|
||||||
|
$session_timeout *= 60;
|
||||||
|
}
|
||||||
|
|
||||||
|
$ulimit_timestamp = time() - $session_timeout;
|
||||||
|
}
|
||||||
|
|
||||||
log_message ('PURGE', "Deleting old session data from tsessions_php\n");
|
log_message ('PURGE', "Deleting old session data from tsessions_php\n");
|
||||||
while(db_delete_limit ($dbh, 'tsessions_php', 'last_active < ?', $SMALL_OPERATION_STEP, $ulimit_timestamp) ne '0E0') {
|
while(db_delete_limit ($dbh, 'tsessions_php', 'last_active < ?', $SMALL_OPERATION_STEP, $ulimit_timestamp) ne '0E0') {
|
||||||
usleep (10000);
|
usleep (10000);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
db_do ($dbh, "DELETE FROM tsessions_php WHERE
|
||||||
|
data IS NULL OR id_session REGEXP '^cron-'");
|
||||||
}
|
}
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
@ -36,7 +36,7 @@ use Encode::Locale;
|
|||||||
Encode::Locale::decode_argv;
|
Encode::Locale::decode_argv;
|
||||||
|
|
||||||
# version: define current version
|
# version: define current version
|
||||||
my $version = "7.0NG.738 PS190904";
|
my $version = "7.0NG.738 PS190912";
|
||||||
|
|
||||||
# save program name for logging
|
# save program name for logging
|
||||||
my $progname = basename($0);
|
my $progname = basename($0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user