Merge branch 'ent-7442-Metaconsole-Dashboard-WUX-Transaction-Stats-no-encuentra-trans' into 'develop'
Ent 7442 metaconsole dashboard wux transaction stats no encuentra trans Closes pandora_enterprise#7442 See merge request artica/pandorafms!4295
This commit is contained in:
commit
604ef4bc89
|
@ -5047,11 +5047,7 @@ function ui_print_agent_autocomplete_input($parameters)
|
|||
$metaconsole_enabled = $parameters['metaconsole_enabled'];
|
||||
} else {
|
||||
// If metaconsole_enabled param is not setted then pick source configuration.
|
||||
if (defined('METACONSOLE')) {
|
||||
$metaconsole_enabled = true;
|
||||
} else {
|
||||
$metaconsole_enabled = false;
|
||||
}
|
||||
$metaconsole_enabled = is_metaconsole();
|
||||
}
|
||||
|
||||
$get_only_string_modules = false;
|
||||
|
@ -5161,15 +5157,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",
|
||||
|
@ -5457,14 +5460,11 @@ function ui_print_agent_autocomplete_input($parameters)
|
|||
server_name = ui.item.ip;
|
||||
}
|
||||
|
||||
|
||||
if (('.((int) $use_input_id_server).')
|
||||
|| ('.((int) $print_input_id_server).')) {
|
||||
server_id = ui.item.id_server;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//Put the name
|
||||
$(this).val(agent_name);
|
||||
|
||||
|
|
|
@ -169,6 +169,11 @@ function pandoraFlotPieCustom(
|
|||
var label_conf;
|
||||
var show_legend = true;
|
||||
|
||||
// Set default value if not come like a number.
|
||||
if (isNaN(width) === true) {
|
||||
width = 451;
|
||||
}
|
||||
|
||||
if (width <= 450) {
|
||||
show_legend = false;
|
||||
label_conf = {
|
||||
|
@ -222,6 +227,9 @@ function pandoraFlotPieCustom(
|
|||
conf_pie.series.pie.label = { show: false };
|
||||
}
|
||||
|
||||
// Avoid issues with 0 width values.
|
||||
$("#" + graph_id).width(width);
|
||||
|
||||
var plot = $.plot($("#" + graph_id), data, conf_pie);
|
||||
if (no_data == data.length) {
|
||||
$("#" + graph_id + " .overlay").remove();
|
||||
|
|
|
@ -809,6 +809,7 @@ function dashboardLoadWuxStats(settings) {
|
|||
page: settings.page,
|
||||
wux_transaction_stats: 1,
|
||||
id_agent: settings.id_agent,
|
||||
server_id: settings.server_id,
|
||||
transaction: settings.transaction,
|
||||
view_all_stats: settings.view_all_stats,
|
||||
auth_class: settings.auth_class,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -270,7 +270,7 @@ class WuxStatsWidget extends Widget
|
|||
'label' => __('Wux transaction'),
|
||||
'arguments' => [
|
||||
'type' => 'autocomplete_module',
|
||||
'fields' => $fields,
|
||||
'fields' => [],
|
||||
'name' => 'transactionId',
|
||||
'selected' => $values['transactionId'],
|
||||
'return' => true,
|
||||
|
@ -326,6 +326,7 @@ class WuxStatsWidget extends Widget
|
|||
{
|
||||
global $config;
|
||||
|
||||
$server_id = ($this->values['node'] ?? '0');
|
||||
$id_agent = $this->values['agentId'];
|
||||
$transaction = $this->values['transactionId'];
|
||||
$view_all_stats = $this->values['allStats'];
|
||||
|
@ -340,6 +341,7 @@ class WuxStatsWidget extends Widget
|
|||
false
|
||||
),
|
||||
'page' => 'enterprise/include/ajax/wux_transaction.ajax',
|
||||
'server_id' => $server_id,
|
||||
'id_agent' => $id_agent,
|
||||
'transaction' => $transaction,
|
||||
'view_all_stats' => $view_all_stats,
|
||||
|
|
Loading…
Reference in New Issue