Merge branch 'develop' into ent-3409-pandora-network-traffic-analyzer-ntop-fork-fase-1

Former-commit-id: 65d43e483dc23616c44da3b26b73c94cbf10d3fe
This commit is contained in:
Fermin 2019-03-08 09:02:22 +01:00
commit dd8265f65e
119 changed files with 2482 additions and 2040 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix package: pandorafms-agent-unix
Version: 7.0NG.732-190228 Version: 7.0NG.732-190308
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
pandora_version="7.0NG.732-190228" pandora_version="7.0NG.732-190308"
echo "Test if you has the tools for to make the packages." echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null

View File

@ -42,7 +42,7 @@ my $Sem = undef;
my $ThreadSem = undef; my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.732'; use constant AGENT_VERSION => '7.0NG.732';
use constant AGENT_BUILD => '190228'; use constant AGENT_BUILD => '190308';
# Agent log default file size maximum and instances # Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000; use constant DEFAULT_MAX_LOG_SIZE => 600000;

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_agent_unix %define name pandorafms_agent_unix
%define version 7.0NG.732 %define version 7.0NG.732
%define release 190228 %define release 190308
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_agent_unix %define name pandorafms_agent_unix
%define version 7.0NG.732 %define version 7.0NG.732
%define release 190228 %define release 190308
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}

View File

@ -10,7 +10,7 @@
# ********************************************************************** # **********************************************************************
PI_VERSION="7.0NG.732" PI_VERSION="7.0NG.732"
PI_BUILD="190228" PI_BUILD="190308"
OS_NAME=`uname -s` OS_NAME=`uname -s`
FORCE=0 FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{} {}
Version Version
{190228} {190308}
ViewReadme ViewReadme
{Yes} {Yes}

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils; using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1 #define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("7.0NG.732(Build 190228)") #define PANDORA_VERSION ("7.0NG.732(Build 190308)")
string pandora_path; string pandora_path;
string pandora_dir; string pandora_dir;

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST" VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent" VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(7.0NG.732(Build 190228))" VALUE "ProductVersion", "(7.0NG.732(Build 190308))"
VALUE "FileVersion", "1.0.0.0" VALUE "FileVersion", "1.0.0.0"
END END
END END

View File

@ -1,5 +1,5 @@
package: pandorafms-console package: pandorafms-console
Version: 7.0NG.732-190228 Version: 7.0NG.732-190308
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
pandora_version="7.0NG.732-190228" pandora_version="7.0NG.732-190308"
package_pear=0 package_pear=0
package_pandora=1 package_pandora=1

View File

@ -1900,14 +1900,16 @@ CREATE TABLE IF NOT EXISTS `tevent_extended` (
-- ----------------------------------------------------- -- -----------------------------------------------------
-- Table `tgis_map_layer_groups` -- Table `tgis_map_layer_groups`
-- ----------------------------------------------------- -- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `tgis_map_layer_groups` ( CREATE TABLE `tgis_map_layer_groups` (
`layer_id` INT NOT NULL, `layer_id` int(11) NOT NULL,
`group_id` MEDIUMINT(4) UNSIGNED NOT NULL, `group_id` mediumint(4) unsigned NOT NULL,
`agent_id` INT(10) UNSIGNED NOT NULL COMMENT 'Used to link the position to the group', `agent_id` int(10) unsigned NOT NULL COMMENT 'Used to link the position to the group',
PRIMARY KEY (`layer_id`, `group_id`), PRIMARY KEY (`layer_id`,`group_id`),
FOREIGN KEY (`layer_id`) REFERENCES `tgis_map_layer` (`id_tmap_layer`) ON DELETE CASCADE, KEY `group_id` (`group_id`),
FOREIGN KEY (`group_id`) REFERENCES `tgrupo` (`id_grupo`) ON DELETE CASCADE, KEY `agent_id` (`agent_id`),
FOREIGN KEY (`agent_id`) REFERENCES `tagente` (`id_agente`) ON DELETE CASCADE CONSTRAINT `tgis_map_layer_groups_ibfk_1` FOREIGN KEY (`layer_id`) REFERENCES `tgis_map_layer` (`id_tmap_layer`) ON DELETE CASCADE,
CONSTRAINT `tgis_map_layer_groups_ibfk_2` FOREIGN KEY (`group_id`) REFERENCES `tgrupo` (`id_grupo`) ON DELETE CASCADE,
CONSTRAINT `tgis_map_layer_groups_ibfk_3` FOREIGN KEY (`agent_id`) REFERENCES `tagente` (`id_agente`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------------------------------- -- -----------------------------------------------------

View File

@ -1,16 +1,19 @@
<?php <?php
// Pandora FMS - http://pandorafms.com /**
// ================================================== * Pandora FMS - http://pandorafms.com
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas * ==================================================
// Please see http://pandorafms.org for full contribution list * Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// This program is free software; you can redistribute it and/or * Please see http://pandorafms.org for full contribution list
// modify it under the terms of the GNU General Public License * This program is free software; you can redistribute it and/or
// as published by the Free Software Foundation; version 2 * modify it under the terms of the GNU General Public License
// This program is distributed in the hope that it will be useful, * as published by the Free Software Foundation; version 2
// but WITHOUT ANY WARRANTY; without even the implied warranty of * This program is distributed in the hope that it will be useful,
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * but WITHOUT ANY WARRANTY; without even the implied warranty of
// GNU General Public License for more details. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
if (isset($_SERVER['REQUEST_TIME'])) { if (isset($_SERVER['REQUEST_TIME'])) {
$time = $_SERVER['REQUEST_TIME']; $time = $_SERVER['REQUEST_TIME'];
} else { } else {
@ -26,7 +29,7 @@ if (!$config['MR']) {
$config['MR'] = 0; $config['MR'] = 0;
} }
echo '<a class="white_bold footer" target="_blank" href="'.$config['homeurl'].$license_file.'">'; echo '<a class="footer" target="_blank" href="'.$config['homeurl'].$license_file.'">';
require_once $config['homedir'].'/include/functions_update_manager.php'; require_once $config['homedir'].'/include/functions_update_manager.php';
@ -40,9 +43,9 @@ if ($current_package == 0) {
echo sprintf(__('%s %s - Build %s - MR %s', get_product_name(), $pandora_version, $build_package_version, $config['MR'])); echo sprintf(__('%s %s - Build %s - MR %s', get_product_name(), $pandora_version, $build_package_version, $config['MR']));
echo '</a><br />'; echo '</a> ';
echo '<a class="white footer">'.__('Page generated at').' '.date($config['date_format']); echo '<a class="footer">'.__('Page generated at').' '.date($config['date_format']);
echo '</a><br /><span style="color:#eff">&reg; '.get_copyright_notice().'</span>'; echo '</a><br /><span>&reg; '.get_copyright_notice().'</span>';
if (isset($config['debug'])) { if (isset($config['debug'])) {
$cache_info = []; $cache_info = [];

View File

@ -1,7 +1,7 @@
<?php <?php
// Pandora FMS - http://pandorafms.com // Pandora FMS - http://pandorafms.com
// ================================================== // ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Copyright (c) 2005-2019 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
@ -16,55 +16,46 @@ require_once 'include/functions_notifications.php';
// Check permissions // Check permissions
// Global errors/warnings checking. // Global errors/warnings checking.
config_check(); config_check();
?> ?>
<table width="100%" cellpadding="0" cellspacing="0" style="margin:0px; padding:0px; margin-top: 0px; height: 100%" border="0">
<tr>
<td style="width:90%;">
<a href="index.php?sec=main">
<?php
$custom_logo = 'images/custom_logo/'.$config['custom_logo'];
if (!defined('PANDORA_ENTERPRISE')) { <div id="header_table">
$logo_title = get_product_name().' Opensource'; <div id="header_table_inner">
$custom_logo = 'images/custom_logo/pandora_logo_head_3.png'; <?php
// ======= Notifications Discovery ===============================================
$notifications_numbers = notifications_get_counters();
$header_discovery = '<div id="header_discovery">'.notifications_print_ball(
$notifications_numbers['notifications'],
$notifications_numbers['last_id']
).'</div>';
// ======= Alerts ===============================================
$check_minor_release_available = false;
$pandora_management = check_acl($config['id_user'], 0, 'PM');
$check_minor_release_available = db_check_minor_relase_available();
if ($check_minor_release_available) {
if (users_is_admin($config['id_user'])) {
if ($config['language'] == 'es') {
set_pandora_error_for_header('Hay una o mas revisiones menores en espera para ser actualizadas. <a style="font-size:8pt;font-style:italic;" target="blank" href="http://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Actualizacion#Versi.C3.B3n_7.0NG_.28_Rolling_Release_.29">'.__('Sobre actualización de revisión menor').'</a>', 'Revisión/es menor/es disponible/s');
} else { } else {
if (file_exists(ENTERPRISE_DIR.'/'.$custom_logo)) { set_pandora_error_for_header('There are one or more minor releases waiting for update. <a style="font-size:8pt;font-style:italic;" target="blank" href="http://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Anexo_Upgrade#Version_7.0NG_.28_Rolling_Release_.29">'.__('About minor release update').'</a>', 'minor release/s available');
$custom_logo = ENTERPRISE_DIR.'/'.$custom_logo; }
}
} }
$logo_title = get_product_name().' Enterprise';
}
echo html_print_image( // Chat messages
$custom_logo, $header_chat = "<div id='header_chat'><span id='icon_new_messages_chat' style='display: none;'>";
true, $header_chat .= "<a href='index.php?sec=workspace&sec2=operation/users/webchat'>";
[ $header_chat .= html_print_image('images/header_chat_gray.png', true, ['title' => __('New chat message')]);
'alt' => $logo_title, $header_chat .= '</a></span></div>';
'border' => '0',
]
);
?>
</a>
</td>
<td style="min-width:200px;">
<?php
$table = new stdClass();
$table->id = 'header_table';
$table->class = 'none';
$table->cellpadding = 0;
$table->cellspacing = 0;
$table->head = [];
$table->data = [];
$table->style['clippy'] = $table->style[1] = $table->style[4] = $table->style[5] = $table->style[6] = $table->style[8] = $table->style[9] = $table->style['qr'] = $table->style['notifications'] = 'width: 22px; text-align:center; height: 22px; padding-right: 9px;padding-left: 9px;';
$table->style[7] = 'width: 20px; padding-right: 9px;';
$table->style['searchbar'] = 'width: 180px; min-width: 180px;';
$table->style[11] = 'padding-left: 10px; padding-right: 5px;width: 16px;';
$table->width = '100%';
$table->styleTable = 'margin: auto; margin-top: 0px;';
$table->rowclass[0] = '';
// Search
$acl_head_search = true; $acl_head_search = true;
if ($config['acl_enterprise'] == 1 && !users_is_admin()) { if ($config['acl_enterprise'] == 1 && !users_is_admin()) {
$acl_head_search = db_get_sql( $acl_head_search = db_get_sql(
@ -76,8 +67,6 @@ config_check();
} }
if ($acl_head_search) { if ($acl_head_search) {
$table->data[0][11] = ui_print_help_tip(__('Blank characters are used as AND conditions'), true);
// Search bar // Search bar
$search_bar = '<form method="get" style="display: inline;" name="quicksearch" action="">'; $search_bar = '<form method="get" style="display: inline;" name="quicksearch" action="">';
if (!isset($config['search_keywords'])) { if (!isset($config['search_keywords'])) {
@ -107,52 +96,10 @@ config_check();
$search_bar .= "<input type='hidden' name='head_search_keywords' value='abc' />"; $search_bar .= "<input type='hidden' name='head_search_keywords' value='abc' />";
$search_bar .= '</form>'; $search_bar .= '</form>';
$table->data[0]['searchbar'] = $search_bar; $header_searchbar = '<div id="header_searchbar">'.ui_print_help_tip(__('Blank characters are used as AND conditions'), true);
$header_searchbar .= $search_bar.'</div>';
} }
if ($config['show_qr_code_header'] == 0) {
$show_qr_code_header = 'display: none;';
} else {
$show_qr_code_header = 'display: inline;';
}
$table->data[0]['qr'] = '<div style="'.$show_qr_code_header.'" id="qr_code_container" style="">'.'<a href="javascript: show_dialog_qrcode();">'.html_print_image(
'images/qrcode_icon.png',
true,
[
'alt' => __('QR Code of the page'),
'title' => __('QR Code of the page'),
]
).'</a>'.'</div>';
echo "<div style='display: none;' id='qrcode_container' title='".__('QR code of the page')."'>";
echo "<div id='qrcode_container_image'></div>";
echo '</div>';
?>
<script type='text/javascript'>
$(document).ready(function() {
$( "#qrcode_container" ).dialog({
autoOpen: false,
modal: true
});
});
</script>
<?php
if ($config['tutorial_mode'] !== 'expert' && !$config['disable_help']) {
$table->data[0]['clippy'] = '<a href="javascript: show_clippy();">'.html_print_image(
'images/clippy_icon.png',
true,
[
'id' => 'clippy',
'class' => 'clippy',
'alt' => __('%s assistant', get_product_name()),
'title' => __(
'%s assistant',
get_product_name()
),
]
).'</a>';
}
// ======= Autorefresh code ============================= // ======= Autorefresh code =============================
$autorefresh_txt = ''; $autorefresh_txt = '';
@ -183,7 +130,7 @@ config_check();
} }
if ($do_refresh) { if ($do_refresh) {
$autorefresh_img = html_print_image('images/header_refresh.png', true, ['class' => 'bot', 'alt' => 'lightning', 'title' => __('Configure autorefresh')]); $autorefresh_img = html_print_image('images/header_refresh_gray.png', true, ['class' => 'bot', 'alt' => 'lightning', 'title' => __('Configure autorefresh')]);
if ($_GET['refr']) { if ($_GET['refr']) {
$autorefresh_txt .= ' (<span id="refrcounter">'.date('i:s', $config['refr']).'</span>)'; $autorefresh_txt .= ' (<span id="refrcounter">'.date('i:s', $config['refr']).'</span>)';
@ -199,103 +146,96 @@ config_check();
$autorefresh_link_open_img = '<a class="white autorefresh" href="'.ui_get_url_refresh($ignored_params).'">'; $autorefresh_link_open_img = '<a class="white autorefresh" href="'.ui_get_url_refresh($ignored_params).'">';
if ($_GET['refr']) { if ($_GET['refr']) {
$autorefresh_link_open_txt = '<a class="white autorefresh autorefresh_txt" href="'.ui_get_url_refresh($ignored_params).'">'; $autorefresh_link_open_txt = '<a class="autorefresh autorefresh_txt" href="'.ui_get_url_refresh($ignored_params).'">';
} else { } else {
$autorefresh_link_open_txt = '<a>'; $autorefresh_link_open_txt = '<a>';
} }
$autorefresh_link_close = '</a>'; $autorefresh_link_close = '</a>';
$display_counter = 'display:block';
} else { } else {
$autorefresh_img = html_print_image('images/header_refresh_disabled.png', true, ['class' => 'bot autorefresh_disabled', 'alt' => 'lightning', 'title' => __('Disabled autorefresh')]); $autorefresh_img = html_print_image('images/header_refresh_disabled_gray.png', true, ['class' => 'bot autorefresh_disabled', 'alt' => 'lightning', 'title' => __('Disabled autorefresh')]);
$ignored_params['refr'] = false; $ignored_params['refr'] = false;
$autorefresh_link_open_img = ''; $autorefresh_link_open_img = '';
$autorefresh_link_open_txt = ''; $autorefresh_link_open_txt = '';
$autorefresh_link_close = ''; $autorefresh_link_close = '';
$display_counter = 'display:none';
} }
} else { } else {
$autorefresh_img = html_print_image('images/header_refresh_disabled.png', true, ['class' => 'bot autorefresh_disabled', 'alt' => 'lightning', 'title' => __('Disabled autorefresh')]); $autorefresh_img = html_print_image('images/header_refresh_disabled_gray.png', true, ['class' => 'bot autorefresh_disabled', 'alt' => 'lightning', 'title' => __('Disabled autorefresh')]);
$ignored_params['refr'] = false; $ignored_params['refr'] = false;
$autorefresh_link_open_img = ''; $autorefresh_link_open_img = '';
$autorefresh_link_open_txt = ''; $autorefresh_link_open_txt = '';
$autorefresh_link_close = ''; $autorefresh_link_close = '';
$display_counter = 'display:none';
} }
$table->data[0][1] = $autorefresh_link_open_img.$autorefresh_img.$autorefresh_link_close; $header_autorefresh = '<div id="header_autorefresh">'.$autorefresh_link_open_img.$autorefresh_img.$autorefresh_link_close.'</div>';
$table->data[0][2] = $autorefresh_link_open_txt.$autorefresh_txt.$autorefresh_link_close.$autorefresh_additional; $header_autorefresh_counter = '<div id="header_autorefresh_counter" style="'.$display_counter.'">'.$autorefresh_link_open_txt.$autorefresh_txt.$autorefresh_link_close.$autorefresh_additional.'</div>';
// ======================================================
$pandora_management = check_acl($config['id_user'], 0, 'PM');
// Main help icon
if (!$config['disable_help']) { // qr
$table->data[0][4] = '<a href="#" class="modalpopup" id="helpmodal">'.html_print_image( if ($config['show_qr_code_header'] == 0) {
'images/header_help.png', $show_qr_code_header = 'display: none;';
} else {
$show_qr_code_header = 'display: inline;';
}
$header_qr = '<div id="header_qr" style="'.$show_qr_code_header.'"><div id="qr_code_container"><a href="javascript: show_dialog_qrcode();">'.html_print_image(
'images/qrcode_icon_gray.png',
true, true,
[ [
'title' => __('Main help'), 'alt' => __('QR Code of the page'),
'id' => 'helpmodal', 'title' => __('QR Code of the page'),
'class' => 'modalpopup',
] ]
).'</a>'; ).'</a></div></div>';
}
$notifications_numbers = notifications_get_counters();
$table->data[0]['notifications'] = notifications_print_ball(
$notifications_numbers['notifications'],
$notifications_numbers['last_id']
);
// Logout
$table->data[0][5] = '<a class="white" href="'.ui_get_full_url('index.php?bye=bye').'">';
$table->data[0][5] .= html_print_image('images/header_logout.png', true, ['alt' => __('Logout'), 'class' => 'bot', 'title' => __('Logout')]);
$table->data[0][5] .= '</a>';
echo "<div style='display: none;' id='qrcode_container' title='".__('QR code of the page')."'>";
echo "<div id='qrcode_container_image'></div>";
echo '</div>';
?>
<script type='text/javascript'>
$(document).ready(function() {
$( "#qrcode_container" ).dialog({
autoOpen: false,
modal: true
});
});
</script>
<?php
// User // User
if (is_user_admin($config['id_user']) == 1) { if (is_user_admin($config['id_user']) == 1) {
$table->data[0][6] = html_print_image('images/header_user_admin.png', true, ['title' => __('Edit my user'), 'class' => 'bot', 'alt' => 'user']); $header_user = html_print_image('images/header_user_admin_green.png', true, ['title' => __('Edit my user'), 'class' => 'bot', 'alt' => 'user']);
} else { } else {
$table->data[0][6] = html_print_image('images/header_user.png', true, ['title' => __('Edit my user'), 'class' => 'bot', 'alt' => 'user']); $header_user = html_print_image('images/header_user_green.png', true, ['title' => __('Edit my user'), 'class' => 'bot', 'alt' => 'user']);
} }
$table->data[0][6] = '<a href="index.php?sec=workspace&sec2=operation/users/user_edit">'.$table->data[0][6].'</a>'; $header_user = '<div id="header_user"><a href="index.php?sec=workspace&sec2=operation/users/user_edit">'.$header_user.'<span> ('.$config['id_user'].')</span></a></div>';
$table->data[0][7] = '<a href="index.php?sec=workspace&amp;sec2=operation/users/user_edit" class="white_bold"> ('.$config['id_user'].')</a>'; // Logout
$header_logout = '<div id="header_logout"><a class="white" href="'.ui_get_full_url('index.php?bye=bye').'">';
$header_logout .= html_print_image('images/header_logout_gray.png', true, ['alt' => __('Logout'), 'class' => 'bot', 'title' => __('Logout')]);
$header_logout .= '</a></div>';
// Chat messages echo '<div class="header_left">'.$header_autorefresh, $header_autorefresh_counter, $header_qr, $header_chat.'</div>
$table->data[0][8] = "<span id='icon_new_messages_chat' style='display: none;'>"; <div class="header_center">'.$header_searchbar, $header_discovery.'</div>
$table->data[0][8] .= "<a href='index.php?sec=workspace&sec2=operation/users/webchat'>"; <div class="header_right">'.$header_user, $header_logout.'</div>';
$table->data[0][8] .= html_print_image('images/header_chat.png', true, ['title' => __('New chat message')]);
$table->data[0][8] .= '</a>';
$table->data[0][8] .= '</span>';
html_print_table($table);
unset($table);
?> ?>
</td> </div> <!-- Closes #table_header_inner -->
<!-- </div> <!-- Closes #table_header -->
<td style="text-align:center">
<?php
echo "<a href='index.php?sec=main'>";
if (isset($config['custom_logo'])) {
echo html_print_image('images/custom_logo/'.$config['custom_logo'], true, ['height' => '60', 'width' => '139', 'alt' => 'Logo']);
}
echo '</a>';
?>
</td>
-->
</tr>
</table>
<!-- Notifications content wrapper--> <!-- Notifications content wrapper-->
<div id='notification-content' style='display:none;' /></div> <div id='notification-content' style='display:none;' /></div>
<!-- Old style div wrapper --> <!-- Old style div wrapper -->
<div id="alert_messages" style="display: none"></div>; <div id="alert_messages" style="display: none"></div>
<script type="text/javascript"> <script type="text/javascript">
/* <![CDATA[ */ /* <![CDATA[ */
@ -541,7 +481,6 @@ config_check();
?> ?>
$("a.autorefresh_txt").toggle (); $("a.autorefresh_txt").toggle ();
$("#combo_refr").toggle (); $("#combo_refr").toggle ();
$("#combo_refr").css('padding-right', '9px');
href = $("a.autorefresh").attr ("href"); href = $("a.autorefresh").attr ("href");
<?php <?php
if ($select[0]['time_autorefresh']) { if ($select[0]['time_autorefresh']) {
@ -583,6 +522,7 @@ config_check();
<?php <?php
if ($_GET['refr']) { if ($_GET['refr']) {
?> ?>
$("#header_autorefresh").css('padding-right', '5px');
var refr_time = <?php echo (int) get_parameter('refr', 0); ?>; var refr_time = <?php echo (int) get_parameter('refr', 0); ?>;
var t = new Date(); var t = new Date();
t.setTime (t.getTime () + t.setTime (t.getTime () +
@ -603,7 +543,6 @@ config_check();
$("a.autorefresh").click (function () { $("a.autorefresh").click (function () {
$("a.autorefresh_txt").toggle (); $("a.autorefresh_txt").toggle ();
$("#combo_refr").toggle (); $("#combo_refr").toggle ();
$("#combo_refr").css('padding-right', '9px');
$("select#ref").change (function () { $("select#ref").change (function () {
href = $("a.autorefresh").attr ("href"); href = $("a.autorefresh").attr ("href");
$(document).attr ("location", href + this.value); $(document).attr ("location", href + this.value);

View File

@ -80,7 +80,7 @@ if (!empty($all_data)) {
$data['server_sanity'] = format_numeric((100 - $data['module_sanity']), 1); $data['server_sanity'] = format_numeric((100 - $data['module_sanity']), 1);
} }
?> ?>
<table border="0" width="100%"> <table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr> <tr>
<td width="25%" style="padding-right: 20px;" valign="top"> <td width="25%" style="padding-right: 20px;" valign="top">

View File

@ -16,16 +16,80 @@ if (! isset($config['id_user'])) {
exit(); exit();
} }
?>
<script type="text/javascript" language="javascript">
$(document).ready(function(){
var menuType_value = localStorage.getItem("menuType");
if (menuType_value == 'classic') {
$('#menu_full').removeClass('menu_full_collapsed').addClass('menu_full_classic');
$('.logo_icon').css('display','none');
$('.logo_full').css('display','block');
$('div#title_menu').removeClass('title_menu_collapsed').addClass('title_menu_classic');
$('div#page').removeClass('page_collapsed').addClass('page_classic');
$('#header_table').removeClass('header_table_collapsed').addClass('header_table_classic');
$('#button_collapse').removeClass('button_collapsed').addClass('button_classic');
$('ul.submenu').css('left', '214px');
$('li.menu_icon').removeClass('menu_icon_collapsed').addClass("no_hidden_menu");
}
else{
if(menuType_value != 'collapsed'){
localStorage.setItem("menuType", "collapsed");
}
$('#menu_full').removeClass('menu_full_classic').addClass('menu_full_collapsed');
$('.logo_full').css('display','none');
$('.logo_icon').css('display','block');
$('div#title_menu').removeClass('title_menu_classic').addClass('title_menu_collapsed');
$('div#page').removeClass('page_classic').addClass('page_collapsed');
$('#header_table').removeClass('header_table_classic').addClass('header_table_collapsed');
$('#button_collapse').removeClass('button_classic').addClass('button_collapsed');
$('ul.submenu').css('left', '59px');
$('li.menu_icon').removeClass("no_hidden_menu").addClass('menu_icon_collapsed');
}
});
// Set the height of the menu.
$(window).on('load', function (){
$("#menu_full").height($("#container").height());
});
</script>
<?php
$autohidden_menu = 0; $autohidden_menu = 0;
if (isset($config['autohidden_menu']) && $config['autohidden_menu']) { if (isset($config['autohidden_menu']) && $config['autohidden_menu']) {
$autohidden_menu = 1; $autohidden_menu = 1;
} }
$menu_container_id = '';
// Menu container prepared to autohide menu // Menu container prepared to autohide menu
echo '<div id="'.$menu_container_id.'">'; echo '<div id="menu_full">';
$custom_logo = 'images/custom_logo/'.$config['custom_logo'];
$custom_logo_collapsed = 'images/custom_logo/'.$config['custom_logo_collapsed'];
if (!defined('PANDORA_ENTERPRISE')) {
$logo_title = get_product_name().' Opensource';
$custom_logo = 'images/custom_logo/pandora_logo_head_green.png';
$custom_logo_collapsed = 'images/custom_logo/pandora_logo_green_collapsed.png';
} else {
if (file_exists(ENTERPRISE_DIR.'/'.$custom_logo)) {
$custom_logo = ENTERPRISE_DIR.'/'.$custom_logo;
}
$logo_title = get_product_name().' Enterprise';
}
echo '<div class="logo_green"><a href="index.php?sec=main">';
if (isset($config['custom_logo'])) {
echo html_print_image($custom_logo, true, ['border' => '0', 'width' => '215', 'alt' => $logo_title, 'class' => 'logo_full', 'style' => 'display:none']);
}
if (isset($config['custom_logo_collapsed'])) {
echo html_print_image($custom_logo_collapsed, true, ['border' => '0', 'width' => '60', 'alt' => $logo_title, 'class' => 'logo_icon', 'style' => 'display:block']);
}
echo '</a></div>';
// echo '<div class="tit bg titop">:: '.__('Operation').' ::</div>'; // echo '<div class="tit bg titop">:: '.__('Operation').' ::</div>';
require 'operation/menu.php'; require 'operation/menu.php';
@ -45,16 +109,14 @@ if (check_acl($config['id_user'], 0, 'AW')
require 'godmode/menu.php'; require 'godmode/menu.php';
echo '<div id="button_collapse" class="button_collapse"></div>';
// require ("links_menu.php"); // require ("links_menu.php");
echo '</div>'; echo '</div>';
// menu_container // menu_container
ui_require_jquery_file('cookie'); ui_require_jquery_file('cookie');
$config_fixed_menu = false;
if (isset($config['fixed_menu'])) {
$config_fixed_menu = $config['fixed_menu'];
}
$config_fixed_header = false; $config_fixed_header = false;
if (isset($config['fixed_header'])) { if (isset($config['fixed_header'])) {
$config_fixed_header = $config['fixed_header']; $config_fixed_header = $config['fixed_header'];
@ -64,25 +126,35 @@ if (isset($config['fixed_header'])) {
<script type="text/javascript" language="javascript"> <script type="text/javascript" language="javascript">
/* <![CDATA[ */ /* <![CDATA[ */
$('#button_collapse').on('click', function() {
if($('#menu_full').hasClass('menu_full_classic')){
localStorage.setItem("menuType", "collapsed");
$('ul.submenu').css('left', '59px');
}
else if($('#menu_full').hasClass('menu_full_collapsed')){
localStorage.setItem("menuType", "classic");
$('ul.submenu').css('left', '214px');
}
$('.logo_full').toggle();
$('.logo_icon').toggle();
$('#menu_full').toggleClass('menu_full_classic menu_full_collapsed');
$('#button_collapse').toggleClass('button_classic button_collapsed');
$('div#title_menu').toggleClass('title_menu_classic title_menu_collapsed');
$('div#page').toggleClass('page_classic page_collapsed');
$('#header_table').toggleClass('header_table_classic header_table_collapsed');
$('li.menu_icon').toggleClass("no_hidden_menu menu_icon_collapsed");
});
var autohidden_menu = <?php echo $autohidden_menu; ?>; var autohidden_menu = <?php echo $autohidden_menu; ?>;
var fixed_menu = <?php echo json_encode((bool) $config_fixed_menu); ?>;
var fixed_header = <?php echo json_encode((bool) $config_fixed_header); ?>; var fixed_header = <?php echo json_encode((bool) $config_fixed_header); ?>;
var id_user = "<?php echo $config['id_user']; ?>"; var id_user = "<?php echo $config['id_user']; ?>";
var cookie_name = id_user + '-pandora_menu_state'; var cookie_name = id_user + '-pandora_menu_state';
var cookie_name_encoded = btoa(cookie_name); var cookie_name_encoded = btoa(cookie_name);
var click_display = "<?php echo $config['click_display']; ?>"; var click_display = "<?php echo $config['click_display']; ?>";
var classic_menu = parseInt("<?php echo $config['classic_menu']; ?>");
if ((isNaN(classic_menu)) || (classic_menu == 0)) {
classic_menu = false;
}
else {
classic_menu = true;
}
if (classic_menu) {
autohidden_menu = 1;
}
var menuState = $.cookie(cookie_name_encoded); var menuState = $.cookie(cookie_name_encoded);
if (!menuState) { if (!menuState) {
@ -109,236 +181,7 @@ function close_submenus () {
$('div.menu>ul>li.selected>ul').addClass('invisible'); $('div.menu>ul>li.selected>ul').addClass('invisible');
} }
$(document).ready( function() {
//Daniel maya 02/06/2016 Fixed menu position--INI
if (fixed_menu) {
$('div#menu')
.css('position', 'fixed')
.css('z-index', '9000')
.css('top','80px')
}else{
$('div#menu')
.css('z-index', '9000')
}
if (fixed_header) {
$('div#menu')
.css('position', 'fixed')
.css('z-index', '9000')
.css('top','80px')
$('#menu_tab_frame_view').css('margin-top','20px')
}
//Daniel maya 02/06/2016 Fixed menu position--END
/*
$("img.toggle").click (function (e) {
//In case the links gets activated, we don't want to follow link
e.preventDefault();
var menuItem = $(this).parent();
var submenu = menuItem.children("ul");
if (submenu.is(":visible")) {
submenu.slideUp();
if (typeof menuState[menuItem.attr('id')] != 'undefined')
delete menuState[menuItem.attr('id')];
}
else {
submenu.slideDown();
menuState[menuItem.attr('id')] = 1;
}
$.cookie(cookie_name_encoded, JSON.stringify(menuState), {expires: 7});
});
//Cerrar aqui los comentarios cuando esté el menu terminado
if (fixed_menu) {
$('div#menu')
.css('position', 'fixed')
.css('z-index', '9000')
.css('left', '0')
.css('top', $('div#head').innerHeight() + 'px')
.css('height', '100%')
.css('overflow', 'hidden')
.hover(function (e) {
if (!autohidden_menu) {
$(this).css('overflow', 'auto').children('div').css('width', 'auto');
}
}, function (e) {
if (!autohidden_menu) {
$(this).css('overflow', 'hidden').children('div').css('width', '100%');
}
})
.children('div')
.css('margin-bottom', $('div#head').innerHeight() + 'px');
if (!fixed_header) {
$(window).scroll(function () {
if ($(this).scrollTop() <= $('div#head').innerHeight()) {
$('div#menu').css('top', $('div#head').innerHeight() - $(this).scrollTop() + 'px' );
} else {
$('div#menu').css('top', '0');
}
});
}
}
function show_menu () {
$('#menu_container').animate({"left": "+=80px"}, 200, function () {
if (fixed_menu) {
$('#menu_container').parent().css('overflow', 'auto');
}
});
//show_menu_pretty();
}
function show_menu_pretty() {
open_submenus();
$('div.menu ul li').css('background-position', '');
$('ul.submenu li a, li.menu_icon a, li.links a, div.menu>ul>li>img.toggle').show();
$('.titop').css('color', 'white');
$('.bg3').css('color', 'white');
$('.bg4').css('color', 'white');
}
function hide_menu () {
if (fixed_menu) {
$('#menu_container').parent().css('overflow', 'hidden');
}
$('#menu_container').animate({"left": "-=80px"}, 100);
//hide_menu_pretty();
}
function hide_menu_pretty() {
close_submenus();
$('div.menu li').css('background-position', '85px 5px');
$('ul.submenu li a, li.menu_icon a, li.links a, div.menu>ul>li>img.toggle').hide();
$('.titop').css('color', $('.titop').css('background-color'));
$('.bg3').css('color', $('.bg3').css('background-color'));
$('.bg4').css('color', $('.bg4').css('background-color'));
}
*/
if (autohidden_menu) {
//handlerIn, handlerOut);
//openTime = 0;
//handsIn = 0;
//$('#main').css('margin-left', '50px');
//hide_menu_pretty();
/*
$('#menu').hover(function() {
handsIn = 1;
if (openTime == 0) {
show_menu();
openTime = new Date().getTime();
}
}).mouseleave(function() {
handsIn = 0;
setTimeout(function() {
openedTime = new Date().getTime() - openTime;
if(openedTime > 3000 && handsIn == 0) {
hide_menu();
openTime = 0;
}
}, 3500);
});
*/
handsInMenu = 0;
openTimeMenu = 0;
if (classic_menu) {
$('div#title_menu').show();
handsInMenu = 1;
openTimeMenu = new Date().getTime();
$('#menu').css('width', '145px');
$('#menu').css('position', 'block');
$('div#menu').css('top', '80px');
$('li.menu_icon').addClass( " no_hidden_menu" );
$('ul.submenu').css('left', '144px');
$('#menu').mouseleave(function() {
handsInMenu = 0;
setTimeout(function() {
openedMenu = new Date().getTime() - openTimeMenu;
if(openedMenu > 1000 && handsInMenu == 0) {
$('#menu').css('width', '145px');
$('#menu').css('position', 'block');
$('li.menu_icon').addClass( " no_hidden_menu" );
$('ul.submenu').css('left', '144px');
}
}, 2500);
});
}
else {
if(!click_display){
$('#menu').mouseenter(function() {
$('div#title_menu').show();
handsInMenu = 1;
openTimeMenu = new Date().getTime();
$('#menu').css('width', '145px');
$('li.menu_icon').addClass( " no_hidden_menu" );
$('li.menu_icon').find('li').addClass( " no_hidden_menu" );
$('ul.submenu').css('left', '144px');
}).mouseleave(function() {
handsInMenu = 0;
setTimeout(function() {
openedMenu = new Date().getTime() - openTimeMenu;
if(openedMenu > 1000 && handsInMenu == 0) {
$('#menu').css('width', '45px');
$('li.menu_icon').removeClass( " no_hidden_menu");
$('li.menu_icon').find('li').removeClass( " no_hidden_menu" );
$('ul.submenu').css('left', '44px');
$('div#title_menu').hide();
}
}, 2500);
});
}else{
$(document).ready(function() {
$('#menu').on("click", function() {
$('div#title_menu').show();
handsInMenu = 1;
openTimeMenu = new Date().getTime();
$('#menu').css('width', '145px');
$('li.menu_icon').addClass( " no_hidden_menu" );
$('li.menu_icon').find('li').addClass( " no_hidden_menu" );
$('ul.submenu').css('left', '144px');
}).mouseleave(function() {
handsInMenu = 0;
setTimeout(function() {
openedMenu = new Date().getTime() - openTimeMenu;
if(openedMenu > 1000 && handsInMenu == 0) {
$('#menu').css('width', '45px');
$('li.menu_icon').removeClass( " no_hidden_menu");
$('li.menu_icon').find('li').removeClass( " no_hidden_menu" );
$('ul.submenu').css('left', '44px');
$('div#title_menu').hide();
}
}, 5500);
});
});
}
}
}
else {
$('div#title_menu').hide();
if(!click_display){
$('#menu').mouseenter(function() {
handsInMenu = 1;
openTimeMenu = new Date().getTime();
$('ul.submenu').css('left', '44px');
}).mouseleave(function() {
handsInMenu = 0;
setTimeout(function() {
openedMenu = new Date().getTime() - openTimeMenu;
if(openedMenu > 1000 && handsInMenu == 0) {
$('li.menu_icon').removeClass( " no_hidden_menu");
$('li.menu_icon').find('li').removeClass( " no_hidden_menu" );
$('ul.submenu').css('left', '44px');
}
}, 2500);
});
}
}
});
/* ]]> */ /* ]]> */
</script> </script>
@ -348,12 +191,90 @@ $(document).ready( function() {
handsIn = 0; handsIn = 0;
handsIn2 = 0; handsIn2 = 0;
if(!click_display){
/**
* Positionate the submenu elements. Add a negative top.
*
* @param int index It is the position of li.menu_icon in the ul.
* @param string id_submenu It is the id of first level submenu.
* @param string id_submenu2 It is the id of second level submenu.
* @param int item_height It is the height of a menu item (28 o 35).
*
* @return (int) The position (in px).
*/
function menu_calculate_top(index, id_submenu, id_submenu2, item_height){
var level1 = index;
var level2 = $('#'+id_submenu+' ul.submenu > li').length;
var level3 = $('#'+id_submenu2+' > li.sub_subMenu').length;
var item_height = item_height;
level2--;
if (id_submenu2 !== false) {
// If level3 is set, the position is calculated like box is in the center.
// wiouth considering level2 box can be moved.
level3--;
total = (level1 + level3);
comp = level3;
} else {
total = (level1 + level2);
comp = level2;
}
// Positionate in the middle
if (total > 12 && ((total < 18) || ((level1 - comp) <= 4))) {
return - ( Math.floor(comp / 2) * item_height);
}
// Positionate in the bottom
if (total >= 18) {
return (- comp * item_height);
}
// return 0 by default
return 0;
}
/**
* Get the menu items to be positioned.
*
* @param string item It is the selector of the current element.
*
* @return Add the top position in a inline style.
*/
function get_menu_items(item){
var item_height = parseInt(item.css('min-height'));
var id_submenu = item.attr('id');
var id_submenu2 = false;
var index = item.index();
if(item.parent().hasClass('godmode')){
index = index+6; // This is because the menu has divided in two parts.
}
var top_submenu = menu_calculate_top(index, id_submenu, id_submenu2, item_height);
top_submenu = top_submenu+'px';
$('#'+id_submenu+' ul.submenu').css('top', top_submenu);
$('.has_submenu').mouseenter(function() {
id_submenu2 = item.attr('id');
id_submenu2 = $('#'+id_submenu2+' ul.submenu2').attr('id');
var top_submenu2 = menu_calculate_top(index, id_submenu, id_submenu2, item_height);
top_submenu2 = top_submenu2+'px';
$('#'+id_submenu2).css('top', top_submenu2);
});
}
/*
* Show and hide submenus
*/
if(!click_display){
$('.menu_icon').mouseenter(function() { $('.menu_icon').mouseenter(function() {
table_hover = $(this); table_hover = $(this);
handsIn = 1; handsIn = 1;
openTime = new Date().getTime(); openTime = new Date().getTime();
$("ul#sub"+table_hover[0].id).show(); $("ul#sub"+table_hover[0].id).show();
get_menu_items(table_hover);
if( typeof(table_noHover) != 'undefined') if( typeof(table_noHover) != 'undefined')
if ( "ul#sub"+table_hover[0].id != "ul#sub"+table_noHover[0].id ) if ( "ul#sub"+table_hover[0].id != "ul#sub"+table_noHover[0].id )
$("ul#sub"+table_noHover[0].id).hide(); $("ul#sub"+table_noHover[0].id).hide();
@ -364,11 +285,11 @@ $(document).ready( function() {
opened = new Date().getTime() - openTime; opened = new Date().getTime() - openTime;
if(opened > 3000 && handsIn == 0) { if(opened > 3000 && handsIn == 0) {
openTime = 4000; openTime = 4000;
$("ul#sub"+table_hover[0].id).hide(); $("ul#sub"+table_noHover[0].id).hide();
} }
}, 2500); }, 2500);
}); });
}else{ }else{
$(document).ready(function() { $(document).ready(function() {
if (autohidden_menu) { if (autohidden_menu) {
$('.menu_icon').on("click", function() { $('.menu_icon').on("click", function() {
@ -379,6 +300,7 @@ $(document).ready( function() {
handsIn = 1; handsIn = 1;
openTime = new Date().getTime(); openTime = new Date().getTime();
$("ul#sub"+table_hover[0].id).show(); $("ul#sub"+table_hover[0].id).show();
get_menu_items(table_hover);
}).mouseleave(function() { }).mouseleave(function() {
table_noHover = $(this); table_noHover = $(this);
handsIn = 0; handsIn = 0;
@ -386,7 +308,7 @@ $(document).ready( function() {
opened = new Date().getTime() - openTime; opened = new Date().getTime() - openTime;
if(opened > 5000 && handsIn == 0) { if(opened > 5000 && handsIn == 0) {
openTime = 6000; openTime = 6000;
$("ul#sub"+table_hover[0].id).hide(); $("ul#sub"+table_noHover[0].id).hide();
} }
}, 5500); }, 5500);
}); });
@ -399,12 +321,13 @@ $(document).ready( function() {
handsIn = 1; handsIn = 1;
openTime = new Date().getTime(); openTime = new Date().getTime();
$("ul#sub"+table_hover[0].id).show(); $("ul#sub"+table_hover[0].id).show();
get_menu_items(table_hover);
}); });
} }
}); });
} }
- $('.has_submenu').mouseenter(function() { $('.has_submenu').mouseenter(function() {
table_hover2 = $(this); table_hover2 = $(this);
handsIn2 = 1; handsIn2 = 1;
openTime2 = new Date().getTime(); openTime2 = new Date().getTime();
@ -412,7 +335,7 @@ $(document).ready( function() {
if( typeof(table_noHover2) != 'undefined') if( typeof(table_noHover2) != 'undefined')
if ( "ul#sub"+table_hover2[0].id != "ul#sub"+table_noHover2[0].id ) if ( "ul#sub"+table_hover2[0].id != "ul#sub"+table_noHover2[0].id )
$("ul#sub"+table_noHover2[0].id).hide(); $("ul#sub"+table_noHover2[0].id).hide();
}).mouseleave(function() { }).mouseleave(function() {
table_noHover2 = table_hover2; table_noHover2 = table_hover2;
handsIn2 = 0; handsIn2 = 0;
setTimeout(function() { setTimeout(function() {
@ -422,11 +345,10 @@ $(document).ready( function() {
$("ul#sub"+table_hover2[0].id).hide(); $("ul#sub"+table_hover2[0].id).hide();
} }
}, 3500); }, 3500);
}); });
$(document).ready(function() {
$(document).ready(function() {
if (!classic_menu) {
//Daniel maya 02/06/2016 Display menu with click --INI
if(!click_display){ if(!click_display){
$('#container').click(function() { $('#container').click(function() {
openTime = 4000; openTime = 4000;
@ -434,10 +356,6 @@ $(document).ready( function() {
$("ul#sub"+table_hover[0].id).hide(); $("ul#sub"+table_hover[0].id).hide();
if( typeof(table_hover2) != 'undefined') if( typeof(table_hover2) != 'undefined')
$("ul#sub"+table_hover2[0].id).hide(); $("ul#sub"+table_hover2[0].id).hide();
$('#menu').css('width', '45px');
$('li.menu_icon').removeClass( " no_hidden_menu");
$('ul.submenu').css('left', '44px');
$('div#title_menu').hide();
}); });
}else{ }else{
$('#main').click(function() { $('#main').click(function() {
@ -446,46 +364,16 @@ $(document).ready( function() {
$("ul#sub"+table_hover[0].id).hide(); $("ul#sub"+table_hover[0].id).hide();
if( typeof(table_hover2) != 'undefined') if( typeof(table_hover2) != 'undefined')
$("ul#sub"+table_hover2[0].id).hide(); $("ul#sub"+table_hover2[0].id).hide();
$('#menu').css('width', '45px');
$('li.menu_icon').removeClass( " no_hidden_menu");
$('ul.submenu').css('left', '44px');
$('div#title_menu').hide();
}); });
} }
//Daniel maya 02/06/2016 Display menu with click --END
}
else {
if(!click_display){
$('#container').click(function() {
openTime = 4000;
if( typeof(table_hover) != 'undefined')
$("ul#sub"+table_hover[0].id).hide();
if( typeof(table_hover2) != 'undefined')
$("ul#sub"+table_hover2[0].id).hide();
$('#menu').css('width', '145px');
$('ul.submenu').css('left', '144px');
});
}else{
$('#main').click(function() {
openTime = 4000;
if( typeof(table_hover) != 'undefined')
$("ul#sub"+table_hover[0].id).hide();
if( typeof(table_hover2) != 'undefined')
$("ul#sub"+table_hover2[0].id).hide();
$('#menu').css('width', '145px');
$('ul.submenu').css('left', '144px');
});
}
}
if (classic_menu) {
$('div.menu>ul>li>ul>li>a').click(function() { $('div.menu>ul>li>ul>li>a').click(function() {
openTime = 4000; openTime = 4000;
if( typeof(table_hover) != 'undefined') if( typeof(table_hover) != 'undefined')
$("ul#sub"+table_hover[0].id).hide(); $("ul#sub"+table_hover[0].id).hide();
if( typeof(table_hover2) != 'undefined') if( typeof(table_hover2) != 'undefined')
$("ul#sub"+table_hover2[0].id).hide(); $("ul#sub"+table_hover2[0].id).hide();
$('ul.submenu').css('left', '144px');
}); });
$('div.menu>ul>li>ul>li>ul>li>a').click(function() { $('div.menu>ul>li>ul>li>ul>li>a').click(function() {
@ -494,36 +382,8 @@ $(document).ready( function() {
$("ul#sub"+table_hover[0].id).hide(); $("ul#sub"+table_hover[0].id).hide();
if( typeof(table_hover2) != 'undefined') if( typeof(table_hover2) != 'undefined')
$("ul#sub"+table_hover2[0].id).hide(); $("ul#sub"+table_hover2[0].id).hide();
$('ul.submenu').css('left', '144px');
});
}
else {
$('div.menu>ul>li>ul>li>a').click(function() {
openTime = 4000;
if( typeof(table_hover) != 'undefined')
$("ul#sub"+table_hover[0].id).hide();
if( typeof(table_hover2) != 'undefined')
$("ul#sub"+table_hover2[0].id).hide();
$('#menu').css('width', '45px');
$('li.menu_icon').removeClass( " no_hidden_menu");
$('ul.submenu').css('left', '44px');
$('div#title_menu').hide();
}); });
$('div.menu>ul>li>ul>li>ul>li>a').click(function() { });
openTime = 4000;
if( typeof(table_hover) != 'undefined')
$("ul#sub"+table_hover[0].id).hide();
if( typeof(table_hover2) != 'undefined')
$("ul#sub"+table_hover2[0].id).hide();
$('#menu').css('width', '45px');
$('li.menu_icon').removeClass( " no_hidden_menu");
$('ul.submenu').css('left', '44px');
$('div#title_menu').hide();
});
}
});
</script> </script>

View File

@ -0,0 +1,113 @@
<html>
<head>
<style>
#alert_messages_na{
-moz-border-bottom-right-radius: 5px;
-webkit-border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
border-bottom-left-radius: 5px;
z-index:2;
position:fixed;
width:700px;
background:white;
left:50%;
top:20%;
margin-left:-350px;
}
.modalheade{
text-align:center;
width:100%;
height:37px;
left:0px;
background-color:#82b92e;
}
.modalheadertex{
color:white;
position:relative;
font-family:Nunito;
font-size:13pt;
top:8px;
}
.modalconten{
color:black;
background:white;
}
.modalcontentim{
float:left;
margin-left:30px;
margin-top:30px;
margin-bottom:30px;
}
.modalcontenttex{
float:left;
text-align:justify;
color:black;
font-size: 9.5pt;
line-height:13pt;
margin-top:40px;
width:430px;
margin-left:30px;
}
.modalwikibutto{
cursor:pointer;
text-align:center;
margin-right:45px;
float:right;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
margin-bottom:30px;
border-radius: 3px;
width:170px;
height:30px;
border: 1px solid #82b92e;
margin-top:8%;
background-color:#82b92e;
}
.modalwikibuttontex{
color:#ffffff;
font-family:Nunito;
font-size:10pt;
position:relative;
top:6px;
}
#opacity{
background:black;opacity:0.1;left:0px;top:0px;width:100%;height:100%;
}
</style>
</head>
<body>
<div id="alert_messages_na">
<div class='modalheade'>
<span class='modalheadertex'>
<?php echo __('Database error'); ?>
</span>
</div>
<div class='modalconten'>
<img class='modalcontentim' src='<?php echo $config['homeurl']; ?>/images/mysqlerr.png'>
<div class='modalcontenttex'>
<?php
echo __('Failure to connect to Database server, please check the configuration file config.php or contact system administrator if you need assistance.');
?>
</div>
</div>
<a href='https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Configuration' target='_blank'>
<div class='modalwikibutto cerrar'>
<span class='modalwikibuttontex'> <?php echo __('Documentation'); ?></span>
</div>
</a>
</div>
<div id="opacity"></div>
</body>
</html>

View File

@ -431,7 +431,7 @@ if (modules_is_string_type($id_module_type) || $edit) {
str_replace('"', '', $str_warning), str_replace('"', '', $str_warning),
'', '',
10, 10,
255, 1024,
true, true,
$disabledBecauseInPolicy, $disabledBecauseInPolicy,
false, false,
@ -484,7 +484,7 @@ if (modules_is_string_type($id_module_type) || $edit) {
str_replace('"', '', $str_critical), str_replace('"', '', $str_critical),
'', '',
10, 10,
255, 1024,
true, true,
$disabledBecauseInPolicy, $disabledBecauseInPolicy,
false, false,

View File

@ -562,7 +562,7 @@ $table->data['edit1'][1] = '<table width="100%">';
'', '',
'', '',
5, 5,
255, 1024,
true true
); );
$table->data['edit1'][1] .= '</td>'; $table->data['edit1'][1] .= '</td>';
@ -631,7 +631,7 @@ $table->data['edit1'][1] = '<table width="100%">';
'', '',
'', '',
5, 5,
255, 1024,
true true
); );
$table->data['edit1'][3] .= '</td>'; $table->data['edit1'][3] .= '</td>';

View File

@ -190,7 +190,7 @@ $table->data[4][1] .= html_print_input_text(
$str_warning, $str_warning,
'', '',
5, 5,
64, 1024,
true true
).'</span>'; ).'</span>';
$table->data[4][1] .= '<br /><em>'.__('Inverse interval').'</em>'; $table->data[4][1] .= '<br /><em>'.__('Inverse interval').'</em>';
@ -225,7 +225,7 @@ $table->data[5][1] .= html_print_input_text(
$str_critical, $str_critical,
'', '',
5, 5,
64, 1024,
true true
).'</span>'; ).'</span>';
$table->data[5][1] .= '<br /><em>'.__('Inverse interval').'</em>'; $table->data[5][1] .= '<br /><em>'.__('Inverse interval').'</em>';

View File

@ -43,7 +43,7 @@ if (is_ajax()) {
if ($type_auth != 'mysql') { if ($type_auth != 'mysql') {
// Fallback to local authentication // Fallback to local authentication
$row = []; $row = [];
$row['name'] = __('Fallback to local authentication').ui_print_help_tip(__('Enable this option if you want to fallback to local authentication when remote (ldap etc...) authentication failed.'), true); $row['name'] = __('Fallback to local authentication').ui_print_help_tip(__('Enable this option if you want to fallback to local authentication when remote (ldap etc...) authentication failed. Only available when \'Save password\' is enabled.'), true);
$row['control'] = html_print_checkbox_switch('fallback_local_auth', 1, $config['fallback_local_auth'], true); $row['control'] = html_print_checkbox_switch('fallback_local_auth', 1, $config['fallback_local_auth'], true);
$table->data['fallback_local_auth'] = $row; $table->data['fallback_local_auth'] = $row;

File diff suppressed because it is too large Load Diff

View File

@ -306,7 +306,7 @@ class DiscoveryTaskList extends Wizard
return false; return false;
} }
// Get all recon servers. // Get all discovery servers.
$servers = db_get_all_rows_sql('SELECT * FROM tserver WHERE server_type = 3'); $servers = db_get_all_rows_sql('SELECT * FROM tserver WHERE server_type = 3');
if ($servers === false) { if ($servers === false) {
$servers = []; $servers = [];
@ -337,28 +337,8 @@ class DiscoveryTaskList extends Wizard
} }
} }
foreach ($servers as $serverItem) {
$id_server = $serverItem['id_server'];
$server_name = servers_get_name($id_server);
$recon_tasks = db_get_all_rows_sql('SELECT * FROM trecon_task'); $recon_tasks = db_get_all_rows_sql('SELECT * FROM trecon_task');
$user_groups = implode(',', array_keys(users_get_groups())); $user_groups = implode(',', array_keys(users_get_groups()));
$defined_tasks = db_get_all_rows_filter(
'tuser_task_scheduled',
'id_grupo IN ('.$user_groups.')'
);
if (isset($tasks_console) === true
&& is_array($tasks_console) === true
) {
foreach ($tasks_console as $key => $value) {
$value['parameters'] = unserialize(
$value['parameters']
);
$value['type'] = 'Cron';
array_push($recon_tasks, $value);
}
}
// Show network tasks for Recon Server. // Show network tasks for Recon Server.
if ($recon_tasks === false) { if ($recon_tasks === false) {
@ -384,31 +364,52 @@ class DiscoveryTaskList extends Wizard
$table->head[1] = __('Task name'); $table->head[1] = __('Task name');
$table->align[1] = 'left'; $table->align[1] = 'left';
$table->head[2] = __('Interval'); $table->head[2] = __('Server name');
$table->align[2] = 'left'; $table->align[2] = 'left';
$table->head[3] = __('Network'); $table->head[3] = __('Interval');
$table->align[3] = 'left'; $table->align[3] = 'left';
$table->head[4] = __('Status'); $table->head[4] = __('Network');
$table->align[4] = 'left'; $table->align[4] = 'left';
$table->head[5] = __('Task type'); $table->head[5] = __('Status');
$table->align[5] = 'left'; $table->align[5] = 'left';
$table->head[6] = __('Progress'); $table->head[6] = __('Task type');
$table->align[6] = 'left'; $table->align[6] = 'left';
$table->head[7] = __('Updated at'); $table->head[7] = __('Progress');
$table->align[7] = 'left'; $table->align[7] = 'left';
$table->head[8] = __('Operations'); $table->head[8] = __('Updated at');
$table->align[8] = 'left'; $table->align[8] = 'left';
$table->head[9] = __('Operations');
$table->align[9] = 'left';
foreach ($recon_tasks as $task) { foreach ($recon_tasks as $task) {
$data = []; $data = [];
$server_name = servers_get_name($task['id_recon_server']);
if ($task['disabled'] == 0) { // By default.
$subnet = $task['subnet'];
// Exceptions: IPAM.
$ipam = false;
if ($task['id_recon_script'] != null) {
$recon_script_name = db_get_value('name', 'trecon_script', 'id_recon_script', $task['id_recon_script']);
if (io_safe_output($recon_script_name) == 'IPAM Recon'
&& enterprise_installed()
) {
$subnet_obj = json_decode($task['macros'], true);
$subnet = $subnet_obj['1']['value'];
$tipam_task_id = db_get_value('id', 'tipam_network', 'id_recon_task', $task['id_rt']);
$ipam = true;
}
}
if ($task['disabled'] == 0 && $server_name !== '') {
$data[0] = '<a href="'.ui_get_full_url( $data[0] = '<a href="'.ui_get_full_url(
'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=tasklist&server_id='.$id_server.'&force='.$task['id_rt'] 'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=tasklist&server_id='.$id_server.'&force='.$task['id_rt']
).'">'; ).'">';
@ -425,54 +426,51 @@ class DiscoveryTaskList extends Wizard
$data[1] = '<b>'.$task['name'].'</b>'; $data[1] = '<b>'.$task['name'].'</b>';
$data[2] = $server_name;
if ($task['interval_sweep'] > 0) { if ($task['interval_sweep'] > 0) {
$data[2] = human_time_description_raw( $data[3] = human_time_description_raw(
$task['interval_sweep'] $task['interval_sweep']
); );
} else { } else {
$data[2] = __('Manual'); $data[3] = __('Manual');
} }
if ($task['id_recon_script'] == 0) { if ($task['id_recon_script'] == 0 || $ipam === true) {
$data[3] = $task['subnet']; $data[4] = $subnet;
} else { } else {
$data[3] = '-'; $data[4] = '-';
} }
if ($task['status'] <= 0) { if ($task['status'] <= 0) {
$data[4] = __('Done'); $data[5] = __('Done');
} else { } else {
$data[4] = __('Pending'); $data[5] = __('Pending');
} }
if ($task['id_recon_script'] == 0) { if ($task['id_recon_script'] == 0) {
// Discovery NetScan. // Discovery NetScan.
$data[5] = html_print_image( $data[6] = html_print_image(
'images/network.png', 'images/network.png',
true, true,
['title' => __('Discovery NetScan')] ['title' => __('Discovery NetScan')]
).'&nbsp;&nbsp;'; ).'&nbsp;&nbsp;';
$data[5] .= network_profiles_get_name( $data[6] .= network_profiles_get_name(
$task['id_network_profile'] $task['id_network_profile']
); );
} else { } else {
// APP recon task. // APP recon task.
$data[5] = html_print_image( $data[6] = html_print_image(
'images/plugin.png', 'images/plugin.png',
true true
).'&nbsp;&nbsp;'; ).'&nbsp;&nbsp;';
$data[5] .= db_get_sql( $data[6] .= $recon_script_name;
sprintf(
'SELECT name FROM trecon_script WHERE id_recon_script = %d',
$task['id_recon_script']
)
);
} }
if ($task['status'] <= 0 || $task['status'] > 100) { if ($task['status'] <= 0 || $task['status'] > 100) {
$data[6] = '-'; $data[7] = '-';
} else { } else {
$data[6] = progress_bar( $data[7] = progress_bar(
$task['status'], $task['status'],
100, 100,
20, 20,
@ -482,12 +480,12 @@ class DiscoveryTaskList extends Wizard
} }
if ($task['utimestamp'] > 0) { if ($task['utimestamp'] > 0) {
$data[7] = ui_print_timestamp( $data[8] = ui_print_timestamp(
$task['utimestamp'], $task['utimestamp'],
true true
); );
} else { } else {
$data[7] = __('Not executed yet'); $data[8] = __('Not executed yet');
} }
if (check_acl( if (check_acl(
@ -496,8 +494,25 @@ class DiscoveryTaskList extends Wizard
'PM' 'PM'
) )
) { ) {
// Check if is a H&D, Cloud or Application. if ($ipam === true) {
$data[8] = '<a href="'.ui_get_full_url( $data[9] = '<a href="'.ui_get_full_url(
sprintf(
'index.php?sec=godmode/extensions&sec2=enterprise/extensions/ipam&action=edit&id=%d',
$tipam_task_id
)
).'">'.html_print_image(
'images/config.png',
true
).'</a>';
$data[9] .= '<a href="'.ui_get_full_url(
'index.php?sec=godmode/extensions&sec2=enterprise/extensions/ipam&action=delete&id='.$tipam_task_id
).'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image(
'images/cross.png',
true
).'</a>';
} else {
// Check if is a H&D, Cloud or Application or IPAM.
$data[9] = '<a href="'.ui_get_full_url(
sprintf( sprintf(
'index.php?sec=gservers&sec2=godmode/servers/discovery&%s&task=%d', 'index.php?sec=gservers&sec2=godmode/servers/discovery&%s&task=%d',
$this->getTargetWiz($task), $this->getTargetWiz($task),
@ -507,14 +522,15 @@ class DiscoveryTaskList extends Wizard
'images/config.png', 'images/config.png',
true true
).'</a>'; ).'</a>';
$data[8] .= '<a href="'.ui_get_full_url( $data[9] .= '<a href="'.ui_get_full_url(
'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=tasklist&delete=1&task='.$task['id_rt'] 'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=tasklist&delete=1&task='.$task['id_rt']
).'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image( ).'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image(
'images/cross.png', 'images/cross.png',
true true
).'</a>'; ).'</a>';
}
} else { } else {
$data[8] = ''; $data[9] = '';
} }
array_push($table->data, $data); array_push($table->data, $data);
@ -530,7 +546,6 @@ class DiscoveryTaskList extends Wizard
unset($table); unset($table);
} }
}
return true; return true;
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 664 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 294 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 516 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 510 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 813 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 311 B

After

Width:  |  Height:  |  Size: 342 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 748 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 755 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 881 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 611 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 305 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 458 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 313 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 364 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 471 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 498 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 490 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 621 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 531 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 416 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 871 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 630 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 739 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 355 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 651 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 624 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 599 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 441 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 B

View File

@ -54,6 +54,7 @@ $table_events = get_parameter('table_events', 0);
$total_events = (bool) get_parameter('total_events'); $total_events = (bool) get_parameter('total_events');
$total_event_graph = (bool) get_parameter('total_event_graph'); $total_event_graph = (bool) get_parameter('total_event_graph');
$graphic_event_group = (bool) get_parameter('graphic_event_group'); $graphic_event_group = (bool) get_parameter('graphic_event_group');
$get_table_response_command = (bool) get_parameter('get_table_response_command');
if ($get_event_name) { if ($get_event_name) {
$event_id = get_parameter('event_id'); $event_id = get_parameter('event_id');
@ -116,6 +117,7 @@ if ($get_response_target) {
} }
echo events_get_response_target($event_id, $response_id, $server_id); echo events_get_response_target($event_id, $response_id, $server_id);
return; return;
} }
@ -129,6 +131,7 @@ if ($get_response) {
} }
echo json_encode($event_response); echo json_encode($event_response);
return; return;
} }
@ -136,6 +139,7 @@ if ($perform_event_response) {
global $config; global $config;
$command = get_parameter('target', ''); $command = get_parameter('target', '');
$response_id = get_parameter('response_id'); $response_id = get_parameter('response_id');
$event_response = db_get_row('tevent_response', 'id', $response_id); $event_response = db_get_row('tevent_response', 'id', $response_id);
@ -148,7 +152,11 @@ if ($perform_event_response) {
'nano', 'nano',
]; ];
$server_data = db_get_row('tserver', 'id_server', $event_response['server_to_exec']); $server_data = db_get_row(
'tserver',
'id_server',
$event_response['server_to_exec']
);
if (in_array(strtolower($command), $commandExclusions)) { if (in_array(strtolower($command), $commandExclusions)) {
echo 'Only stdin/stdout commands are supported'; echo 'Only stdin/stdout commands are supported';
@ -234,13 +242,29 @@ if ($dialogue_event_response) {
); );
echo '</div><br>'; echo '</div><br>';
echo "<div id='response_loading_command_".$out_iterator."' style='display:none'>".html_print_image('images/spinner.gif', true).'</div>'; echo "<div id='response_loading_command_".$out_iterator."' style='display:none'>";
echo html_print_image(
'images/spinner.gif',
true
);
echo '</div>';
echo "<br><div id='response_out_".$out_iterator."' style='text-align:left'></div>"; echo "<br><div id='response_out_".$out_iterator."' style='text-align:left'></div>";
if ($end) { if ($end) {
echo "<br><div id='re_exec_command_".$out_iterator."' style='display:none;'>"; echo "<br><div id='re_exec_command_".$out_iterator."' style='display:none;'>";
html_print_button(__('Execute again'), 'btn_str', false, 'execute_event_response(false);', "class='sub next'"); html_print_button(
echo "<span id='execute_again_loading' style='display:none'>".html_print_image('images/spinner.gif', true).'</span>'; __('Execute again'),
'btn_str',
false,
'execute_event_response(false);',
"class='sub next'"
);
echo "<span id='execute_again_loading' style='display:none'>";
echo html_print_image(
'images/spinner.gif',
true
);
echo '</span>';
echo '</div>'; echo '</div>';
} }
} else { } else {
@ -796,3 +820,67 @@ if ($graphic_event_group) {
echo $prueba; echo $prueba;
return; return;
} }
if ($get_table_response_command) {
global $config;
$response_id = get_parameter('event_response_id');
$params_string = db_get_value(
'params',
'tevent_response',
'id',
$response_id
);
$params = explode(',', $params_string);
$table = new stdClass;
$table->id = 'events_responses_table_command';
$table->width = '90%';
$table->styleTable = 'text-align:center; margin: 0 auto;';
$table->style = [];
$table->style[0] = 'text-align:center;';
$table->style[1] = 'text-align:center;';
$table->head = [];
$table->head[0] = __('Parameters');
$table->head[0] .= ui_print_help_tip(
__('These commands will apply to all selected events'),
true
);
$table->head[1] = __('Value');
if (isset($params) === true
&& is_array($params) === true
) {
foreach ($params as $key => $value) {
$table->data[$key][0] = $value;
$table->data[$key][1] = html_print_input_text(
$value.'-'.$key,
'',
'',
50,
255,
true,
false,
false,
'',
'response_command_input'
);
}
}
echo '<form id="form_response_command">';
echo html_print_table($table, true);
echo '</form>';
echo html_print_submit_button(
__('Execute'),
'enter_command',
false,
'class="sub next" style="float:right; margin-top:15px; margin-right:25px;"',
true
);
return;
}

View File

@ -20,7 +20,7 @@
/** /**
* Pandora build version and version * Pandora build version and version
*/ */
$build_version = 'PC190228'; $build_version = 'PC190308';
$pandora_version = 'v7.0NG.732'; $pandora_version = 'v7.0NG.732';
// Do not overwrite default timezone set if defined. // Do not overwrite default timezone set if defined.

View File

@ -45,6 +45,7 @@ function mysql_connect_db($host=null, $db=null, $user=null, $pass=null, $port=nu
if ($config['mysqli']) { if ($config['mysqli']) {
$connect_id = mysqli_connect($host, $user, $pass, $db, $port); $connect_id = mysqli_connect($host, $user, $pass, $db, $port);
if (mysqli_connect_errno() > 0) { if (mysqli_connect_errno() > 0) {
include 'general/mysqlerr.php';
return false; return false;
} }

Binary file not shown.

View File

@ -82,17 +82,25 @@ function agents_get_agent_id_by_alias($alias)
/** /**
* Creates an agent * Creates an agent.
* *
* @param string Agent name. * @param string $name Agent name.
* @param string Group to be included. * @param string $id_group Group to be included.
* @param int Agent interval * @param integer $interval Agent interval.
* @param string Agent IP * @param string $ip_address Agent IP.
* @param mixed $values Other tagente fields.
* @param boolean $alias_as_name True to not assign an alias as name.
* *
* @return integer New agent id if created. False if it could not be created. * @return integer New agent id if created. False if it could not be created.
*/ */
function agents_create_agent($name, $id_group, $interval, $ip_address, $values=false) function agents_create_agent(
{ $name,
$id_group,
$interval,
$ip_address,
$values=false,
$alias_as_name=false
) {
if (empty($name)) { if (empty($name)) {
return false; return false;
} }
@ -101,7 +109,7 @@ function agents_create_agent($name, $id_group, $interval, $ip_address, $values=f
return false; return false;
} }
// Check interval greater than zero // Check interval greater than zero.
if ($interval < 0) { if ($interval < 0) {
$interval = false; $interval = false;
} }
@ -115,7 +123,7 @@ function agents_create_agent($name, $id_group, $interval, $ip_address, $values=f
} }
$values['alias'] = $name; $values['alias'] = $name;
$values['nombre'] = hash('sha256', $name.'|'.$ip_address.'|'.time().'|'.sprintf('%04d', rand(0, 10000))); $values['nombre'] = ($alias_as_name === false) ? hash('sha256', $name.'|'.$ip_address.'|'.time().'|'.sprintf('%04d', rand(0, 10000))) : $name;
$values['id_grupo'] = $id_group; $values['id_grupo'] = $id_group;
$values['intervalo'] = $interval; $values['intervalo'] = $interval;
@ -128,12 +136,12 @@ function agents_create_agent($name, $id_group, $interval, $ip_address, $values=f
return false; return false;
} }
// Create address for this agent in taddress // Create address for this agent in taddress.
if (!empty($ip_address)) { if (!empty($ip_address)) {
agents_add_address($id_agent, $ip_address); agents_add_address($id_agent, $ip_address);
} }
db_pandora_audit('Agent management', "New agent '$name' created"); db_pandora_audit('Agent management', 'New agent '.$name.' created');
return $id_agent; return $id_agent;
} }

View File

@ -313,6 +313,10 @@ function config_update_config()
if (!config_update_value('auditdir', get_parameter('auditdir'))) { if (!config_update_value('auditdir', get_parameter('auditdir'))) {
$error_update[] = __('Audit log directory'); $error_update[] = __('Audit log directory');
} }
if (!config_update_value('unique_ip', get_parameter('unique_ip'))) {
$error_update[] = __('unique_ip');
}
break; break;
case 'enterprise': case 'enterprise':
@ -868,6 +872,10 @@ function config_update_config()
$error_update[] = __('Custom logo'); $error_update[] = __('Custom logo');
} }
if (!config_update_value('custom_logo_collapsed', (string) get_parameter('custom_logo_collapsed'))) {
$error_update[] = __('Custom logo collapsed');
}
if (!config_update_value('custom_logo_white_bg', (string) get_parameter('custom_logo_white_bg'))) { if (!config_update_value('custom_logo_white_bg', (string) get_parameter('custom_logo_white_bg'))) {
$error_update[] = __('Custom logo white background'); $error_update[] = __('Custom logo white background');
} }
@ -1036,10 +1044,6 @@ function config_update_config()
$error_update[] = __('Fixed header'); $error_update[] = __('Fixed header');
} }
if (!config_update_value('fixed_menu', get_parameter('fixed_menu'))) {
$error_update[] = __('Fixed menu');
}
if (!config_update_value('paginate_module', get_parameter('paginate_module'))) { if (!config_update_value('paginate_module', get_parameter('paginate_module'))) {
$error_update[] = __('Paginate module'); $error_update[] = __('Paginate module');
} }
@ -1120,10 +1124,6 @@ function config_update_config()
$error_update[] = __('Default height of the chart image'); $error_update[] = __('Default height of the chart image');
} }
if (!config_update_value('classic_menu', (bool) get_parameter('classic_menu', false))) {
$error_update[] = __('Classic menu mode');
}
// -------------------------------------------------- // --------------------------------------------------
// CUSTOM VALUES POST PROCESS // CUSTOM VALUES POST PROCESS
// -------------------------------------------------- // --------------------------------------------------
@ -1711,10 +1711,13 @@ function config_process_config()
config_update_value('limit_parameters_massive', (ini_get('max_input_vars') / 2)); config_update_value('limit_parameters_massive', (ini_get('max_input_vars') / 2));
} }
if (!isset($config['unique_ip'])) {
config_update_value('unique_ip', 0);
}
/* /*
* Parse the ACL IP list for access API * Parse the ACL IP list for access API
*/ */
$temp_list_ACL_IPs_for_API = []; $temp_list_ACL_IPs_for_API = [];
if (isset($config['list_ACL_IPs_for_API'])) { if (isset($config['list_ACL_IPs_for_API'])) {
if (!empty($config['list_ACL_IPs_for_API'])) { if (!empty($config['list_ACL_IPs_for_API'])) {
@ -1731,6 +1734,7 @@ function config_process_config()
// Not Managed here ! // Not Managed here !
// if (!isset ($config["autoupdate"])) { // if (!isset ($config["autoupdate"])) {
// config_update_value ('autoupdate', true);. // config_update_value ('autoupdate', true);.
// }
include_once $config['homedir'].'/include/auth/mysql.php'; include_once $config['homedir'].'/include/auth/mysql.php';
include_once $config['homedir'].'/include/functions_io.php'; include_once $config['homedir'].'/include/functions_io.php';
@ -1795,16 +1799,16 @@ function config_process_config()
config_update_value('fixed_graph', false); config_update_value('fixed_graph', false);
} }
if (!isset($config['fixed_menu'])) {
config_update_value('fixed_menu', false);
}
if (!isset($config['custom_favicon'])) { if (!isset($config['custom_favicon'])) {
config_update_value('custom_favicon', ''); config_update_value('custom_favicon', '');
} }
if (!isset($config['custom_logo'])) { if (!isset($config['custom_logo'])) {
config_update_value('custom_logo', 'pandora_logo_head_4.png'); config_update_value('custom_logo', 'pandora_logo_head_green.png');
}
if (!isset($config['custom_logo_collapsed'])) {
config_update_value('custom_logo_collapsed', 'pandora_logo_green_collapsed.png');
} }
if (!isset($config['custom_logo_white_bg'])) { if (!isset($config['custom_logo_white_bg'])) {
@ -2519,10 +2523,6 @@ function config_process_config()
} }
} }
if (!isset($config['classic_menu'])) {
config_update_value('classic_menu', 0);
}
if (!isset($config['csv_divider'])) { if (!isset($config['csv_divider'])) {
config_update_value('csv_divider', ';'); config_update_value('csv_divider', ';');
} }

View File

@ -2272,35 +2272,29 @@ function events_page_responses($event, $childrens_ids=[])
/** /**
* Replace macros in the target of a response and return it. * Replace macros in the target of a response and return it.
* If server_id > 0, is a metaconsole query. * If server_id > 0, it's a metaconsole query.
* *
* @param integer $event_id Event_id. * @param integer $event_id Event identifier.
* @param integer $response_id Response_id. * @param integer $response_id Event response identifier.
* @param integer $server_id Server_id. * @param integer $server_id Node identifier (for metaconsole).
* @param boolean $history History. * @param boolean $history Use the history database or not.
* *
* @return string Target. * @return string The response text with the macros applied.
*/ */
function events_get_response_target( function events_get_response_target(
$event_id, int $event_id,
$response_id, int $response_id,
$server_id, int $server_id=0,
$history=false bool $history=false
) { ) {
global $config; global $config;
$event_response = db_get_row('tevent_response', 'id', $response_id); // If server_id > 0, it's a metaconsole query.
$meta = $server_id > 0;
if ($server_id > 0) {
$meta = true;
} else {
$meta = false;
}
$event_table = events_get_events_table($meta, $history); $event_table = events_get_events_table($meta, $history);
$event = db_get_row($event_table, 'id_evento', $event_id); $event = db_get_row($event_table, 'id_evento', $event_id);
$event_response = db_get_row('tevent_response', 'id', $response_id);
$target = io_safe_output($event_response['target']); $target = io_safe_output($event_response['target']);
// Substitute each macro. // Substitute each macro.
@ -2317,7 +2311,7 @@ function events_get_response_target(
} }
$ip = db_get_value_filter('direccion', $agente_table_name, $filter); $ip = db_get_value_filter('direccion', $agente_table_name, $filter);
// If agent has not an ip, display N/A. // If agent has not an IP, display N/A.
if ($ip === false) { if ($ip === false) {
$ip = __('N/A'); $ip = __('N/A');
} }
@ -2499,6 +2493,11 @@ function events_get_response_target(
} }
} }
// This will replace the macro with the current logged user.
if (strpos($target, '_current_user_') !== false) {
$target = str_replace('_current_user_', $config['id_user'], $target);
}
return $target; return $target;
} }

View File

@ -342,11 +342,8 @@ function menu_print_menu(&$menu)
$sub_title = ''; $sub_title = '';
} }
// Added a top on inline styles
$top = menu_calculate_top($config['count_main_menu'], $count_sub, $count_sub2);
// Add submenu2 to submenu string // Add submenu2 to submenu string
$submenu_output .= '<ul style= top:'.$top."px; id='sub".str_replace(' ', '_', $sub['id'])."' class=submenu2>"; $submenu_output .= '<ul id="sub'.str_replace(' ', '_', $sub['id']).'" class="submenu2">';
$submenu_output .= $submenu2_list; $submenu_output .= $submenu2_list;
$submenu_output .= '</ul>'; $submenu_output .= '</ul>';
} }
@ -377,7 +374,7 @@ function menu_print_menu(&$menu)
$length = strlen(__($main['text'])); $length = strlen(__($main['text']));
$padding_top = ( $length >= 18) ? 6 : 12; $padding_top = ( $length >= 18) ? 6 : 12;
$output .= '<div id="title_menu" style="color:#FFF; padding-top:'.$padding_top.'px; display:none;">'.$main['text'].'</div>'; $output .= '<div id="title_menu" style="padding-top:'.$padding_top.'px; display:none;">'.$main['text'].'</div>';
// Add the notification ball if defined // Add the notification ball if defined
if (isset($main['notification'])) { if (isset($main['notification'])) {
$output .= '<div class="notification_ball">'.$main['notification'].'</div>'; $output .= '<div class="notification_ball">'.$main['notification'].'</div>';
@ -396,8 +393,7 @@ function menu_print_menu(&$menu)
$visible = false; $visible = false;
} }
$top = menu_calculate_top($config['count_main_menu'], $count_sub); $output .= '<ul id="subicon_'.$id.'" class="submenu'.($visible ? '' : ' invisible').'">';
$output .= '<ul id="subicon_'.$id.'" class="submenu'.($visible ? '' : ' invisible').'" style="top: '.$top.'px">';
$output .= $submenu_output; $output .= $submenu_output;
$output .= '</ul>'; $output .= '</ul>';
} }
@ -717,34 +713,3 @@ function menu_sec3_in_sec2($sec, $sec2, $sec3)
return false; return false;
} }
// Positionate the menu element. Added a negative top.
// 35px is the height of a menu item
function menu_calculate_top($level1, $level2, $level3=false)
{
$level2--;
if ($level3 !== false) {
// If level3 is set, the position is calculated like box is in the center.
// wiouth considering level2 box can be moved.
$level3--;
$total = ($level1 + $level3);
$comp = $level3;
} else {
$total = ($level1 + $level2);
$comp = $level2;
}
// Positionate in the middle
if ($total > 12 && (($total < 18) || (($level1 - $comp) <= 4))) {
return - ( floor($comp / 2) * 35);
}
// Positionate in the bottom
if ($total >= 18) {
return (- $comp * 35);
}
// return 0 by default
return 0;
}

View File

@ -534,9 +534,10 @@ function planned_downtimes_migrate_malformed_downtimes_copy_items($original_down
/** /**
* Stop a planned downtime. * Stop a planned downtime.
* *
* @param array Planned downtime data. * @param array $downtime Planned downtime data.
* *
* @return mixes False on error or an array with the result and a message of the operation. * @return mixed False on error or an array with the result and a message of
* the operation.
*/ */
function planned_downtimes_stop($downtime) function planned_downtimes_stop($downtime)
{ {
@ -566,6 +567,8 @@ function planned_downtimes_stop($downtime)
case 'periodically': case 'periodically':
return false; return false;
default:
// Nothing to do.
break; break;
} }
@ -593,7 +596,7 @@ function planned_downtimes_stop($downtime)
true true
); );
// Reenabled the Agents or Modules or alerts...depends of type // Reenabled the Agents or Modules or alerts...depends of type.
switch ($downtime['type_downtime']) { switch ($downtime['type_downtime']) {
case 'quiet': case 'quiet':
$agents = db_get_all_rows_filter( $agents = db_get_all_rows_filter(
@ -658,7 +661,10 @@ function planned_downtimes_stop($downtime)
foreach ($agents as $agent) { foreach ($agents as $agent) {
$result = db_process_sql_update( $result = db_process_sql_update(
'tagente', 'tagente',
['disabled' => 0], [
'disabled' => 0,
'update_module_count' => 1,
],
['id_agente' => $agent['id_agent']] ['id_agente' => $agent['id_agent']]
); );
@ -702,6 +708,10 @@ function planned_downtimes_stop($downtime)
} }
} }
break; break;
default:
// Nothing to do.
break;
} }
$message .= ui_print_info_message( $message .= ui_print_info_message(

View File

@ -748,7 +748,7 @@ function flot_slicesbar_graph(
if ($widgets) { if ($widgets) {
$return = "<div id='$graph_id' class='noresizevc graph $adapt_key' style='width: ".$width.'px; height: '.$height."px;'></div>"; $return = "<div id='$graph_id' class='noresizevc graph $adapt_key' style='width: ".$width.'px; height: '.$height."px;'></div>";
} else { } else {
$return = "<div id='$graph_id' class='noresizevc graph $adapt_key' style='width: ".$width.'%; height: '.$height."px;'></div>"; $return = "<div id='$graph_id' class='noresizevc graph $adapt_key' style='width: ".$width.'px; height: '.$height."px;'></div>";
} }
} }

View File

@ -5,7 +5,8 @@
?> ?>
<h1>Custom logo (Branding)</h1> <h1>Custom logo (Branding)</h1>
This option is used to display your own logo in the <?php echo get_product_name(); ?> header. You can use any kind of graphic in PNG format. There is a fixed width/height for any image displayed here of 206x47 pixels. This option allows uploading your own logo, which will be visible in the <?php echo get_product_name(); ?> menu. This logo will be visible when the menu is expanded.
<br><br> <br><br>
Upload your custom branding logo, using the file manager to /images/custom_logo directory. The image must have PNG format and a size of 215x60 pixels.
<br><br>
You must upload your logo to the /images/custom_logo directory.

View File

@ -0,0 +1,12 @@
<?php
/**
* @package Include/help/en
*/
?>
<h1>Custom logo (Branding)</h1>
This option allows uploading your own logo, which will be visible in the <?php echo get_product_name(); ?> menu. This logo will be visible when the menu is collapsed.
<br><br>
The image must have PNG format and a size of 60x60 pixels.
<br><br>
You must upload your logo to the /images/custom_logo directory.

View File

@ -1,15 +1,12 @@
<?php <?php
/** /**
* @package Include/help/en * @package Include/help/es
*/ */
?> ?>
<h1> Logo de Cliente (Marca comunitaria de empresa)</h1> <h1> Logo (Marca de empresa)</h1>
Esta opción se utiliza para poder desplegar su propio logo en la cabecera de <?php echo get_product_name(); ?>. Puede utilizar cualquier tipo de gráfica en formato PNG. Hay una ancho/alto para cualquier imagen desplegada aquí de 206x47 píxeles.
Esta opción sirve para poder subir su propio logo, que estará visible en el menú de <?php echo get_product_name(); ?>. Este logo será visible cuando el menú esté desplegado.
<br><br> <br><br>
La imagen debe tener el formato PNG y un tamaño de 215x60 pixeles.
Suba su logo de marca de empresa utilizando el directorio /images/custom_logo directory. <br><br>
Debe subir su logo al directorio /images/custom_logo.

View File

@ -0,0 +1,12 @@
<?php
/**
* @package Include/help/es
*/
?>
<h1> Logo (Marca de empresa)</h1>
Esta opción sirve para poder subir su propio logo, que estará visible en el menú de <?php echo get_product_name(); ?>. Este logo será visible cuando el menú esté plegado.
<br><br>
La imagen debe tener el formato PNG y un tamaño de 60x60 pixeles.
<br><br>
Debe subir su logo al directorio /images/custom_logo.

View File

@ -5,8 +5,8 @@
?> ?>
<h1>カスタムロゴ</h1> <h1>カスタムロゴ</h1>
ここに指定した画像ファイルを、オリジナルロゴとして <?php echo get_product_name(); ?> のヘッダーに表示することができます。 This option allows uploading your own logo, which will be visible in the <?php echo get_product_name(); ?> menu. This logo will be visible when the menu is expanded.
表示可能な画像ファイルは PNG 形式です。
画像サイズは、206x47ピクセルに修正されます。
<br><br> <br><br>
カスタムロゴは、ファイルマネージャを使って /images/custom_logo ディレクトリへアップロードしてください。 The image must have PNG format and a size of 215x60 pixels.
<br><br>
You must upload your logo to the /images/custom_logo directory.

View File

@ -0,0 +1,13 @@
<?php
/**
* @package Include/help/ja
*/
?>
<h1>カスタムロゴ</h1>
This option allows uploading your own logo, which will be visible in the <?php echo get_product_name(); ?> menu. This logo will be visible when the menu is collapsed.
<br><br>
The image must have PNG format and a size of 60x60 pixels.
<br><br>
You must upload your logo to the /images/custom_logo directory.

View File

@ -241,6 +241,7 @@ function show_massive_response_dialog(
}, },
close: function(event, ui) { close: function(event, ui) {
$(".chk_val").prop("checked", false); $(".chk_val").prop("checked", false);
$("#event_response_command_window").dialog("close");
}, },
width: response["modal_width"], width: response["modal_width"],
height: response["modal_height"] height: response["modal_height"]
@ -375,7 +376,12 @@ function add_row_param(id_table, param) {
} }
// Get an event response from db // Get an event response from db
function get_response_target(event_id, response_id, server_id) { function get_response_target(
event_id,
response_id,
server_id,
response_command
) {
var ajax_file = $("#hidden-ajax_file").val(); var ajax_file = $("#hidden-ajax_file").val();
var target = ""; var target = "";
@ -400,15 +406,21 @@ function get_response_target(event_id, response_id, server_id) {
} }
}); });
// Replace the custom params macros // Replace the custom params macros.
var response_params = get_response_params(response_id); var response_params = get_response_params(response_id);
if (response_params.length > 1 || response_params[0] != "") { if (response_params.length > 1 || response_params[0] != "") {
for (i = 0; i < response_params.length; i++) { for (i = 0; i < response_params.length; i++) {
if (!response_command) {
target = target.replace( target = target.replace(
"_" + response_params[i] + "_", "_" + response_params[i] + "_",
$("#" + response_params[i]).val() $("#" + response_params[i]).val()
); );
} else {
target = target.replace(
"_" + response_params[i] + "_",
response_command[response_params[i] + "-" + i]
);
}
} }
} }
@ -459,10 +471,6 @@ function perform_response_massive(target, response_id, out_iterator) {
$("#response_loading_command_" + out_iterator).show(); $("#response_loading_command_" + out_iterator).show();
$("#response_out_" + out_iterator).html(""); $("#response_out_" + out_iterator).html("");
var finished = 0;
var time = Math.round(+new Date() / 1000);
var timeout = time + 10;
var params = []; var params = [];
params.push("page=include/ajax/events"); params.push("page=include/ajax/events");
params.push("perform_event_response=1"); params.push("perform_event_response=1");
@ -487,7 +495,7 @@ function perform_response_massive(target, response_id, out_iterator) {
return false; return false;
} }
// Change the status of an event to new, in process or validated // Change the status of an event to new, in process or validated.
function event_change_status(event_ids) { function event_change_status(event_ids) {
var ajax_file = $("#hidden-ajax_file").val(); var ajax_file = $("#hidden-ajax_file").val();
@ -681,3 +689,53 @@ function show_events_group_agent(id_insert, id_agent, server_id) {
} }
}); });
} }
function show_event_response_command_dialog(id, response, total_checked) {
var ajax_file = $("#hidden-ajax_file").val();
var params = [];
params.push("page=include/ajax/events");
params.push("get_table_response_command=1");
params.push("event_response_id=" + id);
jQuery.ajax({
data: params.join("&"),
type: "POST",
url: (action = ajax_file),
dataType: "html",
success: function(data) {
$("#event_response_command_window")
.hide()
.empty()
.append(data)
.dialog({
resizable: true,
draggable: true,
modal: false,
open: function() {
$("#response_loading_dialog").hide();
$("#button-submit_event_response").show();
},
width: 600,
height: 300
})
.show();
$("#submit-enter_command").on("click", function(e) {
e.preventDefault();
var response_command = [];
$(".response_command_input").each(function() {
response_command[$(this).attr("name")] = $(this).val();
});
check_massive_response_event(
id,
response,
total_checked,
response_command
);
});
}
});
}

View File

@ -16,11 +16,25 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
.menu { .operation li,
border-width: 0px 0px 0px 0px; .godmode li {
border-style: none; display: flex !important;
border-color: #777; justify-content: flex-start;
align-items: center;
} }
.operation > li.menu_icon.no_hidden_menu,
.godmode > li.menu_icon.no_hidden_menu {
justify-content: flex-end;
}
.operation .menu_icon ul.submenu > li,
.godmode .menu_icon ul.submenu > li {
background-color: #282828;
padding-left: 10px;
padding-right: 10px;
}
.menu ul { .menu ul {
list-style-type: none; list-style-type: none;
padding: 0; padding: 0;
@ -28,14 +42,13 @@
} }
.menu li.selected, .menu li.selected,
.menu li.not_selected { .menu li.not_selected {
border: 0px none black;
border-bottom: 0px none #d4d4d4;
margin: 0; margin: 0;
} }
.menu li a { .menu li a {
color: #ffffff; color: #ffffff;
text-decoration: none; text-decoration: none;
width: 100%;
} }
li:hover ul { li:hover ul {
@ -43,14 +56,11 @@ li:hover ul {
} }
.submenu_text { .submenu_text {
padding: 10.5px;
margin-left: 0px; margin-left: 0px;
width: 100%; width: 100%;
color: #fff; color: #9ca4a6;
} font-family: "Open Sans", sans-serif;
font-size: 9.4pt;
.menu li.subselected a {
background-color: grey !important;
} }
.menu a:hover { .menu a:hover {
@ -61,26 +71,25 @@ li:hover ul {
margin: 0px 0px 0px 0px; margin: 0px 0px 0px 0px;
position: absolute; position: absolute;
z-index: 999; z-index: 999;
left: 44px; width: 214px;
min-height: 35px;
height: 35px;
width: 180px;
} }
.submenu2 { .submenu2 {
position: absolute; position: absolute;
z-index: 999; z-index: 999;
left: 180px; left: 214px;
width: 214px;
} }
.sub_subMenu { .sub_subMenu {
min-height: 35px !important;
height: 35px;
width: 180px;
font-weight: normal !important; font-weight: normal !important;
background-color: #202020;
padding-left: 10px;
padding-right: 10px;
} }
.sub_subMenu.selected { .sub_subMenu.selected {
font-weight: bold !important; font-weight: 600 !important;
} }
.submenu2 li a { .submenu2 li a {
@ -95,18 +104,10 @@ li:hover ul {
border-left: 1px; border-left: 1px;
} }
.menu li.has_submenu > a > div { .menu li.has_submenu {
background: url(../../images/arrow.png) no-repeat 80% 50%; background: url(../../images/arrow.png) no-repeat 95% 50%;
z-index: 1; /* Positions it on top of the rest */ z-index: 1; /* Positions it on top of the rest */
} }
.menu li.has_submenu > .SubNoLink {
background: url(../../images/arrow.png) no-repeat 80% 50%;
z-index: 1; /* Positions it on top of the rest */
}
.is_submenu2 {
background-color: #e4e4e4 !important;
}
.menu li.submenu_not_selected a, .menu li.submenu_not_selected a,
.menu li.submenu2_not_selected a { .menu li.submenu2_not_selected a {
@ -117,6 +118,18 @@ li:hover ul {
margin-bottom: 0px !important; margin-bottom: 0px !important;
box-shadow: inset 4px 0 #80ba27 !important; box-shadow: inset 4px 0 #80ba27 !important;
} }
.selected.submenu_selected {
background-color: #202020 !important;
}
li.submenu_selected.selected {
background-color: #202020 !important;
font-weight: 600;
}
li.sub_subMenu.selected {
background-color: #161616 !important;
}
.menu .menu_icon, .menu .menu_icon,
.menu li.links { .menu li.links {
@ -132,21 +145,18 @@ li:hover ul {
/* Icons specified here */ /* Icons specified here */
#icon_oper-networkconsole { #icon_oper-networkconsole {
background: url(../../images/op_network.menu.png) no-repeat 50% 50%; background: url(../../images/op_network.menu_gray.png) no-repeat;
} }
#icon_oper-agents { #icon_oper-agents {
border-top-right-radius: 5px; background: url(../../images/op_monitoring.menu_gray.png) no-repeat;
border-right-style: solid;
border-right-width: 0px;
background: url(../../images/op_monitoring.menu.png) no-repeat 50% 50%;
} }
#icon_oper-events { #icon_oper-events {
background: url(../../images/op_events.menu.png) no-repeat 50% 50%; background: url(../../images/op_events.menu_gray.png) no-repeat;
} }
/* users */ /* users */
#icon_oper-users { #icon_oper-users {
background: url(../../images/op_workspace.menu.png) no-repeat 50% 50%; background: url(../../images/op_workspace.menu_gray.png) no-repeat;
} }
/* trap console */ /* trap console */
#icon_oper-snmpc, #icon_oper-snmpc,
@ -154,7 +164,7 @@ li:hover ul {
background: url(../../images/op_snmp.menu.png) no-repeat 50% 50%; background: url(../../images/op_snmp.menu.png) no-repeat 50% 50%;
} }
#icon_oper-reporting { #icon_oper-reporting {
background: url(../../images/op_reporting.menu.png) no-repeat 50% 50%; background: url(../../images/op_reporting.menu_gray.png) no-repeat;
} }
#icon_oper-gismaps { #icon_oper-gismaps {
background: url(../../images/op_gis.menu.png) no-repeat 50% 50%; background: url(../../images/op_gis.menu.png) no-repeat 50% 50%;
@ -163,55 +173,51 @@ li:hover ul {
background: url(../../images/op_netflow.menu.png) no-repeat 50% 50%; background: url(../../images/op_netflow.menu.png) no-repeat 50% 50%;
} }
#icon_oper-extensions { #icon_oper-extensions {
background: url(../../images/extensions.menu.png) no-repeat 50% 50%; background: url(../../images/extensions.menu_gray.png) no-repeat;
} }
/* Godmode images */ /* Godmode images */
#icon_god-discovery { #icon_god-discovery {
background: url(../../images/gm_discovery.menu.png) no-repeat 50% 50%; background: url(../../images/gm_discovery.menu.png) no-repeat;
} }
#icon_god-resources { #icon_god-resources {
background: url(../../images/gm_resources.menu.png) no-repeat 50% 50%; background: url(../../images/gm_resources.menu_gray.png) no-repeat;
} }
#icon_god-configuration { #icon_god-configuration {
background: url(../../images/gm_configuration.menu.png) no-repeat 50% 50%; background: url(../../images/gm_configuration.menu_gray.png) no-repeat;
} }
#icon_god-alerts { #icon_god-alerts {
background: url(../../images/gm_alerts.menu.png) no-repeat 50% 50%; background: url(../../images/gm_alerts.menu_gray.png) no-repeat;
} }
#icon_god-users { #icon_god-users {
background: url(../../images/gm_users.menu.png) no-repeat 50% 50%; background: url(../../images/gm_users.menu_gray.png) no-repeat;
} }
#icon_god-reporting { #icon_god-reporting {
background: url(../../images/reporting_edit.menu.png) no-repeat 50% 50%; background: url(../../images/reporting_edit.menu.png) no-repeat 50% 50%;
} }
#icon_god-servers { #icon_god-servers {
background: url(../../images/gm_servers.menu.png) no-repeat 50% 50%; background: url(../../images/gm_servers.menu_gray.png) no-repeat;
} }
#icon_god-setup { #icon_god-setup {
background: url(../../images/gm_setup.menu.png) no-repeat 50% 50%; background: url(../../images/gm_setup.menu_gray.png) no-repeat;
} }
#icon_god-events { #icon_god-events {
background: url(../../images/gm_events.menu.png) no-repeat 50% 50%; background: url(../../images/gm_events.menu_gray.png) no-repeat;
} }
#icon_god-extensions { #icon_god-extensions {
background: url(../../images/builder.menu.png) no-repeat 50% 50%; background: url(../../images/builder.menu_gray.png) no-repeat;
} }
#icon_god-links { #icon_god-links {
border-top: 4px solid #777 !important; background: url(../../images/links.menu_gray.png) no-repeat;
border-color: #777;
background: url(../../images/links.menu.png) no-repeat 50% 50%;
} }
#icon_god-um_messages { #icon_god-um_messages {
border-color: #777; background: url(../../images/um_messages.menu_gray.png) no-repeat;
background: url(../../images/um_messages.menu.png) no-repeat 50% 50%;
} }
#menu_container { #menu_container {
z-index: 3; z-index: 3;
position: absolute; position: absolute;
left: -80px; left: -80px;
background-color: #aaa;
} }
.notification_ball { .notification_ball {
@ -266,130 +272,217 @@ ul li a:hover {
* - MAIN LEFT MENU and SUBMENU - * - MAIN LEFT MENU and SUBMENU -
* --------------------------------------------------------------------- * ---------------------------------------------------------------------
*/ */
.menu li.selected {
font-weight: bold;
}
.menu_icon {
transition-property: background-color;
transition-duration: 0.5s;
transition-timing-function: ease-out;
-webkit-transition-property: background-color;
-webkit-transition-duration: 0.5s;
-webkit-transition-timing-function: ease-out;
-moz-transition-property: background-color;
-moz-transition-duration: 0.5s;
-moz-transition-timing-function: ease-out;
-o-transition-property: background-color;
-o-transition-duration: 0.5s;
-o-transition-timing-function: ease-out;
}
.menu_icon:hover { .menu_icon:hover {
transition-property: background-color; background-color: #282828 !important;
transition-duration: 0.5s;
transition-timing-function: ease-out;
-webkit-transition-property: background-color;
-webkit-transition-duration: 0.5s;
-webkit-transition-timing-function: ease-out;
-moz-transition-property: background-color;
-moz-transition-duration: 0.5s;
-moz-transition-timing-function: ease-out;
-o-transition-property: background-color;
-o-transition-duration: 0.5s;
-o-transition-timing-function: ease-out;
background-color: #585858 !important;
} }
.submenu_not_selected:hover { .submenu_not_selected:hover {
transition-property: background-color; background-color: #202020 !important;
transition-duration: 0.5s;
transition-timing-function: ease-out;
-webkit-transition-property: background-color;
-webkit-transition-duration: 0.5s;
-webkit-transition-timing-function: ease-out;
-moz-transition-property: background-color;
-moz-transition-duration: 0.5s;
-moz-transition-timing-function: ease-out;
-o-transition-property: background-color;
-o-transition-duration: 0.5s;
-o-transition-timing-function: ease-out;
background-color: #585858 !important;
} }
.submenu_selected:hover { .submenu_selected:hover {
background-color: #585858 !important; background-color: #202020 !important;
}
.sub_subMenu {
transition-property: background-color;
transition-duration: 0.5s;
transition-timing-function: ease-out;
-webkit-transition-property: background-color;
-webkit-transition-duration: 0.5s;
-webkit-transition-timing-function: ease-out;
-moz-transition-property: background-color;
-moz-transition-duration: 0.5s;
-moz-transition-timing-function: ease-out;
-o-transition-property: background-color;
-o-transition-duration: 0.5s;
} }
.sub_subMenu:hover { .sub_subMenu:hover {
transition-property: background-color; background-color: #161616 !important;
transition-duration: 0.5s;
transition-timing-function: ease-out;
-webkit-transition-property: background-color;
-webkit-transition-duration: 0.5s;
-webkit-transition-timing-function: ease-out;
-moz-transition-property: background-color;
-moz-transition-duration: 0.5s;
-moz-transition-timing-function: ease-out;
-o-transition-property: background-color;
-o-transition-duration: 0.5s;
background-color: #585858 !important;
} }
.menu li.selected { .menu li.selected {
box-shadow: inset 4px 0 #80ba27; box-shadow: inset 4px 0 #80ba27;
} }
/* creo que no se usan
.is_submenu2 li {
background-color: #ff0000;
}
.is_submenu2 {
background-color: #222222 !important;
}
*/
.operation { .operation {
background-color: #333 !important; background-color: #343434 !important;
border-top-right-radius: 5px; padding-top: 20px !important;
border-right-style: solid;
border-right-width: 0px;
} }
.operation .selected { .operation .selected,
background-color: #585858 !important; .godmode .selected {
background-color: #282828 !important;
}
.operation .selected #title_menu,
.godmode .selected #title_menu {
color: #fff !important;
font-weight: 600;
} }
.menu li, .menu li,
.menu .li.not_selected { .menu li a,
border-radius: 0px 0px 0px 0px; .menu li div {
display: block;
min-height: 35px; min-height: 35px;
border-bottom: 0px none #424242; display: flex;
vertical-align: middle; align-items: center;
} }
.godmode, .menu li div {
.menu_icon ul li { background-clip: text; /* Very important to fix a bug in Firefox */
background-color: #222;
}
.operation .menu_icon ul li {
background-color: #333;
} }
.godmode { .godmode {
border-top: 4px solid #777 !important;
padding-bottom: 4px !important; padding-bottom: 4px !important;
border-bottom-right-radius: 5px; background-color: #343434;
border-right-style: solid; }
border-right-width: 0px;
/* Menu icons active */
.selected#icon_oper-networkconsole {
background: url(../../images/op_network.menu_white.png) no-repeat;
}
.selected#icon_oper-agents {
background: url(../../images/op_monitoring.menu_white.png) no-repeat;
}
.selected#icon_oper-events {
background: url(../../images/op_events.menu_white.png) no-repeat;
}
.selected#icon_oper-users {
background: url(../../images/op_workspace.menu_white.png) no-repeat;
}
.selected#icon_oper-reporting {
background: url(../../images/op_reporting.menu_white.png) no-repeat;
}
.selected#icon_oper-extensions {
background: url(../../images/extensions.menu_white.png) no-repeat;
}
.selected#icon_god-discovery {
background: url(../../images/gm_discovery.menu_white.png) no-repeat;
}
.selected#icon_god-resources {
background: url(../../images/gm_resources.menu_white.png) no-repeat;
}
.selected#icon_god-configuration {
background: url(../../images/gm_configuration.menu_white.png) no-repeat;
}
.selected#icon_god-alerts {
background: url(../../images/gm_alerts.menu_white.png) no-repeat;
}
.selected#icon_god-users {
background: url(../../images/gm_users.menu_white.png) no-repeat;
}
.selected#icon_god-servers {
background: url(../../images/gm_servers.menu_white.png) no-repeat;
}
.selected#icon_god-setup {
background: url(../../images/gm_setup.menu_white.png) no-repeat;
}
.selected#icon_god-events {
background: url(../../images/gm_events.menu_white.png) no-repeat;
}
.selected#icon_god-extensions {
background: url(../../images/builder.menu_white.png) no-repeat;
}
.selected#icon_god-links {
background: url(../../images/links.menu_white.png) no-repeat;
}
.selected#icon_god-um_messages {
background: url(../../images/um_messages.menu_white.png) no-repeat;
}
#menu_full {
width: 60px; /* This is overwritten by the classic menu (215px) */
position: fixed;
z-index: 1;
top: 0;
left: 0;
background-color: #343434;
border-bottom: solid 3px #343434;
min-height: 943px;
}
.button_collapse {
height: 38px;
background-color: #6c6c6d;
width: 60px; /* This is overwritten by the classic menu (215px) */
text-align: center;
color: #fff;
cursor: pointer;
background-repeat: no-repeat;
background-position: center;
margin-top: 15px;
}
.logo_green {
height: 60px;
display: flex;
justify-content: center;
align-items: center;
}
.operation div,
.operation a,
.godmode div,
.godmode a {
font-family: "Open Sans", sans-serif;
}
.menu_full_classic,
.button_classic {
width: 215px !important;
}
.menu_full_collapsed,
.button_collapsed {
width: 60px !important;
}
.button_classic {
width: 215px !important;
background-image: url(../../images/button_collapse_menu.png);
background-repeat: no-repeat;
background-position: center;
}
.button_collapsed {
background-image: url(../../images/button_classic_menu.png);
background-repeat: no-repeat;
background-position: center;
}
/* Menu height: 601px, 720px, 735px */
@media screen and (max-height: 720px) {
.menu li,
.menu li a,
.menu li div {
min-height: 28px !important;
}
}
@media screen and (max-height: 735px) {
.operation {
padding-top: 10px !important;
}
.button_collapse {
margin-top: 10px;
}
}
/*
* ---------------------------------------------------------------------
* - STYLES TO CHANGE CLASSIC MENU AND COLLAPSED MENU -
* ---------------------------------------------------------------------
*/
.page_classic {
padding-left: 215px !important;
}
.page_collapsed {
padding-left: 60px !important;
}
.header_table_classic {
padding-left: 250px !important; /* 215 + 35 */
}
.header_table_collapsed {
padding-left: 95px !important; /* 60 + 35 */
}
.title_menu_classic {
display: flex !important;
}
.title_menu_collapsed {
display: none !important;
}
.menu_icon_collapsed {
background-position: 50% 50% !important;
} }

Some files were not shown because too many files have changed in this diff Show More