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:
parent
8b67d72b9d
commit
d7515df8c6
|
@ -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.
|
||||
|
|
|
@ -627,12 +627,12 @@ html_print_input_hidden('id_item', $idItem);
|
|||
html_print_input_hidden('id_agent', $idAgent);
|
||||
html_print_input_hidden ('server_name', $server_name);
|
||||
|
||||
|
||||
|
||||
$params = array();
|
||||
$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,17 +652,17 @@ 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;
|
||||
//$params['use_hidden_input_idagent'] = false;
|
||||
$params['use_input_server'] = false;
|
||||
$params['input_name'] = 'agent_text';
|
||||
|
||||
|
||||
ui_print_agent_autocomplete_input($params);
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -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,8 +171,9 @@ echo '</div>';
|
|||
$where = '1=1';
|
||||
if ($typeFilter != '0') {
|
||||
if ($typeFilter == 'custom_graph')
|
||||
$where .= ' AND (type = "' . $typeFilter . '" or type = "automatic_custom_graph") ';
|
||||
else
|
||||
$where .= ' AND (type = "' . $typeFilter . '"
|
||||
OR type = "automatic_custom_graph") ';
|
||||
else
|
||||
$where .= ' AND type = "' . $typeFilter . '"';
|
||||
}
|
||||
if ($agentFilter != 0) {
|
||||
|
@ -180,10 +185,10 @@ if ($moduleFilter != 0) {
|
|||
|
||||
// Filter report items created from metaconsole in normal console list and the opposite
|
||||
if (defined('METACONSOLE') and $config['metaconsole'] == 1) {
|
||||
$where .= ' AND ((server_name IS NOT NULL AND length(server_name) != 0) OR type IN (\'general\',\'SLA\',\'exception\',\'top_n\'))';
|
||||
$where .= ' AND ((server_name IS NOT NULL AND length(server_name) != 0) OR type IN (\'general\',\'SLA\',\'exception\',\'top_n\'))';
|
||||
}
|
||||
else
|
||||
$where .= ' AND ((server_name IS NULL OR length(server_name) = 0) OR type IN (\'general\',\'SLA\',\'exception\',\'top_n\'))';
|
||||
$where .= ' AND ((server_name IS NULL OR length(server_name) = 0) OR type IN (\'general\',\'SLA\',\'exception\',\'top_n\'))';
|
||||
|
||||
switch ($config["dbtype"]) {
|
||||
case "mysql":
|
||||
|
@ -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;';
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue