Merge remote-tracking branch 'origin/develop' into ent-7074-Command-Center

This commit is contained in:
Daniel Barbero Martin 2021-03-04 08:18:29 +01:00
commit 90af8824de
45 changed files with 351 additions and 281 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix package: pandorafms-agent-unix
Version: 7.0NG.752-210302 Version: 7.0NG.752-210304
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -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.752-210302" pandora_version="7.0NG.752-210304"
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

View File

@ -1016,7 +1016,7 @@ my $Sem = undef;
my $ThreadSem = undef; my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.752'; use constant AGENT_VERSION => '7.0NG.752';
use constant AGENT_BUILD => '210302'; use constant AGENT_BUILD => '210304';
# 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;

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_agent_unix %define name pandorafms_agent_unix
%define version 7.0NG.752 %define version 7.0NG.752
%define release 210302 %define release 210304
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_agent_unix %define name pandorafms_agent_unix
%define version 7.0NG.752 %define version 7.0NG.752
%define release 210302 %define release 210304
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}

View File

@ -10,7 +10,7 @@
# ********************************************************************** # **********************************************************************
PI_VERSION="7.0NG.752" PI_VERSION="7.0NG.752"
PI_BUILD="210302" PI_BUILD="210304"
OS_NAME=`uname -s` OS_NAME=`uname -s`
FORCE=0 FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{} {}
Version Version
{210302} {210304}
ViewReadme ViewReadme
{Yes} {Yes}

View File

@ -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.752(Build 210302)") #define PANDORA_VERSION ("7.0NG.752(Build 210304)")
string pandora_path; string pandora_path;
string pandora_dir; string pandora_dir;

View File

@ -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.752(Build 210302))" VALUE "ProductVersion", "(7.0NG.752(Build 210304))"
VALUE "FileVersion", "1.0.0.0" VALUE "FileVersion", "1.0.0.0"
END END
END END

View File

@ -1,5 +1,5 @@
package: pandorafms-console package: pandorafms-console
Version: 7.0NG.752-210302 Version: 7.0NG.752-210304
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -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.752-210302" pandora_version="7.0NG.752-210304"
package_pear=0 package_pear=0
package_pandora=1 package_pandora=1

View File

@ -251,7 +251,16 @@ if (is_ajax()) {
$tab = (string) get_parameter('tab', 'groups'); $tab = (string) get_parameter('tab', 'groups');
if ($tab != 'credbox' && ! check_acl($config['id_user'], 0, 'PM')) { if ($tab != 'credbox' && ! check_acl(
$config['id_user'],
0,
'PM'
) && ! check_acl(
$config['id_user'],
0,
'AW'
)
) {
db_pandora_audit( db_pandora_audit(
'ACL Violation', 'ACL Violation',
'Trying to access Group Management' 'Trying to access Group Management'

View File

@ -1176,7 +1176,11 @@ if ($config['double_auth_enabled'] && check_acl($config['id_user'], 0, 'PM')) {
|| ($config['double_auth_enabled'] == '' && $double_auth_enabled) || ($config['double_auth_enabled'] == '' && $double_auth_enabled)
|| check_acl($config['id_user'], 0, 'PM') || check_acl($config['id_user'], 0, 'PM')
) { ) {
if ($new_user === false) {
$double_authentication .= html_print_checkbox_switch('double_auth', 1, $double_auth_enabled, true); $double_authentication .= html_print_checkbox_switch('double_auth', 1, $double_auth_enabled, true);
} else {
$double_authentication .= ui_print_help_tip(__('User must be created before activating double authentication.'), true);
}
} }
// Dialog. // Dialog.
@ -1582,6 +1586,7 @@ console.log(userID);
data: { data: {
page: 'include/ajax/double_auth.ajax', page: 'include/ajax/double_auth.ajax',
id_user: userID, id_user: userID,
id_user_auth: userID,
get_double_auth_data_page: 1, get_double_auth_data_page: 1,
FA_forced: 1, FA_forced: 1,
containerID: $dialogContainer.prop('id') containerID: $dialogContainer.prop('id')
@ -1638,6 +1643,8 @@ function show_double_auth_activation () {
var $loadingSpinner = $("<img src=\"<?php echo $config['homeurl']; ?>/images/spinner.gif\" />"); var $loadingSpinner = $("<img src=\"<?php echo $config['homeurl']; ?>/images/spinner.gif\" />");
var $dialogContainer = $("div#dialog-double_auth-container"); var $dialogContainer = $("div#dialog-double_auth-container");
// Uncheck until completed successfully.
$("input#checkbox-double_auth").prop( "checked", false );
$dialogContainer.html($loadingSpinner); $dialogContainer.html($loadingSpinner);
@ -1649,6 +1656,7 @@ function show_double_auth_activation () {
data: { data: {
page: 'include/ajax/double_auth.ajax', page: 'include/ajax/double_auth.ajax',
id_user: userID, id_user: userID,
id_user_auth: userID,
FA_forced: 1, FA_forced: 1,
get_double_auth_info_page: 1, get_double_auth_info_page: 1,
containerID: $dialogContainer.prop('id') containerID: $dialogContainer.prop('id')
@ -1691,8 +1699,6 @@ function show_double_auth_activation () {
request.abort(); request.abort();
// Remove the contained html // Remove the contained html
$dialogContainer.empty(); $dialogContainer.empty();
document.location.reload();
} }
}) })
.show(); .show();
@ -1706,6 +1712,9 @@ function show_double_auth_deactivation () {
var message = "<p><?php echo __('Are you sure?').'<br>'.__('The double authentication will be deactivated'); ?></p>"; var message = "<p><?php echo __('Are you sure?').'<br>'.__('The double authentication will be deactivated'); ?></p>";
var $button = $("<input type=\"button\" value=\"<?php echo __('Deactivate'); ?>\" />"); var $button = $("<input type=\"button\" value=\"<?php echo __('Deactivate'); ?>\" />");
// Prevent switch deactivaction until proceess is done
$("input#checkbox-double_auth").prop( "checked", true );
$dialogContainer $dialogContainer
.empty() .empty()
@ -1740,6 +1749,7 @@ function show_double_auth_deactivation () {
} }
else if (data) { else if (data) {
$dialogContainer.html("<?php echo '<b><div class=\"green\">'.__('The double autentication was deactivated successfully').'</div></b>'; ?>"); $dialogContainer.html("<?php echo '<b><div class=\"green\">'.__('The double autentication was deactivated successfully').'</div></b>'; ?>");
$("input#checkbox-double_auth").prop( "checked", false );
} }
else { else {
$dialogContainer.html("<?php echo '<b><div class=\"red\">'.__('There was an error deactivating the double autentication').'</div></b>'; ?>"); $dialogContainer.html("<?php echo '<b><div class=\"red\">'.__('There was an error deactivating the double autentication').'</div></b>'; ?>");
@ -1770,7 +1780,6 @@ function show_double_auth_deactivation () {
// Remove the contained html // Remove the contained html
$dialogContainer.empty(); $dialogContainer.empty();
document.location.reload();
} }
}) })
.show(); .show();

View File

@ -18,6 +18,8 @@ check_login();
// Security check // Security check
$id_user = (string) get_parameter('id_user'); $id_user = (string) get_parameter('id_user');
$FA_forced = (int) get_parameter('FA_forced'); $FA_forced = (int) get_parameter('FA_forced');
$id_user_auth = (string) get_parameter('id_user_auth', $config['id_user']);
if ($id_user !== $config['id_user'] && $FA_forced != 1) { if ($id_user !== $config['id_user'] && $FA_forced != 1) {
db_pandora_audit( db_pandora_audit(
@ -70,12 +72,12 @@ if ($validate_double_auth_code) {
if ($result && $save) { if ($result && $save) {
// Delete the actual value (if exists) // Delete the actual value (if exists)
$where = ['id_user' => $id_user]; $where = ['id_user' => $id_user_auth];
db_process_sql_delete('tuser_double_auth', $where); db_process_sql_delete('tuser_double_auth', $where);
// Insert the new value // Insert the new value
$values = [ $values = [
'id_user' => $id_user, 'id_user' => $id_user_auth,
'secret' => $secret, 'secret' => $secret,
]; ];
$result = (bool) db_process_sql_insert('tuser_double_auth', $values); $result = (bool) db_process_sql_insert('tuser_double_auth', $values);
@ -152,12 +154,15 @@ if ($get_double_auth_data_page) {
ob_clean(); ob_clean();
?> ?>
<script type="text/javascript" src="../../include/javascript/qrcode.js"></script>
<script type="text/javascript"> <script type="text/javascript">
var secret = "<?php echo $secret; ?>"; var secret = "<?php echo $secret; ?>";
var userID = "<?php echo $config['id_user']; ?>"; var id_user_auth = "<?php echo $id_user_auth; ?>";
// QR code with the secret to add it to the app // QR code with the secret to add it to the app
paint_qrcode("otpauth://totp/"+userID+"?secret="+secret, $("div#qr-container").get(0), 200, 200); paint_qrcode("otpauth://totp/"+id_user_auth+"?secret="+secret, $("div#qr-container").get(0), 200, 200);
$("div#qr-container").attr("title", "").find("canvas").remove(); $("div#qr-container").attr("title", "").find("canvas").remove();
// Don't delete this timeout. It's necessary to perform the style change. // Don't delete this timeout. It's necessary to perform the style change.
@ -219,6 +224,7 @@ if ($get_double_auth_info_page) {
} }
var containerID = "<?php echo $container_id; ?>"; var containerID = "<?php echo $container_id; ?>";
var id_user_auth = "<?php echo $id_user_auth; ?>";
$("#"+containerID).html("<img src=\"<?php echo $config['homeurl']; ?>/images/spinner.gif\" />"); $("#"+containerID).html("<img src=\"<?php echo $config['homeurl']; ?>/images/spinner.gif\" />");
@ -229,6 +235,7 @@ if ($get_double_auth_info_page) {
data: { data: {
page: 'include/ajax/double_auth.ajax', page: 'include/ajax/double_auth.ajax',
id_user: "<?php echo $config['id_user']; ?>", id_user: "<?php echo $config['id_user']; ?>",
id_user_auth: id_user_auth,
get_double_auth_generation_page: 1, get_double_auth_generation_page: 1,
containerID: containerID containerID: containerID
}, },
@ -298,10 +305,10 @@ if ($get_double_auth_generation_page) {
<script type="text/javascript" src="../../include/javascript/qrcode.js"></script> <script type="text/javascript" src="../../include/javascript/qrcode.js"></script>
<script type="text/javascript"> <script type="text/javascript">
var secret = "<?php echo $secret; ?>"; var secret = "<?php echo $secret; ?>";
var userID = "<?php echo $config['id_user']; ?>"; var id_user_auth = "<?php echo $id_user_auth; ?>";
// QR code with the secret to add it to the app // QR code with the secret to add it to the app
paint_qrcode("otpauth://totp/"+userID+"?secret="+secret, $("div#qr-container").get(0), 200, 200); paint_qrcode("otpauth://totp/"+id_user_auth+"?secret="+secret, $("div#qr-container").get(0), 200, 200);
$("div#qr-container").attr("title", "").find("canvas").remove(); $("div#qr-container").attr("title", "").find("canvas").remove();
// Don't delete this timeout. It's necessary to perform the style change. // Don't delete this timeout. It's necessary to perform the style change.
@ -325,7 +332,8 @@ if ($get_double_auth_generation_page) {
dataType: 'html', dataType: 'html',
data: { data: {
page: 'include/ajax/double_auth.ajax', page: 'include/ajax/double_auth.ajax',
id_user: userID, id_user: "<?php echo $config['id_user']; ?>",
id_user_auth, id_user_auth,
get_double_auth_generation_page: 1, get_double_auth_generation_page: 1,
containerID: containerID containerID: containerID
}, },
@ -370,6 +378,7 @@ if ($get_double_auth_generation_page) {
data: { data: {
page: 'include/ajax/double_auth.ajax', page: 'include/ajax/double_auth.ajax',
id_user: "<?php echo $config['id_user']; ?>", id_user: "<?php echo $config['id_user']; ?>",
id_user_auth: id_user_auth,
get_double_auth_validation_page: 1, get_double_auth_validation_page: 1,
secret: secret, secret: secret,
containerID: containerID containerID: containerID
@ -464,6 +473,7 @@ if ($get_double_auth_validation_page) {
data: { data: {
page: 'include/ajax/double_auth.ajax', page: 'include/ajax/double_auth.ajax',
id_user: "<?php echo $config['id_user']; ?>", id_user: "<?php echo $config['id_user']; ?>",
id_user_auth: id_user_auth,
validate_double_auth_code: 1, validate_double_auth_code: 1,
save: 1, save: 1,
secret: secret, secret: secret,
@ -479,6 +489,7 @@ if ($get_double_auth_validation_page) {
// Valid code // Valid code
if (data === true) { if (data === true) {
$("#"+containerID).html("<b><?php echo '<b><div class=\"green\">'.__('The code is valid, you can exit now').'</div></b>'; ?></b>"); $("#"+containerID).html("<b><?php echo '<b><div class=\"green\">'.__('The code is valid, you can exit now').'</div></b>'; ?></b>");
$("input#checkbox-double_auth").prop( "checked", true );
} }
// Invalid code // Invalid code
else if (data === false) { else if (data === false) {

View File

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

View File

@ -595,6 +595,7 @@ function filemanager_file_explorer(
$files = filemanager_list_dir($real_directory); $files = filemanager_list_dir($real_directory);
if (!empty($files)) {
$table = new stdClass(); $table = new stdClass();
$table->width = '100%'; $table->width = '100%';
$table->id = 'table_filemanager'; $table->id = 'table_filemanager';
@ -768,6 +769,14 @@ function filemanager_file_explorer(
array_push($table->data, $data); array_push($table->data, $data);
} }
} else {
ui_print_info_message(
[
'no_close' => true,
'message' => __('No files or directories to show.'),
]
);
}
if (!$readOnly) { if (!$readOnly) {
if (is_writable($real_directory)) { if (is_writable($real_directory)) {

View File

@ -497,11 +497,7 @@ function messages_get_overview(
if ($incl_source_info) { if ($incl_source_info) {
$source_fields = ', tns.*'; $source_fields = ', tns.*';
$source_join = 'INNER JOIN tnotification_source tns $source_join = 'INNER JOIN tnotification_source tns
ON tns.id=tm.id_source ON tns.id=tm.id_source';
INNER JOIN tnotification_source_user nsu
ON nsu.id_source=tns.id
AND nsu.enabled = 1
OR tns.enabled = 1';
} }
// Using distinct because could be double assignment due group/user. // Using distinct because could be double assignment due group/user.

View File

@ -70,8 +70,7 @@ function initialiceLayout(data) {
draggable: false draggable: false
}); });
var positionGrid = 0; //grid[0].getBoundingClientRect(); var positionGrid = grid.el.getBoundingClientRect();
// var gridHeight = positionGrid.height;
var gridWidth = positionGrid.width; var gridWidth = positionGrid.width;
getCellsLayout(); getCellsLayout();

View File

@ -571,9 +571,9 @@ class Widget
} }
if ($this->width === 0) { if ($this->width === 0) {
$width = (((int) $this->position['width'] / 12 * $gridWidth) - 50); $width = (((int) $this->position['width'] / 12 * $gridWidth) - 60);
} else { } else {
$width = (((int) $this->width / 12 * $gridWidth) - 50); $width = (((int) $this->width / 12 * $gridWidth) - 60);
} }
if ($this->height === 0) { if ($this->height === 0) {

View File

@ -395,6 +395,11 @@ class CustomGraphWidget extends Widget
break; break;
} }
// Not posible height < 0.
if ($height <= 0) {
$height = 10;
}
$params = [ $params = [
'period' => $this->values['period'], 'period' => $this->values['period'],
'width' => ($size['width'] - 10), 'width' => ($size['width'] - 10),

View File

@ -372,32 +372,54 @@ class MapsMadeByUser extends Widget
// it is necessary to modify specific classes of each // it is necessary to modify specific classes of each
// of the visual consoles. // of the visual consoles.
$output .= '<style type="text/css">'; $output .= '<style type="text/css">';
$output .= '.c-'.$uniq.', .c-'.$uniq.' *:not(.parent_graph p table tr td span) { font-size: '.(8 * $ratio_t).'pt; line-height:'.(8 * ($ratio_t) * 1.5).'pt; }'; // $output .= '.c-'.$uniq.', .c-'.$uniq.' *:not(.parent_graph p table tr td span) { font-size: '.(8 * $ratio_t).'pt; line-height:'.(8 * ($ratio_t) * 1.5).'pt; }';
$output .= '.c-'.$uniq.' .visual-console-item-label table tr td span { font-size: '.(4 * $ratio_t).'pt; line-height:'.(4 * $ratio_t * 1.8).'pt; }'; $output .= '.c-'.$uniq.' .visual-console-item div.label > strong { font-size: '.(8 * $ratio_t).'pt; line-height:'.(8 * ($ratio_t) * 1.5).'pt;}';
$output .= '.c-'.$uniq.' .visual_font_size_4pt, .c-'.$uniq.' .visual_font_size_4pt * { font-size: '.(4 * $ratio_t).'pt; line-height:'.(4 * ($ratio_t) * 1.8).'pt; }'; $output .= '.c-'.$uniq.' .visual-console-item div.label > strong > span { font-size: '.(10 * $ratio_t).'pt;}';
$output .= '.c-'.$uniq.' .visual_font_size_6pt, .c-'.$uniq.' .visual_font_size_6pt * { font-size: '.(6 * $ratio_t).'pt; line-height:'.(6 * ($ratio_t) * 1.8).'pt; }'; $output .= '.c-'.$uniq.' .visual-console-item div.label p { overflow:initial !important; margin:0px;}';
$output .= '.c-'.$uniq.' .visual_font_size_8pt, .c-'.$uniq.' .visual_font_size_8pt * { font-size: '.(8 * $ratio_t).'pt; line-height:'.(8 * ($ratio_t) * 1.8).'pt; }'; $output .= '.c-'.$uniq.' .visual-console-item div.label img { height: 100%; width: 100%; object-fit: contain;}';
$output .= '.c-'.$uniq.' .visual_font_size_10pt, .c-'.$uniq.' .visual_font_size_10pt * { font-size: '.(10 * $ratio_t).'pt; line-height:'.(10 * ($ratio_t) * 1.8).'pt; }'; $output .= '.c-'.$uniq.' .visual_font_size_4pt, .c-'.$uniq.' .visual_font_size_4pt * { font-size: '.(4 * $ratio_t).'pt !important; line-height:'.(4 * ($ratio_t) * 1.5).'pt !important; }';
$output .= '.c-'.$uniq.' .visual_font_size_12pt, .c-'.$uniq.' .visual_font_size_12pt * { font-size: '.(12 * $ratio_t).'pt; line-height:'.(12 * ($ratio_t) * 1.8).'pt; }'; $output .= '.c-'.$uniq.' .visual_font_size_6pt, .c-'.$uniq.' .visual_font_size_6pt * { font-size: '.(6 * $ratio_t).'pt !important; line-height:'.(6 * ($ratio_t) * 1.5).'pt !important; }';
$output .= '.c-'.$uniq.' .visual_font_size_14pt, .c-'.$uniq.' .visual_font_size_14pt * { font-size: '.(14 * $ratio_t).'pt; line-height:'.(14 * ($ratio_t) * 1.8).'pt; }'; $output .= '.c-'.$uniq.' .visual_font_size_8pt, .c-'.$uniq.' .visual_font_size_8pt * { font-size: '.(8 * $ratio_t).'pt !important; line-height:'.(8 * ($ratio_t) * 1.5).'pt !important; }';
$output .= '.c-'.$uniq.' .visual_font_size_18pt, .c-'.$uniq.' .visual_font_size_18pt * { font-size: '.(18 * $ratio_t).'pt; line-height:'.(18 * ($ratio_t) * 1.8).'pt; }'; $output .= '.c-'.$uniq.' .visual_font_size_10pt, .c-'.$uniq.' .visual_font_size_10pt * { font-size: '.(10 * $ratio_t).'pt !important; line-height:'.(10 * ($ratio_t) * 1.5).'pt !important; }';
$output .= '.c-'.$uniq.' .visual_font_size_24pt, .c-'.$uniq.' .visual_font_size_24pt * { font-size: '.(24 * $ratio_t).'pt; line-height:'.(24 * ($ratio_t) * 1.8).'pt; }'; $output .= '.c-'.$uniq.' .visual_font_size_12pt, .c-'.$uniq.' .visual_font_size_12pt * { font-size: '.(12 * $ratio_t).'pt !important; line-height:'.(12 * ($ratio_t) * 1.5).'pt !important; }';
$output .= '.c-'.$uniq.' .visual_font_size_28pt, .c-'.$uniq.' .visual_font_size_28pt * { font-size: '.(28 * $ratio_t).'pt; line-height:'.(28 * ($ratio_t) * 1.8).'pt; }'; $output .= '.c-'.$uniq.' .visual_font_size_14pt, .c-'.$uniq.' .visual_font_size_14pt * { font-size: '.(14 * $ratio_t).'pt !important; line-height:'.(14 * ($ratio_t) * 1.5).'pt !important; }';
$output .= '.c-'.$uniq.' .visual_font_size_36pt, .c-'.$uniq.' .visual_font_size_36pt * { font-size: '.(36 * $ratio_t).'pt; line-height:'.(36 * ($ratio_t) * 1.8).'pt; }'; $output .= '.c-'.$uniq.' .visual_font_size_18pt, .c-'.$uniq.' .visual_font_size_18pt * { font-size: '.(18 * $ratio_t).'pt !important; line-height:'.(18 * ($ratio_t) * 1.5).'pt !important; }';
$output .= '.c-'.$uniq.' .visual_font_size_48pt, .c-'.$uniq.' .visual_font_size_48pt * { font-size: '.(48 * $ratio_t).'pt; line-height:'.(48 * ($ratio_t) * 1.8).'pt; }'; $output .= '.c-'.$uniq.' .visual_font_size_24pt, .c-'.$uniq.' .visual_font_size_24pt * { font-size: '.(24 * $ratio_t).'pt !important; line-height:'.(24 * ($ratio_t) * 1.5).'pt !important; }';
$output .= '.c-'.$uniq.' .visual_font_size_60pt, .c-'.$uniq.' .visual_font_size_60pt * { font-size: '.(60 * $ratio_t).'pt; line-height:'.(60 * ($ratio_t) * 1.8).'pt; }'; $output .= '.c-'.$uniq.' .visual_font_size_28pt, .c-'.$uniq.' .visual_font_size_28pt * { font-size: '.(28 * $ratio_t).'pt !important; line-height:'.(28 * ($ratio_t) * 1.5).'pt !important; }';
$output .= '.c-'.$uniq.' .visual_font_size_72pt, .c-'.$uniq.' .visual_font_size_72pt * { font-size: '.(72 * $ratio_t).'pt; line-height:'.(72 * ($ratio_t) * 1.8).'pt; }'; $output .= '.c-'.$uniq.' .visual_font_size_36pt, .c-'.$uniq.' .visual_font_size_36pt * { font-size: '.(36 * $ratio_t).'pt !important; line-height:'.(36 * ($ratio_t) * 1.5).'pt !important; }';
$output .= '.c-'.$uniq.' .visual_font_size_84pt, .c-'.$uniq.' .visual_font_size_84pt * { font-size: '.(84 * $ratio_t).'pt; line-height:'.(84 * ($ratio_t) * 1.8).'pt; }'; $output .= '.c-'.$uniq.' .visual_font_size_48pt, .c-'.$uniq.' .visual_font_size_48pt * { font-size: '.(48 * $ratio_t).'pt !important; line-height:'.(48 * ($ratio_t) * 1.5).'pt !important; }';
$output .= '.c-'.$uniq.' .visual_font_size_96pt, .c-'.$uniq.' .visual_font_size_96pt * { font-size: '.(96 * $ratio_t).'pt; line-height:'.(96 * ($ratio_t) * 1.8).'pt; }'; $output .= '.c-'.$uniq.' .visual_font_size_60pt, .c-'.$uniq.' .visual_font_size_60pt * { font-size: '.(60 * $ratio_t).'pt !important; line-height:'.(60 * ($ratio_t) * 1.5).'pt !important; }';
$output .= '.c-'.$uniq.' .visual_font_size_116pt, .c-'.$uniq.' .visual_font_size_116pt * { font-size: '.(116 * $ratio_t).'pt; line-height:'.(116 * ($ratio_t) * 1.8).'pt; }'; $output .= '.c-'.$uniq.' .visual_font_size_72pt, .c-'.$uniq.' .visual_font_size_72pt * { font-size: '.(72 * $ratio_t).'pt !important; line-height:'.(72 * ($ratio_t) * 1.5).'pt !important; }';
$output .= '.c-'.$uniq.' .visual_font_size_128pt, .c-'.$uniq.' .visual_font_size_128pt * { font-size: '.(128 * $ratio_t).'pt; line-height:'.(128 * ($ratio_t) * 1.8).'pt; }'; $output .= '.c-'.$uniq.' .visual_font_size_84pt, .c-'.$uniq.' .visual_font_size_84pt * { font-size: '.(84 * $ratio_t).'pt !important; line-height:'.(84 * ($ratio_t) * 1.5).'pt !important; }';
$output .= '.c-'.$uniq.' .visual_font_size_140pt, .c-'.$uniq.' .visual_font_size_140pt * { font-size: '.(140 * $ratio_t).'pt; line-height:'.(140 * ($ratio_t) * 1.8).'pt; }'; $output .= '.c-'.$uniq.' .visual_font_size_96pt, .c-'.$uniq.' .visual_font_size_96pt * { font-size: '.(96 * $ratio_t).'pt !important; line-height:'.(96 * ($ratio_t) * 1.5).'pt !important; }';
$output .= '.c-'.$uniq.' .visual_font_size_154pt, .c-'.$uniq.' .visual_font_size_154pt * { font-size: '.(154 * $ratio_t).'pt; line-height:'.(154 * ($ratio_t) * 1.8).'pt; }'; $output .= '.c-'.$uniq.' .visual_font_size_116pt, .c-'.$uniq.' .visual_font_size_116pt * { font-size: '.(116 * $ratio_t).'pt !important; line-height:'.(116 * ($ratio_t) * 1.5).'pt !important; }';
$output .= '.c-'.$uniq.' .visual_font_size_196pt, .c-'.$uniq.' .visual_font_size_196pt * { font-size: '.(196 * $ratio_t).'pt; line-height:'.(196 * ($ratio_t) * 1.8).'pt; }'; $output .= '.c-'.$uniq.' .visual_font_size_128pt, .c-'.$uniq.' .visual_font_size_128pt * { font-size: '.(128 * $ratio_t).'pt !important; line-height:'.(128 * ($ratio_t) * 1.5).'pt !important; }';
$output .= '.c-'.$uniq.' .visual_font_size_140pt, .c-'.$uniq.' .visual_font_size_140pt * { font-size: '.(140 * $ratio_t).'pt !important; line-height:'.(140 * ($ratio_t) * 1.5).'pt !important; }';
$output .= '.c-'.$uniq.' .visual_font_size_154pt, .c-'.$uniq.' .visual_font_size_154pt * { font-size: '.(154 * $ratio_t).'pt !important; line-height:'.(154 * ($ratio_t) * 1.5).'pt !important; }';
$output .= '.c-'.$uniq.' .visual_font_size_196pt, .c-'.$uniq.' .visual_font_size_196pt * { font-size: '.(196 * $ratio_t).'pt !important; line-height:'.(196 * ($ratio_t) * 1.5).'pt !important; }';
$output .= '.c-'.$uniq.' .visual-console-item-label table tr td p { overflow:initial !important; margin:0px; font-size: '.(10 * $ratio_t).'pt !important; line-height:'.(10 * $ratio_t * 1.5).'pt !important;}';
$output .= '.c-'.$uniq.' .visual-console-item-label table tr td span { font-size: '.(10 * $ratio_t).'pt !important; line-height:'.(10 * $ratio_t * 1.5).'pt !important; }';
$output .= '.c-'.$uniq.' .visual-console-item-label table tr td span.visual_font_size_4pt, .c-'.$uniq.' .visual-console-item-label table tr td span.visual_font_size_4pt * { font-size: '.(4 * $ratio_t).'pt !important; line-height:'.(4 * ($ratio_t) * 1.5).'pt !important; }';
$output .= '.c-'.$uniq.' .visual-console-item-label table tr td span.visual_font_size_6pt, .c-'.$uniq.' .visual-console-item-label table tr td span.visual_font_size_6pt * { font-size: '.(6 * $ratio_t).'pt !important; line-height:'.(6 * ($ratio_t) * 1.5).'pt !important; }';
$output .= '.c-'.$uniq.' .visual-console-item-label table tr td span.visual_font_size_8pt, .c-'.$uniq.' .visual-console-item-label table tr td span.visual_font_size_8pt * { font-size: '.(8 * $ratio_t).'pt !important; line-height:'.(8 * ($ratio_t) * 1.5).'pt !important; }';
$output .= '.c-'.$uniq.' .visual-console-item-label table tr td span.visual_font_size_10pt, .c-'.$uniq.' .visual-console-item-label table tr td span.visual_font_size_10pt * { font-size: '.(10 * $ratio_t).'pt !important; line-height:'.(10 * ($ratio_t) * 1.5).'pt !important; }';
$output .= '.c-'.$uniq.' .visual-console-item-label table tr td span.visual_font_size_12pt, .c-'.$uniq.' .visual-console-item-label table tr td span.visual_font_size_12pt * { font-size: '.(12 * $ratio_t).'pt !important; line-height:'.(12 * ($ratio_t) * 1.5).'pt !important; }';
$output .= '.c-'.$uniq.' .visual-console-item-label table tr td span.visual_font_size_14pt, .c-'.$uniq.' .visual-console-item-label table tr td span.visual_font_size_14pt * { font-size: '.(14 * $ratio_t).'pt !important; line-height:'.(14 * ($ratio_t) * 1.5).'pt !important; }';
$output .= '.c-'.$uniq.' .visual-console-item-label table tr td span.visual_font_size_18pt, .c-'.$uniq.' .visual-console-item-label table tr td span.visual_font_size_18pt * { font-size: '.(18 * $ratio_t).'pt !important; line-height:'.(18 * ($ratio_t) * 1.5).'pt !important; }';
$output .= '.c-'.$uniq.' .visual-console-item-label table tr td span.visual_font_size_24pt, .c-'.$uniq.' .visual-console-item-label table tr td span.visual_font_size_24pt * { font-size: '.(24 * $ratio_t).'pt !important; line-height:'.(24 * ($ratio_t) * 1.5).'pt !important; }';
$output .= '.c-'.$uniq.' .visual-console-item-label table tr td span.visual_font_size_28pt, .c-'.$uniq.' .visual-console-item-label table tr td span.visual_font_size_28pt * { font-size: '.(28 * $ratio_t).'pt !important; line-height:'.(28 * ($ratio_t) * 1.5).'pt !important; }';
$output .= '.c-'.$uniq.' .visual-console-item-label table tr td span.visual_font_size_36pt, .c-'.$uniq.' .visual-console-item-label table tr td span.visual_font_size_36pt * { font-size: '.(36 * $ratio_t).'pt !important; line-height:'.(36 * ($ratio_t) * 1.5).'pt !important; }';
$output .= '.c-'.$uniq.' .visual-console-item-label table tr td span.visual_font_size_48pt, .c-'.$uniq.' .visual-console-item-label table tr td span.visual_font_size_48pt * { font-size: '.(48 * $ratio_t).'pt !important; line-height:'.(48 * ($ratio_t) * 1.5).'pt !important; }';
$output .= '.c-'.$uniq.' .visual-console-item-label table tr td span.visual_font_size_60pt, .c-'.$uniq.' .visual-console-item-label table tr td span.visual_font_size_60pt * { font-size: '.(60 * $ratio_t).'pt !important; line-height:'.(60 * ($ratio_t) * 1.5).'pt !important; }';
$output .= '.c-'.$uniq.' .visual-console-item-label table tr td span.visual_font_size_72pt, .c-'.$uniq.' .visual-console-item-label table tr td span.visual_font_size_72pt * { font-size: '.(72 * $ratio_t).'pt !important; line-height:'.(72 * ($ratio_t) * 1.5).'pt !important; }';
$output .= '.c-'.$uniq.' .visual-console-item-label table tr td span.visual_font_size_84pt, .c-'.$uniq.' .visual-console-item-label table tr td span.visual_font_size_84pt * { font-size: '.(84 * $ratio_t).'pt !important; line-height:'.(84 * ($ratio_t) * 1.5).'pt !important; }';
$output .= '.c-'.$uniq.' .visual-console-item-label table tr td span.visual_font_size_96pt, .c-'.$uniq.' .visual-console-item-label table tr td span.visual_font_size_96pt * { font-size: '.(96 * $ratio_t).'pt !important; line-height:'.(96 * ($ratio_t) * 1.5).'pt !important; }';
$output .= '.c-'.$uniq.' .visual-console-item-label table tr td span.visual_font_size_116pt, .c-'.$uniq.' .visual-console-item-label table tr td span.visual_font_size_116pt * { font-size: '.(116 * $ratio_t).'pt !important; line-height:'.(116 * ($ratio_t) * 1.5).'pt !important; }';
$output .= '.c-'.$uniq.' .visual-console-item-label table tr td span.visual_font_size_128pt, .c-'.$uniq.' .visual-console-item-label table tr td span.visual_font_size_128pt * { font-size: '.(128 * $ratio_t).'pt !important; line-height:'.(128 * ($ratio_t) * 1.5).'pt !important; }';
$output .= '.c-'.$uniq.' .visual-console-item-label table tr td span.visual_font_size_140pt, .c-'.$uniq.' .visual-console-item-label table tr td span.visual_font_size_140pt * { font-size: '.(140 * $ratio_t).'pt !important; line-height:'.(140 * ($ratio_t) * 1.5).'pt !important; }';
$output .= '.c-'.$uniq.' .visual-console-item-label table tr td span.visual_font_size_154pt, .c-'.$uniq.' .visual-console-item-label table tr td span.visual_font_size_154pt * { font-size: '.(154 * $ratio_t).'pt !important; line-height:'.(154 * ($ratio_t) * 1.5).'pt !important; }';
$output .= '.c-'.$uniq.' .visual-console-item-label table tr td span.visual_font_size_196pt, .c-'.$uniq.' .visual-console-item-label table tr td span.visual_font_size_196pt * { font-size: '.(196 * $ratio_t).'pt !important; line-height:'.(196 * ($ratio_t) * 1.5).'pt !important; }';
$output .= '.c-'.$uniq.' .flot-text, .c-'.$uniq.' .flot-text * { font-size: '.(8 * $ratio_t).'pt !important; line-height:'.(8 * ($ratio_t)).'pt !important; }'; $output .= '.c-'.$uniq.' .flot-text, .c-'.$uniq.' .flot-text * { font-size: '.(8 * $ratio_t).'pt !important; line-height:'.(8 * ($ratio_t)).'pt !important; }';
$output .= '.c-'.$uniq.' .visual-console-item .digital-clock span.time {font-size: '.(50 * $ratio_t).'px !important; line-height: '.(50 * $ratio_t).'px !important;}';
$output .= '.c-'.$uniq.' .visual-console-item .digital-clock span.date {font-size: '.(25 * $ratio_t).'px !important; line-height: '.(25 * $ratio_t).'px !important;}';
$output .= '.c-'.$uniq.' .visual-console-item .digital-clock span.timezone {font-size: '.(25 * $ratio_t).'px !important; line-height: '.(25 * $ratio_t).'px !important;}';
$output .= '.c-'.$uniq.' .visual-console-item .donut-graph * {font-size: '.(8 * $ratio_t).'px !important; line-height: '.(8 * $ratio_t).'px !important;}'; $output .= '.c-'.$uniq.' .visual-console-item .donut-graph * {font-size: '.(8 * $ratio_t).'px !important; line-height: '.(8 * $ratio_t).'px !important;}';
$output .= '.c-'.$uniq.' .visual-console-item .donut-graph g rect {width:'.(25 * $ratio_t).' !important; height: '.(15 * $ratio_t).' !important;}'; $output .= '.c-'.$uniq.' .visual-console-item .donut-graph g rect {width:'.(25 * $ratio_t).' !important; height: '.(15 * $ratio_t).' !important;}';
$output .= '</style>'; $output .= '</style>';

View File

@ -123,11 +123,6 @@ final class Clock extends Item
*/ */
protected function decode(array $data): array protected function decode(array $data): array
{ {
// Default values.
if (empty($data['height']) === true) {
$data['height'] = ($data['width'] / 2);
}
$clockData = parent::decode($data); $clockData = parent::decode($data);
$clockData['type'] = CLOCK; $clockData['type'] = CLOCK;
$clockData['clockType'] = static::extractClockType($data); $clockData['clockType'] = static::extractClockType($data);
@ -405,11 +400,48 @@ final class Clock extends Item
} }
if (isset($values['height']) === false) { if (isset($values['height']) === false) {
$values['height'] = 100; $values['height'] = 50;
} }
return $values; return $values;
} }
/**
* Fetch a vc item data structure from the database using a filter.
*
* @param array $filter Filter of the Visual Console Item.
*
* @return array The Visual Console Item data structure stored into the DB.
* @throws \InvalidArgumentException When an agent Id cannot be found.
*
* @override Item::fetchDataFromDB.
*/
protected static function fetchDataFromDB(
array $filter,
?float $ratio=0
): array {
// Due to this DB call, this function cannot be unit tested without
// a proper mock.
$data = parent::fetchDataFromDB($filter, $ratio);
// Default values.
if ((int) $data['width'] === 0) {
$data['width'] = 100;
if ($ratio != 0) {
$data['width'] *= $ratio;
}
}
if ((int) $data['height'] === 0) {
$data['height'] = 50;
if ($ratio != 0) {
$data['height'] *= $ratio;
}
}
return $data;
}
} }

View File

@ -107,7 +107,14 @@ final class EventsHistory extends Item
if ((int) $data['width'] === 0 && (int) $data['height'] === 0) { if ((int) $data['width'] === 0 && (int) $data['height'] === 0) {
$data['width'] = 420; $data['width'] = 420;
$data['height'] = 80; $data['height'] = 80;
if ($ratio != 0) {
$data['width'] = ($data['width'] * $ratio);
$data['height'] = ($data['height'] * $ratio);
} }
}
$data['height'] = ($data['height'] - 20);
if ((int) $data['width'] < 11) { if ((int) $data['width'] < 11) {
$data['width'] = 11; $data['width'] = 11;
@ -122,7 +129,7 @@ final class EventsHistory extends Item
$agentId, $agentId,
$moduleId, $moduleId,
100, 100,
((int) $data['height'] - 20), (int) $data['height'],
static::extractMaxTime($data), static::extractMaxTime($data),
'', '',
true, true,

View File

@ -31,25 +31,6 @@ final class Label extends Item
*/ */
protected function decode(array $data): array protected function decode(array $data): array
{ {
$data['label'] = \preg_replace(
'/overflow: hidden;/',
'',
$data['label']
);
// Default values.
if ((empty($data['width']) === true)
&& (empty($data['height']) === true)
) {
preg_match(
'/visual_font_size_(.*)pt/',
$data['label'],
$matches
);
$data['width'] = (($matches[1] * 10) + 5);
$data['height'] = ($matches[1] * 2.5);
}
$return = parent::decode($data); $return = parent::decode($data);
$return['type'] = LABEL; $return['type'] = LABEL;
return $return; return $return;

View File

@ -218,10 +218,15 @@ final class StaticGraph extends Item
if ($width === 0 || $height === 0) { if ($width === 0 || $height === 0) {
if (isset($imagePath) && $imagePath !== false) { if (isset($imagePath) && $imagePath !== false) {
$sizeImage = getimagesize($config['homedir'].'/'.$imagePath); $sizeImage = getimagesize($config['homedir'].'/'.$imagePath);
if ($ratio != 0) {
$data['width'] = ($sizeImage[0] * $ratio);
$data['height'] = ($sizeImage[1] * $ratio);
} else {
$data['width'] = $sizeImage[0]; $data['width'] = $sizeImage[0];
$data['height'] = $sizeImage[1]; $data['height'] = $sizeImage[1];
} }
} }
}
// Get last value. // Get last value.
$showLastValueTooltip = static::extractShowLastValueTooltip($data); $showLastValueTooltip = static::extractShowLastValueTooltip($data);

View File

@ -76,7 +76,7 @@ h1 {
.grid-stack-item-content { .grid-stack-item-content {
color: #2c3e50; color: #2c3e50;
text-align: center; /*text-align: center;*/
background-color: #ffffff; background-color: #ffffff;
border-radius: 5px; border-radius: 5px;
-webkit-box-shadow: 5px 5px 5px 0px rgba(214, 214, 214, 1); -webkit-box-shadow: 5px 5px 5px 0px rgba(214, 214, 214, 1);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -129,7 +129,7 @@
<div style='height: 10px'> <div style='height: 10px'>
<?php <?php
$version = '7.0NG.752'; $version = '7.0NG.752';
$build = '210302'; $build = '210304';
$banner = "v$version Build $build"; $banner = "v$version Build $build";
error_reporting(0); error_reporting(0);

View File

@ -209,23 +209,6 @@ if (($new_msg) && (!empty($dst_user)) && (!$reply)) {
); );
} }
// Create message (destination group).
if (($new_msg) && ($dst_group != '') && (!$reply)) {
$return = messages_create_message(
$config['id_user'],
[],
[$dst_group],
$subject,
$message
);
ui_print_result_message(
$return,
__('Message successfully sent'),
__('Error sending message to group %s', groups_get_name($dst_group))
);
}
// Message creation form. // Message creation form.
// User info. // User info.
$own_info = get_user_info($config['id_user']); $own_info = get_user_info($config['id_user']);

View File

@ -426,7 +426,7 @@ if ($config['double_auth_enabled'] || ($config['double_auth_enabled'] == '' && $
$double_authentication .= '<div id="dialog-double_auth" style="display:none"><div id="dialog-double_auth-container"></div></div>'; $double_authentication .= '<div id="dialog-double_auth" style="display:none"><div id="dialog-double_auth-container"></div></div>';
} }
if ($double_auth_enabled && $config['double_auth_enabled'] && $config['2FA_all_users'] != '') { if ($double_auth_enabled && $config['double_auth_enabled']) {
$double_authentication .= html_print_button(__('Show information'), 'show_info', false, 'javascript:show_double_auth_info();', '', true); $double_authentication .= html_print_button(__('Show information'), 'show_info', false, 'javascript:show_double_auth_info();', '', true);
} }
@ -981,6 +981,7 @@ function show_double_auth_info () {
data: { data: {
page: 'include/ajax/double_auth.ajax', page: 'include/ajax/double_auth.ajax',
id_user: userID, id_user: userID,
id_user_auth: userID,
get_double_auth_data_page: 1, get_double_auth_data_page: 1,
containerID: $dialogContainer.prop('id') containerID: $dialogContainer.prop('id')
}, },

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_console %define name pandorafms_console
%define version 7.0NG.752 %define version 7.0NG.752
%define release 210302 %define release 210304
# User and Group under which Apache is running # User and Group under which Apache is running
%define httpd_name httpd %define httpd_name httpd

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_console %define name pandorafms_console
%define version 7.0NG.752 %define version 7.0NG.752
%define release 210302 %define release 210304
# User and Group under which Apache is running # User and Group under which Apache is running
%define httpd_name httpd %define httpd_name httpd

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_console %define name pandorafms_console
%define version 7.0NG.752 %define version 7.0NG.752
%define release 210302 %define release 210304
%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

View File

@ -1,5 +1,5 @@
package: pandorafms-server package: pandorafms-server
Version: 7.0NG.752-210302 Version: 7.0NG.752-210304
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -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.752-210302" pandora_version="7.0NG.752-210304"
package_cpan=0 package_cpan=0
package_pandora=1 package_pandora=1

View File

@ -277,7 +277,7 @@ autocreate_group 10
# If set to 1, new agents will be added to the group specified by autocreate_group (the group specified by the agent will be used as fallback). # If set to 1, new agents will be added to the group specified by autocreate_group (the group specified by the agent will be used as fallback).
# If set to 0, new agents will be added to the group specified by the agent (the group specified by autocreate_group will be used as fallback). # If set to 0, new agents will be added to the group specified by the agent (the group specified by autocreate_group will be used as fallback).
autocreate_group_force 1 autocreate_group_force 0
# Set to 1 if want to autocreate agents with Pandora FMS Data Server, # Set to 1 if want to autocreate agents with Pandora FMS Data Server,
# set to 0 to disable # set to 0 to disable

View File

@ -45,7 +45,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.752"; my $pandora_version = "7.0NG.752";
my $pandora_build = "210302"; my $pandora_build = "210304";
our $VERSION = $pandora_version." ".$pandora_build; our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash # Setup hash

View File

@ -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.752"; my $pandora_version = "7.0NG.752";
my $pandora_build = "210302"; my $pandora_build = "210304";
our $VERSION = $pandora_version." ".$pandora_build; our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] ); our %EXPORT_TAGS = ( 'all' => [ qw() ] );

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_server %define name pandorafms_server
%define version 7.0NG.752 %define version 7.0NG.752
%define release 210302 %define release 210304
Summary: Pandora FMS Server Summary: Pandora FMS Server
Name: %{name} Name: %{name}

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_server %define name pandorafms_server
%define version 7.0NG.752 %define version 7.0NG.752
%define release 210302 %define release 210304
Summary: Pandora FMS Server Summary: Pandora FMS Server
Name: %{name} Name: %{name}

View File

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

View File

@ -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.752 PS210302"; my $version = "7.0NG.752 PS210304";
# Pandora server configuration # Pandora server configuration
my %conf; my %conf;

View File

@ -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.752 PS210302"; my $version = "7.0NG.752 PS210304";
# save program name for logging # save program name for logging
my $progname = basename($0); my $progname = basename($0);

View File

@ -844,7 +844,8 @@ abstract class VisualConsoleItem<Props extends ItemProps> {
if ( if (
prevProps && prevProps &&
this.props.isLinkEnabled && prevProps.link !== this.props.link this.props.isLinkEnabled &&
prevProps.link !== this.props.link
) { ) {
if (this.props.link !== null) { if (this.props.link !== null) {
this.elementRef.setAttribute("href", this.props.link); this.elementRef.setAttribute("href", this.props.link);
@ -1024,8 +1025,8 @@ abstract class VisualConsoleItem<Props extends ItemProps> {
this.props.type != ItemType.LINE_ITEM && this.props.type != ItemType.LINE_ITEM &&
this.props.type != ItemType.NETWORK_LINK this.props.type != ItemType.NETWORK_LINK
) { ) {
this.childElementRef.style.width = width > 0 ? `${width}px` : "0"; this.childElementRef.style.width = width > 0 ? `${width}px` : null;
this.childElementRef.style.height = height > 0 ? `${height}px` : "0"; this.childElementRef.style.height = height > 0 ? `${height}px` : null;
} }
if (this.props.label && this.props.label.length > 0) { if (this.props.label && this.props.label.length > 0) {
@ -1037,11 +1038,11 @@ abstract class VisualConsoleItem<Props extends ItemProps> {
switch (this.props.labelPosition) { switch (this.props.labelPosition) {
case "up": case "up":
case "down": case "down":
table.style.width = width > 0 ? `${width}px` : "0"; table.style.width = width > 0 ? `${width}px` : null;
break; break;
case "left": case "left":
case "right": case "right":
table.style.height = height > 0 ? `${height}px` : "0"; table.style.height = height > 0 ? `${height}px` : null;
break; break;
} }
} }