From dc9ab024a09bfa99dad3fa21d608b885fa6b3703 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Mon, 10 Aug 2009 09:55:53 +0000 Subject: [PATCH] 2009-08-07 Miguel de Dios * operation/visual_console/index.php, pandora_console/operation/users/user.php, operation/incidents/incident.php, operation/agentes/status_monitor.php, operation/agentes/estado_agente.php, operation/agentes/alerts_status.php, include/styles/pandora.css, include/styles/pandora_black.css,include/styles/pandora_blackmetal.css, include/styles/pandora_width.css, include/styles/pandora_minimal.css, include/styles/pandora_red.css: the table list now has rows with alternate colours for easy see the data. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1833 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 11 +++++++++++ .../godmode/agentes/modificar_agente.php | 12 +++++++++++- .../godmode/alerts/alert_actions.php | 9 +++++++++ pandora_console/godmode/alerts/alert_list.php | 9 +++++++++ .../godmode/alerts/alert_templates.php | 9 +++++++++ pandora_console/godmode/users/user_list.php | 9 +++++++++ pandora_console/include/styles/pandora.css | 17 +++++++++++++++++ .../include/styles/pandora_black.css | 17 +++++++++++++++++ .../include/styles/pandora_blackmetal.css | 16 ++++++++++++++++ .../include/styles/pandora_minimal.css | 16 ++++++++++++++++ pandora_console/include/styles/pandora_red.css | 17 +++++++++++++++++ .../operation/agentes/alerts_status.php | 10 ++++++++++ .../operation/agentes/estado_agente.php | 9 +++++++++ .../operation/agentes/status_monitor.php | 9 +++++++++ .../operation/incidents/incident.php | 9 +++++++++ pandora_console/operation/users/user.php | 9 +++++++++ .../operation/visual_console/index.php | 9 +++++++++ 17 files changed, 196 insertions(+), 1 deletion(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index dd2c3f9b91..231ff8c838 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,14 @@ +2009-08-07 Miguel de Dios + + * operation/visual_console/index.php, + pandora_console/operation/users/user.php, operation/incidents/incident.php, + operation/agentes/status_monitor.php, operation/agentes/estado_agente.php, + operation/agentes/alerts_status.php, include/styles/pandora.css, + include/styles/pandora_black.css,include/styles/pandora_blackmetal.css, + include/styles/pandora_width.css, include/styles/pandora_minimal.css, + include/styles/pandora_red.css: the table list now has rows with alternate + colours for easy see the data. + 2009-08-10 Jorge Gonzalez * include/languages/es.po, include/languages/es.mo: Updated Spanish diff --git a/pandora_console/godmode/agentes/modificar_agente.php b/pandora_console/godmode/agentes/modificar_agente.php index 3275dbd341..7e740f0da8 100644 --- a/pandora_console/godmode/agentes/modificar_agente.php +++ b/pandora_console/godmode/agentes/modificar_agente.php @@ -162,6 +162,9 @@ if ($agents !== false) { echo "".__('Description').""; echo "".__('Delete').""; $color=1; + + $rowPair = true; + $iterator = 0; foreach ($agents as $agent) { $id_grupo = $agent["id_grupo"]; if (! give_acl ($config["id_user"], $id_grupo, "AW")) @@ -175,8 +178,15 @@ if ($agents !== false) { $color = 1; } + + if ($rowPair) + $rowclass = 'rowPair'; + else + $rowclass = 'rowOdd'; + $rowPair = !$rowPair; + $iterator++; // Agent name - echo ""; + echo ""; if ($agent["disabled"]){ echo ""; } diff --git a/pandora_console/godmode/alerts/alert_actions.php b/pandora_console/godmode/alerts/alert_actions.php index c33c5de461..c818911bb6 100644 --- a/pandora_console/godmode/alerts/alert_actions.php +++ b/pandora_console/godmode/alerts/alert_actions.php @@ -108,7 +108,16 @@ $actions = get_db_all_rows_in_table ('talert_actions'); if ($actions === false) $actions = array (); +$rowPair = true; +$iterator = 0; foreach ($actions as $action) { + if ($rowPair) + $table->rowclass[$iterator] = 'rowPair'; + else + $table->rowclass[$iterator] = 'rowOdd'; + $rowPair = !$rowPair; + $iterator++; + $data = array (); $data[0] = ''. diff --git a/pandora_console/godmode/alerts/alert_list.php b/pandora_console/godmode/alerts/alert_list.php index dd97e0b7b4..09023742fa 100644 --- a/pandora_console/godmode/alerts/alert_list.php +++ b/pandora_console/godmode/alerts/alert_list.php @@ -325,7 +325,16 @@ $table->head[4] = __('Actions'); $table->head[5] = ''; $table->data = array (); +$rowPair = true; +$iterator = 0; foreach ($simple_alerts as $alert) { + if ($rowPair) + $table->rowclass[$iterator] = 'rowPair'; + else + $table->rowclass[$iterator] = 'rowOdd'; + $rowPair = !$rowPair; + $iterator++; + $data = array (); $data[0] = '
'; diff --git a/pandora_console/godmode/alerts/alert_templates.php b/pandora_console/godmode/alerts/alert_templates.php index d3155e64cf..bdc5bdd355 100644 --- a/pandora_console/godmode/alerts/alert_templates.php +++ b/pandora_console/godmode/alerts/alert_templates.php @@ -192,7 +192,16 @@ $table->size[3] = '50px'; $table->align = array (); $table->align[3] = 'center'; +$rowPair = true; +$iterator = 0; foreach ($templates as $template) { + if ($rowPair) + $table->rowclass[$iterator] = 'rowPair'; + else + $table->rowclass[$iterator] = 'rowOdd'; + $rowPair = !$rowPair; + $iterator++; + $data = array (); $data[0] = ''. diff --git a/pandora_console/godmode/users/user_list.php b/pandora_console/godmode/users/user_list.php index 1a9912b926..1811956078 100644 --- a/pandora_console/godmode/users/user_list.php +++ b/pandora_console/godmode/users/user_list.php @@ -65,7 +65,16 @@ $table->size[5] = 40; $info = array (); $info = get_users (); +$rowPair = true; +$iterator = 0; foreach ($info as $user_id => $user_info) { + if ($rowPair) + $table->rowclass[$iterator] = 'rowPair'; + else + $table->rowclass[$iterator] = 'rowOdd'; + $rowPair = !$rowPair; + $iterator++; + $data[0] = ''.$user_id.''; $data[1] = $user_info["fullname"].''; $data[1] .= __('First name').': '.$user_info["firstname"].'
'; diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 50a68f3b2a..8e0c283ebc 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -329,6 +329,23 @@ td.datos4 { td.datos_id { color: #1a313a; } + +tr.rowPair { + background-color: #fff; +} + +tr.rowOdd { + background-color: #CFD2D4; +} + +tr.rowPair:hover { + background-color: #ddd; +} + +tr.rowOdd:hover { + background-color: #A2A2C2; /*#8F9294;*/ +} + .bg { /* op menu */ background-color: #786; } diff --git a/pandora_console/include/styles/pandora_black.css b/pandora_console/include/styles/pandora_black.css index 9023e5471d..8a50d88998 100644 --- a/pandora_console/include/styles/pandora_black.css +++ b/pandora_console/include/styles/pandora_black.css @@ -76,6 +76,23 @@ td.datos3 { td.datos_id { color: #1a313a; } + +tr.rowPair { + background-color: #274263; +} + +tr.rowOdd { + background-color: #020E1D; +} + +tr.rowPair:hover { + background-color: #4782A3; +} + +tr.rowOdd:hover { + background-color: #424E5D; +} + div.title_line { background-color: #000; } diff --git a/pandora_console/include/styles/pandora_blackmetal.css b/pandora_console/include/styles/pandora_blackmetal.css index da3e824053..f2b69ac6e6 100644 --- a/pandora_console/include/styles/pandora_blackmetal.css +++ b/pandora_console/include/styles/pandora_blackmetal.css @@ -92,3 +92,19 @@ span#logo_text1, span#logo_text2 { ol.steps li.current { border-left: 5px solid #000; } + +tr.rowPair { + background-color: #fff; +} + +tr.rowOdd { + background-color: #BDC2C7; +} + +tr.rowPair:hover { + background-color: #DEDEDE; +} + +tr.rowOdd:hover { + background-color: #7D8287; +} diff --git a/pandora_console/include/styles/pandora_minimal.css b/pandora_console/include/styles/pandora_minimal.css index 112f8d6a4f..6431ea4d92 100644 --- a/pandora_console/include/styles/pandora_minimal.css +++ b/pandora_console/include/styles/pandora_minimal.css @@ -101,3 +101,19 @@ table, img { background-color: #999999; padding: 20px; } + +tr.rowPair { + background-color: #fff; +} + +tr.rowOdd { + background-color: #888; +} + +tr.rowPair:hover { + background-color: #bbb; +} + +tr.rowOdd:hover { + background-color: #444; +} diff --git a/pandora_console/include/styles/pandora_red.css b/pandora_console/include/styles/pandora_red.css index 1dcec10e81..6b569da114 100644 --- a/pandora_console/include/styles/pandora_red.css +++ b/pandora_console/include/styles/pandora_red.css @@ -316,6 +316,23 @@ td.datos_id { td.datos_jus, td.datos2_jus { text-align: justify; } + +tr.rowPair { + background-color: #fff; +} + +tr.rowOdd { + background-color: #F08080; +} + +tr.rowPair:hover { + background-color: #FFBFBF; +} + +tr.rowOdd:hover { + background-color: #F8D0D0; +} + .bg { /* op menu */ background-color: #D44; } diff --git a/pandora_console/operation/agentes/alerts_status.php b/pandora_console/operation/agentes/alerts_status.php index 71a93af8d3..f9627b1fed 100644 --- a/pandora_console/operation/agentes/alerts_status.php +++ b/pandora_console/operation/agentes/alerts_status.php @@ -155,7 +155,17 @@ $table->data = array (); $total = 0; $printed = 0; + +$rowPair = true; +$iterator = 0; foreach ($alerts_simple as $alert) { + if ($rowPair) + $table->rowclass[$iterator] = 'rowPair'; + else + $table->rowclass[$iterator] = 'rowOdd'; + $rowPair = !$rowPair; + $iterator++; + $total++; if (empty ($alert) || $printed >= $config["block_size"] || $total <= $offset) { continue; diff --git a/pandora_console/operation/agentes/estado_agente.php b/pandora_console/operation/agentes/estado_agente.php index 58af3e35b8..e178c96f50 100644 --- a/pandora_console/operation/agentes/estado_agente.php +++ b/pandora_console/operation/agentes/estado_agente.php @@ -147,7 +147,16 @@ $table->align[7] = "right"; $table->data = array (); +$rowPair = true; +$iterator = 0; foreach ($agents as $agent) { + if ($rowPair) + $table->rowclass[$iterator] = 'rowPair'; + else + $table->rowclass[$iterator] = 'rowOdd'; + $rowPair = !$rowPair; + $iterator++; + $agent_info = get_agent_module_info ($agent["id_agente"]); $data = array (); diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php index 72a7f11bac..9f0656358f 100644 --- a/pandora_console/operation/agentes/status_monitor.php +++ b/pandora_console/operation/agentes/status_monitor.php @@ -185,7 +185,16 @@ $table->align[5] = "center"; $table->head[6] = __('Timestamp'); $table->align[6] = "right"; +$rowPair = true; +$iterator = 0; foreach ($result as $row) { + if ($rowPair) + $table->rowclass[$iterator] = 'rowPair'; + else + $table->rowclass[$iterator] = 'rowOdd'; + $rowPair = !$rowPair; + $iterator++; + $data = array (); //TODO: This should be processed locally. Don't rely on other URL's to do our dirty work. Maybe a process_agentmodule_flag function $data[0] = '
'; diff --git a/pandora_console/operation/incidents/incident.php b/pandora_console/operation/incidents/incident.php index 7485eee248..1f2a3d29c6 100644 --- a/pandora_console/operation/incidents/incident.php +++ b/pandora_console/operation/incidents/incident.php @@ -270,7 +270,16 @@ if ($count < 1) { $table->align[4] = "center"; $table->align[8] = "center"; + $rowPair = true; + $iterator = 0; foreach ($result as $row) { + if ($rowPair) + $table->rowclass[$iterator] = 'rowPair'; + else + $table->rowclass[$iterator] = 'rowOdd'; + $rowPair = !$rowPair; + $iterator++; + $data = array(); $data[0] = ''.$row["id_incidencia"].''; diff --git a/pandora_console/operation/users/user.php b/pandora_console/operation/users/user.php index 858b4d53ee..1032062868 100644 --- a/pandora_console/operation/users/user.php +++ b/pandora_console/operation/users/user.php @@ -46,7 +46,16 @@ if (give_acl ($config["id_user"], 0, "UM") == 1) { $info[$config["id_user"]] = get_user_info ($config["id_user"]); } +$rowPair = true; +$iterator = 0; foreach ($info as $user_id => $user_info) { + if ($rowPair) + $table->rowclass[$iterator] = 'rowPair'; + else + $table->rowclass[$iterator] = 'rowOdd'; + $rowPair = !$rowPair; + $iterator++; + $data[0] = ''.$user_id.''; $data[1] = $user_info["fullname"].''; $data[1] .= __('First name').': '.$user_info["firstname"].'
'; diff --git a/pandora_console/operation/visual_console/index.php b/pandora_console/operation/visual_console/index.php index 3a6a24aca6..2c99c60852 100644 --- a/pandora_console/operation/visual_console/index.php +++ b/pandora_console/operation/visual_console/index.php @@ -33,7 +33,16 @@ $table->align = array (); $table->align[1] = 'center'; $table->align[2] = 'center'; +$rowPair = true; +$iterator = 0; foreach ($layouts as $layout) { + if ($rowPair) + $table->rowclass[$iterator] = 'rowPair'; + else + $table->rowclass[$iterator] = 'rowOdd'; + $rowPair = !$rowPair; + $iterator++; + if (!give_acl ($config["id_user"], $layout["id_group"], "AR")) { continue; }