From d3e815ce43de9bbc6372ea549a6d6cc78a3332a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Gonz=C3=A1lez?= Date: Mon, 12 Jul 2021 12:32:05 +0200 Subject: [PATCH] Fixed WUX widgets in meta --- pandora_console/include/functions_ui.php | 11 +++++++++-- .../include/lib/Dashboard/Widgets/wux_transaction.php | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index ecd985d5c3..8b5ee46724 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -5100,15 +5100,22 @@ function ui_print_agent_autocomplete_input($parameters) } '; } else if ($from_wux_transaction != '') { + if (is_metaconsole() === true) { + $inputNode = 'inputs.push ("server_id=" + $("#'.$input_id_server_id.'").val());'; + } else { + $inputNode = ''; + } + $javascript_code_function_select = ' function function_select_'.$input_name.'(agent_name) { $("#'.$selectbox_id.'").empty(); var inputs = []; inputs.push ("id_agent=" + $("#'.$hidden_input_idagent_id.'").val()); - inputs.push ("get_agent_transactions=1"); + inputs.push ("get_agent_transactions=1"); inputs.push ("page=enterprise/include/ajax/wux_transaction.ajax"); - + '.$inputNode.' + jQuery.ajax ({ data: inputs.join ("&"), type: "POST", diff --git a/pandora_console/include/lib/Dashboard/Widgets/wux_transaction.php b/pandora_console/include/lib/Dashboard/Widgets/wux_transaction.php index bf9deb3bcd..5026a240f5 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/wux_transaction.php +++ b/pandora_console/include/lib/Dashboard/Widgets/wux_transaction.php @@ -259,7 +259,7 @@ class WuxWidget extends Widget 'label' => __('Wux transaction'), 'arguments' => [ 'type' => 'autocomplete_module', - 'fields' => $fields, + 'fields' => [], 'name' => 'transactionId', 'selected' => $values['transactionId'], 'return' => true,