New design for tables - #3707
Former-commit-id: 923414d8bf98d6264e6cebc27706118e16710b70
This commit is contained in:
parent
5b0555e7cb
commit
845cb85c55
|
@ -378,7 +378,7 @@ function mainAgentsAlerts()
|
|||
'alerts_agents'
|
||||
);
|
||||
|
||||
echo '<table class="databox data" cellpadding="0" cellspacing="0" border="0" width=100%>';
|
||||
echo '<table class="info_table" cellpadding="0" cellspacing="0" border="0" width=100%>';
|
||||
echo "<th width='140px' >".__('Agents').' / '.__('Alert templates').'</th>';
|
||||
|
||||
if ($hor_offset > 0) {
|
||||
|
@ -478,6 +478,23 @@ function mainAgentsAlerts()
|
|||
}
|
||||
|
||||
echo '</table>';
|
||||
|
||||
ui_pagination(
|
||||
$nagents,
|
||||
false,
|
||||
0,
|
||||
0,
|
||||
false,
|
||||
'offset',
|
||||
true,
|
||||
'pagination-bottom',
|
||||
'',
|
||||
[
|
||||
'count' => '',
|
||||
'offset' => 'offset_param',
|
||||
],
|
||||
'alerts_agents'
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -66,10 +66,10 @@ function users_extension_main_god($god=true)
|
|||
$rows = [];
|
||||
echo "<div class='nf'>".__('No other users connected').'</div>';
|
||||
} else {
|
||||
$table->cellpadding = 4;
|
||||
$table->cellspacing = 4;
|
||||
$table->cellpadding = 0;
|
||||
$table->cellspacing = 0;
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
$table->size = [];
|
||||
$table->data = [];
|
||||
$table->head = [];
|
||||
|
|
|
@ -195,7 +195,9 @@ if (!empty($all_data)) {
|
|||
echo '<div id="activity">';
|
||||
|
||||
$table = new stdClass();
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
$table->cellpadding = 0;
|
||||
$table->cellspacing = 0;
|
||||
$table->width = '100%';
|
||||
// Don't specify px
|
||||
$table->data = [];
|
||||
|
|
|
@ -97,11 +97,22 @@ if ($delete_field) {
|
|||
}
|
||||
}
|
||||
|
||||
$fields = db_get_all_fields_in_table('tagent_custom_fields');
|
||||
// Prepare pagination.
|
||||
$offset = (int) get_parameter('offset');
|
||||
$limit = $config['block_size'];
|
||||
$count_fields = db_get_value('count(*)', 'tagent_custom_fields');
|
||||
|
||||
$fields = db_get_all_rows_filter(
|
||||
'tagent_custom_fields',
|
||||
[
|
||||
'limit' => $limit,
|
||||
'offset' => $offset,
|
||||
]
|
||||
);
|
||||
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
if ($fields) {
|
||||
$table->head = [];
|
||||
$table->head[0] = __('ID');
|
||||
|
@ -142,7 +153,9 @@ foreach ($fields as $field) {
|
|||
}
|
||||
|
||||
if ($fields) {
|
||||
ui_pagination($count_fields, false, $offset);
|
||||
html_print_table($table);
|
||||
ui_pagination($count_fields, false, $offset, 0, false, 'offset', true, 'pagination-bottom');
|
||||
}
|
||||
|
||||
echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configure_field">';
|
||||
|
|
|
@ -441,7 +441,7 @@ if (($config['dbtype'] == 'oracle') && ($agents !== false)) {
|
|||
ui_pagination($total_agents, "index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id=$ag_group&recursion=$recursion&search=$search&sort_field=$sortField&sort=$sort&disabled=$disabled&os=$os", $offset);
|
||||
|
||||
if ($agents !== false) {
|
||||
echo "<table cellpadding='4' id='agent_list' cellspacing='4' width='100%' class='databox data'>";
|
||||
echo "<table cellpadding='0' id='agent_list' cellspacing='0' width='100%' class='info_table'>";
|
||||
echo '<th>'.__('Agent name').' '.'<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search.'&os='.$os.'&offset='.$offset.'&sort_field=name&sort=up&disabled=$disabled">'.html_print_image('images/sort_up.png', true, ['style' => $selectNameUp]).'</a>'.'<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search.'&os='.$os.'&offset='.$offset.'&sort_field=name&sort=down&disabled=$disabled">'.html_print_image('images/sort_down.png', true, ['style' => $selectNameDown]).'</a>';
|
||||
echo '</th>';
|
||||
echo "<th title='".__('Remote agent configuration')."'>".__('R').' '.'<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search.'&os='.$os.'&offset='.$offset.'&sort_field=remote&sort=up&disabled=$disabled">'.html_print_image('images/sort_up.png', true, ['style' => $selectRemoteUp]).'</a>'.'<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search.'&os='.$os.'&offset='.$offset.'&sort_field=remote&sort=down&disabled=$disabled">'.html_print_image('images/sort_down.png', true, ['style' => $selectRemoteDown]).'</a>';
|
||||
|
@ -670,7 +670,7 @@ if ($agents !== false) {
|
|||
}
|
||||
|
||||
echo '</table>';
|
||||
ui_pagination($total_agents, "index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id=$ag_group&search=$search&sort_field=$sortField&sort=$sort&disabled=$disabled&os=$os", $offset);
|
||||
ui_pagination($total_agents, "index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id=$ag_group&search=$search&sort_field=$sortField&sort=$sort&disabled=$disabled&os=$os", $offset, 0, false, 'offset', true, 'pagination-bottom');
|
||||
echo "<table width='100%'><tr><td align='right'>";
|
||||
} else {
|
||||
ui_print_info_message(['no_close' => true, 'message' => __('There are no defined agents') ]);
|
||||
|
|
|
@ -393,7 +393,7 @@ else {
|
|||
|
||||
// View available downtimes present in database (if any of them)
|
||||
$table = new StdClass();
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
$table->width = '100%';
|
||||
$table->cellstyle = [];
|
||||
|
||||
|
@ -518,9 +518,9 @@ else {
|
|||
}
|
||||
|
||||
html_print_table($table);
|
||||
ui_pagination($downtimes_number, "index.php?sec=estado&sec2=godmode/agentes/planned_downtime.list&$filter_params_str", $offset, 0, false, 'offset', true, 'pagination-bottom');
|
||||
echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
||||
|
||||
echo '<br>';
|
||||
// CSV export button
|
||||
echo '<div style="display: inline;">';
|
||||
html_print_button(
|
||||
|
|
|
@ -36,7 +36,9 @@ if (empty($event_responses)) {
|
|||
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
$table->cellpadding = 0;
|
||||
$table->cellspacing = 0;
|
||||
|
||||
$table->size = [];
|
||||
$table->size[0] = '200px';
|
||||
|
|
|
@ -212,14 +212,11 @@ if ($delete_group) {
|
|||
}
|
||||
}
|
||||
|
||||
// Prepare pagination.
|
||||
$total_groups = db_get_num_rows('SELECT * FROM tmodule_group');
|
||||
|
||||
$url = ui_get_url_refresh(['offset' => false]);
|
||||
|
||||
$offset = (int) get_parameter('offset', 0);
|
||||
|
||||
ui_pagination($total_groups, $url, $offset);
|
||||
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM tmodule_group
|
||||
|
@ -230,7 +227,7 @@ $groups = db_get_all_rows_sql($sql);
|
|||
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
|
||||
if (!empty($groups)) {
|
||||
$table->head = [];
|
||||
|
@ -257,7 +254,9 @@ if (!empty($groups)) {
|
|||
array_push($table->data, $data);
|
||||
}
|
||||
|
||||
ui_pagination($total_groups, $url, $offset);
|
||||
html_print_table($table);
|
||||
ui_pagination($total_groups, $url, $offset, 0, false, 'offset', true, 'pagination-bottom');
|
||||
} else {
|
||||
ui_print_info_message(
|
||||
[
|
||||
|
|
|
@ -159,7 +159,9 @@ ui_pagination(count($graphs));
|
|||
if (!empty($graphs)) {
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
$table->cellpadding = 0;
|
||||
$table->cellspacing = 0;
|
||||
$table->align = [];
|
||||
$table->head = [];
|
||||
$table->head[0] = __('Graph name');
|
||||
|
@ -213,6 +215,7 @@ if (!empty($graphs)) {
|
|||
echo "<form method='post' style='' action='index.php?sec=reporting&sec2=godmode/reporting/graphs'>";
|
||||
html_print_input_hidden('multiple_delete', 1);
|
||||
html_print_table($table);
|
||||
ui_pagination(count($graphs), false, 0, 0, false, 'offset', true, 'pagination-bottom');
|
||||
echo "<div style='float: right;'>";
|
||||
html_print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete"');
|
||||
echo '</div>';
|
||||
|
@ -228,7 +231,6 @@ if (!empty($graphs)) {
|
|||
}
|
||||
|
||||
echo '</div>';
|
||||
ui_pagination(count($graphs));
|
||||
} else {
|
||||
include_once $config['homedir'].'/general/firts_task/custom_graphs.php';
|
||||
}
|
||||
|
|
|
@ -327,7 +327,9 @@ echo '</tr></table>';
|
|||
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
$table->cellpadding = 0;
|
||||
$table->cellspacing = 0;
|
||||
$table->data = [];
|
||||
$table->head = [];
|
||||
$table->head[0] = __('Map name');
|
||||
|
@ -462,6 +464,7 @@ if (!$maps && !is_metaconsole()) {
|
|||
}
|
||||
|
||||
html_print_table($table);
|
||||
ui_pagination($total_maps, $url, $offset, $pagination, false, 'offset', true, 'pagination-bottom');
|
||||
}
|
||||
|
||||
if ($maps) {
|
||||
|
|
|
@ -646,7 +646,7 @@ switch ($action) {
|
|||
$table = new stdClass();
|
||||
$table->id = 'report_list';
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
$table->cellpadding = 0;
|
||||
$table->cellspacing = 0;
|
||||
|
||||
|
@ -887,6 +887,7 @@ switch ($action) {
|
|||
}
|
||||
|
||||
html_print_table($table);
|
||||
ui_pagination($total_reports, $url, $offset, $pagination, false, 'offset', true, 'pagination-bottom');
|
||||
} else {
|
||||
ui_print_info_message([ 'no_close' => true, 'message' => __('No data found.') ]);
|
||||
}
|
||||
|
|
|
@ -40,7 +40,9 @@ if ($servers === false) {
|
|||
|
||||
$table = new StdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
$table->cellpadding = 0;
|
||||
$table->cellspacing = 0;
|
||||
$table->size = [];
|
||||
|
||||
$table->style = [];
|
||||
|
|
|
@ -758,9 +758,9 @@ if (check_login()) {
|
|||
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->cellpadding = 4;
|
||||
$table->cellspacing = 4;
|
||||
$table->class = 'databox data';
|
||||
$table->cellpadding = 0;
|
||||
$table->cellspacing = 0;
|
||||
$table->class = 'info_table';
|
||||
$table->head = [];
|
||||
$table->data = [];
|
||||
|
||||
|
@ -1199,7 +1199,7 @@ if (check_login()) {
|
|||
false,
|
||||
'offset',
|
||||
true,
|
||||
'',
|
||||
'pagination-bottom',
|
||||
'pagination_list_modules(offset_param)',
|
||||
[
|
||||
'count' => '',
|
||||
|
|
|
@ -1884,7 +1884,7 @@ function ui_pagination(
|
|||
if ($print_total_items) {
|
||||
$output = "<div class='pagination $other_class' $set_id>";
|
||||
// Show the count of items
|
||||
$output .= sprintf(__('Total items: %s'), $count);
|
||||
$output .= '<div class="total_pages">'.sprintf(__('Total items: %s'), $count).'</div>';
|
||||
// End div and layout
|
||||
$output .= '</div>';
|
||||
|
||||
|
@ -1910,10 +1910,11 @@ function ui_pagination(
|
|||
|
||||
// Show the count of items
|
||||
if ($print_total_items) {
|
||||
$output .= sprintf(__('Total items: %s'), $count);
|
||||
$output .= '<br>';
|
||||
$output .= '<div class="total_pages">'.sprintf(__('Total items: %s'), $count).'</div>';
|
||||
}
|
||||
|
||||
$output .= "<div class='total_number'>";
|
||||
|
||||
// Show GOTO FIRST PAGE button
|
||||
if ($number_of_pages > $block_limit) {
|
||||
if (!empty($script)) {
|
||||
|
@ -1929,10 +1930,10 @@ function ui_pagination(
|
|||
$script_modified
|
||||
);
|
||||
|
||||
$output .= "<a class='pagination $other_class offset_0'
|
||||
href='javascript: $script_modified;'>".html_print_image('images/go_first.png', true, ['class' => 'bot']).'</a> ';
|
||||
$output .= "<a class='pagination-arrows $other_class offset_0'
|
||||
href='javascript: $script_modified;'>".html_print_image('images/go_first.png', true, ['class' => 'bot']).'</a>';
|
||||
} else {
|
||||
$output .= "<a class='pagination $other_class offset_0' href='$url&$offset_name=0'>".html_print_image('images/go_first.png', true, ['class' => 'bot']).'</a> ';
|
||||
$output .= "<a class='pagination-arrows $other_class offset_0' href='$url&$offset_name=0'>".html_print_image('images/go_first.png', true, ['class' => 'bot']).'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1958,10 +1959,10 @@ function ui_pagination(
|
|||
$script_modified
|
||||
);
|
||||
|
||||
$output .= "<a class='pagination $other_class offset_$offset_previous_page'
|
||||
$output .= "<a class='pagination-arrows $other_class offset_$offset_previous_page'
|
||||
href='javacript: $script_modified;'>".html_print_image('images/go_previous.png', true, ['class' => 'bot']).'</a>';
|
||||
} else {
|
||||
$output .= "<a class='pagination $other_class offset_$offset_previous_page' href='$url&$offset_name=$offset_previous_page'>".html_print_image('images/go_previous.png', true, ['class' => 'bot']).'</a>';
|
||||
$output .= "<a class='pagination-arrows $other_class offset_$offset_previous_page' href='$url&$offset_name=$offset_previous_page'>".html_print_image('images/go_previous.png', true, ['class' => 'bot']).'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1970,9 +1971,9 @@ function ui_pagination(
|
|||
$actual_page = (int) ($offset / $pagination);
|
||||
|
||||
if ($iterator == $actual_page) {
|
||||
$output .= "<span style='font-weight: bold;'>";
|
||||
$output .= "<div class='page_number page_number_active'>";
|
||||
} else {
|
||||
$output .= '<span>';
|
||||
$output .= "<div class='page_number'>";
|
||||
}
|
||||
|
||||
$offset_page = ($iterator * $pagination);
|
||||
|
@ -1990,15 +1991,15 @@ function ui_pagination(
|
|||
$script_modified
|
||||
);
|
||||
|
||||
$output .= "<a class='pagination $other_class offset_$offset_page'
|
||||
$output .= "<a class='offset_$offset_page'
|
||||
href='javascript: $script_modified;'>";
|
||||
} else {
|
||||
$output .= "<a class='pagination $other_class offset_$offset_page' href='$url&$offset_name=$offset_page'>";
|
||||
$output .= "<a class='offset_$offset_page' href='$url&$offset_name=$offset_page'>";
|
||||
}
|
||||
|
||||
$output .= "[ $iterator ]";
|
||||
$output .= $iterator;
|
||||
|
||||
$output .= '</a></span>';
|
||||
$output .= '</a></div>';
|
||||
}
|
||||
|
||||
// Show NEXT PAGE GROUP OF PAGES
|
||||
|
@ -2023,10 +2024,10 @@ function ui_pagination(
|
|||
$script_modified
|
||||
);
|
||||
|
||||
$output .= "<a class='pagination $other_class offset_$offset_next_page'
|
||||
$output .= "<a class='pagination-arrows $other_class offset_$offset_next_page'
|
||||
href='javascript: $script_modified;'>".html_print_image('images/go_next.png', true, ['class' => 'bot']).'</a>';
|
||||
} else {
|
||||
$output .= "<a class='pagination $other_class offset_$offset_next_page' href='$url&$offset_name=$offset_next_page'>".html_print_image('images/go_next.png', true, ['class' => 'bot']).'</a>';
|
||||
$output .= "<a class='pagination-arrows $other_class offset_$offset_next_page' href='$url&$offset_name=$offset_next_page'>".html_print_image('images/go_next.png', true, ['class' => 'bot']).'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2047,13 +2048,15 @@ function ui_pagination(
|
|||
$script_modified
|
||||
);
|
||||
|
||||
$output .= "<a class='pagination $other_class offset_$offset_lastpage'
|
||||
$output .= "<a class='pagination-arrows $other_class offset_$offset_lastpage'
|
||||
href='javascript: $script_modified;'>".html_print_image('images/go_last.png', true, ['class' => 'bot']).'</a>';
|
||||
} else {
|
||||
$output .= "<a class='pagination $other_class offset_$offset_lastpage' href='$url&$offset_name=$offset_lastpage'>".html_print_image('images/go_last.png', true, ['class' => 'bot']).'</a>';
|
||||
$output .= "<a class='pagination-arrows $other_class offset_$offset_lastpage' href='$url&$offset_name=$offset_lastpage'>".html_print_image('images/go_last.png', true, ['class' => 'bot']).'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
$output .= '</div>';
|
||||
// total_number
|
||||
// End div and layout
|
||||
$output .= '</div>';
|
||||
|
||||
|
|
|
@ -5006,3 +5006,170 @@ select#autorefresh_list:-internal-list-box {
|
|||
.table_three_columns .table_td {
|
||||
width: 33%;
|
||||
}
|
||||
|
||||
/*
|
||||
* ---------------------------------------------------------------------
|
||||
* - TABLES TO SHOW INFORMATION
|
||||
* ---------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
table.info_table {
|
||||
background-color: #fff;
|
||||
/* margin-bottom: 20px;*/
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
table.info_table tr:nth-child(even) {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
table.info_table tr:first-child > th {
|
||||
background-color: #373737;
|
||||
color: #fff;
|
||||
/*font-size: 9pt;*/
|
||||
}
|
||||
|
||||
table.info_table tr:first-child > th span {
|
||||
/*font-size: 9pt;*/
|
||||
}
|
||||
|
||||
table.info_table th {
|
||||
color: #fff;
|
||||
background-color: #666;
|
||||
font-size: 7.5pt;
|
||||
letter-spacing: 0.3pt;
|
||||
}
|
||||
|
||||
table.info_table > thead > tr:first-child > th:last-child {
|
||||
border-right: 1px solid #373737;
|
||||
border-top-right-radius: 4px;
|
||||
}
|
||||
|
||||
table.info_table > thead > tr:first-child > th:first-child {
|
||||
border-left: 1px solid #373737;
|
||||
border-top-left-radius: 4px;
|
||||
}
|
||||
|
||||
table.info_table > thead > tr > th,
|
||||
table.info_table > tbody > tr > th,
|
||||
table.info_table > thead > tr > th a {
|
||||
padding: 9px 7px;
|
||||
font-weight: normal;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
table.info_table > tbody > tr > td {
|
||||
-moz-border-radius: 0px;
|
||||
-webkit-border-radius: 0px;
|
||||
border-radius: 0px;
|
||||
border: none;
|
||||
/*padding: 9px 7px;*/
|
||||
padding-left: 9px;
|
||||
padding-right: 9px;
|
||||
padding-top: 7px;
|
||||
padding-bottom: 7px;
|
||||
border-bottom: 1px solid #e2e2e2;
|
||||
}
|
||||
|
||||
table.info_table > tbody > tr:last-child > td:first-child {
|
||||
border-bottom-left-radius: 4px;
|
||||
}
|
||||
|
||||
table.info_table > tbody > tr > td:first-child {
|
||||
border-left: 1px solid #e2e2e2;
|
||||
}
|
||||
|
||||
table.info_table > tbody > tr:last-child > td:last-child {
|
||||
border-bottom-right-radius: 4px;
|
||||
}
|
||||
|
||||
table.info_table > tbody > tr > td:last-child {
|
||||
border-right: 1px solid #e2e2e2;
|
||||
}
|
||||
|
||||
table.info_table > tbody > tr > td > img,
|
||||
table.info_table > thead > tr > th > img,
|
||||
table.info_table > tbody > tr > td > div > a > img,
|
||||
table.info_table > tbody > tr > td > span > img,
|
||||
table.info_table > tbody > tr > td > span > a > img,
|
||||
table.info_table > tbody > tr > td > a > img,
|
||||
table.info_table > tbody > tr > td > form > a > img {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
table.info_table > tbody > tr:hover {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
table.info_table td:last-child img {
|
||||
border-radius: 4px;
|
||||
/* border: 2px solid #dcdcdc !important;*/
|
||||
/* padding: 2px;*/
|
||||
border: 1px solid #dcdcdc !important;
|
||||
padding: 1px;
|
||||
box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.pagination {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-end;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.pagination .page_number {
|
||||
border: 1px solid #cacaca;
|
||||
border-right: 0px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.pagination .page_number a {
|
||||
padding: 5px;
|
||||
width: 12px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.pagination .total_number > *:first-child {
|
||||
border-top-left-radius: 2px;
|
||||
border-bottom-left-radius: 2px;
|
||||
}
|
||||
|
||||
.pagination .total_number > *:last-child {
|
||||
border-top-right-radius: 2px;
|
||||
border-bottom-right-radius: 2px;
|
||||
border-right: 1px solid #cacaca !important;
|
||||
}
|
||||
|
||||
.pagination .page_number_active {
|
||||
font-weight: bold;
|
||||
background-color: #82b92e;
|
||||
color: #fff;
|
||||
border-color: #82b92e;
|
||||
}
|
||||
|
||||
.pagination .page_number_active a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.pagination .total_pages {
|
||||
}
|
||||
|
||||
.pagination .total_number {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.pagination a {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.pagination .pagination-arrows {
|
||||
border: 1px solid #cacaca;
|
||||
border-right: 0px;
|
||||
}
|
||||
|
||||
.pagination-bottom {
|
||||
margin-bottom: 15px;
|
||||
margin-top: 10px;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
|
|
@ -442,7 +442,7 @@ if ($print_agent) {
|
|||
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
$table->cellpadding = '0';
|
||||
$table->cellspacing = '0';
|
||||
$table->size = [];
|
||||
|
@ -608,6 +608,16 @@ if (!empty($table->data)) {
|
|||
'offset_simple'
|
||||
);
|
||||
html_print_table($table);
|
||||
ui_pagination(
|
||||
$countAlertsSimple,
|
||||
$url,
|
||||
$offset_simple,
|
||||
0,
|
||||
false,
|
||||
'offset_simple',
|
||||
true,
|
||||
'pagination-bottom'
|
||||
);
|
||||
|
||||
if (!is_metaconsole()) {
|
||||
if (check_acl($config['id_user'], $id_group, 'AW') || check_acl($config['id_user'], $id_group, 'LM')) {
|
||||
|
|
|
@ -631,7 +631,7 @@ $table = new stdClass();
|
|||
$table->cellpadding = 0;
|
||||
$table->cellspacing = 0;
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
|
||||
$table->head = [];
|
||||
$table->head[0] = __('Agent').' '.'<a href="index.php?sec=view&sec2=operation/agentes/estado_agente&refr='.$refr.'&offset='.$offset.'&group_id='.$group_id.'&recursion='.$recursion.'&search='.$search.'&status='.$status.'&sort_field=name&sort=up">'.html_print_image('images/sort_up.png', true, ['style' => $selectNameUp, 'alt' => 'up']).'</a>'.'<a href="index.php?sec=view&sec2=operation/agentes/estado_agente&refr='.$refr.'&offset='.$offset.'&group_id='.$group_id.'&recursion='.$recursion.'&search='.$search.'&status='.$status.'&sort_field=name&sort=down">'.html_print_image('images/sort_down.png', true, ['style' => $selectNameDown, 'alt' => 'down']).'</a>';
|
||||
|
@ -795,14 +795,6 @@ foreach ($agents as $agent) {
|
|||
|
||||
if (!empty($table->data)) {
|
||||
html_print_table($table);
|
||||
if (check_acl($config['id_user'], 0, 'AW') || check_acl($config['id_user'], 0, 'AM')) {
|
||||
echo '<div style="text-align: right; float: right;">';
|
||||
echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente">';
|
||||
html_print_input_hidden('new_agent', 1);
|
||||
html_print_submit_button(__('Create agent'), 'crt', false, 'class="sub next"');
|
||||
echo '</form>';
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
ui_pagination(
|
||||
$total_agents,
|
||||
|
@ -819,8 +811,19 @@ if (!empty($table->data)) {
|
|||
0,
|
||||
false,
|
||||
'offset',
|
||||
false
|
||||
true,
|
||||
'pagination-bottom'
|
||||
);
|
||||
|
||||
if (check_acl($config['id_user'], 0, 'AW') || check_acl($config['id_user'], 0, 'AM')) {
|
||||
echo '<div style="text-align: right; float: right;">';
|
||||
echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente">';
|
||||
html_print_input_hidden('new_agent', 1);
|
||||
html_print_submit_button(__('Create agent'), 'crt', false, 'class="sub next"');
|
||||
echo '</form>';
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
unset($table);
|
||||
} else {
|
||||
ui_print_info_message([ 'no_close' => true, 'message' => __('There are no defined agents') ]);
|
||||
|
|
|
@ -612,7 +612,9 @@ switch ($tab) {
|
|||
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
$table->cellpadding = 0;
|
||||
$table->cellspacing = 0;
|
||||
$table->headstyle['copy'] = 'text-align: center;';
|
||||
$table->headstyle['edit'] = 'text-align: center;';
|
||||
|
||||
|
@ -657,11 +659,24 @@ switch ($tab) {
|
|||
|
||||
$id_groups = array_keys(users_get_groups());
|
||||
|
||||
$network_maps = db_get_all_rows_filter(
|
||||
// Prepare pagination.
|
||||
$offset = (int) get_parameter('offset');
|
||||
$limit = $config['block_size'];
|
||||
$count_maps = db_get_value_filter(
|
||||
'count(*)',
|
||||
'tmap',
|
||||
['id_group' => $id_groups]
|
||||
);
|
||||
|
||||
$network_maps = db_get_all_rows_filter(
|
||||
'tmap',
|
||||
[
|
||||
'id_group' => $id_groups,
|
||||
'limit' => $limit,
|
||||
'offset' => $offset,
|
||||
]
|
||||
);
|
||||
|
||||
if ($network_maps !== false) {
|
||||
$table->data = [];
|
||||
|
||||
|
@ -732,7 +747,9 @@ switch ($tab) {
|
|||
$table->data[] = $data;
|
||||
}
|
||||
|
||||
ui_pagination($count_maps, false, $offset);
|
||||
html_print_table($table);
|
||||
ui_pagination($count_maps, false, 0, 0, false, 'offset', true, 'pagination-bottom');
|
||||
} else {
|
||||
ui_print_info_message(['no_close' => true, 'message' => __('There are no maps defined.') ]);
|
||||
}
|
||||
|
@ -756,4 +773,3 @@ switch ($tab) {
|
|||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -987,7 +987,7 @@ if ($autosearch) {
|
|||
if ($result === false) {
|
||||
$result = [];
|
||||
} else {
|
||||
ui_pagination($count, false, $offset);
|
||||
ui_pagination($count, false, $offset, 0, false, 'offset', true);
|
||||
}
|
||||
} else {
|
||||
// For each server defined and not disabled:
|
||||
|
@ -1073,7 +1073,7 @@ if (!empty($result)) {
|
|||
$table->cellpadding = 0;
|
||||
$table->cellspacing = 0;
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
$table->head = [];
|
||||
$table->data = [];
|
||||
$table->size = [];
|
||||
|
@ -1659,6 +1659,8 @@ if (!empty($result)) {
|
|||
}
|
||||
|
||||
html_print_table($table);
|
||||
|
||||
ui_pagination($count, false, $offset, 0, false, 'offset', true, 'pagination-bottom');
|
||||
} else {
|
||||
if ($first_interaction) {
|
||||
ui_print_info_message(['no_close' => true, 'message' => __('This group doesn\'t have any monitor')]);
|
||||
|
|
|
@ -929,6 +929,13 @@ if ($group_rep == 2) {
|
|||
}
|
||||
|
||||
html_print_table($table);
|
||||
if ($allow_pagination) {
|
||||
$params_to_paginate = $params;
|
||||
unset($params_to_paginate['offset']);
|
||||
$url_paginate = 'index.php?'.http_build_query($params_to_paginate, '', '&');
|
||||
ui_pagination($total_events, $url_paginate, $offset, $pagination, false, 'offset', true, 'pagination-bottom');
|
||||
}
|
||||
|
||||
echo '</div>';
|
||||
|
||||
if ($allow_action) {
|
||||
|
|
|
@ -76,10 +76,10 @@ if ($servers === false) {
|
|||
}
|
||||
|
||||
$table = new StdClass();
|
||||
$table->cellpadding = 4;
|
||||
$table->cellspacing = 4;
|
||||
$table->cellpadding = 0;
|
||||
$table->cellspacing = 0;
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
$table->head = [];
|
||||
$table->data = [];
|
||||
$table->align = [];
|
||||
|
|
Loading…
Reference in New Issue