mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 08:45:12 +02:00
Merge remote-tracking branch 'origin' into ent-9662-Restyling-fuentes-colores-botones
This commit is contained in:
commit
e3b2ec529a
@ -1,5 +1,5 @@
|
||||
package: pandorafms-agent-unix
|
||||
Version: 7.0NG.768-230131
|
||||
Version: 7.0NG.768-230203
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
@ -14,7 +14,7 @@
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.768-230131"
|
||||
pandora_version="7.0NG.768-230203"
|
||||
|
||||
echo "Test if you has the tools for to make the packages."
|
||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||
|
@ -1015,7 +1015,7 @@ my $Sem = undef;
|
||||
my $ThreadSem = undef;
|
||||
|
||||
use constant AGENT_VERSION => '7.0NG.768';
|
||||
use constant AGENT_BUILD => '230131';
|
||||
use constant AGENT_BUILD => '230203';
|
||||
|
||||
# Agent log default file size maximum and instances
|
||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
%define name pandorafms_agent_linux
|
||||
%define version 7.0NG.768
|
||||
%define release 230131
|
||||
%define release 230203
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
%define name pandorafms_agent_linux
|
||||
%define version 7.0NG.768
|
||||
%define release 230131
|
||||
%define release 230203
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
@ -10,7 +10,7 @@
|
||||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.768"
|
||||
PI_BUILD="230131"
|
||||
PI_BUILD="230203"
|
||||
OS_NAME=`uname -s`
|
||||
|
||||
FORCE=0
|
||||
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
||||
{}
|
||||
|
||||
Version
|
||||
{230131}
|
||||
{230203}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
||||
using namespace Pandora_Strutils;
|
||||
|
||||
#define PATH_SIZE _MAX_PATH+1
|
||||
#define PANDORA_VERSION ("7.0NG.768 Build 230131")
|
||||
#define PANDORA_VERSION ("7.0NG.768 Build 230203")
|
||||
|
||||
string pandora_path;
|
||||
string pandora_dir;
|
||||
|
@ -11,7 +11,7 @@ BEGIN
|
||||
VALUE "LegalCopyright", "Artica ST"
|
||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||
VALUE "ProductVersion", "(7.0NG.768(Build 230131))"
|
||||
VALUE "ProductVersion", "(7.0NG.768(Build 230203))"
|
||||
VALUE "FileVersion", "1.0.0.0"
|
||||
END
|
||||
END
|
||||
|
@ -1,5 +1,5 @@
|
||||
package: pandorafms-console
|
||||
Version: 7.0NG.768-230131
|
||||
Version: 7.0NG.768-230203
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
@ -14,7 +14,7 @@
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.768-230131"
|
||||
pandora_version="7.0NG.768-230203"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
@ -103,6 +103,15 @@ function api_execute(
|
||||
}
|
||||
}
|
||||
|
||||
$url_protocol = parse_url($url)['scheme'];
|
||||
|
||||
if ($url_protocol !== 'http' && $url_protocol !== 'https') {
|
||||
return [
|
||||
'url' => $url,
|
||||
'result' => '',
|
||||
];
|
||||
}
|
||||
|
||||
$curlObj = curl_init($url);
|
||||
if (empty($data) === false) {
|
||||
$url .= http_build_query($data);
|
||||
|
@ -1,5 +1,7 @@
|
||||
START TRANSACTION;
|
||||
|
||||
ALTER TABLE `tserver` ADD COLUMN `server_keepalive_utimestamp` BIGINT NOT NULL DEFAULT 0;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `tsesion_filter` (
|
||||
`id_filter` INT NOT NULL AUTO_INCREMENT,
|
||||
`id_name` TEXT NULL,
|
||||
|
@ -1959,7 +1959,7 @@ if ($create_module) {
|
||||
$agent = db_get_row('tagente', 'id_agente', $id_agente);
|
||||
db_pandora_audit(
|
||||
AUDIT_LOG_AGENT_MANAGEMENT,
|
||||
"Added module '".io_safe_output($name)."' for agent ".io_safe_output($agent['alias']),
|
||||
"Added module '".db_escape_string_sql($name)."' for agent ".io_safe_output($agent['alias']),
|
||||
false,
|
||||
true,
|
||||
io_json_mb_encode($values)
|
||||
|
@ -2143,6 +2143,12 @@ function process_manage_edit($module_name, $agents_select=null, $module_status='
|
||||
}
|
||||
break;
|
||||
|
||||
case 'dynamic_interval':
|
||||
if ($value !== '-2') {
|
||||
$values[$field] = $value;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'plugin_pass':
|
||||
if ($value != '') {
|
||||
$values['plugin_pass'] = io_input_password($value);
|
||||
|
@ -894,6 +894,11 @@ ui_require_javascript_file('tiny_mce', 'include/javascript/tiny_mce/');
|
||||
var id_layout_data = $("#active_id_layout_data").val();
|
||||
var label = tinyMCE.activeEditor.getContent();
|
||||
$("#hidden-label_" + id_layout_data).val(label);
|
||||
},
|
||||
buttons: {
|
||||
Save: function() {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -230,9 +230,64 @@ if ($filemanager) {
|
||||
$directory = filemanager_safe_directory($directory, $fallback_directory);
|
||||
}
|
||||
|
||||
$base_url = 'index.php?sec=gservers&sec2=godmode/servers/plugin';
|
||||
$setup_url = $base_url.'&filemanager=1&tab=Attachments';
|
||||
$tab = get_parameter('tab', null);
|
||||
$tabs = [
|
||||
'list' => [
|
||||
'text' => '<a href="'.$base_url.'">'.html_print_image(
|
||||
'images/eye_show.png',
|
||||
true,
|
||||
[
|
||||
'title' => __('Plugins'),
|
||||
'class' => 'invert_filter',
|
||||
]
|
||||
).'</a>',
|
||||
'active' => (bool) ($tab != 'Attachments'),
|
||||
],
|
||||
'options' => [
|
||||
'text' => '<a href="'.$setup_url.'">'.html_print_image(
|
||||
'images/collection.png',
|
||||
true,
|
||||
[
|
||||
'title' => __('Attachments'),
|
||||
'class' => 'invert_filter',
|
||||
]
|
||||
).'</a>',
|
||||
'active' => (bool) ($tab == 'Attachments'),
|
||||
],
|
||||
];
|
||||
|
||||
if ($tab === 'Attachments') {
|
||||
$helpHeader = '';
|
||||
$titleHeader = __('Index of attachment/plugin');
|
||||
} else {
|
||||
$helpHeader = 'servers_ha_clusters_tab';
|
||||
$titleHeader = __('Plug-ins registered on %s', get_product_name());
|
||||
}
|
||||
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
$titleHeader,
|
||||
'images/gm_servers.png',
|
||||
false,
|
||||
$helpHeader,
|
||||
false,
|
||||
$tabs,
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Servers'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Plugins'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$real_directory = realpath($config['homedir'].'/'.$directory);
|
||||
|
||||
echo '<h4>'.__('Index of %s', $directory).'</h4>';
|
||||
|
||||
$chunck_url = '&view='.$id_plugin;
|
||||
if ($id_plugin == 0) {
|
||||
@ -255,7 +310,7 @@ if ($filemanager) {
|
||||
filemanager_file_explorer(
|
||||
$real_directory,
|
||||
$directory,
|
||||
'index.php?sec=gservers&sec2=godmode/servers/plugin&filemanager=1&id_plugin='.$id_plugin,
|
||||
'index.php?sec=gservers&sec2=godmode/servers/plugin&filemanager=1&id_plugin='.$id_plugin.'&tab=Attachments',
|
||||
$fallback_directory,
|
||||
true,
|
||||
false,
|
||||
@ -401,7 +456,7 @@ if (($create != '') || ($view != '')) {
|
||||
$data[0] = __('Plugin command').ui_print_help_tip(__('Specify interpreter and plugin path. The server needs permissions to run it.'), true);
|
||||
$data[1] = '<input type="text" name="form_execute" id="form_execute" class="command_component command_advanced_conf text_input" size=100 value="'.$form_execute.'" >';
|
||||
|
||||
$data[1] .= ' <a href="index.php?sec=gservers&sec2=godmode/servers/plugin&filemanager=1&id_plugin='.$form_id.'" class="bot">';
|
||||
$data[1] .= ' <a href="index.php?sec=gservers&sec2=godmode/servers/plugin&filemanager=1&tab=Attachments&id_plugin='.$form_id.'" class="bot">';
|
||||
$data[1] .= html_print_image('images/file.png', true, ['class' => 'invert_filter'], false, true);
|
||||
$data[1] .= '</a>';
|
||||
$table->data['plugin_command'] = $data;
|
||||
@ -597,15 +652,60 @@ if (($create != '') || ($view != '')) {
|
||||
);
|
||||
}
|
||||
} else {
|
||||
ui_print_page_header(
|
||||
__(
|
||||
'Plug-ins registered on %s',
|
||||
get_product_name()
|
||||
),
|
||||
$base_url = 'index.php?sec=gservers&sec2=godmode/servers/plugin';
|
||||
$setup_url = $base_url.'&filemanager=1&tab=Attachments';
|
||||
$tab = get_parameter('tab', null);
|
||||
$tabs = [
|
||||
'list' => [
|
||||
'text' => '<a href="'.$base_url.'">'.html_print_image(
|
||||
'images/eye_show.png',
|
||||
true,
|
||||
[
|
||||
'title' => __('Plugins'),
|
||||
'class' => 'invert_filter',
|
||||
]
|
||||
).'</a>',
|
||||
'active' => (bool) ($tab != 'Attachments'),
|
||||
],
|
||||
'options' => [
|
||||
'text' => '<a href="'.$setup_url.'">'.html_print_image(
|
||||
'images/collection.png',
|
||||
true,
|
||||
[
|
||||
'title' => __('Attachments'),
|
||||
'class' => 'invert_filter',
|
||||
]
|
||||
).'</a>',
|
||||
'active' => (bool) ($tab == 'Attachments'),
|
||||
],
|
||||
];
|
||||
|
||||
if ($tab === 'Attachments') {
|
||||
$helpHeader = '';
|
||||
$titleHeader = __('Index of attachment/plugin');
|
||||
} else {
|
||||
$helpHeader = 'servers_ha_clusters_tab';
|
||||
$titleHeader = __('Plug-ins registered on %s', get_product_name());
|
||||
}
|
||||
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
$titleHeader,
|
||||
'images/gm_servers.png',
|
||||
false,
|
||||
'',
|
||||
true
|
||||
$helpHeader,
|
||||
false,
|
||||
$tabs,
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Servers'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Plugins'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$management_allowed = is_management_allowed();
|
||||
|
@ -110,6 +110,12 @@ foreach ($servers as $server) {
|
||||
];
|
||||
$data[0] = '<span title="'.$server['version'].'">'.strip_tags($server['name']).'</span>';
|
||||
|
||||
$server_keepalive = time_w_fixed_tz($server['keepalive']);
|
||||
|
||||
if ($server['server_keepalive_utimestamp'] > 0) {
|
||||
$server_keepalive = $server['server_keepalive_utimestamp'];
|
||||
}
|
||||
|
||||
// Status.
|
||||
$data[1] = ui_print_status_image(STATUS_SERVER_OK, '', true);
|
||||
if ($server['status'] == -1) {
|
||||
@ -119,7 +125,7 @@ foreach ($servers as $server) {
|
||||
true
|
||||
);
|
||||
} else if ((int) ($server['status'] === 0)
|
||||
|| (($date - time_w_fixed_tz($server['keepalive'])) > ($server['server_keepalive']) * 2)
|
||||
|| (($date - $server_keepalive) > ($server['server_keepalive']) * 2)
|
||||
) {
|
||||
$data[1] = ui_print_status_image(
|
||||
STATUS_SERVER_DOWN,
|
||||
|
@ -87,6 +87,20 @@ $create_text_file = (bool) get_parameter('create_text_file');
|
||||
|
||||
$default_real_directory = realpath($config['homedir'].'/');
|
||||
|
||||
// Remove double dot in filename path.
|
||||
$file_name = $_FILES['file']['name'];
|
||||
$path_parts = explode('/', $file_name);
|
||||
|
||||
$stripped_parts = array_filter(
|
||||
$path_parts,
|
||||
function ($value) {
|
||||
return $value !== '..';
|
||||
}
|
||||
);
|
||||
|
||||
$stripped_path = implode('/', $stripped_parts);
|
||||
$_FILES['file']['name'] = $stripped_path;
|
||||
|
||||
if ($upload_file === true) {
|
||||
upload_file(
|
||||
$upload_file,
|
||||
|
@ -900,7 +900,7 @@ class CalendarManager
|
||||
$id_group = get_parameter('id_group', null);
|
||||
$day_code = get_parameter('day_code', null);
|
||||
$id_calendar = get_parameter('id_calendar', null);
|
||||
$description = get_parameter('description', null);
|
||||
$description = io_safe_input(get_parameter('description', null));
|
||||
$change = true;
|
||||
if ($new === false
|
||||
&& ($date === $specialDay->date()
|
||||
|
@ -659,15 +659,6 @@ class Diagnostics extends Wizard
|
||||
{
|
||||
global $config;
|
||||
|
||||
// Size BBDD.
|
||||
$dbSizeSql = db_get_value_sql(
|
||||
'SELECT ROUND(SUM(data_length+index_length)/1024/1024,3)
|
||||
FROM information_schema.TABLES'
|
||||
);
|
||||
|
||||
// Add unit size.
|
||||
$dbSize = $dbSizeSql.' M';
|
||||
|
||||
$result = [
|
||||
'error' => false,
|
||||
'data' => [
|
||||
@ -683,10 +674,6 @@ class Diagnostics extends Wizard
|
||||
'name' => __('DB Schema Build'),
|
||||
'value' => $config['db_scheme_build'],
|
||||
],
|
||||
'dbSize' => [
|
||||
'name' => __('DB Size'),
|
||||
'value' => $dbSize,
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
/**
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC230131';
|
||||
$build_version = 'PC230203';
|
||||
$pandora_version = 'v7.0NG.768';
|
||||
|
||||
// Do not overwrite default timezone set if defined.
|
||||
|
@ -12471,9 +12471,26 @@ function api_get_total_modules($id_group, $trash1, $trash2, $returnType)
|
||||
return;
|
||||
}
|
||||
|
||||
$partial = tactical_status_modules_agents($config['id_user'], false, 'AR');
|
||||
if ($id_group) {
|
||||
$groups_clause = '1 = 1';
|
||||
if (!users_is_admin($config['id_user'])) {
|
||||
$user_groups = implode(',', array_keys(users_get_groups()));
|
||||
$groups_clause = "(ta.id_grupo IN ($user_groups) OR tasg.id_group IN ($user_groups))";
|
||||
}
|
||||
|
||||
$total = (int) $partial['_monitor_total_'];
|
||||
$sql = "SELECT COUNT(DISTINCT(id_agente_modulo))
|
||||
FROM tagente_modulo tam, tagente ta
|
||||
LEFT JOIN tagent_secondary_group tasg
|
||||
ON ta.id_agente = tasg.id_agent
|
||||
WHERE tam.id_agente = ta.id_agente AND id_module_group = $id_group
|
||||
AND delete_pending = 0 AND $groups_clause";
|
||||
|
||||
$total = db_get_value_sql($sql);
|
||||
} else {
|
||||
$partial = tactical_status_modules_agents($config['id_user'], false, 'AR');
|
||||
|
||||
$total = (int) $partial['_monitor_total_'];
|
||||
}
|
||||
|
||||
$data = [
|
||||
'type' => 'string',
|
||||
|
@ -67,7 +67,7 @@ function config_create_value($token, $value)
|
||||
*
|
||||
* @return boolean True if success. False on failure.
|
||||
*/
|
||||
function config_update_value($token, $value, $noticed=false)
|
||||
function config_update_value($token, $value, $noticed=false, $password=false)
|
||||
{
|
||||
global $config;
|
||||
// Include functions_io to can call __() function.
|
||||
@ -91,7 +91,11 @@ function config_update_value($token, $value, $noticed=false)
|
||||
|
||||
if (isset($config[$token]) === false) {
|
||||
$config[$token] = $value;
|
||||
return (bool) config_create_value($token, io_safe_input($value));
|
||||
if (($password === false)) {
|
||||
return (bool) config_create_value($token, io_safe_input($value));
|
||||
} else {
|
||||
return (bool) config_create_value($token, io_input_password($value));
|
||||
}
|
||||
}
|
||||
|
||||
// If it has not changed.
|
||||
@ -104,7 +108,7 @@ function config_update_value($token, $value, $noticed=false)
|
||||
|
||||
$result = db_process_sql_update(
|
||||
'tconfig',
|
||||
['value' => io_safe_input($value)],
|
||||
['value' => ($password === false) ? io_safe_input($value) : io_input_password($value)],
|
||||
['token' => $token]
|
||||
);
|
||||
|
||||
|
@ -139,8 +139,25 @@ function upload_file($upload_file_or_zip, $default_real_directory, $destination_
|
||||
$nombre_archivo = sprintf('%s/%s', $real_directory, $filename);
|
||||
try {
|
||||
$mimeContentType = mime_content_type($_FILES['file']['tmp_name']);
|
||||
$fileExtension = pathinfo($_FILES['file']['name'], PATHINFO_EXTENSION);
|
||||
|
||||
if (empty($filterFilesType) === true || in_array($mimeContentType, $filterFilesType) === true) {
|
||||
$validFileExtension = true;
|
||||
|
||||
if (empty($fileExtension) === false) {
|
||||
$filtered_types = array_filter(
|
||||
$filterFilesType,
|
||||
function ($value) use ($fileExtension) {
|
||||
$mimeTypeExtensionName = explode('/', $value)[1];
|
||||
return $mimeTypeExtensionName === $fileExtension;
|
||||
}
|
||||
);
|
||||
|
||||
if (empty($filtered_types) === true) {
|
||||
$validFileExtension = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($validFileExtension === true && (empty($filterFilesType) === true || in_array($mimeContentType, $filterFilesType) === true)) {
|
||||
$result = copy($_FILES['file']['tmp_name'], $nombre_archivo);
|
||||
} else {
|
||||
$error_message = 'The uploaded file is not allowed. Only gif, png or jpg files can be uploaded.';
|
||||
|
@ -131,7 +131,7 @@
|
||||
<div style='padding-bottom: 50px'>
|
||||
<?php
|
||||
$version = '7.0NG.768';
|
||||
$build = '230131';
|
||||
$build = '230203';
|
||||
$banner = "v$version Build $build";
|
||||
error_reporting(0);
|
||||
|
||||
|
@ -53,7 +53,7 @@ $isFunctionPolicies = enterprise_include_once('include/functions_policies.php');
|
||||
|
||||
$strict_user = db_get_value('strict_acl', 'tusuario', 'id_user', $config['id_user']);
|
||||
|
||||
$filter = get_parameter('filter', 'all_enabled');
|
||||
$disabled = get_parameter('disabled', 'all_enabled');
|
||||
$filter_standby = get_parameter('standby', 'all');
|
||||
$id_group = (int) get_parameter('ag_group', 0);
|
||||
// 0 is the All group (selects all groups)
|
||||
@ -113,7 +113,7 @@ $tab = get_parameter_get('tab', null);
|
||||
$refr = (int) get_parameter('refr', 0);
|
||||
$pure = get_parameter('pure', 0);
|
||||
|
||||
$url = 'index.php?sec='.$sec.'&sec2='.$sec2.'&refr='.$refr.'&filter='.$filter.'&filter_standby='.$filter_standby.'&ag_group='.$id_group.'&tag_filter='.$tag_filter.'&action_filter='.$action_filter;
|
||||
$url = 'index.php?sec='.$sec.'&sec2='.$sec2.'&refr='.$refr.'&disabled='.$disabled.'&filter_standby='.$filter_standby.'&ag_group='.$id_group.'&tag_filter='.$tag_filter.'&action_filter='.$action_filter;
|
||||
|
||||
if ($flag_alert == 1 && check_acl($config['id_user'], $id_group, 'AW')) {
|
||||
forceExecution($id_group);
|
||||
@ -460,7 +460,7 @@ if ($agent_view_page === true) {
|
||||
'form' => [
|
||||
'html' => printFormFilterAlert(
|
||||
$id_group,
|
||||
$filter,
|
||||
$disabled,
|
||||
$free_search,
|
||||
$url,
|
||||
$filter_standby,
|
||||
|
@ -524,7 +524,7 @@ if (is_ajax() === true) {
|
||||
$tmp->ack_utimestamp_raw = strtotime($tmp->ack_utimestamp);
|
||||
|
||||
$tmp->ack_utimestamp = ui_print_timestamp(
|
||||
(int) $tmp->ack_utimestamp,
|
||||
(empty($tmp->ack_utimestamp) === true) ? 0 : $tmp->ack_utimestamp,
|
||||
true
|
||||
);
|
||||
$tmp->timestamp = ui_print_timestamp(
|
||||
@ -1475,7 +1475,24 @@ if ($pure) {
|
||||
|
||||
// Sound events.
|
||||
$sound_event['active'] = false;
|
||||
$sound_event['text'] = '<a href="javascript: openSoundEventWindow();">'.html_print_image(
|
||||
|
||||
// Sound Events.
|
||||
$data_sound = base64_encode(
|
||||
json_encode(
|
||||
[
|
||||
'title' => __('Sound Console'),
|
||||
'start' => __('Start'),
|
||||
'stop' => __('Stop'),
|
||||
'noAlert' => __('No alert'),
|
||||
'silenceAlarm' => __('Silence alarm'),
|
||||
'url' => ui_get_full_url('ajax.php'),
|
||||
'page' => 'include/ajax/events',
|
||||
'urlSound' => 'include/sounds/',
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
$sound_event['text'] = '<a href="javascript: openSoundEventModal(`'.$data_sound.'`);">'.html_print_image(
|
||||
'images/sound.png',
|
||||
true,
|
||||
[
|
||||
@ -1565,27 +1582,6 @@ if ($pure) {
|
||||
unset($onheader['fullscreen']);
|
||||
ui_meta_print_header(__('Events'), $section_string, $onheader);
|
||||
}
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
function openSoundEventWindow() {
|
||||
url = '<?php echo ui_get_full_url('operation/events/sound_events.php'); ?>';
|
||||
// devicePixelRatio knows how much zoom browser applied.
|
||||
var windowScale = parseFloat(window.devicePixelRatio);
|
||||
var defaultWidth = 630;
|
||||
var defaultHeight = 630;
|
||||
// If the scale is 1, no zoom has been applied.
|
||||
var windowWidth = windowScale <= 1 ? defaultWidth : windowScale*defaultWidth;
|
||||
var windowHeight = windowScale <= 1 ? defaultHeight : windowScale*defaultHeight + (defaultHeight*0.1);
|
||||
|
||||
window.open(
|
||||
url,
|
||||
'<?php __('Sound Alerts'); ?>',
|
||||
'width='+windowWidth+', height='+windowHeight+', resizable=yes, toolbar=no, location=no, directories=no, status=no, menubar=no'
|
||||
);
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
||||
if (enterprise_installed() === true) {
|
||||
|
@ -457,26 +457,6 @@ if ($access_console_node === true) {
|
||||
|
||||
ui_require_javascript_file('pandora_events');
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
function openSoundEventWindow() {
|
||||
url = '<?php echo ui_get_full_url('operation/events/sound_events.php'); ?>';
|
||||
// devicePixelRatio knows how much zoom browser applied.
|
||||
var windowScale = parseFloat(window.devicePixelRatio);
|
||||
var defaultWidth = 630;
|
||||
var defaultHeight = 630;
|
||||
// If the scale is 1, no zoom has been applied.
|
||||
var windowWidth = windowScale <= 1 ? defaultWidth : windowScale*defaultWidth;
|
||||
var windowHeight = windowScale <= 1 ? defaultHeight : windowScale*defaultHeight + (defaultHeight*0.1);
|
||||
|
||||
window.open(
|
||||
url,
|
||||
'<?php __('Sound Alerts'); ?>',
|
||||
'width='+windowWidth+', height='+windowHeight+', resizable=yes, toolbar=no, location=no, directories=no, status=no, menubar=no'
|
||||
);
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
$menu_operation['eventos']['sub'] = $sub;
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.768
|
||||
%define release 230131
|
||||
%define release 230203
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.768
|
||||
%define release 230131
|
||||
%define release 230203
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.768
|
||||
%define release 230131
|
||||
%define release 230203
|
||||
%define httpd_name httpd
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name apache2
|
||||
|
@ -1158,6 +1158,7 @@ CREATE TABLE IF NOT EXISTS `tserver` (
|
||||
`stat_utimestamp` BIGINT NOT NULL DEFAULT 0,
|
||||
`exec_proxy` TINYINT UNSIGNED NOT NULL DEFAULT 0,
|
||||
`port` INT UNSIGNED NOT NULL DEFAULT 0,
|
||||
`server_keepalive_utimestamp` BIGINT NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (`id_server`),
|
||||
KEY `name` (`name`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
@ -140,7 +140,7 @@ $inputs[] = [
|
||||
'type' => 'textarea',
|
||||
'name' => 'description',
|
||||
'required' => false,
|
||||
'value' => $specialDay->description(),
|
||||
'value' => io_safe_output($specialDay->description()),
|
||||
'rows' => 50,
|
||||
'columns' => 30,
|
||||
],
|
||||
|
@ -1,5 +1,5 @@
|
||||
package: pandorafms-server
|
||||
Version: 7.0NG.768-230131
|
||||
Version: 7.0NG.768-230203
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
@ -14,7 +14,7 @@
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.768-230131"
|
||||
pandora_version="7.0NG.768-230203"
|
||||
|
||||
package_cpan=0
|
||||
package_pandora=1
|
||||
|
@ -46,7 +46,7 @@ our @EXPORT = qw(
|
||||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "7.0NG.768";
|
||||
my $pandora_build = "230131";
|
||||
my $pandora_build = "230203";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
# Setup hash
|
||||
|
@ -118,7 +118,7 @@ use Tie::File;
|
||||
use Time::Local;
|
||||
use Time::HiRes qw(time);
|
||||
eval "use POSIX::strftime::GNU;1" if ($^O =~ /win/i);
|
||||
use POSIX qw(strftime);
|
||||
use POSIX qw(strftime mktime);
|
||||
use threads;
|
||||
use threads::shared;
|
||||
use JSON qw(decode_json encode_json);
|
||||
@ -3174,15 +3174,19 @@ sub pandora_update_server ($$$$$$;$$$$) {
|
||||
|
||||
my $master = ($server_type == SATELLITESERVER) ? 0 : $pa_config->{'pandora_master'};
|
||||
|
||||
my ($year, $month, $day, $hour, $minute, $second) = split /[- :]/, $timestamp;
|
||||
|
||||
my $keepalive_utimestamp = mktime($second, $minute, $hour, $day, $month-1, $year-1900);
|
||||
|
||||
# First run
|
||||
if ($server_id == 0) {
|
||||
|
||||
# Create an entry in tserver if needed
|
||||
my $server = get_db_single_row ($dbh, 'SELECT id_server FROM tserver WHERE BINARY name = ? AND server_type = ?', $server_name, $server_type);
|
||||
if (! defined ($server)) {
|
||||
$server_id = db_insert ($dbh, 'id_server', 'INSERT INTO tserver (name, server_type, description, version, threads, queued_modules, server_keepalive)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?)', $server_name, $server_type,
|
||||
'Autocreated at startup', $version, $num_threads, $queue_size, $keepalive);
|
||||
$server_id = db_insert ($dbh, 'id_server', 'INSERT INTO tserver (name, server_type, description, version, threads, queued_modules, server_keepalive, server_keepalive_utimestamp)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?)', $server_name, $server_type,
|
||||
'Autocreated at startup', $version, $num_threads, $queue_size, $keepalive, $keepalive_utimestamp);
|
||||
|
||||
$server = get_db_single_row ($dbh, 'SELECT status FROM tserver WHERE id_server = ?', $server_id);
|
||||
if (! defined ($server)) {
|
||||
@ -3193,14 +3197,14 @@ sub pandora_update_server ($$$$$$;$$$$) {
|
||||
$server_id = $server->{'id_server'};
|
||||
}
|
||||
|
||||
db_do ($dbh, 'UPDATE tserver SET status = ?, keepalive = ?, master = ?, laststart = ?, version = ?, threads = ?, queued_modules = ?, server_keepalive = ?
|
||||
db_do ($dbh, 'UPDATE tserver SET status = ?, keepalive = ?, master = ?, laststart = ?, version = ?, threads = ?, queued_modules = ?, server_keepalive = ?, server_keepalive_utimestamp = ?
|
||||
WHERE id_server = ?',
|
||||
1, $timestamp, $master, $timestamp, $version, $num_threads, $queue_size, $keepalive, $server_id);
|
||||
1, $timestamp, $master, $timestamp, $version, $num_threads, $queue_size, $keepalive, $keepalive_utimestamp, $server_id);
|
||||
return;
|
||||
}
|
||||
|
||||
db_do ($dbh, 'UPDATE tserver SET status = ?, keepalive = ?, master = ?, version = ?, threads = ?, queued_modules = ?, server_keepalive = ?
|
||||
WHERE id_server = ?', $status, $timestamp, $master, $version, $num_threads, $queue_size, $keepalive, $server_id);
|
||||
db_do ($dbh, 'UPDATE tserver SET status = ?, keepalive = ?, master = ?, version = ?, threads = ?, queued_modules = ?, server_keepalive = ?, server_keepalive_utimestamp = ?
|
||||
WHERE id_server = ?', $status, $timestamp, $master, $version, $num_threads, $queue_size, $keepalive, $keepalive_utimestamp, $server_id);
|
||||
}
|
||||
|
||||
##########################################################################
|
||||
|
@ -34,7 +34,7 @@ our @ISA = qw(Exporter);
|
||||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "7.0NG.768";
|
||||
my $pandora_build = "230131";
|
||||
my $pandora_build = "230203";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
%define name pandorafms_server
|
||||
%define version 7.0NG.768
|
||||
%define release 230131
|
||||
%define release 230203
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
%define name pandorafms_server
|
||||
%define version 7.0NG.768
|
||||
%define release 230131
|
||||
%define release 230203
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
@ -9,7 +9,7 @@
|
||||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.768"
|
||||
PI_BUILD="230131"
|
||||
PI_BUILD="230203"
|
||||
|
||||
MODE=$1
|
||||
if [ $# -gt 1 ]; then
|
||||
|
@ -35,7 +35,7 @@ use PandoraFMS::Config;
|
||||
use PandoraFMS::DB;
|
||||
|
||||
# version: define current version
|
||||
my $version = "7.0NG.768 Build 230131";
|
||||
my $version = "7.0NG.768 Build 230203";
|
||||
|
||||
# Pandora server configuration
|
||||
my %conf;
|
||||
|
@ -36,7 +36,7 @@ use Encode::Locale;
|
||||
Encode::Locale::decode_argv;
|
||||
|
||||
# version: define current version
|
||||
my $version = "7.0NG.768 Build 230131";
|
||||
my $version = "7.0NG.768 Build 230203";
|
||||
|
||||
# save program name for logging
|
||||
my $progname = basename($0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user