Fixed the 'inventory' and 'inventory_changes' items in metaconsole reports. TICKET: #2249
This commit is contained in:
parent
22ce2d8902
commit
2f23441516
|
@ -2425,11 +2425,11 @@ function chooseType() {
|
|||
$("#row_module_multi").show();
|
||||
$("#row_show_in_two_columns").show();
|
||||
$("#row_servers").show();
|
||||
$("#id_agents").change(agent_changed_by_multiple_agents_inventory);
|
||||
$("#id_agents").change(event_change_id_agent_inventory);
|
||||
$("#id_agents").trigger('change');
|
||||
|
||||
$("#combo_group").change(function() {
|
||||
updateAgents($(this).val());
|
||||
updateAgents($(this).val(), <?php echo '"' . ui_get_full_url(false, false, false, false) . '"'; ?>);
|
||||
});
|
||||
|
||||
break;
|
||||
|
@ -2441,27 +2441,27 @@ function chooseType() {
|
|||
$("#row_date").show();
|
||||
$("#row_show_in_two_columns").show();
|
||||
|
||||
$("#id_agents").change(agent_changed_by_multiple_agents_inventory);
|
||||
$("#id_agents").change(event_change_id_agent_inventory);
|
||||
$("#id_agents").trigger('change');
|
||||
|
||||
$("#row_servers").show();
|
||||
|
||||
$("#combo_group").change(function() {
|
||||
$('#hidden-date_selected').val('');
|
||||
updateInventoryDates();
|
||||
updateAgents($(this).val());
|
||||
updateInventoryDates(<?php echo '"' . ui_get_full_url(false, false, false, false) . '"'; ?>);
|
||||
updateAgents($(this).val(), <?php echo '"' . ui_get_full_url(false, false, false, false) . '"'; ?>);
|
||||
});
|
||||
$("#id_agents").change(function() {
|
||||
$('#hidden-date_selected').val('');
|
||||
updateInventoryDates();
|
||||
updateInventoryDates(<?php echo '"' . ui_get_full_url(false, false, false, false) . '"'; ?>);
|
||||
});
|
||||
$("#inventory_modules").change(function() {
|
||||
$('#hidden-date_selected').val('');
|
||||
updateInventoryDates();
|
||||
updateInventoryDates(<?php echo '"' . ui_get_full_url(false, false, false, false) . '"'; ?>);
|
||||
});
|
||||
|
||||
if (!$("#hidden-date_selected").val())
|
||||
updateInventoryDates();
|
||||
updateInventoryDates(<?php echo '"' . ui_get_full_url(false, false, false, false) . '"'; ?>);
|
||||
break;
|
||||
case 'inventory_changes':
|
||||
break;
|
||||
|
@ -2514,6 +2514,14 @@ function chooseType() {
|
|||
}
|
||||
}
|
||||
|
||||
function event_change_id_agent_inventory() {
|
||||
agent_changed_by_multiple_agents_inventory(
|
||||
{"data" : {"homedir" : <?php echo '"' . ui_get_full_url(false, false, false, false) . '"'; ?>}},
|
||||
null,
|
||||
null,
|
||||
$("#combo_server").val());
|
||||
}
|
||||
|
||||
function set_last_value_period() {
|
||||
var checked = $("input[name='last_value']").prop("checked");
|
||||
|
||||
|
|
|
@ -1445,6 +1445,14 @@ function reporting_inventory_changes($report, $content) {
|
|||
$content['name'] = __('Inventory Changes');
|
||||
}
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
$id_meta = metaconsole_get_id_server($content["server_name"]);
|
||||
|
||||
|
||||
$server = metaconsole_get_connection_by_id ($id_meta);
|
||||
metaconsole_connect($server);
|
||||
}
|
||||
|
||||
$return['title'] = $content['name'];
|
||||
$return['subtitle'] = agents_get_name($content['id_agent']);
|
||||
$return["description"] = $content["description"];
|
||||
|
@ -1471,6 +1479,10 @@ function reporting_inventory_changes($report, $content) {
|
|||
$return['data'] = $inventory_changes;
|
||||
}
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
metaconsole_restore_db();
|
||||
}
|
||||
|
||||
return reporting_check_structure_content($return);
|
||||
}
|
||||
|
||||
|
@ -1485,6 +1497,14 @@ function reporting_inventory($report, $content) {
|
|||
$content['name'] = __('Inventory');
|
||||
}
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
$id_meta = metaconsole_get_id_server($content["server_name"]);
|
||||
|
||||
|
||||
$server = metaconsole_get_connection_by_id ($id_meta);
|
||||
metaconsole_connect($server);
|
||||
}
|
||||
|
||||
$return['title'] = $content['name'];
|
||||
$return["description"] = $content["description"];
|
||||
$return["date"] = reporting_get_date_text($report, $content);
|
||||
|
@ -1510,6 +1530,10 @@ function reporting_inventory($report, $content) {
|
|||
$return['data'] = $inventory_data;
|
||||
}
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
metaconsole_restore_db();
|
||||
}
|
||||
|
||||
return reporting_check_structure_content($return);
|
||||
}
|
||||
|
||||
|
@ -1606,6 +1630,10 @@ function reporting_agent_module($report, $content) {
|
|||
}
|
||||
}
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
metaconsole_restore_db();
|
||||
}
|
||||
|
||||
return reporting_check_structure_content($return);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue