Merge remote-tracking branch 'origin/develop' into ent-6802-super-8
This commit is contained in:
commit
17be6f3ca5
|
@ -1,5 +1,5 @@
|
||||||
package: pandorafms-agent-unix
|
package: pandorafms-agent-unix
|
||||||
Version: 7.0NG.759-220201
|
Version: 7.0NG.759-220202
|
||||||
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.759-220201"
|
pandora_version="7.0NG.759-220202"
|
||||||
|
|
||||||
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
|
||||||
|
|
|
@ -1015,7 +1015,7 @@ my $Sem = undef;
|
||||||
my $ThreadSem = undef;
|
my $ThreadSem = undef;
|
||||||
|
|
||||||
use constant AGENT_VERSION => '7.0NG.759';
|
use constant AGENT_VERSION => '7.0NG.759';
|
||||||
use constant AGENT_BUILD => '220201';
|
use constant AGENT_BUILD => '220202';
|
||||||
|
|
||||||
# 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.759
|
%define version 7.0NG.759
|
||||||
%define release 220201
|
%define release 220202
|
||||||
|
|
||||||
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.759
|
%define version 7.0NG.759
|
||||||
%define release 220201
|
%define release 220202
|
||||||
|
|
||||||
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.759"
|
PI_VERSION="7.0NG.759"
|
||||||
PI_BUILD="220201"
|
PI_BUILD="220202"
|
||||||
OS_NAME=`uname -s`
|
OS_NAME=`uname -s`
|
||||||
|
|
||||||
FORCE=0
|
FORCE=0
|
||||||
|
|
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
||||||
{}
|
{}
|
||||||
|
|
||||||
Version
|
Version
|
||||||
{220201}
|
{220202}
|
||||||
|
|
||||||
ViewReadme
|
ViewReadme
|
||||||
{Yes}
|
{Yes}
|
||||||
|
|
|
@ -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.759 Build 220201")
|
#define PANDORA_VERSION ("7.0NG.759 Build 220202")
|
||||||
|
|
||||||
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.759(Build 220201))"
|
VALUE "ProductVersion", "(7.0NG.759(Build 220202))"
|
||||||
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.759-220201
|
Version: 7.0NG.759-220202
|
||||||
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.759-220201"
|
pandora_version="7.0NG.759-220202"
|
||||||
|
|
||||||
package_pear=0
|
package_pear=0
|
||||||
package_pandora=1
|
package_pandora=1
|
||||||
|
|
|
@ -135,6 +135,7 @@ $first_create = (int) get_parameter('first_create');
|
||||||
$create_downtime = (int) get_parameter('create_downtime');
|
$create_downtime = (int) get_parameter('create_downtime');
|
||||||
$update_downtime = (int) get_parameter('update_downtime');
|
$update_downtime = (int) get_parameter('update_downtime');
|
||||||
$edit_downtime = (int) get_parameter('edit_downtime');
|
$edit_downtime = (int) get_parameter('edit_downtime');
|
||||||
|
$downtime_copy = (int) get_parameter('downtime_copy');
|
||||||
$id_downtime = (int) get_parameter('id_downtime');
|
$id_downtime = (int) get_parameter('id_downtime');
|
||||||
|
|
||||||
$id_agent = (int) get_parameter('id_agent');
|
$id_agent = (int) get_parameter('id_agent');
|
||||||
|
@ -420,6 +421,16 @@ if ($create_downtime || $update_downtime) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($downtime_copy) {
|
||||||
|
$result = planned_downtimes_copy($id_downtime);
|
||||||
|
if ($result['id_downtime'] !== false) {
|
||||||
|
$id_downtime = $result['id_downtime'];
|
||||||
|
ui_print_success_message($result['success']);
|
||||||
|
} else {
|
||||||
|
ui_print_error_message(__($result['error']));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Have any data to show ?
|
// Have any data to show ?
|
||||||
if ($id_downtime > 0) {
|
if ($id_downtime > 0) {
|
||||||
// Columns of the table tplanned_downtime.
|
// Columns of the table tplanned_downtime.
|
||||||
|
@ -628,20 +639,20 @@ $table->data[5][1] = "
|
||||||
<tr><td>".ui_get_using_system_timezone_warning().'</td></tr>
|
<tr><td>".ui_get_using_system_timezone_warning().'</td></tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>'.__('Type Periodicity:').' '.html_print_select(
|
<td>'.__('Type Periodicity:').' '.html_print_select(
|
||||||
[
|
[
|
||||||
'weekly' => __('Weekly'),
|
'weekly' => __('Weekly'),
|
||||||
'monthly' => __('Monthly'),
|
'monthly' => __('Monthly'),
|
||||||
],
|
],
|
||||||
'type_periodicity',
|
'type_periodicity',
|
||||||
$type_periodicity,
|
$type_periodicity,
|
||||||
'change_type_periodicity();',
|
'change_type_periodicity();',
|
||||||
'',
|
'',
|
||||||
0,
|
0,
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
'',
|
'',
|
||||||
$disabled_in_execution
|
$disabled_in_execution
|
||||||
)."</td>
|
)."</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -661,31 +672,31 @@ $table->data[5][1] = "
|
||||||
<tr>
|
<tr>
|
||||||
<td>".__('From day:').'</td>
|
<td>".__('From day:').'</td>
|
||||||
<td>'.html_print_select(
|
<td>'.html_print_select(
|
||||||
$days,
|
$days,
|
||||||
'periodically_day_from',
|
'periodically_day_from',
|
||||||
$periodically_day_from,
|
$periodically_day_from,
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
0,
|
0,
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
'',
|
'',
|
||||||
$disabled_in_execution
|
$disabled_in_execution
|
||||||
).'</td>
|
).'</td>
|
||||||
<td>'.__('To day:').'</td>
|
<td>'.__('To day:').'</td>
|
||||||
<td>'.html_print_select(
|
<td>'.html_print_select(
|
||||||
$days,
|
$days,
|
||||||
'periodically_day_to',
|
'periodically_day_to',
|
||||||
$periodically_day_to,
|
$periodically_day_to,
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
0,
|
0,
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
'',
|
'',
|
||||||
$disabled_in_execution
|
$disabled_in_execution
|
||||||
).'</td>
|
).'</td>
|
||||||
<td>'.ui_print_help_tip(__('The end day must be higher than the start day'), true).'</td>
|
<td>'.ui_print_help_tip(__('The end day must be higher than the start day'), true).'</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -694,26 +705,26 @@ $table->data[5][1] = "
|
||||||
<tr>
|
<tr>
|
||||||
<td>'.__('From hour:').'</td>
|
<td>'.__('From hour:').'</td>
|
||||||
<td>'.html_print_input_text(
|
<td>'.html_print_input_text(
|
||||||
'periodically_time_from',
|
'periodically_time_from',
|
||||||
$periodically_time_from,
|
$periodically_time_from,
|
||||||
'',
|
'',
|
||||||
7,
|
7,
|
||||||
7,
|
7,
|
||||||
true,
|
true,
|
||||||
$disabled_in_execution
|
$disabled_in_execution
|
||||||
).ui_print_help_tip(
|
).ui_print_help_tip(
|
||||||
__('The end time must be higher than the start time'),
|
__('The end time must be higher than the start time'),
|
||||||
true
|
true
|
||||||
).'</td>
|
).'</td>
|
||||||
<td>'.__('To hour:').'</td>
|
<td>'.__('To hour:').'</td>
|
||||||
<td>'.html_print_input_text(
|
<td>'.html_print_input_text(
|
||||||
'periodically_time_to',
|
'periodically_time_to',
|
||||||
$periodically_time_to,
|
$periodically_time_to,
|
||||||
'',
|
'',
|
||||||
7,
|
7,
|
||||||
7,
|
7,
|
||||||
true,
|
true,
|
||||||
$disabled_in_execution
|
$disabled_in_execution
|
||||||
).ui_print_help_tip(
|
).ui_print_help_tip(
|
||||||
__('The end time must be higher than the start time'),
|
__('The end time must be higher than the start time'),
|
||||||
true
|
true
|
||||||
|
@ -997,13 +1008,13 @@ $table->data['module'][1] = "
|
||||||
<td class='cell_delete_button' style='text-align: right; width:10%;' id=''>".'<a class="link_delete"
|
<td class='cell_delete_button' style='text-align: right; width:10%;' id=''>".'<a class="link_delete"
|
||||||
onclick="if(!confirm(\''.__('Are you sure?').'\')) return false;"
|
onclick="if(!confirm(\''.__('Are you sure?').'\')) return false;"
|
||||||
href="">'.html_print_image(
|
href="">'.html_print_image(
|
||||||
'images/cross.png',
|
'images/cross.png',
|
||||||
true,
|
true,
|
||||||
[
|
[
|
||||||
'border' => '0',
|
'border' => '0',
|
||||||
'alt' => __('Delete'),
|
'alt' => __('Delete'),
|
||||||
'class' => 'invert_filter',
|
'class' => 'invert_filter',
|
||||||
]
|
]
|
||||||
).'</a>'."</td>
|
).'</a>'."</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class='datos2' id='add_modules_row'>
|
<tr class='datos2' id='add_modules_row'>
|
||||||
|
|
|
@ -405,6 +405,7 @@ else {
|
||||||
|
|
||||||
if ($write_permisson || $manage_permisson) {
|
if ($write_permisson || $manage_permisson) {
|
||||||
$table->head['stop'] = __('Stop downtime');
|
$table->head['stop'] = __('Stop downtime');
|
||||||
|
$table->head['copy'] = __('Copy');
|
||||||
$table->head['edit'] = __('Edit');
|
$table->head['edit'] = __('Edit');
|
||||||
$table->head['delete'] = __('Delete');
|
$table->head['delete'] = __('Delete');
|
||||||
}
|
}
|
||||||
|
@ -492,6 +493,8 @@ else {
|
||||||
if (check_acl_restricted_all($config['id_user'], $downtime['id_group'], 'AW')
|
if (check_acl_restricted_all($config['id_user'], $downtime['id_group'], 'AW')
|
||||||
|| check_acl_restricted_all($config['id_user'], $downtime['id_group'], 'AD')
|
|| check_acl_restricted_all($config['id_user'], $downtime['id_group'], 'AD')
|
||||||
) {
|
) {
|
||||||
|
// Copy.
|
||||||
|
$data['copy'] = '<a href="index.php?sec=extensions&sec2=godmode/agentes/planned_downtime.editor&downtime_copy=1&id_downtime='.$downtime['id'].'">'.html_print_image('images/copy.png', true, ['title' => __('Copy'), 'class' => 'invert_filter']).'</a>';
|
||||||
// Edit.
|
// Edit.
|
||||||
$data['edit'] = '<a href="index.php?sec=extensions&sec2=godmode/agentes/planned_downtime.editor&edit_downtime=1&id_downtime='.$downtime['id'].'">'.html_print_image('images/config.png', true, ['title' => __('Update'), 'class' => 'invert_filter']).'</a>';
|
$data['edit'] = '<a href="index.php?sec=extensions&sec2=godmode/agentes/planned_downtime.editor&edit_downtime=1&id_downtime='.$downtime['id'].'">'.html_print_image('images/config.png', true, ['title' => __('Update'), 'class' => 'invert_filter']).'</a>';
|
||||||
// Delete.
|
// Delete.
|
||||||
|
@ -504,6 +507,8 @@ else {
|
||||||
if (check_acl_restricted_all($config['id_user'], $downtime['id_group'], 'AW')
|
if (check_acl_restricted_all($config['id_user'], $downtime['id_group'], 'AW')
|
||||||
|| check_acl_restricted_all($config['id_user'], $downtime['id_group'], 'AD')
|
|| check_acl_restricted_all($config['id_user'], $downtime['id_group'], 'AD')
|
||||||
) {
|
) {
|
||||||
|
// Copy.
|
||||||
|
$data['copy'] = '<a href="index.php?sec=extensions&sec2=godmode/agentes/planned_downtime.editor&downtime_copy=1&id_downtime='.$downtime['id'].'">'.html_print_image('images/copy.png', true, ['title' => __('Copy'), 'class' => 'invert_filter']).'</a>';
|
||||||
// Edit.
|
// Edit.
|
||||||
$data['edit'] = '<a href="index.php?sec=extensions&sec2=godmode/agentes/planned_downtime.editor&edit_downtime=1&id_downtime='.$downtime['id'].'">'.html_print_image('images/config.png', true, ['title' => __('Update'), 'class' => 'invert_filter']).'</a>';
|
$data['edit'] = '<a href="index.php?sec=extensions&sec2=godmode/agentes/planned_downtime.editor&edit_downtime=1&id_downtime='.$downtime['id'].'">'.html_print_image('images/config.png', true, ['title' => __('Update'), 'class' => 'invert_filter']).'</a>';
|
||||||
// Delete.
|
// Delete.
|
||||||
|
@ -513,11 +518,13 @@ else {
|
||||||
$data['delete'] = '';
|
$data['delete'] = '';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
$data['copy'] = '';
|
||||||
$data['edit'] = '';
|
$data['edit'] = '';
|
||||||
$data['delete'] = '';
|
$data['delete'] = '';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$data['stop'] = '';
|
$data['stop'] = '';
|
||||||
|
$data['copy'] = '';
|
||||||
$data['edit'] = '';
|
$data['edit'] = '';
|
||||||
$data['delete'] = '';
|
$data['delete'] = '';
|
||||||
}
|
}
|
||||||
|
|
|
@ -683,6 +683,7 @@ $(document).ready (function () {
|
||||||
var params = {
|
var params = {
|
||||||
"page" : "operation/agentes/ver_agente",
|
"page" : "operation/agentes/ver_agente",
|
||||||
"get_agent_modules_json" : 1,
|
"get_agent_modules_json" : 1,
|
||||||
|
"truncate_module_names": 1,
|
||||||
"get_distinct_name" : 1,
|
"get_distinct_name" : 1,
|
||||||
"indexed" : 0,
|
"indexed" : 0,
|
||||||
"privilege" : "AW",
|
"privilege" : "AW",
|
||||||
|
@ -712,7 +713,7 @@ $(document).ready (function () {
|
||||||
function (data, status) {
|
function (data, status) {
|
||||||
jQuery.each (data, function (id, value) {
|
jQuery.each (data, function (id, value) {
|
||||||
option = $("<option></option>")
|
option = $("<option></option>")
|
||||||
.attr("value", value["nombre"])
|
.attr({value: value["nombre"], title: value["nombre"]})
|
||||||
.html(value["safe_name"]);
|
.html(value["safe_name"]);
|
||||||
$("#module_name").append (option);
|
$("#module_name").append (option);
|
||||||
});
|
});
|
||||||
|
|
|
@ -1369,6 +1369,7 @@ $(document).ready (function () {
|
||||||
var params = {
|
var params = {
|
||||||
"page" : "operation/agentes/ver_agente",
|
"page" : "operation/agentes/ver_agente",
|
||||||
"get_agent_modules_json" : 1,
|
"get_agent_modules_json" : 1,
|
||||||
|
"truncate_module_names": 1,
|
||||||
"get_distinct_name" : 1,
|
"get_distinct_name" : 1,
|
||||||
"indexed" : 0,
|
"indexed" : 0,
|
||||||
"safe_name" : 1
|
"safe_name" : 1
|
||||||
|
@ -1396,7 +1397,7 @@ $(document).ready (function () {
|
||||||
params,
|
params,
|
||||||
function (data, status) {
|
function (data, status) {
|
||||||
jQuery.each (data, function (id, value) {
|
jQuery.each (data, function (id, value) {
|
||||||
option = $("<option></option>").attr("value", value["nombre"]).html(value["safe_name"]);
|
option = $("<option></option>").attr({value: value["nombre"], title: value["nombre"]}).html(value["safe_name"]);
|
||||||
$("#module_name").append (option);
|
$("#module_name").append (option);
|
||||||
});
|
});
|
||||||
hideSpinner();
|
hideSpinner();
|
||||||
|
|
|
@ -1672,10 +1672,15 @@ class NetworkMap
|
||||||
if (isset($source_data['color'])) {
|
if (isset($source_data['color'])) {
|
||||||
$item['color'] = $source_data['color'];
|
$item['color'] = $source_data['color'];
|
||||||
} else {
|
} else {
|
||||||
$item['color'] = self::getColorByStatus(
|
if (empty($node['status']) && empty($node['id_module']) && !empty($node['style']['id_networkmap'])) {
|
||||||
$node['status'],
|
$status_aux = get_status_color_networkmap_fictional_point($node['style']['id_networkmap']);
|
||||||
(bool) $node['id_module']
|
$item['color'] = $status_aux;
|
||||||
);
|
} else {
|
||||||
|
$item['color'] = self::getColorByStatus(
|
||||||
|
$node['status'],
|
||||||
|
(bool) $node['id_module']
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
/**
|
/**
|
||||||
* Pandora build version and version
|
* Pandora build version and version
|
||||||
*/
|
*/
|
||||||
$build_version = 'PC220201';
|
$build_version = 'PC220202';
|
||||||
$pandora_version = 'v7.0NG.759';
|
$pandora_version = 'v7.0NG.759';
|
||||||
|
|
||||||
// Do not overwrite default timezone set if defined.
|
// Do not overwrite default timezone set if defined.
|
||||||
|
|
|
@ -890,7 +890,7 @@ function modules_create_agent_module(
|
||||||
} else {
|
} else {
|
||||||
db_process_sql(
|
db_process_sql(
|
||||||
'UPDATE tagente
|
'UPDATE tagente
|
||||||
SET total_count=total_count+1, notinit_count=notinit_count+1
|
SET total_count=total_count+1, notinit_count=notinit_count+1, update_module_count=1
|
||||||
WHERE id_agente='.(int) $id_agent
|
WHERE id_agente='.(int) $id_agent
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3280,7 +3280,10 @@ function get_status_color_networkmap_fictional_point($id_networkmap, $parent='')
|
||||||
if ((int) $id_networkmap !== 0) {
|
if ((int) $id_networkmap !== 0) {
|
||||||
$agents = db_get_all_rows_filter(
|
$agents = db_get_all_rows_filter(
|
||||||
'titem',
|
'titem',
|
||||||
['id_map' => $id_networkmap]
|
[
|
||||||
|
'id_map' => $id_networkmap,
|
||||||
|
'deleted' => 0,
|
||||||
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
if ((bool) $agents === false) {
|
if ((bool) $agents === false) {
|
||||||
|
|
|
@ -919,3 +919,88 @@ function delete_planned_downtimes($filter)
|
||||||
|
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function planned_downtimes_copy($id_downtime)
|
||||||
|
{
|
||||||
|
$planned_downtime = db_get_row_filter(
|
||||||
|
'tplanned_downtime',
|
||||||
|
['id' => $id_downtime]
|
||||||
|
);
|
||||||
|
|
||||||
|
$planned_agents = db_get_all_rows_filter(
|
||||||
|
'tplanned_downtime_agents',
|
||||||
|
['id_downtime' => $id_downtime]
|
||||||
|
);
|
||||||
|
|
||||||
|
$planned_modules = db_get_all_rows_filter(
|
||||||
|
'tplanned_downtime_modules',
|
||||||
|
['id_downtime' => $id_downtime]
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($planned_downtime === false) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Unset id.
|
||||||
|
unset($planned_downtime['id']);
|
||||||
|
|
||||||
|
// Change copy name.
|
||||||
|
$planned_downtime['name'] = __('Copy of ').$planned_downtime['name'];
|
||||||
|
|
||||||
|
// Insert new downtime
|
||||||
|
$result['id_downtime'] = db_process_sql_insert(
|
||||||
|
'tplanned_downtime',
|
||||||
|
$planned_downtime
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($result === false) {
|
||||||
|
$result['error'] = __('Could not be copied');
|
||||||
|
return $result;
|
||||||
|
} else {
|
||||||
|
$result['success'] = __('Successfully copied');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($planned_agents !== false) {
|
||||||
|
foreach ($planned_agents as $planned_agent) {
|
||||||
|
// Unset id.
|
||||||
|
unset($planned_agent['id']);
|
||||||
|
// Set id_planned downtime
|
||||||
|
$planned_agent['id_downtime'] = $result['id_downtime'];
|
||||||
|
$result['id_agents'][] = db_process_sql_insert(
|
||||||
|
'tplanned_downtime_agents',
|
||||||
|
$planned_agent
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($result === false) {
|
||||||
|
$return['error'] = __('Error adding agents to copied downtime');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($result === false) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((bool) $planned_agents['all_modules'] === false
|
||||||
|
&& $planned_modules !== false
|
||||||
|
) {
|
||||||
|
foreach ($planned_modules as $planned_module) {
|
||||||
|
// Unset id.
|
||||||
|
unset($planned_module['id']);
|
||||||
|
// Set id_planned downtime
|
||||||
|
$planned_module['id_downtime'] = $result['id_downtime'];
|
||||||
|
$result['id_modules'][] = db_process_sql_insert(
|
||||||
|
'tplanned_downtime_moduless',
|
||||||
|
$planned_module
|
||||||
|
);
|
||||||
|
if ($result === false) {
|
||||||
|
$return['error'] = __('Error adding module to copied downtime');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
|
@ -88,6 +88,23 @@ function js_html_entity_decode(str) {
|
||||||
return str2;
|
return str2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function truncate_string(str, str_length, separator) {
|
||||||
|
if (str.length <= str_length) {
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
|
||||||
|
separator = separator || "...";
|
||||||
|
|
||||||
|
var separator_length = separator.length,
|
||||||
|
chars_to_show = str_length - separator_length,
|
||||||
|
front_chars = Math.ceil(chars_to_show / 2),
|
||||||
|
tail_chars = Math.floor(chars_to_show / 2);
|
||||||
|
|
||||||
|
return (
|
||||||
|
str.substr(0, front_chars) + separator + str.substr(str.length - tail_chars)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function to search an element in an array.
|
* Function to search an element in an array.
|
||||||
*
|
*
|
||||||
|
@ -554,6 +571,7 @@ function module_changed_by_multiple_modules(event, id_module, selected) {
|
||||||
{
|
{
|
||||||
page: "operation/agentes/ver_agente",
|
page: "operation/agentes/ver_agente",
|
||||||
get_agents_json_for_multiple_modules: 1,
|
get_agents_json_for_multiple_modules: 1,
|
||||||
|
truncate_agent_names: 1,
|
||||||
status_module: status_module,
|
status_module: status_module,
|
||||||
"module_name[]": idModules,
|
"module_name[]": idModules,
|
||||||
selection_mode: selection_mode,
|
selection_mode: selection_mode,
|
||||||
|
@ -619,8 +637,8 @@ function module_changed_by_multiple_modules(event, id_module, selected) {
|
||||||
s = js_html_entity_decode(val);
|
s = js_html_entity_decode(val);
|
||||||
$("#agents").append(
|
$("#agents").append(
|
||||||
$("<option></option>")
|
$("<option></option>")
|
||||||
.html(s)
|
.html(truncate_string(s, 30, "..."))
|
||||||
.attr("value", i)
|
.attr({ value: i, title: s })
|
||||||
);
|
);
|
||||||
$("#agents").fadeIn("normal");
|
$("#agents").fadeIn("normal");
|
||||||
});
|
});
|
||||||
|
|
|
@ -630,7 +630,7 @@ function configure_modules_form() {
|
||||||
|
|
||||||
moduletype = $("#hidden-moduletype").val();
|
moduletype = $("#hidden-moduletype").val();
|
||||||
if (moduletype == 5) {
|
if (moduletype == 5) {
|
||||||
if ($("#prediction_module").val() == null) {
|
if ($("#id_modules").val() === null) {
|
||||||
$("#prediction_module").focus();
|
$("#prediction_module").focus();
|
||||||
$("#message").showMessage(no_prediction_module_lang);
|
$("#message").showMessage(no_prediction_module_lang);
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -406,7 +406,8 @@ final class Group extends Item
|
||||||
$html .= '<div class="group-item-title">';
|
$html .= '<div class="group-item-title">';
|
||||||
$html .= $groupName;
|
$html .= $groupName;
|
||||||
$html .= '</div>';
|
$html .= '</div>';
|
||||||
$html .= '<div class="group-item-info" style="padding:0%;width: 96%">';
|
$html .= '<div class="group-item-info" style="padding:0%;width: 100%;justify-content:center">';
|
||||||
|
$html .= '<div style="width:90%;display:flex;flex-direction:row;flex-wrap:wrap;padding:1%">';
|
||||||
// Critical.
|
// Critical.
|
||||||
$html .= '<div class="group-item-info-container">';
|
$html .= '<div class="group-item-info-container">';
|
||||||
$html .= '<div class="value-style red_background">';
|
$html .= '<div class="value-style red_background">';
|
||||||
|
@ -436,6 +437,7 @@ final class Group extends Item
|
||||||
$html .= '<div class="name-style">'.__('Unknown').'</div>';
|
$html .= '<div class="name-style">'.__('Unknown').'</div>';
|
||||||
$html .= '</div>';
|
$html .= '</div>';
|
||||||
|
|
||||||
|
$html .= '</div>';
|
||||||
$html .= '</div>';
|
$html .= '</div>';
|
||||||
$html .= '</div>';
|
$html .= '</div>';
|
||||||
|
|
||||||
|
|
|
@ -491,6 +491,7 @@ li#li-timeZone-item > select:not(:first-child) {
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
max-height: 50px;
|
max-height: 50px;
|
||||||
|
min-height: 35px;
|
||||||
margin: 1%;
|
margin: 1%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -498,7 +499,7 @@ li#li-timeZone-item > select:not(:first-child) {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 100%;
|
font-size: 100%;
|
||||||
padding: 5%;
|
padding: 0%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
@ -511,7 +512,7 @@ li#li-timeZone-item > select:not(:first-child) {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
color: black;
|
color: black;
|
||||||
font-size: 100%;
|
font-size: 100%;
|
||||||
padding: 5%;
|
padding: 0%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -695,6 +696,25 @@ div.module-graph .gauge_d3_class {
|
||||||
color: #000;
|
color: #000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.orange_background {
|
||||||
|
background: #ffa631;
|
||||||
|
}
|
||||||
|
.red_background {
|
||||||
|
background: #e63c52;
|
||||||
|
}
|
||||||
|
.yellow_background {
|
||||||
|
background: #f3b200;
|
||||||
|
}
|
||||||
|
.grey_background {
|
||||||
|
background: #b2b2b2;
|
||||||
|
}
|
||||||
|
.blue_background {
|
||||||
|
background: #4a83f3;
|
||||||
|
}
|
||||||
|
.green_background {
|
||||||
|
background: #82b92e;
|
||||||
|
}
|
||||||
|
|
||||||
/* Styles for the solid icons */
|
/* Styles for the solid icons */
|
||||||
|
|
||||||
.fa {
|
.fa {
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -129,7 +129,7 @@
|
||||||
<div style='height: 10px'>
|
<div style='height: 10px'>
|
||||||
<?php
|
<?php
|
||||||
$version = '7.0NG.759';
|
$version = '7.0NG.759';
|
||||||
$build = '220201';
|
$build = '220202';
|
||||||
$banner = "v$version Build $build";
|
$banner = "v$version Build $build";
|
||||||
|
|
||||||
error_reporting(0);
|
error_reporting(0);
|
||||||
|
|
|
@ -353,6 +353,8 @@ if (is_ajax()) {
|
||||||
$selection_mode = get_parameter('selection_mode', 'common') == 'all';
|
$selection_mode = get_parameter('selection_mode', 'common') == 'all';
|
||||||
$status_modulo = (int) get_parameter('status_module', -1);
|
$status_modulo = (int) get_parameter('status_module', -1);
|
||||||
$tags_selected = (array) get_parameter('tags', []);
|
$tags_selected = (array) get_parameter('tags', []);
|
||||||
|
$truncate_agent_names = (bool) get_parameter('truncate_agent_names');
|
||||||
|
|
||||||
$names = select_agents_for_module_group(
|
$names = select_agents_for_module_group(
|
||||||
$nameModules,
|
$nameModules,
|
||||||
$selection_mode,
|
$selection_mode,
|
||||||
|
@ -790,6 +792,8 @@ if (is_ajax()) {
|
||||||
|
|
||||||
$safe_name = (bool) get_parameter('safe_name', false);
|
$safe_name = (bool) get_parameter('safe_name', false);
|
||||||
|
|
||||||
|
$truncate_module_names = (bool) get_parameter('truncate_module_names');
|
||||||
|
|
||||||
// Filter.
|
// Filter.
|
||||||
$filter = [];
|
$filter = [];
|
||||||
if ($disabled !== -1) {
|
if ($disabled !== -1) {
|
||||||
|
@ -945,6 +949,16 @@ if (is_ajax()) {
|
||||||
$agent_modules = $new_elements;
|
$agent_modules = $new_elements;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($truncate_module_names === true) {
|
||||||
|
$agent_modules = array_map(
|
||||||
|
function ($item) {
|
||||||
|
$item['safe_name'] = ui_print_truncate_text($item['safe_name'], 'module_medium');
|
||||||
|
return $item;
|
||||||
|
},
|
||||||
|
$agent_modules
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
echo json_encode($agent_modules);
|
echo json_encode($agent_modules);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.759
|
%define version 7.0NG.759
|
||||||
%define release 220201
|
%define release 220202
|
||||||
|
|
||||||
# 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.759
|
%define version 7.0NG.759
|
||||||
%define release 220201
|
%define release 220202
|
||||||
|
|
||||||
# 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.759
|
%define version 7.0NG.759
|
||||||
%define release 220201
|
%define release 220202
|
||||||
%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.759-220201
|
Version: 7.0NG.759-220202
|
||||||
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.759-220201"
|
pandora_version="7.0NG.759-220202"
|
||||||
|
|
||||||
package_cpan=0
|
package_cpan=0
|
||||||
package_pandora=1
|
package_pandora=1
|
||||||
|
|
|
@ -46,7 +46,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.759";
|
my $pandora_version = "7.0NG.759";
|
||||||
my $pandora_build = "220201";
|
my $pandora_build = "220202";
|
||||||
our $VERSION = $pandora_version." ".$pandora_build;
|
our $VERSION = $pandora_version." ".$pandora_build;
|
||||||
|
|
||||||
# Setup hash
|
# Setup hash
|
||||||
|
|
|
@ -34,7 +34,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.759";
|
my $pandora_version = "7.0NG.759";
|
||||||
my $pandora_build = "220201";
|
my $pandora_build = "220202";
|
||||||
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.759
|
%define version 7.0NG.759
|
||||||
%define release 220201
|
%define release 220202
|
||||||
|
|
||||||
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.759
|
%define version 7.0NG.759
|
||||||
%define release 220201
|
%define release 220202
|
||||||
|
|
||||||
Summary: Pandora FMS Server
|
Summary: Pandora FMS Server
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
# **********************************************************************
|
# **********************************************************************
|
||||||
|
|
||||||
PI_VERSION="7.0NG.759"
|
PI_VERSION="7.0NG.759"
|
||||||
PI_BUILD="220201"
|
PI_BUILD="220202"
|
||||||
|
|
||||||
MODE=$1
|
MODE=$1
|
||||||
if [ $# -gt 1 ]; then
|
if [ $# -gt 1 ]; then
|
||||||
|
|
|
@ -35,7 +35,7 @@ use PandoraFMS::Config;
|
||||||
use PandoraFMS::DB;
|
use PandoraFMS::DB;
|
||||||
|
|
||||||
# version: define current version
|
# version: define current version
|
||||||
my $version = "7.0NG.759 Build 220201";
|
my $version = "7.0NG.759 Build 220202";
|
||||||
|
|
||||||
# Pandora server configuration
|
# Pandora server configuration
|
||||||
my %conf;
|
my %conf;
|
||||||
|
|
|
@ -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.759 Build 220201";
|
my $version = "7.0NG.759 Build 220202";
|
||||||
|
|
||||||
# save program name for logging
|
# save program name for logging
|
||||||
my $progname = basename($0);
|
my $progname = basename($0);
|
||||||
|
|
|
@ -491,6 +491,7 @@ li#li-timeZone-item > select:not(:first-child) {
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
max-height: 50px;
|
max-height: 50px;
|
||||||
|
min-height: 35px;
|
||||||
margin: 1%;
|
margin: 1%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -498,7 +499,7 @@ li#li-timeZone-item > select:not(:first-child) {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 100%;
|
font-size: 100%;
|
||||||
padding: 5%;
|
padding: 0%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
@ -511,7 +512,7 @@ li#li-timeZone-item > select:not(:first-child) {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
color: black;
|
color: black;
|
||||||
font-size: 100%;
|
font-size: 100%;
|
||||||
padding: 5%;
|
padding: 0%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -694,3 +695,22 @@ div.module-graph .gauge_d3_class {
|
||||||
.gauge-data #percent {
|
.gauge-data #percent {
|
||||||
color: #000;
|
color: #000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.orange_background {
|
||||||
|
background: #ffa631;
|
||||||
|
}
|
||||||
|
.red_background {
|
||||||
|
background: #e63c52;
|
||||||
|
}
|
||||||
|
.yellow_background {
|
||||||
|
background: #f3b200;
|
||||||
|
}
|
||||||
|
.grey_background {
|
||||||
|
background: #b2b2b2;
|
||||||
|
}
|
||||||
|
.blue_background {
|
||||||
|
background: #4a83f3;
|
||||||
|
}
|
||||||
|
.green_background {
|
||||||
|
background: #82b92e;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue