Merge branch 'develop' into ent-11126-vulnerability-scanner-interface

This commit is contained in:
Daniel Cebrian 2023-11-13 09:39:45 +01:00
commit c9e70b4ea4
33 changed files with 97 additions and 227 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: 7.0NG.774-231108
Version: 7.0NG.774-231113
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="7.0NG.774-231108"
pandora_version="7.0NG.774-231113"
echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null

View File

@ -1039,7 +1039,7 @@ my $Sem = undef;
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.774';
use constant AGENT_BUILD => '231108';
use constant AGENT_BUILD => '231113';
# Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000;

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_agent_linux
%define version 7.0NG.774
%define release 231108
%define release 231113
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -5,7 +5,7 @@
%define name pandorafms_agent_linux_bin
%define source_name pandorafms_agent_linux
%define version 7.0NG.774
%define release 231108
%define release 231113
%define debug_package %{nil}
Summary: Pandora FMS Linux agent, binary version

View File

@ -5,7 +5,7 @@
%define name pandorafms_agent_linux_bin
%define source_name pandorafms_agent_linux
%define version 7.0NG.774
%define release 231108
%define release 231113
%define debug_package %{nil}
Summary: Pandora FMS Linux agent, binary version

View File

@ -5,7 +5,7 @@
%define name pandorafms_agent_linux_bin
%define source_name pandorafms_agent_linux
%define version 7.0NG.774
%define release 231108
%define release 231113
Summary: Pandora FMS Linux agent, binary version
Name: %{name}

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_agent_linux
%define version 7.0NG.774
%define release 231108
%define release 231113
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.774"
PI_BUILD="231108"
PI_BUILD="231113"
OS_NAME=`uname -s`
FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{231108}
{231113}
ViewReadme
{Yes}

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("7.0NG.774 Build 231108")
#define PANDORA_VERSION ("7.0NG.774 Build 231113")
string pandora_path;
string pandora_dir;

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Pandora FMS"
VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(7.0NG.774(Build 231108))"
VALUE "ProductVersion", "(7.0NG.774(Build 231113))"
VALUE "FileVersion", "1.0.0.0"
END
END

View File

@ -1,5 +1,5 @@
package: pandorafms-console
Version: 7.0NG.774-231108
Version: 7.0NG.774-231113
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="7.0NG.774-231108"
pandora_version="7.0NG.774-231113"
package_pear=0
package_pandora=1

View File

@ -24,14 +24,6 @@ if (! check_acl($config['id_user'], 0, 'AR')
ui_require_css_file('discovery');
ui_require_javascript_file('pandora_alerts');
ui_include_time_picker();
ui_require_jquery_file('ui.datepicker-'.get_user_language(), 'include/javascript/i18n/');
ui_require_javascript_file('tinymce', 'vendor/tinymce/tinymce/');
ui_require_css_file('main.min', 'include/javascript/fullcalendar/');
ui_require_javascript_file('main.min', 'include/javascript/fullcalendar/');
ui_require_javascript_file('pandora_fullcalendar');
/**
* Mask class names.
@ -212,115 +204,3 @@ if ($classname_selected === null) {
Wizard::printBigButtonsList($wiz_data);
}
$is_management_allowed = is_management_allowed();
$task_id = get_parameter('task', '');
if ($task_id !== '') {
$task = db_get_row_filter(
'tuser_task_scheduled',
['id' => $task_id]
);
$args = unserialize($task['args']);
$event_calendar = io_safe_output($args['weekly_schedule']);
} else {
$event_calendar = '{"monday":[{"start":"00:00:00","end":"00:00:00"}],"tuesday":[{"start":"00:00:00","end":"00:00:00"}],"wednesday":[{"start":"00:00:00","end":"00:00:00"}],"thursday":[{"start":"00:00:00","end":"00:00:00"}],"friday":[{"start":"00:00:00","end":"00:00:00"}],"saturday":[{"start":"00:00:00","end":"00:00:00"}],"sunday":[{"start":"00:00:00","end":"00:00:00"}]}';
}
?>
<script type="text/javascript">
$(document).ready (function () {
$("#table-new-job-3").hide();
var edit = '<?php echo $task_id; ?>';
if (edit != '') {
exec_calendar();
}
$("#scheduled").change(exec_calendar);
function exec_calendar() {
if ($("#scheduled").val() == "weekly") {
var is_management_allowed = parseInt('<?php echo (int) $is_management_allowed; ?>');
var eventsBBDD = '<?php echo $event_calendar; ?>';
var events = loadEventBBDD(eventsBBDD);
var calendarEl = document.getElementById('calendar_map');
var options = {
contentHeight: "auto",
headerToolbar: {
left: "",
center: "",
right: is_management_allowed === 0 ? '' : "timeGridWeek,dayGridWeek"
},
buttonText: {
dayGridWeek: '<?php echo __('Simple'); ?>',
timeGridWeek: '<?php echo __('Detailed'); ?>'
},
dayHeaderFormat: { weekday: "short" },
initialView: "dayGridWeek",
navLinks: false,
selectable: true,
selectMirror: true,
slotDuration: "01:00:00",
slotLabelInterval: "02:00:00",
snapDuration: "01:00:00",
slotMinTime: "00:00:00",
slotMaxTime: "24:00:00",
scrollTime: "01:00:00",
locale: "en-GB",
firstDay: 1,
eventTimeFormat: {
hour: "numeric",
minute: "2-digit",
hour12: false
},
eventColor: "#82b92e",
editable: is_management_allowed === 0 ? false : true,
dayMaxEvents: 3,
dayPopoverFormat: { weekday: "long" },
defaultAllDay: false,
displayEventTime: true,
displayEventEnd: true,
selectOverlap: false,
eventOverlap: false,
allDaySlot: true,
droppable: false,
select: is_management_allowed === 0 ? false : select_alert_template,
selectAllow: is_management_allowed === 0 ? false : selectAllow_alert_template,
eventAllow: is_management_allowed === 0 ? false : eventAllow_alert_template,
eventDrop: is_management_allowed === 0 ? false : eventDrop_alert_template,
eventDragStop: is_management_allowed === 0 ? false : eventDragStop_alert_template,
eventResize: is_management_allowed === 0 ? false : eventResize_alert_template,
eventMouseEnter: is_management_allowed === 0 ? false : eventMouseEnter_alert_template,
eventMouseLeave: is_management_allowed === 0 ? false : eventMouseLeave_alert_template,
eventClick: is_management_allowed === 0 ? false : eventClick_alert_template,
};
var settings = {
timeFormat: '<?php echo TIME_FORMAT_JS; ?>',
timeOnlyTitle: '<?php echo __('Choose time'); ?>',
timeText: '<?php echo __('Time'); ?>',
hourText: '<?php echo __('Hour'); ?>',
minuteText: '<?php echo __('Minute'); ?>',
secondText: '<?php echo __('Second'); ?>',
currentText: '<?php echo __('Now'); ?>',
closeText: '<?php echo __('Close'); ?>',
url: '<?php echo ui_get_full_url('ajax.php', false, false, false); ?>',
removeText: '<?php echo __('Remove'); ?>',
userLanguage: '<?php echo get_user_language(); ?>',
loadingText: '<?php echo __('Loading, this operation might take several minutes...'); ?>',
tooltipText: '<?php echo __('Drag out to remove'); ?>',
alert: '<?php echo __('Alert'); ?>'
}
var calendar = fullCalendarPandora(calendarEl, options, settings, events);
calendar.render();
$("#table-new-job-3").show();
$('.fc-event-title').hide();
$(".fc-button-active" ).trigger( "click" );
} else {
$("#calendar_map").html();
$("#table-new-job-3").hide();
}
}
});
</script>

View File

@ -97,6 +97,24 @@ try {
'column_names' => $column_names,
'ajax_url' => 'include/ajax/os',
'ajax_data' => ['method' => 'drawOSTable'],
'pagination_options' => [
[
$config['block_size'],
10,
25,
100,
200,
500,
],
[
$config['block_size'],
10,
25,
100,
200,
500,
],
],
'ajax_postprocess' => 'process_datatables_item(item)',
'no_sortable_columns' => [
-1,
@ -137,6 +155,10 @@ if (is_metaconsole() === true) {
true
);
$buttons .= '</form>';
} else {
$buttons .= '<form method="post" action="index.php?sec=gagente&sec2=godmode/setup/os&tab=manage_os&action=edit">';
$buttons .= html_print_submit_button(__('Create OS'), 'update_button', false, ['icon' => 'next'], true);
$buttons .= '</form>';
}
html_print_action_buttons(
@ -150,15 +172,6 @@ html_print_action_buttons(
echo '<div id="aux" class="invisible"></div>';
echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/setup/os&tab=manage_os&action=edit">';
html_print_action_buttons(
html_print_submit_button(__('Create OS'), 'update_button', false, ['icon' => 'next'], true),
['type' => 'form_action']
);
echo '</form>';
?>
<script language="javascript" type="text/javascript">
function process_datatables_item(item) {

View File

@ -20,7 +20,7 @@
/**
* Pandora build version and version
*/
$build_version = 'PC231108';
$build_version = 'PC231113';
$pandora_version = 'v7.0NG.774';
// Do not overwrite default timezone set if defined.

View File

@ -10328,7 +10328,7 @@ select:focus {
}
.dataTables_length > label {
color: #fff;
color: #000;
}
input[type="button"],

View File

@ -131,7 +131,7 @@
<div style='padding-bottom: 50px'>
<?php
$version = '7.0NG.774';
$build = '231108';
$build = '231113';
$banner = "v$version Build $build";
error_reporting(0);

View File

@ -56,8 +56,18 @@ function validateAlert($ids)
}
function printFormFilterAlert($id_group, $filter, $free_search, $url, $filter_standby=false, $tag_filter=false, $action_filter=false, $return=false, $strict_user=false, $access='AR')
{
function printFormFilterAlert(
$id_group,
$filter,
$free_search,
$alert_agent_view,
$filter_standby=false,
$tag_filter=false,
$action_filter=false,
$return=false,
$strict_user=false,
$access='AR'
) {
global $config;
include_once $config['homedir'].'/include/functions_tags.php';
@ -69,29 +79,32 @@ function printFormFilterAlert($id_group, $filter, $free_search, $url, $filter_st
$table->size[1] = '33%';
$table->size[2] = '33%';
$table->data = [];
$table->data[0][0] = html_print_label_input_block(
__('Group'),
html_print_select_groups(
$config['id_user'],
$access,
true,
'ag_group',
$id_group,
'',
'',
'',
true,
false,
false,
'',
false,
'',
false,
false,
'id_grupo',
$strict_user
)
);
if ($alert_agent_view === false) {
$table->data[0][0] = html_print_label_input_block(
__('Group'),
html_print_select_groups(
$config['id_user'],
$access,
true,
'ag_group',
$id_group,
'',
'',
'',
true,
false,
false,
'',
false,
'',
false,
false,
'id_grupo',
$strict_user
)
);
}
$alert_status_filter = [];
$alert_status_filter['all_enabled'] = __('All (Enabled)');
@ -200,45 +213,3 @@ function printFormFilterAlert($id_group, $filter, $free_search, $url, $filter_st
echo $data;
}
}
function printFormFilterAlertAgent($agent_view_page, $free_search, $id_agent, $return=false)
{
$table_filter = new stdClass();
$table_filter->width = '100%';
if ($agent_view_page === true) {
$table_filter->class = 'info_table';
$table_filter->styleTable = 'border-radius: 0;padding: 0;margin: 0;';
$free_search_name = 'free_search_alert';
} else {
$table_filter->class = 'databox filters';
$free_search_name = 'free_search';
}
$table_filter->style = [];
$table_filter->style[0] = 'font-weight: bold';
$table_filter->data = [];
$table_filter->data[0][0] = __('Free text for search (*):').ui_print_help_tip(
__('Filter by module name, template name or action name'),
true
);
$table_filter->data[0][0] .= '<span class="mrgn_lft_10px">'.html_print_input_text(
$free_search_name,
$free_search,
'',
20,
100,
true
).'</span>';
$form = html_print_table($table_filter, true);
if ($return === true) {
return $form;
} else {
echo $form;
}
}

View File

@ -405,6 +405,12 @@ if ($agent_view_page === true) {
]
);
} else {
$tab = get_parameter('tab', 'main');
$alert_agent_view = false;
if ($tab == 'alert') {
$alert_agent_view = true;
}
ui_print_datatable(
[
'id' => 'alerts_status_datatable',
@ -433,7 +439,7 @@ if ($agent_view_page === true) {
$id_group,
$disabled,
$free_search,
$url,
$alert_agent_view,
$filter_standby,
$tag_filter,
true,
@ -441,7 +447,7 @@ if ($agent_view_page === true) {
$strict_user
),
],
'start_disabled' => true,
'start_disabled' => !$alert_agent_view,
]
);
}

View File

@ -6,7 +6,7 @@
%define debug_package %{nil}
%define name pandorafms_console
%define version 7.0NG.774
%define release 231108
%define release 231113
# User and Group under which Apache is running
%define httpd_name httpd

View File

@ -6,7 +6,7 @@
%define debug_package %{nil}
%define name pandorafms_console
%define version 7.0NG.774
%define release 231108
%define release 231113
# User and Group under which Apache is running
%define httpd_name httpd

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.774
%define release 231108
%define release 231113
%define httpd_name httpd
# User and Group under which Apache is running
%define httpd_name apache2

View File

@ -1,5 +1,5 @@
package: pandorafms-server
Version: 7.0NG.774-231108
Version: 7.0NG.774-231113
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="7.0NG.774-231108"
pandora_version="7.0NG.774-231113"
package_cpan=0
package_pandora=1

View File

@ -46,7 +46,7 @@ our @EXPORT = qw(
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.774";
my $pandora_build = "231108";
my $pandora_build = "231113";
our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash

View File

@ -34,7 +34,7 @@ our @ISA = qw(Exporter);
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.774";
my $pandora_build = "231108";
my $pandora_build = "231113";
our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] );

View File

@ -7,7 +7,7 @@
%define debug_package %{nil}
%define name pandorafms_server
%define version 7.0NG.774
%define release 231108
%define release 231113
Summary: Pandora FMS Server
Name: %{name}

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_server
%define version 7.0NG.774
%define release 231108
%define release 231113
Summary: Pandora FMS Server
Name: %{name}

View File

@ -9,7 +9,7 @@
# **********************************************************************
PI_VERSION="7.0NG.774"
PI_BUILD="231108"
PI_BUILD="231113"
MODE=$1
if [ $# -gt 1 ]; then

View File

@ -38,7 +38,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB;
# version: define current version
my $version = "7.0NG.774 Build 231108";
my $version = "7.0NG.774 Build 231113";
# Pandora server configuration
my %conf;

View File

@ -36,7 +36,7 @@ use Encode::Locale;
Encode::Locale::decode_argv;
# version: define current version
my $version = "7.0NG.774 Build 231108";
my $version = "7.0NG.774 Build 231113";
# save program name for logging
my $progname = basename($0);