From 31d305b7d5822c55a1dc7739655f019608e55d8e Mon Sep 17 00:00:00 2001 From: zarzuelo Date: Tue, 4 Feb 2014 16:22:12 +0000 Subject: [PATCH] 2014-02-04 Sergio Martin * include/functions_groups.php mobile/operation/tactical.php mobile/operation/groups.php mobile/include/style/main.css: Improve mobile console. Especially groups view git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9402 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 8 ++ pandora_console/include/functions_groups.php | 74 +++++++++++++------ pandora_console/mobile/include/style/main.css | 71 +++++++++++++++--- pandora_console/mobile/operation/groups.php | 73 +++++++++--------- pandora_console/mobile/operation/tactical.php | 16 +--- 5 files changed, 164 insertions(+), 78 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 74522117d3..b8eaeee46c 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2014-02-04 Sergio Martin + + * include/functions_groups.php + mobile/operation/tactical.php + mobile/operation/groups.php + mobile/include/style/main.css: Improve mobile + console. Especially groups view + 2014-01-31 Sergio Martin * mobile/operation/agent.php diff --git a/pandora_console/include/functions_groups.php b/pandora_console/include/functions_groups.php index 24076d7102..ee744bc4b6 100644 --- a/pandora_console/include/functions_groups.php +++ b/pandora_console/include/functions_groups.php @@ -748,51 +748,77 @@ function groups_get_group_row_data($id_group, $group_all, $group, &$printed_grou WHERE disabled = 0"); } - $row[__('Agents')] = ""; - $row[__('Agents')] .= $data["total_agents"]; + // Total agents + $row['links'][__('Agents')] = "index.php?" . + "page=agents&group=" . $id_group; + $row['counts'][__('Agents')] = $data["total_agents"]; + + $row[__('Agents')] = ""; + $row[__('Agents')] .= $row['counts'][__('Agents')]; $row[__('Agents')] .= ""; + // Agents unknown - $row[__('Agents unknown')] = ""; - $row[__('Agents unknown')] .= $data["agents_unknown"]; + $row['links'][__('Agents unknown')] = "index.php?" . + "page=agents&group=" . $id_group . "&status=" . AGENT_STATUS_UNKNOWN; + $row['counts'][__('Agents unknown')] = $data["agents_unknown"]; + + $row[__('Agents unknown')] = ""; + $row[__('Agents unknown')] .= $row['counts'][__('Agents unknown')]; $row[__('Agents unknown')] .= ""; // Monitors Unknown - $row[__('Unknown')] = ""; - $row[__('Unknown')] .= $data["monitor_unknown"]; + $row['links'][__('Unknown')] = "index.php?" . + "page=modules&group=" . $id_group . "&status=" . AGENT_MODULE_STATUS_UNKNOWN; + $row['counts'][__('Unknown')] = $data["monitor_unknown"]; + + $row[__('Unknown')] = ""; + $row[__('Unknown')] .= $row['counts'][__('Unknown')]; $row[__('Unknown')] .= ""; // Monitors Not Init - $row[__('Not init')] = ""; - $row[__('Not init')] .= $data["monitor_not_init"]; + $row['links'][__('Not init')] = "index.php?" . + "page=modules&group=" . $id_group . "&status=" . AGENT_MODULE_STATUS_NOT_INIT; + $row['counts'][__('Not init')] = $data["monitor_unknown"]; + + $row[__('Not init')] = ""; + $row[__('Not init')] .= $row['counts'][__('Not init')]; $row[__('Not init')] .= ""; // Monitors OK - $row[__('Normal')] = ""; - $row[__('Normal')] .= $data["monitor_ok"]; + $row['links'][__('Normal')] = "index.php?" . + "page=modules&group=" . $id_group . "&status=" . AGENT_MODULE_STATUS_NORMAL; + $row['counts'][__('Normal')] = $data["monitor_ok"]; + + $row[__('Normal')] = ""; + $row[__('Normal')] .= $row['counts'][__('Normal')]; $row[__('Normal')] .= ""; // Monitors Warning - $row[__('Warning')] = ""; - $row[__('Warning')] .= $data["monitor_warning"]; + $row['links'][__('Warning')] = "index.php?" . + "page=modules&group=" . $id_group . "&status=" . AGENT_MODULE_STATUS_WARNING; + $row['counts'][__('Warning')] = $data["monitor_warning"]; + + $row[__('Warning')] = ""; + $row[__('Warning')] .= $row['counts'][__('Normal')]; $row[__('Warning')] .= ""; // Monitors Critical - $row[__('Critical')] = ""; - $row[__('Critical')] .= $data["monitor_critical"]; + $row['links'][__('Critical')] = "index.php?" . + "page=modules&group=" . $id_group . "&status=" . AGENT_MODULE_STATUS_CRITICAL_BAD; + $row['counts'][__('Critical')] = $data["monitor_critical"]; + + $row[__('Critical')] = ""; + $row[__('Critical')] .= $row['counts'][__('Critical')]; $row[__('Critical')] .= ""; // Alerts fired - $row[__('Alerts fired')] = "";; - $row[__('Alerts fired')] .= $data["monitor_alerts_fired"]; + $row['links'][__('Alerts fired')] = "index.php?" . + "page=alerts&group=" . $id_group . "&status=fired"; + $row['counts'][__('Alerts fired')] = $data["monitor_alerts_fired"]; + + $row[__('Alerts fired')] = ""; + $row[__('Alerts fired')] .= $row['counts'][__('Alerts fired')]; $row[__('Alerts fired')] .= ""; $rows[$id_group] = $row; diff --git a/pandora_console/mobile/include/style/main.css b/pandora_console/mobile/include/style/main.css index ee9c01b12b..097dac26f3 100644 --- a/pandora_console/mobile/include/style/main.css +++ b/pandora_console/mobile/include/style/main.css @@ -41,10 +41,6 @@ legend { margin-bottom: 5px; } -.ui-body-d { - border-radius: 0.6em 0.6em 0.6em 0.6em !important; -} - .ui-btn-up-c { font-weight: normal !important; text-shadow: none !important; @@ -160,7 +156,7 @@ tr.group_view_alrm, .group_view_alrm { } .ui-btn-up-group_view_alrm, .ui-btn-hover-group_view_alrm { background-color: #F7931E; - color: #111; + color: #FFF; border: 1px solid #111111; font-weight: bold; text-shadow: none; @@ -211,12 +207,40 @@ tr.group_view_data, .group_view_data { display: inline !important; } -.list_groups .link_count.ui-link-inherit { - margin-top: -5px; + +.list_groups .number_count, .list_groups .name_count { position: absolute; - right: 10px; top: 0; } + +.list_groups .number_count { + right: 10px; +} + +.list_groups .name_count { + left: 10px; +} + +.list_groups .name_count img { + float: left; + margin-right: 10px; +} + +/* For mobiles */ +@media screen and (max-width: 750px) +{ + .list_groups .name_count img { + margin-top: -7px; + } +} +/* For tablets */ +@media screen and (min-width: 750px) +{ + .list_groups .name_count img { + margin-top: -3px; + } +} + /*END-----------Groups styles-----------------------------------------*/ @@ -493,6 +517,15 @@ table.event_details td.cell_event_name { font-weight: bold; font-size: 14px; } + +#list_agents .cell_0 img { + float: left; +} + +#list_agents td { + height: 35px; + padding-top: 20px; +} @media screen and (max-width: 25em) { #list_agents .cell_2 .ui-table-cell-label, @@ -726,7 +759,7 @@ table.event_details td.cell_event_name { -ul.ui-listview li.ui-btn div.ui-btn-inner div.ui-btn-text { +ul.ui-listview li.ui-btn div.ui-btn-inner div.ui-btn-text a { padding-top: 5px; padding-left: 5px; } @@ -835,6 +868,16 @@ li.ui-btn { } } +/* Common */ + +.ui-li>.ui-btn-inner { + background: white; +} + +.groups_sublist li { + border-radius: 0px; +} + /* For mobiles */ @media screen and (max-width: 750px) { @@ -847,6 +890,11 @@ li.ui-btn { label, input, .ui-btn-inner { font-size: 12px !important; } + + .list_groups .ui-btn-inner { + padding-top: 15px !important; + height: 20px !important; + } } /* For tablets */ @media screen and (min-width: 750px) @@ -864,6 +912,11 @@ li.ui-btn { padding-top: 6px !important; } + .list_groups .ui-btn-inner { + padding-top: 20px !important; + height: 35px !important; + } + .ui-header .ui-title { font-size: 18px !important; } diff --git a/pandora_console/mobile/operation/groups.php b/pandora_console/mobile/operation/groups.php index efa0c7ada2..e61a3d4e7b 100644 --- a/pandora_console/mobile/operation/groups.php +++ b/pandora_console/mobile/operation/groups.php @@ -83,39 +83,46 @@ class Groups { 'data-iconpos="right" data-role="collapsible" ' . 'data-collapsed="true" data-theme="' . $group['status'] . '" data-content-theme="d">'); $ui->contentAddHtml('

' . $group['group_name'] . '

'); - $ui->contentAddHtml('