mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-04-08 18:55:09 +02:00
2012-11-27 Sergio Martin <sergio.martin@artica.es>
* include/functions_networkmap.php: Performance improvements in networkmaps git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7189 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
d94883c1eb
commit
af6087e37d
pandora_console
godmode/reporting
operation/reporting
@ -212,12 +212,6 @@ $table = null;
|
||||
|
||||
$table->style[0] = 'text-align: right;';
|
||||
|
||||
// Build link for sort actions: metaconsole and normal console
|
||||
$variable_link = ui_get_full_url(false);
|
||||
// Metaconsole
|
||||
if ($config['metaconsole'] == 1 and defined('METACONSOLE'))
|
||||
$variable_link .= '/enterprise/meta/';
|
||||
|
||||
if ($items) {
|
||||
$table->width = '100%';
|
||||
|
||||
@ -231,19 +225,19 @@ if ($items) {
|
||||
$table->head[0] = '<span title="' . __('Position') . '">' . __('P.') . '</span>';
|
||||
$table->head[1] = __('Type');
|
||||
if (!$filterEnable) {
|
||||
$table->head[1] .= ' <a onclick="return message_check_sort_items();" href="' . $variable_link . 'index.php?sec=reporting&sec2=' . $config['homedir'] . '/godmode/reporting/reporting_builder&tab=list_items&action=order&dir=up&field=type&id_report=' . $idReport . $urlFilter . '">' . html_print_image("images/sort_up.png", true, array("title" => __('Ascendent'))) . '</a>' .
|
||||
'<a onclick="return message_check_sort_items();" href="' . $variable_link . 'index.php?sec=reporting&sec2=' . $config['homedir'] . '/godmode/reporting/reporting_builder&tab=list_items&action=order&dir=down&field=type&id_report=' . $idReport . $urlFilter . '">' . html_print_image("images/sort_down.png", true, array("title" => __('Descent'))) . '</a>';
|
||||
$table->head[1] .= ' <a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=' . $config['homedir'] . '/godmode/reporting/reporting_builder&tab=list_items&action=order&dir=up&field=type&id_report=' . $idReport . $urlFilter . '">' . html_print_image("images/sort_up.png", true, array("title" => __('Ascendent'))) . '</a>' .
|
||||
'<a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=' . $config['homedir'] . '/godmode/reporting/reporting_builder&tab=list_items&action=order&dir=down&field=type&id_report=' . $idReport . $urlFilter . '">' . html_print_image("images/sort_down.png", true, array("title" => __('Descent'))) . '</a>';
|
||||
}
|
||||
$table->head[2] = __('Agent');
|
||||
if (!$filterEnable) {
|
||||
$table->head[2] .= ' <a onclick="return message_check_sort_items();" href="' . $variable_link . 'index.php?sec=reporting&sec2=' . $config['homedir'] . '/godmode/reporting/reporting_builder&tab=list_items&action=order&dir=up&field=agent&id_report=' . $idReport . $urlFilter . '">' . html_print_image("images/sort_up.png", true, array("title" => __('Ascendent'))) . '</a>' .
|
||||
'<a onclick="return message_check_sort_items();" href="' . $variable_link . 'index.php?sec=reporting&sec2=' . $config['homedir'] . '/godmode/reporting/reporting_builder&tab=list_items&action=order&dir=down&field=agent&id_report=' . $idReport . $urlFilter . '">' . html_print_image("images/sort_down.png", true, array("title" => __('Descent'))) . '</a>';
|
||||
$table->head[2] .= ' <a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=' . $config['homedir'] . '/godmode/reporting/reporting_builder&tab=list_items&action=order&dir=up&field=agent&id_report=' . $idReport . $urlFilter . '">' . html_print_image("images/sort_up.png", true, array("title" => __('Ascendent'))) . '</a>' .
|
||||
'<a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=' . $config['homedir'] . '/godmode/reporting/reporting_builder&tab=list_items&action=order&dir=down&field=agent&id_report=' . $idReport . $urlFilter . '">' . html_print_image("images/sort_down.png", true, array("title" => __('Descent'))) . '</a>';
|
||||
}
|
||||
$table->head[3] = __('Module');
|
||||
|
||||
if (!$filterEnable) {
|
||||
$table->head[3] .= ' <a onclick="return message_check_sort_items();" href="' . $variable_link . 'index.php?sec=reporting&sec2=' . $config['homedir'] . '/godmode/reporting/reporting_builder&tab=list_items&action=order&dir=up&field=module&id_report=' . $idReport . $urlFilter . '">' . html_print_image("images/sort_up.png", true, array("title" => __('Ascendent'))) . '</a>' .
|
||||
'<a onclick="return message_check_sort_items();" href="' . $variable_link . 'index.php?sec=reporting&sec2=' . $config['homedir'] . '/godmode/reporting/reporting_builder&tab=list_items&action=order&dir=down&field=module&id_report=' . $idReport . $urlFilter . '">' . html_print_image("images/sort_down.png", true, array("title" => __('Descent'))) . '</a>';
|
||||
$table->head[3] .= ' <a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=' . $config['homedir'] . '/godmode/reporting/reporting_builder&tab=list_items&action=order&dir=up&field=module&id_report=' . $idReport . $urlFilter . '">' . html_print_image("images/sort_up.png", true, array("title" => __('Ascendent'))) . '</a>' .
|
||||
'<a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=' . $config['homedir'] . '/godmode/reporting/reporting_builder&tab=list_items&action=order&dir=down&field=module&id_report=' . $idReport . $urlFilter . '">' . html_print_image("images/sort_down.png", true, array("title" => __('Descent'))) . '</a>';
|
||||
}
|
||||
$table->head[4] = __('Period');
|
||||
$table->head[5] = __('Description');
|
||||
@ -341,9 +335,9 @@ foreach ($items as $item) {
|
||||
|
||||
$row[6] = '';
|
||||
|
||||
$row[6] .= '<a href="' . $variable_link . 'index.php?sec=reporting&sec2=' . $config['homedir'] . '/godmode/reporting/reporting_builder&tab=item_editor&action=edit&id_report=' . $idReport . '&id_item=' . $item['id_rc'] . '">' . html_print_image("images/wrench_orange.png", true, array("title" => __('Edit'))) . '</a>';
|
||||
$row[6] .= '<a href="index.php?sec=reporting&sec2=' . $config['homedir'] . '/godmode/reporting/reporting_builder&tab=item_editor&action=edit&id_report=' . $idReport . '&id_item=' . $item['id_rc'] . '">' . html_print_image("images/wrench_orange.png", true, array("title" => __('Edit'))) . '</a>';
|
||||
$row[6] .= ' ';
|
||||
$row[6] .= '<a onClick="if (!confirm (\'Are you sure?\')) return false;" href="' . $variable_link . 'index.php?sec=reporting&sec2=' . $config['homedir'] . '/godmode/reporting/reporting_builder&tab=list_items&action=delete&id_report=' . $idReport . '&id_item=' . $item['id_rc'] . $urlFilter . '">' . html_print_image("images/cross.png", true, array("title" => __('Delete'))) .'</a>';
|
||||
$row[6] .= '<a onClick="if (!confirm (\'Are you sure?\')) return false;" href="index.php?sec=reporting&sec2=' . $config['homedir'] . '/godmode/reporting/reporting_builder&tab=list_items&action=delete&id_report=' . $idReport . '&id_item=' . $item['id_rc'] . $urlFilter . '">' . html_print_image("images/cross.png", true, array("title" => __('Delete'))) .'</a>';
|
||||
$row[6] .= html_print_checkbox_extended ('delete_multiple[]', $item['id_rc'], false, false, '', 'class="check_delete"', true);
|
||||
|
||||
$row[7] = '';
|
||||
@ -358,11 +352,11 @@ foreach ($items as $item) {
|
||||
metaconsole_restore_db();
|
||||
}
|
||||
}
|
||||
ui_pagination ($countItems, $variable_link . 'index.php?sec=reporting&sec2=' . $config['homedir'] . '/godmode/reporting/reporting_builder&tab=list_items&action=edit&id_report=' . $idReport . $urlFilter);
|
||||
ui_pagination ($countItems, 'index.php?sec=reporting&sec2=' . $config['homedir'] . '/godmode/reporting/reporting_builder&tab=list_items&action=edit&id_report=' . $idReport . $urlFilter);
|
||||
html_print_table($table);
|
||||
ui_pagination ($countItems, $variable_link . 'index.php?sec=reporting&sec2=' . $config['homedir'] . '/godmode/reporting/reporting_builder&tab=list_items&action=edit&id_report=' . $idReport . $urlFilter);
|
||||
ui_pagination ($countItems, 'index.php?sec=reporting&sec2=' . $config['homedir'] . '/godmode/reporting/reporting_builder&tab=list_items&action=edit&id_report=' . $idReport . $urlFilter);
|
||||
|
||||
echo "<form action='" . $variable_link . "index.php?sec=reporting&sec2=" . $config['homedir'] . "/godmode/reporting/reporting_builder&tab=list_items&action=delete_items&id_report=" . $idReport . "'
|
||||
echo "<form action='index.php?sec=reporting&sec2=" . $config['homedir'] . "/godmode/reporting/reporting_builder&tab=list_items&action=delete_items&id_report=" . $idReport . "'
|
||||
method='post' onSubmit='return added_ids_deleted_items_to_hidden_input();'>";
|
||||
echo "<div style='padding-bottom: 20px; text-align: right; width:100%'>";
|
||||
html_print_input_hidden('ids_items_to_delete', '');
|
||||
@ -388,7 +382,7 @@ $table->data[1][2] = html_print_input_text_extended('position_to_sort', 1,
|
||||
$table->data[1][2] .= html_print_input_hidden('ids_items_to_sort', '', true);
|
||||
$table->data[1][3] = html_print_submit_button(__('Sort'), 'sort_submit', false, 'class="sub upd"', true);
|
||||
|
||||
echo "<form action='" . $variable_link . "index.php?sec=reporting&sec2=" . $config['homedir'] . "/godmode/reporting/reporting_builder&tab=list_items&action=sort_items&id_report=" . $idReport . "'
|
||||
echo "<form action='index.php?sec=reporting&sec2=" . $config['homedir'] . "/godmode/reporting/reporting_builder&tab=list_items&action=sort_items&id_report=" . $idReport . "'
|
||||
method='post' onsubmit='return added_ids_sorted_items_to_hidden_input();'>";
|
||||
html_print_table($table);
|
||||
echo "</form>";
|
||||
@ -411,7 +405,7 @@ $table->data[1][2] = html_print_input_text_extended('position_to_delete', 1,
|
||||
$table->data[1][2] .= html_print_input_hidden('ids_items_to_delete', '', true);
|
||||
$table->data[1][3] = html_print_submit_button(__('Delete'), 'delete_submit', false, 'class="sub upd"', true);
|
||||
|
||||
echo "<form action='" . $variable_link . "index.php?sec=reporting&sec2=" . $config['homedir'] . "/godmode/reporting/reporting_builder&tab=list_items&action=delete_items_pos&id_report=" . $idReport . "'
|
||||
echo "<form action='index.php?sec=reporting&sec2=" . $config['homedir'] . "/godmode/reporting/reporting_builder&tab=list_items&action=delete_items_pos&id_report=" . $idReport . "'
|
||||
method='post'>";
|
||||
html_print_table($table);
|
||||
echo "</form>";
|
||||
|
@ -231,7 +231,7 @@ switch ($action) {
|
||||
case 'list':
|
||||
$buttons = array(
|
||||
'list_reports' => array('active' => false,
|
||||
'text' => '<a href="index.php?sec=reporting&sec2=' . $config['homedir'] . '/godmode/reporting/reporting_builder">' .
|
||||
'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder">' .
|
||||
html_print_image("images/god6.png", true, array ("title" => __('Main'))) .'</a>')
|
||||
);
|
||||
|
||||
@ -255,7 +255,7 @@ switch ($action) {
|
||||
// Bread crumbs
|
||||
ui_meta_add_breadcrumb(
|
||||
array(
|
||||
'link' => 'index.php?sec=reporting&sec2=' . $config['homedir'] . '/godmode/reporting/reporting_builder',
|
||||
'link' => 'index.php?sec=reporting&sec2=godmode/reporting/reporting_builder',
|
||||
'text' => __('Reporting')));
|
||||
|
||||
ui_meta_print_page_header($nav_bar);
|
||||
@ -298,7 +298,7 @@ switch ($action) {
|
||||
|
||||
$table_aux->data[0][6] = html_print_submit_button(__('Search'), 'search_submit', false, 'class="sub upd"', true);
|
||||
|
||||
echo "<form action='index.php?sec=reporting&sec2=" . $config['homedir'] . "/godmode/reporting/reporting_builder&id_group='.$id_group'
|
||||
echo "<form action='index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&id_group='.$id_group'
|
||||
method='post'>";
|
||||
html_print_table($table_aux);
|
||||
echo "</form>";
|
||||
@ -392,7 +392,7 @@ switch ($action) {
|
||||
$data = array ();
|
||||
|
||||
if (check_acl ($config["id_user"], $report["id_group"], "AW")) {
|
||||
$data[0] = '<a href="' . $config['homeurl'] . 'index.php?sec=reporting&sec2=' . $config['homedir'] . '/godmode/reporting/reporting_builder&action=edit&id_report='.
|
||||
$data[0] = '<a href="' . $config['homeurl'] . 'index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&action=edit&id_report='.
|
||||
$report['id_report'].'">'.$report['name'].'</a>';
|
||||
}
|
||||
else {
|
||||
@ -402,7 +402,7 @@ switch ($action) {
|
||||
|
||||
$data[1] = $report['description'];
|
||||
|
||||
$data[2] = '<a href="' . $config['homeurl'] . 'index.php?sec=reporting&sec2=' . $config['homedir'] . '/operation/reporting/reporting_viewer&id='.$report['id_report'].'">' .
|
||||
$data[2] = '<a href="' . $config['homeurl'] . 'index.php?sec=reporting&sec2=operation/reporting/reporting_viewer&id='.$report['id_report'].'">' .
|
||||
html_print_image("images/reporting.png", true) . '</a>';
|
||||
$data[3] = '<a href="'. ui_get_full_url(false, false, false, false) . 'ajax.php?page=' . $config['homedir'] . '/operation/reporting/reporting_xml&id='.$report['id_report'].'">' . html_print_image("images/database_lightning.png", true) . '</a>'; //I chose ajax.php because it's supposed to give XML anyway
|
||||
|
||||
@ -443,7 +443,7 @@ switch ($action) {
|
||||
}
|
||||
|
||||
if ($edit) {
|
||||
$data[$next] = '<form method="post" action="index.php?sec=reporting&sec2=' . $config['homedir'] . '/godmode/reporting/reporting_builder&action=edit" style="display:inline">';
|
||||
$data[$next] = '<form method="post" action="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&action=edit" style="display:inline">';
|
||||
$data[$next] .= html_print_input_hidden ('id_report', $report['id_report'], true);
|
||||
$data[$next] .= html_print_input_image ('edit', 'images/config.png', 1, '', true, array ('title' => __('Edit')));
|
||||
$data[$next] .= '</form>';
|
||||
@ -468,7 +468,7 @@ switch ($action) {
|
||||
|
||||
|
||||
if (check_acl ($config['id_user'], 0, "IW")) {
|
||||
echo '<form method="post" action="index.php?sec=reporting&sec2=' . $config['homedir'] . '/godmode/reporting/reporting_builder&tab=main&action=new">';
|
||||
echo '<form method="post" action="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=main&action=new">';
|
||||
echo '<div class="action-buttons" style="width: 98%;">';
|
||||
html_print_submit_button (__('Create report'), 'create', false, 'class="sub next"');
|
||||
echo "</div>";
|
||||
@ -1299,13 +1299,13 @@ if ($enterpriseEnable) {
|
||||
|
||||
$buttons = array(
|
||||
'main' => array('active' => false,
|
||||
'text' => '<a href="index.php?sec=reporting&sec2=' . $config['homedir'] . '/godmode/reporting/reporting_builder&tab=main&action=edit&id_report=' . $idReport . '">' .
|
||||
'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=main&action=edit&id_report=' . $idReport . '">' .
|
||||
html_print_image("images/reporting_edit.png", true, array ("title" => __('Main'))) .'</a>'),
|
||||
'list_items' => array('active' => false,
|
||||
'text' => '<a href="index.php?sec=reporting&sec2=' . $config['homedir'] . '/godmode/reporting/reporting_builder&tab=list_items&action=edit&id_report=' . $idReport . '">' .
|
||||
'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=edit&id_report=' . $idReport . '">' .
|
||||
html_print_image("images/god6.png", true, array ("title" => __('List items'))) .'</a>'),
|
||||
'item_editor' => array('active' => false,
|
||||
'text' => '<a href="index.php?sec=reporting&sec2=' . $config['homedir'] . '/godmode/reporting/reporting_builder&tab=item_editor&action=new&id_report=' . $idReport . '">' .
|
||||
'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=item_editor&action=new&id_report=' . $idReport . '">' .
|
||||
html_print_image("images/config.png", true, array ("title" => __('Item editor'))) .'</a>')
|
||||
);
|
||||
|
||||
@ -1314,7 +1314,7 @@ if ($enterpriseEnable) {
|
||||
}
|
||||
|
||||
$buttons['view'] = array('active' => false,
|
||||
'text' => '<a href="index.php?sec=reporting&sec2=' . $config['homedir'] . '/operation/reporting/reporting_viewer&id=' . $idReport . '">' .
|
||||
'text' => '<a href="index.php?sec=reporting&sec2=operation/reporting/reporting_viewer&id=' . $idReport . '">' .
|
||||
html_print_image("images/reporting.png", true, array ("title" => __('View report'))) .'</a>');
|
||||
|
||||
$buttons[$activeTab]['active'] = true;
|
||||
@ -1333,7 +1333,7 @@ else {
|
||||
// Page header for metaconsole
|
||||
if ($enterpriseEnable and defined('METACONSOLE')) {
|
||||
// Bread crumbs
|
||||
ui_meta_add_breadcrumb(array('link' => 'index.php?sec=reporting&sec2=' . $config['homedir'] . '/godmode/reporting/reporting_builder', 'text' => __('Reporting')));
|
||||
ui_meta_add_breadcrumb(array('link' => 'index.php?sec=reporting&sec2=godmode/reporting/reporting_builder', 'text' => __('Reporting')));
|
||||
|
||||
ui_meta_print_page_header($nav_bar);
|
||||
|
||||
|
@ -67,13 +67,10 @@ $enable_init_date = get_parameter('enable_init_date', 0);
|
||||
|
||||
// Build link for sort actions: metaconsole and normal console
|
||||
$variable_link = ui_get_full_url(false);
|
||||
// Metaconsole
|
||||
if ($config['metaconsole'] == 1 and defined('METACONSOLE'))
|
||||
$variable_link .= '/enterprise/meta/';
|
||||
|
||||
$url = $variable_link . "index.php?sec=reporting&sec2=" . $config['homedir'] . "/operation/reporting/reporting_viewer&id=$id_report&date=$date&time=$time";
|
||||
$url = $variable_link . "index.php?sec=reporting&sec2=operation/reporting/reporting_viewer&id=$id_report&date=$date&time=$time";
|
||||
|
||||
$options['setup'] = "<a href='" . $variable_link . "index.php?sec=reporting&sec2=" . $config['homedir'] . "/godmode/reporting/reporting_builder&action=new&tab=item_editor&id_report=$id_report'>"
|
||||
$options['setup'] = "<a href='index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&action=new&tab=item_editor&id_report=$id_report'>"
|
||||
. html_print_image ("images/setup.png", true, array ("title" => __('Setup')))
|
||||
. "</a>";
|
||||
|
||||
@ -91,7 +88,7 @@ else {
|
||||
// Page header for metaconsole
|
||||
if ($config['metaconsole'] == 1 and defined('METACONSOLE')) {
|
||||
// Bread crumbs
|
||||
ui_meta_add_breadcrumb(array('link' => 'index.php?sec=reporting&sec2=' . $config['homedir'] . '/godmode/reporting/reporting_builder', 'text' => __('Reporting')));
|
||||
ui_meta_add_breadcrumb(array('link' => 'index.php?sec=reporting&sec2=godmode/reporting/reporting_builder', 'text' => __('Reporting')));
|
||||
|
||||
ui_meta_print_page_header($nav_bar);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user