diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index cc7e0cf44b..ab2dd3dccc 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,46 @@ +2008-07-10 Sancho Lerena + + * include/styles/pandora_red.css: Updated. + + * include/styles/pandora_black.css: New style with BLACK blackground. + + * include/styles/pandora.css: Updated. + + * include/functions_db.php: Added auto order combos and queries. + + * include/functions_visual_map.php: Added overlap on down elements if + there are more than one in the same position (This could allow to cluster + elements to shown the down status first). Removed unused code. + + * operation/events/events.php: Added tooltip for group name. + + * operation/visual_console/render_view.php: Adjusted controls position. + + * operation/agentes/status_monitor.php: Added status for unknown monitors. + Added some database search improvement. + + * operation/agentes/sla_view.php: Sorted list of items. + + * operation/agentes/ver_agente.php: Updated AJAX code for network map + detail view of an agent. Added alert data. + + * operation/agentes/tactical.php: Removed 'fixed' styles, now using CSS. + + * operation/agentes/networkmap.php: Added ransep and font selectors. + Added alert under yellow color. Minor improvements. + + * operation/reporting/graph_viewer.php: Style update. + + * operation/menu.php: Visual console maps sort by name + + * images/background-li.gif: This sould replace
  • image. + + * general/login_page.php: Added build version on develop mode. + + * godmode/reporting/map_builder.php: Sorted lists, and shown module name + instead description. + + 2008-07-09 Evi Vanoost * pandoradb.sql: Updated indexes diff --git a/pandora_console/general/login_page.php b/pandora_console/general/login_page.php index 99f9fdba9b..bb19101a03 100644 --- a/pandora_console/general/login_page.php +++ b/pandora_console/general/login_page.php @@ -38,7 +38,12 @@ if (isset($_GET['sec'])){ logo
    - + Login
    diff --git a/pandora_console/godmode/reporting/map_builder.php b/pandora_console/godmode/reporting/map_builder.php index b3109f7637..8859f070a2 100644 --- a/pandora_console/godmode/reporting/map_builder.php +++ b/pandora_console/godmode/reporting/map_builder.php @@ -263,7 +263,7 @@ if (! $edit_layout && ! $id_layout) { $table->align = array (); $table->align[2] = 'center'; - $maps = get_db_all_rows_in_table ('tlayout'); + $maps = get_db_all_rows_in_table ('tlayout','name'); foreach ($maps as $map) { $data = array (); @@ -372,10 +372,10 @@ if (! $edit_layout && ! $id_layout) { $all_agents = get_agents_in_group ($id_group); $agents = array (); foreach ($all_agents as $agent) { - $agents[$agent['id_agente']] = $agent['nombre']; + $agents[$agent['id_agente']] = strtolower($agent['nombre']); } - asort ($agents); - + asort($agents); + echo '
    '; echo '

    '.lang_string ('Map element editor').'

    '; echo lang_string ('Drag an element here to edit the properties'); @@ -454,11 +454,7 @@ function agent_changed (event, id_agent, selected) { $('#form_layout_data_editor #module').empty (); $('#form_layout_data_editor #module').append (new Option ("--", 0)); jQuery.each (data, function (i, val) { - if (val['descripcion'] == "") { - s = html_entity_decode (val['nombre']); - } else { - s = html_entity_decode (val['descripcion']); - } + s = html_entity_decode (val['nombre']); $('#form_layout_data_editor #module').append (new Option (s, val['id_agente_modulo'])); $('#form_layout_data_editor #module').fadeIn ('normal'); }); diff --git a/pandora_console/images/background-li.gif b/pandora_console/images/background-li.gif new file mode 100644 index 0000000000..2cefea3ed3 Binary files /dev/null and b/pandora_console/images/background-li.gif differ diff --git a/pandora_console/include/functions_db.php b/pandora_console/include/functions_db.php index 5ffd93d2f9..b52ab3398b 100644 --- a/pandora_console/include/functions_db.php +++ b/pandora_console/include/functions_db.php @@ -224,12 +224,12 @@ function get_agents_in_group ($id_group, $disabled = false) { if ($id_group == 1) { if ($disabled) return get_db_all_rows_in_table ('tagente', 'nombre'); - return get_db_all_rows_field_filter ('tagente', 'disabled', 0); + return get_db_all_rows_field_filter ('tagente', 'disabled', 0, 'nombre'); } if ($disabled) - return get_db_all_rows_field_filter ('tagente', 'id_grupo', (int) $id_group); + return get_db_all_rows_field_filter ('tagente', 'id_grupo', (int) $id_group, 'nombre'); $sql = sprintf ('SELECT * FROM tagente - WHERE id_grupo = %d AND disabled = 0', + WHERE id_grupo = %d AND disabled = 0 ORDER BY nombre', $id_group); return get_db_all_rows_sql ($sql); } @@ -1445,17 +1445,17 @@ function return_status_agent_module ($id_agentmodule = 0){ if ($resq2 != 0) { $rowdup2 = mysql_fetch_array ($resq2); if ($rowdup2[0] > 0){ - return false; + return 0; } } // No alerts fired for this agent module - return true; + return 1; } elseif ($rowdup[0] == 0) // 0 is ok for estado field - return true; - return false; + return 1; + return 0; } - return true; + return 1; } /** diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index fd01a9fc23..ed53bb4207 100644 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -42,11 +42,18 @@ function print_pandora_visual_map ($id_layout, $show_links = true, $draw_lines = // STATIC IMAGE (type = 0) // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if ($layout_data['type'] == 0) { + // Link image //index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=1 - + if ($status == 0) // Bad monitor + $z_index = 2; + elseif ($status == 2) // Alert + $z_index = 3; + else + $z_index = 1; // Print BAD over good + // Draw image - echo '
    '; + echo '
    '; if ($show_links) { if ($layout_data['id_layout_linked'] == "" || $layout_data['id_layout_linked'] == 0) { echo ""; @@ -103,13 +110,9 @@ function print_pandora_visual_map ($id_layout, $show_links = true, $draw_lines = // Get parent relationship - Create line data // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if ($layout_data["parent_item"] != "" && $layout_data["parent_item"] != 0) { - $parent_x = get_layoutdata_x ($layout_data["parent_item"]); - $parent_y = get_layoutdata_y ($layout_data["parent_item"]); $line['id'] = $layout_data['id']; $line['node_begin'] = 'layout-data-'.$layout_data["parent_item"]; $line['node_end'] = 'layout-data-'.$layout_data["id"]; - $line['width'] = $parent_x + 15; - $line['height'] = $parent_y + 15; $line['color'] = $status_parent ? '#00dd00' : '#dd0000'; array_push ($lines, $line); } diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 3f8d63261f..132162b904 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -204,7 +204,6 @@ div#main { margin-left: 0px; margin-right: 0px; } - div#menu { width: 155px; float: left; @@ -376,6 +375,11 @@ td.datos_jus, td.datos2_jus { border-bottom: 1px solid #708090; width: 100%; } +.suc { + color: #5a8629; + background: url(../../images/suc.png) no-repeat 1px; + padding: 4px 1px 6px 30px; +} .green { color: #5a8629; } @@ -739,3 +743,13 @@ div#main_pure { background-color: #999999; padding: 20px; } + + +td.big_data { + font-size: 2em; + font-weight: bold; +} + +a.big_data { + text-decoration: none; font: bold 1em Arial, Sans-serif; +} diff --git a/pandora_console/include/styles/pandora_black.css b/pandora_console/include/styles/pandora_black.css new file mode 100644 index 0000000000..cef6984e96 --- /dev/null +++ b/pandora_console/include/styles/pandora_black.css @@ -0,0 +1,704 @@ +/* +// Pandora FMS - the Free monitoring system +// ======================================== +// Copyright (c) 2004-2007 Sancho Lerena, slerena@gmail.com +// Main PHP/SQL code development and project architecture and management +// Copyright (c) 2004-2007 Raul Mateos Martin, raulofpandora@gmail.com +// CSS and some PHP additions +// Copyright (c) 2006-2007 Jonathan Barajas, jonathan.barajas[AT]gmail[DOT]com +// Javascript Active Console code. +// Copyright (c) 2006 Jose Navarro +// Additions to Pandora FMS 1.2 graph code and new XML reporting template management +// Copyright (c) 2005-2007 Artica Soluciones Tecnologicas, info@artica.es +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; version 2 +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +@import url(op.css); +@import url(god.css); +@import url(link.css); +@import url(tip.css); +* { + font-family: verdana, sans-serif; + font-size: 8pt; +} +body { + text-align: center; + color: #EEE; +} +td { + color: #EEE; +} +input, textarea { + border: 1px solid #ddd; + font: verdana, sans-serif; + font-size: 8pt; +} +textarea { + padding: 5px; + height: 100px; + font-family: verdana, sans-serif; + font-size: 8pt; +} +input { + padding: 2px 3px 4px 3px; +} +input.button { + margin: 0; + font: bold, Arial, Sans-serif; + border: 1px solid #ccc; + background: #fff; + padding: 2px 3px; + margin: 10px 15px; +} +select { + padding: 0px; + border:1px solid #ddd; + font-family: verdana, sans-serif; + font-size: 8pt; +} +checkbox { + padding: 4px; + border:1px solid #eee; +} +h1, h2, h3 { + font: bold 1em Arial, Sans-serif; + text-transform: uppercase; + color: #BBB; + padding-bottom: 5px; + padding-top: 7px; +} +h1 { + font-size: 16px; +} +h2 { + font-size: 15px; +} +h3 { + font-size: 13px; +} +a { + color: #ddd; + font-weight: bold; + text-decoration: none; +} +a:hover { + color: #CCC; + text-decoration: underline; +} +a.white_bold { + color: #DDD; + text-decoration: none; + font-weight: bold; +} +a.white { + color: #CCC; + text-decoration: none; +} +p.center { + text-align: center; +} +h1#log { + font-size: 18px; + margin-bottom: 0px; + color: #FFF; +} +h1#log_f { + color: #f00; + border-bottom: 1px solid #f00; + padding-bottom: 3px; +} +div#login { + margin: 0 auto; + margin-top: 200px; + width: 460px; + border-left: solid 1px #000; + border-top: solid 1px #000; + border-bottom: solid 2px #000; + border-right: solid 2px #000 +} +div#login_in, #login_f { + margin: 0 auto; + width: 400px; +} +div#login_f { + margin-top: 10px; + margin-bottom: 25px; +} +div#noaccess { + width: 350px; + padding-left: 40px; +} +div#activity{ + padding-top: 18px; + padding-bottom: 18px; +} +div#noa { + float: right; + padding-right: 50px; + margin-top: 25px; +} +div#db_f { + text-align: justify; + margin: auto; + padding: 0.5em; + width: 55em; + margin-top: 3em; +} +div#db_ftxt { + float: right; + padding-top: 10px; +} +div#container { + margin: 0 auto; + width: 960px; + text-align: left; + border-left: solid 2px #000; + border-right: solid 2px #000; + border-top: solid 2px #000; + margin-top: 5px; +} +div#page { + width: 960px; + background: #000; + clear: both; + border-bottom: solid 5px #001E40; + border-top: solid 5px #001E40; +} +div#main { + background: #000; + width: 780px; + min-height: 500px; + float: right; + padding-left: 0px; + padding-top: 0px; + padding-bottom: 20px; + margin-bottom: 25px; + margin-top: 0px; + margin-left: 0px; + margin-right: 0px; +} +div#menu { + width: 155px; + float: left; +} +div#page>div#menu { + width: 157px; +} +div#head { + font-size: 8pt; + width: 960px; + height: 60px; + background: #000; +} +div#foot { + font-size: 7pt; + margin-top: solid 2px #000; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + background: #960003; + width: 960px; + clear: both; +} +#ver { + margin-bottom: 25px; +} +#ip { + margin-top: 10px; + margin-bottom: 5px; +} +label { + display: block; + float: left; + padding-top: 4px; +} +th > label { + padding-top: 7px; +} +input:hover { + background-color: #d4dccd; +} +input.chk {margin-right: 0px; + border: 0px none; + height: 14px; +} +input.datos { + background-color: #f5f5f5; +} +input.datos_readonly { + background-color: #050505; +} +input.login { + border-color: #786; + background-color: #000; + margin: 2px 0 8px; + width: 90px; +} +input.sub { + font-weight: bold; + border-bottom-color: #708090; + border-right-color: #708090; + -moz-border-radius: 5%; + font-size: 8pt; +} +input.next { + padding-right: 21px; + background: #e5e5e5 url(../../images/go.png) no-repeat right 2px; +} +input.upd { + padding-right: 21px; + background: #e5e5e5 url(../../images/upd.png) no-repeat right 3px; +} +input.wand { + padding-right: 21px; + background: #e5e5e5 url(../../images/wand.png) no-repeat right 3px; +} +input.delete { + padding-right: 21px; + background: #e5e5e5 url(../../images/cross.png) no-repeat right 3px; +} +input.search { + padding-right: 21px; + background: #e5e5e5 url(../../images/zoom.png) no-repeat right 3px; +} +input.copy { + padding-right: 21px; + background: #e5e5e5 url(../../images/copy.png) no-repeat right 3px; +} +input.ok { + padding-right: 21px; + background: #e5e5e5 url(../../images/ok.png) no-repeat right 3px; +} +table, img { + border: 0px; +} +th { + background-color: #041D3D; +} +td.datos, td.datost, td.datosb , td.datos_id, td.datosf9 { + background-color: #020E1D; +} +td.datos2, td.datos2t, td.datos2b, td.datos2_id , td.datos2f9 { + background-color: #02152A; +} +td.datos3 { + background-color: #1E1E1E; +} +td.datos_id { + color: #fff; +} +td.datos_jus, td.datos2_jus { + text-align: justify; +} +.bg { /* op menu */ + background-color: #786; +} +.bg2 { /* main page */ + background-color: #d84437; +} +.bg3 { /* godmode */ + background-color: #d84437; +} +.bg4 { /* links */ + background-color: #5385bf; +} +.bg, .bg2, .bg3, .bg4 { + position: relative; + height: 20px; + width: 100%; +} +.f10, #ip { + font-size: 7pt; + text-align: center; +} +.f9, .f9i, .f9b, td.f9, td.f9i, td.datosf9, td.datos2f9 { + font-size: 6pt; +} +.f9i, .redi { + font-style: italic; +} +.jus { + text-align: justify; + width: 700px; +} +.tit { + padding-top: 3px; +} +.tit, .titb { + font-weight: bold; + color: #fff; + text-align: center; +} +.suc { + color: #5a8629; + background: url(../../images/suc.png) no-repeat 1px; + padding: 4px 1px 6px 30px; +} +.error { + background: url(../../images/error.png) no-repeat; + padding: 4px 1px 6px 30px; +} +.red , .redb, .redi, .error { + color: #f00; +} +.sep { + margin-left: 30px; + border-bottom: 1px solid #708090; + width: 100%; +} +.green { + color: #5a8629; +} +.greenb { + color: #00aa00; +} +.grey { + color: #808080; + font-weight: bold; +} +.redb, .greenb, td.datos_id, td.datos2_id, f9b { + font-weight: bold; +} +.p10 { + padding-top: 1px; + padding-bottom: 0px; +} +.p21 { + padding-top: 2px; + padding-bottom: 1px; +} +.w120 { + width: 120px; +} +.w130 { + width: 130px; +} +.w135 { + width: 135px; +} +.w155 { + width: 155px; +} +.top, .top_red, .bgt, td.datost, td.datos2t { + vertical-align: top; +} +.top_red { + background: #ff0000; +} +.bot, .titb, td.datosb { + vertical-align: bottom; +} +.msg { + margin-top: 15px; + text-align: justify; +} +ul.mn { + list-style: none; + padding: 0px 0px 0px 0px; + margin: 0px 0px 0px 0px; + line-height: 24px; +} +.gr { + font-size: 10pt; + font-weight: bold; +} +a.mn, .gr { + font-family: Arial, Verdana, sans-serif, Helvetica; +} +div.nf { + background: url(../../images/info.png) no-repeat; + color: #ac4444; + margin-left: 7px; + padding: 2px 1px 6px 25px; +} +div.title_line { + background-color: #000; + height: 5px; + width: 762px; +} +#menu_tab_frame { + background: #D84437; + width: 805px; + min-height: 22px; + padding-left: 0x; + margin-left: -25px; + float:left; + border-bottom: 1px solid #778866; +} +#menu_tab_frame_view { + background: #66AA44; + width: 805px; + min-height: 22px; + padding-left: 0x; + margin-left: -25px; + float:left; + border-bottom: 1px solid #778866; +} + + +#menu_tab .mn, #menu_tab ul, #menu_tab .mn ul { + padding: 0px; + list-style: none; + margin: 0px; +} +#menu_tab .mn li { + float: right; + position: relative; +} +#menu_tab li a, #menu_tab li.nomn a { + background: #082C43; + padding: 2px 10px 2px 10px; + color: #CFCFCF; + border-left: 1px solid #000; + font-weight: bold; + line-height: 18px; +} +#menu_tab li.nomn_high a { + background: #799E48; + color: #fff; + padding: 2px 10px 2px 10px; + border-left: 2px solid #778866; + font-weight: bold; + line-height: 18px; +} + +#menu_tab .mn li a { + display: block; + text-decoration: none; +} +#menu_tab li.nomn:hover a, +#menu_tab li:hover ul a:hover { + background: #62606a; +} +#menu_tab li:hover a { + background: #62606a url("../images/arrow.png") no-repeat right 3px; +} +#menu_tab li:hover ul a, #menu_tab .mn ul { + background: #62606a; + border-top: none; +} +/* TAB TITLE */ +#menu_tab_left .mn, #menu_tab_left ul, #menu_tab_left .mn ul { + padding: 0px 0px 0px 0px; + list-style: none; + margin: 0px 0px 0px -20px; +} +#menu_tab_left .mn li { + float: left; + position: relative; +} +#menu_tab_left li a { + background: #400027; + padding: 2px 10px 2px 10px; + color: #fff; + font-weight: bold; + line-height: 18px; +} +#menu_tab_left .mn li a { + display: block; + text-decoration: none; +} +#menu_tab_left li.view a { + background: #0B315B; + padding: 2px 10px 2px 10px; + color: #fff; + font-weight: bold; + line-height: 18px; +} +span.users { + background: url(../../images/group.png) no-repeat; +} +span.agents { + background: url(../../images/bricks.png) no-repeat; +} +span.data { + background: url(../../images/data.png) no-repeat; +} +span.alerts { + background: url(../../images/bell.png) no-repeat; +} +span.time { + background: url(../../images/hourglass.png) no-repeat; +} +span.net { + background: url(../../images/network.png) no-repeat; +} +span.master { + background: url(../../images/master.png) no-repeat; +} +span.wmi { + background: url(../../images/wmi.png) no-repeat; +} +span.prediction { + background: url(../../images/chart_bar.png) no-repeat; +} +span.plugin { + background: url(../../images/plugin.png) no-repeat; +} +span.export { + background: url(../../images/database_refresh.png) no-repeat; +} +span.snmp { + background: url(../../images/snmp.png) no-repeat; +} +span.binary { + background: url(../../images/binary.png) no-repeat; +} +span.recon { + background: url(../../images/recon.png) no-repeat; +} +span.rmess { + background: url(../../images/email_open.png) no-repeat; +} +span.nrmess { + background: url(../../images/email.png) no-repeat; +} + +/* This kind of span do not have any sense, should be replaced on PHP code +by a real img in code. They are not useful because insert too much margin around +(for example, not valid to use in the table of server view */ + +span.users, span.agents, span.data, span.alerts, span.time, span.net, +span.master, span.snmp, span.binary, span.recon { + margin-left: 4px; + margin-top: 10px; + padding: 4px 8px 12px 30px; + display: block; +} +span.rmess, span.nrmess { + margin-left: 14px; + padding: 1px 0px 10px 30px; + display: block; +} +/* New styles for data box */ +.databox, .databox_color, .databox_frame { + margin-bottom: 15px; + margin-top: 5px; + margin-left: 0px; + border: 1px solid #071924; +} +.databox { + background-color: #000; + color: #fff; +} +.databox_color { + border-left: 4px solid #071924; +} +#head_l { + float: left; + margin: 0; + padding: 0; +} +#head_r { + float: right; + text-align: right; + margin-right: 10px; + padding-top: 10px; +} +#head_m { + position: absolute; + padding-top: 7px; + padding-left: 210px; +} +span#logo_text1 { + font: bolder 3em Arial, Sans-serif; + letter-spacing: -2px; + color: #eee; +} +span#logo_text2 { + font: 3em Arial, Sans-serif; + letter-spacing: -2px; + color: #aaa; +} +.bb0 { + border-bottom: 0px; +} +.bt0 { + border-top: 0px; +} + +.action-buttons { + text-align: right; +} + +#table-add-item select, #table-add-sla select { + width: 180px; +} + +td.datos_green, td.datos_greenf9 { + background-color: #004807; + padding: 5px 5px 5px 5px; +} + +td.datos_red, td.datos_redf9 { + background-color: #652000; + padding: 5px 5px 5px 5px; +} + +td.datos_yellow, td.datos_yellowf9 { + background-color: #575A00; + padding: 5px 5px 5px 5px; +} + +td.datos_blue, td.datos_bluef9 { + background-color: #003B5A; + padding: 5px 5px 5px 5px; +} + +td.datos_grey, td.datos_greyf9 { + background-color: #303030; + padding: 5px 5px 5px 5px; +} + +td.datos_greyf9, td.datos_bluef9, td.datos_greenf9, td.datos_redf9, td.datos_yellowf9 { + font-size: 6.5pt; +} + +div#main_pure { + background-color: #000; + text-align: left; + margin-bottom: 25px; + margin-top: 10px; + margin-left: 10px; + margin-right: 10px; +} + + +td.big_data { + font-size: 2em; + font-weight: bold; +} + +a.big_data { + text-decoration: none; font: bold 1em Arial, Sans-serif; +} + +#layout_trash_drop { + float: right; + width: 300px; + height: 180px; + background: #fff url("../../images/trash.png") no-repeat bottom left; +} + +#table-agent-configuration radio { + margin-right: 40px; +} + +.ui-draggable { + cursor:move; +} + +#layout_trash_drop { + float: right; +} + diff --git a/pandora_console/include/styles/pandora_red.css b/pandora_console/include/styles/pandora_red.css index d6fd37cd3c..f3d7f5845b 100644 --- a/pandora_console/include/styles/pandora_red.css +++ b/pandora_console/include/styles/pandora_red.css @@ -45,6 +45,13 @@ textarea { font-family: verdana, sans-serif; font-size: 8pt; } +textarea.conf_editor { + padding: 5px; + width: 650; + height: 350; + font-family: verdana, sans-serif; + font-size: 8pt; +} input { padding: 2px 3px 4px 3px; } @@ -80,6 +87,12 @@ h2 { font-size: 15px; } h3 { + font-size: 14px; +} +h4 { + margin-bottom: 2px; + padding-bottom: 0px; + padding-top: 5px; font-size: 13px; } a { @@ -96,6 +109,12 @@ a.white_bold { text-decoration: none; font-weight: bold; } +a.white_grey_bold { + color: #999; + text-decoration: none; + font-weight: bold; +} + a.white { color: #eee; text-decoration: none; @@ -270,6 +289,14 @@ input.search { padding-right: 21px; background: #e5e5e5 url(../../images/zoom.png) no-repeat right 3px; } +input.copy { + padding-right: 21px; + background: #e5e5e5 url(../../images/copy.png) no-repeat right 3px; +} +input.ok { + padding-right: 21px; + background: #e5e5e5 url(../../images/ok.png) no-repeat right 3px; +} table, img { border: 0px; } @@ -277,14 +304,6 @@ th, td.lb, td.lb_view { color: #fff; background-color: #786; } -td.lb, td.lb_view { - height: 16px; - padding-left: 3px; - font-weight: bold; -} -th { - background-color: #CC3333; -} td.datos, td.datost, td.datosb , td.datos_id, td.datosf9 { background-color: #fff0f0; } @@ -322,7 +341,7 @@ td.datos_jus, td.datos2_jus { text-align: center; } .f9, .f9i, .f9b, td.f9, td.f9i, td.datosf9, td.datos2f9 { - font-size: 6pt; + font-size: 6.5pt; } .f9i, .redi { font-style: italic; @@ -339,8 +358,13 @@ td.datos_jus, td.datos2_jus { color: #fff; text-align: center; } +.suc { + color: #5a8629; + background: url(../../images/suc.png) no-repeat 1px; + padding: 4px 1px 6px 30px; +} .error { - background: url(../../images/error.png) no-repeat; + background: url(../../images/err.png) no-repeat; padding: 4px 1px 6px 30px; } .red , .redb, .redi, .error { @@ -369,13 +393,6 @@ td.datos_jus, td.datos2_jus { .redb, .greenb, td.datos_id, td.datos2_id, f9b { font-weight: bold; } -.raya { - border-top: 1px solid #786; - width: 100%; -} -.raya, .noraya { - margin-bottom: -10px; -} .p10 { padding-top: 1px; padding-bottom: 0px; @@ -387,13 +404,13 @@ td.datos_jus, td.datos2_jus { .w120 { width: 120px; } -.w130 { +.w130, #table-agent-configuration select { width: 130px; } .w135 { width: 135px; } -.w155 { +.w155, #table_layout_data select { width: 155px; } .top, .top_red, .bgt, td.datost, td.datos2t { @@ -433,6 +450,26 @@ div.title_line { height: 5px; width: 762px; } +#menu_tab_frame { + background: #D84437; + width: 805px; + min-height: 22px; + padding-left: 0x; + margin-left: -25px; + float:left; + border-bottom: 1px solid #778866; +} +#menu_tab_frame_view { + background: #66AA44; + width: 805px; + min-height: 22px; + padding-left: 0x; + margin-left: -25px; + float:left; + border-bottom: 1px solid #778866; +} + + #menu_tab .mn, #menu_tab ul, #menu_tab .mn ul { padding: 0px; list-style: none; @@ -450,6 +487,15 @@ div.title_line { font-weight: bold; line-height: 18px; } +#menu_tab li.nomn_high a { + background: #799E48; + color: #fff; + padding: 2px 10px 2px 10px; + border-left: 2px solid #778866; + font-weight: bold; + line-height: 18px; +} + #menu_tab .mn li a { display: block; text-decoration: none; @@ -514,6 +560,18 @@ span.net { span.master { background: url(../../images/master.png) no-repeat; } +span.wmi { + background: url(../../images/wmi.png) no-repeat; +} +span.prediction { + background: url(../../images/chart_bar.png) no-repeat; +} +span.plugin { + background: url(../../images/plugin.png) no-repeat; +} +span.export { + background: url(../../images/database_refresh.png) no-repeat; +} span.snmp { background: url(../../images/snmp.png) no-repeat; } @@ -529,6 +587,11 @@ span.rmess { span.nrmess { background: url(../../images/email.png) no-repeat; } + +/* This kind of span do not have any sense, should be replaced on PHP code +by a real img in code. They are not useful because insert too much margin around +(for example, not valid to use in the table of server view */ + span.users, span.agents, span.data, span.alerts, span.time, span.net, span.master, span.snmp, span.binary, span.recon { margin-left: 4px; @@ -581,8 +644,20 @@ span#logo_text2 { letter-spacing: -2px; color: #aaa; } +.bb0 { + border-bottom: 0px; +} +.bt0 { + border-top: 0px; +} +.action-buttons { + text-align: right; +} +#table-add-item select, #table-add-sla select { + width: 180px; +} td.datos_green, td.datos_greenf9 { background-color: #C7EAD5; diff --git a/pandora_console/operation/agentes/networkmap.php b/pandora_console/operation/agentes/networkmap.php index f234399111..e0edabd5e5 100644 --- a/pandora_console/operation/agentes/networkmap.php +++ b/pandora_console/operation/agentes/networkmap.php @@ -18,7 +18,7 @@ require("include/config.php"); $pandora_name = 'Pandora FMS'; // Generate a dot graph definition for graphviz -function generate_dot ($simple = 0) { +function generate_dot ($simple = 0, $font_size) { global $config; global $pandora_name; @@ -43,12 +43,12 @@ function generate_dot ($simple = 0) { } // Add node - $graph .= create_node($agent , $simple)."\n\t\t"; + $graph .= create_node($agent , $simple, $font_size)."\n\t\t"; } // Create a central node if orphan nodes exist if (count ($orphans)) { - $graph .= create_pandora_node ($pandora_name); + $graph .= create_pandora_node ($pandora_name, $font_size); } // Define edges @@ -74,7 +74,7 @@ function create_edge ($head, $tail) { } // Returns a node definition -function create_node ($agent, $simple = 0) { +function create_node ($agent, $simple = 0, $font_size = 10) { $sql = sprintf ('SELECT COUNT(*) FROM tagente_estado, tagente_modulo WHERE tagente_modulo.id_agente = %d @@ -91,6 +91,12 @@ function create_node ($agent, $simple = 0) { $status_color = '#8DFF1D'; } + // Check for alert + $sql = sprintf ('SELECT COUNT(talerta_agente_modulo.id_aam) from talerta_agente_modulo, tagente_modulo, tagente WHERE tagente.id_agente = %d AND tagente.disabled = 0 AND tagente.id_agente = tagente_modulo.id_agente AND tagente_modulo.disabled = 0 AND tagente_modulo.id_agente_modulo = talerta_agente_modulo.id_agente_modulo AND talerta_agente_modulo.times_fired > 0 ', $agent['id_agente']); + $alert_modules = get_db_sql ($sql); + if ($alert_modules) + $status_color = '#FFE308'; + // Short name $name = strtolower ($agent["nombre"]); if (strlen ($name) > 12) @@ -103,22 +109,28 @@ function create_node ($agent, $simple = 0) { } else { $img_node = 'images/networkmap/0.png'; } - $node = $agent['id_agente'].' [ color="'.$status_color.'", fontsize=9, style="filled", fixedsize=true, width=0.40, height=0.40, label=< + $node = $agent['id_agente'].' [ color="'.$status_color.'", fontsize='.$font_size.', style="filled", fixedsize=true, width=0.40, height=0.40, label=<
    '.$name.'
    >, shape="ellipse", URL="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$agent['id_agente'].'", tooltip="ajax.php?page=operation/agentes/ver_agente&get_agent_status_tooltip=1&id_agent='.$agent['id_agente'].'"];'; } else { - $node = $agent['id_agente'] . ' [ color="' . $status_color . '", fontsize=7, style="filled", fixedsize=true, width=0.20, height=0.20, label="", tooltip="ajax.php?page=operation/agentes/ver_agente&get_agent_status_tooltip=1&id_agent='.$agent['id_agente'].'"];'; + $node = $agent['id_agente'] . ' [ color="' . $status_color . '", fontsize='.$font_size.', style="filled", fixedsize=true, width=0.20, height=0.20, label="", tooltip="ajax.php?page=operation/agentes/ver_agente&get_agent_status_tooltip=1&id_agent='.$agent['id_agente'].'"];'; } return $node; } // Returns the definition of the central module -function create_pandora_node ($name) { - $node = '0 [ color="#364D1F", fontsize=10, style="filled", fixedsize=true, width=0.8, height=0.6, label=< - -
    '.$name.'
    >, - shape="ellipse", tooltip="'.$name.'", URL="index.php?sec=estado&sec2=operation/agentes/estado_grupo" ];'; +function create_pandora_node ($name, $font_size = 10) { + global $simple; + $img = ''; + $name = ''.$name.''; + $label = ''.$img.$name.'
    '; + if ($simple == 1){ + $label = ""; + } + + $node = '0 [ color="#364D1F", fontsize='.$font_size.', style="filled", fixedsize=true, width=0.8, height=0.6, label=<'.$label.'>, + shape="ellipse", URL="index.php?sec=estado&sec2=operation/agentes/estado_grupo" ];'; return $node; } @@ -145,41 +157,43 @@ function close_group () { // Opens a graph definition function open_graph () { - global $config, $layout, $nooverlap, $pure, $zoom, $ranksep; + global $config, $layout, $nooverlap, $pure, $zoom, $ranksep, $font_size; $overlap = 'compress'; $size_x = 8; $size_y = 5.4; $size = ''; - if ($layout == "") - $layout = "radial"; - if ($layout == 'radial') $overlap = 'true'; - if (($layout == 'flat') OR ($layout == 'spring1') OR ($layout == "spring2")) + if (($layout == 'flat') OR ($layout == 'radial') OR ($layout == 'spring1') OR ($layout == "spring2")) if ($nooverlap != '') $overlap = 'scalexy'; - if ($pure == 1 && $zoom > 1 && $zoom <= 3) { + if ($pure == 1 && $zoom > 1 ) { $size_x *= $zoom; $size_y *= $zoom; } $size = $size_x . ',' . $size_y; - - - +// +/* +echo "SIZE $size
    "; +echo "NO OVERLAP $nooverlap
    "; +echo "LAYOUT $layout
    "; +echo "FONTSIZE $font_size
    "; +echo "RANKSEP $ranksep
    "; +*/ // BEWARE: graphwiz DONT use single ('), you need double (") $head = "graph networkmap { labeljust=l; margin=0; "; - if ($nooverlap != '') + if ($nooverlap != ''){ + $head .= "overlap=\"$overlap\";"; $head .= "ranksep=\"$ranksep\";"; - $head .= "outputorder=edgesfirst; - overlap=\"$overlap\"; - ratio=fill; - root=0; - size=\"$size\"; - "; + $head .= "outputorder=edgesfirst;"; + } + $head .= "ratio=fill;"; + $head .= "root=0;"; + $head .= "size=\"$size\";"; return $head; } @@ -210,12 +224,13 @@ function set_filter () { /* Main code */ // Load variables -$layout = (string) get_parameter ('layout'); -$nooverlap = (boolean) get_parameter ('nooverlap'); +$layout = (string) get_parameter ('layout', 'radial'); +$nooverlap = (boolean) get_parameter ('nooverlap', 0); $pure = (int) get_parameter ('pure'); $zoom = (float) get_parameter ('zoom'); $ranksep = (float) get_parameter ('ranksep', 2.5); $simple = (int) get_parameter ('simple', 0); +$font_size = (int) get_parameter ('font_size', 12); // Login check $id_user = $_SESSION["id_usuario"]; @@ -242,8 +257,9 @@ if ($pure == 1) { echo ''; // Layout selection -$layout_array = array ('radial' => 'radial', +$layout_array = array ( 'circular' => 'circular', + 'radial' => 'radial', 'spring1' => 'spring 1', 'spring2' => 'spring 2', 'flat' => 'flat'); @@ -256,7 +272,7 @@ print_select ($layout_array, 'layout', $layout, '', '', ''); echo ''; echo '' . lang_string('No Overlap') . '  '; -print_checkbox ('nooverlap', 'nooverlap', $nooverlap); +print_checkbox ('nooverlap', '1', $nooverlap); echo ''; echo '' . lang_string('Simple') . '  '; @@ -279,6 +295,18 @@ if ($pure == "1") { echo ''; } + +if ($nooverlap == 1){ + echo ""; + echo lang_string('Distance between nodes') . '  '; + print_input_text ('ranksep', $ranksep, $alt = 'Separation between elements in the map (in Non-overlap mode)', 3, 4, 0); +} + +echo ""; +echo lang_string('Font size') . '  '; +print_input_text ('font_size', $font_size, $alt = 'Font size (in pt)', 3, 4, 0); + + //echo ' Display groups '; echo ''; echo ''; @@ -290,7 +318,7 @@ echo ''; $filter = set_filter(); // Generate dot file -$graph = generate_dot($simple); +$graph = generate_dot ($simple, $font_size); // Generate image and map $cmd = "echo " . escapeshellarg($graph) . diff --git a/pandora_console/operation/agentes/sla_view.php b/pandora_console/operation/agentes/sla_view.php index 45f52f4267..8a7b5e010f 100644 --- a/pandora_console/operation/agentes/sla_view.php +++ b/pandora_console/operation/agentes/sla_view.php @@ -142,7 +142,8 @@ $sql_t = "SELECT tagente_modulo.id_agente_modulo, sla_max, sla_min, sla_limit, t $result_t=mysql_query($sql_t); if (mysql_num_rows ($result_t)) { $color=0; - echo "

    ".lang_string ("User-defined SLA items")."

    "; + echo "

    ".lang_string ("User-defined SLA items")." - "; + echo human_time_description_raw($config["sla_period"]). "

    "; echo ""; echo ""; echo ""; @@ -185,7 +186,7 @@ if (mysql_num_rows ($result_t)) { echo format_numeric($temp)." %"; echo "
    " . lang_string ("type") . ""; if ($temp > $sla_limit) - echo ""; + echo ""; else echo ""; } diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php index 84006c9f19..d599d8a9fc 100644 --- a/pandora_console/operation/agentes/status_monitor.php +++ b/pandora_console/operation/agentes/status_monitor.php @@ -85,13 +85,21 @@ if ($status == -1){ echo "
    "; // Begin Build SQL sentences -$SQL_pre = "SELECT tagente_modulo.id_agente_modulo, tagente.nombre, tagente_modulo.nombre, tagente_modulo.descripcion, tagente.id_grupo, tagente.id_agente, tagente_modulo.id_tipo_modulo, tagente_modulo.module_interval "; +$SQL_pre = "SELECT tagente_modulo.id_agente_modulo, tagente.nombre, tagente_modulo.nombre, tagente_modulo.descripcion, tagente.id_grupo, tagente.id_agente, tagente_modulo.id_tipo_modulo, tagente_modulo.module_interval, tagente_estado.datos, tagente_estado.utimestamp, tagente_estado.timestamp "; $SQL_pre_count = "SELECT count(tagente_modulo.id_agente_modulo) "; @@ -154,6 +162,8 @@ if ($status == 1) $SQL .= " AND tagente_estado.estado = 0 "; elseif ($status == 0) $SQL .= " AND tagente_estado.estado = 1 "; +elseif ($status == 2) + $SQL .= " AND (UNIX_TIMESTAMP()-tagente_estado.utimestamp ) > (tagente_estado.current_interval * 2)"; // Final order $SQL .= " ORDER BY tagente.id_grupo, tagente.nombre"; @@ -193,7 +203,19 @@ if ($counter > 0){ $tdcolor="datos2"; $color =1; } - + if ($data[7] == 0){ + $my_interval = give_agentinterval($data[5]); + } else { + $my_interval = $data[7]; + } + + if ($status == 2){ + $seconds = time() - $data[9]; + + if ($seconds < ($my_interval*2)) + continue; + } + echo ""; echo "
    "; echo ""; @@ -207,32 +229,23 @@ if ($counter > 0){ echo "". substr($data[2],0,21). ""; echo "".substr($data[3],0,30).""; echo ""; - if ($data[7] == 0){ - $my_interval = give_agentinterval($data[5]); - } else { - $my_interval = $data[7]; - } echo $my_interval; - $query_gen2='SELECT * FROM tagente_estado - WHERE id_agente_modulo = '.$data[0]; - $result_gen2=mysql_query($query_gen2); - $data2=mysql_fetch_array($result_gen2); echo ""; - if ($data2["datos"] > 0){ + if ($data[8] > 0){ echo ""; } else { echo ""; } echo ""; - $seconds = time() - $data2["utimestamp"]; + $seconds = time() - $data[9]; if ($seconds >= ($my_interval*2)) echo ""; else echo ""; - echo human_time_comparation($data2["timestamp"]); + echo human_time_comparation($data[10]); echo ""; } echo ""; diff --git a/pandora_console/operation/agentes/tactical.php b/pandora_console/operation/agentes/tactical.php index 505d3c1920..4b1b097c19 100644 --- a/pandora_console/operation/agentes/tactical.php +++ b/pandora_console/operation/agentes/tactical.php @@ -102,28 +102,46 @@ echo "".lang_string("Alert level").""; echo ""; echo "

    "; - +// Monitor checks echo ""; echo "".lang_string ("monitor_checks").""; echo ""."Monitor checks".""; -echo "".$monitor_checks.""; +echo ""; +echo ""; +echo $monitor_checks.""; + +// Monitor OK echo ""."Monitor OK".""; -echo "".$monitor_ok.""; +echo ""; +echo ""; +if ($monitor_ok > 0) + echo $monitor_ok; +else + echo "-"; +echo ""; + +// Monitor BAD echo ""."Monitor BAD".""; -echo ""; -echo ""; +echo ""; +echo ""; if ($monitor_bad > 0) echo $monitor_bad; else echo "-"; echo ""; -echo ""."Monitor Unknown".""; -echo ""; +echo ""; + +// Monitor unknown +echo ""; +echo ""."Monitor Unknown".""; +echo ""; +echo ""; if ($monitor_unknown > 0) echo $monitor_unknown; else echo "-"; +echo ""; echo ""."Monitor Not Init".""; echo ""; @@ -133,15 +151,15 @@ else echo "-"; echo ""."Alerts Fired".""; -echo ""; -echo ""; +echo ""; +echo ""; if ($monitor_alert > 0) echo $monitor_alert; else echo "-"; echo ""; echo ""."Alerts Total".""; -echo "".$monitor_alert_total; +echo "".$monitor_alert_total; // Data checks @@ -149,27 +167,27 @@ echo "".lang_string ("data_checks").""; echo ""."Data checks".""; -echo "".$data_checks; +echo "".$data_checks; echo ""."Data Unknown".""; -echo ""; +echo ""; if ($data_unknown > 0) echo $data_unknown; else echo "-"; echo ""."Data not init".""; -echo ""; +echo ""; if ($data_not_init > 0) echo $data_not_init; else echo "-"; echo ""."Alerts Fired".""; -echo ""; +echo ""; if ($data_alert > 0) echo $data_alert; else echo "-"; echo ""."Alerts Total"; -echo "".$data_alert_total; +echo "".$data_alert_total; // Summary @@ -177,12 +195,12 @@ echo "". echo "".lang_string ("summary").""; echo ""."Total agents".""; -echo "".$total_agents; +echo "".$total_agents; echo ""."Total checks".""; -echo "".$total_checks; +echo "".$total_checks; echo ""."Server sanity".""; -echo ""; +echo ""; echo format_numeric($notinit_percentage); echo "% ".lang_string("Uninitialized modules"); diff --git a/pandora_console/operation/agentes/ver_agente.php b/pandora_console/operation/agentes/ver_agente.php index 0862d4328a..5f5d8adbc2 100644 --- a/pandora_console/operation/agentes/ver_agente.php +++ b/pandora_console/operation/agentes/ver_agente.php @@ -44,12 +44,13 @@ if (defined ('AJAX')) { $id_agent = (int) get_parameter ('id_agent'); $agent = get_db_row ('tagente', 'id_agente', $id_agent); echo '

    '.$agent['nombre'].'

    '; - echo ''.lang_string ('IP').': '.$agent['direccion'].'
    '; - echo ''.lang_string ('Last contact').': '.$agent['ultimo_contacto'].'
    '; - echo ''.lang_string ('Last remote contact').': '.$agent['ultimo_contacto_remoto'].'
    '; + echo ''.lang_string ('Main IP').': '.$agent['direccion'].'
    '; echo ''.lang_string ('Group').': '; echo ' '; echo dame_nombre_grupo ($agent['id_grupo']).'
    '; + + echo ''.lang_string ('Last contact').': '.human_time_comparation($agent['ultimo_contacto']).'
    '; + echo ''.lang_string ('Last remote contact').': '.human_time_comparation($agent['ultimo_contacto_remoto']).'
    '; $sql = sprintf ('SELECT tagente_modulo.descripcion, tagente_modulo.nombre FROM tagente_estado, tagente_modulo @@ -64,15 +65,14 @@ if (defined ('AJAX')) { WHERE id_agente = %d AND id_tipo_modulo in (2, 6, 9, 18, 21, 100)', $id_agent); $total_modules = get_db_sql ($sql); - echo ''.lang_string ('Monitors down').': '.sizeof ($bad_modules).' / '.$total_modules; + + // Modules down if (sizeof ($bad_modules)) { + echo ''.lang_string ('Monitors down').': '.sizeof ($bad_modules).' / '.$total_modules; echo '
      '; foreach ($bad_modules as $module) { echo '
    • '; - if ($module['descripcion'] != '') - $name = $module['descripcion']; - else - $name = $module['nombre']; + $name = $module['nombre']; echo substr ($name, 0, 25); if (strlen ($name) > 25) echo '(...)'; @@ -80,7 +80,27 @@ if (defined ('AJAX')) { } echo '
    '; } - echo '
    '; + + // Alerts (if present) + $sql = sprintf ('SELECT COUNT(talerta_agente_modulo.id_aam) FROM talerta_agente_modulo, tagente_modulo, tagente WHERE tagente.id_agente = %d AND tagente.disabled = 0 AND tagente.id_agente = tagente_modulo.id_agente AND tagente_modulo.disabled = 0 AND tagente_modulo.id_agente_modulo = talerta_agente_modulo.id_agente_modulo AND talerta_agente_modulo.times_fired > 0 ', $id_agent); + $alert_modules = get_db_sql ($sql); + if ($alert_modules > 0){ + $sql = sprintf ('SELECT tagente_modulo.nombre, talerta_agente_modulo.last_fired FROM talerta_agente_modulo, tagente_modulo, tagente WHERE tagente.id_agente = %d AND tagente.disabled = 0 AND tagente.id_agente = tagente_modulo.id_agente AND tagente_modulo.disabled = 0 AND tagente_modulo.id_agente_modulo = talerta_agente_modulo.id_agente_modulo AND talerta_agente_modulo.times_fired > 0 ', $id_agent); + $alerts = get_db_all_rows_sql ($sql); + echo ''.lang_string ('Alerts fired').':'; + echo "
      "; + foreach ($alerts as $alert_item) { + echo '
    • '; + $name = $alert_item[0]; + echo substr ($name, 0, 25); + if (strlen ($name) > 25) + echo '(...)'; + echo " "; + echo human_time_comparation($alert_item[1]); + echo '
    • '; + } + echo '
    '; + } exit (); } diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index 8f354342ed..38dbaeca38 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -389,7 +389,8 @@ if ($total_events > 0){ echo ""; // Group icon - echo ""; + $group_name = (string) get_db_value ('nombre', 'tgrupo', 'id_grupo', $id_group); + echo ""; // for System or SNMP generated alerts } else { diff --git a/pandora_console/operation/menu.php b/pandora_console/operation/menu.php index 0d3b8986d8..4a4ff34c29 100644 --- a/pandora_console/operation/menu.php +++ b/pandora_console/operation/menu.php @@ -104,7 +104,7 @@ if (give_acl($_SESSION["id_usuario"], 0, "AR")) { echo ''.lang_string ("visual_console").'
  • '; if ( isset($_GET["sec"]) && $_GET["sec"] == "visualc") { - $sql="SELECT * FROM tlayout"; + $sql="SELECT * FROM tlayout ORDER BY name"; if($res=mysql_query($sql)) while ($row = mysql_fetch_array($res)){ if (isset($_GET["sec2"]) && $_GET["sec2"] == "operation/visual_console/render_view") { diff --git a/pandora_console/operation/reporting/graph_viewer.php b/pandora_console/operation/reporting/graph_viewer.php index 55e2e9cd4d..59386d8e60 100644 --- a/pandora_console/operation/reporting/graph_viewer.php +++ b/pandora_console/operation/reporting/graph_viewer.php @@ -136,24 +136,23 @@ border=1 alt=''>"; $periods[720] = lang_string ('last_month'); $periods[4320] = lang_string ('six_months'); print_select ($periods, 'period', intval ($period / 3600), '', '', 0); + echo ""; $stackeds = array (); - $stackeds[0] = lang_string ('Area'); - $stackeds[1] = lang_string ('Stacked area'); - $stackeds[2] = lang_string ('Line'); - + $stackeds[0] = lang_string ('Area'); + $stackeds[1] = lang_string ('Stacked area'); + $stackeds[2] = lang_string ('Line'); print_select ($stackeds, 'stacked', $stacked , '', '', 0); - echo ""; + echo ""; $zooms = array(); $zooms[0] = lang_string ('Graph defined'); $zooms[1] = lang_string ('Zoom x1'); - $zooms[2] = lang_string ('Zoom x2'); - $zooms[3] = lang_string ('Zoom x3'); - + $zooms[2] = lang_string ('Zoom x2'); + $zooms[3] = lang_string ('Zoom x3'); print_select ($zooms, 'zoom', $zoom , '', '', 0); - echo ""; + echo ""; echo ""; echo ""; echo ""; diff --git a/pandora_console/operation/visual_console/index.php b/pandora_console/operation/visual_console/index.php index deeb06896e..f9dca6b714 100644 --- a/pandora_console/operation/visual_console/index.php +++ b/pandora_console/operation/visual_console/index.php @@ -30,7 +30,7 @@ if (comprueba_login() != 0) { echo "

    ".$lang_label["visual_console"]." > "; echo $lang_label["summary"]."

    "; -$layouts = get_db_all_rows_in_table ('tlayout'); +$layouts = get_db_all_rows_in_table ('tlayout','name'); if (sizeof ($layouts) == 0) { echo "
    ".$lang_label["no_layout_def"]."
    "; diff --git a/pandora_console/operation/visual_console/render_view.php b/pandora_console/operation/visual_console/render_view.php index e3a27543d4..dd8bc517b9 100644 --- a/pandora_console/operation/visual_console/render_view.php +++ b/pandora_console/operation/visual_console/render_view.php @@ -58,32 +58,22 @@ $bheight = $layout["height"]; $pure_url = "&pure=".$config["pure"]; // Render map -echo "

    ".$layout_name."

    "; +echo "

    ".$layout_name."  "; if ($config["pure"] == 0){ - echo lang_string("Full screen mode"); - echo " "; echo ""; echo ""; echo ""; } else { - echo lang_string("Back to normal mode"); - echo " "; echo ""; echo ""; echo ""; } -echo '
    '; -if ($refr) { - echo '
    '; - echo '
    '; -} + +echo '

    '; print_pandora_visual_map ($id_layout); -echo "
    "; -echo "
    "; - $refresh_values = array (); $refresh_values[5] = "5 ". lang_string ('seconds'); $refresh_values[30] = "30 ". lang_string ('seconds'); @@ -93,12 +83,23 @@ $refresh_values[300] = "5 ". lang_string ('minutes'); $refresh_values[600] = "10 ". lang_string ('minutes'); $refresh_values[1800] = "30 ". lang_string ('minutes'); -$table->width = '300px'; +$table->width = '500px'; $table->data = array (); $table->data[0][0] = lang_string ('auto_refresh_time'); $table->data[0][1] = print_select ($refresh_values, 'refr', $refr, '', 'N/A', 0, true); $table->data[0][2] = print_submit_button (lang_string ('refresh'), '', false, 'class="sub next"', true); +echo "
    "; +echo "
    "; + +if ($refr) { + echo '
    '; + echo '
    '; +} + +echo "
    "; +echo "
    "; + echo '
    '; print_input_hidden ('pure', $config["pure"]); print_input_hidden ('id', $id_layout);