Merge remote-tracking branch 'origin/develop' into ent-12688-Mejoras-sistema-datos-de-demo-y-adaptar-al-nuevo-sistema-PRD

This commit is contained in:
alejandro.campos@artica.es 2024-02-14 14:21:53 +01:00
commit f9ffde3253
42 changed files with 1105 additions and 405 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: 7.0NG.775-240213
Version: 7.0NG.775-240214
Architecture: all
Priority: optional
Section: admin

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.775"
PI_BUILD="240213"
PI_BUILD="240214"
OS_NAME=`uname -s`
FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{240213}
{240214}
ViewReadme
{Yes}

View File

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

View File

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

View File

@ -1,5 +1,5 @@
package: pandorafms-console
Version: 7.0NG.775-240213
Version: 7.0NG.775-240214
Architecture: all
Priority: optional
Section: admin

View File

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

View File

@ -560,13 +560,13 @@ if ($is_management_allowed === true && $update_group === true) {
}
}
$id_group = (int) get_parameter('id_group');
// Delete group.
if ($is_management_allowed === true
&& $delete_group === true
&& ((bool) check_acl($config['id_user'], 0, 'PM') === true)
&& ((bool) check_acl($config['id_user'], $id_group, 'PM') === true)
) {
$id_group = (int) get_parameter('id_group');
$usedGroup = groups_check_used($id_group);
if (!$usedGroup['return']) {
@ -880,6 +880,28 @@ if ($tab == 'tree') {
echo "<div id='tree-controller-recipient'></div>";
if (users_can_manage_group_all('AR') === false) {
$user_groups_acl = users_get_groups(false, 'AR');
$groups_acl = implode('","', $user_groups_acl);
if (empty($groups_acl) === true) {
$is_management_allowed = false;
}
}
html_print_div(
[
'content' => ui_print_info_message(
[
'no_close' => true,
'message' => __('There are no defined groups'),
],
'',
true
),
'class' => 'invisible',
'id' => 'message-tree-info',
]
);
} else {
/*
* Group list view.
@ -1246,7 +1268,7 @@ $tab = 'group_edition';
treeController.init({
recipient: $("div#tree-controller-recipient"),
page: parameters['page'],
emptyMessage: "<?php echo __('No data found'); ?>",
emptyMessage: $("#message-tree-info").html(),
foundMessage: "<?php echo __('Found groups'); ?>",
tree: data.tree,
baseURL: "<?php echo ui_get_full_url(false, false, false, is_metaconsole()); ?>",

View File

@ -42,71 +42,142 @@ if (check_acl($config['id_user'], 0, 'PM') === false) {
}
require_once $config['homedir'].'/include/class/Prd.class.php';
$msg = '';
// Instance of the prd class.
$prd = new Prd();
$msg = '';
if (isset($_FILES['resource_import']) === true) {
$data = parse_ini_file($_FILES['resource_import']['tmp_name'], true);
if ($data !== false) {
if (isset($data['prd_data']['name']) === true
&& isset($data['prd_data']['type']) === true
) {
$name = $data['prd_data']['name'];
$type = $data['prd_data']['type'];
}
if (empty($_FILES['resource_import']['tmp_name']) === false) {
$data = parse_ini_file($_FILES['resource_import']['tmp_name'], true);
if ($data !== false) {
if (isset($data['prd_data']['name']) === true
&& isset($data['prd_data']['type']) === true
) {
$name = $data['prd_data']['name'];
$type = $data['prd_data']['type'];
}
$msg = $prd->importPrd($data);
$msg = $prd->importPrd($data);
} else {
$msg = [
'status' => false,
'items' => [],
'errors' => ['Unexpected error: Unable to parse PRD file.'],
];
}
} else {
$msg = [
'status' => false,
'items' => [],
'errors' => ['Unexpected error: Unable to parse PRD file.'],
'errors' => ['No files have selected'],
];
}
}
$msg = json_encode($msg);
$table = new stdClass();
$table->id = 'import_data_table';
$table->class = 'databox filter-table-adv';
$table->width = '100%';
$table->data = [];
$table->style = [];
$table->size = [];
$table->data[0][0] = html_print_label_input_block(
__('Resource importation'),
html_print_input_file('resource_import', true)
echo '<div class="div-import-export">';
// Import section.
$label_import = html_print_label(
__('Import resources to').' '.get_product_name(),
'label_import',
true,
['style' => 'font-size: 13px; line-height: 16px'],
);
$table->data[0][0] .= html_print_submit_button(
__('Import resource'),
'upload',
false,
[],
$div_label_import = html_print_div(
[
'style' => 'padding-bottom: 20px;',
'content' => $label_import,
],
true
);
echo '<form name="submit_import" method="POST" enctype="multipart/form-data">';
html_print_table($table);
$input_file = '<input class="input-file-style" style="padding-top: 1px; width: 100%;" type="file" value name="resource_import" id="file-resource_import" >';
$div_input_file = html_print_div(
[
'style' => 'padding-top: 20px;display: flex; justify-content: left;width:100%; height: 60px;',
'content' => $input_file,
],
true
);
$button_import = html_print_submit_button(
__('Import'),
'upload',
false,
[
'icon' => 'import',
'class' => 'disabled',
'disabled' => '',
],
true
);
$div_button_import = html_print_div(
[
'style' => 'padding-bottom: 20px',
'content' => $button_import,
],
true
);
$div_import = html_print_div(
[
'style' => 'width: 80%',
'content' => $div_label_import.$div_input_file.$div_button_import,
],
true
);
$img_import = html_print_image(
'images/import_to.svg',
true,
[
'border' => '0',
'width' => '100%',
]
);
$div_img_import = html_print_div(
[
'style' => 'margin-left: 40px; margin-right: 20px',
'content' => $img_import,
],
true
);
echo '<form class="form-import" name="submit_import" method="POST" enctype="multipart/form-data">';
echo html_print_div(
[
'class' => 'div-import',
'content' => $div_import.$div_img_import,
],
true
);
echo '</form>';
$table = new stdClass();
$table->id = 'export_data_table';
$table->class = 'databox filter-table-adv';
$table->width = '100%';
$table->data = [];
$table->style = [];
$table->size = [];
$table->size[0] = '50%';
$table->size[1] = '50%';
// Export section.
$label_export = html_print_label(
__('Export resources from').' '.get_product_name(),
'label_export',
true,
['style' => 'font-size: 13px; line-height: 16px'],
);
$div_label_export = html_print_div(
[
'style' => 'padding-bottom: 20px',
'content' => $label_export,
],
true
);
$export_type = $prd->getTypesPrd();
$table->data[0][0] = html_print_label_input_block(
$select_export_type = html_print_label_input_block(
__('Export type'),
html_print_select(
$export_type,
@ -118,22 +189,75 @@ $table->data[0][0] = html_print_label_input_block(
true,
false,
true,
'w40p'
)
'w90p'
),
['div_style' => 'display: flex; flex-direction: column; width: 50%'],
);
$table->data[1][0] = '';
$div_select_export = html_print_div(
[
'id' => 'div_select_export',
'style' => 'padding-bottom: 20px;display: flex; flex-direction: row; height: 60px',
'content' => $select_export_type,
],
true
);
$table->data[2][0] = html_print_button(
$button_export = html_print_button(
__('Export'),
'export_button',
false,
'',
['class' => 'flex_justify invisible_important'],
[
'class' => 'flex_justify disabled',
'icon' => 'export',
'disabled' => '',
],
true
);
html_print_table($table);
$div_button_export = html_print_div(
[
'style' => '',
'content' => $button_export,
],
true
);
$div_export = html_print_div(
[
'style' => 'padding-bottom: 20px; width: 80%',
'content' => $div_label_export.$div_select_export.$div_button_export,
],
true
);
$img_export = html_print_image(
'images/export_to.svg',
true,
[
'border' => '0',
'width' => '100%',
]
);
$div_img_export = html_print_div(
[
'style' => 'margin-left: 40px; margin-right: 20px',
'content' => $img_export,
],
true
);
echo html_print_div(
[
'class' => 'div-export',
'content' => $div_export.$div_img_export,
],
true
);
echo '</div>';
?>
<script type="text/javascript">
@ -154,6 +278,13 @@ html_print_table($table);
});
}
if (typeof msg.info === 'object' && Object.keys(msg.info).length > 0) {
message += "<br><br>";
Object.entries(msg.info).forEach(([key, value]) => {
message += value + "<br>";
});
}
confirmDialog({
title: title,
message: message,
@ -163,12 +294,23 @@ html_print_table($table);
);
}
$('input[type="file"]').change(function() {
console.log($(this).val());
if ($(this).val() === '') {
$("#button-upload").addClass("disabled");
$('#button-upload').prop('disabled', true);
} else {
$("#button-upload").removeClass("disabled");
$('#button-upload').prop('disabled', false);
}
});
$("#export_type").change(function(e) {
if ($(this).val() === '0') {
$("#button-export_button").addClass("invisible_important");
$("#export_data_table-1-0").html('');
$("#resource_type").remove();
$("#button-export_button").addClass("disabled");
$('#button-export_button').prop('disabled', true);
} else {
$("#export_data_table-1-0").html('');
$.ajax({
type: "GET",
url: "ajax.php",
@ -179,9 +321,11 @@ html_print_table($table);
type: $(this).val(),
},
success: function(data) {
$("#export_data_table-1-0").append(`${data}`);
$("#resource_type").remove();
$("#div_select_export").append(`${data}`);
$('#select_value').select2();
$("#button-export_button").removeClass("invisible_important");
$("#button-export_button").removeClass("disabled");
$('#button-export_button').prop('disabled', false);
},
error: function(data) {
console.error("Fatal error in AJAX call to interpreter order", data)
@ -202,6 +346,8 @@ html_print_table($table);
"downloadDialog"
);
const filename = '<?php echo uniqid().'.prd'; ?>';
$.ajax({
type: "GET",
url: "ajax.php",
@ -212,6 +358,7 @@ html_print_table($table);
type: $("#export_type").val(),
value: value,
name: $("#select_value option:selected").text(),
filename: filename
},
success: function(data) {
if (data.error === -1 || data.error === -2) {
@ -219,7 +366,7 @@ html_print_table($table);
$("#confirm_downloadDialog").dialog("close");
} else {
let a = document.createElement('a');
const url = '<?php echo $config['homeurl'].'/attachment/'; ?>' + data.name;
const url = '<?php echo $config['homeurl'].'/attachment/'; ?>' + filename;
a.href = url;
a.download = data.name_download;
a.click();
@ -231,7 +378,7 @@ html_print_table($table);
data: {
page: 'include/ajax/resources.ajax',
deleteFile: 1,
filename: data,
filename: filename,
},
});
$("#confirm_downloadDialog").dialog("close");
@ -240,6 +387,16 @@ html_print_table($table);
},
error: function(data) {
console.error("Fatal error in AJAX call to interpreter order", data);
$.ajax({
type: "DELETE",
url: "ajax.php",
data: {
page: 'include/ajax/resources.ajax',
deleteFile: 1,
filename: filename,
},
});
$("#confirm_downloadDialog").dialog("close");
}
});
}

View File

@ -1425,7 +1425,7 @@ class DiscoveryTaskList extends HTML
$table = new StdClasS();
$table->class = 'databox data';
$table->width = '75%';
$table->styleTable = 'margin: 2em auto 0;border: 1px solid #ddd;background: white;';
$table->styleTable = 'margin: 2em auto 0;border: 1px solid #ddd;background: white; overflow-wrap: anywhere';
$table->rowid = [];
$table->data = [];
@ -1433,7 +1433,7 @@ class DiscoveryTaskList extends HTML
$tableErrors = new StdClasS();
$tableErrors->class = 'databox data';
$tableErrors->width = '75%';
$tableErrors->styleTable = 'margin: 2em auto 0;border: 1px solid #ddd;background: white;';
$tableErrors->styleTable = 'margin: 2em auto 0;border: 1px solid #ddd;background: white; overflow-wrap: anywhere';
$tableErrors->rowid = [];
$tableErrors->data = [];

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="14px" height="14px" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>E1DA0B54-BDFA-427E-9BFB-1315DFA5936F</title>
<g id="Import-/-Export" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Mockup---Import-&amp;-Export-expandido-1300" transform="translate(-406, -540)" fill="#FFFFFF" fill-rule="nonzero">
<g id="Right" transform="translate(310, 380)">
<g id="Group" transform="translate(20, 63)">
<g id="Acciones" transform="translate(0, 83)">
<g id="Export-Copy" transform="translate(76, 13.999)">
<path d="M13,7.00200086 C13.5522847,7.00200086 14,7.44971619 14,8.00200086 L14,13.0020009 C14,13.5542875 13.5522847,14.0020009 13,14.0020009 L1,14.0020009 C0.44771525,14.0020009 0,13.5542875 0,13.0020009 L0,8.00201259 C0,7.44972773 0.44771525,7.00200086 1,7.00200086 C1.55228475,7.00200086 2,7.44973046 2,8.00201532 L2,12.0020009 L12,12.0020009 L12,8.00200086 C12,7.48917088 12.3860402,7.06649675 12.8833789,7.00873163 L13,7.00200086 Z" id="Path-2"></path>
<path d="M7.42761656,0.098000218 L7.4722276,0.120228468 C7.48541492,0.127297151 7.4984771,0.134682814 7.51140295,0.142385459 C7.6034078,0.196864662 7.68458638,0.263207322 7.75402558,0.34146022 L8.64094412,1.22873471 C8.69800231,1.28579287 8.75962403,1.34741457 8.82669975,1.41449025 L10.1954614,2.78325124 C10.4003199,2.98810964 10.6267161,3.21450572 10.8776552,3.46544474 L11.4849524,4.07274159 L11.7071068,4.29489588 C12.0976311,4.68541998 12.0976311,5.31858465 11.7071068,5.70910875 C11.3165825,6.09963285 10.6834175,6.09963285 10.2928932,5.70910875 L10.1805423,5.59675789 L9.46344168,4.87965762 C9.21250254,4.62871859 8.98610634,4.40232251 8.78124784,4.19746411 L8,3.416 L8,10.0020035 C8,10.5542882 7.55228475,11.0020034 7,11.0020034 C6.44771525,11.0020034 6,10.5542882 6,10.0020035 L6,3.41600434 L3.70710678,5.70911084 C3.34662282,6.06959476 2.77939176,6.09732429 2.38710056,5.79229943 L2.29289322,5.70911084 C1.90236893,5.31858659 1.90236893,4.68542169 2.29289322,4.29489745 L6.29289322,0.294897937 C6.54710458,0.0406866046 6.87413362,-0.0382890141 7.1738163,0.0164817894 C7.17680504,0.0176633808 7.18016721,0.0182701476 7.18352681,0.0188942086 C7.21466801,0.0243205099 7.24513844,0.0316757505 7.2751983,0.0403969286 C7.28707112,0.0438108231 7.29913038,0.0474948538 7.31113021,0.0514117815 C7.32967787,0.0576595805 7.3480221,0.0642976796 7.3661634,0.0714484962 C7.37897252,0.0762161528 7.39150205,0.0814382808 7.40394259,0.0869264154 L7.42761656,0.098000218 Z" id="Path-4-Copy" transform="translate(7, 5.501) scale(1, -1) translate(-7, -5.501)"></path>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="111px" height="111px" viewBox="0 0 111 111" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>868E520D-AB8E-4FB9-B511-A43C58B7C144</title>
<g id="Import-/-Export" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Mockup---Import-&amp;-Export-expandido-1300" transform="translate(-1140, -400)">
<g id="Right" transform="translate(310, 380)">
<g id="Export-to-PFMS" transform="translate(830, 21)">
<g id="Carpeta" transform="translate(50, 0)" fill="#FFFFFF" stroke="#C1CCDC" stroke-linejoin="round">
<path d="M30.24,10.8 C30.24,13.5952941 27.9846,15.8823529 25.2,15.8823529 L12.6,15.8823529 L5.04,15.8823529 C2.256408,15.8823529 0,18.1694118 0,20.9647059 L0,41.2941176 L0,48.9176471 C0,51.7129412 2.2564836,54 5.04,54 L55.44,54 C58.2246,54 60.48,51.7129412 60.48,48.9176471 L60.48,41.2941176 L60.48,15.8823529 C60.48,13.0870588 58.2246,10.8 55.44,10.8 L30.24,10.8 Z" id="Path"></path>
<path d="M5.04,0 C2.256408,0 0,2.28327 0,5.1 L0,17.85 L25.2,17.85 L25.2,20.4 L60.48,20.4 L60.48,7.65 C60.48,4.83327 58.2246,2.55 55.44,2.55 L29.53188,2.55 C28.65996,1.027905 27.0648,0 25.2,0 L5.04,0 Z" id="Path"></path>
<path d="M30.2012804,7.8 C30.2012804,10.4702795 27.9487682,12.6550537 25.1677337,12.6550537 L12.5838668,12.6550537 L5.03354673,12.6550537 C2.25351887,12.6550537 0,14.8398278 0,17.5101073 L0,36.9303219 L0,45.5682628 C0,48.2385423 2.33103356,50.4 5.11098592,50.4 L55.4464533,50.4 C58.2274878,50.4 60.48,48.2152259 60.48,45.5449463 L60.4025608,36.9303219 L60.4025608,12.6550537 C60.4025608,9.98477414 58.1500487,7.8 55.3690141,7.8 L30.2012804,7.8 Z" id="Path"></path>
</g>
<circle id="Oval" fill="#FFFFFF" cx="35" cy="74" r="32"></circle>
<path d="M54.3088808,87.6772425 C52.1910624,89.4538282 49.4009606,90.9797575 46.396587,91.7689771 C43.0303728,92.6582798 39.2495496,92.9008577 35.650332,92.4338784 C28.8630793,91.5566934 22.7682123,87.3527581 18.6666667,83.4113724 C19.1347294,82.3207818 19.2699628,81.9265086 19.7510463,80.8496064 C20.5585631,81.6760766 21.9897067,82.7738481 22.625669,83.2060452 C27.0292053,86.2139212 32.7855321,88.809123 40.4090843,88.3753552 C44.2696313,88.1675595 47.8530869,86.8543627 50.393738,84.850234 C52.8530663,82.9143234 54.9142328,80.131522 54.8683175,76.2630667 C54.8198893,72.1672929 52.7706013,68.8241613 50.5442764,66.5873284 C49.7769642,65.8178561 48.9509442,64.9958739 48.116929,64.389317 C46.7936066,63.4302255 45.3272841,62.687457 43.8481692,61.9841831 C42.3478099,61.2611618 40.8054186,60.5323062 39.0151756,60.1555363 C41.9656386,58.3102838 49.8973493,56.0487668 50.8341601,56.578354 C51.4180393,56.9050824 52.052631,57.4290596 52.5433088,57.8181716 C54.161312,59.093669 55.5481392,60.8882068 56.7296036,62.5510209 C58.4280159,64.9498716 59.8616722,67.7277362 60.3861584,70.8529741 C61.6553417,78.5710349 58.4405798,84.2228078 54.3088808,87.6772425 M7,75.782883 L7,75.7734567 C10.537516,70.0360569 14.6286486,64.8419341 19.4789374,60.4347927 C22.8258824,57.3887174 26.7653177,54.6679645 31.1310245,52.6946485 C31.8627009,52.3539221 32.5749405,51.9357161 33.365151,51.6710899 C34.1446378,51.4069235 34.9625515,51.1418375 35.8012426,50.8588185 C38.9895647,49.7768629 43.3820809,49.228298 46.9044049,49.6333991 C49.5377698,49.9403288 52.1590705,50.7197231 53.9097321,52.1203337 C54.5006586,52.5884301 55.2108874,53.1004393 55.5942636,53.6611894 C55.8138782,53.9853622 56.1228579,54.7344085 55.9490429,55.1808933 C55.7312155,55.7193421 54.9289407,55.7726812 54.2656285,55.7563576 C52.0051392,55.7126748 49.9296356,55.4641422 47.7422023,55.7393443 C44.6354259,56.1313406 42.0677443,57.0238505 39.8503736,57.9830343 C35.16474,59.9869283 31.143759,63.2941812 27.9737568,66.629713 C24.7778387,69.9861665 21.8236532,74.214668 19.4755862,78.5558254 C16.8565196,83.3878402 14.8822219,88.484941 13.2481818,93.8333333 C9.50624318,88.8098036 7.19012417,82.5918924 7,75.782883 M34.9998875,39 C15.6689898,39 0,54.666808 0,73.9997751 C0,93.3298184 15.6689898,109 34.9998875,109 C54.3319099,109 70,93.3298184 70,73.9997751 C70,54.666808 54.3319099,39 34.9998875,39" id="Fill-694" fill="#82B92E"></path>
<g id="Group-2" transform="translate(11, 8.5)" stroke="#C1CCDC" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
<g id="Group-4">
<polygon id="Triangle" fill="#C1CCDC" transform="translate(31, 5) rotate(90) translate(-31, -5)" points="31 2.5 36 7.5 26 7.5"></polygon>
<path d="M0,39.5 C0,36.5833333 0,33.6666667 0,30.75 C-1.75851975e-15,16.3905965 11.6405965,4.75 26,4.75 L26,4.75 L26,4.75" id="Path-3" stroke-dasharray="2,4"></path>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="14px" height="14px" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>6AE8E7E7-D5F8-4670-BCBD-08A30E381B8F</title>
<g id="Import-/-Export" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Mockup---Import-&amp;-Export-expandido-1300" transform="translate(-408, -309)" fill="#FFFFFF" fill-rule="nonzero">
<g id="Left" transform="translate(310, 150)">
<g id="Group" transform="translate(20, 63)">
<g id="Acciones" transform="translate(0, 83)">
<g id="Import" transform="translate(78, 12.998)">
<path d="M13,7.00200171 C13.5522847,7.00200171 14,7.4497171 14,8.00200171 L14,13.0020017 C14,13.5542892 13.5522847,14.0020017 13,14.0020017 L1,14.0020017 C0.44771525,14.0020017 0,13.5542892 0,13.0020017 L0,8.00201357 C0,7.44972864 0.44771525,7.00200171 1,7.00200171 C1.55228475,7.00200171 2,7.44973137 2,8.00201629 L2,12.0020017 L12,12.0020017 L12,8.00200171 C12,7.4891718 12.3860402,7.06649761 12.8833789,7.00873249 L13,7.00200171 Z" id="Path-2"></path>
<path d="M7.42761656,0.09800023 L7.4722276,0.120228483 C7.48541492,0.127297166 7.4984771,0.134682831 7.51140295,0.142385477 C7.6034078,0.196864686 7.68458638,0.263207354 7.75402558,0.341460261 L8.64094412,1.22873487 C8.69800231,1.28579303 8.75962403,1.34741473 8.82669975,1.41449043 L10.1954614,2.78325158 C10.4003199,2.98811 10.6267161,3.21450611 10.8776552,3.46544517 L11.4849524,4.07274209 L11.7071068,4.2948964 C12.0976311,4.68542055 12.0976311,5.3185853 11.7071068,5.70910945 C11.3165825,6.0996336 10.6834175,6.0996336 10.2928932,5.70910945 L10.1805423,5.59675858 L9.46344168,4.87965821 C9.21250254,4.62871916 8.98610634,4.40232305 8.78124784,4.19746462 L8,3.416 L8,10.0020048 C8,10.5542895 7.55228475,11.0020048 7,11.0020048 C6.44771525,11.0020048 6,10.5542895 6,10.0020048 L6,3.41600475 L3.70710678,5.70911154 C3.34662282,6.0695955 2.77939176,6.09732503 2.38710056,5.79230014 L2.29289322,5.70911154 C1.90236893,5.31858724 1.90236893,4.68542227 2.29289322,4.29489797 L6.29289322,0.294897973 C6.54710458,0.0406866095 6.87413362,-0.0382890188 7.1738163,0.0164817914 C7.17680504,0.017663383 7.18016721,0.0182701498 7.18352681,0.0188942109 C7.21466801,0.0243205129 7.24513844,0.0316757544 7.2751983,0.0403969336 C7.28707112,0.0438108284 7.29913038,0.0474948597 7.31113021,0.0514117877 C7.32967787,0.0576595875 7.3480221,0.0642976875 7.3661634,0.0714485049 C7.37897252,0.0762161621 7.39150205,0.0814382908 7.40394259,0.086926426 L7.42761656,0.09800023 Z" id="Path-4-Copy"></path>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="111px" height="110px" viewBox="0 0 111 110" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>A981FD90-8ED5-4170-8C6A-8F4DFD0DCCD4</title>
<g id="Import-/-Export" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Mockup---Import-&amp;-Export-expandido-1300" transform="translate(-1139, -171)">
<g id="Left" transform="translate(310, 150)">
<g id="Import-to-PFMS" transform="translate(830, 21)">
<path d="M96.5504693,41.7233507 C94.7351964,43.2461384 92.3436805,44.5540779 89.7685032,45.2305518 C86.8831767,45.9928112 83.6424711,46.2007351 80.5574274,45.8004672 C74.7397823,45.0485944 69.5156105,41.4452213 66,38.0668907 C66.4011967,37.1320987 66.517111,36.7941502 66.9294683,35.8710912 C67.6216255,36.5794943 68.84832,37.5204413 69.3934306,37.8908959 C73.1678902,40.4690753 78.1018846,42.693534 84.636358,42.321733 C87.9453982,42.1436224 91.0169316,41.0180252 93.1946325,39.3002006 C95.3026282,37.6408486 97.0693424,35.2555903 97.0299864,31.9397715 C96.9884765,28.4291082 95.231944,25.5635668 93.3236655,23.6462815 C92.6659693,22.9867338 91.9579522,22.2821776 91.243082,21.7622717 C90.1088057,20.9401933 88.8519578,20.3035345 87.584145,19.7007283 C86.2981227,19.0809959 84.9760731,18.4562624 83.4415791,18.1333168 C85.9705473,16.5516718 92.7691565,14.6132287 93.5721372,15.0671606 C94.0726051,15.3472135 94.6165408,15.7963368 95.0371218,16.1298614 C96.4239817,17.2231448 97.6126908,18.7613201 98.6253745,20.1865894 C100.081156,22.2427471 101.310005,24.6237739 101.759564,27.3025492 C102.847436,33.9180299 100.091926,38.7624067 96.5504693,41.7233507 M56,31.5281854 L56,31.5201057 C59.0321566,26.6023345 62.5388416,22.1502293 66.696232,18.3726794 C69.565042,15.7617578 72.9417009,13.4296839 76.6837353,11.7382701 C77.3108865,11.446219 77.9213775,11.0877567 78.5987009,10.8609342 C79.2668324,10.6345059 79.9679013,10.4072893 80.6867794,10.1647016 C83.4196269,9.23731103 87.1846408,8.76711259 90.2037756,9.11434212 C92.4609456,9.37742465 94.7077748,10.0454769 96.2083418,11.2460003 C96.7148502,11.6472258 97.3236178,12.0860908 97.6522259,12.5667338 C97.840467,12.8445962 98.1053068,13.4866358 97.9563224,13.8693371 C97.7696133,14.3308647 97.0819491,14.3765839 96.5133958,14.3625923 C94.5758336,14.3251498 92.7968305,14.1121219 90.9218877,14.3480094 C88.2589365,14.6840062 86.0580665,15.4490147 84.1574631,16.2711723 C80.1412057,17.9887957 76.6946506,20.8235839 73.9775058,23.6826111 C71.2381475,26.5595713 68.7059884,30.1840012 66.6933596,33.9049932 C64.4484454,38.0467202 62.7561902,42.4156638 61.3555844,47 C58.1482084,42.6941174 56.1629636,37.3644792 56,31.5281854 M79.9999036,0 C63.4305627,0 50,13.4286926 50,29.9998072 C50,46.5684158 63.4305627,60 79.9999036,60 C96.5702085,60 110,46.5684158 110,29.9998072 C110,13.4286926 96.5702085,0 79.9999036,0" id="Fill-694" fill="#82B92E"></path>
<g id="Carpeta" transform="translate(0, 39)" fill="#FFFFFF" stroke="#C1CCDC" stroke-linejoin="round">
<path d="M39,14 C39,17.6235294 36.09125,20.5882353 32.5,20.5882353 L16.25,20.5882353 L6.5,20.5882353 C2.91005,20.5882353 0,23.5529412 0,27.1764706 L0,53.5294118 L0,63.4117647 C0,67.0352941 2.9101475,70 6.5,70 L71.5,70 C75.09125,70 78,67.0352941 78,63.4117647 L78,53.5294118 L78,20.5882353 C78,16.9647059 75.09125,14 71.5,14 L39,14 Z" id="Path"></path>
<path d="M6.5,0 C2.91005,0 0,2.95979444 0,6.61111111 L0,23.1388889 L32.5,23.1388889 L32.5,26.4444444 L78,26.4444444 L78,9.91666667 C78,6.26535 75.09125,3.30555556 71.5,3.30555556 L38.08675,3.30555556 C36.96225,1.33246944 34.905,0 32.5,0 L6.5,0 Z" id="Path"></path>
<path d="M38.950064,10.1111111 C38.950064,13.5725845 36.0450384,16.4046992 32.4583867,16.4046992 L16.2291933,16.4046992 L6.49167734,16.4046992 C2.90632394,16.4046992 0,19.2368138 0,22.6982872 L0,47.8726395 L0,59.0699703 C0,62.5314438 3.00629328,65.3333333 6.5915493,65.3333333 L71.5083227,65.3333333 C75.0949744,65.3333333 78,62.5012187 78,59.0397453 L77.900128,47.8726395 L77.900128,16.4046992 C77.900128,12.9432257 74.9951024,10.1111111 71.4084507,10.1111111 L38.950064,10.1111111 Z" id="Path"></path>
</g>
<g id="Group-2" transform="translate(11, 8.5)" stroke="#C1CCDC" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
<g id="Group-4">
<polygon id="Triangle" fill="#C1CCDC" transform="translate(31, 5) rotate(90) translate(-31, -5)" points="31 2.5 36 7.5 26 7.5"></polygon>
<path d="M0,39.5 C0,36.5833333 0,33.6666667 0,30.75 C-1.75851975e-15,16.3905965 11.6405965,4.75 26,4.75 L26,4.75 L26,4.75" id="Path-3" stroke-dasharray="2,4"></path>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

@ -52,9 +52,13 @@ if ((bool) is_ajax() === true) {
false,
false,
GENERIC_SIZE_TEXT,
'w40p',
'w90p',
),
)
),
[
'div_style' => 'display: flex; flex-direction: column; width: 50%',
'div_id' => 'resource_type',
],
);
}
@ -66,13 +70,17 @@ if ((bool) is_ajax() === true) {
$type = (string) get_parameter('type', '');
$value = (int) get_parameter('value', 0);
$name = (string) get_parameter('name', '');
$filename = (string) get_parameter('filename', '');
$data = $prd->exportPrd($type, $value, $name);
try {
$data = $prd->exportPrd($type, $value, $name);
} catch (\Exception $e) {
$data = '';
}
$return = [];
if (empty($data) === false) {
$filename = uniqid().'.prd';
$filename_download = date('YmdHis').'-'.$type.'-'.$name.'.prd';
$file = $config['attachment_store'].'/'.$filename;
@ -82,6 +90,7 @@ if ((bool) is_ajax() === true) {
if ($write === false) {
$return['error'] = -2;
unlink($config['attachment_store'].'/'.$filename);
} else {
$return['name'] = $filename;
$return['name_download'] = $filename_download;

File diff suppressed because it is too large Load Diff

View File

@ -107,7 +107,7 @@ class Tree
$userGroupsACL = users_get_groups(false, $this->access);
$this->userGroupsACL = empty($userGroupsACL) ? false : $userGroupsACL;
$this->userGroupsACL = empty($userGroupsACL) ? [0] : $userGroupsACL;
$this->userGroups = $this->userGroupsACL;
$this->userGroupsArray = array_keys($this->userGroups);

View File

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

View File

@ -4945,6 +4945,8 @@ function get_resume_agent_concat($id_agente, $all_groups, $agent)
// Optional data
// Position Information.
if ((bool) $config['activate_gis'] === true) {
include_once $config['homedir'].'/include/functions_gis.php';
$data = [];
$dataPositionAgent = gis_get_data_last_position_agent(

View File

@ -1266,7 +1266,7 @@ class Manager implements PublicLogin
}
if (empty($cells) === false) {
$result = array_reduce(
$result = array_values(array_reduce(
$cells,
function ($carry, $item) {
$carry[$item['order']]['id'] = $item['id'];
@ -1276,7 +1276,7 @@ class Manager implements PublicLogin
return $carry;
},
[]
);
));
}
echo json_encode($result);

View File

@ -10958,6 +10958,18 @@ div.status_dot {
-webkit-mask: url(../../images/status_dot.svg) no-repeat center / contain;
}
button div.import {
mask: url(../../images/import.svg) no-repeat center / contain;
-webkit-mask: url(../../images/import.svg) no-repeat center / contain;
height: 1.5rem;
}
button div.export {
mask: url(../../images/export.svg) no-repeat center / contain;
-webkit-mask: url(../../images/export.svg) no-repeat center / contain;
height: 1.5rem;
}
.status_dot.ok {
background-color: #82b92e;
}
@ -13628,4 +13640,71 @@ tr.shown td.details-control {
100% {
transform: rotate(360deg);
}
/* Import/export */
.div-import-export {
display: flex;
flex-direction: row;
}
.form-import {
width: 48%;
height: auto;
margin-right: 40px;
}
.div-import {
background-color: #ffffff;
border: 1px solid #e5e9ed;
border-radius: 8px;
width: 100%;
height: 180px;
display: flex;
flex-direction: row;
align-items: normal;
padding-top: 20px;
padding-left: 20px;
margin-bottom: 20px;
}
.div-export {
background-color: #ffffff;
border: 1px solid #e5e9ed;
border-radius: 8px;
width: 48%;
height: 180px;
display: flex;
flex-direction: row;
align-items: normal;
padding-top: 20px;
padding-left: 20px;
margin-bottom: 20px;
}
@media (max-width: 1300px) {
.div-import-export {
display: flex;
flex-direction: column;
}
.div-export {
width: calc(100% - 20px);
}
.form-import {
width: calc(100% - 20px);
}
}
.input-file-style::file-selector-button {
background-color: #ffffff;
border: 1px solid #979797;
border-radius: 4px;
width: 120px;
height: 32px;
}
button.disabled {
background: #c0ccdc !important;
border: 0px;
}

View File

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

View File

@ -116,9 +116,14 @@ if (empty($agent['os_version']) !== true) {
$agent['os_version'] = io_safe_output($agent['os_version']);
if (strpos($agent['os_version'], '(') !== false) {
$os_name = preg_split('/[0-9]|[\(]/', $agent['os_version'])[0];
$os_version = explode($os_name, explode('(', $agent['os_version'])[0])[1];
$os_version_name = preg_split('/[\(]|[\)]/', $agent['os_version']);
$os_agent_text = $os_version.' ('.$os_version_name[1].')';
if (strlen($os_name) === 0) {
$os_name = get_os_name((int) $agent['id_os']);
$os_agent_text = $agent['os_version'];
} else {
$os_version = explode($os_name, explode('(', $agent['os_version'])[0])[1];
$os_version_name = preg_split('/[\(]|[\)]/', $agent['os_version']);
$os_agent_text = $os_version.' ('.$os_version_name[1].')';
}
} else {
$os_name = preg_split('/[0-9]/', $agent['os_version'])[0];
$os_agent_text = $agent['os_version'];

View File

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

View File

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

View File

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

View File

@ -1,5 +1,5 @@
package: pandorafms-server
Version: 7.0NG.775-240213
Version: 7.0NG.775-240214
Architecture: all
Priority: optional
Section: admin

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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