Merge branch 'develop' into ent-9771-discovery-2-0-sistema-de-extensiones-disco-para-el-discovery

This commit is contained in:
Daniel Cebrian 2023-04-18 15:56:59 +02:00
commit 6df1c74722
43 changed files with 266 additions and 131 deletions

View File

@ -571,6 +571,13 @@ sed -i -e "s|^dbpass.*|dbpass $DBPASS|g" $PANDORA_SERVER_CONF
sed -i -e "s/^dbport.*/dbport $DBPORT/g" $PANDORA_SERVER_CONF
sed -i -e "s/^#.mssql_driver.*/mssql_driver $MS_ID/g" $PANDORA_SERVER_CONF
#check fping
fping_bin=$(which fping)
execute_cmd "[ $fping_bin ]" "Check fping location: $fping_bin"
if [ "$fping_bin" != "" ]; then
sed -i -e "s|^fping.*|fping $fping_bin|g" $PANDORA_SERVER_CONF
fi
# Enable agent remote config
sed -i "s/^remote_config.*$/remote_config 1/g" $PANDORA_AGENT_CONF

View File

@ -334,8 +334,6 @@ console_dependencies=" \
http://firefly.artica.es/centos8/phantomjs-2.1.1-1.el7.x86_64.rpm"
execute_cmd "dnf install -y $console_dependencies" "Installing Pandora FMS Console dependencies"
# Server dependencies
server_dependencies=" \
perl \
@ -409,6 +407,7 @@ setenforce 0 &>> "$LOGFILE"
sed -i -e "s/^SELINUX=.*/SELINUX=disabled/g" /etc/selinux/config &>> "$LOGFILE"
systemctl disable firewalld --now &>> "$LOGFILE"
# Adding standar cnf for initial setup.
cat > /etc/my.cnf << EO_CONFIG_TMP
[mysqld]
@ -633,6 +632,13 @@ sed -i -e "s|^dbpass.*|dbpass $DBPASS|g" $PANDORA_SERVER_CONF
sed -i -e "s/^dbport.*/dbport $DBPORT/g" $PANDORA_SERVER_CONF
sed -i -e "s/^#.mssql_driver.*/mssql_driver $MS_ID/g" $PANDORA_SERVER_CONF
#check fping
fping_bin=$(which fping)
execute_cmd "[ $fping_bin ]" "Check fping location: $fping_bin"
if [ "$fping_bin" != "" ]; then
sed -i -e "s|^fping.*|fping $fping_bin|g" $PANDORA_SERVER_CONF
fi
# Enable agent remote config
sed -i "s/^remote_config.*$/remote_config 1/g" $PANDORA_AGENT_CONF

View File

@ -17,7 +17,7 @@ PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf
WORKDIR=/opt/pandora/deploy
S_VERSION='202304111'
S_VERSION='202304181'
LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
rm -f $LOGFILE &> /dev/null # remove last log before start
@ -274,6 +274,7 @@ server_dependencies=" \
cron \
libgeo-ip-perl \
arping \
snmp-mibs-downloader \
openjdk-8-jdk "
execute_cmd "apt install -y $server_dependencies" "Installing Pandora FMS Server dependencies"

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: 7.0NG.770-230417
Version: 7.0NG.770-230418
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.770-230417"
pandora_version="7.0NG.770-230418"
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

@ -1023,7 +1023,7 @@ my $Sem = undef;
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.770';
use constant AGENT_BUILD => '230417';
use constant AGENT_BUILD => '230418';
# 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.770
%define release 230417
%define release 230418
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

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

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.770"
PI_BUILD="230417"
PI_BUILD="230418"
OS_NAME=`uname -s`
FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{230417}
{230418}
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.770 Build 230417")
#define PANDORA_VERSION ("7.0NG.770 Build 230418")
string pandora_path;
string pandora_dir;

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(7.0NG.770(Build 230417))"
VALUE "ProductVersion", "(7.0NG.770(Build 230418))"
VALUE "FileVersion", "1.0.0.0"
END
END

View File

@ -1,5 +1,5 @@
package: pandorafms-console
Version: 7.0NG.770-230417
Version: 7.0NG.770-230418
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.770-230417"
pandora_version="7.0NG.770-230418"
package_pear=0
package_pandora=1

View File

@ -760,6 +760,7 @@ $tableAdvancedAgent->data['agent_icon'][] = html_print_label_input_block(
[
'id' => 'icon_ok',
'style' => 'display:'.$display_icons.';',
'width' => '40',
]
).html_print_image(
$path_bad,
@ -767,6 +768,7 @@ $tableAdvancedAgent->data['agent_icon'][] = html_print_label_input_block(
[
'id' => 'icon_bad',
'style' => 'display:'.$display_icons.';',
'width' => '40',
]
).html_print_image(
$path_warning,
@ -774,6 +776,7 @@ $tableAdvancedAgent->data['agent_icon'][] = html_print_label_input_block(
[
'id' => 'icon_warning',
'style' => 'display:'.$display_icons.';',
'width' => '40',
]
)
);

View File

@ -903,10 +903,7 @@ foreach ($simple_alerts as $alert) {
$data[3] .= '</div>';
}
$table_alert_list->cellclass[] = [
1 => 'table_action_buttons',
4 => 'table_action_buttons',
];
$table_alert_list->cellclass[] = [4 => 'table_action_buttons'];
$data[4] = '<form class="disable_alert_form display_in" action="'.$url.'" method="post" >';
if ($alert['disabled']) {
$data[4] .= html_print_input_image(

View File

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

View File

@ -2523,8 +2523,8 @@ function events_print_event_table(
$i = 0;
$table->head[$i] = '<span>'.__('Type').'</span>';
$table->headstyle[$i] = 'width: 3%;text-align: center;';
$table->style[$i++] = 'text-align: center;';
$table->headstyle[$i] = 'width: 3%;text-align: left;';
$table->style[$i++] = 'text-align: left;';
$table->head[$i] = '<span>'.__('Event name').'</span>';
$table->headstyle[$i] = '';
@ -2541,12 +2541,12 @@ function events_print_event_table(
$table->style[$i++] = 'padding: 0 5px;word-break: break-word;';
$table->head[$i] = '<span>'.__('Status').'</span>';
$table->headstyle[$i] = 'width: 150px;text-align: center;';
$table->style[$i++] = 'padding: 0 5px;text-align: center;';
$table->headstyle[$i] = 'width: 150px;text-align: left;';
$table->style[$i++] = 'padding: 0 5px;text-align: left;';
$table->head[$i] = "<span title='".__('Validated')."'>".__('V.').'</span>';
$table->headstyle[$i] = 'width: 1%;text-align: center;';
$table->style[$i++] = 'text-align: center;';
$table->headstyle[$i] = 'width: 1%;text-align: left;';
$table->style[$i++] = 'text-align: left;';
$all_groups = [];
if ($agent_id != 0) {
@ -2730,7 +2730,7 @@ function events_print_type_img(
[
'title' => events_print_type_description($type, true),
'class' => $style,
'style' => 'margin: 0 auto;'.((empty($icon) === false) ? 'background-image: url('.$icon.'); background-repeat: no-repeat;' : ''),
'style' => ((empty($icon) === false) ? 'background-image: url('.$icon.'); background-repeat: no-repeat;' : ''),
],
true
);
@ -5122,7 +5122,7 @@ function events_page_general($event)
&& count($table_data[$i]) === 2
) {
$table_general->colspan[$i][1] = 2;
$table_general->style[2] = 'text-align:center; width:10%;';
$table_general->style[2] = 'text-align:left; width:10%;';
}
}
@ -5204,7 +5204,7 @@ function events_page_comments($event, $ajax=false, $groupedComments=[])
$comments = (empty($groupedComments) === true) ? $event['user_comment'] : $groupedComments;
if (empty($comments) === true) {
$table_comments->style[0] = 'text-align:center;';
$table_comments->style[0] = 'text-align:left;';
$table_comments->colspan[0][0] = 2;
$data = [];
$data[0] = __('There are no comments');

View File

@ -585,7 +585,9 @@ function menu_add_extras(&$menu)
$menu_extra['reporting']['sub']['enterprise/godmode/reporting/graph_template_wizard']['text'] = __('Graph template wizard');
$menu_extra['reporting']['sub']['godmode/reporting/reporting_builder&tab=wizard&action=wizard']['text'] = __('Templates wizard');
$menu_extra['reporting']['sub']['godmode/reporting/reporting_builder&tab=template&action=list_template']['text'] = __('Templates');
$menu_extra['reporting']['sub']['godmode/reporting/reporting_builder&action=new']['text'] = __('New custom reports');
$menu_extra['reporting']['sub']['godmode/reporting/reporting_builder&action=edit']['text'] = __('Edit custom reports');
$menu_extra['reporting']['sub']['godmode/reporting/reporting_builder&action=delete_report']['text'] = __('Remove custom reports');
$menu_extra['reporting']['sub']['godmode/reporting/reporting_builder&tab=list_items&action=edit']['text'] = __('List items');
$menu_extra['reporting']['sub']['godmode/reporting/reporting_builder&tab=item_editor&action=new']['text'] = __('Edit item');
$menu_extra['reporting']['sub']['godmode/reporting/reporting_builder&tab=wizard&action=edit']['text'] = __('Wizard');

View File

@ -1041,11 +1041,11 @@ function reporting_html_event_report_group($table, $item, $pdf=0)
$table1->class = 'info_table';
$table1->align = [];
$table1->align[0] = 'center';
$table1->align[0] = 'left';
if ($item['show_summary_group']) {
$table1->align[3] = 'center';
$table1->align[3] = 'left';
} else {
$table1->align[2] = 'center';
$table1->align[2] = 'left';
}
$table1->data = [];
@ -1299,7 +1299,7 @@ function reporting_html_event_report_module($table, $item, $pdf=0)
$table1->class = 'info_table';
$table1->data = [];
$table1->head = [];
$table1->align = 'left';
$table1->align[0] = 'left';
if ($show_summary_group) {
$table1->head[0] = __('Status');
@ -1378,7 +1378,16 @@ function reporting_html_event_report_module($table, $item, $pdf=0)
$custom_data = json_decode($event['custom_data'], true);
$custom_data_text = '';
foreach ($custom_data as $key => $value) {
$custom_data_text .= $key.' = '.$value.'<br>';
if (is_array($value)) {
$custom_data_text .= $key.' = ';
foreach ($value as $action) {
$custom_data_text .= $action.', ';
}
$custom_data_text = rtrim($custom_data_text, ', ').'<br>';
} else {
$custom_data_text .= $key.' = '.$value.'<br>';
}
}
$data[6] = $custom_data_text;
@ -2632,16 +2641,14 @@ function reporting_html_event_report_agent($table, $item, $pdf=0)
$table1->width = '99%';
$table1->class = 'info_table';
$table1->align = [];
$table1->align[0] = 'center';
$table1->align[1] = 'center';
$table1->align[3] = 'center';
if ((bool) $item['show_custom_data'] === true) {
if ($item['show_summary_group']) {
$table1->align[7] = 'left';
} else {
$table1->align[6] = 'left';
}
}
$table1->align[0] = 'left';
$table1->align[1] = 'left';
$table1->align[2] = 'left';
$table1->align[3] = 'left';
$table1->align[4] = 'left';
$table1->align[5] = 'left';
$table1->align[6] = 'left';
$table1->align[7] = 'left';
$table1->data = [];
@ -2717,7 +2724,7 @@ function reporting_html_event_report_agent($table, $item, $pdf=0)
}
if ($item['show_summary_group']) {
$data[] = '<font class="font_6pt">'.date($config['date_format'], strtotime($event['timestamp'])).'</font>';
$data[] = '<font class="font_6pt">'.date($config['date_format'], $event['timestamp']).'</font>';
} else {
$data[] = '<font class="font_6pt">'.date($config['date_format'], strtotime($event['timestamp'])).'</font>';
}
@ -2726,7 +2733,16 @@ function reporting_html_event_report_agent($table, $item, $pdf=0)
$custom_data = json_decode($event['custom_data'], true);
$custom_data_text = '';
foreach ($custom_data as $key => $value) {
$custom_data_text .= $key.' = '.$value.'<br>';
if (is_array($value)) {
$custom_data_text .= $key.' = ';
foreach ($value as $action) {
$custom_data_text .= $action.', ';
}
$custom_data_text = rtrim($custom_data_text, ', ').'<br>';
} else {
$custom_data_text .= $key.' = '.$value.'<br>';
}
}
$data[] = $custom_data_text;
@ -4733,7 +4749,7 @@ function reporting_html_availability_graph($table, $item, $pdf=0)
$table1->style[0] = 'overflow-wrap: break-word';
// Align percentage and checks resume.
$table1->align[2] = 'center';
$table1->align[2] = 'left';
$table1->data[$k_chart][0] = $chart['agent'];
$table1->data[$k_chart][0] .= '<br />';
$table1->data[$k_chart][0] .= $chart['module'];

View File

@ -3878,7 +3878,7 @@ function ui_print_datatable(array $parameters)
$export_columns = ',columns: \'th:not(:last-child)\'';
}
if (isset($parameters['data_element']) === false) {
if (isset($parameters['data_element']) === false || isset($parameters['print_pagination_search_csv'])) {
if (isset($parameters['ajax_url'])) {
$type_data = 'ajax: {
url: "'.ui_get_full_url('ajax.php', false, false, false).'",
@ -7057,23 +7057,20 @@ function ui_print_comments($comments)
}
}
$last_comment = [];
foreach ($comments_array as $comm) {
// Show the comments more recent first.
if (is_array($comm)) {
$order_utimestamp = array_reduce(
$comm,
function ($carry, $item) {
$carry[$item['utimestamp']] = $item;
return $carry;
}
);
$order_utimestamp = array_reduce(
$comments_array,
function ($carry, $item) {
foreach ($item as $k => $v) {
$carry[$v['utimestamp']] = $v;
}
$key_max_utimestamp = max(array_keys($order_utimestamp));
$last_comment = $order_utimestamp[$key_max_utimestamp];
return $carry;
}
}
);
$key_max_utimestamp = max(array_keys($order_utimestamp));
$last_comment = $order_utimestamp[$key_max_utimestamp];
if (empty($last_comment) === true) {
return '';

View File

@ -451,7 +451,7 @@ aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:
iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,json:k,oAjaxData:k,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==y(this)?1*this._iRecordsTotal:
this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==y(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var a=this._iDisplayLength,b=this._iDisplayStart,c=b+a,d=this.aiDisplay.length,e=this.oFeatures,f=e.bPaginate;return e.bServerSide?!1===f||-1===a?b+d:Math.min(b+a,this._iRecordsDisplay):!f||c>d||-1===a?d:c},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null};n.ext=x={buttons:{},
classes:{},build:"dt/dt-1.10.18",errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:n.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:n.version};h.extend(x,{afnFiltering:x.search,aTypes:x.type.detect,ofnSearch:x.type.search,oSort:x.type.order,afnSortData:x.order,aoFeatures:x.feature,oApi:x.internal,oStdClasses:x.classes,oPagination:x.pager});
h.extend(n.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",
h.extend(n.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter padding-lft-10",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",
sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",
sJUIHeader:"",sJUIFooter:""});var Kb=n.ext.pager;h.extend(Kb,{simple:function(){return["previous","next"]},full:function(){return["first","previous","next","last"]},numbers:function(a,b){return[ia(a,b)]},simple_numbers:function(a,b){return["previous",ia(a,b),"next"]},full_numbers:function(a,b){return["first","previous",ia(a,b),"next","last"]},first_last_numbers:function(a,b){return["first",ia(a,b),"last"]},_numbers:ia,numbers_length:7});h.extend(!0,n.ext.renderer,{pageButton:{_:function(a,b,c,d,e,
f){var g=a.oClasses,j=a.oLanguage.oPaginate,i=a.oLanguage.oAria.paginate||{},m,l,n=0,o=function(b,d){var k,s,u,r,v=function(b){Ta(a,b.data.action,true)};k=0;for(s=d.length;k<s;k++){r=d[k];if(h.isArray(r)){u=h("<"+(r.DT_el||"div")+"/>").appendTo(b);o(u,r)}else{m=null;l="";switch(r){case "ellipsis":b.append('<span class="ellipsis">&#x2026;</span>');break;case "first":m=j.sFirst;l=r+(e>0?"":" "+g.sPageButtonDisabled);break;case "previous":m=j.sPrevious;l=r+(e>0?"":" "+g.sPageButtonDisabled);break;case "next":m=

View File

@ -410,7 +410,7 @@ aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:
iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,json:k,oAjaxData:k,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==y(this)?1*this._iRecordsTotal:
this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==y(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var a=this._iDisplayLength,b=this._iDisplayStart,c=b+a,d=this.aiDisplay.length,e=this.oFeatures,f=e.bPaginate;return e.bServerSide?!1===f||-1===a?b+d:Math.min(b+a,this._iRecordsDisplay):!f||c>d||-1===a?d:c},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null};n.ext=x={buttons:{},
classes:{},build:"ju-1.12.1/jq-3.3.1/dt-1.10.18",errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:n.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:n.version};h.extend(x,{afnFiltering:x.search,aTypes:x.type.detect,ofnSearch:x.type.search,oSort:x.type.order,afnSortData:x.order,aoFeatures:x.feature,oApi:x.internal,oStdClasses:x.classes,oPagination:x.pager});
h.extend(n.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",
h.extend(n.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter padding-lft-10",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",
sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",
sJUIHeader:"",sJUIFooter:""});var Kb=n.ext.pager;h.extend(Kb,{simple:function(){return["previous","next"]},full:function(){return["first","previous","next","last"]},numbers:function(a,b){return[ia(a,b)]},simple_numbers:function(a,b){return["previous",ia(a,b),"next"]},full_numbers:function(a,b){return["first","previous",ia(a,b),"next","last"]},first_last_numbers:function(a,b){return["first",ia(a,b),"last"]},_numbers:ia,numbers_length:7});h.extend(!0,n.ext.renderer,{pageButton:{_:function(a,b,c,d,e,
f){var g=a.oClasses,j=a.oLanguage.oPaginate,i=a.oLanguage.oAria.paginate||{},m,l,n=0,o=function(b,d){var k,s,u,r,v=function(b){Ta(a,b.data.action,true)};k=0;for(s=d.length;k<s;k++){r=d[k];if(h.isArray(r)){u=h("<"+(r.DT_el||"div")+"/>").appendTo(b);o(u,r)}else{m=null;l="";switch(r){case "ellipsis":b.append('<span class="ellipsis">&#x2026;</span>');break;case "first":m=j.sFirst;l=r+(e>0?"":" "+g.sPageButtonDisabled);break;case "previous":m=j.sPrevious;l=r+(e>0?"":" "+g.sPageButtonDisabled);break;case "next":m=

View File

@ -362,19 +362,22 @@ class GroupsStatusWidget extends Widget
// Agent Critical.
$table->data[1][0] = $this->getCellCounter(
$stats['agent_critical'],
'#e63c52'
'',
'bg_ff5'
);
// Agent Warning.
$table->data[2][0] = $this->getCellCounter(
$stats['agent_warning'],
'#f3b200'
'',
'bg_ffd'
);
// Agent OK.
$table->data[3][0] = $this->getCellCounter(
$stats['agent_ok'],
'#82b92e'
'',
'bg_82B92E'
);
// Agent Unknown.
@ -436,19 +439,22 @@ class GroupsStatusWidget extends Widget
// Modules Critical.
$table->data[1][0] = $this->getCellCounter(
$stats['monitor_critical'],
'#e63c52'
'',
'bg_ff5'
);
// Modules Warning.
$table->data[2][0] = $this->getCellCounter(
$stats['monitor_warning'],
'#f3b200'
'',
'bg_ffd'
);
// Modules OK.
$table->data[3][0] = $this->getCellCounter(
$stats['monitor_ok'],
'#82b92e'
'',
'bg_82B92E'
);
// Modules Unknown.
@ -490,10 +496,20 @@ class GroupsStatusWidget extends Widget
*
* @return string
*/
protected function getCellCounter(?int $count, string $color):string
protected function getCellCounter(?int $count, string $color='', string $div_class=''):string
{
$output = '<div class= ""';
$output .= 'style= "background-color:'.$color.'">';
$output = '<div ';
if ($div_class !== '') {
$output .= 'class= "'.$div_class.'" ';
}
if ($color !== '') {
$output .= 'style= "background-color:'.$color.'" ';
}
$output .= '>';
if (isset($count) === true
&& $count !== 0
) {

View File

@ -379,7 +379,8 @@ table.group_modules_status_box tr td > span {
padding-left: 10px;
}
table.group_modules_status_box tr td div {
table.group_modules_status_box tr td div,
table.widget_groups_status tr td div {
background-color: #82b92e;
width: 90%;
padding: 3px;

View File

@ -11896,6 +11896,42 @@ td[id^="table_info_box"] a {
border-bottom: 1px solid #dedede !important;
}
.small-input-select2 > div > input,
.small-input-select2 > div > select,
.small-input {
height: 30px;
border: 1px solid #8a96a6;
margin: 3px 2px;
}
.small-input-select2 > div > a > img {
padding-top: 5px !important;
}
.small-input-select2
.select2-container
.select2-selection--single
.select2-selection__rendered,
.small-input-select2
div
.select2-container
.select2-selection--single
.select2-selection__rendered {
line-height: 30px !important;
}
.small-input-select2 .select2-container .select2-selection--single,
.small-input-select2 div .select2-container .select2-selection--single {
height: 30px !important;
border: 1px solid #8a96a6 !important;
margin: 3px 2px;
}
.small-input-select2 .select2-selection__arrow,
.small-input-select2 div .select2-selection__arrow {
top: -1px !important;
}
.break-word {
word-wrap: break-word;
}

View File

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

View File

@ -167,7 +167,7 @@ $table->class = 'table_modal_alternate';
$data = [];
$data[0] = __('Refresh time');
$data[1] = html_print_extended_select_for_time(
$data[1] = '<div class="small-input-select2">'.html_print_extended_select_for_time(
'refresh',
$refresh,
'',
@ -175,7 +175,7 @@ $data[1] = html_print_extended_select_for_time(
0,
7,
true
);
).'</div>';
$table->data[] = $data;
$table->rowclass[] = '';
@ -187,7 +187,11 @@ $data[1] = html_print_input_text(
'',
15,
255,
true
true,
false,
false,
'',
'small-input'
);
$data[1] .= html_print_image(
'/images/calendar_view_day.png',
@ -196,6 +200,7 @@ $data[1] .= html_print_image(
'onclick' => "scwShow(scwID('text-start_date'),this);",
'style' => 'vertical-align: bottom;',
'class' => 'invert_filter',
'style' => 'vertical-align: middle;',
],
false,
false,
@ -207,13 +212,24 @@ $table->rowclass[] = '';
$data = [];
$data[0] = __('Begin time');
$data[1] = html_print_input_text('start_time', $start_time, '', 10, 10, true);
$data[1] = html_print_input_text(
'start_time',
$start_time,
'',
10,
10,
true,
false,
false,
'',
'small-input'
);
$table->data[] = $data;
$table->rowclass[] = '';
$data = [];
$data[0] = __('Time range');
$data[1] = html_print_extended_select_for_time(
$data[1] = '<div class="small-input-select2">'.html_print_extended_select_for_time(
'period',
$period,
'',
@ -221,7 +237,7 @@ $data[1] = html_print_extended_select_for_time(
0,
7,
true
);
).'</div>';
$table->data[] = $data;
$table->rowclass[] = '';
@ -278,7 +294,10 @@ $form_table .= html_print_submit_button(
__('Reload'),
'submit',
false,
'class="sub upd"',
[
'class' => 'float-right mini',
'icon' => 'upd',
],
true
);
$form_table .= '</div>';

View File

@ -265,7 +265,7 @@ ui_print_message_dialog(
);
$table->data[0][0] = __('Refresh time');
$table->data[0][1] = html_print_extended_select_for_time(
$table->data[0][1] = '<div class="small-input-select2">'.html_print_extended_select_for_time(
'refresh',
$refresh,
'',
@ -273,7 +273,7 @@ ui_print_message_dialog(
0,
7,
true
);
).'</div>';
$table->data[0][2] = __('Show events');
$disabled = false;
@ -293,7 +293,11 @@ ui_print_message_dialog(
'',
10,
20,
true
true,
false,
false,
'',
'small-input'
);
$table->data[1][2] = __('Show alerts');
@ -311,7 +315,11 @@ ui_print_message_dialog(
'',
10,
10,
true
true,
false,
false,
'',
'small-input'
);
$table->data[2][2] = __('Show unknown graph');
@ -323,7 +331,7 @@ ui_print_message_dialog(
);
$table->data[3][0] = __('Time range');
$table->data[3][1] = html_print_extended_select_for_time(
$table->data[3][1] = '<div class="small-input-select2">'.html_print_extended_select_for_time(
'period',
$period,
'',
@ -331,7 +339,7 @@ ui_print_message_dialog(
0,
7,
true
);
).'</div>';
$table->data[3][2] = '';
$table->data[3][3] = '';
@ -345,7 +353,7 @@ ui_print_message_dialog(
$options[3] = 'x3';
$options[4] = 'x4';
$options[5] = 'x5';
$table->data[4][1] = html_print_select(
$table->data[4][1] = '<div class="small-input-select2">'.html_print_select(
$options,
'zoom',
$zoom,
@ -355,7 +363,7 @@ ui_print_message_dialog(
true,
false,
false
);
).'</div>';
$table->data[4][2] = __('Show percentil');
$table->data[4][3] = html_print_checkbox_switch(
@ -412,7 +420,11 @@ ui_print_message_dialog(
'',
10,
20,
true
true,
false,
false,
'',
'small-input'
);
$table->data[0][2] = __('Begin time');
@ -422,11 +434,15 @@ ui_print_message_dialog(
'',
10,
10,
true
true,
false,
false,
'',
'small-input'
);
$table->data[1][0] = __('Time range');
$table->data[1][1] = html_print_extended_select_for_time(
$table->data[1][1] = '<div class="small-input-select2">'.html_print_extended_select_for_time(
'period',
$period,
'',
@ -434,7 +450,7 @@ ui_print_message_dialog(
0,
7,
true
);
).'</div>';
$table->data[1][2] = __('Time compare (Separated)');
$table->data[1][3] = html_print_checkbox_switch(

View File

@ -555,13 +555,13 @@ if (is_ajax() === true) {
$last_contact_value = ui_print_timestamp($last_contact, true);
} else {
$title = date($config['date_format'], strtotime($tmp->timestamp));
$value = human_time_comparation(strtotime($tmp->timestamp), 'large');
$value = ui_print_timestamp(strtotime($tmp->timestamp), true);
$last_contact_value = '<span title="'.$title.'">'.$value.'</span>';
}
} else {
date_default_timezone_set($user_timezone);
$title = date($config['date_format'], strtotime($tmp->timestamp));
$value = human_time_comparation(strtotime($tmp->timestamp), 'large');
$value = ui_print_timestamp(strtotime($tmp->timestamp), true);
$last_contact_value = '<span title="'.$title.'">'.$value.'</span>';
}

View File

@ -1158,29 +1158,29 @@ if ($inventory_module !== 'basic') {
$id_table = 'id_'.$row['id_module_inventory'];
}
$table = ui_print_datatable(
[
'id' => $id_table,
'class' => 'info_table w100p',
'style' => 'width: 99%',
'columns' => $columns,
'column_names' => $columns,
'no_sortable_columns' => [],
'data_element' => $data,
'searching' => true,
'dom_elements' => 'ftip',
'order' => [
'field' => $columns[0],
'direction' => 'asc',
],
'zeroRecords' => __('No inventory found'),
'emptyTable' => __('No inventory found'),
'return' => true,
'no_sortable_columns' => [],
]
);
if ($count_rows > 1) {
$table = ui_print_datatable(
[
'id' => $id_table,
'class' => 'info_table w100p',
'style' => 'width: 99%',
'columns' => $columns,
'column_names' => $columns,
'no_sortable_columns' => [],
'data_element' => $data,
'searching' => true,
'dom_elements' => 'ftip',
'order' => [
'field' => $columns[0],
'direction' => 'asc',
],
'zeroRecords' => __('No inventory found'),
'emptyTable' => __('No inventory found'),
'return' => true,
'no_sortable_columns' => [],
]
);
ui_toggle(
$table,
array_shift($module_rows)['name'],
@ -1190,7 +1190,25 @@ if ($inventory_module !== 'basic') {
false
);
} else {
echo $table;
ui_print_datatable(
[
'id' => $id_table,
'class' => 'info_table w100p',
'style' => 'width: 99%',
'columns' => $columns,
'column_names' => $columns,
'no_sortable_columns' => [],
'data_element' => $data,
'searching' => true,
'order' => [
'field' => $columns[0],
'direction' => 'asc',
],
'zeroRecords' => __('No inventory found'),
'emptyTable' => __('No inventory found'),
'print_pagination_search_csv' => true,
]
);
html_print_action_buttons(
'',

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.770
%define release 230417
%define release 230418
# 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.770
%define release 230417
%define release 230418
# 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.770
%define release 230417
%define release 230418
%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.770-230417
Version: 7.0NG.770-230418
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.770-230417"
pandora_version="7.0NG.770-230418"
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.770";
my $pandora_build = "230417";
my $pandora_build = "230418";
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.770";
my $pandora_build = "230417";
my $pandora_build = "230418";
our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] );

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_server
%define version 7.0NG.770
%define release 230417
%define release 230418
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.770
%define release 230417
%define release 230418
Summary: Pandora FMS Server
Name: %{name}

View File

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

View File

@ -35,7 +35,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB;
# version: define current version
my $version = "7.0NG.770 Build 230417";
my $version = "7.0NG.770 Build 230418";
# 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.770 Build 230417";
my $version = "7.0NG.770 Build 230418";
# save program name for logging
my $progname = basename($0);