2014-01-30 Sergio Martin <sergio.martin@artica.es>

* operation/gis_maps/ajax.php: Fixed broken agent
	icons when autorefresh on gis maps

	* mobile/operation/groups.php
	mobile/operation/events.php
	mobile/include/style/main.css
	mobile/include/ui.class.php
	mobile/include/user.class.php: More aesthetic and 
	responsible improvements on mobile console

	* include/functions_graph.php
	include/constants.php: Added more colors to the
	graph color collection to support more graphics in 
	a combined graphs



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9388 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
zarzuelo 2014-01-30 10:44:54 +00:00
parent 0c876f4ea5
commit d84c1bc413
9 changed files with 136 additions and 29 deletions

View File

@ -1,3 +1,20 @@
2014-01-30 Sergio Martin <sergio.martin@artica.es>
* operation/gis_maps/ajax.php: Fixed broken agent
icons when autorefresh on gis maps
* mobile/operation/groups.php
mobile/operation/events.php
mobile/include/style/main.css
mobile/include/ui.class.php
mobile/include/user.class.php: More aesthetic and
responsible improvements on mobile console
* include/functions_graph.php
include/constants.php: Added more colors to the
graph color collection to support more graphics in
a combined graphs
2014-01-28 Sergio Martin <sergio.martin@artica.es>
* mobile/operation/events.php: Improve the method of

View File

@ -139,6 +139,11 @@ define('COL_GRAPH5', '#6BD8DD');
define('COL_GRAPH6', '#F49B31');
define('COL_GRAPH7', '#999999');
define('COL_GRAPH8', '#F2B8C1');
define('COL_GRAPH9', '#C4E8C1');
define('COL_GRAPH10', '#C1DBE5');
define('COL_GRAPH11', '#C9C1e0');
define('COL_GRAPH12', '#F45B95');
define('COL_GRAPH13', '#E83128');
/* The styles */

View File

@ -1238,6 +1238,11 @@ function graphic_combined_module ($module_list, $weight_list, $period, $width, $
$color[8] = array('border' => '#000000', 'color' => COL_GRAPH6, 'alpha' => 50);
$color[9] = array('border' => '#000000', 'color' => COL_GRAPH7, 'alpha' => 50);
$color[10] = array('border' => '#000000', 'color' => COL_GRAPH8, 'alpha' => 50);
$color[11] = array('border' => '#000000', 'color' => COL_GRAPH9, 'alpha' => 50);
$color[12] = array('border' => '#000000', 'color' => COL_GRAPH10, 'alpha' => 50);
$color[13] = array('border' => '#000000', 'color' => COL_GRAPH11, 'alpha' => 50);
$color[14] = array('border' => '#000000', 'color' => COL_GRAPH12, 'alpha' => 50);
$color[15] = array('border' => '#000000', 'color' => COL_GRAPH13, 'alpha' => 50);
switch ($stacked) {
case GRAPH_AREA:

View File

@ -8,7 +8,7 @@ body {
direction: ltr;
display: block;
font-family: Arial,Helvetica,sans-serif;
font-size: 12px !important;
font-size: 12px;
margin: 0;
text-align: left;
vertical-align: top;
@ -22,12 +22,10 @@ body {
font-size: 14px !important;
}
label, input, .ui-btn-inner {
font-size: 12px !important;
.ui-btn-inner {
font-weight: bold;
}
/*INIT----------Tactical styles-----------------------------------------*/
#tactical1 *, #tactical2 * {
font-size: 12px !important;
@ -242,13 +240,46 @@ tr.group_view_data, .group_view_data {
}
tr.events {
border-bottom: 3px solid white !important;
border-bottom: 6px solid #f7f7f7 !important;
font-size: 12px !important;
}
table#list_events th {
font-size: 12px !important;
font-weight: bolder !important;
border: 0px;
}
table.alternate tr:nth-child(odd) td, table.alternate tr:nth-child(odd) th{
background-color: #ffffff;
}
table.alternate tr:nth-child(even) td, table.alternate tr:nth-child(eveny) th{
background-color: #e4e5e4;
}
table.pandora_responsive {
width: 100%;
}
table.pandora_responsive td, table.pandora_responsive th{
padding: 4px;
}
table.event_details img{
margin-left: 4px;
}
table.event_details td{
height: 14px;
}
table.event_details td.cell_event_name {
font-size: 14px;
}
#validate_button {
margin: 10px auto;
display: block;
}
/*
@ -763,16 +794,20 @@ li.ui-btn {
}
/* For mobiles */
@media screen and (max-width: 800px)
@media screen and (max-width: 750px)
{
.ui-content>.ui-btn {
margin: 10px 7px;
height: 30px;
padding-top: 3px;
}
label, input, .ui-btn-inner {
font-size: 12px !important;
}
}
/* For tablets */
@media screen and (min-width: 800px)
@media screen and (min-width: 750px)
{
.ui-content>.ui-btn {
width: 31%;
@ -781,8 +816,41 @@ li.ui-btn {
height: 40px;
padding-top: 8px;
}
label, input, .ui-btn-inner {
font-size: 16px !important;
padding-top: 6px !important;
}
.ui-header .ui-title {
font-size: 18px !important;
}
* {
font-size: 18px;
}
}
#login_container {
width: 60%;
margin: 0 auto;
max-width: 300px;
}
#logout_dialog-button_close {
display: block;
margin: 15px auto;
}
#login_container #login_btn-container {
margin-top: 30px;
}
#login_container input, #login_container .ui-btn-text{
font-size: 16px !important;
}
table.tactical_bars {
width: 100%;
}

View File

@ -402,7 +402,7 @@ class Ui {
$options['id'] = 'text-' . $options['name'];
}
$html = "<div>\n";
$html = "<div id='" . $options['name'] . "-container' >\n";
$html .= "<fieldset data-role='controlgroup'>\n";
if (!empty($options['label'])) {
$html .= "<label for='" . $options['id'] . "'>" . $options['label'] . "</label>\n";
@ -605,7 +605,7 @@ class Ui {
$dialogHtml .= "<div id='" . $content_id . "' class='" . $content_class . "' data-role='content'>\n";
$dialogHtml .= $content_text;
if ($button_close) {
$dialogHtml .= "<a data-role='button' href='#main_page'>";
$dialogHtml .= "<a data-role='button' href='#main_page' id='" . $dialog_id . "-button_close'>";
if (empty($button_text)) {
$dialogHtml .= __('Close');
}

View File

@ -145,6 +145,7 @@ class User {
}
if ($this->logout_action) {
$options['dialog_id'] = 'logout_dialog';
$options['type'] = 'onStart';
$options['title_text'] = __('Login out');
$options['content_text'] = __('Your session is over. Please close your browser window to close this Pandora session.');
@ -158,6 +159,7 @@ class User {
html_print_image ("images/pandora_login.png",
true, array ("alt" => "logo", "border" => 0)) .
'</div>');
$ui->contentAddHtml('<div id="login_container">');
$ui->beginForm();
$ui->formAddHtml(html_print_input_hidden('action', 'login', true));
$options = array(
@ -177,10 +179,12 @@ class User {
$options = array(
'value' => __('Login'),
'icon' => 'star',
'icon_pos' => 'right'
'icon_pos' => 'right',
'name' => 'login_btn'
);
$ui->formAddSubmitButton($options);
$ui->endForm();
$ui->contentAddHtml('</div>');
$ui->endContent();
$ui->showPage();

View File

@ -137,6 +137,9 @@ class Events {
html_print_image('images/chart_curve.png', true, array ("style" => 'vertical-align: middle;')) .
'</a>';
}
else {
$event['module_graph_link'] = '<i>' . __('N/A') . '</i>';
}
if ($event['id_agente'] > 0) {
$event['agent'] = "<a style='color: black;'" .
@ -145,6 +148,9 @@ class Events {
agents_get_name($event['id_agente']) .
"</a>";
}
else {
$event['agent'] = '<i>' . __('N/A') . '</i>';
}
$event['evento'] = io_safe_output($event['evento']);
@ -161,7 +167,9 @@ class Events {
$event["owner_user"] = $user_owner;
}
$event["event_type"] = events_print_type_img ($event["event_type"], true).' '.events_print_type_description($event["event_type"], true);
$event["event_type"] = events_print_type_description($event["event_type"], true);
$event["event_type"] .= ' ';
$event["event_type"] .= events_print_type_img ($event["event_type"], true);
if (!isset($group_rep))
$group_rep = 0;
@ -204,14 +212,13 @@ class Events {
$img_sev = "images/status_sets/default/severity_major.png";
break;
}
$event["criticity"] = html_print_image ($img_sev, true,
$event["criticity"] = ' ' . $event_criticity;
$event["criticity"] .= html_print_image ($img_sev, true,
array ("class" => "image_status",
"width" => 12,
"height" => 12,
"title" => $event_criticity));
$event["criticity"] .= ' ' . $event_criticity;
"title" => $event_criticity));
if ($event['estado'] == 1) {
$user_ack = db_get_value('fullname', 'tusuario', 'id_user', $event['id_usuario']);
@ -229,7 +236,7 @@ class Events {
// Get Status
switch ($event['estado']) {
case 0:
$img_st = "images/star.png";
$img_st = "images/star_dark.png";
$title_st = __('New event');
break;
case 1:
@ -241,10 +248,12 @@ class Events {
$title_st = __('Event in process');
break;
}
$event["status"] = html_print_image($img_st,true).' '.$title_st;
$event["status"] = $title_st;
$event["status"] .= ' ';
$event["status"] .= html_print_image($img_st,true);
$event["group"] = ui_print_group_icon ($event["id_grupo"], true);
$event["group"] .= groups_get_name ($event["id_grupo"]);
$event["group"] = groups_get_name ($event["id_grupo"], true);
$event["group"] .= ui_print_group_icon ($event["id_grupo"], true);
$event["tags"] = tags_get_tags_formatted($event["tags"]);
if (empty($event["tags"])) {
@ -409,7 +418,7 @@ class Events {
//Content
ob_start();
?>
<table class="pandora_responsive">
<table class="pandora_responsive alternate event_details">
<tbody>
<tr class="event_name">
<td class="cell_event_name" colspan="2"></td>
@ -796,11 +805,7 @@ class Events {
.html(event[\"agent\"]);
//The link to module graph
$(\".event_module_graph\").hide();
if (event[\"id_agentmodule\"] != \"0\") {
$(\".event_module_graph\").show();
$(\".cell_module_graph\").html(event[\"module_graph_link\"]);
}
$(\".cell_module_graph\").html(event[\"module_graph_link\"]);
$(\"#event_id\").val(id_event);

View File

@ -71,7 +71,10 @@ class Groups {
$ui->contentAddHtml('
<style type="text/css">
.ui-icon-group_' . $count . ' {
background: url("' . $group['group_icon'] . '") no-repeat scroll 0 0 transparent !important;
background: url("' . $group['group_icon'] . '") no-repeat scroll 0 0 #F3F3F3 !important;
width: 24px;
height: 24px;
margin-top: -12px !important;
}
</style>
');

View File

@ -192,7 +192,7 @@ switch ($opt) {
$icon_height = $icon_size[1];
$agents[$row['tagente_id_agente']] = array(
'icon_path' => $icon,
'icon_path' => $config["homeurl"] . '/' . $icon,
'icon_width' => $icon_width,
'icon_height' => $icon_height,
'name' => $row['nombre'],