#12964 fixed auto auth in public link dashboard

This commit is contained in:
Daniel Cebrian 2024-03-11 09:42:38 +01:00
parent 602ca64f2a
commit c8e04d3bdc
4 changed files with 9 additions and 3 deletions

View File

@ -1270,6 +1270,7 @@ class Heatmap
*/
public function showHeatmap()
{
global $config;
$result = $this->getData();
if (empty($result) === true) {
@ -1371,6 +1372,8 @@ class Heatmap
type: type,
id: id,
id_server: server,
auth_hash: '<?php echo $this->hash; ?>',
id_user: '<?php echo $config['id_user']; ?>'
},
dataType: 'html',
success: function(data) {

View File

@ -13722,7 +13722,7 @@ button.disabled {
border: 0px;
}
.ui-draggable-handle {
#graph_analytics .ui-draggable-handle {
z-index: 2 !important;
}

View File

@ -51,6 +51,8 @@ $height = get_parameter('height', 0);
$width = get_parameter('width', 0);
$search = get_parameter('search', '');
$filter = get_parameter('filter', []);
$hash = get_parameter('auth_hash', '');
if (is_array($filter) === false) {
$filter = explode(',', $filter);
}
@ -233,7 +235,7 @@ if ($is_ajax === false && $pure === true) {
// Control call flow.
try {
// Heatmap construct.
$heatmap = new Heatmap($type, $filter, $randomId, $refresh, $width, $height, $search, $group, $dashboard);
$heatmap = new Heatmap($type, $filter, $randomId, $refresh, $width, $height, $search, $group, $dashboard, $hash);
} catch (Exception $e) {
if (is_ajax() === true) {
echo json_encode(['error' => '[Heatmap]'.$e->getMessage() ]);
@ -261,7 +263,7 @@ if ($is_ajax === true) {
}
// Stop any execution.
exit;
return;
} else {
// Run.
$heatmap->run();

View File

@ -954,6 +954,7 @@ $filters_div = html_print_div(
$graphs_div = html_print_div(
[
'id' => 'graph_analytics',
'class' => 'padding-div graphs-div-main',
'content' => $right_content,
],