2013-02-01 Miguel de Dios <miguel.dedios@artica.es>

* godmode/reporting/reporting_builder.php,
	godmode/reporting/reporting_builder.item_editor.php,
	godmode/reporting/reporting_builder.list_items.php: fixed the
	autocomplete agent when edit or create a item for report that put
	the server name but now don't put anything.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7560 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2013-02-01 11:38:57 +00:00
parent 8b67d72b9d
commit d7515df8c6
4 changed files with 34 additions and 15 deletions

View File

@ -1,3 +1,11 @@
2013-02-01 Miguel de Dios <miguel.dedios@artica.es>
* godmode/reporting/reporting_builder.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/reporting_builder.list_items.php: fixed the
autocomplete agent when edit or create a item for report that put
the server name but now don't put anything.
2013-02-01 Junichi Satoh <junichi@rworks.jp>
* godmode/setup/setup.php: Fixed error without enterprise.

View File

@ -632,7 +632,7 @@ html_print_input_hidden('id_item', $idItem);
$params['show_helptip'] = false;
$params['input_name'] = 'agent';
// Input id is only used in metaconsole events
if($meta) {
if ($meta) {
$params['input_id'] = 'agent_autocomplete';
}
$params['value'] = $agent_name;
@ -642,9 +642,9 @@ html_print_input_hidden('id_item', $idItem);
$params['add_none_module'] = false;
$params['use_hidden_input_idagent'] = true;
$params['hidden_input_idagent_id'] = 'hidden-id_agent';
$params['use_input_server'] = true;
$params['input_server_id'] = 'hidden-server_name';
if ($meta) {
$params['use_input_server'] = true;
$params['input_server_id'] = 'hidden-server_name';
//It is a page in the new metaconsole.
$params['metaconsole_enabled'] = true;
}
@ -652,7 +652,7 @@ html_print_input_hidden('id_item', $idItem);
ui_print_agent_autocomplete_input($params);
// Print a specific control to metaconsole events
if($meta) {
if ($meta) {
$params['input_id'] = 'agent_autocomplete_events';
$params['javascript_page'] = 'enterprise/meta/include/ajax/events.ajax';
$params['javascript_is_function_select'] = false;

View File

@ -141,7 +141,11 @@ if (($agentFilter == 0) && ($moduleFilter == 0) && ($typeFilter == 0)) {
$urlFilter = '&agent_filter=' . $agentFilter . '&module_filter=' . $moduleFilter . '&type_filter=' . $typeFilter;
echo '<a href="javascript: toggleFormFilter();"><b>'.__('Items filter').'</b> ' . html_print_image("images/down.png", true, array("title" => __('Toggle filter(s)'), "id" => 'image_form_filter')) . '</a>';
echo '<a href="javascript: toggleFormFilter();"><b>' .
__('Items filter') . '</b> ' .
html_print_image("images/down.png", true,
array("title" => __('Toggle filter(s)'),
"id" => 'image_form_filter')) . '</a>';
$table = null;
$table->width = '100%';
@ -167,7 +171,8 @@ echo '</div>';
$where = '1=1';
if ($typeFilter != '0') {
if ($typeFilter == 'custom_graph')
$where .= ' AND (type = "' . $typeFilter . '" or type = "automatic_custom_graph") ';
$where .= ' AND (type = "' . $typeFilter . '"
OR type = "automatic_custom_graph") ';
else
$where .= ' AND type = "' . $typeFilter . '"';
}
@ -204,7 +209,10 @@ switch ($config["dbtype"]) {
$set = array();
$set['limit'] = $config["block_size"];
$set['offset'] = $offset;
$items = oracle_recode_query ('SELECT * FROM treport_content WHERE ' . $where . ' AND id_report = ' . $idReport . ' ORDER BY "order"', $set, 'AND', false);
$items = oracle_recode_query ('SELECT *
FROM treport_content
WHERE ' . $where . ' AND id_report = ' . $idReport . '
ORDER BY "order"', $set, 'AND', false);
// Delete rnum row generated by oracle_recode_query() function
if ($items !== false) {
for ($i=0; $i < count($items); $i++) {
@ -213,7 +221,9 @@ switch ($config["dbtype"]) {
}
break;
}
$countItems = db_get_sql('SELECT COUNT(id_rc) FROM treport_content WHERE ' . $where . ' AND id_report = ' . $idReport);
$countItems = db_get_sql('SELECT COUNT(id_rc)
FROM treport_content
WHERE ' . $where . ' AND id_report = ' . $idReport);
$table = null;
$table->style[0] = 'text-align: right;';

View File

@ -555,7 +555,8 @@ switch ($action) {
if ($reportName != "" && $idGroupReport != "") {
// This flag allow to differentiate between normal console and metaconsole reports
if (defined('METACONSOLE') and $config['metaconsole'] == 1)
if (defined('METACONSOLE') and
$config['metaconsole'] == 1)
$metaconsole_report = 1;
else
$metaconsole_report = 0;