2014-02-07 Sergio Martin <sergio.martin@artica.es>
* mobile/operation/networkmaps.php mobile/operation/agent.php mobile/include/style/main.css mobile/include/ui.class.php mobile/include/user.class.php mobile/images/pandora_mobile_console.png: Improve network map ACLs and more usability/aesthetic issues git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9412 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
eae01c48d3
commit
f720ca519c
|
@ -1,3 +1,13 @@
|
||||||
|
2014-02-07 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
|
* mobile/operation/networkmaps.php
|
||||||
|
mobile/operation/agent.php
|
||||||
|
mobile/include/style/main.css
|
||||||
|
mobile/include/ui.class.php
|
||||||
|
mobile/include/user.class.php
|
||||||
|
mobile/images/pandora_mobile_console.png: Improve
|
||||||
|
network map ACLs and more usability/aesthetic issues
|
||||||
|
|
||||||
2014-02-06 Sergio Martin <sergio.martin@artica.es>
|
2014-02-06 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
* mobile/index.php
|
* mobile/index.php
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
|
@ -1020,6 +1020,11 @@ li.ui-btn {
|
||||||
padding-top: 15px !important;
|
padding-top: 15px !important;
|
||||||
height: 20px !important;
|
height: 20px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.login_logo img {
|
||||||
|
width: 185px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* For tablets */
|
/* For tablets */
|
||||||
@media screen and (min-width: 750px)
|
@media screen and (min-width: 750px)
|
||||||
|
@ -1053,6 +1058,11 @@ li.ui-btn {
|
||||||
.event_name {
|
.event_name {
|
||||||
font-size: 18px !important;
|
font-size: 18px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.login_logo img {
|
||||||
|
width: 300px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#login_container {
|
#login_container {
|
||||||
|
|
|
@ -123,7 +123,7 @@ class Ui {
|
||||||
$this->header = array();
|
$this->header = array();
|
||||||
$this->header['button_left'] = '';
|
$this->header['button_left'] = '';
|
||||||
$this->header['button_right'] = '';
|
$this->header['button_right'] = '';
|
||||||
$this->header['title'] = __('Pandora FMS mobile');
|
$this->header['title'] = '';
|
||||||
$this->endHeader = false;
|
$this->endHeader = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -155,8 +155,8 @@ class User {
|
||||||
$ui->createHeader();
|
$ui->createHeader();
|
||||||
$ui->showFooter(false);
|
$ui->showFooter(false);
|
||||||
$ui->beginContent();
|
$ui->beginContent();
|
||||||
$ui->contentAddHtml('<div style="text-align: center;">' .
|
$ui->contentAddHtml('<div style="text-align: center;" class="login_logo">' .
|
||||||
html_print_image ("images/pandora_login.png",
|
html_print_image ("mobile/images/pandora_mobile_console.png",
|
||||||
true, array ("alt" => "logo", "border" => 0)) .
|
true, array ("alt" => "logo", "border" => 0)) .
|
||||||
'</div>');
|
'</div>');
|
||||||
$ui->contentAddHtml('<div id="login_container">');
|
$ui->contentAddHtml('<div id="login_container">');
|
||||||
|
|
|
@ -112,11 +112,16 @@ class Agent {
|
||||||
}
|
}
|
||||||
$ip .= '<br />';
|
$ip .= '<br />';
|
||||||
|
|
||||||
$last_contact = __('Last contact') . ' / ' . __('Remote') . '<b>: '
|
$last_contact = '<b>' . __('Last contact') . '</b>: '
|
||||||
.ui_print_timestamp ($this->agent["ultimo_contacto"], true) . '</b><br />';
|
.ui_print_timestamp ($this->agent["ultimo_contacto"], true) . '<br />';
|
||||||
|
|
||||||
$description =
|
$description = '<b>' . __('Description') . ':</b><br>';
|
||||||
empty($agent["comentarios"]) ? '' : $this->agent["comentarios"] . '<br />';
|
if (empty($agent["comentarios"])) {
|
||||||
|
$description .= '<i>' . __('N/A') . '</i>';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$description .= $this->agent["comentarios"];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$html = '<div class="agent_details">';
|
$html = '<div class="agent_details">';
|
||||||
|
@ -129,15 +134,18 @@ class Agent {
|
||||||
|
|
||||||
$ui->contentGridAddCell($html);
|
$ui->contentGridAddCell($html);
|
||||||
ob_start();
|
ob_start();
|
||||||
$html = graph_agent_status ($this->id, 160, 160, true);
|
$html = '<div class="agent_graphs">';
|
||||||
|
$html .= "<b>" . __('Modules by status') . "</b><br />";
|
||||||
|
$html .= graph_agent_status ($this->id, 160, 160, true);
|
||||||
$graph_js = ob_get_clean();
|
$graph_js = ob_get_clean();
|
||||||
$html = $graph_js . $html;
|
$html = $graph_js . $html;
|
||||||
unset($this->agent['fired_count']);
|
unset($this->agent['fired_count']);
|
||||||
$html .= '<span class="agents_tiny_stats agents_tiny_stats_tactical">' . reporting_tiny_stats($this->agent, true) . ' </span><br>';
|
$html .= '<span class="agents_tiny_stats agents_tiny_stats_tactical">' . reporting_tiny_stats($this->agent, true) . ' </span><br>';
|
||||||
$html .= "<b>" . __('Events (24h)') . "</b><br />";
|
$html .= "<b>" . __('Events (24h)') . "</b><br /><br />";
|
||||||
$html .= graph_graphic_agentevents(
|
$html .= graph_graphic_agentevents(
|
||||||
$this->id, 250, 15, 86400, ui_get_full_url(false), true);
|
$this->id, 250, 15, 86400, ui_get_full_url(false), true);
|
||||||
$html .= '<br>';
|
$html .= '<br>';
|
||||||
|
$html .= '</div>';
|
||||||
$ui->contentGridAddCell($html);
|
$ui->contentGridAddCell($html);
|
||||||
$ui->contentEndGrid();
|
$ui->contentEndGrid();
|
||||||
|
|
||||||
|
@ -165,6 +173,36 @@ class Agent {
|
||||||
$ui->contentCollapsibleAddItem($events->putEventsTableJS($this->id));
|
$ui->contentCollapsibleAddItem($events->putEventsTableJS($this->id));
|
||||||
$ui->contentEndCollapsible();
|
$ui->contentEndCollapsible();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$ui->contentAddHtml("<script type=\"text/javascript\">
|
||||||
|
$(document).ready(function(){
|
||||||
|
function set_same_heigth() {
|
||||||
|
//Set same height to boxes
|
||||||
|
var max_height = 0;
|
||||||
|
if ($('.agent_details').height() > $('.agent_graphs').height()) {
|
||||||
|
max_height = $('.agent_details').height();
|
||||||
|
$('.agent_graphs').height(max_height);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
max_height = $('.agent_graphs').height();
|
||||||
|
$('.agent_details').height(max_height);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
set_same_heigth();
|
||||||
|
|
||||||
|
$( window ).resize(function() {
|
||||||
|
if ($('.ui-block-a').css('float') == 'none') {
|
||||||
|
$('.agent_graphs').height('auto');
|
||||||
|
$('.agent_details').height('auto');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
set_same_heigth();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>");
|
||||||
|
|
||||||
$ui->endContent();
|
$ui->endContent();
|
||||||
$ui->showPage();
|
$ui->showPage();
|
||||||
}
|
}
|
||||||
|
|
|
@ -163,8 +163,12 @@ class Networkmaps {
|
||||||
// Order by type field
|
// Order by type field
|
||||||
$where['order'] = 'type';
|
$where['order'] = 'type';
|
||||||
|
|
||||||
if ($this->group != '0')
|
if ($this->group != '0') {
|
||||||
$where['id_group'] = $this->group;
|
$where['id_group'] = $this->group;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$where['id_group'] = array_keys(users_get_groups());
|
||||||
|
}
|
||||||
|
|
||||||
if ($this->type != '0')
|
if ($this->type != '0')
|
||||||
$where['type'] = $this->type;
|
$where['type'] = $this->type;
|
||||||
|
@ -176,6 +180,9 @@ class Networkmaps {
|
||||||
}
|
}
|
||||||
$list = array();
|
$list = array();
|
||||||
foreach ($network_maps as $networkmap) {
|
foreach ($network_maps as $networkmap) {
|
||||||
|
// If enterprise not loaded then skip this code
|
||||||
|
if ($networkmap['type'] == 'policies' and (!defined('PANDORA_ENTERPRISE')))
|
||||||
|
continue;
|
||||||
$row = array();
|
$row = array();
|
||||||
$row[__('Name')] = '<a class="ui-link" data-ajax="false" href="index.php?page=networkmap&id=' . $networkmap['id_networkmap'] . '">' . io_safe_output($networkmap['name']) . '</a>';
|
$row[__('Name')] = '<a class="ui-link" data-ajax="false" href="index.php?page=networkmap&id=' . $networkmap['id_networkmap'] . '">' . io_safe_output($networkmap['name']) . '</a>';
|
||||||
$row[__('Type')] = $networkmap['type'];
|
$row[__('Type')] = $networkmap['type'];
|
||||||
|
|
Loading…
Reference in New Issue