2013-10-02 Sergio Martin <sergio.martin@artica.es>

* include/styles/install.css
	include/styles/pandora.css
	install.php
	images/warn.png
	images/pandora_tinylogo_open.png
	images/dot_red.png
	images/dot_green.png: Improve visual styles of 
	install screens

	* general/pandora_help.php: Add a opensource logo
	image in help screen when enterprise is not installed 

	* general/error_screen.php: Add css styles to
	error screens before login




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8844 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
zarzuelo 2013-10-02 14:51:02 +00:00
parent 02a8c4ecec
commit c179dd60d3
10 changed files with 159 additions and 84 deletions

View File

@ -1,3 +1,20 @@
2013-10-02 Sergio Martin <sergio.martin@artica.es>
* include/styles/install.css
include/styles/pandora.css
install.php
images/warn.png
images/pandora_tinylogo_open.png
images/dot_red.png
images/dot_green.png: Improve visual styles of
install screens
* general/pandora_help.php: Add a opensource logo
image in help screen when enterprise is not installed
* general/error_screen.php: Add css styles to
error screens before login
2013-10-02 Miguel de Dios <miguel.dedios@artica.es> 2013-10-02 Miguel de Dios <miguel.dedios@artica.es>
* godmode/setup/setup_general.php: removed the field * godmode/setup/setup_general.php: removed the field

View File

@ -31,6 +31,7 @@
<link rel="icon" href="images/pandora.ico" type="image/ico"> <link rel="icon" href="images/pandora.ico" type="image/ico">
<link rel="stylesheet" href="include/styles/pandora.css" type="text/css"> <link rel="stylesheet" href="include/styles/pandora.css" type="text/css">
<link rel="stylesheet" href="include/styles/jquery-ui-1.10.0.custom.css" type="text/css"> <link rel="stylesheet" href="include/styles/jquery-ui-1.10.0.custom.css" type="text/css">
<link rel="stylesheet" href="include/styles/dialog.css" type="text/css">
</head> </head>
<body> <body>
<?php <?php

View File

@ -83,7 +83,12 @@ if (! $id || ! file_exists ($help_file)) {
/* Show help */ /* Show help */
echo '<div id="main_help">'; echo '<div id="main_help">';
echo '<span style="float:left; margin: 20px 20px 0px 20px; padding: 0px">'; echo '<span style="float:left; margin: 20px 20px 0px 20px; padding: 0px">';
echo html_print_image('images/pandora_tinylogo.png', true, array("border" => '0')); if (empty($config['enterprise_installed'])) {
echo html_print_image('images/pandora_tinylogo_open.png', true, array("border" => '0'));
}
else {
echo html_print_image('images/pandora_tinylogo.png', true, array("border" => '0'));
}
echo "</span>"; echo "</span>";
echo '<p style="text-align: right"><strong style="float: right; padding-top: 12px; padding-right: 8px;">'. html_print_image('images/interrogant.png', true, array('title' => __('Pandora FMS help system'))) . '</strong></p>'; echo '<p style="text-align: right"><strong style="float: right; padding-top: 12px; padding-right: 8px;">'. html_print_image('images/interrogant.png', true, array('title' => __('Pandora FMS help system'))) . '</strong></p>';
echo '<div style="clear:both;"></div>'; echo '<div style="clear:both;"></div>';

Binary file not shown.

Before

Width:  |  Height:  |  Size: 554 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 526 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
pandora_console/images/warn.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -35,23 +35,61 @@ div#install_container {
} }
div#logo_img { div#logo_img {
text-align: center; text-align: center;
width: 200px; width: 100%;
color: #666;
} }
div#wizard { div#wizard {
text-align: left; text-align: left;
border: 1px solid #999; border: 1px solid #999;
margin-top: 1em; margin-top: 1em;
padding: 20px;
padding-left: 20px;
width: 650px; width: 650px;
background-color: #fafafa; padding-left: 0px;
padding-top: 0px;
padding-bottom: 20px;
background-color: #ffffff;
margin-top: 0px;
margin-left: 0px;
margin-right: 0px;
border-radius: 10px;
position: relative;
} }
div#wizard a img {
padding-right: 30px;
}
div#wizard>input {
padding-right: 30px;
float:right;
margin-top: 20px;
}
div#install_box, div#install_img { div#install_box, div#install_img {
float: right;
padding-right: 20px; padding-right: 20px;
margin-top: 0px; margin-top: 0px;
width: 400px; width: 80%;
margin: 0px auto;
} }
div#install_box {
background: F3F3F3;
-moz-border-radius: 8px;
-webkit-border-radius: 8px;
border-radius: 8px;
border: 0px;
padding: 10px 25px;
margin-top: 10px;
-moz-box-shadow: -1px 1px 6px #aaa;
-webkit-box-shadow: -1px 1px 6px #aaa;
box-shadow: -1px 1px 6px #aaa;
}
div#install_box h2 {
color: #00aa00;
text-transform: uppercase;
}
div#install_img { div#install_img {
margin-bottom: 25px; margin-bottom: 25px;
margin-left: 25px; margin-left: 25px;
@ -65,10 +103,6 @@ div#foot_install {
padding-left: 20px; padding-left: 20px;
padding-right: 20px; padding-right: 20px;
text-align: center; text-align: center;
background: #777;
width: 650px;
border-left: 1px solid #999;
border-right: 1px solid #999;
} }
div#foot_install a { div#foot_install a {
color: #ccc; color: #ccc;
@ -80,16 +114,22 @@ input#step4, input#step4:hover {
background-color: #fafafa; background-color: #fafafa;
} }
div.warn { div.warn {
background: url(../../images/info.png) no-repeat; background: url(../../images/warn.png) no-repeat 0% -2px;
color: #ac4444; color: #880;
margin-top: 7px; margin-top: 7px;
padding: 2px 1px 6px 25px; padding: 2px 1px 6px 30px;
} }
div.info { div.info {
background: url(../../images/information.png) no-repeat; background: url(../../images/info.png) no-repeat 0% -2px;
color: #000000; color: #222;
margin-top: 7px; margin-top: 7px;
padding: 2px 1px 6px 25px; padding: 2px 1px 6px 30px;
}
div.err {
background: url(../../images/error_red.png) no-repeat 0% -2px;
color: #cc0000;
margin-top: 7px;
padding: 2px 1px 6px 30px;
} }
span.arr { span.arr {
background: url(../../images/arrow.png) no-repeat; background: url(../../images/arrow.png) no-repeat;
@ -108,6 +148,12 @@ body, td {
} }
body{ body{
background: url(../../images/greyback.gif); background-color: #555555;
} }
div.installation_step {
position: absolute;
top: 7px;
right: 10px;
color: #666;
}

View File

@ -207,7 +207,7 @@ div#main_help {
margin-right: 0px; margin-right: 0px;
border-radius: 10px; border-radius: 10px;
} }
div#main_help div.databox { div#main_help div.databox, .license_databox {
background: F3F3F3; background: F3F3F3;
-moz-border-radius: 8px; -moz-border-radius: 8px;
-webkit-border-radius: 8px; -webkit-border-radius: 8px;

View File

@ -377,12 +377,15 @@ function random_name ($size) {
function print_logo_status ($step, $step_total) { function print_logo_status ($step, $step_total) {
global $banner; global $banner;
echo " return "
<div id='logo_img'> <div id='logo_img'>
<img src='images/pandora_logo.png' border='0'><br> <div>
<img src='images/pandora_tinylogo_open.png' border='0'><br>
<span style='font-size: 9px;'>$banner</span> <span style='font-size: 9px;'>$banner</span>
<br><br> </div>
<div class='installation_step'>
<b>Install step $step of $step_total</b> <b>Install step $step of $step_total</b>
</div>
</div>"; </div>";
} }
@ -391,7 +394,8 @@ function install_step1() {
echo " echo "
<div id='install_container'> <div id='install_container'>
<div id='wizard' style='height: 480px;'> <div id='wizard'>
" . print_logo_status (1,6) . "
<div id='install_box'> <div id='install_box'>
<h2>Welcome to Pandora FMS installation Wizard</h2> <h2>Welcome to Pandora FMS installation Wizard</h2>
<p>This wizard helps you to quick install Pandora FMS console and main database in your system.</p> <p>This wizard helps you to quick install Pandora FMS console and main database in your system.</p>
@ -404,7 +408,7 @@ function install_step1() {
Configuration and database would be overwritten if you continued.</div>"; Configuration and database would be overwritten if you continued.</div>";
} }
echo "<br>"; echo "<br>";
echo "<table width=85%>"; echo "<table width=100%>";
$writable = check_writable ( "include", "Checking if ./include is writable"); $writable = check_writable ( "include", "Checking if ./include is writable");
if (file_exists("include/config.php")) if (file_exists("include/config.php"))
$writable += check_writable ( "include/config.php", "Checking if include/config.php is writable"); $writable += check_writable ( "include/config.php", "Checking if include/config.php is writable");
@ -416,22 +420,20 @@ function install_step1() {
</div>"; </div>";
echo "<div class='info'><b>Upgrade</b>: echo "<div class='info'><b>Upgrade</b>:
If you want to upgrade from Pandora FMS 4.x to 5.0 version, please use the migration tool inside /extras directory in this setup.</div>"; If you want to upgrade from Pandora FMS 4.x to 5.0 version, please use the migration tool inside /extras directory in this setup.
</div>";
echo "</div>";
print_logo_status (1,6);
echo "<div id='install_img'>";
if ($writable == 0) { if ($writable == 0) {
echo " echo "</div>";
<br><br> echo "<a href='install.php?step=11'><img align='right' style='margin-top: 20px;' src='images/arrow_next.png' border='0'></a>";
<a href='install.php?step=11'><img align='right' src='images/arrow_next.png' border='0'></a>";
} }
else else {
echo "<div class='warn'><b>ERROR:</b>You need to setup permissions to be able to write in ./include directory</div>"; echo "<div class='err'><b>ERROR:</b>You need to setup permissions to be able to write in ./include directory</div>";
echo "</div>";
}
echo "<div style='clear:both;'></div>";
echo " echo "
</div>
</div> </div>
<div id='foot_install'> <div id='foot_install'>
<i>Pandora FMS is an OpenSource Software project registered at <i>Pandora FMS is an OpenSource Software project registered at
@ -443,7 +445,8 @@ function install_step1() {
function install_step1_licence() { function install_step1_licence() {
echo " echo "
<div id='install_container'> <div id='install_container'>
<div id='wizard' style='height: 500px;'> <div id='wizard'>
" . print_logo_status (2,6) . "
<div id='install_box'> <div id='install_box'>
<h2>GPL2 Licence terms agreement</h2> <h2>GPL2 Licence terms agreement</h2>
<p>Pandora FMS is an OpenSource software project licensed under the GPL2 licence. Pandora FMS includes, as well, another software also licensed under LGPL and BSD licenses. Before continue, <i>you must accept the licence terms.</i>. <p>Pandora FMS is an OpenSource software project licensed under the GPL2 licence. Pandora FMS includes, as well, another software also licensed under LGPL and BSD licenses. Before continue, <i>you must accept the licence terms.</i>.
@ -457,16 +460,14 @@ function install_step1_licence() {
} }
else { else {
echo "<form method=post action='install.php?step=2'>"; echo "<form method=post action='install.php?step=2'>";
echo "<textarea name='gpl2' cols=52 rows=15>"; echo "<textarea name='gpl2' cols=52 rows=15 style='width: 100%;'>";
echo file_get_contents ("COPYING"); echo file_get_contents ("COPYING");
echo "</textarea>"; echo "</textarea>";
echo "<p>"; echo "<p>";
echo "<input type=submit value='Yes, I accept licence terms'>"; echo "<div style='text-align: right;'><input type=submit value='Yes, I accept licence terms'></div>";
} }
echo "</div>"; echo "</div>";
print_logo_status (2,6);
echo "</div> echo "</div>
<div style='clear: both;height: 1px;'><!-- --></div> <div style='clear: both;height: 1px;'><!-- --></div>
<div id='foot_install'> <div id='foot_install'>
@ -480,7 +481,8 @@ function install_step2() {
echo " echo "
<div id='install_container'> <div id='install_container'>
<div id='wizard' style='min-height: 390px;'> <div id='wizard'>
" . print_logo_status (3,6) . "
<div id='install_box'>"; <div id='install_box'>";
echo "<h2>Checking software dependencies</h2>"; echo "<h2>Checking software dependencies</h2>";
echo "<table border=0 width=230>"; echo "<table border=0 width=230>";
@ -513,22 +515,24 @@ function install_step2() {
check_extension("mysql", "PHP MySQL extension"); check_extension("mysql", "PHP MySQL extension");
check_extension("pgsql", "PHP PostgreSQL extension"); check_extension("pgsql", "PHP PostgreSQL extension");
check_extension("oci8", "PHP Oracle extension"); check_extension("oci8", "PHP Oracle extension");
echo "</table>"; echo "</table>";
echo "</div>";
print_logo_status (3,6);
echo "<div id='install_img'>";
if ($res > 0) { if ($res > 0) {
echo " echo "
<div class='warn'>You have some incomplete <div class='err'>You have some incomplete
dependencies. Please correct them or this installer dependencies. Please correct them or this installer
will not be able to finish your installation. will not be able to finish your installation.
</div> </div>
Ignore it. <a href='install.php?step=3' style='font-weight: bolder;'>Force install Step #3</a>"; <div style='text-align: right;'>
Ignore it. <a href='install.php?step=3' style='font-weight: bolder;'>Force install Step #3</a>
</div>";
echo "</div>";
} }
else { else {
echo "</div>";
echo "<a href='install.php?step=3'><br> echo "<a href='install.php?step=3'><br>
<img align='right' src='images/arrow_next.png' border='0' alt=''></a>"; <img align='right' src='images/arrow_next.png' border='0' alt=''></a> <div style='clear: both;'><!-- --></div>
";
} }
echo " echo "
</div> </div>
@ -561,7 +565,8 @@ function install_step3() {
echo " echo "
<div id='install_container'> <div id='install_container'>
<div id='wizard' style='height: 665px;'> <div id='wizard'>
" . print_logo_status (4,6) . "
<div id='install_box'> <div id='install_box'>
<h2>Environment and database setup</h2> <h2>Environment and database setup</h2>
<p> <p>
@ -593,7 +598,7 @@ function install_step3() {
echo "<form method='post' name='step2_form' action='install.php?step=4'>"; echo "<form method='post' name='step2_form' action='install.php?step=4'>";
} }
echo "<table cellpadding=6 celwidth=100% border=0>"; echo "<table cellpadding=6 width=100% border=0 style='text-align: left;'>";
echo "<tr><td>"; echo "<tr><td>";
echo "DB Engine<br>"; echo "DB Engine<br>";
@ -617,16 +622,16 @@ function install_step3() {
echo "</select>"; echo "</select>";
} }
echo " <tr><td>DB User with privileges<br> echo " <tr><td>DB User with privileges<br>
<input class='login' type='text' name='user' value='root' size=8> <input class='login' type='text' name='user' value='root' size=20>
<td>DB Password for this user<br> <td>DB Password for this user<br>
<input class='login' type='password' name='pass' value='' size=8> <input class='login' type='password' name='pass' value='' size=20>
<tr><td>DB Hostname<br> <tr><td>DB Hostname<br>
<input class='login' type='text' name='host' value='localhost' size=12> <input class='login' type='text' name='host' value='localhost' size=20>
<td>DB Name (pandora by default)<br> <td>DB Name (pandora by default)<br>
<input class='login' type='text' name='dbname' value='pandora' size=8> <input class='login' type='text' name='dbname' value='pandora' size=20>
<tr><td valign=top> <tr><td valign=top>
Drop Database if exists<br> Drop Database if exists<br>
@ -639,7 +644,7 @@ function install_step3() {
<input class='login' type='text' name='path' style='width: 240px;' <input class='login' type='text' name='path' style='width: 240px;'
value='".dirname (__FILE__)."'> value='".dirname (__FILE__)."'>
<tr><td colspan=2>URL path to Pandora FMS Console<br> <tr><td></td><td>URL path to Pandora FMS Console<br>
<span style='font-size: 9px'>For example '/pandora_console'</span> <span style='font-size: 9px'>For example '/pandora_console'</span>
</br> </br>
<input class='login' type='text' name='url' style='width: 250px;' <input class='login' type='text' name='url' style='width: 250px;'
@ -647,16 +652,16 @@ function install_step3() {
</table> </table>
"; ";
echo "</div>";
if (!$error) { if (!$error) {
echo "<div align='right'><br> echo "<input type='image' src='images/arrow_next.png' value='Step #4' id='step4'>";
<input type='image' src='images/arrow_next.png' value='Step #4' id='step4'>
</div>";
} }
echo "</form>
</div>";
print_logo_status (4,6); echo "</form>";
echo "<div style='clear:both;'></div>";
echo "</div> echo "</div>
<div id='foot_install'> <div id='foot_install'>
<i>Pandora FMS is an OpenSource Software project registered at <i>Pandora FMS is an OpenSource Software project registered at
@ -706,10 +711,11 @@ function install_step4() {
echo " echo "
<div id='install_container'> <div id='install_container'>
<div id='wizard' style='height: 480px;'> <div id='wizard'>
" . print_logo_status(5,6) . "
<div id='install_box'> <div id='install_box'>
<h2>Creating database and default configuration file</h2> <h2>Creating database and default configuration file</h2>
<table>"; <table width='100%'>";
switch ($engine) { switch ($engine) {
case 'mysql': case 'mysql':
if (! mysql_connect ($dbhost, $dbuser, $dbpassword)) { if (! mysql_connect ($dbhost, $dbuser, $dbpassword)) {
@ -1071,17 +1077,15 @@ function install_step4() {
} }
break; break;
} }
echo "</table></div>"; echo "</table>";
print_logo_status(5,6);
echo "<div id='install_img'>";
if ($everything_ok == 1) { if ($everything_ok == 1) {
echo "<br><br><a href='install.php?step=5'> echo "</div>";
<img align='right' src='images/arrow_next.png' border='0' alt=''></a>"; echo "<div style='margin-top: 20px;'><a href='install.php?step=5'>
<img align='right' src='images/arrow_next.png' border='0' alt=''></a></div>";
} }
else { else {
$info = "<div class='warn'><b>There were some problems. $info = "<div class='err'><b>There were some problems.
Installation was not completed.</b> Installation was not completed.</b>
<p>Please correct failures before trying again. <p>Please correct failures before trying again.
All database "; All database ";
@ -1097,7 +1101,7 @@ function install_step4() {
switch ($engine) { switch ($engine) {
case 'mysql': case 'mysql':
if (mysql_error() != "") { if (mysql_error() != "") {
echo "<div class='warn'> <b>ERROR:</b> ". mysql_error().".</div>"; echo "<div class='err'> <b>ERROR:</b> ". mysql_error().".</div>";
} }
if ($step1 == 1) { if ($step1 == 1) {
@ -1110,22 +1114,25 @@ function install_step4() {
oracle_drop_all_objects($connection); oracle_drop_all_objects($connection);
break; break;
} }
echo "</div>";
} }
echo "<div style='clear: both;'></div>";
echo " echo "
</div> </div>
</div> <div id='foot_install'>
<div id='foot_install'> <i>Pandora FMS is an Open Source Software project registered at
<i>Pandora FMS is an Open Source Software project registered at <a target='_new' href='http://pandora.sourceforge.net'>SourceForge</a></i>
<a target='_new' href='http://pandora.sourceforge.net'>SourceForge</a></i> </div>
</div> </div>";
</div>";
} }
function install_step5() { function install_step5() {
echo " echo "
<div id='install_container'> <div id='install_container'>
<div id='wizard' style='height: 300px;'> <div id='wizard'>
" . print_logo_status (6,6) . "
<div id='install_box'> <div id='install_box'>
<h2>Installation complete</h2> <h2>Installation complete</h2>
<p>For security, you now must manually delete this installer <p>For security, you now must manually delete this installer
@ -1139,7 +1146,6 @@ function install_step5() {
<p><br><b><a href='index.php'>Click here to access to your Pandora FMS console</a>.</b> <p><br><b><a href='index.php'>Click here to access to your Pandora FMS console</a>.</b>
</p> </p>
</div>"; </div>";
print_logo_status (6,6);
echo "</div> echo "</div>
<div id='foot_install'> <div id='foot_install'>
<i>Pandora FMS is an OpenSource Software project registered at <i>Pandora FMS is an OpenSource Software project registered at