mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
Merge remote-tracking branch 'origin/develop' into ent-8535-Monitorizacion-de-clusters-Pasar-de-Enterprise-a-Open
This commit is contained in:
commit
8f3f8679d5
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-agent-unix
|
package: pandorafms-agent-unix
|
||||||
Version: 7.0NG.767-221215
|
Version: 7.0NG.767-221216
|
||||||
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.767-221215"
|
pandora_version="7.0NG.767-221216"
|
||||||
|
|
||||||
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.767';
|
use constant AGENT_VERSION => '7.0NG.767';
|
||||||
use constant AGENT_BUILD => '221215';
|
use constant AGENT_BUILD => '221216';
|
||||||
|
|
||||||
# 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.767
|
%define version 7.0NG.767
|
||||||
%define release 221215
|
%define release 221216
|
||||||
|
|
||||||
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.767
|
%define version 7.0NG.767
|
||||||
%define release 221215
|
%define release 221216
|
||||||
|
|
||||||
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.767"
|
PI_VERSION="7.0NG.767"
|
||||||
PI_BUILD="221215"
|
PI_BUILD="221216"
|
||||||
OS_NAME=`uname -s`
|
OS_NAME=`uname -s`
|
||||||
|
|
||||||
FORCE=0
|
FORCE=0
|
||||||
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
Version
|
Version
|
||||||
{221215}
|
{221216}
|
||||||
|
|
||||||
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.767 Build 221215")
|
#define PANDORA_VERSION ("7.0NG.767 Build 221216")
|
||||||
|
|
||||||
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.767(Build 221215))"
|
VALUE "ProductVersion", "(7.0NG.767(Build 221216))"
|
||||||
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.767-221215
|
Version: 7.0NG.767-221216
|
||||||
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.767-221215"
|
pandora_version="7.0NG.767-221216"
|
||||||
|
|
||||||
package_pear=0
|
package_pear=0
|
||||||
package_pandora=1
|
package_pandora=1
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
|
|
||||||
|
ALTER TABLE treport_content ADD COLUMN use_prefix_notation tinyint(1) default '1';
|
||||||
|
ALTER TABLE treport_content_template ADD COLUMN use_prefix_notation tinyint(1) default '1';
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `tphase`;
|
DROP TABLE IF EXISTS `tphase`;
|
||||||
DROP TABLE IF EXISTS `ttransaction`;
|
DROP TABLE IF EXISTS `ttransaction`;
|
||||||
|
|
||||||
|
@ -169,6 +169,7 @@ $visual_format = 0;
|
|||||||
$filter_search = '';
|
$filter_search = '';
|
||||||
$filter_exclude = '';
|
$filter_exclude = '';
|
||||||
|
|
||||||
|
$use_prefix_notation = true;
|
||||||
|
|
||||||
// Added for select fields.
|
// Added for select fields.
|
||||||
$total_time = true;
|
$total_time = true;
|
||||||
@ -461,6 +462,7 @@ switch ($action) {
|
|||||||
$lapse = $item['lapse'];
|
$lapse = $item['lapse'];
|
||||||
$lapse_calc = $item['lapse_calc'];
|
$lapse_calc = $item['lapse_calc'];
|
||||||
$visual_format = $item['visual_format'];
|
$visual_format = $item['visual_format'];
|
||||||
|
$use_prefix_notation = $item['use_prefix_notation'];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'max_value':
|
case 'max_value':
|
||||||
@ -476,6 +478,7 @@ switch ($action) {
|
|||||||
$lapse = $item['lapse'];
|
$lapse = $item['lapse'];
|
||||||
$lapse_calc = $item['lapse_calc'];
|
$lapse_calc = $item['lapse_calc'];
|
||||||
$visual_format = $item['visual_format'];
|
$visual_format = $item['visual_format'];
|
||||||
|
$use_prefix_notation = $item['use_prefix_notation'];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'min_value':
|
case 'min_value':
|
||||||
@ -491,6 +494,7 @@ switch ($action) {
|
|||||||
$lapse = $item['lapse'];
|
$lapse = $item['lapse'];
|
||||||
$lapse_calc = $item['lapse_calc'];
|
$lapse_calc = $item['lapse_calc'];
|
||||||
$visual_format = $item['visual_format'];
|
$visual_format = $item['visual_format'];
|
||||||
|
$use_prefix_notation = $item['use_prefix_notation'];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'sumatory':
|
case 'sumatory':
|
||||||
@ -504,6 +508,7 @@ switch ($action) {
|
|||||||
$idAgentModule = $item['id_agent_module'];
|
$idAgentModule = $item['id_agent_module'];
|
||||||
$period = $item['period'];
|
$period = $item['period'];
|
||||||
$uncompressed_module = $item['uncompressed_module'];
|
$uncompressed_module = $item['uncompressed_module'];
|
||||||
|
$use_prefix_notation = $item['use_prefix_notation'];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'historical_data':
|
case 'historical_data':
|
||||||
@ -773,6 +778,7 @@ switch ($action) {
|
|||||||
$show_resume = $item['show_resume'];
|
$show_resume = $item['show_resume'];
|
||||||
$show_graph = $item['show_graph'];
|
$show_graph = $item['show_graph'];
|
||||||
$order_uptodown = $item['order_uptodown'];
|
$order_uptodown = $item['order_uptodown'];
|
||||||
|
$use_prefix_notation = $item['use_prefix_notation'];
|
||||||
|
|
||||||
$text_agent = '';
|
$text_agent = '';
|
||||||
if (isset($style['text_agent']) === true
|
if (isset($style['text_agent']) === true
|
||||||
@ -3404,6 +3410,22 @@ $class = 'databox filters';
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<tr id="row_use_prefix_notation" class="datos advanced_elements">
|
||||||
|
<td class="bolder">
|
||||||
|
<?php
|
||||||
|
echo __('Use prefix notation');
|
||||||
|
ui_print_help_tip(
|
||||||
|
__('Use prefix notation for numeric values (example: 20,8Kbytes/sec), otherwise full value will be displayed (example: 20.742 bytes/sec)')
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php
|
||||||
|
html_print_checkbox_switch('use_prefix_notation', 1, $use_prefix_notation);
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr id="row_uncompressed_module" class="datos">
|
<tr id="row_uncompressed_module" class="datos">
|
||||||
<td class="bolder">
|
<td class="bolder">
|
||||||
<?php
|
<?php
|
||||||
@ -6367,6 +6389,7 @@ function chooseType() {
|
|||||||
$("#row_show_summary").hide();
|
$("#row_show_summary").hide();
|
||||||
$("#row_group_by").hide();
|
$("#row_group_by").hide();
|
||||||
$("#row_type_show").hide();
|
$("#row_type_show").hide();
|
||||||
|
$("#row_use_prefix_notation").hide();
|
||||||
|
|
||||||
// SLA list default state.
|
// SLA list default state.
|
||||||
$("#sla_list").hide();
|
$("#sla_list").hide();
|
||||||
@ -6561,6 +6584,7 @@ function chooseType() {
|
|||||||
$("#row_lapse").show();
|
$("#row_lapse").show();
|
||||||
$("#row_visual_format").show();
|
$("#row_visual_format").show();
|
||||||
$("#row_historical_db_check").hide();
|
$("#row_historical_db_check").hide();
|
||||||
|
$("#row_use_prefix_notation").show();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'max_value':
|
case 'max_value':
|
||||||
@ -6572,6 +6596,7 @@ function chooseType() {
|
|||||||
$("#row_lapse").show();
|
$("#row_lapse").show();
|
||||||
$("#row_visual_format").show();
|
$("#row_visual_format").show();
|
||||||
$("#row_historical_db_check").hide();
|
$("#row_historical_db_check").hide();
|
||||||
|
$("#row_use_prefix_notation").show();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'min_value':
|
case 'min_value':
|
||||||
@ -6583,6 +6608,7 @@ function chooseType() {
|
|||||||
$("#row_lapse").show();
|
$("#row_lapse").show();
|
||||||
$("#row_visual_format").show();
|
$("#row_visual_format").show();
|
||||||
$("#row_historical_db_check").hide();
|
$("#row_historical_db_check").hide();
|
||||||
|
$("#row_use_prefix_notation").show();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'sumatory':
|
case 'sumatory':
|
||||||
@ -6592,6 +6618,7 @@ function chooseType() {
|
|||||||
$("#row_period").show();
|
$("#row_period").show();
|
||||||
$("#row_historical_db_check").hide();
|
$("#row_historical_db_check").hide();
|
||||||
$("#row_uncompressed_module").show();
|
$("#row_uncompressed_module").show();
|
||||||
|
$("#row_use_prefix_notation").show();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'historical_data':
|
case 'historical_data':
|
||||||
@ -6879,6 +6906,7 @@ function chooseType() {
|
|||||||
$("#row_show_resume").show();
|
$("#row_show_resume").show();
|
||||||
$("#row_show_graph").show();
|
$("#row_show_graph").show();
|
||||||
$("#row_historical_db_check").hide();
|
$("#row_historical_db_check").hide();
|
||||||
|
$("#row_use_prefix_notation").show();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'exception':
|
case 'exception':
|
||||||
|
@ -1888,6 +1888,9 @@ switch ($action) {
|
|||||||
$values['visual_format'] = get_parameter(
|
$values['visual_format'] = get_parameter(
|
||||||
'visual_format'
|
'visual_format'
|
||||||
);
|
);
|
||||||
|
$values['use_prefix_notation'] = get_parameter(
|
||||||
|
'use_prefix_notation'
|
||||||
|
);
|
||||||
$good_format = true;
|
$good_format = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1911,6 +1914,9 @@ switch ($action) {
|
|||||||
$values['show_graph'] = get_parameter(
|
$values['show_graph'] = get_parameter(
|
||||||
'combo_graph_options'
|
'combo_graph_options'
|
||||||
);
|
);
|
||||||
|
$values['use_prefix_notation'] = get_parameter(
|
||||||
|
'use_prefix_notation'
|
||||||
|
);
|
||||||
$good_format = true;
|
$good_format = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -2704,6 +2710,9 @@ switch ($action) {
|
|||||||
$values['visual_format'] = get_parameter(
|
$values['visual_format'] = get_parameter(
|
||||||
'visual_format'
|
'visual_format'
|
||||||
);
|
);
|
||||||
|
$values['use_prefix_notation'] = get_parameter(
|
||||||
|
'use_prefix_notation'
|
||||||
|
);
|
||||||
$good_format = true;
|
$good_format = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -2720,6 +2729,9 @@ switch ($action) {
|
|||||||
$values['show_graph'] = get_parameter(
|
$values['show_graph'] = get_parameter(
|
||||||
'combo_graph_options'
|
'combo_graph_options'
|
||||||
);
|
);
|
||||||
|
$values['use_prefix_notation'] = get_parameter(
|
||||||
|
'use_prefix_notation'
|
||||||
|
);
|
||||||
$good_format = true;
|
$good_format = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1312,6 +1312,27 @@ $table_other->data[$row][1] = '<em>'.__('Example').'</em> '.date($config['date_f
|
|||||||
$table_other->data[$row][1] .= html_print_input_text('date_format', $config['date_format'], '', 30, 100, true);
|
$table_other->data[$row][1] .= html_print_input_text('date_format', $config['date_format'], '', 30, 100, true);
|
||||||
$row++;
|
$row++;
|
||||||
|
|
||||||
|
$decimal_separators = [
|
||||||
|
',' => ',',
|
||||||
|
'.' => '.'
|
||||||
|
];
|
||||||
|
|
||||||
|
$table_other->data[$row][0] = __('Decimal separator');
|
||||||
|
$table_other->data[$row][1] = html_print_select(
|
||||||
|
$decimal_separators,
|
||||||
|
'decimal_separator',
|
||||||
|
$config['decimal_separator'],
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
false
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
$row++;
|
||||||
|
|
||||||
if ($config['prominent_time'] == 'comparation') {
|
if ($config['prominent_time'] == 'comparation') {
|
||||||
$timestamp = false;
|
$timestamp = false;
|
||||||
$comparation = true;
|
$comparation = true;
|
||||||
|
@ -429,7 +429,9 @@ if (check_login()) {
|
|||||||
$table_modules->data[$key][1] = remove_right_zeros(
|
$table_modules->data[$key][1] = remove_right_zeros(
|
||||||
number_format(
|
number_format(
|
||||||
$value['datos'],
|
$value['datos'],
|
||||||
$config['graph_precision']
|
$config['graph_precision'],
|
||||||
|
$config['decimal_separator'],
|
||||||
|
$config['thousand_separator']
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
@ -499,7 +499,9 @@ if (check_login()) {
|
|||||||
$data[] = remove_right_zeros(
|
$data[] = remove_right_zeros(
|
||||||
number_format(
|
number_format(
|
||||||
$row[$attr[0]],
|
$row[$attr[0]],
|
||||||
$config['graph_precision']
|
$config['graph_precision'],
|
||||||
|
$config['decimal_separator'],
|
||||||
|
$config['thousand_separator']
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -507,7 +509,9 @@ if (check_login()) {
|
|||||||
$data[] = remove_right_zeros(
|
$data[] = remove_right_zeros(
|
||||||
number_format(
|
number_format(
|
||||||
$row[$attr[0]],
|
$row[$attr[0]],
|
||||||
$config['graph_precision']
|
$config['graph_precision'],
|
||||||
|
$config['decimal_separator'],
|
||||||
|
$config['thousand_separator']
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -524,7 +528,9 @@ if (check_login()) {
|
|||||||
$data[] = remove_right_zeros(
|
$data[] = remove_right_zeros(
|
||||||
number_format(
|
number_format(
|
||||||
$row[$attr[0]],
|
$row[$attr[0]],
|
||||||
$config['graph_precision']
|
$config['graph_precision'],
|
||||||
|
$config['decimal_separator'],
|
||||||
|
$config['thousand_separator']
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -2636,6 +2636,8 @@ class AgentWizard extends HTML
|
|||||||
*/
|
*/
|
||||||
private function resultsInterfaceWizard()
|
private function resultsInterfaceWizard()
|
||||||
{
|
{
|
||||||
|
global $config;
|
||||||
|
|
||||||
$generalInterfaceModules = $this->getInterfacesModules();
|
$generalInterfaceModules = $this->getInterfacesModules();
|
||||||
$generalInterfaceTables = [];
|
$generalInterfaceTables = [];
|
||||||
$generalInterfaceModulesUpdated = [];
|
$generalInterfaceModulesUpdated = [];
|
||||||
@ -2849,7 +2851,12 @@ class AgentWizard extends HTML
|
|||||||
// Format current value with thousands and decimals.
|
// Format current value with thousands and decimals.
|
||||||
if (is_numeric($currentValue) === true) {
|
if (is_numeric($currentValue) === true) {
|
||||||
$decimals = (is_float($currentValue) === true) ? 2 : 0;
|
$decimals = (is_float($currentValue) === true) ? 2 : 0;
|
||||||
$currentValue = number_format($currentValue, $decimals);
|
$currentValue = number_format(
|
||||||
|
$currentValue,
|
||||||
|
$decimals,
|
||||||
|
$config['decimal_separator'],
|
||||||
|
$config['thousand_separator']
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// It unit of measure have data, attach to current value.
|
// It unit of measure have data, attach to current value.
|
||||||
|
@ -987,7 +987,7 @@ class Diagnostics extends Wizard
|
|||||||
],
|
],
|
||||||
'tablesFragmentationValue' => [
|
'tablesFragmentationValue' => [
|
||||||
'name' => __('Tables fragmentation (current value)'),
|
'name' => __('Tables fragmentation (current value)'),
|
||||||
'value' => number_format($tFragmentationValue, 2).'%',
|
'value' => number_format($tFragmentationValue, 2, $config['decimal_separator'], $config['thousand_separator']).'%',
|
||||||
],
|
],
|
||||||
'tablesFragmentationStatus' => [
|
'tablesFragmentationStatus' => [
|
||||||
'name' => __('Table fragmentation status'),
|
'name' => __('Table fragmentation status'),
|
||||||
@ -1122,7 +1122,9 @@ class Diagnostics extends Wizard
|
|||||||
if ($totalModuleIntervalTime !== false) {
|
if ($totalModuleIntervalTime !== false) {
|
||||||
$averageTime = number_format(
|
$averageTime = number_format(
|
||||||
((int) $totalNetworkModules / (int) $totalModuleIntervalTime),
|
((int) $totalNetworkModules / (int) $totalModuleIntervalTime),
|
||||||
3
|
3,
|
||||||
|
$config['decimal_separator'],
|
||||||
|
$config['thousand_separator']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1749,7 +1751,7 @@ class Diagnostics extends Wizard
|
|||||||
$sizeServerLog = number_format($fileSize);
|
$sizeServerLog = number_format($fileSize);
|
||||||
$sizeServerLog = (0 + str_replace(',', '', $sizeServerLog));
|
$sizeServerLog = (0 + str_replace(',', '', $sizeServerLog));
|
||||||
|
|
||||||
$value = number_format(($fileSize / $mega), 3);
|
$value = number_format(($fileSize / $mega), 3, $config['decimal_separator'], $config['thousand_separator']);
|
||||||
$message = __('You have more than 10 MB of logs');
|
$message = __('You have more than 10 MB of logs');
|
||||||
$status = 0;
|
$status = 0;
|
||||||
if ($sizeServerLog <= $tenMega) {
|
if ($sizeServerLog <= $tenMega) {
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
/**
|
/**
|
||||||
* Pandora build version and version
|
* Pandora build version and version
|
||||||
*/
|
*/
|
||||||
$build_version = 'PC221215';
|
$build_version = 'PC221216';
|
||||||
$pandora_version = 'v7.0NG.767';
|
$pandora_version = 'v7.0NG.767';
|
||||||
|
|
||||||
// Do not overwrite default timezone set if defined.
|
// Do not overwrite default timezone set if defined.
|
||||||
|
@ -219,6 +219,8 @@ function list_files($directory, $stringSearch, $searchHandler, $return=false)
|
|||||||
*/
|
*/
|
||||||
function format_numeric($number, $decimals=1)
|
function format_numeric($number, $decimals=1)
|
||||||
{
|
{
|
||||||
|
global $config;
|
||||||
|
|
||||||
// Translate to float in case there are characters in the string so
|
// Translate to float in case there are characters in the string so
|
||||||
// fmod doesn't throw a notice
|
// fmod doesn't throw a notice
|
||||||
$number = (float) $number;
|
$number = (float) $number;
|
||||||
@ -227,17 +229,11 @@ function format_numeric($number, $decimals=1)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Translators: This is separator of decimal point
|
|
||||||
$dec_point = __('.');
|
|
||||||
// Translators: This is separator of decimal point
|
|
||||||
$thousands_sep = __(',');
|
|
||||||
|
|
||||||
// If has decimals
|
|
||||||
if (fmod($number, 1) > 0) {
|
if (fmod($number, 1) > 0) {
|
||||||
return number_format($number, $decimals, $dec_point, $thousands_sep);
|
return number_format($number, $decimals, $config['decimal_separator'], $config['thousand_separator']);
|
||||||
}
|
}
|
||||||
|
|
||||||
return number_format($number, 0, $dec_point, $thousands_sep);
|
return number_format($number, 0, $config['decimal_separator'], $config['thousand_separator']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -4084,14 +4080,18 @@ function series_type_graph_array($data, $show_elements_graph)
|
|||||||
$data_return['legend'][$key] .= remove_right_zeros(
|
$data_return['legend'][$key] .= remove_right_zeros(
|
||||||
number_format(
|
number_format(
|
||||||
$value['min'],
|
$value['min'],
|
||||||
$config['graph_precision']
|
$config['graph_precision'],
|
||||||
|
$config['decimal_separator'],
|
||||||
|
$config['thousand_separator']
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$data_return['legend'][$key] .= ' '.__('Max:');
|
$data_return['legend'][$key] .= ' '.__('Max:');
|
||||||
$data_return['legend'][$key] .= remove_right_zeros(
|
$data_return['legend'][$key] .= remove_right_zeros(
|
||||||
number_format(
|
number_format(
|
||||||
$value['max'],
|
$value['max'],
|
||||||
$config['graph_precision']
|
$config['graph_precision'],
|
||||||
|
$config['decimal_separator'],
|
||||||
|
$config['thousand_separator']
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$data_return['legend'][$key] .= ' '._('Avg:');
|
$data_return['legend'][$key] .= ' '._('Avg:');
|
||||||
@ -4099,7 +4099,8 @@ function series_type_graph_array($data, $show_elements_graph)
|
|||||||
number_format(
|
number_format(
|
||||||
$value['avg'],
|
$value['avg'],
|
||||||
$config['graph_precision'],
|
$config['graph_precision'],
|
||||||
$config['csv_decimal_separator']
|
$config['decimal_separator'],
|
||||||
|
$config['thousand_separator']
|
||||||
)
|
)
|
||||||
).' '.$str;
|
).' '.$str;
|
||||||
}
|
}
|
||||||
@ -4156,7 +4157,9 @@ function series_type_graph_array($data, $show_elements_graph)
|
|||||||
$data_return['legend'][$key] .= remove_right_zeros(
|
$data_return['legend'][$key] .= remove_right_zeros(
|
||||||
number_format(
|
number_format(
|
||||||
$value['data'][0][1],
|
$value['data'][0][1],
|
||||||
$config['graph_precision']
|
$config['graph_precision'],
|
||||||
|
$config['decimal_separator'],
|
||||||
|
$config['thousand_separator']
|
||||||
)
|
)
|
||||||
).' '.$str;
|
).' '.$str;
|
||||||
}
|
}
|
||||||
|
@ -1475,6 +1475,15 @@ function config_update_config()
|
|||||||
if (config_update_value('use_data_multiplier', get_parameter('use_data_multiplier', '1'), true) === false) {
|
if (config_update_value('use_data_multiplier', get_parameter('use_data_multiplier', '1'), true) === false) {
|
||||||
$error_update[] = __('Use data multiplier');
|
$error_update[] = __('Use data multiplier');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (config_update_value('decimal_separator', (string) get_parameter('decimal_separator', '.'), true) === false) {
|
||||||
|
$error_update[] = __('Decimal separator');
|
||||||
|
} else {
|
||||||
|
$thousand_separator = ((string) get_parameter('decimal_separator', '.') === '.') ? ',' : '.';
|
||||||
|
if (config_update_value('thousand_separator', $thousand_separator, true) === false) {
|
||||||
|
$error_update[] = __('Thousand separator');
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'net':
|
case 'net':
|
||||||
@ -3479,6 +3488,10 @@ function config_process_config()
|
|||||||
config_update_value('module_library_password', '');
|
config_update_value('module_library_password', '');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isset($config['decimal_separator'])) {
|
||||||
|
config_update_value('decimal_separator', '.');
|
||||||
|
}
|
||||||
|
|
||||||
// Finally, check if any value was overwritten in a form.
|
// Finally, check if any value was overwritten in a form.
|
||||||
config_update_config();
|
config_update_config();
|
||||||
}
|
}
|
||||||
|
@ -1950,7 +1950,7 @@ function html_print_extended_select_for_post_process(
|
|||||||
$found = false;
|
$found = false;
|
||||||
|
|
||||||
if ($selected) {
|
if ($selected) {
|
||||||
if (array_key_exists(number_format($selected, 14, '.', ','), $fields)) {
|
if (array_key_exists(number_format($selected, 14, $config['decimal_separator'], $config['thousand_separator']), $fields)) {
|
||||||
$found = true;
|
$found = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2589,12 +2589,12 @@ function modules_get_agentmodule_data_for_humans($module)
|
|||||||
$salida = human_milliseconds_to_string($module['datos']);
|
$salida = human_milliseconds_to_string($module['datos']);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$salida = remove_right_zeros(number_format($module['datos'], $config['graph_precision']));
|
$salida = remove_right_zeros(number_format($module['datos'], $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator']));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
$salida = remove_right_zeros(number_format($module['datos'], $config['graph_precision']));
|
$salida = remove_right_zeros(number_format($module['datos'], $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator']));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -2613,12 +2613,12 @@ function modules_get_agentmodule_data_for_humans($module)
|
|||||||
$salida = human_milliseconds_to_string($module['datos']);
|
$salida = human_milliseconds_to_string($module['datos']);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$salida = remove_right_zeros(number_format($module['datos'], $config['graph_precision']));
|
$salida = remove_right_zeros(number_format($module['datos'], $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator']));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
$salida = remove_right_zeros(number_format($module['datos'], $config['graph_precision']));
|
$salida = remove_right_zeros(number_format($module['datos'], $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator']));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2900,7 +2900,7 @@ function modules_get_status($id_agent_module, $db_status, $data, &$status, &$tit
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (is_numeric($data)) {
|
if (is_numeric($data)) {
|
||||||
$title .= ': '.remove_right_zeros(number_format($data, $config['graph_precision']));
|
$title .= ': '.remove_right_zeros(number_format($data, $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator']));
|
||||||
} else {
|
} else {
|
||||||
$text = io_safe_output($data);
|
$text = io_safe_output($data);
|
||||||
|
|
||||||
|
@ -1833,14 +1833,24 @@ function reporting_event_top_n(
|
|||||||
|
|
||||||
$divisor = get_data_multiplier($units[$key_dt]);
|
$divisor = get_data_multiplier($units[$key_dt]);
|
||||||
|
|
||||||
$data['formated_value'] = format_for_graph(
|
if ((bool) $content['use_prefix_notation'] === false) {
|
||||||
$dt,
|
$data['formated_value'] = number_format(
|
||||||
2,
|
$dt,
|
||||||
'.',
|
2,
|
||||||
',',
|
$config['decimal_separator'],
|
||||||
$divisor,
|
$config['thousand_separator']
|
||||||
$units[$key_dt]
|
).' '.$units[$key_dt];
|
||||||
);
|
} else {
|
||||||
|
$data['formated_value'] = format_for_graph(
|
||||||
|
$dt,
|
||||||
|
2,
|
||||||
|
'.',
|
||||||
|
',',
|
||||||
|
$divisor,
|
||||||
|
$units[$key_dt]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$data_return[] = $data;
|
$data_return[] = $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1901,14 +1911,25 @@ function reporting_event_top_n(
|
|||||||
$data['agent'] = $an;
|
$data['agent'] = $an;
|
||||||
$data['module'] = $module_name[$key_an];
|
$data['module'] = $module_name[$key_an];
|
||||||
$data['value'] = $data_top[$key_an];
|
$data['value'] = $data_top[$key_an];
|
||||||
$data['formated_value'] = format_for_graph(
|
|
||||||
$data_top[$key_an],
|
if ((bool) $content['use_prefix_notation'] === false) {
|
||||||
2,
|
$data['formated_value'] = number_format(
|
||||||
'.',
|
$data_top[$key_an],
|
||||||
',',
|
2,
|
||||||
$divisor,
|
$config['decimal_separator'],
|
||||||
$units[$key_an]
|
$config['thousand_separator']
|
||||||
);
|
).' '.$units[$key_an];
|
||||||
|
} else {
|
||||||
|
$data['formated_value'] = format_for_graph(
|
||||||
|
$data_top[$key_an],
|
||||||
|
2,
|
||||||
|
'.',
|
||||||
|
',',
|
||||||
|
$divisor,
|
||||||
|
$units[$key_an]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$data_return[] = $data;
|
$data_return[] = $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6917,6 +6938,13 @@ function reporting_value($report, $content, $type, $pdf=false)
|
|||||||
|
|
||||||
if (!$config['simple_module_value']) {
|
if (!$config['simple_module_value']) {
|
||||||
$formated_value = $value;
|
$formated_value = $value;
|
||||||
|
} else if ((bool) $content['use_prefix_notation'] === false) {
|
||||||
|
$formated_value = number_format(
|
||||||
|
$value,
|
||||||
|
$config['graph_precision'],
|
||||||
|
$config['decimal_separator'],
|
||||||
|
$config['thousand_separator']
|
||||||
|
).' '.$unit;
|
||||||
} else {
|
} else {
|
||||||
$formated_value = format_for_graph(
|
$formated_value = format_for_graph(
|
||||||
$value,
|
$value,
|
||||||
@ -7077,6 +7105,13 @@ function reporting_value($report, $content, $type, $pdf=false)
|
|||||||
);
|
);
|
||||||
if (!$config['simple_module_value']) {
|
if (!$config['simple_module_value']) {
|
||||||
$formated_value = $value;
|
$formated_value = $value;
|
||||||
|
} else if ((bool) $content['use_prefix_notation'] === false) {
|
||||||
|
$formated_value = number_format(
|
||||||
|
$value,
|
||||||
|
$config['graph_precision'],
|
||||||
|
$config['decimal_separator'],
|
||||||
|
$config['thousand_separator']
|
||||||
|
).' '.$unit;
|
||||||
} else {
|
} else {
|
||||||
$divisor = get_data_multiplier($unit);
|
$divisor = get_data_multiplier($unit);
|
||||||
|
|
||||||
|
@ -2292,7 +2292,9 @@ function reporting_html_agent_module_status($table, $item, $pdf=0)
|
|||||||
$row['data_module'] = remove_right_zeros(
|
$row['data_module'] = remove_right_zeros(
|
||||||
number_format(
|
number_format(
|
||||||
$data['data_module'],
|
$data['data_module'],
|
||||||
$config['graph_precision']
|
$config['graph_precision'],
|
||||||
|
$config['decimal_separator'],
|
||||||
|
$config['thousand_separator']
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -2785,7 +2787,7 @@ function reporting_html_historical_data($table, $item, $pdf=0)
|
|||||||
} else {
|
} else {
|
||||||
$row = [
|
$row = [
|
||||||
$data[__('Date')],
|
$data[__('Date')],
|
||||||
remove_right_zeros(number_format($data[__('Data')], $config['graph_precision'])),
|
remove_right_zeros(number_format($data[__('Data')], $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator'])),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2925,7 +2927,9 @@ function reporting_html_last_value($table, $item, $pdf=0)
|
|||||||
$dataDatos = remove_right_zeros(
|
$dataDatos = remove_right_zeros(
|
||||||
number_format(
|
number_format(
|
||||||
$item['data']['datos'],
|
$item['data']['datos'],
|
||||||
$config['graph_precision']
|
$config['graph_precision'],
|
||||||
|
$config['decimal_separator'],
|
||||||
|
$config['thousand_separator']
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -3470,7 +3474,9 @@ function reporting_html_monitor_report($table, $item, $mini, $pdf=0)
|
|||||||
).' '.__('OK').': '.remove_right_zeros(
|
).' '.__('OK').': '.remove_right_zeros(
|
||||||
number_format(
|
number_format(
|
||||||
$item['data']['ok']['value'],
|
$item['data']['ok']['value'],
|
||||||
$config['graph_precision']
|
$config['graph_precision'],
|
||||||
|
$config['decimal_separator'],
|
||||||
|
$config['thousand_separator']
|
||||||
)
|
)
|
||||||
).' %</p>';
|
).' %</p>';
|
||||||
|
|
||||||
@ -3481,7 +3487,9 @@ function reporting_html_monitor_report($table, $item, $mini, $pdf=0)
|
|||||||
).' '.__('Not OK').': '.remove_right_zeros(
|
).' '.__('Not OK').': '.remove_right_zeros(
|
||||||
number_format(
|
number_format(
|
||||||
$item['data']['fail']['value'],
|
$item['data']['fail']['value'],
|
||||||
$config['graph_precision']
|
$config['graph_precision'],
|
||||||
|
$config['decimal_separator'],
|
||||||
|
$config['thousand_separator']
|
||||||
)
|
)
|
||||||
).' % '.'</p>';
|
).' % '.'</p>';
|
||||||
}
|
}
|
||||||
@ -3835,7 +3843,9 @@ function reporting_html_value(
|
|||||||
remove_right_zeros(
|
remove_right_zeros(
|
||||||
number_format(
|
number_format(
|
||||||
$data[__('Maximun')],
|
$data[__('Maximun')],
|
||||||
$config['graph_precision']
|
$config['graph_precision'],
|
||||||
|
$config['decimal_separator'],
|
||||||
|
$config['thousand_separator']
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
|
@ -193,7 +193,7 @@ function treeview_printModuleTable($id_module, $server_data=false, $no_head=fals
|
|||||||
if ($value == '.1.3.6.1.2.1.1.3.0' || $value == '.1.3.6.1.2.1.25.1.1.0') {
|
if ($value == '.1.3.6.1.2.1.1.3.0' || $value == '.1.3.6.1.2.1.25.1.1.0') {
|
||||||
$data = "<span title='".$last_data['datos']."' class='nowrap'>".human_milliseconds_to_string($last_data['datos']).'</span>';
|
$data = "<span title='".$last_data['datos']."' class='nowrap'>".human_milliseconds_to_string($last_data['datos']).'</span>';
|
||||||
} else if (is_numeric($last_data['datos'])) {
|
} else if (is_numeric($last_data['datos'])) {
|
||||||
$data = "<span class='span_treeview'>".remove_right_zeros(number_format($last_data['datos'], $config['graph_precision'])).'</span>';
|
$data = "<span class='span_treeview'>".remove_right_zeros(number_format($last_data['datos'], $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator'])).'</span>';
|
||||||
} else {
|
} else {
|
||||||
$data = ui_print_truncate_text(
|
$data = ui_print_truncate_text(
|
||||||
io_safe_output($last_data['datos']),
|
io_safe_output($last_data['datos']),
|
||||||
@ -209,7 +209,7 @@ function treeview_printModuleTable($id_module, $server_data=false, $no_head=fals
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
if (is_numeric($last_data['datos'])) {
|
if (is_numeric($last_data['datos'])) {
|
||||||
$data = "<span class='span_treeview'>".remove_right_zeros(number_format($last_data['datos'], $config['graph_precision'])).'</span>';
|
$data = "<span class='span_treeview'>".remove_right_zeros(number_format($last_data['datos'], $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator'])).'</span>';
|
||||||
} else {
|
} else {
|
||||||
$data = ui_print_truncate_text(
|
$data = ui_print_truncate_text(
|
||||||
io_safe_output($last_data['datos']),
|
io_safe_output($last_data['datos']),
|
||||||
@ -232,7 +232,7 @@ function treeview_printModuleTable($id_module, $server_data=false, $no_head=fals
|
|||||||
if ($value == '.1.3.6.1.2.1.1.3.0' || $value == '.1.3.6.1.2.1.25.1.1.0') {
|
if ($value == '.1.3.6.1.2.1.1.3.0' || $value == '.1.3.6.1.2.1.25.1.1.0') {
|
||||||
$data = "<span title='".human_milliseconds_to_string($last_data['datos'])."' class='nowrap'>".human_milliseconds_to_string($last_data['datos']).'</span>';
|
$data = "<span title='".human_milliseconds_to_string($last_data['datos'])."' class='nowrap'>".human_milliseconds_to_string($last_data['datos']).'</span>';
|
||||||
} else if (is_numeric($last_data['datos'])) {
|
} else if (is_numeric($last_data['datos'])) {
|
||||||
$data = "<span class='span_treeview'>".remove_right_zeros(number_format($last_data['datos'], $config['graph_precision'])).'</span>';
|
$data = "<span class='span_treeview'>".remove_right_zeros(number_format($last_data['datos'], $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator'])).'</span>';
|
||||||
} else {
|
} else {
|
||||||
$data = ui_print_truncate_text(
|
$data = ui_print_truncate_text(
|
||||||
io_safe_output($last_data['datos']),
|
io_safe_output($last_data['datos']),
|
||||||
@ -248,7 +248,7 @@ function treeview_printModuleTable($id_module, $server_data=false, $no_head=fals
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
if (is_numeric($last_data['datos'])) {
|
if (is_numeric($last_data['datos'])) {
|
||||||
$data = "<span class='span_treeview'>".remove_right_zeros(number_format($last_data['datos'], $config['graph_precision'])).'</span>';
|
$data = "<span class='span_treeview'>".remove_right_zeros(number_format($last_data['datos'], $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator'])).'</span>';
|
||||||
} else {
|
} else {
|
||||||
$data = ui_print_truncate_text(
|
$data = ui_print_truncate_text(
|
||||||
io_safe_output($last_data['datos']),
|
io_safe_output($last_data['datos']),
|
||||||
@ -271,7 +271,7 @@ function treeview_printModuleTable($id_module, $server_data=false, $no_head=fals
|
|||||||
$data_macro = modules_get_unit_macro($last_data['datos'], $module['unit']);
|
$data_macro = modules_get_unit_macro($last_data['datos'], $module['unit']);
|
||||||
if ($data_macro) {
|
if ($data_macro) {
|
||||||
if (is_numeric($data_macro)) {
|
if (is_numeric($data_macro)) {
|
||||||
$last_data_str = "<span class='span_treeview'>".remove_right_zeros(number_format($data_macro, $config['graph_precision'])).'</span>';
|
$last_data_str = "<span class='span_treeview'>".remove_right_zeros(number_format($data_macro, $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator'])).'</span>';
|
||||||
} else {
|
} else {
|
||||||
$last_data_str = ui_print_truncate_text(
|
$last_data_str = ui_print_truncate_text(
|
||||||
io_safe_output($data_macro),
|
io_safe_output($data_macro),
|
||||||
|
@ -6592,10 +6592,11 @@ function ui_print_comments($comments)
|
|||||||
} else {
|
} else {
|
||||||
$rest_time = (time() - $last_comment['utimestamp']);
|
$rest_time = (time() - $last_comment['utimestamp']);
|
||||||
$time_last = (($rest_time / 60) / 60);
|
$time_last = (($rest_time / 60) / 60);
|
||||||
$comentario = '<i>'.number_format($time_last, 0).' Hours ('.$last_comment['id_user'].'): '.$last_comment['comment'].'';
|
|
||||||
|
$comentario = '<i>'.number_format($time_last, 0, $config['decimal_separator'], $config['thousand_separator']).' Hours ('.$last_comment['id_user'].'): '.$last_comment['comment'].'';
|
||||||
|
|
||||||
if (strlen($comentario) > '200px') {
|
if (strlen($comentario) > '200px') {
|
||||||
$comentario = '<i>'.number_format($time_last, 0).' Hours ('.$last_comment['id_user'].'): '.$short_comment.'...';
|
$comentario = '<i>'.number_format($time_last, 0, $config['decimal_separator'], $config['thousand_separator']).' Hours ('.$last_comment['id_user'].'): '.$short_comment.'...';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -924,7 +924,7 @@ function visual_map_print_item(
|
|||||||
|
|
||||||
$value_text = format_for_graph($module_value, 2);
|
$value_text = format_for_graph($module_value, 2);
|
||||||
if ($value_text <= 0) {
|
if ($value_text <= 0) {
|
||||||
$value_text = remove_right_zeros(number_format($module_value, $config['graph_precision']));
|
$value_text = remove_right_zeros(number_format($module_value, $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator']));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($unit_text)) {
|
if (!empty($unit_text)) {
|
||||||
@ -1743,7 +1743,7 @@ function visual_map_print_item(
|
|||||||
|| (modules_is_boolean($layoutData['id_agente_modulo']) && $layoutData['show_last_value'] != 0)
|
|| (modules_is_boolean($layoutData['id_agente_modulo']) && $layoutData['show_last_value'] != 0)
|
||||||
) {
|
) {
|
||||||
if (is_numeric($value)) {
|
if (is_numeric($value)) {
|
||||||
$img_style_title .= ' <br>'.__('Last value: ').remove_right_zeros(number_format($value, $config['graph_precision']));
|
$img_style_title .= ' <br>'.__('Last value: ').remove_right_zeros(number_format($value, $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator']));
|
||||||
} else {
|
} else {
|
||||||
$img_style_title .= ' <br>'.__('Last value: ').$value;
|
$img_style_title .= ' <br>'.__('Last value: ').$value;
|
||||||
}
|
}
|
||||||
@ -1881,13 +1881,13 @@ function visual_map_print_item(
|
|||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
echo "<tr class='bg_whitesmoke height_90p'>";
|
echo "<tr class='bg_whitesmoke height_90p'>";
|
||||||
echo '<td>';
|
echo '<td>';
|
||||||
echo "<div class='critical_zeros'>".remove_right_zeros(number_format($stat_agent_cr, 2)).'%</div>';
|
echo "<div class='critical_zeros'>".remove_right_zeros(number_format($stat_agent_cr, 2, $config['decimal_separator'], $config['thousand_separator'])).'%</div>';
|
||||||
echo "<div class='critical_vm'>Critical</div>";
|
echo "<div class='critical_vm'>Critical</div>";
|
||||||
echo "<div class='warning_zeros'>".remove_right_zeros(number_format($stat_agent_wa, 2)).'%</div>';
|
echo "<div class='warning_zeros'>".remove_right_zeros(number_format($stat_agent_wa, 2, $config['decimal_separator'], $config['thousand_separator'])).'%</div>';
|
||||||
echo "<div class='warning_vm'>Warning</div>";
|
echo "<div class='warning_vm'>Warning</div>";
|
||||||
echo "<div class='normal_zeros'>".remove_right_zeros(number_format($stat_agent_ok, 2)).'%</div>';
|
echo "<div class='normal_zeros'>".remove_right_zeros(number_format($stat_agent_ok, 2, $config['decimal_separator'], $config['thousand_separator'])).'%</div>';
|
||||||
echo "<div class='normal_vm'>Normal</div>";
|
echo "<div class='normal_vm'>Normal</div>";
|
||||||
echo "<div class='unknown_zeros'>".remove_right_zeros(number_format($stat_agent_un, 2)).'%</div>';
|
echo "<div class='unknown_zeros'>".remove_right_zeros(number_format($stat_agent_un, 2, $config['decimal_separator'], $config['thousand_separator'])).'%</div>';
|
||||||
echo "<div class='unknown_vm'>Unknown</div>";
|
echo "<div class='unknown_vm'>Unknown</div>";
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
@ -2462,7 +2462,7 @@ function visual_map_get_simple_value($type, $id_module, $period=SECONDS_1DAY)
|
|||||||
} else {
|
} else {
|
||||||
if (is_numeric($value)) {
|
if (is_numeric($value)) {
|
||||||
if ($config['simple_module_value']) {
|
if ($config['simple_module_value']) {
|
||||||
$value = remove_right_zeros(number_format($value, $config['graph_precision']));
|
$value = remove_right_zeros(number_format($value, $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator']));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -499,11 +499,11 @@ function flot_custom_pie_chart(
|
|||||||
foreach ($graph_values as $label => $value) {
|
foreach ($graph_values as $label => $value) {
|
||||||
if ($value['value']) {
|
if ($value['value']) {
|
||||||
if ($value['value'] > 1000000) {
|
if ($value['value'] > 1000000) {
|
||||||
$legendvalue = sprintf('%sM', remove_right_zeros(number_format(($value['value'] / 1000000), $config['graph_precision'])));
|
$legendvalue = sprintf('%sM', remove_right_zeros(number_format(($value['value'] / 1000000), $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator'])));
|
||||||
} else if ($value['value'] > 1000) {
|
} else if ($value['value'] > 1000) {
|
||||||
$legendvalue = sprintf('%sK', remove_right_zeros(number_format(($value['value'] / 1000), $config['graph_precision'])));
|
$legendvalue = sprintf('%sK', remove_right_zeros(number_format(($value['value'] / 1000), $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator'])));
|
||||||
} else {
|
} else {
|
||||||
$legendvalue = remove_right_zeros(number_format($value['value'], $config['graph_precision']));
|
$legendvalue = remove_right_zeros(number_format($value['value'], $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator']));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$legendvalue = __('No data');
|
$legendvalue = __('No data');
|
||||||
|
@ -555,7 +555,7 @@ class ModuleIconWidget extends Widget
|
|||||||
// Div value.
|
// Div value.
|
||||||
$output .= '<div style="flex: 0 1 10px; font-size:'.$sizeValue.'px;">';
|
$output .= '<div style="flex: 0 1 10px; font-size:'.$sizeValue.'px;">';
|
||||||
$output .= remove_right_zeros(
|
$output .= remove_right_zeros(
|
||||||
number_format($data_module, $config['graph_precision'])
|
number_format($data_module, $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator'])
|
||||||
);
|
);
|
||||||
$output .= '</div>';
|
$output .= '</div>';
|
||||||
|
|
||||||
|
@ -439,7 +439,9 @@ class ModuleValueWidget extends Widget
|
|||||||
$dataDatos = remove_right_zeros(
|
$dataDatos = remove_right_zeros(
|
||||||
number_format(
|
number_format(
|
||||||
$data_module,
|
$data_module,
|
||||||
$config['graph_precision']
|
$config['graph_precision'],
|
||||||
|
$config['decimal_separator'],
|
||||||
|
$config['thousand_separator']
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
@ -397,10 +397,12 @@ final class Group extends Item
|
|||||||
string $groupName,
|
string $groupName,
|
||||||
array $agentStats
|
array $agentStats
|
||||||
): string {
|
): string {
|
||||||
$critical = \number_format($agentStats['critical'], 2).'%';
|
global $config;
|
||||||
$warning = \number_format($agentStats['warning'], 2).'%';
|
|
||||||
$normal = \number_format($agentStats['normal'], 2).'%';
|
$critical = \number_format($agentStats['critical'], 2, $config['decimal_separator'], $config['thousand_separator']).'%';
|
||||||
$unknown = \number_format($agentStats['unknown'], 2).'%';
|
$warning = \number_format($agentStats['warning'], 2, $config['decimal_separator'], $config['thousand_separator']).'%';
|
||||||
|
$normal = \number_format($agentStats['normal'], 2, $config['decimal_separator'], $config['thousand_separator']).'%';
|
||||||
|
$unknown = \number_format($agentStats['unknown'], 2, $config['decimal_separator'], $config['thousand_separator']).'%';
|
||||||
|
|
||||||
$html = '<div class="group-container">';
|
$html = '<div class="group-container">';
|
||||||
$html .= '<div class="group-item-title">';
|
$html .= '<div class="group-item-title">';
|
||||||
|
@ -396,8 +396,8 @@ final class Percentile extends Item
|
|||||||
$data['value'] = (float) \number_format(
|
$data['value'] = (float) \number_format(
|
||||||
(float) $moduleValue,
|
(float) $moduleValue,
|
||||||
(int) $config['graph_precision'],
|
(int) $config['graph_precision'],
|
||||||
'.',
|
$config['decimal_separator'],
|
||||||
''
|
$config['thousand_separator']
|
||||||
);
|
);
|
||||||
$unit = '';
|
$unit = '';
|
||||||
if ($moduleId !== null && $moduleId !== 0) {
|
if ($moduleId !== null && $moduleId !== 0) {
|
||||||
|
@ -281,7 +281,7 @@ final class StaticGraph extends Item
|
|||||||
) {
|
) {
|
||||||
if (\is_numeric($value)) {
|
if (\is_numeric($value)) {
|
||||||
$imgTitle .= __('Last value: ').\remove_right_zeros(
|
$imgTitle .= __('Last value: ').\remove_right_zeros(
|
||||||
\number_format((float) $value, (int) $config['graph_precision'])
|
\number_format((float) $value, (int) $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator'])
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$imgTitle .= __('Last value: ').$value;
|
$imgTitle .= __('Last value: ').$value;
|
||||||
|
@ -129,7 +129,7 @@
|
|||||||
<div style='height: 10px'>
|
<div style='height: 10px'>
|
||||||
<?php
|
<?php
|
||||||
$version = '7.0NG.767';
|
$version = '7.0NG.767';
|
||||||
$build = '221215';
|
$build = '221216';
|
||||||
$banner = "v$version Build $build";
|
$banner = "v$version Build $build";
|
||||||
|
|
||||||
error_reporting(0);
|
error_reporting(0);
|
||||||
|
@ -2048,7 +2048,12 @@ if (is_ajax() === true) {
|
|||||||
|
|
||||||
$array_filter = json_decode($networkmap['filter']);
|
$array_filter = json_decode($networkmap['filter']);
|
||||||
if (isset($array_filter->z_dash)) {
|
if (isset($array_filter->z_dash)) {
|
||||||
$array_filter->z_dash = number_format($scale, 2);
|
$array_filter->z_dash = number_format(
|
||||||
|
$scale,
|
||||||
|
2,
|
||||||
|
$config['decimal_separator'],
|
||||||
|
$config['thousand_separator']
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$filter = json_encode($array_filter);
|
$filter = json_encode($array_filter);
|
||||||
|
@ -1589,7 +1589,7 @@ if (!empty($result)) {
|
|||||||
if (is_numeric($row['datos'])) {
|
if (is_numeric($row['datos'])) {
|
||||||
$data[6] = ui_print_status_image(
|
$data[6] = ui_print_status_image(
|
||||||
STATUS_MODULE_OK,
|
STATUS_MODULE_OK,
|
||||||
__('NORMAL').': '.remove_right_zeros(number_format($row['datos'], $config['graph_precision'])),
|
__('NORMAL').': '.remove_right_zeros(number_format($row['datos'], $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator'])),
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -1604,7 +1604,12 @@ if (!empty($result)) {
|
|||||||
$data[6] = ui_print_status_image(
|
$data[6] = ui_print_status_image(
|
||||||
STATUS_MODULE_CRITICAL,
|
STATUS_MODULE_CRITICAL,
|
||||||
__('CRITICAL').': '.remove_right_zeros(
|
__('CRITICAL').': '.remove_right_zeros(
|
||||||
number_format($row['datos'], $config['graph_precision'])
|
number_format(
|
||||||
|
$row['datos'],
|
||||||
|
$config['graph_precision'],
|
||||||
|
$config['decimal_separator'],
|
||||||
|
$config['thousand_separator']
|
||||||
|
)
|
||||||
),
|
),
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
@ -1620,7 +1625,12 @@ if (!empty($result)) {
|
|||||||
$data[6] = ui_print_status_image(
|
$data[6] = ui_print_status_image(
|
||||||
STATUS_MODULE_WARNING,
|
STATUS_MODULE_WARNING,
|
||||||
__('WARNING').': '.remove_right_zeros(
|
__('WARNING').': '.remove_right_zeros(
|
||||||
number_format($row['datos'], $config['graph_precision'])
|
number_format(
|
||||||
|
$row['datos'],
|
||||||
|
$config['graph_precision'],
|
||||||
|
$config['decimal_separator'],
|
||||||
|
$config['thousand_separator']
|
||||||
|
)
|
||||||
),
|
),
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
@ -1636,7 +1646,12 @@ if (!empty($result)) {
|
|||||||
$data[6] = ui_print_status_image(
|
$data[6] = ui_print_status_image(
|
||||||
STATUS_MODULE_UNKNOWN,
|
STATUS_MODULE_UNKNOWN,
|
||||||
__('UNKNOWN').': '.remove_right_zeros(
|
__('UNKNOWN').': '.remove_right_zeros(
|
||||||
number_format($row['datos'], $config['graph_precision'])
|
number_format(
|
||||||
|
$row['datos'],
|
||||||
|
$config['graph_precision'],
|
||||||
|
$config['decimal_separator'],
|
||||||
|
$config['thousand_separator']
|
||||||
|
)
|
||||||
),
|
),
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
@ -1652,7 +1667,12 @@ if (!empty($result)) {
|
|||||||
$data[6] = ui_print_status_image(
|
$data[6] = ui_print_status_image(
|
||||||
STATUS_MODULE_NO_DATA,
|
STATUS_MODULE_NO_DATA,
|
||||||
__('NO DATA').': '.remove_right_zeros(
|
__('NO DATA').': '.remove_right_zeros(
|
||||||
number_format($row['datos'], $config['graph_precision'])
|
number_format(
|
||||||
|
$row['datos'],
|
||||||
|
$config['graph_precision'],
|
||||||
|
$config['decimal_separator'],
|
||||||
|
$config['thousand_separator']
|
||||||
|
)
|
||||||
),
|
),
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
@ -1672,7 +1692,7 @@ if (!empty($result)) {
|
|||||||
if (is_numeric($row['datos'])) {
|
if (is_numeric($row['datos'])) {
|
||||||
$data[6] = ui_print_status_image(
|
$data[6] = ui_print_status_image(
|
||||||
STATUS_MODULE_UNKNOWN,
|
STATUS_MODULE_UNKNOWN,
|
||||||
__('UNKNOWN').' - '.__('Last status').' '.__('NORMAL').': '.remove_right_zeros(number_format($row['datos'], $config['graph_precision'])),
|
__('UNKNOWN').' - '.__('Last status').' '.__('NORMAL').': '.remove_right_zeros(number_format($row['datos'], $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator'])),
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -1688,7 +1708,7 @@ if (!empty($result)) {
|
|||||||
if (is_numeric($row['datos'])) {
|
if (is_numeric($row['datos'])) {
|
||||||
$data[6] = ui_print_status_image(
|
$data[6] = ui_print_status_image(
|
||||||
STATUS_MODULE_UNKNOWN,
|
STATUS_MODULE_UNKNOWN,
|
||||||
__('UNKNOWN').' - '.__('Last status').' '.__('CRITICAL').': '.remove_right_zeros(number_format($row['datos'], $config['graph_precision'])),
|
__('UNKNOWN').' - '.__('Last status').' '.__('CRITICAL').': '.remove_right_zeros(number_format($row['datos'], $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator'])),
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -1704,7 +1724,7 @@ if (!empty($result)) {
|
|||||||
if (is_numeric($row['datos'])) {
|
if (is_numeric($row['datos'])) {
|
||||||
$data[6] = ui_print_status_image(
|
$data[6] = ui_print_status_image(
|
||||||
STATUS_MODULE_UNKNOWN,
|
STATUS_MODULE_UNKNOWN,
|
||||||
__('UNKNOWN').' - '.__('Last status').' '.__('WARNING').': '.remove_right_zeros(number_format($row['datos'], $config['graph_precision'])),
|
__('UNKNOWN').' - '.__('Last status').' '.__('WARNING').': '.remove_right_zeros(number_format($row['datos'], $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator'])),
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -1849,12 +1869,12 @@ if (!empty($result)) {
|
|||||||
if ($value == '.1.3.6.1.2.1.1.3.0' || $value == '.1.3.6.1.2.1.25.1.1.0') {
|
if ($value == '.1.3.6.1.2.1.1.3.0' || $value == '.1.3.6.1.2.1.25.1.1.0') {
|
||||||
$salida = human_milliseconds_to_string($row['datos']);
|
$salida = human_milliseconds_to_string($row['datos']);
|
||||||
} else {
|
} else {
|
||||||
$salida = remove_right_zeros(number_format($row['datos'], $config['graph_precision']));
|
$salida = remove_right_zeros(number_format($row['datos'], $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator']));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
$salida = remove_right_zeros(number_format($row['datos'], $config['graph_precision']));
|
$salida = remove_right_zeros(number_format($row['datos'], $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator']));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1866,12 +1886,12 @@ if (!empty($result)) {
|
|||||||
if ($value == '.1.3.6.1.2.1.1.3.0' || $value == '.1.3.6.1.2.1.25.1.1.0') {
|
if ($value == '.1.3.6.1.2.1.1.3.0' || $value == '.1.3.6.1.2.1.25.1.1.0') {
|
||||||
$salida = human_milliseconds_to_string($row['datos']);
|
$salida = human_milliseconds_to_string($row['datos']);
|
||||||
} else {
|
} else {
|
||||||
$salida = remove_right_zeros(number_format($row['datos'], $config['graph_precision']));
|
$salida = remove_right_zeros(number_format($row['datos'], $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator']));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
$salida = remove_right_zeros(number_format($row['datos'], $config['graph_precision']));
|
$salida = remove_right_zeros(number_format($row['datos'], $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator']));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.767
|
%define version 7.0NG.767
|
||||||
%define release 221215
|
%define release 221216
|
||||||
|
|
||||||
# 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.767
|
%define version 7.0NG.767
|
||||||
%define release 221215
|
%define release 221216
|
||||||
|
|
||||||
# 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.767
|
%define version 7.0NG.767
|
||||||
%define release 221215
|
%define release 221216
|
||||||
%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
|
||||||
|
@ -1624,6 +1624,7 @@ CREATE TABLE IF NOT EXISTS `treport_content` (
|
|||||||
`ipam_ip_not_assigned_to_agent` TINYINT UNSIGNED NOT NULL DEFAULT 0,
|
`ipam_ip_not_assigned_to_agent` TINYINT UNSIGNED NOT NULL DEFAULT 0,
|
||||||
`macros_definition` TEXT,
|
`macros_definition` TEXT,
|
||||||
`render_definition` TEXT,
|
`render_definition` TEXT,
|
||||||
|
`use_prefix_notation` TINYINT UNSIGNED NOT NULL DEFAULT 1,
|
||||||
PRIMARY KEY(`id_rc`),
|
PRIMARY KEY(`id_rc`),
|
||||||
FOREIGN KEY (`id_report`) REFERENCES treport(`id_report`)
|
FOREIGN KEY (`id_report`) REFERENCES treport(`id_report`)
|
||||||
ON UPDATE CASCADE ON DELETE CASCADE
|
ON UPDATE CASCADE ON DELETE CASCADE
|
||||||
@ -3255,6 +3256,7 @@ CREATE TABLE IF NOT EXISTS `treport_content_template` (
|
|||||||
`ipam_ip_not_assigned_to_agent` TINYINT UNSIGNED NOT NULL DEFAULT 0,
|
`ipam_ip_not_assigned_to_agent` TINYINT UNSIGNED NOT NULL DEFAULT 0,
|
||||||
`macros_definition` TEXT,
|
`macros_definition` TEXT,
|
||||||
`render_definition` TEXT,
|
`render_definition` TEXT,
|
||||||
|
`use_prefix_notation` TINYINT UNSIGNED NOT NULL DEFAULT 1,
|
||||||
PRIMARY KEY(`id_rc`)
|
PRIMARY KEY(`id_rc`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||||
|
|
||||||
|
@ -142,26 +142,26 @@ function main_intel_dcm_agent_view()
|
|||||||
$sql = "SELECT description FROM tagent_custom_data WHERE id_field = $id_field_derated_power AND id_agent = $id_agent";
|
$sql = "SELECT description FROM tagent_custom_data WHERE id_field = $id_field_derated_power AND id_agent = $id_agent";
|
||||||
$derated_power = db_get_value_sql($sql);
|
$derated_power = db_get_value_sql($sql);
|
||||||
|
|
||||||
$percent = number_format((($avg_power / $derated_power) * 100), 2);
|
$percent = number_format((($avg_power / $derated_power) * 100), 2, $config['decimal_separator'], $config['thousand_separator']);
|
||||||
|
|
||||||
$data[0] = '<b>'.__('Power utilization')." $percent%</b>";
|
$data[0] = '<b>'.__('Power utilization')." $percent%</b>";
|
||||||
$data[0] .= progress_bar($percent, 400, 30, '', 2);
|
$data[0] .= progress_bar($percent, 400, 30, '', 2);
|
||||||
$data[0] .= '<br><br>';
|
$data[0] .= '<br><br>';
|
||||||
$data[0] .= '<b>'.__('Current stats').'</b>';
|
$data[0] .= '<b>'.__('Current stats').'</b>';
|
||||||
$data[0] .= '<br><br>';
|
$data[0] .= '<br><br>';
|
||||||
$data[0] .= __('Power demand').': <b>'.number_format($avg_power, 2).' Wh</b>';
|
$data[0] .= __('Power demand').': <b>'.number_format($avg_power, 2, $config['decimal_separator'], $config['thousand_separator']).' Wh</b>';
|
||||||
$data[0] .= '<br>';
|
$data[0] .= '<br>';
|
||||||
$data[0] .= __('Inlet temp').': <b>'.number_format($avg_temp, 2).' ºC</b>';
|
$data[0] .= __('Inlet temp').': <b>'.number_format($avg_temp, 2, $config['decimal_separator'], $config['thousand_separator']).' ºC</b>';
|
||||||
$data[0] .= '<br><br><br>';
|
$data[0] .= '<br><br><br>';
|
||||||
$data[0] .= '<b>'.__('Last week summary').'</b>';
|
$data[0] .= '<b>'.__('Last week summary').'</b>';
|
||||||
$data[0] .= '<br><br>';
|
$data[0] .= '<br><br>';
|
||||||
$data[0] .= __('Equipment energy consumed').': <b>'.number_format($mnged_energy, 2).' Wh</b>';
|
$data[0] .= __('Equipment energy consumed').': <b>'.number_format($mnged_energy, 2, $config['decimal_separator'], $config['thousand_separator']).' Wh</b>';
|
||||||
$data[0] .= '<br>';
|
$data[0] .= '<br>';
|
||||||
$data[0] .= __('Equipment energy bill').': <b>'.number_format($mnged_energy_bill, 2).' €</b>';
|
$data[0] .= __('Equipment energy bill').': <b>'.number_format($mnged_energy_bill, 2, $config['decimal_separator'], $config['thousand_separator']).' €</b>';
|
||||||
$data[0] .= '<br>';
|
$data[0] .= '<br>';
|
||||||
$data[0] .= __('Calculated cooling energy').': <b>'.number_format($cooling_energy, 2).' Wh</b>';
|
$data[0] .= __('Calculated cooling energy').': <b>'.number_format($cooling_energy, 2, $config['decimal_separator'], $config['thousand_separator']).' Wh</b>';
|
||||||
$data[0] .= '<br>';
|
$data[0] .= '<br>';
|
||||||
$data[0] .= __('Calculated cooling energy bill').': <b>'.number_format($cooling_energy_bill, 2).' €</b>';
|
$data[0] .= __('Calculated cooling energy bill').': <b>'.number_format($cooling_energy_bill, 2, $config['decimal_separator'], $config['thousand_separator']).' €</b>';
|
||||||
|
|
||||||
// Print avg. power graph
|
// Print avg. power graph
|
||||||
$start_date = date('Y-m-d');
|
$start_date = date('Y-m-d');
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-server
|
package: pandorafms-server
|
||||||
Version: 7.0NG.767-221215
|
Version: 7.0NG.767-221216
|
||||||
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.767-221215"
|
pandora_version="7.0NG.767-221216"
|
||||||
|
|
||||||
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.767";
|
my $pandora_version = "7.0NG.767";
|
||||||
my $pandora_build = "221215";
|
my $pandora_build = "221216";
|
||||||
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.767";
|
my $pandora_version = "7.0NG.767";
|
||||||
my $pandora_build = "221215";
|
my $pandora_build = "221216";
|
||||||
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.767
|
%define version 7.0NG.767
|
||||||
%define release 221215
|
%define release 221216
|
||||||
|
|
||||||
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.767
|
%define version 7.0NG.767
|
||||||
%define release 221215
|
%define release 221216
|
||||||
|
|
||||||
Summary: Pandora FMS Server
|
Summary: Pandora FMS Server
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# **********************************************************************
|
# **********************************************************************
|
||||||
|
|
||||||
PI_VERSION="7.0NG.767"
|
PI_VERSION="7.0NG.767"
|
||||||
PI_BUILD="221215"
|
PI_BUILD="221216"
|
||||||
|
|
||||||
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.767 Build 221215";
|
my $version = "7.0NG.767 Build 221216";
|
||||||
|
|
||||||
# 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.767 Build 221215";
|
my $version = "7.0NG.767 Build 221216";
|
||||||
|
|
||||||
# save program name for logging
|
# save program name for logging
|
||||||
my $progname = basename($0);
|
my $progname = basename($0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user