Merge branch 'ent-3707-Nuevo-diseño-para-las-tablas' into 'develop'

Ent 3707 nuevo diseño para las tablas

See merge request artica/pandorafms!2352

Former-commit-id: 684daf476bf288e294b67f97fc80fdf6a6ddcce4
This commit is contained in:
Alejandro Fraguas 2019-04-17 10:19:42 +02:00
commit 6594095de7
72 changed files with 1427 additions and 659 deletions

View File

@ -378,7 +378,8 @@ 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 '<thead><tr>';
echo "<th width='140px' >".__('Agents').' / '.__('Alert templates').'</th>';
if ($hor_offset > 0) {
@ -421,9 +422,10 @@ function mainAgentsAlerts()
continue;
}
echo '<th width="20px" >'.io_safe_output($tname).html_print_image('images/information_alerts.png', true, ['title' => io_safe_output($tname), 'style' => 'margin-left:5px' ]).'</th>';
echo '<th width="20px" >'.io_safe_output($tname).'</th>';
}
echo '</tr></thead>';
if (($hor_offset + $block) < $ntemplates) {
$new_hor_offset = ($hor_offset + $block);
echo "<th width='20px' style='' rowspan='".($nagents + 1)."'>
@ -455,7 +457,7 @@ function mainAgentsAlerts()
$cellstyle = 'background:'.COL_ALERTFIRED.';';
}
echo '<td style=";'.$cellstyle.'"> ';
echo '<td style=";'.$cellstyle.'" class="action_buttons"> ';
$uniqid = uniqid();
echo '<div>';
@ -478,6 +480,23 @@ function mainAgentsAlerts()
}
echo '</table>';
ui_pagination(
$nagents,
false,
0,
0,
false,
'offset',
true,
'pagination-bottom',
'',
[
'count' => '',
'offset' => 'offset_param',
],
'alerts_agents'
);
}
}
@ -487,7 +506,7 @@ function mainAgentsAlerts()
function print_alerts_summary_modal_window($id, $alerts)
{
$table->width = '98%';
$table->class = 'databox';
$table->class = 'info_table';
$table->data = [];
$table->head[0] = __('Module');

View File

@ -45,11 +45,9 @@ if (!empty($files)) {
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox data';
$table->class = 'info_table';
$table->style = [];
$table->style[1] = 'max-width: 200px;';
$table->style[2] = 'text-align: center;';
$table->style[3] = 'text-align: center;';
$table->style[4] = 'text-align: center;';
$table->head = [];
$table->head[0] = __('Name');
@ -81,6 +79,7 @@ if (!empty($files)) {
// Last modification
// Public URL
$data[4] = '';
$table->cellclass[][4] = 'action_buttons';
if (!empty($file['hash'])) {
$public_url = ui_get_full_url(EXTENSIONS_DIR.'/files_repo/files_repo_get_file.php?file='.$file['hash']);
$message = __('Copy to clipboard').': Ctrl+C -> Enter';
@ -92,7 +91,7 @@ if (!empty($files)) {
}
$data[4] .= "<a href=\"$url\" target=\"_blank\">";
$data[4] .= html_print_image('images/download.png', true, ['title' => __('Download')]);
$data[4] .= html_print_image('images/download.png', true, ['title' => __('Download'), 'style' => 'padding:3px' ]);
// Download image
$data[4] .= '</a>';

View File

@ -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 = [];

View File

@ -284,7 +284,7 @@ if ($config['menu_type'] == 'classic') {
$header_support .= '</a></div>';
// Documentation.
$header_docu = '<div id="header_support">';
$header_docu = '<div id="header_docu">';
$header_docu .= '<a href="https://wiki.pandorafms.com/index.php?title=Main_Page" target="_blank">';
$header_docu .= html_print_image('/images/header_docu.png', true, ['title' => __('Go to documentation'), 'class' => 'bot', 'alt' => 'user']);
$header_docu .= '</a></div>';

View File

@ -272,7 +272,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 = [];

View File

@ -183,10 +183,10 @@ if (empty($result)) {
}
$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->size = [];
$table->data = [];
$table->head = [];
@ -246,7 +246,18 @@ foreach ($result as $row) {
}
}
foreach ($table->rowclass as $key => $value) {
if (strpos($value, 'limit_scroll') !== false) {
$table->colspan[$key] = [7];
} else {
if ($enterprise_include !== ENTERPRISE_NOT_HOOK) {
$table->cellclass[$key][6] = 'action_buttons';
}
}
}
html_print_table($table);
ui_pagination($count, $url, 0, 0, false, 'offset', true, 'pagination-bottom');
if ($enterprise_include !== ENTERPRISE_NOT_HOOK) {
enterprise_hook('enterpriseAuditFooter');

View File

@ -225,7 +225,7 @@ if ($result === false) {
$table->width = '100%';
$table->cellpadding = 0;
$table->cellspacing = 0;
$table->class = 'databox data';
$table->class = 'info_table';
$table->head = [];
$table->data = [];
$table->align = [];
@ -253,9 +253,9 @@ foreach ($result as $row) {
$data[2] = mb_substr($row['descripcion'], 0, 60);
$data[3] = '<a href="index.php?sec=gagente&tab=module&sec2=godmode/agentes/configurar_agente&tab=template&id_agente='.$id_agente.'&delete_module='.$row['id_agente_modulo'].'">'.html_print_image('images/cross.png', true, ['border' => '0', 'alt' => __('Delete'), 'onclick' => "if (!confirm('".__('Are you sure?')."')) return false;"]).'</a>&nbsp;&nbsp;';
$data[3] .= '&nbsp;&nbsp;<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module&edit_module=1&id_agent_module='.$row['id_agente_modulo'].'">'.html_print_image('images/config.png', true, ['border' => '0', 'alt' => __('Update')]).'</a>';
$table->cellclass[][3] = 'action_buttons';
$data[3] = '<a href="index.php?sec=gagente&tab=module&sec2=godmode/agentes/configurar_agente&tab=template&id_agente='.$id_agente.'&delete_module='.$row['id_agente_modulo'].'">'.html_print_image('images/cross.png', true, ['border' => '0', 'alt' => __('Delete'), 'onclick' => "if (!confirm('".__('Are you sure?')."')) return false;"]).'</a>';
$data[3] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module&edit_module=1&id_agent_module='.$row['id_agente_modulo'].'">'.html_print_image('images/config.png', true, ['border' => '0', 'alt' => __('Update')]).'</a>';
array_push($table->data, $data);
}

View File

@ -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');
@ -135,14 +146,17 @@ foreach ($fields as $field) {
$data[2] = html_print_image('images/icono_stop.png', true, ['style' => 'width:21px;height:21px;']);
}
$table->cellclass[][3] = 'action_buttons';
$data[3] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configure_field&id_field='.$field['id_field'].'">'.html_print_image('images/config.png', true, ['alt' => __('Edit'), 'title' => __('Edit'), 'border' => '0']).'</a>';
$data[3] .= '&nbsp;&nbsp;<a href="index.php?sec=gagente&sec2=godmode/agentes/fields_manager&delete_field=1&id_field='.$field['id_field'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['alt' => __('Delete'), 'title' => __('Delete'), 'border' => '0']).'</a>';
$data[3] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/fields_manager&delete_field=1&id_field='.$field['id_field'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['alt' => __('Delete'), 'title' => __('Delete'), 'border' => '0']).'</a>';
array_push($table->data, $data);
}
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">';

View File

@ -224,13 +224,13 @@ switch ($config['dbtype']) {
break;
}
$selected = 'border: 1px solid black;';
$selectNameUp = '';
$selectNameDown = '';
$selectOsUp = '';
$selectOsDown = '';
$selectGroupUp = '';
$selectGroupDown = '';
$selected = true;
$selectNameUp = false;
$selectNameDown = false;
$selectOsUp = false;
$selectOsDown = false;
$selectGroupUp = false;
$selectGroupDown = false;
switch ($sortField) {
case 'remote':
switch ($sort) {
@ -441,18 +441,27 @@ 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 '<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>';
echo '</th>';
echo '<th>'.__('OS').' '.'<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=os&sort=up&disabled=$disabled">'.html_print_image('images/sort_up.png', true, ['style' => $selectOsUp]).'</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=os&sort=down&disabled=$disabled">'.html_print_image('images/sort_down.png', true, ['style' => $selectOsDown]).'</a>';
echo '</th>';
// Urls to sort the table.
$url_up_agente = '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';
$url_down_agente = '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';
$url_up_remote = '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';
$url_down_remote = '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';
$url_up_os = 'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search.'&os='.$os.'&offset='.$offset.'&sort_field=os&sort=up&disabled=$disabled';
$url_down_os = 'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search.'&os='.$os.'&offset='.$offset.'&sort_field=os&sort=down&disabled=$disabled';
$url_up_group = 'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search.'&os='.$os.'&offset='.$offset.'&sort_field=group&sort=up&disabled=$disabled';
$url_down_group = 'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search.'&os='.$os.'&offset='.$offset.'&sort_field=group&sort=down&disabled=$disabled';
echo "<table cellpadding='0' id='agent_list' cellspacing='0' width='100%' class='info_table'>";
echo '<thead><tr>';
echo '<th>'.__('Agent name').ui_get_sorting_arrows($url_up_agente, $url_down_agente, $selectNameUp, $selectNameDown).'</th>';
echo "<th title='".__('Remote agent configuration')."'>".__('R').ui_get_sorting_arrows($url_up_remote, $url_down_remote, $selectRemoteUp, $selectRemoteDown).'</th>';
echo '<th>'.__('OS').ui_get_sorting_arrows($url_up_os, $url_down_os, $selectOsUp, $selectOsDown).'</th>';
echo '<th>'.__('Type').'</th>';
echo '<th>'.__('Group').' '.'<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=group&sort=up&disabled=$disabled">'.html_print_image('images/sort_up.png', true, ['style' => $selectGroupUp]).'</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=group&sort=down&disabled=$disabled">'.html_print_image('images/sort_down.png', true, ['style' => $selectGroupDown]).'</a>';
echo '</th>';
echo '<th>'.__('Group').ui_get_sorting_arrows($url_up_group, $url_down_group, $selectGroupUp, $selectGroupDown).'</th>';
echo '<th>'.__('Description').'</th>';
echo "<th style='text-align:left'>".__('Actions').'</th>';
echo '</tr></thead>';
$color = 1;
$rowPair = true;
@ -628,7 +637,7 @@ if ($agents !== false) {
$offsetArg = $offset;
}
echo "<td class='$tdcolor' align='left' style='width:7%' valign='middle'>";
echo "<td class='$tdcolor action_buttons' align='left' style='width:7%' valign='middle'>";
if ($agent['disabled']) {
echo "<a href='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&
@ -654,7 +663,7 @@ if ($agents !== false) {
}
if ($check_aw) {
echo "&nbsp;&nbsp;<a href='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&
echo "<a href='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&
borrar_agente=".$agent['id_agente']."&group_id=$ag_group&recursion=$recursion&search=$search&offset=$offsetArg&sort_field=$sortField&sort=$sort&disabled=$disabled'";
if ($agent['id_os'] != 100) {
@ -670,7 +679,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') ]);

View File

@ -358,17 +358,17 @@ if ($multiple_delete) {
// TABLE LIST MODULES
// ==================
$url = 'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=module&id_agente='.$id_agente;
$selectNameUp = '';
$selectNameDown = '';
$selectServerUp = '';
$selectServerDown = '';
$selectTypeUp = '';
$selectTypeDown = '';
$selectIntervalUp = '';
$selectIntervalDown = '';
$selectNameUp = false;
$selectNameDown = false;
$selectServerUp = false;
$selectServerDown = false;
$selectTypeUp = false;
$selectTypeDown = false;
$selectIntervalUp = false;
$selectIntervalDown = false;
$sortField = get_parameter('sort_field');
$sort = get_parameter('sort', 'none');
$selected = '';
$selected = true;
$order[] = [
'field' => 'tmodule_group.name',
@ -482,13 +482,13 @@ switch ($sortField) {
default:
$selectNameUp = $selected;
$selectNameDown = '';
$selectServerUp = '';
$selectServerDown = '';
$selectTypeUp = '';
$selectTypeDown = '';
$selectIntervalUp = '';
$selectIntervalDown = '';
$selectNameDown = false;
$selectServerUp = false;
$selectServerDown = false;
$selectTypeUp = false;
$selectTypeDown = false;
$selectIntervalUp = false;
$selectIntervalDown = false;
switch ($config['dbtype']) {
case 'mysql':
case 'postgresql':
@ -626,32 +626,39 @@ if ($paginate_module) {
ui_pagination($total_modules, $url);
}
$url_name = $url.'&sort_field=name&sort=';
$url_server = $url.'&sort_field=server&sort=';
$url_type = $url.'&sort_field=type&sort=';
$url_interval = $url.'&sort_field=interval&sort=';
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox data';
$table->class = 'info_table';
$table->head = [];
$table->head[0] = __('Name').' '.'<a href="'.$url.'&sort_field=name&sort=up">'.html_print_image('images/sort_up.png', true, ['style' => $selectNameUp]).'</a>'.'<a href="'.$url.'&sort_field=name&sort=down">'.html_print_image('images/sort_down.png', true, ['style' => $selectNameDown]).'</a>';
$table->head['checkbox'] = html_print_checkbox('all_delete', 0, false, true, false);
$table->head[0] = __('Name').ui_get_sorting_arrows($url_name.'up', $url_name.'down', $selectNameUp, $selectNameDown);
// The access to the policy is granted only with AW permission
if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK && check_acl($config['id_user'], $agent['id_grupo'], 'AW')) {
$table->head[1] = "<span title='".__('Policy')."'>".__('P.').'</span>';
}
$table->head[2] = "<span title='".__('Server')."'>".__('S.').'</span>'.' '.'<a href="'.$url.'&sort_field=server&sort=up">'.html_print_image('images/sort_up.png', true, ['style' => $selectServerUp]).'</a>'.'<a href="'.$url.'&sort_field=server&sort=down">'.html_print_image('images/sort_down.png', true, ['style' => $selectServerDown]).'</a>';
$table->head[3] = __('Type').' '.'<a href="'.$url.'&sort_field=type&sort=up">'.html_print_image('images/sort_up.png', true, ['style' => $selectTypeUp]).'</a>'.'<a href="'.$url.'&sort_field=type&sort=down">'.html_print_image('images/sort_down.png', true, ['style' => $selectTypeDown]).'</a>';
$table->head[4] = __('Interval').' '.'<a href="'.$url.'&sort_field=interval&sort=up">'.html_print_image('images/sort_up.png', true, ['style' => $selectIntervalUp]).'</a>'.'<a href="'.$url.'&sort_field=interval&sort=down">'.html_print_image('images/sort_down.png', true, ['style' => $selectIntervalDown]).'</a>';
$table->head[2] = "<span title='".__('Server')."'>".__('S.').'</span>'.ui_get_sorting_arrows($url_server.'up', $url_server.'down', $selectServerUp, $selectServerDown);
$table->head[3] = __('Type').ui_get_sorting_arrows($url_type.'up', $url_type.'down', $selectTypeUp, $selectTypeDown);
$table->head[4] = __('Interval').ui_get_sorting_arrows($url_interval.'up', $url_interval.'down', $selectIntervalUp, $selectIntervalDown);
$table->head[5] = __('Description');
$table->head[6] = __('Status');
$table->head[7] = __('Warn');
$table->head[8] = __('Action');
$table->head[9] = '<span title="'.__('Delete').'">'.__('Del.').'</span>'.html_print_checkbox('all_delete', 0, false, true, false);
$table->head[9] = '<span title="'.__('Delete').'">'.__('Del.').'</span>';
$table->rowstyle = [];
$table->style = [];
$table->style[0] = 'font-weight: bold';
$table->size = [];
$table->size['checkbox'] = '20px';
$table->size[2] = '70px';
$table->align = [];
$table->align[2] = 'left';
@ -706,15 +713,19 @@ foreach ($modules as $module) {
$table->rowstyle[($i - 1)] = 'text-align: center';
$table->rowclass[($i - 1)] = 'datos3';
if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) {
$table->colspan[($i - 1)][0] = 10;
$table->colspan[($i - 1)][0] = 11;
} else {
$table->colspan[($i - 1)][0] = 9;
$table->colspan[($i - 1)][0] = 10;
}
$data = [];
}
}
if (check_acl_one_of_groups($config['id_user'], $all_groups, 'AW')) {
$data['checkbox'] = html_print_checkbox('id_delete[]', $module['id_agente_modulo'], false, true);
}
$data[0] = '';
if (isset($module['deep']) && ($module['deep'] != 0)) {
@ -858,7 +869,7 @@ foreach ($modules as $module) {
}
if (check_acl_one_of_groups($config['id_user'], $all_groups, 'AW') && $module['id_tipo_modulo'] != 25) {
$data[8] .= '&nbsp;<a href="index.php?sec=gagente&tab=module&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&duplicate_module='.$module['id_agente_modulo'].'"
$data[8] .= '<a href="index.php?sec=gagente&tab=module&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&duplicate_module='.$module['id_agente_modulo'].'"
onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
$data[8] .= html_print_image(
'images/copy.png',
@ -870,7 +881,7 @@ foreach ($modules as $module) {
// Make a data normalization
if (isset($numericModules[$type])) {
if ($numericModules[$type] === true) {
$data[8] .= '&nbsp;<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module&fix_module='.$module['id_agente_modulo'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
$data[8] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module&fix_module='.$module['id_agente_modulo'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
$data[8] .= html_print_image(
'images/chart_curve.png',
true,
@ -879,18 +890,19 @@ foreach ($modules as $module) {
$data[8] .= '</a>';
}
} else {
$data[8] .= '&nbsp;'.html_print_image(
$data[8] .= html_print_image(
'images/chart_curve.disabled.png',
true,
['title' => __('Normalize (Disabled)')]
);
$data[8] .= '&nbsp;&nbsp;';
}
// create network component action
if ((is_user_admin($config['id_user']))
&& ($module['id_modulo'] == MODULE_NETWORK)
) {
$data[8] .= '&nbsp;<a href="index.php?sec=gmodules&sec2=godmode/modules/manage_network_components&create_network_from_module=1&id_agente='.$id_agente.'&create_module_from='.$module['id_agente_modulo'].'"
$data[8] .= '<a href="index.php?sec=gmodules&sec2=godmode/modules/manage_network_components&create_network_from_module=1&id_agente='.$id_agente.'&create_module_from='.$module['id_agente_modulo'].'"
onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
$data[8] .= html_print_image(
'images/network.png',
@ -899,11 +911,12 @@ foreach ($modules as $module) {
);
$data[8] .= '</a> ';
} else {
$data[8] .= '&nbsp;'.html_print_image(
$data[8] .= html_print_image(
'images/network.disabled.png',
true,
['title' => __('Create network component (Disabled)')]
);
$data[8] .= '&nbsp;&nbsp;';
}
}
@ -917,10 +930,17 @@ foreach ($modules as $module) {
['title' => __('Delete')]
);
$data[9] .= '</a> ';
$data[9] .= html_print_checkbox('id_delete[]', $module['id_agente_modulo'], false, true);
}
$table->cellclass[] = [
8 => 'action_buttons',
9 => 'action_buttons',
];
array_push($table->data, $data);
$table->cellclass[] = [
8 => 'action_buttons',
9 => 'action_buttons',
];
}
if (check_acl_one_of_groups($config['id_user'], $all_groups, 'AW')) {

View File

@ -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(

View File

@ -221,7 +221,7 @@ if ($delete_action) {
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox data';
$table->class = 'info_table';
$table->data = [];
$table->head = [];
$table->head[0] = __('Name');
@ -281,6 +281,10 @@ foreach ($actions as $action) {
}
if (check_acl($config['id_user'], $action['id_group'], 'LM')) {
$table->cellclass[] = [
2 => 'action_buttons',
3 => 'action_buttons',
];
$data[2] = '<a href="index.php?sec='.$sec.'&sec2=godmode/alerts/alert_actions&amp;copy_action=1&amp;id='.$action['id'].'&pure='.$pure.'"
onClick="if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/copy.png', true).'</a>';
$data[3] = '<a href="index.php?sec='.$sec.'&sec2=godmode/alerts/alert_actions&delete_action=1&id='.$action['id'].'&pure='.$pure.'"

View File

@ -388,7 +388,7 @@ if ($copy_command) {
}
$table->width = '100%';
$table->class = 'databox data';
$table->class = 'info_table';
$table->data = [];
$table->head = [];
@ -431,6 +431,7 @@ foreach ($commands as $command) {
io_safe_output($command['description'])
);
$data['action'] = '';
$table->cellclass[]['action'] = 'action_buttons';
if (! $command['internal']) {
$data['action'] = '<span style="display: inline-flex">';
$data['action'] .= '<a href="index.php?sec='.$sec.'&sec2=godmode/alerts/alert_commands&amp;copy_command=1&id='.$command['id'].'&pure='.$pure.'"

View File

@ -226,17 +226,18 @@ $order = null;
$sortField = get_parameter('sort_field');
$sort = get_parameter('sort', 'none');
$selected = 'border: 1px solid black;';
$selected = true;
// 'border: 1px solid black;';
$selectDisabledUp = '';
$selectDisabledDown = '';
$selectStandbyUp = '';
$selectStandbyDown = '';
$selectAgentUp = '';
$selectAgentDown = '';
$selectModuleUp = '';
$selectModuleDown = '';
$selectTemplateUp = '';
$selectTemplateDown = '';
$selectAgentUp = false;
$selectAgentDown = false;
$selectModuleUp = false;
$selectModuleDown = false;
$selectTemplateUp = false;
$selectTemplateDown = false;
switch ($sortField) {
case 'disabled':
@ -346,11 +347,11 @@ switch ($sortField) {
$selectStandbyUp = '';
$selectStandbyDown = '';
$selectAgentUp = $selected;
$selectAgentDown = '';
$selectModuleUp = '';
$selectModuleDown = '';
$selectTemplateUp = '';
$selectTemplateDown = '';
$selectAgentDown = false;
$selectModuleUp = false;
$selectModuleDown = false;
$selectTemplateUp = false;
$selectTemplateDown = false;
$order = [
'field' => 'agent_name',
'order' => 'ASC',
@ -360,12 +361,12 @@ switch ($sortField) {
$selectDisabledDown = '';
$selectStandbyUp = '';
$selectStandbyDown = '';
$selectAgentUp = '';
$selectAgentDown = '';
$selectAgentUp = false;
$selectAgentDown = false;
$selectModuleUp = $selected;
$selectModuleDown = '';
$selectTemplateUp = '';
$selectTemplateDown = '';
$selectModuleDown = false;
$selectTemplateUp = false;
$selectTemplateDown = false;
$order = [
'field' => 'agent_module_name',
'order' => 'ASC',
@ -402,12 +403,21 @@ if (!$id_agente) {
$url = 'index.php?sec='.$sec.'&sec2=godmode/agentes/configurar_agente&pure='.$pure.'&tab=alert&id_agente='.$id_agente.'&offset='.$offset.$form_params;
}
// Urls to sort the table.
$url_up_agente = $url.'&sort_field=agent&sort=up&pure='.$pure;
$url_down_agente = $url.'&sort_field=agent&sort=down&pure='.$pure;
$url_up_module = $url.'&sort_field=module&sort=up&pure='.$pure;
$url_down_module = $url.'&sort_field=module&sort=down&pure='.$pure;
$url_up_template = $url.'&sort_field=template&sort=up&pure='.$pure;
$url_down_template = $url.'&sort_field=template&sort=down&pure='.$pure;
$table = new stdClass();
if (is_metaconsole()) {
$table->class = 'alert_list databox';
} else {
$table->class = 'databox data';
$table->class = 'info_table';
}
$table->width = '100%';
@ -427,7 +437,7 @@ $table->head = [];
if (! $id_agente) {
$table->style = [];
$table->style[0] = 'font-weight: bold;';
$table->head[0] = __('Agent').'&nbsp;'.'<a href="'.$url.'&sort_field=agent&sort=up&pure='.$pure.'">'.html_print_image('images/sort_up.png', true, ['style' => $selectAgentUp]).'</a>'.'<a href="'.$url.'&sort_field=agent&sort=down&pure='.$pure.'">'.html_print_image('images/sort_down.png', true, ['style' => $selectAgentDown]).'</a>';
$table->head[0] = __('Agent').ui_get_sorting_arrows($url_up_agente, $url_down_agente, $selectAgentUp, $selectAgentDown);
$table->size[0] = '4%';
$table->size[1] = '8%';
$table->size[2] = '8%';
@ -439,7 +449,7 @@ if (! $id_agente) {
$table->size[4] = '8%';
}*/
} else {
$table->head[0] = __('Module').'&nbsp;'.'<a href="'.$url.'&sort_field=module&sort=up&pure='.$pure.'">'.html_print_image('images/sort_up.png', true, ['style' => $selectModuleUp]).'</a>'.'<a href="'.$url.'&sort_field=module&sort=down&pure='.$pure.'">'.html_print_image('images/sort_down.png', true, ['style' => $selectModuleDown]).'</a>';
$table->head[0] = __('Module').ui_get_sorting_arrows($url_up_module, $url_down_module, $selectModuleUp, $selectModuleDown);
// Different sizes or the layout screws up
$table->size[0] = '0%';
$table->size[1] = '10%';
@ -452,7 +462,7 @@ if (! $id_agente) {
$table->size[4] = '1%';
}
$table->head[1] = __('Template').'&nbsp;'.'<a href="'.$url.'&sort_field=template&sort=up&pure='.$pure.'">'.html_print_image('images/sort_up.png', true, ['style' => $selectTemplateUp]).'</a>'.'<a href="'.$url.'&sort_field=template&sort=down&pure='.$pure.'">'.html_print_image('images/sort_down.png', true, ['style' => $selectTemplateDown]).'</a>';
$table->head[1] = __('Template').ui_get_sorting_arrows($url_up_template, $url_down_template, $selectTemplateUp, $selectTemplateDown);
$table->head[2] = __('Actions');
$table->head[3] = __('Status');
$table->head[4] = "<span title='".__('Operations')."'>".__('Op.').'</span>';
@ -728,6 +738,10 @@ foreach ($simple_alerts as $alert) {
$data[3] = ui_print_status_image($status, $title, true);
$table->cellclass[] = [
3 => 'action_buttons',
4 => 'action_buttons',
];
$data[4] = '<form class="disable_alert_form" action="'.$url.'" method="post" style="display: inline;">';
if ($alert['disabled']) {
$data[4] .= html_print_input_image('enable', 'images/lightbulb_off.png', 1, 'padding:0px', true);
@ -742,7 +756,7 @@ foreach ($simple_alerts as $alert) {
// To manage alert is necessary LW permissions in the agent group
if (check_acl_one_of_groups($config['id_user'], $all_groups, 'LW')) {
$data[4] .= '&nbsp;&nbsp;<form class="standby_alert_form" action="'.$url.'" method="post" style="display: inline;">';
$data[4] .= '<form class="standby_alert_form" action="'.$url.'" method="post" style="display: inline;">';
if (!$alert['standby']) {
$data[4] .= html_print_input_image('standby_off', 'images/bell.png', 1, 'padding:0px;', true);
$data[4] .= html_print_input_hidden('standbyon_alert', 1, true);
@ -771,7 +785,7 @@ foreach ($simple_alerts as $alert) {
// To manage alert is necessary LW permissions in the agent group
if (check_acl_one_of_groups($config['id_user'], $all_groups, 'LW')) {
$data[4] .= '&nbsp;&nbsp;<form class="delete_alert_form" action="'.$url.'" method="post" style="display: inline;">';
$data[4] .= '<form class="delete_alert_form" action="'.$url.'" method="post" style="display: inline;">';
$is_cluster = (bool) get_parameter('id_cluster');
if (!$is_cluster) {
if ($alert['disabled']) {
@ -815,6 +829,11 @@ foreach ($simple_alerts as $alert) {
if (isset($data)) {
html_print_table($table);
if ($id_agente) {
ui_pagination($total, 'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=alert&id_agente='.$id_agente.$form_params.$sort_params, 0, 0, false, 'offset', true, 'pagination-bottom');
} else {
ui_pagination($total, 'index.php?sec='.$sec.'&sec2=godmode/alerts/alert_list'.$form_params.$sort_params, 0, 0, false, 'offset', true, 'pagination-bottom');
}
} else {
ui_print_info_message(['no_close' => true, 'message' => __('No alerts defined') ]);
}

View File

@ -339,7 +339,7 @@ if ($templates === false) {
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox data';
$table->class = 'info_table';
$table->data = [];
$table->head = [];
$table->head[0] = __('Name');
@ -375,6 +375,7 @@ foreach ($templates as $template) {
$data[3] = alerts_get_alert_templates_type_name($template['type']);
if (check_acl($config['id_user'], $template['id_group'], 'LM')) {
$table->cellclass[][4] = 'action_buttons';
$data[4] = '<form method="post" action="index.php?sec='.$sec.'&sec2=godmode/alerts/configure_alert_template&pure='.$pure.'" style="display: inline; float: left">';
$data[4] .= html_print_input_hidden('duplicate_template', 1, true);
$data[4] .= html_print_input_hidden('source_id', $template['id'], true);
@ -396,6 +397,7 @@ foreach ($templates as $template) {
ui_pagination($total_templates, $url);
if (isset($data)) {
html_print_table($table);
ui_pagination($total_templates, $url, 0, 0, false, 'offset', true, 'pagination-bottom');
} else {
ui_print_info_message(['no_close' => true, 'message' => __('No alert templates defined') ]);
}

View File

@ -82,7 +82,13 @@ $filter['limit'] = (int) $config['block_size'];
// Search action: This will filter the display category view
$result = false;
$result = categories_get_all_categories();
$result = db_get_all_rows_filter(
'tcategory',
[
'limit' => $filter['limit'],
'offset' => $filter['offset'],
]
);
// Display categories previously filtered or not
$rowPair = true;
@ -94,7 +100,7 @@ if (!empty($result)) {
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox data';
$table->class = 'info_table';
$table->data = [];
$table->head = [];
@ -123,7 +129,8 @@ if (!empty($result)) {
$data[1] .= '<a href="index.php?sec=advanced&sec2=godmode/category/category&delete_category='.$category['id'].'&pure='.(int) $config['pure'].'"onclick="if (! confirm (\''.__('Are you sure?').'\')) return false">'.html_print_image('images/cross.png', true, ['title' => 'Delete']).'</a>';
} else {
$data[0] = "<a href='index.php?sec=gmodules&sec2=godmode/category/edit_category&action=update&id_category=".$category['id'].'&pure='.(int) $config['pure']."'>".$category['name'].'</a>';
$data[1] = "<a href='index.php?sec=gmodules&sec2=godmode/category/edit_category&action=update&id_category=".$category['id'].'&pure='.(int) $config['pure']."'>".html_print_image('images/config.png', true, ['title' => 'Edit']).'</a>&nbsp;&nbsp;';
$table->cellclass[][1] = 'action_buttons';
$data[1] = "<a href='index.php?sec=gmodules&sec2=godmode/category/edit_category&action=update&id_category=".$category['id'].'&pure='.(int) $config['pure']."'>".html_print_image('images/config.png', true, ['title' => 'Edit']).'</a>';
$data[1] .= '<a href="index.php?sec=gmodules&sec2=godmode/category/category&delete_category='.$category['id'].'&pure='.(int) $config['pure'].'"onclick="if (! confirm (\''.__('Are you sure?').'\')) return false">'.html_print_image('images/cross.png', true, ['title' => 'Delete']).'</a>';
}
@ -131,6 +138,7 @@ if (!empty($result)) {
}
html_print_table($table);
ui_pagination($total_categories, $url, $offset, 0, false, 'offset', true, 'pagination-bottom');
} else {
// No categories available or selected
ui_print_info_message(['no_close' => true, 'message' => __('No categories found') ]);

View File

@ -113,31 +113,33 @@ if ($filters === false) {
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox data';
$table->class = 'info_table';
$table->head = [];
$table->head[0] = __('Name');
$table->head[1] = __('Group');
$table->head[2] = __('Event type');
$table->head[3] = __('Event status');
$table->head[4] = __('Severity');
$table->head[5] = __('Action').html_print_checkbox('all_delete', 0, false, true, false);
$table->head[0] = html_print_checkbox('all_delete', 0, false, true, false);
$table->head[1] = __('Name');
$table->head[2] = __('Group');
$table->head[3] = __('Event type');
$table->head[4] = __('Event status');
$table->head[5] = __('Severity');
$table->head[6] = __('Action');
$table->style = [];
$table->style[0] = 'font-weight: bold';
$table->style[1] = 'font-weight: bold';
$table->align = [];
$table->align[1] = 'left';
$table->align[2] = 'left';
$table->align[3] = 'left';
$table->align[4] = 'left';
$table->align[5] = 'left';
$table->align[6] = 'left';
$table->size = [];
$table->size[0] = '50%';
$table->size[1] = '5px';
$table->size[2] = '80px';
$table->size[0] = '20px';
$table->size[1] = '50%';
$table->size[2] = '5px';
$table->size[3] = '80px';
$table->size[4] = '80px';
$table->size[5] = '40px';
$table->size[5] = '80px';
$table->size[6] = '40px';
$table->data = [];
$total_filters = db_get_all_rows_filter('tevent_filter', false, 'COUNT(*) AS total');
@ -147,13 +149,14 @@ $total_filters = $total_filters[0]['total'];
foreach ($filters as $filter) {
$data = [];
$data[0] = '<a href="index.php?sec=geventos&sec2=godmode/events/events&section=edit_filter&id='.$filter['id_filter'].'&pure='.$config['pure'].'">'.$filter['id_name'].'</a>';
$data[1] = ui_print_group_icon($filter['id_group_filter'], true);
$data[2] = events_get_event_types($filter['event_type']);
$data[3] = events_get_status($filter['status']);
$data[4] = events_get_severity_types($filter['severity']);
$data[5] = "<a onclick='if(confirm(\"".__('Are you sure?')."\")) return true; else return false;'
href='index.php?sec=geventos&sec2=godmode/events/events&section=filter&delete=1&id=".$filter['id_filter'].'&offset=0&pure='.$config['pure']."'>".html_print_image('images/cross.png', true, ['title' => __('Delete')]).'</a>'.html_print_checkbox_extended('delete_multiple[]', $filter['id_filter'], false, false, '', 'class="check_delete"', true);
$data[0] = html_print_checkbox_extended('delete_multiple[]', $filter['id_filter'], false, false, '', 'class="check_delete"', true);
$data[1] = '<a href="index.php?sec=geventos&sec2=godmode/events/events&section=edit_filter&id='.$filter['id_filter'].'&pure='.$config['pure'].'">'.$filter['id_name'].'</a>';
$data[2] = ui_print_group_icon($filter['id_group_filter'], true);
$data[3] = events_get_event_types($filter['event_type']);
$data[4] = events_get_status($filter['status']);
$data[5] = events_get_severity_types($filter['severity']);
$table->cellclass[][6] = 'action_buttons';
$data[6] = "<a onclick='if(confirm(\"".__('Are you sure?')."\")) return true; else return false;'href='index.php?sec=geventos&sec2=godmode/events/events&section=filter&delete=1&id=".$filter['id_filter'].'&offset=0&pure='.$config['pure']."'>".html_print_image('images/cross.png', true, ['title' => __('Delete')]).'</a>';
array_push($table->data, $data);
}
@ -188,8 +191,6 @@ echo '</div>';
?>
<script type="text/javascript">
$("input[name=all_delete]").css("margin-left", "32px");
$( document ).ready(function() {

View File

@ -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';
@ -57,8 +59,9 @@ foreach ($event_responses as $response) {
$data[0] = '<a href="index.php?sec=geventos&sec2=godmode/events/events&section=responses&mode=editor&id_response='.$response['id'].'&amp;pure='.$config['pure'].'">'.$response['name'].'</a>';
$data[1] = $response['description'];
$data[2] = ui_print_group_icon($response['id_group'], true);
$table->cellclass[][3] = 'action_buttons';
$data[3] = '<a href="index.php?sec=geventos&sec2=godmode/events/events&section=responses&action=delete_response&id_response='.$response['id'].'&amp;pure='.$config['pure'].'">'.html_print_image('images/cross.png', true, ['title' => __('Delete')]).'</a>';
$data[3] .= '&nbsp;<a href="index.php?sec=geventos&sec2=godmode/events/events&section=responses&mode=editor&id_response='.$response['id'].'&amp;pure='.$config['pure'].'">'.html_print_image('images/pencil.png', true, ['title' => __('Edit')]).'</a>';
$data[3] .= '<a href="index.php?sec=geventos&sec2=godmode/events/events&section=responses&mode=editor&id_response='.$response['id'].'&amp;pure='.$config['pure'].'">'.html_print_image('images/pencil.png', true, ['title' => __('Edit')]).'</a>';
$table->data[] = $data;
}

View File

@ -149,7 +149,7 @@ $table->head[] = __('Operation');
$table->width[] = '30%';
*/
$table->width = '100%';
$table->class = 'databox data';
$table->class = 'info_table';
$table->align = [];
$table->align[] = 'left';
@ -254,6 +254,7 @@ foreach ($extensions as $file => $extension) {
// Avoid to delete or disabled update_manager
if ($file != 'update_manager.php') {
$table->cellclass[][10] = 'action_buttons';
if (!$extension['enabled']) {
$data[] = '<a title="'.__('Delete').'" href="index.php?sec=godmode/extensions&amp;sec2=godmode/extensions&enterprise='.(int) $extension['enterprise'].'&delete='.$file.'" class="mn">'.html_print_image('images/cross.disabled.png', true).'</a>'.' <a title="'.__('Enable').'" href="index.php?sec=godmode/extensions&amp;sec2=godmode/extensions&enterprise='.(int) $extension['enterprise'].'&enabled='.$file.'" class="mn">'.html_print_image('images/lightbulb_off.png', true).'</a>';
} else {

View File

@ -515,7 +515,7 @@ if ($tab == 'tree') {
$table = new StdClass();
$table->width = '100%';
$table->class = 'databox data';
$table->class = 'info_table';
$table->head = [];
$table->head[0] = __('ID');
$table->head[1] = __('Name');
@ -559,6 +559,7 @@ if ($tab == 'tree') {
$table->data[$key][3] = $group['disabled'] ? __('Disabled') : __('Enabled');
$table->data[$key][4] = $group['parent_name'];
$table->data[$key][5] = $group['description'];
$table->cellclass[$key][6] = 'action_buttons';
$table->data[$key][6] = "<a href='$url'>".html_print_image(
'images/config.png',
true,
@ -574,7 +575,7 @@ if ($tab == 'tree') {
$confirm_message = __('The child groups will be updated to use the parent id of the deleted group').'. '.$confirm_message;
}
$table->data[$key][6] .= '&nbsp;&nbsp;'.'<a href="'.$url_delete.'" onClick="if (!confirm(\' '.$confirm_message.'\')) return false;">'.html_print_image(
$table->data[$key][6] .= '<a href="'.$url_delete.'" onClick="if (!confirm(\' '.$confirm_message.'\')) return false;">'.html_print_image(
'images/cross.png',
true,
[
@ -592,7 +593,7 @@ if ($tab == 'tree') {
$block_size,
true,
'offset',
false
true
);
html_print_table($table);
echo ui_pagination(
@ -602,7 +603,8 @@ if ($tab == 'tree') {
$block_size,
true,
'offset',
true
true,
'pagination-bottom'
);
} else {
ui_print_info_message(['no_close' => true, 'message' => __('There are no defined groups') ]);

View File

@ -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 = [];
@ -251,13 +248,16 @@ if (!empty($groups)) {
if (is_metaconsole()) {
$data[2] = '<a href="index.php?sec=advanced&sec2=advanced/component_management&tab=module_group&id_group='.$id_group['id_mg'].'&delete_group=1" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['border' => '0']).'</a>';
} else {
$table->cellclass[][2] = 'action_buttons';
$data[2] = '<a href="index.php?sec=gmodules&sec2=godmode/groups/modu_group_list&id_group='.$id_group['id_mg'].'&delete_group=1" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['border' => '0']).'</a>';
}
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(
[

View File

@ -219,17 +219,19 @@ $groups = component_groups_get_groups_tree_recursive($groups_clean, 0, 0);
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox data';
$table->class = 'info_table';
$table->head = [];
$table->head['checkbox'] = html_print_checkbox('all_delete', 0, false, true, false);
$table->head[0] = __('Name');
$table->head[1] = __('Action').html_print_checkbox('all_delete', 0, false, true, false);
$table->head[1] = __('Action');
$table->style = [];
$table->style[0] = 'font-weight: bold';
$table->align = [];
$table->align[1] = 'left';
$table->size = [];
$table->size[0] = '80%';
$table->size[1] = '10%';
$table->size['checkbox'] = '20px';
// $table->size[0] = '80%';
$table->size[1] = '60px';
$table->data = [];
$total_groups = db_get_all_rows_filter('tnetwork_component_group', false, 'COUNT(*) AS total');
@ -239,6 +241,9 @@ $total_groups = $total_groups[0]['total'];
foreach ($groups as $group) {
$data = [];
$data['checkbox'] = html_print_checkbox_extended('delete_multiple[]', $group['id_sg'], false, false, '', 'class="check_delete"', true);
$tabulation = str_repeat('&nbsp;&nbsp;&nbsp;&nbsp;', $group['deep']);
if (defined('METACONSOLE')) {
$data[0] = $tabulation.'<a href="index.php?sec=advanced&sec2=godmode/modules/manage_nc_groups&id='.$group['id_sg'].'">'.$group['name'].'</a>';
@ -246,8 +251,9 @@ foreach ($groups as $group) {
$data[0] = $tabulation.'<a href="index.php?sec=gmodules&sec2=godmode/modules/manage_nc_groups&id='.$group['id_sg'].'">'.$group['name'].'</a>';
}
$table->cellclass[][1] = 'action_buttons';
$data[1] = "<a onclick='if(confirm(\"".__('Are you sure?')."\")) return true; else return false;'
href='index.php?sec=".$sec.'&sec2=godmode/modules/manage_nc_groups&delete=1&id='.$group['id_sg']."&offset=0'>".html_print_image('images/cross.png', true, ['title' => __('Delete')]).'</a>'.html_print_checkbox_extended('delete_multiple[]', $group['id_sg'], false, false, '', 'class="check_delete"', true);
href='index.php?sec=".$sec.'&sec2=godmode/modules/manage_nc_groups&delete=1&id='.$group['id_sg']."&offset=0'>".html_print_image('images/cross.png', true, ['title' => __('Delete')]).'</a>';
array_push($table->data, $data);
}

View File

@ -638,14 +638,16 @@ unset($table);
$table->width = '100%';
$table->head = [];
$table->class = 'databox data';
$table->class = 'info_table';
$table->head['checkbox'] = html_print_checkbox('all_delete', 0, false, true, false);
$table->head[0] = __('Module name');
$table->head[1] = __('Type');
$table->head[3] = __('Description');
$table->head[4] = __('Group');
$table->head[5] = __('Max/Min');
$table->head[6] = __('Action').html_print_checkbox('all_delete', 0, false, true, false);
$table->head[6] = __('Action');
$table->size = [];
$table->size['checkbox'] = '20px';
$table->size[1] = '75px';
$table->size[6] = '80px';
$table->align[6] = 'left';
@ -658,6 +660,8 @@ foreach ($components as $component) {
$component['max'] = $component['min'] = __('N/A');
}
$data['checkbox'] = html_print_checkbox_extended('delete_multiple[]', $component['id_nc'], false, false, '', 'class="check_delete"', true);
$data[0] = '<a href="index.php?sec='.$sec.'&'.'sec2=godmode/modules/manage_network_components&'.'id='.$component['id_nc'].'&pure='.$pure.'">';
$data[0] .= io_safe_output($component['name']);
$data[0] .= '</a>';
@ -692,8 +696,9 @@ foreach ($components as $component) {
$data[4] = network_components_get_group_name($component['id_group']);
$data[5] = $component['max'].' / '.$component['min'];
$table->cellclass[][6] = 'action_buttons';
$data[6] = '<a style="display: inline; float: left" href="'.$url.'&search_id_group='.$search_id_group.'search_string='.$search_string.'&duplicate_network_component=1&source_id='.$component['id_nc'].'">'.html_print_image('images/copy.png', true, ['alt' => __('Duplicate'), 'title' => __('Duplicate')]).'</a>';
$data[6] .= '<a href="'.$url.'&delete_component=1&id='.$component['id_nc'].'&search_id_group='.$search_id_group.'search_string='.$search_string.'" onclick="if (! confirm (\''.__('Are you sure?').'\')) return false" >'.html_print_image('images/cross.png', true, ['alt' => __('Delete'), 'title' => __('Delete')]).'</a>'.html_print_checkbox_extended('delete_multiple[]', $component['id_nc'], false, false, '', 'class="check_delete"', true);
$data[6] .= '<a href="'.$url.'&delete_component=1&id='.$component['id_nc'].'&search_id_group='.$search_id_group.'search_string='.$search_string.'" onclick="if (! confirm (\''.__('Are you sure?').'\')) return false" >'.html_print_image('images/cross.png', true, ['alt' => __('Delete'), 'title' => __('Delete')]).'</a>';
array_push($table->data, $data);
}
@ -702,6 +707,7 @@ if (isset($data)) {
echo "<form method='post' action='index.php?sec=".$sec.'&sec2=godmode/modules/manage_network_components&search_id_group=0search_string=&pure='.$pure."'>";
html_print_input_hidden('multiple_delete', 1);
html_print_table($table);
ui_pagination($total_components, $url, 0, 0, false, 'offset', true, 'pagination-bottom');
echo "<div style='float: right; margin-left: 5px;'>";
html_print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete"');
echo '</div>';

View File

@ -189,7 +189,20 @@ if ($export_profile) {
exit;
}
$result = db_get_all_rows_in_table('tnetwork_profile', 'name');
// Prepare pagination.
$offset = (int) get_parameter('offset');
$limit = $config['block_size'];
$count_network_templates = db_get_value('count(*)', 'tnetwork_profile');
$result = db_get_all_rows_filter(
'tnetwork_profile',
[
'order' => 'name',
'limit' => $limit,
'offset' => $offset,
]
);
if ($result === false) {
$result = [];
}
@ -197,26 +210,31 @@ if ($result === false) {
$table->cellpadding = 0;
$table->cellspacing = 0;
$table->width = '100%';
$table->class = 'databox data';
$table->class = 'info_table';
$table->head = [];
$table->head[0] = __('Name');
$table->head[1] = __('Description');
$table->head[2] = '<span style="margin-right:7%;">'.__('Action').'</span>'.html_print_checkbox('all_delete', 0, false, true, false);
$table->head[0] = html_print_checkbox('all_delete', 0, false, true, false);
;
$table->head[1] = __('Name');
$table->head[2] = __('Description');
$table->head[3] = '<span style="margin-right:7%;">'.__('Action').'</span>';
$table->size = [];
$table->size[1] = '65%';
$table->size[2] = '15%';
$table->size[0] = '20px';
$table->size[2] = '65%';
$table->size[3] = '15%';
$table->align = [];
$table->align[2] = 'left';
$table->align[3] = 'left';
$table->data = [];
foreach ($result as $row) {
$data = [];
$data[0] = '<a href="index.php?sec=gmodules&amp;sec2=godmode/modules/manage_network_templates_form&amp;id_np='.$row['id_np'].'">'.io_safe_output($row['name']).'</a>';
$data[1] = ui_print_truncate_text(io_safe_output($row['description']), 'description', true, true, true, '[&hellip;]');
$data[2] = html_print_input_image(
$data[0] = html_print_checkbox_extended('delete_multiple[]', $row['id_np'], false, false, '', 'class="check_delete"', true);
$data[1] = '<a href="index.php?sec=gmodules&amp;sec2=godmode/modules/manage_network_templates_form&amp;id_np='.$row['id_np'].'">'.io_safe_output($row['name']).'</a>';
$data[2] = ui_print_truncate_text(io_safe_output($row['description']), 'description', true, true, true, '[&hellip;]');
$table->cellclass[][3] = 'action_buttons';
$data[3] = html_print_input_image(
'delete_profile',
'images/cross.png',
$row['id_np'],
@ -224,7 +242,7 @@ foreach ($result as $row) {
true,
['onclick' => 'if (!confirm(\''.__('Are you sure?').'\')) return false;']
);
$data[2] .= html_print_input_image(
$data[3] .= html_print_input_image(
'export_profile',
'images/csv.png',
$row['id_np'],
@ -232,8 +250,8 @@ foreach ($result as $row) {
true,
['title' => 'Export to CSV']
);
$data[2] = '<a href="index.php?sec=gmodules&sec2=godmode/modules/manage_network_templates'.'&delete_profile=1&delete_profile='.$row['id_np'].'" '.'onclick="if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['title' => __('Delete')]).'</a>';
$data[2] .= '&nbsp;&nbsp;<a href="index.php?sec=gmodules&sec2=godmode/modules/manage_network_templates'.'&export_profile='.$row['id_np'].'">'.html_print_image('images/csv.png', true, ['title' => __('Export to CSV')]).'</a>'.html_print_checkbox_extended('delete_multiple[]', $row['id_np'], false, false, '', 'class="check_delete"', true);
$data[3] = '<a href="index.php?sec=gmodules&sec2=godmode/modules/manage_network_templates'.'&delete_profile=1&delete_profile='.$row['id_np'].'" '.'onclick="if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['title' => __('Delete')]).'</a>';
$data[3] .= '<a href="index.php?sec=gmodules&sec2=godmode/modules/manage_network_templates'.'&export_profile='.$row['id_np'].'">'.html_print_image('images/csv.png', true, ['title' => __('Export to CSV')]).'</a>';
array_push($table->data, $data);
}
@ -241,7 +259,9 @@ foreach ($result as $row) {
if (!empty($table->data)) {
echo '<form method="post" action="index.php?sec=gmodules&amp;sec2=godmode/modules/manage_network_templates">';
html_print_input_hidden('multiple_delete', 1);
ui_pagination($count_network_templates, false, $offset);
html_print_table($table);
ui_pagination($count_network_templates, false, $offset, 0, false, 'offset', true, 'pagination-bottom');
echo "<div style='padding-left: 5px; float: right; '>";
html_print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete"');
echo '</div>';

View File

@ -52,11 +52,13 @@ if ($update_module) {
}
echo "<table cellpadding='4' cellspacing='4' width='100%' class='databox data'>";
echo "<table cellpadding='0' cellspacing='0' width='100%' class='info_table'>";
echo '<thead>';
echo '<th>'.__('Icon').'</th>';
echo '<th>'.__('ID').'</th>';
echo '<th>'.__('Name').'</th>';
echo '<th>'.__('Description').'</th>';
echo '</thead';
$rows = db_get_all_rows_sql('SELECT * FROM ttipo_modulo ORDER BY nombre');
if ($rows === false) {

View File

@ -133,20 +133,22 @@ if ($filters === false) {
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox data';
$table->class = 'info_table';
$table->head = [];
$table->head[0] = __('Name');
$table->head[1] = __('Group');
$table->head[2] = __('Action').html_print_checkbox('all_delete', 0, false, true, false);
$table->head[0] = html_print_checkbox('all_delete', 0, false, true, false);
$table->head[1] = __('Name');
$table->head[2] = __('Group');
$table->head[3] = __('Action');
$table->style = [];
$table->style[0] = 'font-weight: bold';
$table->style[1] = 'font-weight: bold';
$table->align = [];
$table->size = [];
$table->size[0] = '60%';
$table->size[1] = '30%';
$table->size[2] = '80px';
$table->size[0] = '10px';
$table->size[1] = '60%';
$table->size[2] = '30%';
$table->size[3] = '80px';
$table->data = [];
$total_filters = db_get_all_rows_filter('tnetflow_filter', false, 'COUNT(*) AS total');
@ -156,10 +158,12 @@ $total_filters = $total_filters[0]['total'];
foreach ($filters as $filter) {
$data = [];
$data[0] = '<a href="'.$config['homeurl'].'index.php?sec=netf&sec2=godmode/netflow/nf_edit_form&id='.$filter['id_sg'].'&pure='.$pure.'">'.$filter['id_name'].'</a>';
$data[1] = ui_print_group_icon($filter['id_group'], true, 'groups_small', '', !defined('METACONSOLE'));
$data[2] = "<a onclick='if(confirm(\"".__('Are you sure?')."\")) return true; else return false;'
href='".$config['homeurl'].'index.php?sec=netf&sec2=godmode/netflow/nf_edit&delete=1&id='.$filter['id_sg']."&offset=0&pure=$pure'>".html_print_image('images/cross.png', true, ['title' => __('Delete')]).'</a>'.html_print_checkbox_extended('delete_multiple[]', $filter['id_sg'], false, false, '', 'class="check_delete"', true);
$data[0] = html_print_checkbox_extended('delete_multiple[]', $filter['id_sg'], false, false, '', 'class="check_delete"', true);
$data[1] = '<a href="'.$config['homeurl'].'index.php?sec=netf&sec2=godmode/netflow/nf_edit_form&id='.$filter['id_sg'].'&pure='.$pure.'">'.$filter['id_name'].'</a>';
$data[2] = ui_print_group_icon($filter['id_group'], true, 'groups_small', '', !defined('METACONSOLE'));
$table->cellclass[][3] = 'action_buttons';
$data[3] = "<a onclick='if(confirm(\"".__('Are you sure?')."\")) return true; else return false;'
href='".$config['homeurl'].'index.php?sec=netf&sec2=godmode/netflow/nf_edit&delete=1&id='.$filter['id_sg']."&offset=0&pure=$pure'>".html_print_image('images/cross.png', true, ['title' => __('Delete')]).'</a>';
array_push($table->data, $data);
}

View File

@ -159,9 +159,17 @@ 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 = [];
if ($report_w || $report_m) {
$table->align[5] = 'left';
$table->head[5] = html_print_checkbox('all_delete', 0, false, true, false);
$table->size[5] = '20px';
}
$table->head[0] = __('Graph name');
$table->head[1] = __('Description');
$table->head[2] = __('Number of Graphs');
@ -175,7 +183,7 @@ if (!empty($graphs)) {
if ($report_w || $report_m) {
$op_column = true;
$table->align[4] = 'left';
$table->head[4] = __('Op.').html_print_checkbox('all_delete', 0, false, true, false);
$table->head[4] = __('Op.');
$table->size[4] = '90px';
}
@ -186,6 +194,10 @@ if (!empty($graphs)) {
foreach ($result_graphs as $graph) {
$data = [];
if ($report_m) {
$data[5] .= html_print_checkbox_extended('delete_multiple[]', $graph['id_graph'], false, false, '', 'class="check_delete" style="margin-left:2px;"', true);
}
$data[0] = '<a href="index.php?sec=reporting&sec2=operation/reporting/graph_viewer&view_graph=1&id='.$graph['id_graph'].'">'.ui_print_truncate_text($graph['name'], 70).'</a>';
$data[1] = ui_print_truncate_text($graph['description'], 70);
@ -194,15 +206,14 @@ if (!empty($graphs)) {
$data[3] = ui_print_group_icon($graph['id_group'], true);
$data[4] = '';
$table->cellclass[][4] = 'action_buttons';
if (($report_w || $report_m)) {
$data[4] = '<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_builder&edit_graph=1&id='.$graph['id_graph'].'">'.html_print_image('images/config.png', true).'</a>';
}
$data[4] .= '&nbsp;';
if ($report_m) {
$data[4] .= '<a href="index.php?sec=reporting&sec2=godmode/reporting/graphs&delete_graph=1&id='.$graph['id_graph'].'" onClick="if (!confirm(\''.__('Are you sure?').'\'))
return false;">'.html_print_image('images/cross.png', true, ['alt' => __('Delete'), 'title' => __('Delete')]).'</a>'.html_print_checkbox_extended('delete_multiple[]', $graph['id_graph'], false, false, '', 'class="check_delete" style="margin-left:2px;"', true);
return false;">'.html_print_image('images/cross.png', true, ['alt' => __('Delete'), 'title' => __('Delete')]).'</a>';
}
array_push($table->data, $data);
@ -213,6 +224,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 +240,6 @@ if (!empty($graphs)) {
}
echo '</div>';
ui_pagination(count($graphs));
} else {
include_once $config['homedir'].'/general/firts_task/custom_graphs.php';
}
@ -237,8 +248,6 @@ if (!empty($graphs)) {
<script type="text/javascript">
$("input[name=all_delete]").css("margin-left", "32px");
$( document ).ready(function() {
$('[id^=checkbox-delete_multiple]').change(function(){

View File

@ -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');
@ -447,6 +449,10 @@ if (!$maps && !is_metaconsole()) {
// Fix: IW was the old ACL for report editing, now is RW
if ($vconsoles_write || $vconsoles_manage) {
if (!is_metaconsole()) {
$table->cellclass[] = [
3 => 'action_buttons',
4 => 'action_buttons',
];
$data[3] = '<a class="copy_visualmap" href="index.php?sec=network&amp;sec2=godmode/reporting/map_builder&amp;id_layout='.$map['id'].'&amp;copy_layout=1">'.html_print_image('images/copy.png', true).'</a>';
$data[4] = '<a class="delete_visualmap" href="index.php?sec=network&amp;sec2=godmode/reporting/map_builder&amp;id_layout='.$map['id'].'&amp;delete_layout=1">'.html_print_image('images/cross.png', true).'</a>';
} else {
@ -462,6 +468,7 @@ if (!$maps && !is_metaconsole()) {
}
html_print_table($table);
ui_pagination($total_maps, $url, $offset, $pagination, false, 'offset', true, 'pagination-bottom');
}
if ($maps) {

View File

@ -330,6 +330,12 @@ if ($items) {
if (defined('METACONSOLE')) {
$table->width = '100%';
$table->class = 'databox data';
$arrow_up = 'images/sort_up.png';
$arrow_down = 'images/sort_down.png';
} else {
$table->class = 'info_table';
$arrow_up = 'images/sort_up_black.png';
$arrow_down = 'images/sort_down_black.png';
}
$table->size = [];
@ -342,18 +348,18 @@ 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="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=up&field=type&id_report='.$idReport.$urlFilter.'&pure='.$config['pure'].'">'.html_print_image('images/sort_up.png', true, ['title' => __('Ascendent')]).'</a>'.'<a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=down&field=type&id_report='.$idReport.$urlFilter.'&pure='.$config['pure'].'">'.html_print_image('images/sort_down.png', true, ['title' => __('Descent')]).'</a>';
$table->head[1] .= ' <span class="sort_arrow"><a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=up&field=type&id_report='.$idReport.$urlFilter.'&pure='.$config['pure'].'">'.html_print_image($arrow_up, true, ['title' => __('Ascendent')]).'</a>'.'<a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=down&field=type&id_report='.$idReport.$urlFilter.'&pure='.$config['pure'].'">'.html_print_image($arrow_down, true, ['title' => __('Descent')]).'</a></span>';
}
$table->head[2] = __('Agent');
if (!$filterEnable) {
$table->head[2] .= ' <a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=up&field=agent&id_report='.$idReport.$urlFilter.'&pure='.$config['pure'].'">'.html_print_image('images/sort_up.png', true, ['title' => __('Ascendent')]).'</a>'.'<a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=down&field=agent&id_report='.$idReport.$urlFilter.'&pure='.$config['pure'].'">'.html_print_image('images/sort_down.png', true, ['title' => __('Descent')]).'</a>';
$table->head[2] .= ' <span class="sort_arrow"><a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=up&field=agent&id_report='.$idReport.$urlFilter.'&pure='.$config['pure'].'">'.html_print_image($arrow_up, true, ['title' => __('Ascendent')]).'</a>'.'<a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=down&field=agent&id_report='.$idReport.$urlFilter.'&pure='.$config['pure'].'">'.html_print_image($arrow_down, true, ['title' => __('Descent')]).'</a></span>';
}
$table->head[3] = __('Module');
if (!$filterEnable) {
$table->head[3] .= ' <a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=up&field=module&id_report='.$idReport.$urlFilter.'&pure='.$config['pure'].'">'.html_print_image('images/sort_up.png', true, ['title' => __('Ascendent')]).'</a>'.'<a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=down&field=module&id_report='.$idReport.$urlFilter.'&pure='.$config['pure'].'">'.html_print_image('images/sort_down.png', true, ['title' => __('Descent')]).'</a>';
$table->head[3] .= ' <span class="sort_arrow"><a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=up&field=module&id_report='.$idReport.$urlFilter.'&pure='.$config['pure'].'">'.html_print_image($arrow_up, true, ['title' => __('Ascendent')]).'</a>'.'<a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=down&field=module&id_report='.$idReport.$urlFilter.'&pure='.$config['pure'].'">'.html_print_image($arrow_down, true, ['title' => __('Descent')]).'</a></span>';
}
$table->head[4] = __('Time lapse');
@ -493,6 +499,7 @@ foreach ($items as $item) {
$row[6] = '';
if (check_acl($config['id_user'], $item['id_group'], 'RM')) {
$table->cellclass[][6] = 'action_buttons';
$row[6] .= '<a href="index.php?sec=reporting&sec2=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, ['title' => __('Edit')]).'</a>';
$row[6] .= '&nbsp;';
$row[6] .= '<a onClick="if (!confirm (\'Are you sure?\')) return false;" href="index.php?sec=reporting&sec2=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, ['title' => __('Delete')]).'</a>';

View File

@ -675,7 +675,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;
@ -857,6 +857,8 @@ switch ($action) {
if ($edit || $delete) {
$columnview = true;
$table->cellclass[][$next] = 'action_buttons';
if (!isset($table->head[$next])) {
$table->head[$next] = '<span title="Operations">'.__('Op.').'</span>'.html_print_checkbox('all_delete', 0, false, true, false);
$table->size = [];
@ -866,11 +868,6 @@ switch ($action) {
if ($edit) {
$data[$next] = '<form method="post" action="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&action=edit&pure='.$pure.'" 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',
@ -879,13 +876,16 @@ switch ($action) {
true,
['title' => __('Edit')]
);
$data[$next] .= html_print_input_hidden(
'id_report',
$report['id_report'],
true
);
$data[$next] .= '</form>';
}
if ($delete) {
$data[$next] .= '<form method="post" style="display:inline;" onsubmit="if (!confirm (\''.__('Are you sure?').'\')) return false">';
$data[$next] .= html_print_input_hidden('id_report', $report['id_report'], true);
$data[$next] .= html_print_input_hidden('action', 'delete_report', true);
$data[$next] .= html_print_input_image(
'delete',
'images/cross.png',
@ -894,6 +894,8 @@ switch ($action) {
true,
['title' => __('Delete')]
);
$data[$next] .= html_print_input_hidden('id_report', $report['id_report'], true);
$data[$next] .= html_print_input_hidden('action', 'delete_report', true);
$data[$next] .= html_print_checkbox_extended('massive_report_check', $report['id_report'], false, false, '', 'class="check_delete"', true);
@ -920,6 +922,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.') ]);
}

View File

@ -954,9 +954,10 @@ if (($create != '') || ($view != '')) {
if (defined('METACONSOLE')) {
echo '<table width="100%" cellspacing="4" cellpadding="4" class="databox data">';
} else {
echo '<table width="100%" cellspacing="4" cellpadding="4" class="databox data">';
echo '<table width="100%" cellspacing="4" cellpadding="4" class="info_table">';
}
echo '<thead><tr>';
echo '<th>'.__('Name').'</th>';
echo '<th>'.__('Type').'</th>';
echo '<th>'.__('Command').'</th>';
@ -964,6 +965,8 @@ if (($create != '') || ($view != '')) {
echo "<th style='width: 120px;'>".'<span title="Operations">'.__('Op.').'</span>'.'</th>';
}
echo '</tr></thead>';
$color = 0;
foreach ($rows as $row) {

View File

@ -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 = [];
@ -80,7 +82,11 @@ $names_servers = [];
foreach ($servers as $server) {
$data = [];
$table->cellclass[][3] = 'progress_bar';
// $table->cellclass[][3] = 'progress_bar';
$table->cellclass[] = [
3 => 'progress_bar',
8 => 'action_buttons',
];
$data[0] = '<span title="'.$server['version'].'">'.strip_tags($server['name']).'</span>';
// Status
@ -155,7 +161,7 @@ foreach ($servers as $server) {
'style' => 'width:21px;height:21px;',
]
);
$data[8] .= '</a>&nbsp;&nbsp;';
$data[8] .= '</a>';
}
if ($server['type'] == 'data') {
@ -165,7 +171,7 @@ foreach ($servers as $server) {
true,
['title' => __('Reset module status and fired alert counts')]
);
$data[8] .= '</a>&nbsp;&nbsp;';
$data[8] .= '</a>';
} else if ($server['type'] == 'enterprise snmp') {
$data[8] .= '<a href="index.php?sec=gservers&sec2=godmode/servers/modificar_server&refr=0&server_reset_snmp_enterprise='.$server['id_server'].'">';
$data[8] .= html_print_image(
@ -173,7 +179,7 @@ foreach ($servers as $server) {
true,
['title' => __('Claim back SNMP modules')]
);
$data[8] .= '</a>&nbsp;&nbsp;';
$data[8] .= '</a>';
}
$data[8] .= '<a href="index.php?sec=gservers&sec2=godmode/servers/modificar_server&server='.$server['id_server'].'">';
@ -195,7 +201,7 @@ foreach ($servers as $server) {
$names_servers[$safe_server_name] = false;
}
$data[8] .= '&nbsp;&nbsp;<a href="index.php?sec=gservers&sec2=godmode/servers/modificar_server&server_del='.$server['id_server'].'&amp;delete=1">';
$data[8] .= '<a href="index.php?sec=gservers&sec2=godmode/servers/modificar_server&server_del='.$server['id_server'].'&amp;delete=1">';
$data[8] .= html_print_image(
'images/cross.png',
true,

View File

@ -63,14 +63,15 @@ switch ($action) {
break;
}
$table->class = 'info_table';
$table->width = '98%';
$table->head[0] = __('Map connection name');
$table->head[1] = __('Group');
$table->head[3] = __('Delete');
$table->align[1] = 'center';
$table->align[2] = 'center';
$table->align[3] = 'center';
$table->align[1] = 'left';
$table->align[2] = 'left';
$table->align[3] = 'left';
$mapsConnections = db_get_all_rows_in_table('tgis_map_connection', 'conection_name');
@ -84,6 +85,7 @@ if ($mapsConnections !== false) {
'<a href="index.php?sec=gsetup&sec2=godmode/setup/gis&amp;id_connection_map='.$mapsConnection['id_tmap_connection'].'&amp;action=delete_connection"
onClick="javascript: if (!confirm(\''.__('Do you wan delete this connection?').'\')) return false;">'.html_print_image('images/cross.png', true).'</a>',
];
$table->cellclass[][2] = 'action_buttons';
}
}

View File

@ -137,9 +137,11 @@ if ((isset($_GET['form_add'])) or (isset($_GET['form_edit']))) {
if (empty($rows)) {
ui_print_info_message(['no_close' => true, 'message' => __("There isn't links") ]);
} else {
echo "<table cellpadding='4' cellspacing='4' class='databox data' style='width:100%'>";
echo "<table cellpadding='0' cellspacing='0' class='info_table' style='width:100%'>";
echo '<thead><tr>';
echo "<th width='180px'>".__('Link name').'</th>';
echo "<th width='10px'>".__('Delete').'</th>';
echo '</tr></thead>';
$color = 1;
foreach ($rows as $row) {
@ -152,7 +154,7 @@ if ((isset($_GET['form_add'])) or (isset($_GET['form_edit']))) {
}
echo "<tr><td class='$tdcolor'><b><a href='index.php?sec=gsetup&sec2=godmode/setup/links&form_edit=1&id_link=".$row['id_link']."'>".$row['name'].'</a></b></td>';
echo '<td class="'.$tdcolor.'"><a href="index.php?sec=gsetup&sec2=godmode/setup/links&id_link='.$row['id_link'].'&borrar='.$row['id_link'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true).'</a></td></tr>';
echo '<td class="'.$tdcolor.' action_buttons"><a href="index.php?sec=gsetup&sec2=godmode/setup/links&id_link='.$row['id_link'].'&borrar='.$row['id_link'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true).'</a></td></tr>';
}
echo '</table>';

View File

@ -231,14 +231,15 @@ if ((isset($_GET['form_add'])) || (isset($_GET['form_edit']))) {
ui_print_info_message(['no_close' => true, 'message' => __('There are no defined news') ]);
} else {
// Main list view for Links editor
echo "<table cellpadding='4' cellspacing='4' class='databox data' width=100%>";
echo "<table cellpadding='0' cellspacing='0' class='info_table' width=100%>";
echo '<thead><tr>';
echo '<th>'.__('Subject').'</th>';
echo '<th>'.__('Type').'</th>';
echo '<th>'.__('Author').'</th>';
echo '<th>'.__('Timestamp').'</th>';
echo '<th>'.__('Expiration').'</th>';
echo '<th>'.__('Delete').'</th>';
echo '</tr></thead>';
$color = 1;
@ -276,7 +277,7 @@ if ((isset($_GET['form_add'])) || (isset($_GET['form_edit']))) {
echo "<td class='$tdcolor'>".__('No').'</b></td>';
}
echo '<td class="'.$tdcolor.'"><a href="index.php?sec=gsetup&sec2=godmode/setup/news&id_news='.$row['id_news'].'&borrar='.$row['id_news'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['border' => '0']).'</a></td></tr>';
echo '<td class="'.$tdcolor.' action_buttons"><a href="index.php?sec=gsetup&sec2=godmode/setup/news&id_news='.$row['id_news'].'&borrar='.$row['id_news'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['border' => '0']).'</a></td></tr>';
}
echo '</table>';

View File

@ -25,7 +25,7 @@ if (! check_acl($config['id_user'], 0, 'PM') && ! is_user_admin($config['id_user
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox data';
$table->class = 'info_table';
$table->head[0] = '';
$table->head[1] = __('ID');
@ -37,7 +37,19 @@ $table->align[4] = 'center';
$table->size[0] = '20px';
$table->size[4] = '20px';
$osList = db_get_all_rows_in_table('tconfig_os');
// Prepare pagination.
$offset = (int) get_parameter('offset');
$limit = $config['block_size'];
$count_osList = db_get_value('count(*)', 'tconfig_os');
$osList = db_get_all_rows_filter(
'tconfig_os',
[
'offset' => $offset,
'limit' => $limit,
]
);
if ($osList === false) {
$osList = [];
}
@ -54,6 +66,8 @@ foreach ($osList as $os) {
}
$data[] = ui_print_truncate_text(io_safe_output($os['description']), 'description', true, true);
$table->cellclass[][4] = 'action_buttons';
if ($os['id_os'] > 16) {
if (is_metaconsole()) {
$data[] = '<a href="index.php?sec=advanced&sec2=advanced/component_management&tab=os_manage&action=delete&tab2=list&id_os='.$os['id_os'].'">'.html_print_image('images/cross.png', true).'</a>';
@ -69,7 +83,9 @@ foreach ($osList as $os) {
}
if (isset($data)) {
ui_pagination($count_osList, false, $offset);
html_print_table($table);
ui_pagination($count_osList, false, $offset, 0, false, 'offset', true, 'pagination-bottom');
} else {
ui_print_info_message(['no_close' => true, 'message' => __('There are no defined operating systems') ]);
}

View File

@ -226,13 +226,13 @@ if ($edit_filter > -2) {
$table->cellpadding = 4;
$table->cellspacing = 4;
$table->width = '100%';
$table->class = 'databox data';
$table->class = 'info_table';
$table->align = [];
$table->head[0] = __('Description');
$table->head[1] = __('Filter');
$table->head[2] = __('Action');
$table->size[2] = '50px';
$table->size[2] = '65px';
$table->align[2] = 'center';
foreach ($aglomerate_result as $ind => $row) {
@ -263,6 +263,7 @@ if ($edit_filter > -2) {
$data[0] = $compose_id;
$data[1] = implode(' AND ', $compose_filter);
$data[2] = $compose_action;
$table->cellclass[][2] = 'action_buttons';
array_push($table->data, $data);
}
}

View File

@ -191,7 +191,7 @@ if (!empty($result)) {
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox data';
$table->class = 'info_table';
$table->data = [];
$table->head = [];
@ -278,12 +278,14 @@ if (!empty($result)) {
$data[5] = $output;
$data[6] = "<a href='index.php?sec=".$sec.'&sec2=godmode/tag/edit_tag&action=update&id_tag='.$tag['id_tag']."'>".html_print_image('images/config.png', true, ['title' => 'Edit']).'</a>&nbsp;&nbsp;';
$table->cellclass[][6] = 'action_buttons';
$data[6] = "<a href='index.php?sec=".$sec.'&sec2=godmode/tag/edit_tag&action=update&id_tag='.$tag['id_tag']."'>".html_print_image('images/config.png', true, ['title' => 'Edit']).'</a>';
$data[6] .= '<a href="index.php?sec='.$sec.'&sec2=godmode/tag/tag&delete_tag='.$tag['id_tag'].'"onclick="if (! confirm (\''.__('Are you sure?').'\')) return false">'.html_print_image('images/cross.png', true, ['title' => 'Delete']).'</a>';
array_push($table->data, $data);
}
html_print_table($table);
ui_pagination($total_tags, $url, 0, 0, false, 'offset', true, 'pagination-bottom');
} else {
if (is_metaconsole()) {
ui_toggle($filter_form, __('Show Options'));

View File

@ -258,7 +258,7 @@ if ($create_profile) {
$table = new stdClass();
$table->cellpadding = 0;
$table->cellspacing = 0;
$table->class = 'databox profile_list data';
$table->class = 'info_table profile_list';
$table->width = '100%';
$table->head = [];
@ -353,8 +353,9 @@ foreach ($profiles as $profile) {
$data['VW'] = ($profile['vconsole_edit'] ? $img : '');
$data['VM'] = ($profile['vconsole_management'] ? $img : '');
$data['PM'] = ($profile['pandora_management'] ? $img : '');
$table->cellclass[]['operations'] = 'action_buttons';
$data['operations'] = '<a href="index.php?sec='.$sec.'&amp;sec2=godmode/users/configure_profile&id='.$profile['id_perfil'].'&pure='.$pure.'">'.html_print_image('images/config.png', true, ['title' => __('Edit')]).'</a>';
$data['operations'] .= '&nbsp;&nbsp;<a href="index.php?sec='.$sec.'&sec2=godmode/users/profile_list&delete_profile=1&id='.$profile['id_perfil'].'&pure='.$pure.'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true).'</a>';
$data['operations'] .= '<a href="index.php?sec='.$sec.'&sec2=godmode/users/profile_list&delete_profile=1&id='.$profile['id_perfil'].'&pure='.$pure.'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true).'</a>';
array_push($table->data, $data);
}

View File

@ -38,13 +38,13 @@ $sort = get_parameter('sort', 'none');
$tab = get_parameter('tab', 'user');
$pure = get_parameter('pure', 0);
$selected = 'border: 1px solid black;';
$selectUserIDUp = '';
$selectUserIDDown = '';
$selectFullnameUp = '';
$selectFullnameDown = '';
$selectLastConnectUp = '';
$selectLastConnectDown = '';
$selected = true;
$selectUserIDUp = false;
$selectUserIDDown = false;
$selectFullnameUp = false;
$selectFullnameDown = false;
$selectLastConnectUp = false;
$selectLastConnectDown = false;
$order = null;
switch ($sortField) {
@ -110,11 +110,11 @@ switch ($sortField) {
default:
$selectUserIDUp = $selected;
$selectUserIDDown = '';
$selectFullnameUp = '';
$selectFullnameDown = '';
$selectLastConnectUp = '';
$selectLastConnectDown = '';
$selectUserIDDown = false;
$selectFullnameUp = false;
$selectFullnameDown = false;
$selectLastConnectUp = false;
$selectLastConnectDown = false;
$order = [
'field' => 'id_user',
'order' => 'ASC',
@ -300,11 +300,20 @@ if (defined('METACONSOLE')) {
ui_toggle($form_filter, __('Users control filter'), __('Toggle filter(s)'), !$search);
}
// Urls to sort the table.
$url_up_id = '?sec='.$sec.'&sec2=godmode/users/user_list&sort_field=id_user&sort=up&pure='.$pure;
$url_down_id = '?sec='.$sec.'&sec2=godmode/users/user_list&sort_field=id_user&sort=down&pure='.$pure;
$url_up_name = '?sec='.$sec.'&sec2=godmode/users/user_list&sort_field=fullname&sort=up&pure='.$pure;
$url_down_name = '?sec='.$sec.'&sec2=godmode/users/user_list&sort_field=fullname&sort=down&pure='.$pure;
$url_up_last = '?sec='.$sec.'&sec2=godmode/users/user_list&sort_field=last_connect&sort=up&pure='.$pure;
$url_down_last = '?sec='.$sec.'&sec2=godmode/users/user_list&sort_field=last_connect&sort=down&pure='.$pure;
$table = new stdClass();
$table->cellpadding = 0;
$table->cellspacing = 0;
$table->width = '100%';
$table->class = 'databox data';
$table->class = 'info_table';
$table->head = [];
$table->data = [];
@ -312,9 +321,10 @@ $table->align = [];
$table->size = [];
$table->valign = [];
$table->head[0] = __('User ID').' '.'<a href="?sec='.$sec.'&sec2=godmode/users/user_list&sort_field=id_user&sort=up&pure='.$pure.'">'.html_print_image('images/sort_up.png', true, ['style' => $selectUserIDUp]).'</a>'.'<a href="?sec='.$sec.'&sec2=godmode/users/user_list&sort_field=id_user&sort=down&pure='.$pure.'">'.html_print_image('images/sort_down.png', true, ['style' => $selectUserIDDown]).'</a>';
$table->head[1] = __('Name').' '.'<a href="?sec='.$sec.'&sec2=godmode/users/user_list&sort_field=fullname&sort=up&pure='.$pure.'">'.html_print_image('images/sort_up.png', true, ['style' => $selectFullnameUp ]).'</a>'.'<a href="?sec='.$sec.'&sec2=godmode/users/user_list&sort_field=fullname&sort=down&pure='.$pure.'">'.html_print_image('images/sort_down.png', true, ['style' => $selectFullnameDown]).'</a>';
$table->head[2] = __('Last contact').' '.'<a href="?sec='.$sec.'&sec2=godmode/users/user_list&sort_field=last_connect&sort=up&pure='.$pure.'">'.html_print_image('images/sort_up.png', true, ['style' => $selectLastConnectUp ]).'</a>'.'<a href="?sec='.$sec.'&sec2=godmode/users/user_list&sort_field=last_connect&sort=down&pure='.$pure.'">'.html_print_image('images/sort_down.png', true, ['style' => $selectLastConnectDown]).'</a>';
$table->head[0] = __('User ID').ui_get_sorting_arrows($url_up_id, $url_down_id, $selectUserIDUp, $selectUserIDDown);
$table->head[1] = __('Name').ui_get_sorting_arrows($url_up_name, $url_down_name, $selectFullnameUp, $selectFullnameDown);
$table->head[2] = __('Last contact').ui_get_sorting_arrows($url_up_last, $url_down_last, $selectLastConnectUp, $selectLastConnectDown);
$table->head[3] = __('Admin');
$table->head[4] = __('Profile / Group');
$table->head[5] = __('Description');
@ -514,6 +524,7 @@ foreach ($info as $user_id => $user_info) {
$data[5] = ui_print_string_substr($user_info['comments'], 24, true);
$table->cellclass[][6] = 'action_buttons';
if ($user_info['disabled'] == 0) {
$data[6] = '<a href="index.php?sec='.$sec.'&amp;sec2=godmode/users/user_list&amp;disable_user=1&pure='.$pure.'&amp;id='.$user_info['id_user'].'">'.html_print_image('images/lightbulb.png', true, ['title' => __('Disable')]).'</a>';
} else {
@ -535,6 +546,7 @@ foreach ($info as $user_id => $user_info) {
}
html_print_table($table);
ui_pagination(count($info), false, 0, 0, false, 'offset', true, 'pagination-bottom');
echo '<div style="width: '.$table->width.'" class="action-buttons">';
unset($table);

View File

@ -352,10 +352,10 @@ class DiscoveryTaskList extends Wizard
$url_ajax = $config['homeurl'].'ajax.php';
$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 = [];
@ -566,6 +566,8 @@ class DiscoveryTaskList extends Wizard
$data[9] = '';
}
$table->cellclass[][9] = 'action_buttons';
// Div neccesary for modal progress task.
echo '<div id="progress_task_'.$task['id_rt'].'" style="display:none"></div>';

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 396 B

View File

@ -527,19 +527,19 @@ if (check_login()) {
$show_notinit = (int) get_parameter('show_notinit', 0);
$cluster_list = (int) get_parameter('cluster_list', 0);
$url = 'index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;id_agente='.$id_agent;
$selectTypeUp = '';
$selectTypeDown = '';
$selectNameUp = '';
$selectNameDown = '';
$selectStatusUp = '';
$selectStatusDown = '';
$selectDataUp = '';
$selectDataDown = '';
$selectLastContactUp = '';
$selectLastContactDown = '';
$selectTypeUp = false;
$selectTypeDown = false;
$selectNameUp = false;
$selectNameDown = false;
$selectStatusUp = false;
$selectStatusDown = false;
$selectDataUp = false;
$selectDataDown = false;
$selectLastContactUp = false;
$selectLastContactDown = false;
$sortField = get_parameter('sort_field');
$sort = get_parameter('sort', 'none');
$selected = 'border: 1px solid black;';
$selected = true;
$order[] = [
'field' => 'tmodule_group.name',
@ -627,16 +627,16 @@ if (check_login()) {
break;
default:
$selectTypeUp = '';
$selectTypeDown = '';
$selectTypeUp = false;
$selectTypeDown = false;
$selectNameUp = $selected;
$selectNameDown = '';
$selectStatusUp = '';
$selectStatusDown = '';
$selectDataUp = '';
$selectDataDown = '';
$selectLastContactUp = '';
$selectLastContactDown = '';
$selectNameDown = false;
$selectStatusUp = false;
$selectStatusDown = false;
$selectDataUp = false;
$selectDataDown = false;
$selectLastContactUp = false;
$selectLastContactDown = false;
$order[] = [
'field' => 'tagente_modulo.nombre',
@ -756,11 +756,22 @@ if (check_login()) {
$modules = [];
}
// Urls to sort the table.
$url_up_type = $url.'&sort_field=type&amp;sort=up&refr=&filter_monitors=1&status_filter_monitor='.$status_filter_monitor.' &status_text_monitor='.$status_text_monitor.'&status_module_group= '.$status_module_group;
$url_down_type = $url.'&sort_field=type&amp;sort=down&refr=&filter_monitors=1&status_filter_monitor='.$status_filter_monitor.' &status_text_monitor='.$status_text_monitor.'&status_module_group= '.$status_module_group;
$url_up_name = $url.'&sort_field=name&amp;sort=up&refr=&filter_monitors=1&status_filter_monitor='.$status_filter_monitor.' &status_text_monitor='.$status_text_monitor.'&status_module_group= '.$status_module_group;
$url_down_name = $url.'&sort_field=name&amp;sort=down&refr=&filter_monitors=1&status_filter_monitor='.$status_filter_monitor.' &status_text_monitor='.$status_text_monitor.'&status_module_group= '.$status_module_group;
$url_up_status = $url.'&sort_field=status&amp;sort=up&refr=&filter_monitors=1&status_filter_monitor='.$status_filter_monitor.' &status_text_monitor='.$status_text_monitor.'&status_module_group= '.$status_module_group;
$url_down_status = $url.'&sort_field=status&amp;sort=down&refr=&filter_monitors=1&status_filter_monitor='.$status_filter_monitor.' &status_text_monitor='.$status_text_monitor.'&status_module_group= '.$status_module_group;
$url_up_last = $url.'&sort_field=last_contact&amp;sort=up&refr=&filter_monitors=1&status_filter_monitor='.$status_filter_monitor.' &status_text_monitor='.$status_text_monitor.'&status_module_group= '.$status_module_group;
$url_down_last = $url.'&sort_field=last_contact&amp;sort=down&refr=&filter_monitors=1&status_filter_monitor='.$status_filter_monitor.' &status_text_monitor='.$status_text_monitor.'&status_module_group= '.$status_module_group;
$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 = [];
@ -773,17 +784,15 @@ if (check_login()) {
$table->head[1] = "<span title='".__('Policy')."'>".__('P.').'</span>';
}
$table->head[2] = __('Type').' '.'<a href="'.$url.'&sort_field=type&amp;sort=up&refr=&filter_monitors=1&status_filter_monitor='.$status_filter_monitor.' &status_text_monitor='.$status_text_monitor.'&status_module_group= '.$status_module_group.'">'.html_print_image('images/sort_up.png', true, ['style' => $selectTypeUp, 'alt' => 'up']).'</a>'.'<a href="'.$url.'&sort_field=type&amp;sort=down&refr=&filter_monitors=1&status_filter_monitor='.$status_filter_monitor.' &status_text_monitor='.$status_text_monitor.'&status_module_group= '.$status_module_group.'">'.html_print_image('images/sort_down.png', true, ['style' => $selectTypeDown, 'alt' => 'down']).'</a>';
$table->head[3] = __('Module name').' '.'<a href="'.$url.'&sort_field=name&amp;sort=up&refr=&filter_monitors=1&status_filter_monitor='.$status_filter_monitor.' &status_text_monitor='.$status_text_monitor.'&status_module_group= '.$status_module_group.'">'.html_print_image('images/sort_up.png', true, ['style' => $selectNameUp, 'alt' => 'up']).'</a>'.'<a href="'.$url.'&sort_field=name&amp;sort=down&refr=&filter_monitors=1&status_filter_monitor='.$status_filter_monitor.' &status_text_monitor='.$status_text_monitor.'&status_module_group= '.$status_module_group.'">'.html_print_image('images/sort_down.png', true, ['style' => $selectNameDown, 'alt' => 'down']).'</a>';
$table->head[2] = __('Type').ui_get_sorting_arrows($url_up_type, $url_down_type, $selectTypeUp, $selectTypeDown);
$table->head[3] = __('Module name').ui_get_sorting_arrows($url_up_name, $url_down_name, $selectNameUp, $selectNameDown);
$table->head[4] = __('Description');
$table->head[5] = __('Status').' '.'<a href="'.$url.'&sort_field=status&amp;sort=up&refr=&filter_monitors=1&status_filter_monitor='.$status_filter_monitor.' &status_text_monitor='.$status_text_monitor.'&status_module_group= '.$status_module_group.'">'.html_print_image('images/sort_up.png', true, ['style' => $selectStatusUp, 'alt' => 'up']).'</a>'.'<a href="'.$url.'&sort_field=status&amp;sort=down&refr=&filter_monitors=1&status_filter_monitor='.$status_filter_monitor.' &status_text_monitor='.$status_text_monitor.'&status_module_group= '.$status_module_group.'">'.html_print_image('images/sort_down.png', true, ['style' => $selectStatusDown, 'alt' => 'down']).'</a>';
$table->head[5] = __('Status').ui_get_sorting_arrows($url_up_status, $url_down_status, $selectStatusUp, $selectStatusDown);
$table->head[6] = __('Thresholds');
$table->head[7] = __('Data');
$table->head[8] = __('Graph');
$table->headstyle[8] = 'min-width: 60px';
$table->head[9] = __('Last contact').' '.'<a href="'.$url.'&sort_field=last_contact&amp;sort=up&refr=&filter_monitors=1&status_filter_monitor='.$status_filter_monitor.' &status_text_monitor='.$status_text_monitor.'&status_module_group= '.$status_module_group.'">'.html_print_image('images/sort_up.png', true, ['style' => $selectLastContactUp, 'alt' => 'up']).'</a>'.'<a href="'.$url.'&sort_field=last_contact&amp;sort=down&refr=&filter_monitors=1&status_filter_monitor='.$status_filter_monitor.' &status_text_monitor='.$status_text_monitor.'&status_module_group= '.$status_module_group.'">'.html_print_image('images/sort_down.png', true, ['style' => $selectLastContactDown, 'alt' => 'down']).'</a>';
$table->head[9] = __('Last contact').ui_get_sorting_arrows($url_up_last, $url_down_last, $selectLastContactUp, $selectLastContactDown);
$table->align = [
'left',
'left',
@ -896,7 +905,7 @@ if (check_login()) {
$data[2] = servers_show_type($module['id_modulo']).'&nbsp;';
if (check_acl($config['id_user'], $id_grupo, 'AW')) {
$data[2] .= '<a href="index.php?sec=gagente&amp;sec2=godmode/agentes/configurar_agente&amp;id_agente='.$id_agente.'&amp;tab=module&amp;id_agent_module='.$module['id_agente_modulo'].'&amp;edit_module='.$module['id_modulo'].'">'.html_print_image('images/config.png', true, ['alt' => '0', 'border' => '', 'title' => __('Edit')]).'</a>';
$data[2] .= '<a href="index.php?sec=gagente&amp;sec2=godmode/agentes/configurar_agente&amp;id_agente='.$id_agente.'&amp;tab=module&amp;id_agent_module='.$module['id_agente_modulo'].'&amp;edit_module='.$module['id_modulo'].'">'.html_print_image('images/config.png', true, ['alt' => '0', 'border' => '', 'title' => __('Edit'), 'class' => 'action_button_img']).'</a>';
}
@ -1199,7 +1208,7 @@ if (check_login()) {
false,
'offset',
true,
'',
'pagination-bottom',
'pagination_list_modules(offset_param)',
[
'count' => '',

View File

@ -389,10 +389,12 @@ class ManageNetScanScripts extends Wizard
$rows = db_get_all_rows_in_table('trecon_script');
if ($rows !== false) {
echo '<table width="100%" cellspacing="4" cellpadding="4" class="databox data">';
echo '<table width="100%" cellspacing="0" cellpadding="0" class="info_table">';
echo '<thead>';
echo '<th>'.__('Name').'</th>';
echo '<th>'.__('Description').'</th>';
echo '<th>'.__('Delete').'</th>';
echo '</thead>';
$color = 0;
foreach ($rows as $row) {
if ($color == 1) {

View File

@ -513,34 +513,81 @@ function filemanager_file_explorer(
?>
<script type="text/javascript">
function show_form_create_folder() {
show_main_buttons_folder()
$("#table_filemanager-1").css('display', '');
$("#main_buttons").css("display", "none");
$("#create_folder").css("display", "");
}
function show_upload_file() {
show_main_buttons_folder()
$("#table_filemanager-1").css('display', '');
$("#main_buttons").css("display", "none");
$("#upload_file").css("display", "");
}
actions_dialog('create_folder');
$("#create_folder").css("display", "block");
check_opened_dialog('create_folder');
}
function show_create_text_file() {
show_main_buttons_folder()
$("#table_filemanager-1").css('display', '');
$("#main_buttons").css("display", "none");
$("#create_text_file").css("display", "");
actions_dialog('create_text_file');
$("#create_text_file").css("display", "block");
check_opened_dialog('create_text_file');
}
function show_main_buttons_folder() {
$("#table_filemanager-1").css('display', 'none');
$("#create_folder").css("display", "none");
$("#upload_file").css("display", "none");
$("#create_text_file").css("display", "none");
function show_upload_file() {
actions_dialog('upload_file');
$("#upload_file").css("display", "block");
check_opened_dialog('upload_file');
}
function check_opened_dialog(check_opened){
if(check_opened !== 'create_folder'){
if (($("#create_folder").hasClass("ui-dialog-content") && $('#create_folder').dialog('isOpen') === true)) {
$('#create_folder').dialog('close');
}
}
if(check_opened !== 'create_text_file'){
if (($("#create_text_file").hasClass("ui-dialog-content") && $('#create_text_file').dialog('isOpen') === true)) {
$('#create_text_file').dialog('close');
}
}
if(check_opened !== 'upload_file'){
if (($("#upload_file").hasClass("ui-dialog-content") && $('#upload_file').dialog('isOpen')) === true) {
$('#upload_file').dialog('close');
}
}
}
function actions_dialog(action){
$('.'+action).addClass('file_table_modal_active');
var title_action ='';
switch (action) {
case 'create_folder':
title_action = "<?php echo __('Create a Directory'); ?>";
break;
case 'create_text_file':
title_action = "<?php echo __('Create a Text'); ?>";
break;
case 'upload_file':
title_action = "<?php echo __('Upload Files'); ?>";
break;
default:
break;
}
$('#'+action)
.dialog({
title: title_action,
resizable: true,
draggable: true,
modal: true,
overlay: {
opacity: 0.5,
background: "black"
},
width: 500,
minWidth: 500,
minHeight: 210,
maxWidth: 800,
maxHeight: 300,
close: function () {
$('.'+action).removeClass('file_table_modal_active');
}
}).show();
}
</script>
<?php
@ -556,7 +603,7 @@ function filemanager_file_explorer(
$table->width = '100%';
$table->id = 'table_filemanager';
if (!defined('METACONSOLE')) {
$table->class = 'databox data';
$table->class = 'info_table';
$table->title = '<span>'.__('Index of %s', $relative_directory).'</span>';
}
@ -582,13 +629,6 @@ function filemanager_file_explorer(
$table->head[2] = __('Last modification');
$table->head[3] = __('Size');
$table->head[4] = __('Actions');
if (!defined('METACONSOLE')) {
$table->headstyle[0] = 'background-color:#82B92E';
$table->headstyle[1] = 'background-color:#82B92E';
$table->headstyle[2] = 'background-color:#82B92E';
$table->headstyle[3] = 'background-color:#82B92E';
$table->headstyle[4] = 'background-color:#82B92E';
}
$prev_dir = explode('/', $relative_directory);
$prev_dir_str = '';
@ -608,85 +648,6 @@ function filemanager_file_explorer(
$table->colspan[0][1] = 5;
}
if (is_writable($real_directory)) {
$table->rowstyle[1] = 'display: none;';
$table->data[1][0] = '';
$table->data[1][1] = '';
$table->data[1][1] .= '<div id="create_folder" style="display: none;">';
$table->data[1][1] .= '<form method="post" action="'.$url.'">';
$table->data[1][1] .= html_print_input_text('dirname', '', '', 30, 255, true);
$table->data[1][1] .= '&nbsp;&nbsp;'.html_print_submit_button(__('Create'), 'crt', false, 'class="sub next"', true);
$table->data[1][1] .= '&nbsp;&nbsp;'.html_print_button(
__('Close'),
'close',
false,
'show_main_buttons_folder();',
"class='sub cancel'",
true
);
$table->data[1][1] .= html_print_input_hidden('directory', $relative_directory, true);
$table->data[1][1] .= html_print_input_hidden('create_dir', 1, true);
$table->data[1][1] .= html_print_input_hidden('hash', md5($relative_directory.$config['dbpass']), true);
$table->data[1][1] .= html_print_input_hidden('hash2', md5($relative_directory.$config['dbpass']), true);
$table->data[1][1] .= '</form>';
$table->data[1][1] .= '</div>';
$table->data[1][1] .= '<div id="upload_file" style="display: none;">';
$table->data[1][1] .= '<form method="post" action="'.$url.'" enctype="multipart/form-data">';
$table->data[1][1] .= ui_print_help_tip(__('The zip upload in this dir, easy to upload multiple files.'), true);
$table->data[1][1] .= html_print_input_file('file', true, false);
$table->data[1][1] .= html_print_input_hidden('umask', $umask, true);
$table->data[1][1] .= html_print_checkbox('decompress', 1, false, true);
$table->data[1][1] .= __('Decompress');
$table->data[1][1] .= '&nbsp;&nbsp;&nbsp;';
$table->data[1][1] .= '&nbsp;&nbsp;'.html_print_submit_button(__('Go'), 'go', false, 'class="sub next"', true);
$table->data[1][1] .= '&nbsp;&nbsp;'.html_print_button(
__('Close'),
'close',
false,
'show_main_buttons_folder();',
"class='sub cancel'",
true
);
$table->data[1][1] .= html_print_input_hidden('real_directory', $real_directory, true);
$table->data[1][1] .= html_print_input_hidden('directory', $relative_directory, true);
$table->data[1][1] .= html_print_input_hidden('hash', md5($real_directory.$relative_directory.$config['dbpass']), true);
$table->data[1][1] .= html_print_input_hidden('hash2', md5($relative_directory.$config['dbpass']), true);
$table->data[1][1] .= html_print_input_hidden('upload_file_or_zip', 1, true);
$table->data[1][1] .= '</form>';
$table->data[1][1] .= '</div>';
$table->data[1][1] .= '<div id="create_text_file" style="display: none;">';
$table->data[1][1] .= '<form method="post" action="'.$url.'">';
$table->data[1][1] .= html_print_input_text('name_file', '', '', 30, 50, true);
$table->data[1][1] .= '&nbsp;&nbsp;'.html_print_submit_button(__('Create'), 'create', false, 'class="sub next"', true);
$table->data[1][1] .= '&nbsp;&nbsp;'.html_print_button(
__('Close'),
'close',
false,
'show_main_buttons_folder();',
"class='sub cancel'",
true
);
$table->data[1][1] .= html_print_input_hidden('real_directory', $real_directory, true);
$table->data[1][1] .= html_print_input_hidden('directory', $relative_directory, true);
$table->data[1][1] .= html_print_input_hidden('hash', md5($real_directory.$relative_directory.$config['dbpass']), true);
$table->data[1][1] .= html_print_input_hidden('umask', $umask, true);
$table->data[1][1] .= html_print_input_hidden('create_text_file', 1, true);
$table->data[1][1] .= '</form>';
$table->data[1][1] .= '</div>';
$table->colspan[1][1] = 5;
}
foreach ($files as $fileinfo) {
$fileinfo['realpath'] = str_replace('\\', '/', $fileinfo['realpath']);
$relative_path = str_replace($_SERVER['DOCUMENT_ROOT'], '', $fileinfo['realpath']);
@ -815,10 +776,45 @@ function filemanager_file_explorer(
if (defined('METACONSOLE')) {
echo "<div style='text-align: left; width: ".$table->width.";'>";
} else {
echo "<div style='text-align: right; width: ".$table->width."; margin-bottom:5px;'>";
$tabs_dialog = '<ul id="file_table_modal">
<li class="create_folder">
<a href="javascript: show_form_create_folder();">'.html_print_image(
'images/create_directory.png',
true,
['title' => __('Create directory')]
).'<span>'.__('Create a Directory').'</span>
</a>
</li>
<li class="create_text_file">
<a href="javascript: show_create_text_file();">'.html_print_image(
'images/create_file.png',
true,
['title' => __('Create a Text')]
).'<span>'.__('Create a Text').'</span>
</a>
</li>
<li class="upload_file">
<a href="javascript: show_upload_file();">'.html_print_image(
'images/upload_file.png',
true,
['title' => __('Upload Files')]
).'<span>'.__('Upload Files').'</span>
</a>
</li></ul>';
echo '<div id="create_folder" style="display: none;">'.$tabs_dialog.'
<form method="post" action="'.$url.'">'.html_print_input_text('dirname', '', '', 30, 255, true).html_print_submit_button(__('Create'), 'crt', false, 'class="sub next"', true).html_print_input_hidden('directory', $relative_directory, true).html_print_input_hidden('create_dir', 1, true).html_print_input_hidden('hash', md5($relative_directory.$config['dbpass']), true).html_print_input_hidden('hash2', md5($relative_directory.$config['dbpass']), true).'</form></div>';
echo '<div id="upload_file" style="display: none;"> '.$tabs_dialog.'
<form method="post" action="'.$url.'" enctype="multipart/form-data">'.ui_print_help_tip(__('The zip upload in this dir, easy to upload multiple files.'), true).html_print_input_file('file', true, false).html_print_input_hidden('umask', $umask, true).html_print_checkbox('decompress', 1, false, true).__('Decompress').html_print_submit_button(__('Go'), 'go', false, 'class="sub next"', true).html_print_input_hidden('real_directory', $real_directory, true).html_print_input_hidden('directory', $relative_directory, true).html_print_input_hidden('hash', md5($real_directory.$relative_directory.$config['dbpass']), true).html_print_input_hidden('hash2', md5($relative_directory.$config['dbpass']), true).html_print_input_hidden('upload_file_or_zip', 1, true).'</form></div>';
echo ' <div id="create_text_file" style="display: none;">'.$tabs_dialog.'
<form method="post" action="'.$url.'">'.html_print_input_text('name_file', '', '', 30, 50, true).html_print_submit_button(__('Create'), 'create', false, 'class="sub next"', true).html_print_input_hidden('real_directory', $real_directory, true).html_print_input_hidden('directory', $relative_directory, true).html_print_input_hidden('hash', md5($real_directory.$relative_directory.$config['dbpass']), true).html_print_input_hidden('umask', $umask, true).html_print_input_hidden('create_text_file', 1, true).'</form></div>';
echo "<div style='width: ".$table->width.";' class='file_table_buttons'>";
}
echo "<a href='javascript: show_form_create_folder();' style='margin-right: 3px; margin-bottom: 5px;'>";
echo "<a href='javascript: show_form_create_folder();'>";
echo html_print_image(
'images/create_directory.png',
true,
@ -826,7 +822,7 @@ function filemanager_file_explorer(
);
echo '</a>';
echo "<a href='javascript: show_create_text_file();' style='margin-right: 3px; margin-bottom: 5px;'>";
echo "<a href='javascript: show_create_text_file();'>";
echo html_print_image(
'images/create_file.png',
true,
@ -844,7 +840,7 @@ function filemanager_file_explorer(
echo '</div>';
} else {
echo "<div style='text-align: right; width: ".$table->width."; color:#AC4444;'>";
echo "<div style='text-align: right; width: ".$table->width."; color:#AC4444; margin-bottom:10px;'>";
echo "<image src='images/info.png' />".__('The directory is read-only');
echo '</div>';
}

View File

@ -972,6 +972,23 @@ function ui_format_alert_row($alert, $agent=true, $url='', $agent_style=false)
$data = [];
// Validate checkbox
if (!defined('METACONSOLE')) {
if (check_acl($config['id_user'], $id_group, 'LW') || check_acl($config['id_user'], $id_group, 'LM')) {
$data[$index['validate']] = '';
$data[$index['validate']] .= html_print_checkbox(
'validate[]',
$alert['id'],
false,
true,
false,
'',
true
);
}
}
if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) {
if (is_metaconsole()) {
$node = metaconsole_get_connection_by_id($alert['server_data']['id']);
@ -1102,22 +1119,6 @@ function ui_format_alert_row($alert, $agent=true, $url='', $agent_style=false)
$data[$index['status']] = ui_print_status_image($status, $title, true);
if (!defined('METACONSOLE')) {
if (check_acl($config['id_user'], $id_group, 'LW') || check_acl($config['id_user'], $id_group, 'LM')) {
$data[$index['validate']] = '';
$data[$index['validate']] .= html_print_checkbox(
'validate[]',
$alert['id'],
false,
true,
false,
'',
true
);
}
}
return $data;
}
@ -1880,7 +1881,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>';
@ -1906,10 +1907,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)) {
@ -1925,10 +1927,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>&nbsp;';
$output .= "<a class='pagination-arrows $other_class offset_0'
href='javascript: $script_modified;'>".html_print_image('images/go_first_g.png', true, ['class' => 'bot']).'</a>';
} else {
$output .= "<a class='pagination $other_class offset_0' href='$url&amp;$offset_name=0'>".html_print_image('images/go_first.png', true, ['class' => 'bot']).'</a>&nbsp;';
$output .= "<a class='pagination-arrows $other_class offset_0' href='$url&amp;$offset_name=0'>".html_print_image('images/go_first_g.png', true, ['class' => 'bot']).'</a>';
}
}
@ -1954,10 +1956,10 @@ function ui_pagination(
$script_modified
);
$output .= "<a class='pagination $other_class offset_$offset_previous_page'
href='javacript: $script_modified;'>".html_print_image('images/go_previous.png', true, ['class' => 'bot']).'</a>';
$output .= "<a class='pagination-arrows $other_class offset_$offset_previous_page'
href='javacript: $script_modified;'>".html_print_image('images/go_previous_g.png', true, ['class' => 'bot']).'</a>';
} else {
$output .= "<a class='pagination $other_class offset_$offset_previous_page' href='$url&amp;$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&amp;$offset_name=$offset_previous_page'>".html_print_image('images/go_previous_g.png', true, ['class' => 'bot']).'</a>';
}
}
@ -1966,9 +1968,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);
@ -1986,15 +1988,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&amp;$offset_name=$offset_page'>";
$output .= "<a class='offset_$offset_page' href='$url&amp;$offset_name=$offset_page'>";
}
$output .= "[ $iterator ]";
$output .= $iterator;
$output .= '</a></span>';
$output .= '</a></div>';
}
// Show NEXT PAGE GROUP OF PAGES
@ -2019,10 +2021,10 @@ function ui_pagination(
$script_modified
);
$output .= "<a class='pagination $other_class offset_$offset_next_page'
href='javascript: $script_modified;'>".html_print_image('images/go_next.png', true, ['class' => 'bot']).'</a>';
$output .= "<a class='pagination-arrows $other_class offset_$offset_next_page'
href='javascript: $script_modified;'>".html_print_image('images/go_next_g.png', true, ['class' => 'bot']).'</a>';
} else {
$output .= "<a class='pagination $other_class offset_$offset_next_page' href='$url&amp;$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&amp;$offset_name=$offset_next_page'>".html_print_image('images/go_next_g.png', true, ['class' => 'bot']).'</a>';
}
}
@ -2043,13 +2045,15 @@ function ui_pagination(
$script_modified
);
$output .= "<a class='pagination $other_class offset_$offset_lastpage'
href='javascript: $script_modified;'>".html_print_image('images/go_last.png', true, ['class' => 'bot']).'</a>';
$output .= "<a class='pagination-arrows $other_class offset_$offset_lastpage'
href='javascript: $script_modified;'>".html_print_image('images/go_last_g.png', true, ['class' => 'bot']).'</a>';
} else {
$output .= "<a class='pagination $other_class offset_$offset_lastpage' href='$url&amp;$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&amp;$offset_name=$offset_lastpage'>".html_print_image('images/go_last_g.png', true, ['class' => 'bot']).'</a>';
}
}
$output .= '</div>';
// total_number
// End div and layout
$output .= '</div>';
@ -4421,3 +4425,34 @@ function ui_get_favicon()
return 'images/custom_favicon/'.$config['custom_favicon'];
}
/**
* Show sorting arrows for tables
*
* @return string HTML anchor link with the arrow icon.
*/
function ui_get_sorting_arrows($url_up, $url_down, $selectUp, $selectDown)
{
$arrow_up = 'images/sort_up_black.png';
$arrow_down = 'images/sort_down_black.png';
// Green arrows for the selected.
if ($selectUp === true) {
$arrow_up = 'images/sort_up_green.png';
}
if ($selectDown === true) {
$arrow_down = 'images/sort_down_green.png';
}
if (is_metaconsole()) {
$arrow_up = 'images/sort_up.png';
$arrow_down = 'images/sort_down.png';
}
return '<span class="sort_arrow">
<a href="'.$url_up.'">'.html_print_image($arrow_up, true, ['alt' => 'up']).'</a>
<a href="'.$url_down.'">'.html_print_image($arrow_down, true, ['alt' => 'down']).'</a>
</span>';
}

View File

@ -260,11 +260,6 @@ ul li {
}
/* End */
ul li a:hover {
color: #e2144a;
} /* Hover Styles */
/*li ul li a { padding: 2px 5px; } Sub Menu Styles */
/*
* ---------------------------------------------------------------------
* - MAIN LEFT MENU and SUBMENU -

View File

@ -998,22 +998,6 @@ div#cont {
background-color: #80BA27 !important;
}*/
/*tr.datos, tr.datost, tr.datosb , tr.datos_id,
tr.datosf9 {
#background-color: #eaeaea;
}
tr.datos2, tr.datos2t,
tr.datos2b, tr.datos2_id , tr.datos2f9 {
#background-color: #f2f2f2;
}
tr.datos:hover, tr.datost:hover, tr.datosb:hover, tr.datos_id:hover,
tr.datosf9:hover, tr.datos2:hover, tr.datos2t:hover,
tr.datos2b:hover, tr.datos2_id:hover, tr.datos2f9:hover {
#background-color: #efefef;
}*/
/*
* ---------------------------------------------------------------------
* - REPORTS -
@ -1030,17 +1014,26 @@ tr.datos2b:hover, tr.datos2_id:hover, tr.datos2f9:hover {
}
td.datos3,
td.datos3 * {
background-color: #666;
color: white !important;
td.datos4 {
background-color: #fff;
color: #000 !important;
border-bottom: 2px solid #82b92e !important;
border-left: none !important;
border-right: none !important;
height: 30px;
font-size: 8.6pt;
font-weight: normal;
}
td.datos4,
td.datos4 * {
td.datos4 {
/*Add !important because in php the function html_print_table write style in cell and this is style head.*/
text-align: center !important;
background-color: #666;
color: white !important;
}
td.datos3 *,
td.datos4 * {
font-size: 8.6pt;
font-weight: normal;
}
/*td.datos_id {
@ -2111,7 +2104,7 @@ a.autorefresh_txt,
font-size: 8.5pt;
}
@media screen and (min-width: 1024px) and (max-width: 1200px) {
@media screen and (max-width: 1200px) {
#header_searchbar input.search_input {
width: 135px;
}
@ -2171,10 +2164,6 @@ div#logo_text3 {
margin-left: 4px;
padding-top: 0px;
}*/
.pagination {
margin-top: 15px;
margin-bottom: 5px;
}
.pagination * {
margin-left: 0px !important;
margin-right: 0px !important;
@ -3312,8 +3301,7 @@ div.div_groups_status {
}
.databox.filters,
.databox.data,
.databox.profile_list {
.databox.data {
margin-bottom: 20px;
}
@ -3321,14 +3309,6 @@ div.div_groups_status {
padding: 10px;
padding-left: 20px;
}
.databox.profile_list > tbody > tr > td {
padding: 4px 1px;
padding-left: 5px;
border-bottom: 1px solid #e2e2e2;
}
.databox.profile_list > tbody > tr > a.tip > img {
margin: 0px;
}
.databox.filters > tbody > tr > td > img,
.databox.filters > tbody > tr > td > div > a > img,
@ -3958,7 +3938,7 @@ span.log_zone_line_error {
background-color: #eee;
}
.checkselected {
background-color: #eee;
background-color: #eee !important;
}
.tag-wrapper {
padding: 0 10px 0 0;
@ -5034,3 +5014,427 @@ 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: 10px;
border-spacing: 0;
}
table.info_table > tbody > tr:nth-child(even) {
background-color: #f5f5f5;
}
table.info_table tr:first-child > th {
background-color: #fff;
border-top: 1px solid #e2e2e2;
color: #000;
text-align: left;
vertical-align: middle;
}
table.info_table th {
font-size: 7.5pt;
letter-spacing: 0.3pt;
color: #000;
background-color: #fff;
}
table.info_table > thead > tr > th:first-child {
border-left: 1px solid #e2e2e2;
}
table.info_table > thead > tr > th:last-child {
border-right: 1px solid #e2e2e2;
}
table.info_table tr th {
border-bottom: 1px solid #e2e2e2;
}
table.info_table > thead > tr:first-child > th:last-child {
border-top-right-radius: 4px;
}
table.info_table > thead > tr:first-child > th:first-child {
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-left: 9px;
padding-right: 9px;
padding-top: 9px;
padding-bottom: 9px;
font-weight: normal;
color: #000;
font-size: 8.6pt;
}
table.info_table > tbody > tr > td {
-moz-border-radius: 0px;
-webkit-border-radius: 0px;
border-radius: 0px;
border: none;
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 !important;
}
.info_table.profile_list > thead > tr > th > a.tip {
padding: 0px;
}
/* This class is for the icons of actions and operations in the tables. */
.action_buttons a[href] img,
.action_buttons input[type="image"],
.action_button_img {
border-radius: 4px;
border: 1px solid #dcdcdc !important;
padding: 1px;
box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
max-width: 21px;
background-color: transparent !important; /*BORRAR*/
}
/* This class is for only one icon to be a button type. */
.action_button_img {
cursor: pointer;
}
.action_buttons a,
.action_buttons input[type="image"] {
margin-right: 5px;
}
.action_buttons a:last-child,
.action_buttons input[type="image"]:last-child {
margin-right: 0px;
}
.action_buttons a:hover {
background-color: #fff;
display: inline-block;
border-radius: 4px;
}
.action_buttons input[type="image"]:hover {
background-color: #fff !important;
}
/* Tables to upload files */
#table_filemanager tr:first-child th span {
font-weight: bold;
}
.file_table_buttons {
text-align: right;
margin-bottom: 10px;
}
.file_table_buttons a img {
border: 1px solid #e2e2e2;
padding: 5px;
border-radius: 4px;
margin-right: 10px;
box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
}
#file_table_modal {
display: flex;
justify-content: space-between;
margin-bottom: 40px;
}
#file_table_modal .create_folder,
#file_table_modal .create_text_file,
#file_table_modal .upload_file {
width: 33%;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
margin-right: 2px;
background-color: #e6e6e6;
}
.file_table_buttons a:last-child img,
#file_table_modal .upload_file {
margin-right: 0px !important;
}
#file_table_modal li a {
display: block;
padding: 5px;
}
#file_table_modal li img,
#file_table_modal li span {
vertical-align: middle;
}
#file_table_modal li img {
margin-right: 10px;
}
#create_folder,
#create_text_file,
#upload_file {
margin-bottom: 30px;
}
#create_folder input#text-dirname,
#create_text_file input#text-name_file {
width: 100%;
margin-right: 5px;
box-sizing: border-box;
margin-bottom: 10px;
}
#upload_file input#file-file {
width: 70%;
}
#create_folder input#submit-crt,
#create_text_file input#submit-create,
#upload_file input#submit-go {
float: right;
}
#upload_file input#submit-go {
margin-top: 10px;
}
.file_table_modal_active {
background-color: #fff !important;
border: 1px solid #e6e6e6;
border-bottom: none;
}
/* Inventory table */
.inventory_table_buttons {
text-align: right;
margin-bottom: 10px;
}
.inventory_table_buttons a {
font-weight: bolder;
display: inline-block;
border: 1px solid #e2e2e2;
padding: 8px;
border-radius: 4px;
box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
}
.inventory_table_buttons a img,
.inventory_table_buttons a span {
vertical-align: middle;
}
.inventory_table_buttons a img {
padding-left: 10px;
}
.inventory_tables thead th span:first-child {
float: left;
font-weight: bold;
}
.inventory_tables thead th span {
font-size: 8.6pt;
}
.inventory_tables tbody > tr:first-child {
font-weight: bold;
}
/* Tag view */
table.info_table.agent_info_table {
margin-bottom: 20px;
}
table.agent_info_table tr {
background-color: #fff !important;
}
table.agent_info_table > tbody > tr > td {
border-bottom: none;
}
table.agent_info_table > tbody > tr:last-child > td {
border-bottom: 1px solid #e2e2e2;
}
table.agent_info_table thead > tr:first-child th {
background-color: #f5f5f5;
}
table.agent_info_table thead > tr:first-child th span,
table.agent_info_table thead > tr:first-child th {
font-weight: bold;
font-size: 8.6pt;
}
table.info_table.agent_info_table td {
padding-left: 20px;
padding-right: 20px;
}
table.info_table.agent_info_table table#agent_table {
padding-top: 15px;
}
table.info_table.agent_info_table table#module_table {
padding-top: 10px;
padding-bottom: 15px;
}
table.info_table.agent_info_table table.info_table {
margin-bottom: 0;
}
.agent_info_table_opened {
background-color: #82b92e !important;
color: #fff !important;
border-color: #82b92e !important;
}
.agent_info_table_closed {
background-color: #fff !important;
color: #000 !important;
border-radius: 4px;
}
/* Tag view */
table.info_table.policy_table tr {
background-color: #fff !important;
}
table.info_table.policy_sub_table thead > tr:first-child th {
background-color: #f5f5f5;
}
table.info_table.policy_sub_table {
padding: 20px 15px;
margin-bottom: 0;
}
/* Arrows to sort the tables. */
.sort_arrow {
display: inline-grid;
vertical-align: middle;
}
.sort_arrow a {
padding: 0 0 0 5px !important;
}
/*
* ---------------------------------------------------------------------
* - PAGINATION
* ---------------------------------------------------------------------
*/
.pagination {
display: flex;
justify-content: space-between;
align-items: flex-end;
margin-bottom: 10px;
margin-top: 15px;
}
.pagination .page_number {
border: 1px solid #cacaca;
border-right: 0px;
text-align: center;
}
.pagination .page_number a {
padding: 5px;
min-width: 12px;
display: block;
}
.pagination .page_number:hover,
.pagination .pagination-arrows:hover {
background-color: #e2e2e2;
}
.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: 0px;
align-items: flex-start;
}

View File

@ -1254,6 +1254,11 @@ require 'include/php_to_js_values.php';
<script type="text/javascript" language="javascript">
// When there are less than 5 rows, all rows must be white
if($('table.info_table tr').length < 5){
$('table.info_table tbody > tr').css('background-color', '#fff');
}
// When the user scrolls down 400px from the top of the document, show the button.
window.onscroll = function() {scrollFunction()};

View File

@ -220,13 +220,13 @@ if ($free_search != '') {
$sortField = get_parameter('sort_field');
$sort = get_parameter('sort', 'none');
$selected = 'border: 1px solid black;';
$selectAgentUp = '';
$selectAgentDown = '';
$selectModuleUp = '';
$selectModuleDown = '';
$selectTemplateUp = '';
$selectTemplateDown = '';
$selected = true;
$selectAgentUp = false;
$selectAgentDown = false;
$selectModuleUp = false;
$selectModuleDown = false;
$selectTemplateUp = false;
$selectTemplateDown = false;
switch ($sortField) {
case 'agent':
switch ($sort) {
@ -292,12 +292,12 @@ switch ($sortField) {
if ($print_agent) {
$selectDisabledUp = '';
$selectDisabledDown = '';
$selectAgentUp = '';
$selectAgentDown = '';
$selectAgentUp = false;
$selectAgentDown = false;
$selectModuleUp = $selected;
$selectModuleDown = '';
$selectTemplateUp = '';
$selectTemplateDown = '';
$selectModuleDown = false;
$selectTemplateUp = false;
$selectTemplateDown = false;
$order = [
'field' => 'agent_module_name',
'order' => 'ASC',
@ -305,12 +305,12 @@ switch ($sortField) {
} else {
$selectDisabledUp = '';
$selectDisabledDown = '';
$selectAgentUp = '';
$selectAgentDown = '';
$selectAgentUp = false;
$selectAgentDown = false;
$selectModuleUp = $selected;
$selectModuleDown = '';
$selectTemplateUp = '';
$selectTemplateDown = '';
$selectModuleDown = false;
$selectTemplateUp = false;
$selectTemplateDown = false;
$order = [
'field' => 'agent_module_name',
'order' => 'ASC',
@ -440,9 +440,17 @@ if ($print_agent) {
}
}
// Urls to sort the table.
$url_up_agente = $url.'&sort_field=agent&sort=up';
$url_down_agente = $url.'&sort_field=agent&sort=down';
$url_up_module = $url.'&sort_field=module&sort=up';
$url_down_module = $url.'&sort_field=module&sort=down';
$url_up_template = $url.'&sort_field=template&sort=up';
$url_down_template = $url.'&sort_field=template&sort=down';
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox data';
$table->class = 'info_table';
$table->cellpadding = '0';
$table->cellspacing = '0';
$table->size = [];
@ -451,6 +459,15 @@ $table->align = [];
if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) {
if ($print_agent) {
if (!is_metaconsole()) {
$table->size[8] = '4%';
if (check_acl($config['id_user'], $id_group, 'LW') || check_acl($config['id_user'], $id_group, 'LM')) {
$table->head[9] = html_print_checkbox('all_validate', 0, false, true, false);
$table->align[9] = 'left';
$table->size[9] = '5%';
}
}
$table->head[0] = "<span title='".__('Policy')."'>".__('P.').'</span>';
$table->head[1] = "<span title='".__('Standby')."'>".__('S.').'</span>';
@ -467,24 +484,24 @@ if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) {
$table->head[6] = __('Action');
$table->head[7] = __('Last fired');
$table->head[8] = __('Status');
if (!is_metaconsole()) {
$table->size[8] = '4%';
if (check_acl($config['id_user'], $id_group, 'LW') || check_acl($config['id_user'], $id_group, 'LM')) {
$table->head[9] = __('Validate').html_print_checkbox('all_validate', 0, false, true, false);
$table->align[9] = 'center';
$table->size[9] = '5%';
}
}
$table->align[8] = 'center';
// Sort buttons are only for normal console
if (!is_metaconsole()) {
$table->head[3] .= ' '.'<a href="'.$url.'&sort_field=agent&sort=up">'.html_print_image('images/sort_up.png', true, ['style' => $selectAgentUp]).'</a>'.'<a href="'.$url.'&sort_field=agent&sort=down">'.html_print_image('images/sort_down.png', true, ['style' => $selectAgentDown]).'</a>';
$table->head[4] .= ' '.'<a href="'.$url.'&sort_field=module&sort=up">'.html_print_image('images/sort_up.png', true, ['style' => $selectModuleUp]).'</a>'.'<a href="'.$url.'&sort_field=module&sort=down">'.html_print_image('images/sort_down.png', true, ['style' => $selectModuleDown]).'</a>';
$table->head[5] .= ' '.'<a href="'.$url.'&sort_field=template&sort=up">'.html_print_image('images/sort_up.png', true, ['style' => $selectTemplateUp]).'</a>'.'<a href="'.$url.'&sort_field=template&sort=down">'.html_print_image('images/sort_down.png', true, ['style' => $selectTemplateDown]).'</a>';
$table->head[3] .= ui_get_sorting_arrows($url_up_agente, $url_down_agente, $selectAgentUp, $selectAgentDown);
$table->head[4] .= ui_get_sorting_arrows($url_up_module, $url_down_module, $selectModuleUp, $selectModuleDown);
$table->head[5] .= ui_get_sorting_arrows($url_up_template, $url_down_template, $selectTemplateUp, $selectTemplateDown);
}
} else {
if (!is_metaconsole()) {
$table->size[7] = '5%';
if (check_acl_one_of_groups($config['id_user'], $all_groups, 'LW') || check_acl_one_of_groups($config['id_user'], $all_groups, 'LM')) {
$table->align[8] = 'left';
$table->size[8] = '5%';
}
}
$table->head[0] = "<span title='".__('Policy')."'>".__('P.').'</span>';
$table->head[1] = "<span title='".__('Standby')."'>".__('S.').'</span>';
@ -500,25 +517,26 @@ if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) {
$table->head[5] = __('Action');
$table->head[6] = __('Last fired');
$table->head[7] = __('Status');
if (!is_metaconsole()) {
$table->size[7] = '5%';
if (check_acl_one_of_groups($config['id_user'], $all_groups, 'LW') || check_acl_one_of_groups($config['id_user'], $all_groups, 'LM')) {
$table->head[8] = __('Validate');
$table->align[8] = 'center';
$table->size[8] = '5%';
}
}
$table->align[7] = 'center';
// Sort buttons are only for normal console
if (!is_metaconsole()) {
$table->head[3] .= ' '.'<a href="'.$url.'&sort_field=module&sort=up">'.html_print_image('images/sort_up.png', true, ['style' => $selectModuleUp]).'</a>'.'<a href="'.$url.'&sort_field=module&sort=down">'.html_print_image('images/sort_down.png', true, ['style' => $selectModuleDown]).'</a>';
$table->head[4] .= ' '.'<a href="'.$url.'&sort_field=template&sort=up">'.html_print_image('images/sort_up.png', true, ['style' => $selectTemplateUp]).'</a>'.'<a href="'.$url.'&sort_field=template&sort=down">'.html_print_image('images/sort_down.png', true, ['style' => $selectTemplateDown]).'</a>';
$table->head[3] .= ui_get_sorting_arrows($url_up_module, $url_down_module, $selectModuleUp, $selectModuleDown);
$table->head[4] .= ui_get_sorting_arrows($url_up_template, $url_down_template, $selectTemplateUp, $selectTemplateDown);
}
}
} else {
if ($print_agent) {
if (!is_metaconsole()) {
$table->size[7] = '5%';
if (check_acl($config['id_user'], $id_group, 'LW') || check_acl($config['id_user'], $id_group, 'LM')) {
$table->align[8] = 'left';
$table->size[8] = '5%';
}
}
$table->head[0] = "<span title='".__('Standby')."'>".__('S.').'</span>';
if (!is_metaconsole()) {
if (check_acl($config['id_user'], $id_group, 'AW') || check_acl($config['id_user'], $id_group, 'LM')) {
@ -532,24 +550,24 @@ if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) {
$table->head[5] = __('Action');
$table->head[6] = __('Last fired');
$table->head[7] = __('Status');
if (!is_metaconsole()) {
$table->size[7] = '5%';
if (check_acl($config['id_user'], $id_group, 'LW') || check_acl($config['id_user'], $id_group, 'LM')) {
$table->head[8] = __('Validate');
$table->align[8] = 'center';
$table->size[8] = '5%';
}
}
$table->align[7] = 'center';
// Sort buttons are only for normal console
if (!is_metaconsole()) {
$table->head[2] .= ' '.'<a href="'.$url.'&sort_field=agent&sort=up">'.html_print_image('images/sort_up.png', true, ['style' => $selectAgentUp]).'</a>'.'<a href="'.$url.'&sort_field=agent&sort=down">'.html_print_image('images/sort_down.png', true, ['style' => $selectAgentDown]).'</a>';
$table->head[3] .= ' '.'<a href="'.$url.'&sort_field=module&sort=up">'.html_print_image('images/sort_up.png', true, ['style' => $selectModuleUp]).'</a>'.'<a href="'.$url.'&sort_field=module&sort=down">'.html_print_image('images/sort_down.png', true, ['style' => $selectModuleDown]).'</a>';
$table->head[4] .= ' '.'<a href="'.$url.'&sort_field=template&sort=up">'.html_print_image('images/sort_up.png', true, ['style' => $selectTemplateUp]).'</a>'.'<a href="'.$url.'&sort_field=template&sort=down">'.html_print_image('images/sort_down.png', true, ['style' => $selectTemplateDown]).'</a>';
$table->head[3] .= ui_get_sorting_arrows($url_up_agente, $url_down_agente, $selectAgentUp, $selectAgentDown);
$table->head[4] .= ui_get_sorting_arrows($url_up_module, $url_down_module, $selectModuleUp, $selectModuleDown);
$table->head[5] .= ui_get_sorting_arrows($url_up_template, $url_down_template, $selectTemplateUp, $selectTemplateDown);
}
} else {
if (!is_metaconsole()) {
$table->size[6] = '5%';
if (check_acl($config['id_user'], $id_group, 'LW') || check_acl($config['id_user'], $id_group, 'LM')) {
$table->align[7] = 'left';
$table->size[7] = '5%';
}
}
$table->head[0] = "<span title='".__('Standby')."'>".__('S.').'</span>';
if (!is_metaconsole()) {
if (check_acl($config['id_user'], $id_group, 'AW') || check_acl($config['id_user'], $id_group, 'LM')) {
@ -562,21 +580,13 @@ if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) {
$table->head[4] = __('Action');
$table->head[5] = __('Last fired');
$table->head[6] = __('Status');
if (!is_metaconsole()) {
$table->size[6] = '5%';
if (check_acl($config['id_user'], $id_group, 'LW') || check_acl($config['id_user'], $id_group, 'LM')) {
$table->head[7] = __('Validate');
$table->align[7] = 'center';
$table->size[7] = '5%';
}
}
$table->align[6] = 'center';
// Sort buttons are only for normal console
if (!is_metaconsole()) {
$table->head[2] .= ' '.'<a href="'.$url.'&sort_field=module&sort=up">'.html_print_image('images/sort_up.png', true, ['style' => $selectModuleUp]).'</a>'.'<a href="'.$url.'&sort_field=module&sort=down">'.html_print_image('images/sort_down.png', true, ['style' => $selectModuleDown]).'</a>';
$table->head[3] .= ' '.'<a href="'.$url.'&sort_field=template&sort=up">'.html_print_image('images/sort_up.png', true, ['style' => $selectTemplateUp]).'</a>'.'<a href="'.$url.'&sort_field=template&sort=down">'.html_print_image('images/sort_down.png', true, ['style' => $selectTemplateDown]).'</a>';
$table->head[2] .= ui_get_sorting_arrows($url_up_module, $url_down_module, $selectModuleUp, $selectModuleDown);
$table->head[3] .= ui_get_sorting_arrows($url_up_template, $url_down_template, $selectTemplateUp, $selectTemplateDown);
}
}
}
@ -608,6 +618,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')) {

View File

@ -60,7 +60,7 @@ if ($fields === false) {
} else {
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox data';
$table->class = 'info_table';
$table->head = [];
$table->head[0] = __('Field');
$table->size[0] = '20%';

View File

@ -264,17 +264,19 @@ if ($search != '') {
$sortField = get_parameter('sort_field');
$sort = get_parameter('sort', 'none');
$selected = 'border: 1px solid black;';
$selectNameUp = '';
$selectNameDown = '';
$selectOsUp = '';
$selectOsDown = '';
$selectIntervalUp = '';
$selectIntervalDown = '';
$selectGroupUp = '';
$selectGroupDown = '';
$selectLastContactUp = '';
$selectLastContactDown = '';
$selected = true;
$selectNameUp = false;
$selectNameDown = false;
$selectOsUp = false;
$selectOsDown = false;
$selectIntervalUp = false;
$selectIntervalDown = false;
$selectGroupUp = false;
$selectGroupDown = false;
$selectDescriptionUp = false;
$selectDescriptionDown = false;
$selectLastContactUp = false;
$selectLastContactDown = false;
$order = null;
@ -428,7 +430,7 @@ switch ($sortField) {
case 'description':
switch ($sort) {
case 'up':
$selectLastContactUp = $selected;
$selectDescriptionUp = $selected;
$order = [
'field' => 'comentarios',
'field2' => 'alias'.$order_collation,
@ -437,7 +439,7 @@ switch ($sortField) {
break;
case 'down':
$selectLastContactDown = $selected;
$selectDescriptionDown = $selected;
$order = [
'field' => 'comentarios',
'field2' => 'alias'.$order_collation,
@ -449,15 +451,17 @@ switch ($sortField) {
default:
$selectNameUp = $selected;
$selectNameDown = '';
$selectOsUp = '';
$selectOsDown = '';
$selectIntervalUp = '';
$selectIntervalDown = '';
$selectGroupUp = '';
$selectGroupDown = '';
$selectLastContactUp = '';
$selectLastContactDown = '';
$selectNameDown = false;
$selectOsUp = false;
$selectOsDown = false;
$selectIntervalUp = false;
$selectIntervalDown = false;
$selectGroupUp = false;
$selectGroupDown = false;
$selectDescriptionUp = false;
$selectDescriptionDown = false;
$selectLastContactUp = false;
$selectLastContactDown = false;
$order = [
'field' => 'alias'.$order_collation,
'field2' => 'alias'.$order_collation,
@ -620,6 +624,23 @@ if (empty($agents)) {
$agents = [];
}
// Urls to sort the table.
$url_up_agente = 'index.php?sec=view&amp;sec2=operation/agentes/estado_agente&amp;refr='.$refr.'&amp;offset='.$offset.'&amp;group_id='.$group_id.'&amp;recursion='.$recursion.'&amp;search='.$search.'&amp;status='.$status.'&amp;sort_field=name&amp;sort=up';
$url_down_agente = 'index.php?sec=view&amp;sec2=operation/agentes/estado_agente&amp;refr='.$refr.'&amp;offset='.$offset.'&amp;group_id='.$group_id.'&amp;recursion='.$recursion.'&amp;search='.$search.'&amp;status='.$status.'&amp;sort_field=name&amp;sort=down';
$url_up_description = 'index.php?sec=view&amp;sec2=operation/agentes/estado_agente&amp;refr='.$refr.'&amp;offset='.$offset.'&amp;group_id='.$group_id.'&amp;recursion='.$recursion.'&amp;search='.$search.'&amp;status='.$status.'&amp;sort_field=description&amp;sort=up';
$url_down_description = 'index.php?sec=view&amp;sec2=operation/agentes/estado_agente&amp;refr='.$refr.'&amp;offset='.$offset.'&amp;group_id='.$group_id.'&amp;recursion='.$recursion.'&amp;search='.$search.'&amp;status='.$status.'&amp;sort_field=description&amp;sort=down';
$url_up_remote = 'index.php?sec=view&amp;sec2=operation/agentes/estado_agente&amp;refr='.$refr.'&amp;offset='.$offset.'&amp;group_id='.$group_id.'&amp;recursion='.$recursion.'&amp;search='.$search.'&amp;status='.$status.'&amp;sort_field=remote&amp;sort=up';
$url_down_remote = 'index.php?sec=view&amp;sec2=operation/agentes/estado_agente&amp;refr='.$refr.'&amp;offset='.$offset.'&amp;group_id='.$group_id.'&amp;recursion='.$recursion.'&amp;search='.$search.'&amp;status='.$status.'&amp;sort_field=remote&amp;sort=down';
$url_up_os = 'index.php?sec=view&amp;sec2=operation/agentes/estado_agente&amp;refr='.$refr.'&amp;offset='.$offset.'&amp;group_id='.$group_id.'&amp;recursion='.$recursion.'&amp;search='.$search.'&amp;status='.$status.'&amp;sort_field=os&amp;sort=up';
$url_down_os = 'index.php?sec=view&amp;sec2=operation/agentes/estado_agente&amp;refr='.$refr.'&amp;offset='.$offset.'&amp;group_id='.$group_id.'&amp;recursion='.$recursion.'&amp;search='.$search.'&amp;status='.$status.'&amp;sort_field=os&amp;sort=down';
$url_up_interval = 'index.php?sec=view&amp;sec2=operation/agentes/estado_agente&amp;refr='.$refr.'&amp;offset='.$offset.'&amp;group_id='.$group_id.'&amp;recursion='.$recursion.'&amp;search='.$search.'&amp;status='.$status.'&amp;sort_field=interval&amp;sort=up';
$url_down_interval = 'index.php?sec=view&amp;sec2=operation/agentes/estado_agente&amp;refr='.$refr.'&amp;offset='.$offset.'&amp;group_id='.$group_id.'&amp;recursion='.$recursion.'&amp;search='.$search.'&amp;status='.$status.'&amp;sort_field=interval&amp;sort=down';
$url_up_group = 'index.php?sec=view&amp;sec2=operation/agentes/estado_agente&amp;refr='.$refr.'&amp;offset='.$offset.'&amp;group_id='.$group_id.'&amp;recursion='.$recursion.'&amp;search='.$search.'&amp;status='.$status.'&amp;sort_field=group&amp;sort=up';
$url_down_group = 'index.php?sec=view&amp;sec2=operation/agentes/estado_agente&amp;refr='.$refr.'&amp;offset='.$offset.'&amp;group_id='.$group_id.'&amp;recursion='.$recursion.'&amp;search='.$search.'&amp;status='.$status.'&amp;sort_field=group&amp;sort=down';
$url_up_last = 'index.php?sec=view&amp;sec2=operation/agentes/estado_agente&amp;refr='.$refr.'&amp;offset='.$offset.'&amp;group_id='.$group_id.'&amp;recursion='.$recursion.'&amp;search='.$search.'&amp;status='.$status.'&amp;sort_field=last_contact&amp;sort=up';
$url_down_last = 'index.php?sec=view&amp;sec2=operation/agentes/estado_agente&amp;refr='.$refr.'&amp;offset='.$offset.'&amp;group_id='.$group_id.'&amp;recursion='.$recursion.'&amp;search='.$search.'&amp;status='.$status.'&amp;sort_field=last_contact&amp;sort=down';
// Prepare pagination
ui_pagination(
$total_agents,
@ -631,27 +652,25 @@ $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&amp;sec2=operation/agentes/estado_agente&amp;refr='.$refr.'&amp;offset='.$offset.'&amp;group_id='.$group_id.'&amp;recursion='.$recursion.'&amp;search='.$search.'&amp;status='.$status.'&amp;sort_field=name&amp;sort=up">'.html_print_image('images/sort_up.png', true, ['style' => $selectNameUp, 'alt' => 'up']).'</a>'.'<a href="index.php?sec=view&amp;sec2=operation/agentes/estado_agente&amp;refr='.$refr.'&amp;offset='.$offset.'&amp;group_id='.$group_id.'&amp;recursion='.$recursion.'&amp;search='.$search.'&amp;status='.$status.'&amp;sort_field=name&amp;sort=down">'.html_print_image('images/sort_down.png', true, ['style' => $selectNameDown, 'alt' => 'down']).'</a>';
$table->head[0] = __('Agent').ui_get_sorting_arrows($url_up_agente, $url_down_agente, $selectNameUp, $selectNameDown);
$table->size[0] = '10%';
$table->head[1] = __('Description').' '.'<a href="index.php?sec=view&amp;sec2=operation/agentes/estado_agente&amp;refr='.$refr.'&amp;offset='.$offset.'&amp;group_id='.$group_id.'&amp;recursion='.$recursion.'&amp;search='.$search.'&amp;status='.$status.'&amp;sort_field=description&amp;sort=up">'.html_print_image('images/sort_up.png', true, ['style' => $selectNameUp, 'alt' => 'up']).'</a>'.'<a href="index.php?sec=view&amp;sec2=operation/agentes/estado_agente&amp;refr='.$refr.'&amp;offset='.$offset.'&amp;group_id='.$group_id.'&amp;recursion='.$recursion.'&amp;search='.$search.'&amp;status='.$status.'&amp;sort_field=description&amp;sort=down">'.html_print_image('images/sort_down.png', true, ['style' => $selectNameDown, 'alt' => 'down']).'</a>';
$table->head[1] = __('Description').ui_get_sorting_arrows($url_up_description, $url_down_description, $selectDescriptionUp, $selectDescriptionDown);
$table->size[1] = '16%';
$table->head[10] = __('Remote').' '.'<a href="index.php?sec=view&amp;sec2=operation/agentes/estado_agente&amp;refr='.$refr.'&amp;offset='.$offset.'&amp;group_id='.$group_id.'&amp;recursion='.$recursion.'&amp;search='.$search.'&amp;status='.$status.'&amp;sort_field=remote&amp;sort=up">'.html_print_image('images/sort_up.png', true, ['style' => $selectRemoteUp, 'alt' => 'up']).'</a>'.'<a href="index.php?sec=view&amp;sec2=operation/agentes/estado_agente&amp;refr='.$refr.'&amp;offset='.$offset.'&amp;group_id='.$group_id.'&amp;recursion='.$recursion.'&amp;search='.$search.'&amp;status='.$status.'&amp;sort_field=remote&amp;sort=down">'.html_print_image('images/sort_down.png', true, ['style' => $selectRemoteDown, 'alt' => 'down']).'</a>';
$table->head[10] = __('Remote').ui_get_sorting_arrows($url_up_remote, $url_down_remote, $selectRemoteUp, $selectRemoteDown);
$table->size[10] = '9%';
$table->head[2] = __('OS').' '.'<a href="index.php?sec=view&amp;sec2=operation/agentes/estado_agente&amp;refr='.$refr.'&amp;offset='.$offset.'&amp;group_id='.$group_id.'&amp;recursion='.$recursion.'&amp;search='.$search.'&amp;status='.$status.'&amp;sort_field=os&amp;sort=up">'.html_print_image('images/sort_up.png', true, ['style' => $selectOsUp, 'alt' => 'up']).'</a>'.'<a href="index.php?sec=view&amp;sec2=operation/agentes/estado_agente&amp;refr='.$refr.'&amp;offset='.$offset.'&amp;group_id='.$group_id.'&amp;recursion='.$recursion.'&amp;search='.$search.'&amp;status='.$status.'&amp;sort_field=os&amp;sort=down">'.html_print_image('images/sort_down.png', true, ['style' => $selectOsDown, 'alt' => 'down']).'</a>';
$table->head[2] = __('OS').ui_get_sorting_arrows($url_up_os, $url_down_os, $selectOsUp, $selectOsDown);
$table->size[2] = '8%';
$table->head[3] = __('Interval').' '.'<a href="index.php?sec=view&amp;sec2=operation/agentes/estado_agente&amp;refr='.$refr.'&amp;offset='.$offset.'&amp;group_id='.$group_id.'&amp;recursion='.$recursion.'&amp;search='.$search.'&amp;status='.$status.'&amp;sort_field=interval&amp;sort=up">'.html_print_image('images/sort_up.png', true, ['style' => $selectIntervalUp, 'alt' => 'up']).'</a>'.'<a href="index.php?sec=view&amp;sec2=operation/agentes/estado_agente&amp;refr='.$refr.'&amp;offset='.$offset.'&amp;group_id='.$group_id.'&amp;recursion='.$recursion.'&amp;search='.$search.'&amp;status='.$status.'&amp;sort_field=interval&amp;sort=down">'.html_print_image('images/sort_down.png', true, ['style' => $selectIntervalDown, 'alt' => 'down']).'</a>';
$table->head[3] = __('Interval').ui_get_sorting_arrows($url_up_interval, $url_down_interval, $selectIntervalUp, $selectIntervalDown);
$table->size[3] = '10%';
$table->head[4] = __('Group').' '.'<a href="index.php?sec=view&amp;sec2=operation/agentes/estado_agente&amp;refr='.$refr.'&amp;offset='.$offset.'&amp;group_id='.$group_id.'&amp;recursion='.$recursion.'&amp;search='.$search.'&amp;status='.$status.'&amp;sort_field=group&amp;sort=up">'.html_print_image('images/sort_up.png', true, ['style' => $selectGroupUp, 'alt' => 'up']).'</a>'.'<a href="index.php?sec=view&amp;sec2=operation/agentes/estado_agente&amp;refr='.$refr.'&amp;offset='.$offset.'&amp;group_id='.$group_id.'&amp;recursion='.$recursion.'&amp;search='.$search.'&amp;status='.$status.'&amp;sort_field=group&amp;sort=down">'.html_print_image('images/sort_down.png', true, ['style' => $selectGroupDown, 'alt' => 'down']).'</a>';
$table->head[4] = __('Group').ui_get_sorting_arrows($url_up_group, $url_down_group, $selectGroupUp, $selectGroupDown);
$table->size[4] = '8%';
$table->head[5] = __('Type');
@ -666,7 +685,7 @@ $table->size[7] = '4%';
$table->head[8] = __('Alerts');
$table->size[8] = '4%';
$table->head[9] = __('Last contact').' '.'<a href="index.php?sec=view&amp;sec2=operation/agentes/estado_agente&amp;refr='.$refr.'&amp;offset='.$offset.'&amp;group_id='.$group_id.'&amp;recursion='.$recursion.'&amp;search='.$search.'&amp;status='.$status.'&amp;sort_field=last_contact&amp;sort=up">'.html_print_image('images/sort_up.png', true, ['style' => $selectLastContactUp, 'alt' => 'up']).'</a>'.'<a href="index.php?sec=view&amp;sec2=operation/agentes/estado_agente&amp;refr='.$refr.'&amp;offset='.$offset.'&amp;group_id='.$group_id.'&amp;recursion='.$recursion.'&amp;search='.$search.'&amp;status='.$status.'&amp;sort_field=last_contact&amp;sort=down">'.html_print_image('images/sort_down.png', true, ['style' => $selectLastContactDown, 'alt' => 'down']).'</a>';
$table->head[9] = __('Last contact').ui_get_sorting_arrows($url_up_last, $url_down_last, $selectLastContactUp, $selectLastContactDown);
$table->size[9] = '15%';
$table->align = [];
@ -795,14 +814,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 +830,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') ]);

View File

@ -642,7 +642,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;';
@ -687,11 +689,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 = [];
@ -756,6 +771,11 @@ switch ($tab) {
$data['groups'] = ui_print_group_icon($network_map['id_group'], true);
if ($networkmap_write || $networkmap_manage) {
$table->cellclass[] = [
'copy' => 'action_buttons',
'edit' => 'action_buttons',
'delete' => 'action_buttons',
];
$data['copy'] = '<a href="index.php?'.'sec=network&'.'sec2=operation/agentes/pandora_networkmap&amp;'.'copy_networkmap=1&'.'id_networkmap='.$network_map['id'].'" alt="'.__('Copy').'">'.html_print_image('images/copy.png', true).'</a>';
$data['edit'] = '<a href="index.php?'.'sec=network&'.'sec2=operation/agentes/pandora_networkmap&'.'tab=edit&'.'edit_networkmap=1&'.'id_networkmap='.$network_map['id'].'" alt="'.__('Config').'">'.html_print_image('images/config.png', true).'</a>';
$data['delete'] = '<a href="index.php?'.'sec=network&'.'sec2=operation/agentes/pandora_networkmap&'.'delete=1&'.'id_networkmap='.$network_map['id'].'" alt="'.__('Delete').'" onclick="javascript: if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true).'</a>';
@ -764,7 +784,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.') ]);
}

View File

@ -735,21 +735,23 @@ unset($table);
// End Build Search Form
//
// Sort functionality
$selected = 'border: 1px solid black;';
$selectAgentNameUp = '';
$selectAgentNameDown = '';
$selectTypeUp = '';
$selectTypeDown = '';
$selectModuleNameUp = '';
$selectModuleNameDown = '';
$selectIntervalUp = '';
$selectIntervalDown = '';
$selectStatusUp = '';
$selectStatusDown = '';
$selectDataUp = '';
$selectDataDown = '';
$selectTimestampUp = '';
$selectTimestampDown = '';
$selected = true;
$selectAgentNameUp = false;
$selectAgentNameDown = false;
$selectDataTypeUp = false;
$selectDataTypeDown = false;
$selectTypeUp = false;
$selectTypeDown = false;
$selectModuleNameUp = false;
$selectModuleNameDown = false;
$selectIntervalUp = false;
$selectIntervalDown = false;
$selectStatusUp = false;
$selectStatusDown = false;
$selectDataUp = false;
$selectDataDown = false;
$selectTimestampUp = false;
$selectTimestampDown = false;
$order = null;
switch ($sortField) {
@ -776,7 +778,7 @@ switch ($sortField) {
case 'type':
switch ($sort) {
case 'up':
$selectTypeUp = $selected;
$selectDataTypeUp = $selected;
$order = [
'field' => 'tagente_modulo.id_tipo_modulo',
'order' => 'ASC',
@ -784,7 +786,7 @@ switch ($sortField) {
break;
case 'down':
$selectTypeDown = $selected;
$selectDataTypeDown = $selected;
$order = [
'field' => 'tagente_modulo.id_tipo_modulo',
'order' => 'DESC',
@ -896,7 +898,7 @@ switch ($sortField) {
case 'data':
switch ($sort) {
case 'up':
$selectTimestampUp = $selected;
$selectDataUp = $selected;
$order = [
'field' => 'tagente_estado.datos',
'order' => 'ASC',
@ -904,7 +906,7 @@ switch ($sortField) {
break;
case 'down':
$selectTimestampDown = $selected;
$selectDataDown = $selected;
$order = [
'field' => 'tagente_estado.datos',
'order' => 'DESC',
@ -915,19 +917,21 @@ switch ($sortField) {
default:
$selectAgentNameUp = $selected;
$selectAgentNameDown = '';
$selectTypeUp = '';
$selectTypeDown = '';
$selectModuleNameUp = '';
$selectModuleNameDown = '';
$selectIntervalUp = '';
$selectIntervalDown = '';
$selectStatusUp = '';
$selectStatusDown = '';
$selectDataUp = '';
$selectDataDown = '';
$selectTimestampUp = '';
$selectTimestampDown = '';
$selectAgentNameDown = false;
$selectDataTypeUp = false;
$selectDataTypeDown = false;
$selectTypeUp = false;
$selectTypeDown = false;
$selectModuleNameUp = false;
$selectModuleNameDown = false;
$selectIntervalUp = false;
$selectIntervalDown = false;
$selectStatusUp = false;
$selectStatusDown = false;
$selectDataUp = false;
$selectDataDown = false;
$selectTimestampUp = false;
$selectTimestampDown = false;
$order = [
'field' => 'tagente.alias',
'order' => 'ASC',
@ -987,7 +991,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:
@ -1066,14 +1070,25 @@ if (($config['dbtype'] == 'oracle') && ($result !== false)) {
}
// Urls to sort the table.
$url_agent_name = 'index.php?sec=view&amp;sec2=operation/agentes/status_monitor&amp;refr='.$refr.'&amp;datatype='.$datatype.'&amp;moduletype='.$moduletype.'&amp;modulegroup='.$modulegroup.'&amp;offset='.$offset.'&amp;ag_group='.$ag_group.'&amp;ag_freestring='.$ag_freestring.'&amp;ag_modulename='.$ag_modulename.'&amp;status='.$status.$ag_custom_fields_params.'&amp;sort_field=agent_alias&amp;sort=';
$url_type = 'index.php?sec=view&amp;sec2=operation/agentes/status_monitor&amp;datatype='.$datatype.'&amp;moduletype='.$moduletype.'&amp;refr='.$refr.'&amp;modulegroup='.$modulegroup.'&amp;offset='.$offset.'&amp;ag_group='.$ag_group.'&amp;ag_freestring='.$ag_freestring.'&amp;ag_modulename='.$ag_modulename.'&amp;status='.$status.$ag_custom_fields_params.'&amp;sort_field=type&amp;sort=';
$url_module_name = 'index.php?sec=view&amp;sec2=operation/agentes/status_monitor&amp;datatype='.$datatype.'&amp;moduletype='.$moduletype.'&amp;refr='.$refr.'&amp;modulegroup='.$modulegroup.'&amp;offset='.$offset.'&amp;ag_group='.$ag_group.'&amp;ag_freestring='.$ag_freestring.'&amp;ag_modulename='.$ag_modulename.'&amp;status='.$status.$ag_custom_fields_params.'&amp;sort_field=module_name&amp;sort=';
$url_server_type = 'index.php?sec=view&amp;sec2=operation/agentes/status_monitor&amp;datatype='.$datatype.'&amp;moduletype='.$moduletype.'&amp;refr='.$refr.'&amp;modulegroup='.$modulegroup.'&amp;offset='.$offset.'&amp;ag_group='.$ag_group.'&amp;ag_freestring='.$ag_freestring.'&amp;ag_modulename='.$ag_modulename.'&amp;status='.$status.$ag_custom_fields_params.'&amp;sort_field=moduletype&amp;sort=';
$url_interval = 'index.php?sec=view&amp;sec2=operation/agentes/status_monitor&amp;datatype='.$datatype.'&amp;moduletype='.$moduletype.'&amp;refr='.$refr.'&amp;modulegroup='.$modulegroup.'&amp;offset='.$offset.'&amp;ag_group='.$ag_group.'&amp;ag_freestring='.$ag_freestring.'&amp;ag_modulename='.$ag_modulename.'&amp;status='.$status.$ag_custom_fields_params.'&amp;sort_field=interval&amp;sort=';
$url_status = 'index.php?sec=view&amp;sec2=operation/agentes/status_monitor&amp;datatype='.$datatype.'&amp;moduletype='.$moduletype.'&amp;refr='.$refr.'&amp;modulegroup='.$modulegroup.'&amp;offset='.$offset.'&amp;ag_group='.$ag_group.'&amp;ag_freestring='.$ag_freestring.'&amp;ag_modulename='.$ag_modulename.'&amp;status='.$status.$ag_custom_fields_params.'&amp;sort_field=status&amp;sort=';
$url_data = 'index.php?sec=view&amp;sec2=operation/agentes/status_monitor&amp;datatype='.$datatype.'&amp;moduletype='.$moduletype.'&amp;refr='.$refr.'&amp;modulegroup='.$modulegroup.'&amp;offset='.$offset.'&amp;ag_group='.$ag_group.'&amp;ag_freestring='.$ag_freestring.'&amp;ag_modulename='.$ag_modulename.'&amp;status='.$status.$ag_custom_fields_params.'&amp;sort_field=data&amp;sort=';
$url_timestamp_up = 'index.php?sec=view&amp;sec2=operation/agentes/status_monitor&amp;datatype='.$datatype.'&amp;moduletype='.$moduletype.'&amp;refr='.$refr.'&amp;offset='.$offset.'&amp;ag_group='.$ag_group.'&amp;ag_freestring='.$ag_freestring.'&amp;ag_modulename='.$ag_modulename.'&amp;status='.$status.$ag_custom_fields_params.'&amp;sort_field=timestamp&amp;sort=up';
$url_timestamp_down = 'index.php?sec=view&amp;sec2=operation/agentes/status_monitor&amp;datatype='.$datatype.'&amp;moduletype='.$moduletype.'&amp;refr='.$refr.'&amp;modulegroup='.$modulegroup.'&amp;offset='.$offset.'&amp;ag_group='.$ag_group.'&amp;ag_freestring='.$ag_freestring.'&amp;ag_modulename='.$ag_modulename.'&amp;status='.$status.$ag_custom_fields_params.'&amp;sort_field=timestamp&amp;sort=down';
// Start Build List Result
//
if (!empty($result)) {
$table = new StdClass();
$table->cellpadding = 0;
$table->cellspacing = 0;
$table->width = '100%';
$table->class = 'databox data';
$table->class = 'info_table';
$table->head = [];
$table->data = [];
$table->size = [];
@ -1090,36 +1105,34 @@ if (!empty($result)) {
if (in_array('agent', $show_fields) || is_metaconsole()) {
$table->head[1] = __('Agent');
$table->head[1] .= ' <a href="index.php?sec=view&amp;sec2=operation/agentes/status_monitor&amp;refr='.$refr.'&amp;datatype='.$datatype.'&amp;moduletype='.$moduletype.'&amp;modulegroup='.$modulegroup.'&amp;offset='.$offset.'&amp;ag_group='.$ag_group.'&amp;ag_freestring='.$ag_freestring.'&amp;ag_modulename='.$ag_modulename.'&amp;status='.$status.$ag_custom_fields_params.'&amp;sort_field=agent_alias&amp;sort=up">'.html_print_image('images/sort_up.png', true, ['style' => $selectAgentNameUp, 'alt' => 'up']).'</a>'.'<a href="index.php?sec=view&amp;sec2=operation/agentes/status_monitor&amp;refr='.$refr.'&amp;datatype='.$datatype.'&amp;moduletype='.$moduletype.'&amp;modulegroup='.$modulegroup.'&amp;offset='.$offset.'&amp;ag_group='.$ag_group.'&amp;ag_freestring='.$ag_freestring.'&amp;ag_modulename='.$ag_modulename.'&amp;status='.$status.$ag_custom_fields_params.'&amp;sort_field=agent_alias&amp;sort=down">'.html_print_image('images/sort_down.png', true, ['style' => $selectAgentNameDown, 'alt' => 'down']).'</a>';
$table->head[1] .= ui_get_sorting_arrows($url_agent_name.'up', $url_agent_name.'down', $selectAgentNameUp, $selectAgentNameDown);
}
if (in_array('data_type', $show_fields) || is_metaconsole()) {
$table->head[2] = __('Data Type');
$table->head[2] .= ' <a href="index.php?sec=view&amp;sec2=operation/agentes/status_monitor&amp;datatype='.$datatype.'&amp;moduletype='.$moduletype.'&amp;refr='.$refr.'&amp;modulegroup='.$modulegroup.'&amp;offset='.$offset.'&amp;ag_group='.$ag_group.'&amp;ag_freestring='.$ag_freestring.'&amp;ag_modulename='.$ag_modulename.'&amp;status='.$status.$ag_custom_fields_params.'&amp;sort_field=type&amp;sort=up">'.html_print_image('images/sort_up.png', true, ['style' => $selectTypeUp, 'alt' => 'up']).'</a>'.'<a href="index.php?sec=view&amp;sec2=operation/agentes/status_monitor&amp;datatype='.$datatype.'&amp;moduletype='.$moduletype.'&amp;refr='.$refr.'&amp;modulegroup='.$modulegroup.'&amp;offset='.$offset.'&amp;ag_group='.$ag_group.'&amp;ag_freestring='.$ag_freestring.'&amp;ag_modulename='.$ag_modulename.'&amp;status='.$status.$ag_custom_fields_params.'&amp;sort_field=type&amp;sort=down">'.html_print_image('images/sort_down.png', true, ['style' => $selectTypeDown, 'alt' => 'down']).'</a>';
$table->head[2] .= ui_get_sorting_arrows($url_type.'up', $url_type.'down', $selectDataTypeUp, $selectDataTypeDown);
$table->align[2] = 'left';
}
if (in_array('module_name', $show_fields) || is_metaconsole()) {
$table->head[3] = __('Module name');
$table->head[3] .= ' <a href="index.php?sec=view&amp;sec2=operation/agentes/status_monitor&amp;datatype='.$datatype.'&amp;moduletype='.$moduletype.'&amp;refr='.$refr.'&amp;modulegroup='.$modulegroup.'&amp;offset='.$offset.'&amp;ag_group='.$ag_group.'&amp;ag_freestring='.$ag_freestring.'&amp;ag_modulename='.$ag_modulename.'&amp;status='.$status.$ag_custom_fields_params.'&amp;sort_field=module_name&amp;sort=up">'.html_print_image('images/sort_up.png', true, ['style' => $selectModuleNameUp, 'alt' => 'up']).'</a>'.'<a href="index.php?sec=view&amp;sec2=operation/agentes/status_monitor&amp;datatype='.$datatype.'&amp;moduletype='.$moduletype.'&amp;refr='.$refr.'&amp;modulegroup='.$modulegroup.'&amp;offset='.$offset.'&amp;ag_group='.$ag_group.'&amp;ag_freestring='.$ag_freestring.'&amp;ag_modulename='.$ag_modulename.'&amp;status='.$status.$ag_custom_fields_params.'&amp;sort_field=module_name&amp;sort=down">'.html_print_image('images/sort_down.png', true, ['style' => $selectModuleNameDown, 'alt' => 'down']).'</a>';
$table->head[3] .= ui_get_sorting_arrows($url_module_name.'up', $url_module_name.'down', $selectModuleNameUp, $selectModuleNameDown);
}
if (in_array('server_type', $show_fields) || is_metaconsole()) {
$table->head[4] = __('Server type');
$table->head[4] .= ' <a href="index.php?sec=view&amp;sec2=operation/agentes/status_monitor&amp;datatype='.$datatype.'&amp;moduletype='.$moduletype.'&amp;refr='.$refr.'&amp;modulegroup='.$modulegroup.'&amp;offset='.$offset.'&amp;ag_group='.$ag_group.'&amp;ag_freestring='.$ag_freestring.'&amp;ag_modulename='.$ag_modulename.'&amp;status='.$status.$ag_custom_fields_params.'&amp;sort_field=moduletype&amp;sort=up">'.html_print_image('images/sort_up.png', true, ['style' => $selectModuleNameUp, 'alt' => 'up']).'</a>'.'<a href="index.php?sec=view&amp;sec2=operation/agentes/status_monitor&amp;datatype='.$datatype.'&amp;moduletype='.$moduletype.'&amp;refr='.$refr.'&amp;modulegroup='.$modulegroup.'&amp;offset='.$offset.'&amp;ag_group='.$ag_group.'&amp;ag_freestring='.$ag_freestring.'&amp;ag_modulename='.$ag_modulename.'&amp;status='.$status.$ag_custom_fields_params.'&amp;sort_field=moduletype&amp;sort=down">'.html_print_image('images/sort_down.png', true, ['style' => $selectModuleNameDown, 'alt' => 'down']).'</a>';
$table->head[4] .= ui_get_sorting_arrows($url_server_type.'up', $url_server_type.'down', $selectTypeUp, $selectTypeDown);
}
if (in_array('interval', $show_fields) || is_metaconsole()) {
$table->head[5] = __('Interval');
$table->head[5] .= ' <a href="index.php?sec=view&amp;sec2=operation/agentes/status_monitor&amp;datatype='.$datatype.'&amp;moduletype='.$moduletype.'&amp;refr='.$refr.'&amp;modulegroup='.$modulegroup.'&amp;offset='.$offset.'&amp;ag_group='.$ag_group.'&amp;ag_freestring='.$ag_freestring.'&amp;ag_modulename='.$ag_modulename.'&amp;status='.$status.$ag_custom_fields_params.'&amp;sort_field=interval&amp;sort=up">'.html_print_image('images/sort_up.png', true, ['style' => $selectIntervalUp, 'alt' => 'up']).'</a>'.'<a href="index.php?sec=view&amp;sec2=operation/agentes/status_monitor&amp;datatype='.$datatype.'&amp;moduletype='.$moduletype.'&amp;refr='.$refr.'&amp;modulegroup='.$modulegroup.'&amp;offset='.$offset.'&amp;ag_group='.$ag_group.'&amp;ag_freestring='.$ag_freestring.'&amp;ag_modulename='.$ag_modulename.'&amp;status='.$status.$ag_custom_fields_params.'&amp;sort_field=interval&amp;sort=down">'.html_print_image('images/sort_down.png', true, ['style' => $selectIntervalDown, 'alt' => 'down']).'</a>';
$table->head[5] .= ui_get_sorting_arrows($url_interval.'up', $url_interval.'down', $selectIntervalUp, $selectIntervalDown);
$table->align[5] = 'left';
}
if (in_array('status', $show_fields) || is_metaconsole()) {
$table->head[6] = __('Status');
$table->head[6] .= ' <a href="index.php?sec=view&amp;sec2=operation/agentes/status_monitor&amp;datatype='.$datatype.'&amp;moduletype='.$moduletype.'&amp;refr='.$refr.'&amp;modulegroup='.$modulegroup.'&amp;offset='.$offset.'&amp;ag_group='.$ag_group.'&amp;ag_freestring='.$ag_freestring.'&amp;ag_modulename='.$ag_modulename.'&amp;status='.$status.$ag_custom_fields_params.'&amp;sort_field=status&amp;sort=up">'.html_print_image('images/sort_up.png', true, ['style' => $selectStatusUp, 'alt' => 'up']).'</a>'.'<a href="index.php?sec=view&amp;sec2=operation/agentes/status_monitor&amp;datatype='.$datatype.'&amp;moduletype='.$moduletype.'&amp;refr='.$refr.'&amp;modulegroup='.$modulegroup.'&amp;offset='.$offset.'&amp;ag_group='.$ag_group.'&amp;ag_freestring='.$ag_freestring.'&amp;ag_modulename='.$ag_modulename.'&amp;status='.$status.$ag_custom_fields_params.'&amp;sort_field=status&amp;sort=down">'.html_print_image('images/sort_down.png', true, ['style' => $selectStatusDown, 'alt' => 'down']).'</a>';
$table->head[6] .= ui_get_sorting_arrows($url_status.'up', $url_status.'down', $selectStatusUp, $selectStatusDown);
$table->align[6] = 'left';
}
@ -1137,13 +1150,13 @@ if (!empty($result)) {
$table->head[9] = __('Data');
$table->align[9] = 'left';
if (is_metaconsole()) {
$table->head[9] .= ' <a href="index.php?sec=view&amp;sec2=operation/agentes/status_monitor&amp;datatype='.$datatype.'&amp;moduletype='.$moduletype.'&amp;refr='.$refr.'&amp;modulegroup='.$modulegroup.'&amp;offset='.$offset.'&amp;ag_group='.$ag_group.'&amp;ag_freestring='.$ag_freestring.'&amp;ag_modulename='.$ag_modulename.'&amp;status='.$status.$ag_custom_fields_params.'&amp;sort_field=data&amp;sort=up">'.html_print_image('images/sort_up.png', true, ['style' => $selectStatusUp, 'alt' => 'up']).'</a>'.'<a href="index.php?sec=view&amp;sec2=operation/agentes/status_monitor&amp;datatype='.$datatype.'&amp;moduletype='.$moduletype.'&amp;refr='.$refr.'&amp;modulegroup='.$modulegroup.'&amp;offset='.$offset.'&amp;ag_group='.$ag_group.'&amp;ag_freestring='.$ag_freestring.'&amp;ag_modulename='.$ag_modulename.'&amp;status='.$status.$ag_custom_fields_params.'&amp;sort_field=data&amp;sort=down">'.html_print_image('images/sort_down.png', true, ['style' => $selectStatusDown, 'alt' => 'down']).'</a>';
$table->head[9] .= ui_get_sorting_arrows($url_data.'up', $url_data.'down', $selectDataUp, $selectDataDown);
}
}
if (in_array('timestamp', $show_fields) || is_metaconsole()) {
$table->head[10] = __('Timestamp');
$table->head[10] .= ' <a href="index.php?sec=view&amp;sec2=operation/agentes/status_monitor&amp;datatype='.$datatype.'&amp;moduletype='.$moduletype.'&amp;refr='.$refr.'&amp;offset='.$offset.'&amp;ag_group='.$ag_group.'&amp;ag_freestring='.$ag_freestring.'&amp;ag_modulename='.$ag_modulename.'&amp;status='.$status.$ag_custom_fields_params.'&amp;sort_field=timestamp&amp;sort=up">'.html_print_image('images/sort_up.png', true, ['style' => $selectTimestampUp, 'alt' => 'up']).'</a>'.'<a href="index.php?sec=view&amp;sec2=operation/agentes/status_monitor&amp;datatype='.$datatype.'&amp;moduletype='.$moduletype.'&amp;refr='.$refr.'&amp;modulegroup='.$modulegroup.'&amp;offset='.$offset.'&amp;ag_group='.$ag_group.'&amp;ag_freestring='.$ag_freestring.'&amp;ag_modulename='.$ag_modulename.'&amp;status='.$status.$ag_custom_fields_params.'&amp;sort_field=timestamp&amp;sort=down">'.html_print_image('images/sort_down.png', true, ['style' => $selectTimestampDown, 'alt' => 'down']).'</a>';
$table->head[10] .= ui_get_sorting_arrows($url_timestamp_up, $url_timestamp_down, $selectTimestampUp, $selectTimestampDown);
$table->align[10] = 'left';
}
@ -1284,6 +1297,7 @@ if (!empty($result)) {
}
if ($show_edit_icon) {
$table->cellclass[][2] = 'action_buttons';
$data[2] .= '<a href="'.$url_edit_module.'">'.html_print_image(
'images/config.png',
true,
@ -1659,6 +1673,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')]);

View File

@ -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, '', '&amp;');
ui_pagination($total_events, $url_paginate, $offset, $pagination, false, 'offset', true, 'pagination-bottom');
}
echo '</div>';
if ($allow_action) {

View File

@ -96,7 +96,7 @@ $maps = gis_get_maps();
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox data';
$table->class = 'info_table';
$table->head = [];
$table->head['name'] = __('Name');
@ -181,7 +181,8 @@ if ($maps !== false) {
$data['default'] = html_print_radio_button_extended('default_map', $map['id_tgis_map'], '', $checked, false, 'setDefault('.$map['id_tgis_map'].');', '', true);
}
$data['op'] = '<a href="index.php?sec=godgismaps&amp;sec2=godmode/gis_maps/configure_gis_map&map_id='.$map['id_tgis_map'].'&amp;action=edit_map">'.html_print_image('images/config.png', true, ['title' => __('Edit')]).'</a>&nbsp;&nbsp;'.'<a href="index.php?sec=godgismaps&amp;sec2=operation/gis_maps/gis_map&amp;map_id='.$map['id_tgis_map'].'&amp;action=delete_map" onclick="return confirmDelete();">'.html_print_image('images/cross.png', true, ['title' => __('Delete')]).'</a>';
$table->cellclass[]['op'] = 'action_buttons';
$data['op'] = '<a href="index.php?sec=godgismaps&amp;sec2=godmode/gis_maps/configure_gis_map&map_id='.$map['id_tgis_map'].'&amp;action=edit_map">'.html_print_image('images/config.png', true, ['title' => __('Edit')]).'</a>'.'<a href="index.php?sec=godgismaps&amp;sec2=operation/gis_maps/gis_map&amp;map_id='.$map['id_tgis_map'].'&amp;action=delete_map" onclick="return confirmDelete();">'.html_print_image('images/cross.png', true, ['title' => __('Delete')]).'</a>';
}
array_push($table->data, $data);

View File

@ -407,31 +407,30 @@ if ($count_total < 1) {
// Show headers
$table->width = '100%';
$table->class = 'databox data';
$table->cellpadding = 4;
$table->cellspacing = 4;
$table->class = 'info_table';
$table->cellpadding = 0;
$table->cellspacing = 0;
$table->head = [];
$table->data = [];
$table->size = [];
$table->align = [];
$table->head[0] = __('ID');
$table->head[1] = __('Status');
$table->head[2] = __('Incident');
$table->head[3] = __('Priority');
$table->head[4] = __('Group');
$table->head[5] = __('Updated');
$table->head[6] = __('Source');
$table->head[7] = __('Owner');
$table->head[8] = __('Action').html_print_checkbox('all_action', 0, false, true, false);
$table->head[0] = html_print_checkbox('all_action', 0, false, true, false);
$table->head[1] = __('ID');
$table->head[2] = __('Status');
$table->head[3] = __('Incident');
$table->head[4] = __('Priority');
$table->head[5] = __('Group');
$table->head[6] = __('Updated');
$table->head[7] = __('Source');
$table->head[8] = __('Owner');
$table->size[0] = 43;
$table->size[7] = 50;
$table->size[0] = '20px';
$table->align[1] = 'left';
$table->align[3] = 'left';
$table->align[0] = 'left';
$table->align[2] = 'left';
$table->align[4] = 'left';
$table->align[8] = 'left';
$table->align[5] = 'left';
$rowPair = true;
$iterator = 0;
@ -447,29 +446,29 @@ if ($count_total < 1) {
$data = [];
$data[0] = '<a href="index.php?sec=workspace&amp;sec2=operation/incidents/incident_detail&amp;id='.$row['id_incidencia'].'">'.$row['id_incidencia'].'</a>';
if (check_acl($config['id_user'], $row['id_grupo'], 'IM') || $config['id_user'] == $row['id_usuario'] || $config['id_user'] == $row['id_creator']) {
$data[0] = html_print_checkbox('id_inc[]', $row['id_incidencia'], false, true);
} else {
$data[0] = '';
}
$data[1] = '<a href="index.php?sec=workspace&amp;sec2=operation/incidents/incident_detail&amp;id='.$row['id_incidencia'].'">'.$row['id_incidencia'].'</a>';
$attach = incidents_get_attach($row['id_incidencia']);
if (!empty($attach)) {
$data[0] .= '&nbsp;&nbsp;'.html_print_image('images/attachment.png', true, ['style' => 'align:middle;']);
$data[1] .= '&nbsp;&nbsp;'.html_print_image('images/attachment.png', true, ['style' => 'align:middle;']);
}
$data[1] = incidents_print_status_img($row['estado'], true);
$data[2] = '<a href="index.php?sec=workspace&amp;sec2=operation/incidents/incident_detail&amp;id='.$row['id_incidencia'].'">'.ui_print_truncate_text(io_safe_output($row['titulo']), 'item_title').'</a>';
$data[3] = incidents_print_priority_img($row['prioridad'], true);
$data[4] = ui_print_group_icon($row['id_grupo'], true);
$data[5] = ui_print_timestamp($row['actualizacion'], true);
$data[6] = $row['origen'];
$data[2] = incidents_print_status_img($row['estado'], true);
$data[3] = '<a href="index.php?sec=workspace&amp;sec2=operation/incidents/incident_detail&amp;id='.$row['id_incidencia'].'">'.ui_print_truncate_text(io_safe_output($row['titulo']), 'item_title').'</a>';
$data[4] = incidents_print_priority_img($row['prioridad'], true);
$data[5] = ui_print_group_icon($row['id_grupo'], true);
$data[6] = ui_print_timestamp($row['actualizacion'], true);
$data[7] = $row['origen'];
if (empty($row['id_usuario'])) {
$data[7] = 'SYSTEM';
$data[8] = 'SYSTEM';
} else {
$data[7] = ui_print_username($row['id_usuario'], true);
}
if (check_acl($config['id_user'], $row['id_grupo'], 'IM') || $config['id_user'] == $row['id_usuario'] || $config['id_user'] == $row['id_creator']) {
$data[8] = html_print_checkbox('id_inc[]', $row['id_incidencia'], false, true);
} else {
$data[8] = '';
$data[8] = ui_print_username($row['id_usuario'], true);
}
array_push($table->data, $data);

View File

@ -135,25 +135,28 @@ if (empty($messages)) {
} else {
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox data';
$table->cellpadding = 4;
$table->cellspacing = 4;
$table->class = 'info_table';
$table->cellpadding = 0;
$table->cellspacing = 0;
$table->head = [];
$table->data = [];
$table->align = [];
$table->size = [];
$table->align[5] = 'left';
$table->align[0] = 'left';
$table->align[1] = 'left';
$table->align[2] = 'left';
$table->align[3] = 'left';
$table->align[4] = 'right';
$table->size[5] = '20px';
$table->size[0] = '20px';
$table->size[1] = '100px';
$table->size[3] = '80px';
$table->size[4] = '60px';
$table->head[5] = html_print_checkbox('all_delete_messages', 0, false, true, false);
$table->head[0] = __('Status');
if ($show_sent) {
$table->head[1] = __('Destination');
@ -163,12 +166,15 @@ if (empty($messages)) {
$table->head[2] = __('Subject');
$table->head[3] = __('Timestamp');
$table->head[4] = __('Delete').html_print_checkbox('all_delete_messages', 0, false, true, false);
$table->head[4] = __('Delete');
foreach ($messages as $message) {
$message_id = $message['id_mensaje'];
$data = [];
$data[5] = html_print_checkbox_extended('delete_multiple_messages[]', $message_id, false, false, '', 'class="check_delete_messages"', true);
$data[0] = '';
if ($message['read'] == 1) {
if ($show_sent) {
@ -228,12 +234,13 @@ if (empty($messages)) {
['prominent' => 'timestamp']
);
$table->cellclass[][4] = 'action_buttons';
if ($show_sent) {
$data[4] = '<a href="index.php?sec=message_list&amp;sec2=operation/messages/message_list&show_sent=1&delete_message=1&id='.$message_id.'"
onClick="javascript:if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['title' => __('Delete')]).'</a>'.html_print_checkbox_extended('delete_multiple_messages[]', $message_id, false, false, '', 'class="check_delete_messages"', true);
onClick="javascript:if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['title' => __('Delete')]).'</a>';
} else {
$data[4] = '<a href="index.php?sec=message_list&amp;sec2=operation/messages/message_list&delete_message=1&id='.$message_id.'"
onClick="javascript:if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['title' => __('Delete')]).'</a>'.html_print_checkbox_extended('delete_multiple_messages[]', $message_id, false, false, '', 'class="check_delete_messages"', true);
onClick="javascript:if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['title' => __('Delete')]).'</a>';
}
array_push($table->data, $data);

View File

@ -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 = [];
@ -161,6 +161,7 @@ if ($servers === false) {
$data[7] = ui_print_timestamp($task['utimestamp'], true);
if (check_acl($config['id_user'], $task['id_group'], 'PM')) {
$table->cellclass[][8] = 'action_buttons';
$data[8] = '<a href="index.php?sec=gservers&amp;sec2=godmode/servers/manage_recontask_form&amp;update='.$task['id_rt'].'">'.html_print_image('images/wrench_orange.png', true).'</a>';
} else {
$data[8] = '';

View File

@ -631,7 +631,7 @@ if (!defined('METACONSOLE')) {
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox data';
$table->class = 'info_table';
if (defined('METACONSOLE')) {
$table->width = '100%';
$table->class = 'databox data';