Merge branch 'develop' into ent-3409-pandora-network-traffic-analyzer-ntop-fork-fase-1
Former-commit-id: 65d43e483dc23616c44da3b26b73c94cbf10d3fe
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-agent-unix
|
||||
Version: 7.0NG.732-190228
|
||||
Version: 7.0NG.732-190308
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# 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."
|
||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||
|
|
|
@ -42,7 +42,7 @@ my $Sem = undef;
|
|||
my $ThreadSem = undef;
|
||||
|
||||
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
|
||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 7.0NG.732
|
||||
%define release 190228
|
||||
%define release 190308
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 7.0NG.732
|
||||
%define release 190228
|
||||
%define release 190308
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.732"
|
||||
PI_BUILD="190228"
|
||||
PI_BUILD="190308"
|
||||
OS_NAME=`uname -s`
|
||||
|
||||
FORCE=0
|
||||
|
|
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||
{}
|
||||
|
||||
Version
|
||||
{190228}
|
||||
{190308}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
|
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||
using namespace Pandora_Strutils;
|
||||
|
||||
#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_dir;
|
||||
|
|
|
@ -11,7 +11,7 @@ BEGIN
|
|||
VALUE "LegalCopyright", "Artica ST"
|
||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||
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"
|
||||
END
|
||||
END
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-console
|
||||
Version: 7.0NG.732-190228
|
||||
Version: 7.0NG.732-190308
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.732-190228"
|
||||
pandora_version="7.0NG.732-190308"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -1900,14 +1900,16 @@ CREATE TABLE IF NOT EXISTS `tevent_extended` (
|
|||
-- -----------------------------------------------------
|
||||
-- Table `tgis_map_layer_groups`
|
||||
-- -----------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tgis_map_layer_groups` (
|
||||
`layer_id` INT 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',
|
||||
PRIMARY KEY (`layer_id`, `group_id`),
|
||||
FOREIGN KEY (`layer_id`) REFERENCES `tgis_map_layer` (`id_tmap_layer`) ON DELETE CASCADE,
|
||||
FOREIGN KEY (`group_id`) REFERENCES `tgrupo` (`id_grupo`) ON DELETE CASCADE,
|
||||
FOREIGN KEY (`agent_id`) REFERENCES `tagente` (`id_agente`) ON DELETE CASCADE
|
||||
CREATE TABLE `tgis_map_layer_groups` (
|
||||
`layer_id` int(11) 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',
|
||||
PRIMARY KEY (`layer_id`,`group_id`),
|
||||
KEY `group_id` (`group_id`),
|
||||
KEY `agent_id` (`agent_id`),
|
||||
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;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
|
|
|
@ -1,16 +1,19 @@
|
|||
<?php
|
||||
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
// Please see http://pandorafms.org for full contribution list
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; version 2
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
/**
|
||||
* Pandora FMS - http://pandorafms.com
|
||||
* ==================================================
|
||||
* Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
* Please see http://pandorafms.org for full contribution list
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; version 2
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
if (isset($_SERVER['REQUEST_TIME'])) {
|
||||
$time = $_SERVER['REQUEST_TIME'];
|
||||
} else {
|
||||
|
@ -26,7 +29,7 @@ if (!$config['MR']) {
|
|||
$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';
|
||||
|
||||
|
@ -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 '</a><br />';
|
||||
echo '<a class="white footer">'.__('Page generated at').' '.date($config['date_format']);
|
||||
echo '</a><br /><span style="color:#eff">® '.get_copyright_notice().'</span>';
|
||||
echo '</a> ';
|
||||
echo '<a class="footer">'.__('Page generated at').' '.date($config['date_format']);
|
||||
echo '</a><br /><span>® '.get_copyright_notice().'</span>';
|
||||
|
||||
if (isset($config['debug'])) {
|
||||
$cache_info = [];
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
// 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
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
|
@ -16,286 +16,226 @@ require_once 'include/functions_notifications.php';
|
|||
|
||||
// Check permissions
|
||||
// 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')) {
|
||||
$logo_title = get_product_name().' Opensource';
|
||||
$custom_logo = 'images/custom_logo/pandora_logo_head_3.png';
|
||||
<div id="header_table">
|
||||
<div id="header_table_inner">
|
||||
<?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 {
|
||||
if (file_exists(ENTERPRISE_DIR.'/'.$custom_logo)) {
|
||||
$custom_logo = ENTERPRISE_DIR.'/'.$custom_logo;
|
||||
}
|
||||
|
||||
$logo_title = get_product_name().' Enterprise';
|
||||
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');
|
||||
}
|
||||
|
||||
echo html_print_image(
|
||||
$custom_logo,
|
||||
true,
|
||||
[
|
||||
'alt' => $logo_title,
|
||||
'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] = '';
|
||||
|
||||
$acl_head_search = true;
|
||||
if ($config['acl_enterprise'] == 1 && !users_is_admin()) {
|
||||
$acl_head_search = db_get_sql(
|
||||
"SELECT sec FROM tusuario
|
||||
INNER JOIN tusuario_perfil ON tusuario.id_user = tusuario_perfil.id_usuario
|
||||
INNER JOIN tprofile_view ON tprofile_view.id_profile = tusuario_perfil.id_perfil
|
||||
WHERE tusuario.id_user = '".$config['id_user']."' AND (sec = '*' OR sec = '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 = '<form method="get" style="display: inline;" name="quicksearch" action="">';
|
||||
if (!isset($config['search_keywords'])) {
|
||||
// Chat messages
|
||||
$header_chat = "<div id='header_chat'><span id='icon_new_messages_chat' style='display: none;'>";
|
||||
$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')]);
|
||||
$header_chat .= '</a></span></div>';
|
||||
|
||||
|
||||
// Search
|
||||
$acl_head_search = true;
|
||||
if ($config['acl_enterprise'] == 1 && !users_is_admin()) {
|
||||
$acl_head_search = db_get_sql(
|
||||
"SELECT sec FROM tusuario
|
||||
INNER JOIN tusuario_perfil ON tusuario.id_user = tusuario_perfil.id_usuario
|
||||
INNER JOIN tprofile_view ON tprofile_view.id_profile = tusuario_perfil.id_perfil
|
||||
WHERE tusuario.id_user = '".$config['id_user']."' AND (sec = '*' OR sec = 'head_search')"
|
||||
);
|
||||
}
|
||||
|
||||
if ($acl_head_search) {
|
||||
// Search bar
|
||||
$search_bar = '<form method="get" style="display: inline;" name="quicksearch" action="">';
|
||||
if (!isset($config['search_keywords'])) {
|
||||
$search_bar .= '<script type="text/javascript"> var fieldKeyWordEmpty = true; </script>';
|
||||
} else {
|
||||
if (strlen($config['search_keywords']) == 0) {
|
||||
$search_bar .= '<script type="text/javascript"> var fieldKeyWordEmpty = true; </script>';
|
||||
} else {
|
||||
if (strlen($config['search_keywords']) == 0) {
|
||||
$search_bar .= '<script type="text/javascript"> var fieldKeyWordEmpty = true; </script>';
|
||||
} else {
|
||||
$search_bar .= '<script type="text/javascript"> var fieldKeyWordEmpty = false; </script>';
|
||||
}
|
||||
$search_bar .= '<script type="text/javascript"> var fieldKeyWordEmpty = false; </script>';
|
||||
}
|
||||
|
||||
$search_bar .= '<input type="text" id="keywords" name="keywords"';
|
||||
if (!isset($config['search_keywords'])) {
|
||||
$search_bar .= "value='".__('Enter keywords to search')."'";
|
||||
} else if (strlen($config['search_keywords']) == 0) {
|
||||
$search_bar .= "value='".__('Enter keywords to search')."'";
|
||||
} else {
|
||||
$search_bar .= "value='".$config['search_keywords']."'";
|
||||
}
|
||||
|
||||
$search_bar .= 'onfocus="javascript: if (fieldKeyWordEmpty) $(\'#keywords\').val(\'\');"
|
||||
onkeyup="javascript: fieldKeyWordEmpty = false;"
|
||||
style="margin-top:5px;" class="search_input" />';
|
||||
|
||||
// $search_bar .= 'onClick="javascript: document.quicksearch.submit()"';
|
||||
$search_bar .= "<input type='hidden' name='head_search_keywords' value='abc' />";
|
||||
$search_bar .= '</form>';
|
||||
|
||||
$table->data[0]['searchbar'] = $search_bar;
|
||||
}
|
||||
|
||||
if ($config['show_qr_code_header'] == 0) {
|
||||
$show_qr_code_header = 'display: none;';
|
||||
$search_bar .= '<input type="text" id="keywords" name="keywords"';
|
||||
if (!isset($config['search_keywords'])) {
|
||||
$search_bar .= "value='".__('Enter keywords to search')."'";
|
||||
} else if (strlen($config['search_keywords']) == 0) {
|
||||
$search_bar .= "value='".__('Enter keywords to search')."'";
|
||||
} else {
|
||||
$show_qr_code_header = 'display: inline;';
|
||||
$search_bar .= "value='".$config['search_keywords']."'";
|
||||
}
|
||||
|
||||
$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>';
|
||||
$search_bar .= 'onfocus="javascript: if (fieldKeyWordEmpty) $(\'#keywords\').val(\'\');"
|
||||
onkeyup="javascript: fieldKeyWordEmpty = false;"
|
||||
style="margin-top:5px;" class="search_input" />';
|
||||
|
||||
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>';
|
||||
// $search_bar .= 'onClick="javascript: document.quicksearch.submit()"';
|
||||
$search_bar .= "<input type='hidden' name='head_search_keywords' value='abc' />";
|
||||
$search_bar .= '</form>';
|
||||
|
||||
$header_searchbar = '<div id="header_searchbar">'.ui_print_help_tip(__('Blank characters are used as AND conditions'), true);
|
||||
$header_searchbar .= $search_bar.'</div>';
|
||||
}
|
||||
|
||||
|
||||
// ======= Autorefresh code =============================
|
||||
$autorefresh_txt = '';
|
||||
$autorefresh_additional = '';
|
||||
|
||||
$ignored_params = [
|
||||
'agent_config' => false,
|
||||
'code' => false,
|
||||
];
|
||||
|
||||
if (!isset($_GET['sec2'])) {
|
||||
$_GET['sec2'] = '';
|
||||
}
|
||||
|
||||
if (!isset($_GET['refr'])) {
|
||||
$_GET['refr'] = null;
|
||||
}
|
||||
|
||||
$select = db_process_sql("SELECT autorefresh_white_list,time_autorefresh FROM tusuario WHERE id_user = '".$config['id_user']."'");
|
||||
$autorefresh_list = json_decode($select[0]['autorefresh_white_list']);
|
||||
|
||||
if ($autorefresh_list !== null && array_search($_GET['sec2'], $autorefresh_list) !== false) {
|
||||
$do_refresh = true;
|
||||
if ($_GET['sec2'] == 'operation/agentes/pandora_networkmap') {
|
||||
if ((!isset($_GET['tab'])) || ($_GET['tab'] != 'view')) {
|
||||
$do_refresh = false;
|
||||
}
|
||||
|
||||
// ======= Autorefresh code =============================
|
||||
$autorefresh_txt = '';
|
||||
$autorefresh_additional = '';
|
||||
|
||||
$ignored_params = [
|
||||
'agent_config' => false,
|
||||
'code' => false,
|
||||
];
|
||||
|
||||
if (!isset($_GET['sec2'])) {
|
||||
$_GET['sec2'] = '';
|
||||
}
|
||||
|
||||
if (!isset($_GET['refr'])) {
|
||||
$_GET['refr'] = null;
|
||||
}
|
||||
|
||||
$select = db_process_sql("SELECT autorefresh_white_list,time_autorefresh FROM tusuario WHERE id_user = '".$config['id_user']."'");
|
||||
$autorefresh_list = json_decode($select[0]['autorefresh_white_list']);
|
||||
|
||||
if ($autorefresh_list !== null && array_search($_GET['sec2'], $autorefresh_list) !== false) {
|
||||
$do_refresh = true;
|
||||
if ($_GET['sec2'] == 'operation/agentes/pandora_networkmap') {
|
||||
if ((!isset($_GET['tab'])) || ($_GET['tab'] != 'view')) {
|
||||
$do_refresh = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($do_refresh) {
|
||||
$autorefresh_img = html_print_image('images/header_refresh.png', true, ['class' => 'bot', 'alt' => 'lightning', 'title' => __('Configure autorefresh')]);
|
||||
|
||||
if ($_GET['refr']) {
|
||||
$autorefresh_txt .= ' (<span id="refrcounter">'.date('i:s', $config['refr']).'</span>)';
|
||||
}
|
||||
|
||||
$ignored_params['refr'] = '';
|
||||
$values = get_refresh_time_array();
|
||||
$autorefresh_additional = '<span id="combo_refr" style="display: none;">';
|
||||
$autorefresh_additional .= html_print_select($values, 'ref', '', '', __('Select'), '0', true, false, false);
|
||||
$autorefresh_additional .= '</span>';
|
||||
unset($values);
|
||||
|
||||
$autorefresh_link_open_img = '<a class="white autorefresh" href="'.ui_get_url_refresh($ignored_params).'">';
|
||||
|
||||
if ($_GET['refr']) {
|
||||
$autorefresh_link_open_txt = '<a class="white autorefresh autorefresh_txt" href="'.ui_get_url_refresh($ignored_params).'">';
|
||||
} else {
|
||||
$autorefresh_link_open_txt = '<a>';
|
||||
}
|
||||
|
||||
$autorefresh_link_close = '</a>';
|
||||
} else {
|
||||
$autorefresh_img = html_print_image('images/header_refresh_disabled.png', true, ['class' => 'bot autorefresh_disabled', 'alt' => 'lightning', 'title' => __('Disabled autorefresh')]);
|
||||
|
||||
$ignored_params['refr'] = false;
|
||||
|
||||
$autorefresh_link_open_img = '';
|
||||
$autorefresh_link_open_txt = '';
|
||||
$autorefresh_link_close = '';
|
||||
}
|
||||
} else {
|
||||
$autorefresh_img = html_print_image('images/header_refresh_disabled.png', true, ['class' => 'bot autorefresh_disabled', 'alt' => 'lightning', 'title' => __('Disabled autorefresh')]);
|
||||
|
||||
$ignored_params['refr'] = false;
|
||||
|
||||
$autorefresh_link_open_img = '';
|
||||
$autorefresh_link_open_txt = '';
|
||||
$autorefresh_link_close = '';
|
||||
}
|
||||
|
||||
$table->data[0][1] = $autorefresh_link_open_img.$autorefresh_img.$autorefresh_link_close;
|
||||
$table->data[0][2] = $autorefresh_link_open_txt.$autorefresh_txt.$autorefresh_link_close.$autorefresh_additional;
|
||||
// ======================================================
|
||||
$pandora_management = check_acl($config['id_user'], 0, 'PM');
|
||||
|
||||
// Main help icon
|
||||
if (!$config['disable_help']) {
|
||||
$table->data[0][4] = '<a href="#" class="modalpopup" id="helpmodal">'.html_print_image(
|
||||
'images/header_help.png',
|
||||
true,
|
||||
[
|
||||
'title' => __('Main help'),
|
||||
'id' => 'helpmodal',
|
||||
'class' => 'modalpopup',
|
||||
]
|
||||
).'</a>';
|
||||
}
|
||||
|
||||
$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>';
|
||||
|
||||
// User
|
||||
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']);
|
||||
} else {
|
||||
$table->data[0][6] = html_print_image('images/header_user.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>';
|
||||
|
||||
$table->data[0][7] = '<a href="index.php?sec=workspace&sec2=operation/users/user_edit" class="white_bold"> ('.$config['id_user'].')</a>';
|
||||
|
||||
// Chat messages
|
||||
$table->data[0][8] = "<span id='icon_new_messages_chat' style='display: none;'>";
|
||||
$table->data[0][8] .= "<a href='index.php?sec=workspace&sec2=operation/users/webchat'>";
|
||||
$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>
|
||||
<!--
|
||||
<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>
|
||||
if ($do_refresh) {
|
||||
$autorefresh_img = html_print_image('images/header_refresh_gray.png', true, ['class' => 'bot', 'alt' => 'lightning', 'title' => __('Configure autorefresh')]);
|
||||
|
||||
if ($_GET['refr']) {
|
||||
$autorefresh_txt .= ' (<span id="refrcounter">'.date('i:s', $config['refr']).'</span>)';
|
||||
}
|
||||
|
||||
$ignored_params['refr'] = '';
|
||||
$values = get_refresh_time_array();
|
||||
$autorefresh_additional = '<span id="combo_refr" style="display: none;">';
|
||||
$autorefresh_additional .= html_print_select($values, 'ref', '', '', __('Select'), '0', true, false, false);
|
||||
$autorefresh_additional .= '</span>';
|
||||
unset($values);
|
||||
|
||||
$autorefresh_link_open_img = '<a class="white autorefresh" href="'.ui_get_url_refresh($ignored_params).'">';
|
||||
|
||||
if ($_GET['refr']) {
|
||||
$autorefresh_link_open_txt = '<a class="autorefresh autorefresh_txt" href="'.ui_get_url_refresh($ignored_params).'">';
|
||||
} else {
|
||||
$autorefresh_link_open_txt = '<a>';
|
||||
}
|
||||
|
||||
$autorefresh_link_close = '</a>';
|
||||
$display_counter = 'display:block';
|
||||
} else {
|
||||
$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;
|
||||
|
||||
$autorefresh_link_open_img = '';
|
||||
$autorefresh_link_open_txt = '';
|
||||
$autorefresh_link_close = '';
|
||||
|
||||
$display_counter = 'display:none';
|
||||
}
|
||||
} else {
|
||||
$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;
|
||||
|
||||
$autorefresh_link_open_img = '';
|
||||
$autorefresh_link_open_txt = '';
|
||||
$autorefresh_link_close = '';
|
||||
|
||||
$display_counter = 'display:none';
|
||||
}
|
||||
|
||||
$header_autorefresh = '<div id="header_autorefresh">'.$autorefresh_link_open_img.$autorefresh_img.$autorefresh_link_close.'</div>';
|
||||
$header_autorefresh_counter = '<div id="header_autorefresh_counter" style="'.$display_counter.'">'.$autorefresh_link_open_txt.$autorefresh_txt.$autorefresh_link_close.$autorefresh_additional.'</div>';
|
||||
|
||||
|
||||
// qr
|
||||
if ($config['show_qr_code_header'] == 0) {
|
||||
$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,
|
||||
[
|
||||
'alt' => __('QR Code of the page'),
|
||||
'title' => __('QR Code of the page'),
|
||||
]
|
||||
).'</a></div></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
|
||||
// User
|
||||
if (is_user_admin($config['id_user']) == 1) {
|
||||
$header_user = html_print_image('images/header_user_admin_green.png', true, ['title' => __('Edit my user'), 'class' => 'bot', 'alt' => 'user']);
|
||||
} else {
|
||||
$header_user = html_print_image('images/header_user_green.png', true, ['title' => __('Edit my user'), 'class' => 'bot', 'alt' => 'user']);
|
||||
}
|
||||
|
||||
$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>';
|
||||
|
||||
// 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>';
|
||||
|
||||
echo '<div class="header_left">'.$header_autorefresh, $header_autorefresh_counter, $header_qr, $header_chat.'</div>
|
||||
<div class="header_center">'.$header_searchbar, $header_discovery.'</div>
|
||||
<div class="header_right">'.$header_user, $header_logout.'</div>';
|
||||
?>
|
||||
</div> <!-- Closes #table_header_inner -->
|
||||
</div> <!-- Closes #table_header -->
|
||||
|
||||
|
||||
<!-- Notifications content wrapper-->
|
||||
<div id='notification-content' style='display:none;' /></div>
|
||||
|
||||
<!-- Old style div wrapper -->
|
||||
<div id="alert_messages" style="display: none"></div>;
|
||||
<div id="alert_messages" style="display: none"></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* <![CDATA[ */
|
||||
|
@ -541,7 +481,6 @@ config_check();
|
|||
?>
|
||||
$("a.autorefresh_txt").toggle ();
|
||||
$("#combo_refr").toggle ();
|
||||
$("#combo_refr").css('padding-right', '9px');
|
||||
href = $("a.autorefresh").attr ("href");
|
||||
<?php
|
||||
if ($select[0]['time_autorefresh']) {
|
||||
|
@ -573,7 +512,7 @@ config_check();
|
|||
$("#ui_close_dialog_titlebar").click(function () {
|
||||
$("#agent_access").css("display","");
|
||||
});
|
||||
|
||||
|
||||
function blinkpubli(){
|
||||
$(".publienterprise").delay(100).fadeTo(300,0.2).delay(100).fadeTo(300,1, blinkpubli);
|
||||
}
|
||||
|
@ -583,6 +522,7 @@ config_check();
|
|||
<?php
|
||||
if ($_GET['refr']) {
|
||||
?>
|
||||
$("#header_autorefresh").css('padding-right', '5px');
|
||||
var refr_time = <?php echo (int) get_parameter('refr', 0); ?>;
|
||||
var t = new Date();
|
||||
t.setTime (t.getTime () +
|
||||
|
@ -603,7 +543,6 @@ config_check();
|
|||
$("a.autorefresh").click (function () {
|
||||
$("a.autorefresh_txt").toggle ();
|
||||
$("#combo_refr").toggle ();
|
||||
$("#combo_refr").css('padding-right', '9px');
|
||||
$("select#ref").change (function () {
|
||||
href = $("a.autorefresh").attr ("href");
|
||||
$(document).attr ("location", href + this.value);
|
||||
|
@ -613,4 +552,4 @@ config_check();
|
|||
});
|
||||
});
|
||||
/* ]]> */
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -80,7 +80,7 @@ if (!empty($all_data)) {
|
|||
$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>
|
||||
|
||||
<td width="25%" style="padding-right: 20px;" valign="top">
|
||||
|
|
|
@ -16,16 +16,80 @@ if (! isset($config['id_user'])) {
|
|||
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;
|
||||
|
||||
if (isset($config['autohidden_menu']) && $config['autohidden_menu']) {
|
||||
$autohidden_menu = 1;
|
||||
}
|
||||
|
||||
$menu_container_id = '';
|
||||
|
||||
// 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>';
|
||||
require 'operation/menu.php';
|
||||
|
@ -45,16 +109,14 @@ if (check_acl($config['id_user'], 0, 'AW')
|
|||
|
||||
require 'godmode/menu.php';
|
||||
|
||||
echo '<div id="button_collapse" class="button_collapse"></div>';
|
||||
|
||||
|
||||
// require ("links_menu.php");
|
||||
echo '</div>';
|
||||
// menu_container
|
||||
ui_require_jquery_file('cookie');
|
||||
|
||||
$config_fixed_menu = false;
|
||||
if (isset($config['fixed_menu'])) {
|
||||
$config_fixed_menu = $config['fixed_menu'];
|
||||
}
|
||||
|
||||
$config_fixed_header = false;
|
||||
if (isset($config['fixed_header'])) {
|
||||
$config_fixed_header = $config['fixed_header'];
|
||||
|
@ -64,25 +126,35 @@ if (isset($config['fixed_header'])) {
|
|||
<script type="text/javascript" language="javascript">
|
||||
/* <![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 fixed_menu = <?php echo json_encode((bool) $config_fixed_menu); ?>;
|
||||
var fixed_header = <?php echo json_encode((bool) $config_fixed_header); ?>;
|
||||
var id_user = "<?php echo $config['id_user']; ?>";
|
||||
var cookie_name = id_user + '-pandora_menu_state';
|
||||
var cookie_name_encoded = btoa(cookie_name);
|
||||
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);
|
||||
if (!menuState) {
|
||||
|
@ -109,236 +181,7 @@ function close_submenus () {
|
|||
$('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>
|
||||
|
||||
|
@ -348,182 +191,199 @@ $(document).ready( function() {
|
|||
handsIn = 0;
|
||||
handsIn2 = 0;
|
||||
|
||||
if(!click_display){
|
||||
$('.menu_icon').mouseenter(function() {
|
||||
|
||||
/**
|
||||
* 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() {
|
||||
table_hover = $(this);
|
||||
handsIn = 1;
|
||||
openTime = new Date().getTime();
|
||||
$("ul#sub"+table_hover[0].id).show();
|
||||
get_menu_items(table_hover);
|
||||
if( typeof(table_noHover) != 'undefined')
|
||||
if ( "ul#sub"+table_hover[0].id != "ul#sub"+table_noHover[0].id )
|
||||
$("ul#sub"+table_noHover[0].id).hide();
|
||||
}).mouseleave(function() {
|
||||
table_noHover = $(this);
|
||||
handsIn = 0;
|
||||
setTimeout(function() {
|
||||
opened = new Date().getTime() - openTime;
|
||||
if(opened > 3000 && handsIn == 0) {
|
||||
openTime = 4000;
|
||||
$("ul#sub"+table_noHover[0].id).hide();
|
||||
}
|
||||
}, 2500);
|
||||
});
|
||||
}else{
|
||||
$(document).ready(function() {
|
||||
if (autohidden_menu) {
|
||||
$('.menu_icon').on("click", function() {
|
||||
if( typeof(table_hover) != 'undefined'){
|
||||
$("ul#sub"+table_hover[0].id).hide();
|
||||
}
|
||||
table_hover = $(this);
|
||||
handsIn = 1;
|
||||
openTime = new Date().getTime();
|
||||
$("ul#sub"+table_hover[0].id).show();
|
||||
if( typeof(table_noHover) != 'undefined')
|
||||
if ( "ul#sub"+table_hover[0].id != "ul#sub"+table_noHover[0].id )
|
||||
$("ul#sub"+table_noHover[0].id).hide();
|
||||
get_menu_items(table_hover);
|
||||
}).mouseleave(function() {
|
||||
table_noHover = $(this);
|
||||
handsIn = 0;
|
||||
setTimeout(function() {
|
||||
opened = new Date().getTime() - openTime;
|
||||
if(opened > 3000 && handsIn == 0) {
|
||||
openTime = 4000;
|
||||
$("ul#sub"+table_hover[0].id).hide();
|
||||
if(opened > 5000 && handsIn == 0) {
|
||||
openTime = 6000;
|
||||
$("ul#sub"+table_noHover[0].id).hide();
|
||||
}
|
||||
}, 2500);
|
||||
}, 5500);
|
||||
});
|
||||
} else {
|
||||
$('.menu_icon').on("click", function() {
|
||||
if( typeof(table_hover) != 'undefined'){
|
||||
$("ul#sub"+table_hover[0].id).hide();
|
||||
}
|
||||
table_hover = $(this);
|
||||
handsIn = 1;
|
||||
openTime = new Date().getTime();
|
||||
$("ul#sub"+table_hover[0].id).show();
|
||||
get_menu_items(table_hover);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$('.has_submenu').mouseenter(function() {
|
||||
table_hover2 = $(this);
|
||||
handsIn2 = 1;
|
||||
openTime2 = new Date().getTime();
|
||||
$("#sub"+table_hover2[0].id).show();
|
||||
if( typeof(table_noHover2) != 'undefined')
|
||||
if ( "ul#sub"+table_hover2[0].id != "ul#sub"+table_noHover2[0].id )
|
||||
$("ul#sub"+table_noHover2[0].id).hide();
|
||||
}).mouseleave(function() {
|
||||
table_noHover2 = table_hover2;
|
||||
handsIn2 = 0;
|
||||
setTimeout(function() {
|
||||
opened = new Date().getTime() - openTime2;
|
||||
if(opened >= 3000 && handsIn2 == 0) {
|
||||
openTime2 = 4000;
|
||||
$("ul#sub"+table_hover2[0].id).hide();
|
||||
}
|
||||
}, 3500);
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
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();
|
||||
});
|
||||
}else{
|
||||
$(document).ready(function() {
|
||||
if (autohidden_menu) {
|
||||
$('.menu_icon').on("click", function() {
|
||||
if( typeof(table_hover) != 'undefined'){
|
||||
$("ul#sub"+table_hover[0].id).hide();
|
||||
}
|
||||
table_hover = $(this);
|
||||
handsIn = 1;
|
||||
openTime = new Date().getTime();
|
||||
$("ul#sub"+table_hover[0].id).show();
|
||||
}).mouseleave(function() {
|
||||
table_noHover = $(this);
|
||||
handsIn = 0;
|
||||
setTimeout(function() {
|
||||
opened = new Date().getTime() - openTime;
|
||||
if(opened > 5000 && handsIn == 0) {
|
||||
openTime = 6000;
|
||||
$("ul#sub"+table_hover[0].id).hide();
|
||||
}
|
||||
}, 5500);
|
||||
});
|
||||
} else {
|
||||
$('.menu_icon').on("click", function() {
|
||||
if( typeof(table_hover) != 'undefined'){
|
||||
$("ul#sub"+table_hover[0].id).hide();
|
||||
}
|
||||
table_hover = $(this);
|
||||
handsIn = 1;
|
||||
openTime = new Date().getTime();
|
||||
$("ul#sub"+table_hover[0].id).show();
|
||||
});
|
||||
}
|
||||
$('#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();
|
||||
});
|
||||
}
|
||||
|
||||
- $('.has_submenu').mouseenter(function() {
|
||||
table_hover2 = $(this);
|
||||
handsIn2 = 1;
|
||||
openTime2 = new Date().getTime();
|
||||
$("#sub"+table_hover2[0].id).show();
|
||||
if( typeof(table_noHover2) != 'undefined')
|
||||
if ( "ul#sub"+table_hover2[0].id != "ul#sub"+table_noHover2[0].id )
|
||||
$("ul#sub"+table_noHover2[0].id).hide();
|
||||
}).mouseleave(function() {
|
||||
table_noHover2 = table_hover2;
|
||||
handsIn2 = 0;
|
||||
setTimeout(function() {
|
||||
opened = new Date().getTime() - openTime2;
|
||||
if(opened >= 3000 && handsIn2 == 0) {
|
||||
openTime2 = 4000;
|
||||
$("ul#sub"+table_hover2[0].id).hide();
|
||||
}
|
||||
}, 3500);
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
if (!classic_menu) {
|
||||
//Daniel maya 02/06/2016 Display menu with click --INI
|
||||
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', '45px');
|
||||
$('li.menu_icon').removeClass( " no_hidden_menu");
|
||||
$('ul.submenu').css('left', '44px');
|
||||
$('div#title_menu').hide();
|
||||
});
|
||||
}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', '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');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$('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();
|
||||
});
|
||||
|
||||
if (classic_menu) {
|
||||
$('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();
|
||||
$('ul.submenu').css('left', '144px');
|
||||
});
|
||||
|
||||
$('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();
|
||||
$('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();
|
||||
});
|
||||
}
|
||||
$('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();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
|
|
@ -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>
|
|
@ -431,7 +431,7 @@ if (modules_is_string_type($id_module_type) || $edit) {
|
|||
str_replace('"', '', $str_warning),
|
||||
'',
|
||||
10,
|
||||
255,
|
||||
1024,
|
||||
true,
|
||||
$disabledBecauseInPolicy,
|
||||
false,
|
||||
|
@ -484,7 +484,7 @@ if (modules_is_string_type($id_module_type) || $edit) {
|
|||
str_replace('"', '', $str_critical),
|
||||
'',
|
||||
10,
|
||||
255,
|
||||
1024,
|
||||
true,
|
||||
$disabledBecauseInPolicy,
|
||||
false,
|
||||
|
|
|
@ -562,7 +562,7 @@ $table->data['edit1'][1] = '<table width="100%">';
|
|||
'',
|
||||
'',
|
||||
5,
|
||||
255,
|
||||
1024,
|
||||
true
|
||||
);
|
||||
$table->data['edit1'][1] .= '</td>';
|
||||
|
@ -631,7 +631,7 @@ $table->data['edit1'][1] = '<table width="100%">';
|
|||
'',
|
||||
'',
|
||||
5,
|
||||
255,
|
||||
1024,
|
||||
true
|
||||
);
|
||||
$table->data['edit1'][3] .= '</td>';
|
||||
|
|
|
@ -190,7 +190,7 @@ $table->data[4][1] .= html_print_input_text(
|
|||
$str_warning,
|
||||
'',
|
||||
5,
|
||||
64,
|
||||
1024,
|
||||
true
|
||||
).'</span>';
|
||||
$table->data[4][1] .= '<br /><em>'.__('Inverse interval').'</em>';
|
||||
|
@ -225,7 +225,7 @@ $table->data[5][1] .= html_print_input_text(
|
|||
$str_critical,
|
||||
'',
|
||||
5,
|
||||
64,
|
||||
1024,
|
||||
true
|
||||
).'</span>';
|
||||
$table->data[5][1] .= '<br /><em>'.__('Inverse interval').'</em>';
|
||||
|
|
|
@ -43,7 +43,7 @@ if (is_ajax()) {
|
|||
if ($type_auth != 'mysql') {
|
||||
// Fallback to local authentication
|
||||
$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);
|
||||
$table->data['fallback_local_auth'] = $row;
|
||||
|
||||
|
|
|
@ -306,7 +306,7 @@ class DiscoveryTaskList extends Wizard
|
|||
return false;
|
||||
}
|
||||
|
||||
// Get all recon servers.
|
||||
// Get all discovery servers.
|
||||
$servers = db_get_all_rows_sql('SELECT * FROM tserver WHERE server_type = 3');
|
||||
if ($servers === false) {
|
||||
$servers = [];
|
||||
|
@ -337,33 +337,13 @@ 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');
|
||||
$user_groups = implode(',', array_keys(users_get_groups()));
|
||||
$defined_tasks = db_get_all_rows_filter(
|
||||
'tuser_task_scheduled',
|
||||
'id_grupo IN ('.$user_groups.')'
|
||||
);
|
||||
$recon_tasks = db_get_all_rows_sql('SELECT * FROM trecon_task');
|
||||
$user_groups = implode(',', array_keys(users_get_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.
|
||||
if ($recon_tasks === false) {
|
||||
$recon_tasks = [];
|
||||
}
|
||||
// Show network tasks for Recon Server.
|
||||
if ($recon_tasks === false) {
|
||||
$recon_tasks = [];
|
||||
}
|
||||
|
||||
$table = new StdClass();
|
||||
$table->cellpadding = 4;
|
||||
|
@ -374,9 +354,9 @@ class DiscoveryTaskList extends Wizard
|
|||
$table->data = [];
|
||||
$table->align = [];
|
||||
$table->headstyle = [];
|
||||
for ($i = 0; $i < 9; $i++) {
|
||||
$table->headstyle[$i] = 'text-align: left;';
|
||||
}
|
||||
for ($i = 0; $i < 9; $i++) {
|
||||
$table->headstyle[$i] = 'text-align: left;';
|
||||
}
|
||||
|
||||
$table->head[0] = __('Force');
|
||||
$table->align[0] = 'left';
|
||||
|
@ -384,120 +364,155 @@ class DiscoveryTaskList extends Wizard
|
|||
$table->head[1] = __('Task name');
|
||||
$table->align[1] = 'left';
|
||||
|
||||
$table->head[2] = __('Interval');
|
||||
$table->head[2] = __('Server name');
|
||||
$table->align[2] = 'left';
|
||||
|
||||
$table->head[3] = __('Network');
|
||||
$table->head[3] = __('Interval');
|
||||
$table->align[3] = 'left';
|
||||
|
||||
$table->head[4] = __('Status');
|
||||
$table->head[4] = __('Network');
|
||||
$table->align[4] = 'left';
|
||||
|
||||
$table->head[5] = __('Task type');
|
||||
$table->head[5] = __('Status');
|
||||
$table->align[5] = 'left';
|
||||
|
||||
$table->head[6] = __('Progress');
|
||||
$table->head[6] = __('Task type');
|
||||
$table->align[6] = 'left';
|
||||
|
||||
$table->head[7] = __('Updated at');
|
||||
$table->head[7] = __('Progress');
|
||||
$table->align[7] = 'left';
|
||||
|
||||
$table->head[8] = __('Operations');
|
||||
$table->head[8] = __('Updated at');
|
||||
$table->align[8] = 'left';
|
||||
|
||||
foreach ($recon_tasks as $task) {
|
||||
$data = [];
|
||||
$table->head[9] = __('Operations');
|
||||
$table->align[9] = 'left';
|
||||
|
||||
if ($task['disabled'] == 0) {
|
||||
$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']
|
||||
).'">';
|
||||
$data[0] .= html_print_image('images/target.png', true, ['title' => __('Force')]);
|
||||
$data[0] .= '</a>';
|
||||
} else if ($task['disabled'] == 2) {
|
||||
$data[0] = ui_print_help_tip(
|
||||
__('This task has not been completely defined, please edit it'),
|
||||
true
|
||||
);
|
||||
} else {
|
||||
$data[0] = '';
|
||||
}
|
||||
foreach ($recon_tasks as $task) {
|
||||
$data = [];
|
||||
$server_name = servers_get_name($task['id_recon_server']);
|
||||
|
||||
$data[1] = '<b>'.$task['name'].'</b>';
|
||||
// By default.
|
||||
$subnet = $task['subnet'];
|
||||
|
||||
if ($task['interval_sweep'] > 0) {
|
||||
$data[2] = human_time_description_raw(
|
||||
$task['interval_sweep']
|
||||
);
|
||||
} else {
|
||||
$data[2] = __('Manual');
|
||||
}
|
||||
|
||||
if ($task['id_recon_script'] == 0) {
|
||||
$data[3] = $task['subnet'];
|
||||
} else {
|
||||
$data[3] = '-';
|
||||
}
|
||||
|
||||
if ($task['status'] <= 0) {
|
||||
$data[4] = __('Done');
|
||||
} else {
|
||||
$data[4] = __('Pending');
|
||||
}
|
||||
|
||||
if ($task['id_recon_script'] == 0) {
|
||||
// Discovery NetScan.
|
||||
$data[5] = html_print_image(
|
||||
'images/network.png',
|
||||
true,
|
||||
['title' => __('Discovery NetScan')]
|
||||
).' ';
|
||||
$data[5] .= network_profiles_get_name(
|
||||
$task['id_network_profile']
|
||||
);
|
||||
} else {
|
||||
// APP recon task.
|
||||
$data[5] = html_print_image(
|
||||
'images/plugin.png',
|
||||
true
|
||||
).' ';
|
||||
$data[5] .= db_get_sql(
|
||||
sprintf(
|
||||
'SELECT name FROM trecon_script WHERE id_recon_script = %d',
|
||||
$task['id_recon_script']
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
if ($task['status'] <= 0 || $task['status'] > 100) {
|
||||
$data[6] = '-';
|
||||
} else {
|
||||
$data[6] = progress_bar(
|
||||
$task['status'],
|
||||
100,
|
||||
20,
|
||||
__('Progress').':'.$task['status'].'%',
|
||||
1
|
||||
);
|
||||
}
|
||||
|
||||
if ($task['utimestamp'] > 0) {
|
||||
$data[7] = ui_print_timestamp(
|
||||
$task['utimestamp'],
|
||||
true
|
||||
);
|
||||
} else {
|
||||
$data[7] = __('Not executed yet');
|
||||
}
|
||||
|
||||
if (check_acl(
|
||||
$config['id_user'],
|
||||
$task['id_group'],
|
||||
'PM'
|
||||
)
|
||||
// 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()
|
||||
) {
|
||||
// Check if is a H&D, Cloud or Application.
|
||||
$data[8] = '<a href="'.ui_get_full_url(
|
||||
$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(
|
||||
'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=tasklist&server_id='.$id_server.'&force='.$task['id_rt']
|
||||
).'">';
|
||||
$data[0] .= html_print_image('images/target.png', true, ['title' => __('Force')]);
|
||||
$data[0] .= '</a>';
|
||||
} else if ($task['disabled'] == 2) {
|
||||
$data[0] = ui_print_help_tip(
|
||||
__('This task has not been completely defined, please edit it'),
|
||||
true
|
||||
);
|
||||
} else {
|
||||
$data[0] = '';
|
||||
}
|
||||
|
||||
$data[1] = '<b>'.$task['name'].'</b>';
|
||||
|
||||
$data[2] = $server_name;
|
||||
|
||||
if ($task['interval_sweep'] > 0) {
|
||||
$data[3] = human_time_description_raw(
|
||||
$task['interval_sweep']
|
||||
);
|
||||
} else {
|
||||
$data[3] = __('Manual');
|
||||
}
|
||||
|
||||
if ($task['id_recon_script'] == 0 || $ipam === true) {
|
||||
$data[4] = $subnet;
|
||||
} else {
|
||||
$data[4] = '-';
|
||||
}
|
||||
|
||||
if ($task['status'] <= 0) {
|
||||
$data[5] = __('Done');
|
||||
} else {
|
||||
$data[5] = __('Pending');
|
||||
}
|
||||
|
||||
if ($task['id_recon_script'] == 0) {
|
||||
// Discovery NetScan.
|
||||
$data[6] = html_print_image(
|
||||
'images/network.png',
|
||||
true,
|
||||
['title' => __('Discovery NetScan')]
|
||||
).' ';
|
||||
$data[6] .= network_profiles_get_name(
|
||||
$task['id_network_profile']
|
||||
);
|
||||
} else {
|
||||
// APP recon task.
|
||||
$data[6] = html_print_image(
|
||||
'images/plugin.png',
|
||||
true
|
||||
).' ';
|
||||
$data[6] .= $recon_script_name;
|
||||
}
|
||||
|
||||
if ($task['status'] <= 0 || $task['status'] > 100) {
|
||||
$data[7] = '-';
|
||||
} else {
|
||||
$data[7] = progress_bar(
|
||||
$task['status'],
|
||||
100,
|
||||
20,
|
||||
__('Progress').':'.$task['status'].'%',
|
||||
1
|
||||
);
|
||||
}
|
||||
|
||||
if ($task['utimestamp'] > 0) {
|
||||
$data[8] = ui_print_timestamp(
|
||||
$task['utimestamp'],
|
||||
true
|
||||
);
|
||||
} else {
|
||||
$data[8] = __('Not executed yet');
|
||||
}
|
||||
|
||||
if (check_acl(
|
||||
$config['id_user'],
|
||||
$task['id_group'],
|
||||
'PM'
|
||||
)
|
||||
) {
|
||||
if ($ipam === true) {
|
||||
$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(
|
||||
'index.php?sec=gservers&sec2=godmode/servers/discovery&%s&task=%d',
|
||||
$this->getTargetWiz($task),
|
||||
|
@ -507,29 +522,29 @@ class DiscoveryTaskList extends Wizard
|
|||
'images/config.png',
|
||||
true
|
||||
).'</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']
|
||||
).'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image(
|
||||
'images/cross.png',
|
||||
true
|
||||
).'</a>';
|
||||
} else {
|
||||
$data[8] = '';
|
||||
}
|
||||
|
||||
array_push($table->data, $data);
|
||||
} else {
|
||||
$data[9] = '';
|
||||
}
|
||||
|
||||
array_push($table->data, $data);
|
||||
}
|
||||
|
||||
echo '<h2>'.__('Server tasks').'</h2>';
|
||||
if (empty($table->data)) {
|
||||
echo '<div class="nf">'.__('Server').' '.$server_name.' '.__('has no discovery tasks assigned').'</div>';
|
||||
return false;
|
||||
} else {
|
||||
html_print_table($table);
|
||||
}
|
||||
if (empty($table->data)) {
|
||||
echo '<div class="nf">'.__('Server').' '.$server_name.' '.__('has no discovery tasks assigned').'</div>';
|
||||
return false;
|
||||
} else {
|
||||
html_print_table($table);
|
||||
}
|
||||
|
||||
unset($table);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
After Width: | Height: | Size: 664 B |
After Width: | Height: | Size: 294 B |
After Width: | Height: | Size: 516 B |
After Width: | Height: | Size: 510 B |
After Width: | Height: | Size: 462 B |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 311 B |
After Width: | Height: | Size: 653 B |
After Width: | Height: | Size: 265 B |
After Width: | Height: | Size: 813 B |
After Width: | Height: | Size: 276 B |
Before Width: | Height: | Size: 311 B After Width: | Height: | Size: 342 B |
After Width: | Height: | Size: 272 B |
After Width: | Height: | Size: 748 B |
After Width: | Height: | Size: 281 B |
After Width: | Height: | Size: 283 B |
After Width: | Height: | Size: 285 B |
After Width: | Height: | Size: 755 B |
After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 881 B |
After Width: | Height: | Size: 322 B |
After Width: | Height: | Size: 611 B |
After Width: | Height: | Size: 305 B |
After Width: | Height: | Size: 458 B |
After Width: | Height: | Size: 313 B |
After Width: | Height: | Size: 364 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 471 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 498 B |
After Width: | Height: | Size: 357 B |
After Width: | Height: | Size: 273 B |
After Width: | Height: | Size: 485 B |
After Width: | Height: | Size: 490 B |
After Width: | Height: | Size: 621 B |
After Width: | Height: | Size: 531 B |
After Width: | Height: | Size: 226 B |
After Width: | Height: | Size: 416 B |
After Width: | Height: | Size: 871 B |
After Width: | Height: | Size: 356 B |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 630 B |
After Width: | Height: | Size: 252 B |
After Width: | Height: | Size: 739 B |
After Width: | Height: | Size: 342 B |
After Width: | Height: | Size: 432 B |
After Width: | Height: | Size: 355 B |
After Width: | Height: | Size: 651 B |
After Width: | Height: | Size: 237 B |
After Width: | Height: | Size: 624 B |
After Width: | Height: | Size: 300 B |
After Width: | Height: | Size: 599 B |
After Width: | Height: | Size: 173 B |
After Width: | Height: | Size: 208 B |
After Width: | Height: | Size: 441 B |
After Width: | Height: | Size: 352 B |
|
@ -54,6 +54,7 @@ $table_events = get_parameter('table_events', 0);
|
|||
$total_events = (bool) get_parameter('total_events');
|
||||
$total_event_graph = (bool) get_parameter('total_event_graph');
|
||||
$graphic_event_group = (bool) get_parameter('graphic_event_group');
|
||||
$get_table_response_command = (bool) get_parameter('get_table_response_command');
|
||||
|
||||
if ($get_event_name) {
|
||||
$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);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -129,6 +131,7 @@ if ($get_response) {
|
|||
}
|
||||
|
||||
echo json_encode($event_response);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -136,6 +139,7 @@ if ($perform_event_response) {
|
|||
global $config;
|
||||
|
||||
$command = get_parameter('target', '');
|
||||
|
||||
$response_id = get_parameter('response_id');
|
||||
|
||||
$event_response = db_get_row('tevent_response', 'id', $response_id);
|
||||
|
@ -148,7 +152,11 @@ if ($perform_event_response) {
|
|||
'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)) {
|
||||
echo 'Only stdin/stdout commands are supported';
|
||||
|
@ -234,13 +242,29 @@ if ($dialogue_event_response) {
|
|||
);
|
||||
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>";
|
||||
|
||||
if ($end) {
|
||||
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'");
|
||||
echo "<span id='execute_again_loading' style='display:none'>".html_print_image('images/spinner.gif', true).'</span>';
|
||||
html_print_button(
|
||||
__('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>';
|
||||
}
|
||||
} else {
|
||||
|
@ -796,3 +820,67 @@ if ($graphic_event_group) {
|
|||
echo $prueba;
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
/**
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC190228';
|
||||
$build_version = 'PC190308';
|
||||
$pandora_version = 'v7.0NG.732';
|
||||
|
||||
// Do not overwrite default timezone set if defined.
|
||||
|
|
|
@ -45,6 +45,7 @@ function mysql_connect_db($host=null, $db=null, $user=null, $pass=null, $port=nu
|
|||
if ($config['mysqli']) {
|
||||
$connect_id = mysqli_connect($host, $user, $pass, $db, $port);
|
||||
if (mysqli_connect_errno() > 0) {
|
||||
include 'general/mysqlerr.php';
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -82,17 +82,25 @@ function agents_get_agent_id_by_alias($alias)
|
|||
|
||||
|
||||
/**
|
||||
* Creates an agent
|
||||
* Creates an agent.
|
||||
*
|
||||
* @param string Agent name.
|
||||
* @param string Group to be included.
|
||||
* @param int Agent interval
|
||||
* @param string Agent IP
|
||||
* @param string $name Agent name.
|
||||
* @param string $id_group Group to be included.
|
||||
* @param integer $interval Agent interval.
|
||||
* @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.
|
||||
*/
|
||||
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)) {
|
||||
return false;
|
||||
}
|
||||
|
@ -101,7 +109,7 @@ function agents_create_agent($name, $id_group, $interval, $ip_address, $values=f
|
|||
return false;
|
||||
}
|
||||
|
||||
// Check interval greater than zero
|
||||
// Check interval greater than zero.
|
||||
if ($interval < 0) {
|
||||
$interval = false;
|
||||
}
|
||||
|
@ -115,7 +123,7 @@ function agents_create_agent($name, $id_group, $interval, $ip_address, $values=f
|
|||
}
|
||||
|
||||
$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['intervalo'] = $interval;
|
||||
|
||||
|
@ -128,12 +136,12 @@ function agents_create_agent($name, $id_group, $interval, $ip_address, $values=f
|
|||
return false;
|
||||
}
|
||||
|
||||
// Create address for this agent in taddress
|
||||
// Create address for this agent in taddress.
|
||||
if (!empty($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;
|
||||
}
|
||||
|
|
|
@ -313,6 +313,10 @@ function config_update_config()
|
|||
if (!config_update_value('auditdir', get_parameter('auditdir'))) {
|
||||
$error_update[] = __('Audit log directory');
|
||||
}
|
||||
|
||||
if (!config_update_value('unique_ip', get_parameter('unique_ip'))) {
|
||||
$error_update[] = __('unique_ip');
|
||||
}
|
||||
break;
|
||||
|
||||
case 'enterprise':
|
||||
|
@ -868,6 +872,10 @@ function config_update_config()
|
|||
$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'))) {
|
||||
$error_update[] = __('Custom logo white background');
|
||||
}
|
||||
|
@ -1036,10 +1044,6 @@ function config_update_config()
|
|||
$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'))) {
|
||||
$error_update[] = __('Paginate module');
|
||||
}
|
||||
|
@ -1120,10 +1124,6 @@ function config_update_config()
|
|||
$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
|
||||
// --------------------------------------------------
|
||||
|
@ -1711,10 +1711,13 @@ function config_process_config()
|
|||
config_update_value('limit_parameters_massive', (ini_get('max_input_vars') / 2));
|
||||
}
|
||||
|
||||
/*
|
||||
* Parse the ACL IP list for access API
|
||||
*/
|
||||
if (!isset($config['unique_ip'])) {
|
||||
config_update_value('unique_ip', 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Parse the ACL IP list for access API
|
||||
*/
|
||||
$temp_list_ACL_IPs_for_API = [];
|
||||
if (isset($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 !
|
||||
// if (!isset ($config["autoupdate"])) {
|
||||
// config_update_value ('autoupdate', true);.
|
||||
// }
|
||||
include_once $config['homedir'].'/include/auth/mysql.php';
|
||||
include_once $config['homedir'].'/include/functions_io.php';
|
||||
|
||||
|
@ -1795,16 +1799,16 @@ function config_process_config()
|
|||
config_update_value('fixed_graph', false);
|
||||
}
|
||||
|
||||
if (!isset($config['fixed_menu'])) {
|
||||
config_update_value('fixed_menu', false);
|
||||
}
|
||||
|
||||
if (!isset($config['custom_favicon'])) {
|
||||
config_update_value('custom_favicon', '');
|
||||
}
|
||||
|
||||
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'])) {
|
||||
|
@ -2519,10 +2523,6 @@ function config_process_config()
|
|||
}
|
||||
}
|
||||
|
||||
if (!isset($config['classic_menu'])) {
|
||||
config_update_value('classic_menu', 0);
|
||||
}
|
||||
|
||||
if (!isset($config['csv_divider'])) {
|
||||
config_update_value('csv_divider', ';');
|
||||
}
|
||||
|
|
|
@ -2272,35 +2272,29 @@ function events_page_responses($event, $childrens_ids=[])
|
|||
|
||||
/**
|
||||
* 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 $response_id Response_id.
|
||||
* @param integer $server_id Server_id.
|
||||
* @param boolean $history History.
|
||||
* @param integer $event_id Event identifier.
|
||||
* @param integer $response_id Event response identifier.
|
||||
* @param integer $server_id Node identifier (for metaconsole).
|
||||
* @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(
|
||||
$event_id,
|
||||
$response_id,
|
||||
$server_id,
|
||||
$history=false
|
||||
int $event_id,
|
||||
int $response_id,
|
||||
int $server_id=0,
|
||||
bool $history=false
|
||||
) {
|
||||
global $config;
|
||||
|
||||
$event_response = db_get_row('tevent_response', 'id', $response_id);
|
||||
|
||||
if ($server_id > 0) {
|
||||
$meta = true;
|
||||
} else {
|
||||
$meta = false;
|
||||
}
|
||||
|
||||
// If server_id > 0, it's a metaconsole query.
|
||||
$meta = $server_id > 0;
|
||||
$event_table = events_get_events_table($meta, $history);
|
||||
|
||||
$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']);
|
||||
|
||||
// Substitute each macro.
|
||||
|
@ -2317,7 +2311,7 @@ function events_get_response_target(
|
|||
}
|
||||
|
||||
$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) {
|
||||
$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;
|
||||
}
|
||||
|
||||
|
|
|
@ -342,11 +342,8 @@ function menu_print_menu(&$menu)
|
|||
$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
|
||||
$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 .= '</ul>';
|
||||
}
|
||||
|
@ -377,7 +374,7 @@ function menu_print_menu(&$menu)
|
|||
$length = strlen(__($main['text']));
|
||||
$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
|
||||
if (isset($main['notification'])) {
|
||||
$output .= '<div class="notification_ball">'.$main['notification'].'</div>';
|
||||
|
@ -396,8 +393,7 @@ function menu_print_menu(&$menu)
|
|||
$visible = false;
|
||||
}
|
||||
|
||||
$top = menu_calculate_top($config['count_main_menu'], $count_sub);
|
||||
$output .= '<ul id="subicon_'.$id.'" class="submenu'.($visible ? '' : ' invisible').'" style="top: '.$top.'px">';
|
||||
$output .= '<ul id="subicon_'.$id.'" class="submenu'.($visible ? '' : ' invisible').'">';
|
||||
$output .= $submenu_output;
|
||||
$output .= '</ul>';
|
||||
}
|
||||
|
@ -717,34 +713,3 @@ function menu_sec3_in_sec2($sec, $sec2, $sec3)
|
|||
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -534,9 +534,10 @@ function planned_downtimes_migrate_malformed_downtimes_copy_items($original_down
|
|||
/**
|
||||
* 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)
|
||||
{
|
||||
|
@ -566,7 +567,9 @@ function planned_downtimes_stop($downtime)
|
|||
case 'periodically':
|
||||
return false;
|
||||
|
||||
break;
|
||||
default:
|
||||
// Nothing to do.
|
||||
break;
|
||||
}
|
||||
|
||||
$message .= ui_print_result_message(
|
||||
|
@ -593,7 +596,7 @@ function planned_downtimes_stop($downtime)
|
|||
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']) {
|
||||
case 'quiet':
|
||||
$agents = db_get_all_rows_filter(
|
||||
|
@ -658,7 +661,10 @@ function planned_downtimes_stop($downtime)
|
|||
foreach ($agents as $agent) {
|
||||
$result = db_process_sql_update(
|
||||
'tagente',
|
||||
['disabled' => 0],
|
||||
[
|
||||
'disabled' => 0,
|
||||
'update_module_count' => 1,
|
||||
],
|
||||
['id_agente' => $agent['id_agent']]
|
||||
);
|
||||
|
||||
|
@ -702,6 +708,10 @@ function planned_downtimes_stop($downtime)
|
|||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
// Nothing to do.
|
||||
break;
|
||||
}
|
||||
|
||||
$message .= ui_print_info_message(
|
||||
|
|
|
@ -748,7 +748,7 @@ function flot_slicesbar_graph(
|
|||
if ($widgets) {
|
||||
$return = "<div id='$graph_id' class='noresizevc graph $adapt_key' style='width: ".$width.'px; height: '.$height."px;'></div>";
|
||||
} 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>";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
?>
|
||||
<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>
|
||||
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.
|
||||
|
|
|
@ -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.
|
|
@ -1,15 +1,12 @@
|
|||
<?php
|
||||
/**
|
||||
* @package Include/help/en
|
||||
* @package Include/help/es
|
||||
*/
|
||||
?>
|
||||
<h1> Logo de Cliente (Marca comunitaria 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.
|
||||
<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é desplegado.
|
||||
<br><br>
|
||||
|
||||
Suba su logo de marca de empresa utilizando el directorio /images/custom_logo directory.
|
||||
|
||||
|
||||
|
||||
La imagen debe tener el formato PNG y un tamaño de 215x60 pixeles.
|
||||
<br><br>
|
||||
Debe subir su logo al directorio /images/custom_logo.
|
||||
|
|
|
@ -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.
|
|
@ -5,8 +5,8 @@
|
|||
?>
|
||||
<h1>カスタムロゴ</h1>
|
||||
|
||||
ここに指定した画像ファイルを、オリジナルロゴとして <?php echo get_product_name(); ?> のヘッダーに表示することができます。
|
||||
表示可能な画像ファイルは PNG 形式です。
|
||||
画像サイズは、206x47ピクセルに修正されます。
|
||||
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>
|
||||
カスタムロゴは、ファイルマネージャを使って /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.
|
||||
|
|
|
@ -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.
|
||||
|
|
@ -241,6 +241,7 @@ function show_massive_response_dialog(
|
|||
},
|
||||
close: function(event, ui) {
|
||||
$(".chk_val").prop("checked", false);
|
||||
$("#event_response_command_window").dialog("close");
|
||||
},
|
||||
width: response["modal_width"],
|
||||
height: response["modal_height"]
|
||||
|
@ -375,7 +376,12 @@ function add_row_param(id_table, param) {
|
|||
}
|
||||
|
||||
// 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 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);
|
||||
|
||||
if (response_params.length > 1 || response_params[0] != "") {
|
||||
for (i = 0; i < response_params.length; i++) {
|
||||
target = target.replace(
|
||||
"_" + response_params[i] + "_",
|
||||
$("#" + response_params[i]).val()
|
||||
);
|
||||
if (!response_command) {
|
||||
target = target.replace(
|
||||
"_" + response_params[i] + "_",
|
||||
$("#" + 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_out_" + out_iterator).html("");
|
||||
|
||||
var finished = 0;
|
||||
var time = Math.round(+new Date() / 1000);
|
||||
var timeout = time + 10;
|
||||
|
||||
var params = [];
|
||||
params.push("page=include/ajax/events");
|
||||
params.push("perform_event_response=1");
|
||||
|
@ -487,7 +495,7 @@ function perform_response_massive(target, response_id, out_iterator) {
|
|||
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) {
|
||||
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
|
||||
);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -16,11 +16,25 @@
|
|||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
.menu {
|
||||
border-width: 0px 0px 0px 0px;
|
||||
border-style: none;
|
||||
border-color: #777;
|
||||
.operation li,
|
||||
.godmode li {
|
||||
display: flex !important;
|
||||
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 {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
|
@ -28,14 +42,13 @@
|
|||
}
|
||||
.menu li.selected,
|
||||
.menu li.not_selected {
|
||||
border: 0px none black;
|
||||
border-bottom: 0px none #d4d4d4;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.menu li a {
|
||||
color: #ffffff;
|
||||
text-decoration: none;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
li:hover ul {
|
||||
|
@ -43,14 +56,11 @@ li:hover ul {
|
|||
}
|
||||
|
||||
.submenu_text {
|
||||
padding: 10.5px;
|
||||
margin-left: 0px;
|
||||
width: 100%;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.menu li.subselected a {
|
||||
background-color: grey !important;
|
||||
color: #9ca4a6;
|
||||
font-family: "Open Sans", sans-serif;
|
||||
font-size: 9.4pt;
|
||||
}
|
||||
|
||||
.menu a:hover {
|
||||
|
@ -61,26 +71,25 @@ li:hover ul {
|
|||
margin: 0px 0px 0px 0px;
|
||||
position: absolute;
|
||||
z-index: 999;
|
||||
left: 44px;
|
||||
min-height: 35px;
|
||||
height: 35px;
|
||||
width: 180px;
|
||||
width: 214px;
|
||||
}
|
||||
|
||||
.submenu2 {
|
||||
position: absolute;
|
||||
z-index: 999;
|
||||
left: 180px;
|
||||
left: 214px;
|
||||
width: 214px;
|
||||
}
|
||||
|
||||
.sub_subMenu {
|
||||
min-height: 35px !important;
|
||||
height: 35px;
|
||||
width: 180px;
|
||||
font-weight: normal !important;
|
||||
background-color: #202020;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.sub_subMenu.selected {
|
||||
font-weight: bold !important;
|
||||
font-weight: 600 !important;
|
||||
}
|
||||
|
||||
.submenu2 li a {
|
||||
|
@ -95,18 +104,10 @@ li:hover ul {
|
|||
border-left: 1px;
|
||||
}
|
||||
|
||||
.menu li.has_submenu > a > div {
|
||||
background: url(../../images/arrow.png) no-repeat 80% 50%;
|
||||
.menu li.has_submenu {
|
||||
background: url(../../images/arrow.png) no-repeat 95% 50%;
|
||||
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.submenu2_not_selected a {
|
||||
|
@ -117,6 +118,18 @@ li:hover ul {
|
|||
margin-bottom: 0px !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 li.links {
|
||||
|
@ -132,21 +145,18 @@ li:hover ul {
|
|||
|
||||
/* Icons specified here */
|
||||
#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 {
|
||||
border-top-right-radius: 5px;
|
||||
border-right-style: solid;
|
||||
border-right-width: 0px;
|
||||
background: url(../../images/op_monitoring.menu.png) no-repeat 50% 50%;
|
||||
background: url(../../images/op_monitoring.menu_gray.png) no-repeat;
|
||||
}
|
||||
#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 */
|
||||
#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 */
|
||||
#icon_oper-snmpc,
|
||||
|
@ -154,7 +164,7 @@ li:hover ul {
|
|||
background: url(../../images/op_snmp.menu.png) no-repeat 50% 50%;
|
||||
}
|
||||
#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 {
|
||||
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%;
|
||||
}
|
||||
#icon_oper-extensions {
|
||||
background: url(../../images/extensions.menu.png) no-repeat 50% 50%;
|
||||
background: url(../../images/extensions.menu_gray.png) no-repeat;
|
||||
}
|
||||
|
||||
/* Godmode images */
|
||||
#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 {
|
||||
background: url(../../images/gm_resources.menu.png) no-repeat 50% 50%;
|
||||
background: url(../../images/gm_resources.menu_gray.png) no-repeat;
|
||||
}
|
||||
#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 {
|
||||
background: url(../../images/gm_alerts.menu.png) no-repeat 50% 50%;
|
||||
background: url(../../images/gm_alerts.menu_gray.png) no-repeat;
|
||||
}
|
||||
#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 {
|
||||
background: url(../../images/reporting_edit.menu.png) no-repeat 50% 50%;
|
||||
}
|
||||
#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 {
|
||||
background: url(../../images/gm_setup.menu.png) no-repeat 50% 50%;
|
||||
background: url(../../images/gm_setup.menu_gray.png) no-repeat;
|
||||
}
|
||||
#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 {
|
||||
background: url(../../images/builder.menu.png) no-repeat 50% 50%;
|
||||
background: url(../../images/builder.menu_gray.png) no-repeat;
|
||||
}
|
||||
#icon_god-links {
|
||||
border-top: 4px solid #777 !important;
|
||||
border-color: #777;
|
||||
background: url(../../images/links.menu.png) no-repeat 50% 50%;
|
||||
background: url(../../images/links.menu_gray.png) no-repeat;
|
||||
}
|
||||
#icon_god-um_messages {
|
||||
border-color: #777;
|
||||
background: url(../../images/um_messages.menu.png) no-repeat 50% 50%;
|
||||
background: url(../../images/um_messages.menu_gray.png) no-repeat;
|
||||
}
|
||||
|
||||
#menu_container {
|
||||
z-index: 3;
|
||||
position: absolute;
|
||||
left: -80px;
|
||||
background-color: #aaa;
|
||||
}
|
||||
|
||||
.notification_ball {
|
||||
|
@ -266,130 +272,217 @@ ul li a:hover {
|
|||
* - 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 {
|
||||
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;
|
||||
background-color: #585858 !important;
|
||||
background-color: #282828 !important;
|
||||
}
|
||||
.submenu_not_selected:hover {
|
||||
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;
|
||||
background-color: #585858 !important;
|
||||
background-color: #202020 !important;
|
||||
}
|
||||
.submenu_selected:hover {
|
||||
background-color: #585858 !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;
|
||||
background-color: #202020 !important;
|
||||
}
|
||||
.sub_subMenu:hover {
|
||||
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;
|
||||
background-color: #585858 !important;
|
||||
background-color: #161616 !important;
|
||||
}
|
||||
|
||||
.menu li.selected {
|
||||
box-shadow: inset 4px 0 #80ba27;
|
||||
}
|
||||
/* creo que no se usan
|
||||
.is_submenu2 li {
|
||||
background-color: #ff0000;
|
||||
}
|
||||
|
||||
.is_submenu2 {
|
||||
background-color: #222222 !important;
|
||||
}
|
||||
*/
|
||||
.operation {
|
||||
background-color: #333 !important;
|
||||
border-top-right-radius: 5px;
|
||||
border-right-style: solid;
|
||||
border-right-width: 0px;
|
||||
background-color: #343434 !important;
|
||||
padding-top: 20px !important;
|
||||
}
|
||||
|
||||
.operation .selected {
|
||||
background-color: #585858 !important;
|
||||
.operation .selected,
|
||||
.godmode .selected {
|
||||
background-color: #282828 !important;
|
||||
}
|
||||
|
||||
.operation .selected #title_menu,
|
||||
.godmode .selected #title_menu {
|
||||
color: #fff !important;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.menu li,
|
||||
.menu .li.not_selected {
|
||||
border-radius: 0px 0px 0px 0px;
|
||||
display: block;
|
||||
.menu li a,
|
||||
.menu li div {
|
||||
min-height: 35px;
|
||||
border-bottom: 0px none #424242;
|
||||
vertical-align: middle;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.godmode,
|
||||
.menu_icon ul li {
|
||||
background-color: #222;
|
||||
}
|
||||
.operation .menu_icon ul li {
|
||||
background-color: #333;
|
||||
.menu li div {
|
||||
background-clip: text; /* Very important to fix a bug in Firefox */
|
||||
}
|
||||
|
||||
.godmode {
|
||||
border-top: 4px solid #777 !important;
|
||||
padding-bottom: 4px !important;
|
||||
border-bottom-right-radius: 5px;
|
||||
border-right-style: solid;
|
||||
border-right-width: 0px;
|
||||
background-color: #343434;
|
||||
}
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
|