From 38ddcc474696d64a77db3d5cb1c00e5470a54b5b Mon Sep 17 00:00:00 2001 From: Calvo Date: Wed, 19 Jan 2022 11:36:54 +0100 Subject: [PATCH] Fix search result header alignment --- pandora_console/operation/search_agents.php | 15 +++++++++- pandora_console/operation/search_alerts.php | 7 +++++ pandora_console/operation/search_graphs.php | 4 +++ pandora_console/operation/search_main.php | 30 ++++++++++---------- pandora_console/operation/search_maps.php | 7 +++++ pandora_console/operation/search_modules.php | 11 +++++++ pandora_console/operation/search_reports.php | 2 ++ pandora_console/operation/search_users.php | 10 +++++++ 8 files changed, 70 insertions(+), 16 deletions(-) diff --git a/pandora_console/operation/search_agents.php b/pandora_console/operation/search_agents.php index 9fe7d7f9ce..de6461ccec 100755 --- a/pandora_console/operation/search_agents.php +++ b/pandora_console/operation/search_agents.php @@ -36,7 +36,8 @@ if (!$agents || !$searchAgents) { $table->width = '98%'; $table->class = 'databox'; - $table->head = []; + $table->head = []; + if ($only_count) { $table->head[0] = __('Agent'); $table->head[1] = __('Description'); @@ -57,6 +58,18 @@ if (!$agents || !$searchAgents) { $table->head[8] = __('Last contact').' '.''.html_print_image('images/sort_up.png', true, ['style' => $selectLastContactUp]).''.''.html_print_image('images/sort_down.png', true, ['style' => $selectLastContactDown]).''; $table->head[9] = ''; + $table->headstyle = []; + $table->headstyle[0] = 'text-align: left'; + $table->headstyle[1] = 'text-align: left'; + $table->headstyle[2] = 'text-align: left'; + $table->headstyle[3] = 'text-align: left'; + $table->headstyle[4] = 'text-align: left'; + $table->headstyle[5] = 'text-align: left'; + $table->headstyle[6] = 'text-align: left'; + $table->headstyle[7] = 'text-align: left'; + $table->headstyle[8] = 'text-align: left'; + $table->headstyle[9] = 'text-align: center'; + $table->align = []; $table->align[0] = 'left'; $table->align[1] = 'left'; diff --git a/pandora_console/operation/search_alerts.php b/pandora_console/operation/search_alerts.php index 76beda6166..90e55a963e 100755 --- a/pandora_console/operation/search_alerts.php +++ b/pandora_console/operation/search_alerts.php @@ -42,6 +42,13 @@ if ($alerts === false || $totalAlerts == 0 || !$searchAlerts) { $table->align[3] = 'left'; $table->align[4] = 'left'; + $table->headstyle = []; + $table->headstyle[0] = 'text-align: center'; + $table->headstyle[1] = 'text-align: left'; + $table->headstyle[2] = 'text-align: left'; + $table->headstyle[3] = 'text-align: left'; + $table->headstyle[4] = 'text-align: left'; + $table->valign = []; $table->valign[0] = 'top'; $table->valign[1] = 'top'; diff --git a/pandora_console/operation/search_graphs.php b/pandora_console/operation/search_graphs.php index 8f76f0dea8..0150d2f56c 100755 --- a/pandora_console/operation/search_graphs.php +++ b/pandora_console/operation/search_graphs.php @@ -29,6 +29,10 @@ if ($graphs === false || !$searchGraphs) { $table->head[0] = __('Graph name'); $table->head[1] = __('Description'); + $table->headstyle = []; + $table->headstyle[0] = 'text-align: left'; + $table->headstyle[1] = 'text-align: left'; + $table->data = []; foreach ($graphs as $graph) { array_push( diff --git a/pandora_console/operation/search_main.php b/pandora_console/operation/search_main.php index 813ef1b004..58f75e0ca5 100644 --- a/pandora_console/operation/search_main.php +++ b/pandora_console/operation/search_main.php @@ -32,21 +32,21 @@ $table->id = 'summary'; $table->width = '98%'; $table->style = []; -$table->style[0] = 'font-weight: bold; text-align: center;'; -$table->style[1] = 'font-weight: bold; text-align: center;'; -$table->style[2] = 'font-weight: bold; text-align: center;'; -$table->style[3] = 'font-weight: bold; text-align: center;'; -$table->style[4] = 'font-weight: bold; text-align: center;'; -$table->style[5] = 'font-weight: bold; text-align: center;'; -$table->style[6] = 'font-weight: bold; text-align: center;'; -$table->style[7] = 'font-weight: bold; text-align: center;'; -$table->style[8] = 'font-weight: bold; text-align: center;'; -$table->style[9] = 'font-weight: bold; text-align: center;'; -$table->style[10] = 'font-weight: bold; text-align: center;'; -$table->style[11] = 'font-weight: bold; text-align: center;'; -$table->style[13] = 'font-weight: bold; text-align: center;'; -$table->style[14] = 'font-weight: bold; text-align: center;'; -$table->style[15] = 'font-weight: bold; text-align: center;'; +$table->style[0] = 'font-weight: bold; text-align: left;'; +$table->style[1] = 'font-weight: bold; text-align: left;'; +$table->style[2] = 'font-weight: bold; text-align: left;'; +$table->style[3] = 'font-weight: bold; text-align: left;'; +$table->style[4] = 'font-weight: bold; text-align: left;'; +$table->style[5] = 'font-weight: bold; text-align: left;'; +$table->style[6] = 'font-weight: bold; text-align: left;'; +$table->style[7] = 'font-weight: bold; text-align: left;'; +$table->style[8] = 'font-weight: bold; text-align: left;'; +$table->style[9] = 'font-weight: bold; text-align: left;'; +$table->style[10] = 'font-weight: bold; text-align: left;'; +$table->style[11] = 'font-weight: bold; text-align: left;'; +$table->style[13] = 'font-weight: bold; text-align: left;'; +$table->style[14] = 'font-weight: bold; text-align: left;'; +$table->style[15] = 'font-weight: bold; text-align: left;'; diff --git a/pandora_console/operation/search_maps.php b/pandora_console/operation/search_maps.php index 0ab656d9b5..6b6aeeb423 100755 --- a/pandora_console/operation/search_maps.php +++ b/pandora_console/operation/search_maps.php @@ -32,6 +32,13 @@ if ($maps === false || !$searchMaps) { $table->align[1] = 'center'; $table->align[2] = 'center'; + $table->headstyle = []; + $table->headstyle[0] = 'text-align: left'; + $table->headstyle[1] = 'text-align: center'; + $table->headstyle[1] = 'text-align: center'; + + + $table->data = []; foreach ($maps as $map) { array_push( diff --git a/pandora_console/operation/search_modules.php b/pandora_console/operation/search_modules.php index 81ec17cf39..d055d29946 100644 --- a/pandora_console/operation/search_modules.php +++ b/pandora_console/operation/search_modules.php @@ -51,6 +51,17 @@ if (!$modules || !$searchModules) { $table->align[7] = 'left'; $table->align[8] = 'left'; + $table->headstyle = []; + $table->headstyle[0] = 'text-align: left'; + $table->headstyle[1] = 'text-align: left'; + $table->headstyle[2] = 'text-align: left'; + $table->headstyle[3] = 'text-align: left'; + $table->headstyle[4] = 'text-align: left'; + $table->headstyle[5] = 'text-align: left'; + $table->headstyle[6] = 'text-align: left'; + $table->headstyle[7] = 'text-align: left'; + $table->headstyle[8] = 'text-align: left'; + $table->data = []; $id_type_web_content_string = db_get_value( diff --git a/pandora_console/operation/search_reports.php b/pandora_console/operation/search_reports.php index d86b0c5446..e16507a624 100755 --- a/pandora_console/operation/search_reports.php +++ b/pandora_console/operation/search_reports.php @@ -44,6 +44,8 @@ if ($reports === false || !$searchReports) { $table->head[3] = __('XML'); $table->size[0] = '50%'; $table->size[1] = '20%'; + $table->headstyle[0] = 'text-align: left'; + $table->headstyle[1] = 'text-align: left'; $table->size[2] = '2%'; $table->headstyle[2] = 'min-width: 35px;text-align: left;'; $table->size[3] = '2%'; diff --git a/pandora_console/operation/search_users.php b/pandora_console/operation/search_users.php index 3f397129db..ead204915d 100755 --- a/pandora_console/operation/search_users.php +++ b/pandora_console/operation/search_users.php @@ -30,6 +30,14 @@ if (!$users || !$searchUsers) { $table->align = []; $table->align[4] = 'center'; + $table->headstyle = []; + $table->headstyle[0] = 'text-align: left'; + $table->headstyle[1] = 'text-align: left'; + $table->headstyle[2] = 'text-align: left'; + $table->headstyle[3] = 'text-align: left'; + $table->headstyle[4] = 'text-align: center'; + $table->headstyle[5] = 'text-align: left'; + $table->head = []; $table->head[0] = __('User ID').' '.''.html_print_image('images/sort_up.png', true, ['style' => $selectUserIDUp]).''.''.html_print_image('images/sort_down.png', true, ['style' => $selectUserIDDown]).''; $table->head[1] = __('Name').' '.''.html_print_image('images/sort_up.png', true, ['style' => $selectNameUp]).''.''.html_print_image('images/sort_down.png', true, ['style' => $selectNameDown]).''; @@ -38,6 +46,8 @@ if (!$users || !$searchUsers) { $table->head[4] = __('Profile').' '.''.html_print_image('images/sort_up.png', true, ['style' => $selectProfileUp]).''.''.html_print_image('images/sort_down.png', true, ['style' => $selectProfileDown]).''; $table->head[5] = __('Description'); + + $table->data = []; foreach ($users as $user) {