2014-06-03 Sergio Martin <sergio.martin@artica.es>

* include/styles/pandora.css
	images/login_background.png
	general/login_page.php: Change the whole
	login screen to new style

	* fonts
	fonts/nunito.woff: Added a web font

	* include/functions_events.php
	include/functions_reporting.php: Fix a bug in the
	agent events item on reports to reutilize the 
	standard code



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10094 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
zarzuelo 2014-06-03 16:59:55 +00:00
parent 62f657adc9
commit 9a797bf646
7 changed files with 171 additions and 65 deletions

View File

@ -1,3 +1,18 @@
2014-06-03 Sergio Martin <sergio.martin@artica.es>
* include/styles/pandora.css
images/login_background.png
general/login_page.php: Change the whole
login screen to new style
* fonts
fonts/nunito.woff: Added a web font
* include/functions_events.php
include/functions_reporting.php: Fix a bug in the
agent events item on reports to reutilize the
standard code
2014-06-03 Vanessa Gil <vanessa.gil@artica.es>
* include/functions_groups.php: Fixed problem

Binary file not shown.

View File

@ -66,13 +66,15 @@ echo '<div id="login_inner">';
echo '
<div id="login_in">
<form method="post" action="' . ui_get_full_url('index.php'.$url) . '">';
<form method="post" action="' . ui_get_full_url('index.php'.$url) . '" >';
//TODO: Put branding in variables (external file) or database
/* CUSTOM BRANDING STARTS HERE */
// Replace the following with your own URL and logo.
// A mashup of the Pandora FMS logo and your companies highly preferred
echo '<table id="login_layout"><tr><td rowspan=2 style="width: 200px;">';
echo '<a href="' . $logo_link . '">';
if (defined ('METACONSOLE')) {
html_print_image ("enterprise/meta/images/pandora_login_enterprise.png", false, array ("class" => "login_logo", "alt" => "logo", "border" => 0, "title" => $logo_title), false, true);
@ -89,11 +91,13 @@ echo '
// For stable/live function it might be wise to comment it out
/* CUSTOM BRANDING ENDS HERE */
echo '<div style="text-align: center; height: 5px !important;">&nbsp;</div>';
echo '<br />';
echo '</td><td>';
echo '<div class="login_links">';
echo '<a href="http://wiki.pandorafms.com/" target="_blank">' . __('Help') . '</a>';
echo ' | ';
echo '<a href="http://forums.pandorafms.com/" target="_blank">' . __('Support') . '</a>';
echo '</div>';
echo '</td></tr><tr><td>';
switch($login_screen) {
case 'login':
@ -102,14 +106,20 @@ echo '
html_print_input_hidden ($key, $value);
}
}
echo '<div class="login_nick_text">';
echo __('User') . '<br>';
echo '</div>';
echo '<div class="login_nick">';
html_print_input_text_extended ("nick", '', "nick", '', '', '' , false, '', 'class="login login_user"');
echo '</div>';
echo '<div class="login_pass_text">';
echo __('Password') . '<br>';
echo '</div>';
echo '<div class="login_pass">';
html_print_input_text_extended ("pass", '', "pass", '', '', '' ,false, '', 'class="login login_password"', false, true);
echo '</div>';
echo '<div class="login_button">';
html_print_submit_button(__("Login"), "login_button", false, 'class="sub next_login"');
html_print_submit_button(__("Login") . '&nbsp;&nbsp;>', "login_button", false, 'class="sub next_login"');
echo '</div>';
break;
case 'logout':
@ -131,14 +141,15 @@ echo '
}
break;
}
echo '<div id="ver_num">' . $pandora_version.(($develop_bypass == 1) ? ' '.__('Build').' '.$build_version : '') . '</div>';
echo '</td></tr></table>';
echo '</form>
</div>
</div>
</div>
</div>';
echo '<div id="ver_num">' . $pandora_version.(($develop_bypass == 1) ? ' '.__('Build').' '.$build_version : '') . '</div>';
if (isset ($login_failed)) {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 35 KiB

View File

@ -548,7 +548,7 @@ function events_comment ($id_event, $comment = '', $action = 'Added comment', $m
}
// If the event hasn't owner, assign the user as owner
events_change_owner ($id_event, $similars);
events_change_owner ($id_event);
// Get the current event comments
$first_event = $id_event;
@ -1224,19 +1224,10 @@ function events_get_agent ($id_agent, $period, $date = 0,
$sql_where .= ' AND estado = 0 ';
}
$sql = sprintf ('SELECT id_usuario,
(SELECT t2.fullname
FROM tusuario AS t2
WHERE t2.id_user = t3.id_usuario) AS user_name,
estado, id_agentmodule, evento, event_type, criticity,
count(*) AS count_rep, max(timestamp) AS time2
FROM tevento as t3
WHERE id_agente = %d AND utimestamp > %d
AND utimestamp <= %d ' . $sql_where . '
GROUP BY id_agentmodule, evento
ORDER BY time2 DESC', $id_agent, $datelimit, $date);
$sql_where .= sprintf(' id_agente = %d AND utimestamp > %d
AND utimestamp <= %d ', $id_agent, $datelimit, $date);
return db_get_all_rows_sql ($sql);
return events_get_events_grouped($sql_where);
}
/**

View File

@ -2508,6 +2508,8 @@ function reporting_get_agents_detailed_event ($id_agents, $period = 0,
$date = 0, $return = false, $filter_event_validated = false,
$filter_event_critical = false, $filter_event_warning = false, $filter_event_no_validated = false) {
global $config;
$id_agents = (array)safe_int ($id_agents, 1);
if (!is_numeric ($date)) {
@ -2584,7 +2586,7 @@ function reporting_get_agents_detailed_event ($id_agents, $period = 0,
"height" => 16,
"title" => $title_st));
$data[] = $event['count_rep'];
$data[] = $event['event_rep'];
$data[] = ui_print_truncate_text(
io_safe_output($event['evento']),
@ -2593,9 +2595,15 @@ function reporting_get_agents_detailed_event ($id_agents, $period = 0,
$data[] = events_print_type_img ($event["event_type"], true);
$data[] = get_priority_name ($event['criticity']);
$data[] = io_safe_output($event['user_name']);
if (empty($event['id_usuario']) && $event['estado'] == EVENT_VALIDATE) {
$data[] = '<i>' . __('System') . '</i>';
}
else {
$user_name = db_get_value ('fullname', 'tusuario', 'id_user', $event['id_usuario']);
$data[] = io_safe_output($user_name);
}
$data[] = '<font style="font-size: 6pt;">' .
$event['time2'] . '</font>';
date($config['date_format'], $event['timestamp_rep']) . '</font>';
array_push ($table->data, $data);
}
}

View File

@ -22,7 +22,8 @@ Description: The default Pandora FMS theme layout
*/
* {
font-family: verdana, sans-serif;
font-family: Nunito, verdana, sans-serif;
letter-spacing: 0.03pt;
font-size: 8pt;
color: #3F3F3F;
}
@ -143,7 +144,6 @@ p.center {
h1#log_title {
font-size: 18px;
margin-bottom: 0px;
color: #CCC;
}
div#log_msg {
display:none;
@ -311,6 +311,13 @@ div#foot {
/* LOGIN STYLES */
/****************/
@font-face {
font-family: 'Nunito';
font-style: normal;
font-weight: 400;
src: local('Nunito-Regular'), url(../../fonts/nunito.woff) format('woff');
}
#login_body {
/* Set rules to fill background */
min-height: 100%;
@ -326,8 +333,8 @@ div#foot {
left: 0;
z-index: -999;
background-image: url('../../images/login_background.png');
background-color: #3f3f3f;
background-color: #DDD;
background-image: url(../../images/login_background.png);
background-repeat: repeat;
}
@ -339,7 +346,6 @@ div#foot {
}
p.log_in {
color: #CCC;
padding: 0px 10px;
}
h1#log_f {
@ -361,29 +367,53 @@ div#login_in, #login_f {
.databox_login, .databox_logout {
border: none !important;
background-color: #888888;
padding: 8px;
padding: 4px;
border-radius: 11px;
height: 300px;
height: 227px;
}
#login_inner {
background: url('../../images/splash_bg.png') #111;
width: 100%;
height: 100%;
border-radius: 11px;
border-radius: 4px;
overflow: hidden;
/* Browser without multibackground support */
background: #ffffff !important;
/* Safari 4-5, Chrome 1-9 */
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#ffffff), to(#E9E9E9)) !important;
/* Safari 5.1+, Chrome 10+ */
background: -webkit-linear-gradient(top, #ffffff, #E9E9E9) !important;
/* Firefox 3.6+ */
background: -moz-linear-gradient(top, #ffffff, #E9E9E9) !important;
/* Opera 11.10+ */
background: -o-linear-background(top, #ffffff, #E9E9E9) !important;
/* IE 10 */
background: -ms-linear-background(top, #ffffff, #E9E9E9) !important;
/* estándar */
background: linear-background(top, #ffffff, #E9E9E9) !important;
}
#login_outer {
-moz-box-shadow: 0px 0px 18px #ffffff;
-webkit-box-shadow: 0px 0px 18px #ffffff;
box-shadow: 0px 0px 18px #ffffff;
-moz-box-shadow: 8px 8px 30px #777;
-webkit-box-shadow: 8px 8px 30px #777;
box-shadow: 8px 8px 30px #777;
padding: 3px;
border-radius: 11px;
width: 250px !important;
width: 431px !important;
margin: 100px auto;
background: transparent;
background-color: #3f3f3f;
}
#login_outer * {
font-family: Nunito, "Arial Rounded MT", Arial, Helvetica, sans-serif;
font-weight: bold;
}
table#login_layout {
width: 100%;
height: 213px;
}
div#error_login {
#margin: 0 auto;
#margin-top: -10px;
@ -413,55 +443,98 @@ div#login_f {
IMG.login_logo {
border: 0px;
width: 150px;
width: 140px;
margin-top: 15px;
margin-bottom: 15px;
}
input.login:focus {
outline-width: 0;
-moz-box-shadow: 0px 0px 3px 2px #7fbe41;
-webkit-box-shadow: 0px 0px 3px 2px #7fbe41;
box-shadow: 0px 0px 3px 2px #7fbe41;
a:focus, input:focus {
utline-width: 0;
outline: 0;
}
DIV.login_button {
DIV.login_button, DIV.login_links {
text-align:right;
width: 144px;
margin: 18px auto;
width: 191px;
margin: 16px 0px 17px 0px;
}
DIV.login_nick {
input.next_login {
padding-right: 12px !important;
padding-left: 12px !important;
height: 23px;
text-align: center;
font-weight: 600 !important;
letter-spacing: 0.5pt;
font-size: 12px !important;
border-radius: 3px !important;
}
DIV.login_nick, DIV.login_pass {
text-align: left;
}
DIV.login_links a {
letter-spacing: 0.8pt;
}
DIV.login_links a:first-child {
margin-right: 5px;
}
DIV.login_links a:last-child {
margin-left: 5px;
}
DIV.login_nick_text {
text-align: left;
margin-bottom: 3px;
width: 191px;
margin: 5px 0px;
font-size: 12px;
letter-spacing: 0.4pt;
}
DIV.login_pass_text {
text-align: left;
width: 191px;
margin: 13px 0px 5px 0px;
font-size: 12px;
letter-spacing: 0.4pt;
}
DIV.login_pass {
margin-top: 21px;
}
input.login {
border: 0px none;
background-color: #ebebeb !important;
margin: 0px auto;
margin: 0px 0px;
width: 135px;
height: 18px;
font-weight: bold;
font-weight: 100 !important;
letter-spacing: 0.3pt;
}
input.login_user {
/* Browser without multibackground support */
background: #efefef url(../../images/input_user.png) no-repeat 7px 1px !important;
padding-left: 32px;
width: 106px;
background-color: #e2e2e2 !important;
padding-left: 8px;
width: 179px;
color: #222;
height: 18px;
-webkit-box-shadow: 0 0 0px 1000px #e2e2e2 inset;
}
input.login_password {
/* Browser without multibackground support */
background: #efefef url(../../images/input_lock.png) no-repeat 7px 1px !important;
padding-left: 32px;
width: 106px;
background-color: #e2e2e2 !important;
padding-left: 8px;
width: 179px;
color: #222;
height: 18px;
-webkit-box-shadow: 0 0 0px 1000px #e2e2e2 inset;
}
.databox_error {
width: 657px !important;
@ -472,12 +545,20 @@ input.login_password {
}
#ver_num {
position: relative;
color: #696969;
color: #000;
font-size: xx-small;
background: white;
margin-top: 32px;
margin: 0 auto;
width: 100px;
position: absolute;
bottom: 10px;
right: 0px;
}
input:-webkit-autofill {
#-webkit-box-shadow: 0 0 0px 1000px #DDD inset;
}
/***********************/
/* END OF LOGIN STYLES */
/***********************/
@ -529,7 +610,7 @@ input.sub[disabled] {
cursor: default;
}
input.next, input.next_login, input.upd, input.ok, input.wand, input.delete, input.cog,
input.next, input.upd, input.ok, input.wand, input.delete, input.cog,
input.target, input.search, input.copy, input.add, input.graph,
input.percentile, input.binary, input.camera, input.config,
input.cancel, input.default, input.filter, input.pdf {
@ -538,7 +619,7 @@ input.cancel, input.default, input.filter, input.pdf {
}
input.next, input.next_login {
input.next {
background-image: url(../../images/input_go.png) !important;
}
input.upd {