2013-04-15 Sergio Martin <sergio.martin@artica.es>

* include/functions_html.php
	include/styles/pandora.css
	include/functions_ui.php
	include/functions_graph.php
	include/functions_events.php
	include/graphs/fgraph.php
	operation/events/events_list.php
	operation/agentes/alerts_status.php
	operation/agentes/estado_generalagente.php
	operation/agentes/estado_monitores.php
	images/help.png
	images/blade.png
	images/image_problem_pie.png
	images/input_module.png
	images/err.png
	images/image_problem_area.png
	images/input_agent.png
	images/help_w.png
	images/suc.png
	images/image_problem_bars.png
	images/information.png: Change new icons, modernize the
	error, success and info messages and more aesthetic changes
	Fix warning and notices from previous commit



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7985 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
zarzuelo 2013-04-15 16:04:39 +00:00
parent 66ee09742b
commit 639861068e
22 changed files with 116 additions and 44 deletions

View File

@ -1,3 +1,29 @@
2013-04-15 Sergio Martin <sergio.martin@artica.es>
* include/functions_html.php
include/styles/pandora.css
include/functions_ui.php
include/functions_graph.php
include/functions_events.php
include/graphs/fgraph.php
operation/events/events_list.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/estado_monitores.php
images/help.png
images/blade.png
images/image_problem_pie.png
images/input_module.png
images/err.png
images/image_problem_area.png
images/input_agent.png
images/help_w.png
images/suc.png
images/image_problem_bars.png
images/information.png: Change new icons, modernize the
error, success and info messages and more aesthetic changes
Fix warning and notices from previous commit
2013-04-15 Miguel de Dios <miguel.dedios@artica.es>
* godmode/reporting/reporting_builder.item_editor.php: fixed the

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 330 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 761 B

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 764 B

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -911,7 +911,7 @@ function events_print_event_table ($filter = "", $limit = 10, $width = 440, $ret
$out .= '<table cellpadding=0 cellspacing=0 class="databox"><tr><td>';
$out .= '<fieldset class="databox tactical_set" style="width:93%;">
<legend>' .
__('Events generated -by module-') .
__('Events -by module-') .
'</legend>' .
graph_event_module (180, 100, $event['id_agente']) . '</fieldset>';
$out .= '</td></tr></table>';
@ -1622,14 +1622,14 @@ function events_page_responses ($event) {
$event_responses = db_get_all_rows_in_table('tevent_response');
if(empty($event_responses)) {
$data[1] .= '<i>'.__('N/A').'</i>';
$data[1] = '<i>'.__('N/A').'</i>';
}
else {
$responses = array();
foreach($event_responses as $v) {
$responses[$v['id']] = $v['name'];
}
$data[1] .= html_print_select($responses,'select_custom_response','','','','',true, false, false);
$data[1] = html_print_select($responses,'select_custom_response','','','','',true, false, false);
if(isset($event['server_id'])) {
$server_id = $event['server_id'];
@ -1734,7 +1734,7 @@ function events_page_custom_fields ($event) {
$table->class = "databox alternate";
$all_customs_fields = (bool)check_acl($config["id_user"],
$agent["id_grupo"], "AW");
$event["id_grupo"], "AW");
if ($all_customs_fields) {
$fields = db_get_all_rows_filter('tagent_custom_fields');
@ -2166,6 +2166,7 @@ function events_page_comments ($event) {
/////////
// Comments
/////////
global $config;
$table_comments->width = '100%';
$table_comments->data = array ();

View File

@ -1321,9 +1321,10 @@ function graphic_agentaccess ($id_agent, $width, $height, $period = 0, $return =
$water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png",
'url' => ui_get_full_url("/images/logo_vertical_water.png"));
if ($empty_data)
$out = fs_error_image();
if ($empty_data) {
$out = graph_nodata_image($width, $height);
}
else {
$out = area_graph($config['flash_charts'], $data, $width, $height,
null, null, null, ui_get_full_url("images/image_problem.opaque.png"), "", "", ui_get_full_url(false, false, false, false),
@ -1368,6 +1369,13 @@ function graph_alert_status ($defined_alerts, $fired_alerts, $width = 300, $heig
}
}
// If any value is negative, truncate it to 0
function truncate_negatives(&$element) {
if($element < 0) {
$element = 0;
}
}
/**
* Print a pie graph with events data of agent or all agents (if id_agent = false)
*
@ -3845,4 +3853,15 @@ function grafico_modulo_log4x_format_y_axis ( $number , $decimals=2, $dec_point=
break;
}
}
function graph_nodata_image($width = 300, $height = 110, $type = 'area') {
$image = ui_get_full_url('images/image_problem_' . $type . '.png', false, false, false);
$text_div = '<div class="nodata_text">' . __('No data to show') . '</div>';
$image_div = '<div class="nodata_container" style="background-image: url(\'' . $image . '\');">' . $text_div . '</div>';
$div = '<div style="width:' . $width . 'px; height:' . $height . 'px;">' . $image_div . '</div>';
return $div;
}
?>

View File

@ -1906,7 +1906,7 @@ function html_print_autocomplete_modules($name = 'module', $default = '', $id_ag
ob_start();
html_print_input_text_extended ($name, $default, 'text-' . $name, '', 30, 100, false, '',
array('style' => 'background: url(images/module_unknown.png) no-repeat right;'));
array('style' => 'background: url(images/input_module.png) no-repeat right;'));
ui_print_help_tip(__('Type at least two characters to search the module.'), false);
$javascript_ajax_page =

View File

@ -240,9 +240,9 @@ function ui_print_message ($message, $class = '', $attributes = '', $return = fa
$output = '<table cellspacing="0" cellpadding="0" id="' . $id . '" ' . $attributes . '
class="info_box ' . $id . ' ' . $class . '" style="' . $force_style . '">
<tr>
<td class="icon">' . html_print_image($icon_image, true) . '</td>
<td class="title"><b>' . $text_title . '</b></td>
<td class="icon">';
<td class="icon" rowspan="2" style="padding-right: 10px; padding-top: 3px;">' . html_print_image($icon_image, true) . '</td>
<td class="title" style="text-transform: uppercase; padding-top: 10px;"><b>' . $text_title . '</b></td>
<td class="icon" style="text-align: right; padding-right: 3px;">';
if (!$no_close_bool) {
$output .= '<a href="javascript: close_info_box(\'' . $id . '\')">' .
html_print_image($hack_metaconsole . 'images/blade.png', true) . '</a>';
@ -251,8 +251,7 @@ function ui_print_message ($message, $class = '', $attributes = '', $return = fa
$output .= '</td>
</tr>
<tr>
<td></td>
<td style="color:#000000">' . $text_message . '</td>
<td style="color:#222">' . $text_message . '</td>
<td></td>
</tr>
</table>';
@ -727,7 +726,7 @@ function ui_format_alert_row ($alert, $agent = true, $url = '', $agent_style = f
$data[$index['force_execution']] = '';
if ($alert["force_execution"] == 0) {
$data[$index['force_execution']] =
'<a href="'.$url.'&amp;id_alert='.$alert["id"].'&amp;force_execution=1&refr=60">' . html_print_image("images/target.png", true, array("border" => '0', "alt" => __('Force'))) . '</a>';
'<a href="'.$url.'&amp;id_alert='.$alert["id"].'&amp;force_execution=1&refr=60">' . html_print_image("images/target.png", true, array("border" => '0', "title" => __('Force'))) . '</a>';
}
else {
$data[$index['force_execution']] =
@ -2112,7 +2111,7 @@ function ui_print_page_header ($title, $icon = "", $return = false, $help = "",
$buffer .= '<ul class="mn"><li class="'.$type.'">&nbsp;' . html_print_image($icon, true, array("style" => "vertical-align:middle;", "class" => "bottom", "border" => "0", "alt" => "")) . '&nbsp; ';
$buffer .= '<span style="display: inline-block; vertical-align: top; margin-top: 2px;">' . ui_print_truncate_text($title, 45);
if ($help != "")
$buffer .= "&nbsp;&nbsp;" . ui_print_help_icon ($help, true);
$buffer .= "<div style='float: right;'>" . ui_print_help_icon ($help, true, '', 'images/help_w.png') . "</div>";
$buffer .= '</span></li></ul></div>';
if (is_array($options)) {
@ -2418,7 +2417,7 @@ function ui_print_agent_autocomplete_input($parameters) {
//Default value
$icon_image = html_print_image('images/agent_unknown.png', true, false, true);
$icon_image = html_print_image('images/input_agent.png', true, false, true);
if (isset($parameters['icon_image'])) {
$icon_image = $parameters['icon_image'];
}

View File

@ -248,6 +248,7 @@ function area_graph($flash_chart, $chart_data, $width, $height, $color, $legend,
}
if (empty($chart_data)) {
return graph_nodata_image();
return '<img src="' . $no_data_image . '" />';
}

View File

@ -878,9 +878,7 @@ td input[type=checkbox]
-webkit-transform: scale(1.3); /* Safari and Chrome */
padding: 10px;
margin-top: 2px;
display: table-cell;
vertical-align: top;
display: table-cell;
}
td.datos3 {
@ -1680,7 +1678,7 @@ ol.steps li {
width: 150px;
}
ol.steps li a {
color: #000;
color: #111;
}
ol.steps li.visited a {
color: #999;
@ -1719,7 +1717,7 @@ fieldset legend {
font-weight:bold;
#color:#3f4e2f;
line-height: 20px;
color:#000;
color:#666;
#top:-2em;
}
@ -1957,17 +1955,17 @@ table.scw {
/* Week number heading */
td.scwWeekNumberHead {
color: #000;
color: #111;
}
td.scwWeek {
color: #000 !important;
color: #111 !important;
}
/* Today selector */
td.scwFoot {
background-color: #daedae;
color: #000;
color: #111;
}
td.scwFootDisabled {
@ -1976,7 +1974,7 @@ td.scwFootDisabled {
}
tfoot.scwFoot {
color: #000;
color: #111;
}
.scwFoot :hover{
@ -2006,7 +2004,7 @@ div.cellWhite {
width: 100%;
height: 100%;
background: #fff;
color: #000;
color: #111;
}
div.cellNormal {
@ -2027,7 +2025,7 @@ div.cellWarning {
width: 100%;
height: 100%;
background: #fce94f;
color: #000;
color: #111;
}
div.cellUnknown {
@ -2041,14 +2039,14 @@ div.cellNotInit {
width: 100%;
height: 100%;
background: #729fcf;
color: #000;
color: #111;
}
div.cellAlert {
width: 100%;
height: 100%;
background: #ffa300;
color: #000;
color: #111;
}
div.cellBorder1 {
@ -2064,14 +2062,19 @@ div.cellBig {
}
.info_box {
background: #EBEBEB;
background: #FFF;
margin: 10px auto;
padding: 5px;
border: 1px solid #A8A8A8;
padding: 0px 5px 5px 10px;
border: 3px solid #D1D1D1;
width: 85% !important;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
/*
-moz-box-shadow: 0px 2px 2px #010E1B !important;
-webkit-box-shadow: 0px 2px 2px #010E1B !important;
box-shadow: 0px 2px 2px #010E1B !important;
*/
}
.info_box .title * {
@ -2109,7 +2112,7 @@ tr.group_view_warn, .group_view_warn, tr.group_view_warn.a, a.group_view_warn, t
}
a.group_view_warn {
color: #000;
color: #111;
}
tr.group_view_alrm, .group_view_alrm {
@ -2121,7 +2124,7 @@ tr.group_view_unk, .group_view_unk {
}
tr.group_view_data, .group_view_data {
color: #000;
color: #111;
}
.group_view_data_unk {
@ -2157,11 +2160,11 @@ tr.group_view_data, .group_view_data {
.datos_yellow, .datos_yellowf9 {
background-color: #F5E535;
color: #000;
color: #111;
}
a.datos_blue, .datos_bluef9, .datos_blue {
background-color: #77E2F2;
color: #000;
color: #111;
}
.datos_grey, .datos_greyf9 {
background-color: #E4E4E4;
@ -2282,7 +2285,7 @@ span#plugin_description {
/*SIDEBAR*/
.menu_sidebar {
color:#000;
color:#111;
background:#cccacb url('../../images/login_background.png') right center no-repeat;
margin-left: 10px;
@ -2380,6 +2383,10 @@ td input, td select {
margin-top: 4px;
}
a>img, td>img, td>input, td>span {
vertical-align: middle;
}
.noshadow {
-moz-box-shadow: 0px !important;
-webkit-box-shadow: 0px !important;
@ -2411,3 +2418,22 @@ DIV.legend>DIV {
width: 100% !important;
opacity: 0.65 !important;
}
DIV.nodata_text {
padding: 5px 12px 0px 68px;
font-weight: bold;
color: #C1C1C1;
text-transform: uppercase;
display: table-cell;
vertical-align: middle;
text-align: left;
}
DIV.nodata_container {
width:150px;
height:100px;
background-repeat:no-repeat;
background-position: center;
margin: auto auto;
display: table;
}

View File

@ -389,7 +389,7 @@ else {
if (check_acl ($config["id_user"], $id_group, "AW") || check_acl ($config["id_user"], $id_group, "AM")) {
if (count($alerts['alerts_simple']) > 0) {
echo '<div class="action-buttons" style="width: '.$table->width.';">';
html_print_submit_button (__('Validate'), 'alert_validate', false, 'class="sub upd"', false);
html_print_submit_button (__('Validate'), 'alert_validate', false, 'class="sub ok"', false);
echo '</div>';
}
}

View File

@ -72,7 +72,7 @@ else {
$agent_name = $agent_name;
}
$data[0] = ui_print_group_icon ($agent["id_grupo"], true) . '&nbsp;&nbsp;';
$data[0] = ui_print_group_icon ($agent["id_grupo"], true) . '&nbsp;';
$data[0] .= $agent_name;
$status_img = agents_detail_view_status_img ($agent["critical_count"],
@ -88,7 +88,7 @@ $table_agent->cellstyle[][0] = '';
$data = array();
$data[0] = ui_print_os_icon ($agent["id_os"], true, true, true, false, false, false, array('style' => 'margin:0px 5px 0px 4px;')) . '&nbsp;';
$data[0] .= '<span title="'.$agent["os_version"].'" style="vertical-align:top; padding-top: 6px; display: inline-block;"><i>'.$agent["os_version"].'</i></span>';
$data[0] .= ui_print_help_tip($agent["os_version"], true);
$table_agent->cellstyle[][0] = 'padding-left:50px;';
$data[1] = graph_agent_status ($id_agente, 160, 120, true);

View File

@ -326,10 +326,10 @@ foreach ($modules as $module) {
$data = array ();
if (($module["id_modulo"] != 1) && ($module["id_tipo_modulo"] != 100)) {
if ($module["flag"] == 0) {
$data[0] = '<a href="index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;id_agente='.$id_agente.'&amp;id_agente_modulo='.$module["id_agente_modulo"].'&amp;flag=1&amp;refr=60">' . html_print_image("images/target.png", true, array("border" => '0', "alt" => __('Force'))) . '</a>';
$data[0] = '<a href="index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;id_agente='.$id_agente.'&amp;id_agente_modulo='.$module["id_agente_modulo"].'&amp;flag=1&amp;refr=60">' . html_print_image("images/target.png", true, array("border" => '0', "title" => __('Force'))) . '</a>';
}
else {
$data[0] = '<a href="index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;id_agente='.$id_agente.'&amp;id_agente_modulo='.$module["id_agente_modulo"].'&amp;refr=60">' . html_print_image("images/refresh.png", true, array("border" => "0", "alt" => "refresh")) . '</a>';
$data[0] = '<a href="index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;id_agente='.$id_agente.'&amp;id_agente_modulo='.$module["id_agente_modulo"].'&amp;refr=60">' . html_print_image("images/refresh.png", true, array("border" => "0", "title" => __("Refresh"))) . '</a>';
}
}
else {
@ -386,7 +386,7 @@ foreach ($modules as $module) {
$data[2] = servers_show_type ($module['id_modulo']) . '&nbsp;';
if (check_acl ($config['id_user'], $id_grupo, "AW"))
$data[2] .= '<a href="index.php?sec=gagente&amp;sec2=godmode/agentes/configurar_agente&amp;id_agente='.$id_agente.'&amp;tab=module&amp;id_agent_module='.$module["id_agente_modulo"].'&amp;edit_module='.$module["id_modulo"].'">' . html_print_image("images/config.png", true, array("alt" => '0', "border" => "")) . '</a>';
$data[2] .= '<a href="index.php?sec=gagente&amp;sec2=godmode/agentes/configurar_agente&amp;id_agente='.$id_agente.'&amp;tab=module&amp;id_agent_module='.$module["id_agente_modulo"].'&amp;edit_module='.$module["id_modulo"].'">' . html_print_image("images/config.png", true, array("alt" => '0', "border" => "", "title" => __('Edit'))) . '</a>';
$data[3] = "";
if ($module['quiet']) {

View File

@ -489,7 +489,7 @@ else {
}
if (!empty($result)) {
$graph .= '<fieldset class="databox tactical_set" style="width:93%;">
$graph = '<fieldset class="databox tactical_set" style="width:93%;">
<legend>' .
__('Events generated -by module-') .
'</legend>' .