From 81dc518759e950d2dc518cf02153224be8ebd1c7 Mon Sep 17 00:00:00 2001 From: slerena Date: Thu, 24 May 2007 21:06:42 +0000 Subject: [PATCH] 2007-05-24 Sancho Lerena * include/styles/pandora_red.css: Added alternate sample style. * include/styles/pandora.css: Some problems with fonts fixed (I hope!) * include/config.inc.php: Modified code to support custom Style in DB config. By default uses "pandora". * include/languages/language_en.php: new string to render style setup. * images/header_red.jpg: New image for red style. * godmode/grupos/configurar_grupo.php: Updated styles. * godmode/setup/setup.php: Added support for style selector. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@467 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 19 + .../godmode/grupos/configurar_grupo.php | 9 +- pandora_console/godmode/setup/setup.php | 28 +- pandora_console/images/header_red.jpg | Bin 0 -> 3042 bytes pandora_console/include/config.inc.php | 5 + .../include/languages/language_en.php | 1 + pandora_console/include/styles/pandora.css | 24 +- .../include/styles/pandora_red.css | 585 ++++++++++++++++++ pandora_console/index.php | 5 +- 9 files changed, 655 insertions(+), 21 deletions(-) create mode 100644 pandora_console/images/header_red.jpg create mode 100644 pandora_console/include/styles/pandora_red.css diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index f69e462215..1b3e084ac5 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,22 @@ +2007-05-24 Sancho Lerena + + * include/styles/pandora_red.css: Added alternate sample style. + + * include/styles/pandora.css: Some problems with fonts fixed (I + hope!) + + * include/config.inc.php: Modified code to support custom Style in + DB config. By default uses "pandora". + + * include/languages/language_en.php: new string to render style + setup. + + * images/header_red.jpg: New image for red style. + + * godmode/grupos/configurar_grupo.php: Updated styles. + + * godmode/setup/setup.php: Added support for style selector. + 2007-05-24 Sancho Lerena * include/styles/pandora.css: Some margin adjustements for databox diff --git a/pandora_console/godmode/grupos/configurar_grupo.php b/pandora_console/godmode/grupos/configurar_grupo.php index 9577fd8f80..f7212330c8 100644 --- a/pandora_console/godmode/grupos/configurar_grupo.php +++ b/pandora_console/godmode/grupos/configurar_grupo.php @@ -62,7 +62,7 @@ if (comprueba_login() == 0) if (isset($_GET["id_grupo"])) {echo "

".$lang_label["update_group"]." ".$lang_label["help"]."

";} ?> - +
@@ -75,7 +75,6 @@ sec2=godmode/grupos/lista_grupos"> echo ""; } ?> -"; - echo '
@@ -133,9 +132,9 @@ sec2=godmode/grupos/lista_grupos"> echo ""; - - echo "
'; + echo "
"; + echo ""; + echo '
'; if (isset($_GET["creacion_grupo"])) echo ""; else diff --git a/pandora_console/godmode/setup/setup.php b/pandora_console/godmode/setup/setup.php index f2c7c68302..70bfa620fa 100644 --- a/pandora_console/godmode/setup/setup.php +++ b/pandora_console/godmode/setup/setup.php @@ -38,6 +38,7 @@ if (comprueba_login() == 0) $config_bgimage=$_POST["bgimage"]; $config_show_unknown=$_POST["show_unknown"]; $config_show_lastalerts=$_POST["show_lastalerts"]; + $config_style = $_POST["style"]; $result2=mysql_query("UPDATE tconfig SET VALUE='".$block_size."' WHERE TOKEN='block_size'"); $result2=mysql_query("UPDATE tconfig SET VALUE='".$language_code."' WHERE TOKEN='language_code'"); @@ -48,12 +49,13 @@ if (comprueba_login() == 0) $result2=mysql_query("UPDATE tconfig SET VALUE='".$config_bgimage."' WHERE token='bgimage'"); $result2=mysql_query("UPDATE tconfig SET VALUE='".$config_show_unknown."' WHERE token='show_unknown'"); $result2=mysql_query("UPDATE tconfig SET VALUE='".$config_show_lastalerts."' WHERE token='show_lastalerts'"); + $result2=mysql_query("UPDATE tconfig SET VALUE='".$config_style."' WHERE token='style'"); } echo "

".$lang_label["setup_screen"]."

"; echo "

".$lang_label["general_config"]." ".$lang_label["help"]."

"; echo ""; - echo ''; - echo '
'.$lang_label["language_code"]; + echo ''; + echo '"; - echo "
'.$lang_label["language_code"]; echo ''; - echo "
"; + echo '
'.$lang_label["style_template"]; + echo ''; + echo ''; + echo "
"; + echo ""; + echo "
"; echo ''; echo "
"; } else { audit_db($id_user,$REMOTE_ADDR, "ACL Violation","Trying to access Database Management"); require ("general/noaccess.php"); - } \ No newline at end of file + } diff --git a/pandora_console/images/header_red.jpg b/pandora_console/images/header_red.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e6e60bcd21eda9e2089049e0103c35e716452d8d GIT binary patch literal 3042 zcmex=6Oj-S z5fuR$!pIEN!@|nR%E~Fi%grl7GWdUhL6C#NhWP+9qY?v?AS1INjw>Abui@|ep7pdDN28;2QYUrS+_Pmg8Po@x@DyvgKcmircy9*@S#|*B37ql!i@T zm$7q+^u>!+RvNOQOJC2@%Vhgf64%$o9-3JN)3&H_R1-M-MgszxkcLq}u-)sf@~mrr znXux-E`G0TU!pI0f3bIUUhrjYzUy9<{mx%PtVV@L!(>n;hy!mfTKI|?k?%&3`)AA(nBU#{@(-uoTzu$ literal 0 HcmV?d00001 diff --git a/pandora_console/include/config.inc.php b/pandora_console/include/config.inc.php index d3ef5fa45a..a3492ad53b 100644 --- a/pandora_console/include/config.inc.php +++ b/pandora_console/include/config.inc.php @@ -46,6 +46,9 @@ $attachment_store=$config_homedir; // Default font used for graphics (a Free TrueType font included with Pandora FMS) $config_fontpath = $config_homedir."reporting/FreeSans.ttf"; +// Style (pandora by default) +$config_style = "pandora"; + // Read remaining config tokens from DB if (! mysql_connect($dbhost,$dbuser,$dbpassword)){ @@ -90,6 +93,8 @@ if($result2=mysql_query("SELECT * FROM tconfig")){ break; case "bgimage": $config_bgimage=$row2["value"]; break; + case "style": $config_style=$row2["value"]; + break; } } } else { diff --git a/pandora_console/include/languages/language_en.php b/pandora_console/include/languages/language_en.php index d26c576779..e84e61a5b5 100644 --- a/pandora_console/include/languages/language_en.php +++ b/pandora_console/include/languages/language_en.php @@ -795,6 +795,7 @@ $lang_label["threshold"]="Threshold"; $lang_label["min_valid_value_help"]="Min. possible value to consider 'valid' values, below this limit, Pandora FMS will fire the alert"; $lang_label["max_valid_value_help"]="Max. possible value to consider 'valid' values, above this limit, Pandora FMS will fire the alert"; $lang_label["alert_time_threshold_help"]="This value must be al least Module Interval * (Min.Number of Alerts + 1)"; +$lang_label["style_template"]="Style template"; global $lang_label; global $help_label; diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 051c78525a..71b8e69d5b 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -28,19 +28,22 @@ @import url(link.css); @import url(tip.css); * { - font-family: Verdana, sans-serif, Arial, Helvetica; - font-size: 11px; + font-family: verdana, sans-serif; + font-size: 8pt; } body { margin-top: 0; } input, textarea { border: 1px solid #ddd; - font: Verdana, sans-serif, Arial; + 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; @@ -56,15 +59,15 @@ input.button { select { padding: 0px; border:1px solid #ddd; - font: normal 1em/1.5em Verdana, sans-serif; + font-family: verdana, sans-serif; + font-size: 8pt; } checkbox { padding: 4px; border:1px solid #eee; - font: normal 1em/1.5em Verdana, sans-serif; } h1, h2, h3 { - font: bold 1em 'Trebuchet MS', Tahoma, Sans-serif; + font: bold 1em Arial, Sans-serif; text-transform: uppercase; color: #778855; padding-bottom: 5px; @@ -187,12 +190,13 @@ div#page>div#menu { width: 157px; } div#head { - font-size: 10px; + font-size: 8pt; width: 960px; height: 60px; background: url(../../images/header.jpg); } div#foot { + font-size: 7pt; margin-top: solid 2px #000; padding-top: 5px; padding-bottom: 5px; @@ -240,7 +244,7 @@ input.sub { border-bottom-color: #708090; border-right-color: #708090; -moz-border-radius: 5%; - font-size: 11px; + font-size: 8pt; } input.next { padding-right: 21px; @@ -309,11 +313,11 @@ td.datos_jus, td.datos2_jus { width: 100%; } .f10, #ip { - font-size: 10px; + font-size: 7pt; text-align: center; } .f9, .f9i, .f9b, td.f9, td.f9i, td.datosf9, td.datos2f9 { - font-size: 8px; + font-size: 6pt; } .f9i, .redi { font-style: italic; diff --git a/pandora_console/include/styles/pandora_red.css b/pandora_console/include/styles/pandora_red.css new file mode 100644 index 0000000000..6bdcc1dcaf --- /dev/null +++ b/pandora_console/include/styles/pandora_red.css @@ -0,0 +1,585 @@ +/* +// 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 { + margin-top: 0; +} +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: #778855; + padding-bottom: 5px; + padding-top: 7px; +} +h3 { + font-size: 13px; +} +h1 { + font-size: 16px; +} +h2 { + font-size: 15px; +} +a { + color: #d81616; + font-weight: bold; + text-decoration: none; +} +a:hover { + color: #003a3a; + text-decoration: underline; +} +a.white_bold { + color: #eeeeee; + text-decoration: none; + font-weight: bold; +} +a.white { + color: #eeeeee; + text-decoration: none; +} +p.center { + text-align: center; +} +h1#log { + border-bottom: 1px solid #778866; + padding-bottom: 3px; + margin-top: 5em; + width: 29em; + text-align: left; +} +h1#log_f, h1#db_fh1 { + color: #ff0000; + border-bottom: 1px solid #ff0000; + padding-bottom: 3px; +} +div#login { + text-align: left; + border: 1px solid #999999; + margin-top: 2em; + margin-bottom: -1em; + padding: 0.5em; + width: 40em; + background: url(../../images/backgrounds/background10.jpg); +} +div#login_f { + text-align: left; + margin: auto; + padding: 0.5em; + width: 48em; + margin-top: 5em; +} +div#login_box { + float: right; + padding-right: 10px; + margin-top: 25px; + width: 140px; +} +div#logo_box { + margin-top: 25px; + padding-left: 5px; +} +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#page { + width: 960px; + background: #fff; + clear: both; + border-bottom: solid 5px #778855; +} +div#main { + width: 780px; + float: right; + padding-left: 0px; + padding-top: 0px; + padding-bottom: 20px; + margin-bottom: 25px; + background-color: #fefefe; + 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: url(../../images/header_red.jpg); +} +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; + clear: both; +} +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: #778866; + background-color: #f5f5f5; + 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; +} +table, img { + border: 0px; +} +th, td.lb { + color: #fff; + background-color: #778866; +} +td.lb_view { + color: #fff; + /*background-color: #7ba04a;*/ + background-color: #778866; +} +td.lb, td.lb_view { + height: 16px; + padding-left: 3px; + font-weight: bold; +} +td.datos, td.datost, td.datosb , td.datos_id, td.datosf9 { + background-color: #f9f9f9; +} +td.datos2, td.datos2t, td.datos2b, td.datos2_id , td.datos2f9 { + background-color: #efefef; +} +td.datos3 { + /*background-color: #a7b896;*/ + background-color: #d4ddc6; +} +td.datos_id { + color: #1a313a; +} +td.datos_jus, td.datos2_jus { + text-align: justify; +} +.bg , .bgt { /* op menu */ + background-color: #778855; +} +.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; +} +.error { + background: url(../../images/error.gif) no-repeat; + padding: 4px 1px 6px 30px; +} +.red , .redb, .redi, .error { + color: #f00; +} +.sep { + margin-left: 30px; + border-bottom: 1px solid #708090; + width: 100%; +} +.suc { + color: #5a8629; + background: url(../../images/suc.gif) no-repeat 1px; + padding: 4px 1px 6px 30px; +} +.green { + color: #5a8629; +} +.greenb { + color: #00aa00; +} +.grey { + color: #808080; + font-weight: bold; +} +.redb, .greenb, td.datos_id, td.datos2_id, f9b { + font-weight: bold; +} +.raya { + border-top: 1px solid #778866; + width: 100%; +} +.raya, .noraya { + margin-bottom: -10px; +} +.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; +} +.mr40 { + margin-right: 40px; +} +.mt35 { + margin-top: 35px; +} +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#wizard { + text-align: left; + border: 1px solid #999; + margin-top: 3em; + margin-bottom: -1em; + padding: 20px; + width: 600px; + background-color: #fff; + background: url(../../images/background8.jpg); +} +div#install_box { + float: right; + padding-right: 20px; + margin-top: 10px; + width: 350px; +} +div.title_line { + background-color: #4e682c; + height: 5px; + width: 762px; +} +#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: #d4ddc6; + padding: 2px 10px 2px 10px; + color: #333; + border-left: 1px solid #fff; + 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: #cde0ad; +} +#menu_tab li:hover a { + background: #b2b08a url("../images/arrow.gif") no-repeat right 3px; +} +#menu_tab li:hover ul a, #menu_tab .mn ul { + background: #db6351; + 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, #menu_tab_left li.nomn a { + background: #ac4444; + background: #d84437; + padding: 2px 10px 2px 10px; + color: #fff; + font-weight: bold; + line-height: 18px; +} +#menu_tab_left .mn li a { + display: block; + text-decoration: none; +} +span.users { + background: url(../../images/group.png) no-repeat; +} +span.agents { + background: url(../../images/bricks.png) no-repeat; +} +span.data { + background: url(../../images/data.gif) 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.gif) no-repeat; +} +span.master { + background: url(../../images/master.gif) no-repeat; +} +span.snmp { + background: url(../../images/snmp.gif) no-repeat; +} +span.binary { + background: url(../../images/binary.gif) no-repeat; +} +span.recon { + background: url(../../images/recon.png) no-repeat; +} +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; +} +/* New styles for data box */ +.databox, .databox_color, .databox_frame { + margin-bottom: 10px; + margin-top: 5px; + margin-left: 0px; + border: 1px solid #f2f2f2; +} +.databox { + margin: 0px; + background-color: #fafafa; +} +.databox_color { + border-left: 4px solid #778855; +} +#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; +} diff --git a/pandora_console/index.php b/pandora_console/index.php index 03ab8e7076..51606c30ba 100644 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -96,7 +96,10 @@ if ( (isset ($_GET["refr"])) || (isset($_POST["refr"])) ){ - +'; +?>