Merge branch 'develop' into ent-3543-Cambio-visual-de-radio-buttons-y-checkbox-en-el-setup

Conflicts:
pandora_console/godmode/setup/setup_visuals.php


Former-commit-id: c193f6995a3a4115270cf45d635e310bf0f8cd3a
This commit is contained in:
manuel 2019-03-07 13:45:56 +01:00
commit 1020ec1bd7
114 changed files with 2304 additions and 1876 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{} {}
Version Version
{190304} {190307}
ViewReadme ViewReadme
{Yes} {Yes}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,7 +1,7 @@
<?php <?php
// Pandora FMS - http://pandorafms.com // Pandora FMS - http://pandorafms.com
// ================================================== // ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Copyright (c) 2005-2019 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list // Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License
@ -16,286 +16,226 @@ require_once 'include/functions_notifications.php';
// Check permissions // Check permissions
// Global errors/warnings checking. // Global errors/warnings checking.
config_check(); config_check();
?> ?>
<table width="100%" cellpadding="0" cellspacing="0" style="margin:0px; padding:0px; margin-top: 0px; height: 100%" border="0">
<tr>
<td style="width:90%;">
<a href="index.php?sec=main">
<?php
$custom_logo = 'images/custom_logo/'.$config['custom_logo'];
if (!defined('PANDORA_ENTERPRISE')) { <div id="header_table">
$logo_title = get_product_name().' Opensource'; <div id="header_table_inner">
$custom_logo = 'images/custom_logo/pandora_logo_head_3.png'; <?php
// ======= Notifications Discovery ===============================================
$notifications_numbers = notifications_get_counters();
$header_discovery = '<div id="header_discovery">'.notifications_print_ball(
$notifications_numbers['notifications'],
$notifications_numbers['last_id']
).'</div>';
// ======= Alerts ===============================================
$check_minor_release_available = false;
$pandora_management = check_acl($config['id_user'], 0, 'PM');
$check_minor_release_available = db_check_minor_relase_available();
if ($check_minor_release_available) {
if (users_is_admin($config['id_user'])) {
if ($config['language'] == 'es') {
set_pandora_error_for_header('Hay una o mas revisiones menores en espera para ser actualizadas. <a style="font-size:8pt;font-style:italic;" target="blank" href="http://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Actualizacion#Versi.C3.B3n_7.0NG_.28_Rolling_Release_.29">'.__('Sobre actualización de revisión menor').'</a>', 'Revisión/es menor/es disponible/s');
} else { } else {
if (file_exists(ENTERPRISE_DIR.'/'.$custom_logo)) { set_pandora_error_for_header('There are one or more minor releases waiting for update. <a style="font-size:8pt;font-style:italic;" target="blank" href="http://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Anexo_Upgrade#Version_7.0NG_.28_Rolling_Release_.29">'.__('About minor release update').'</a>', 'minor release/s available');
$custom_logo = ENTERPRISE_DIR.'/'.$custom_logo;
}
$logo_title = get_product_name().' Enterprise';
} }
echo html_print_image(
$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 // Chat messages
$search_bar = '<form method="get" style="display: inline;" name="quicksearch" action="">'; $header_chat = "<div id='header_chat'><span id='icon_new_messages_chat' style='display: none;'>";
if (!isset($config['search_keywords'])) { $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>'; $search_bar .= '<script type="text/javascript"> var fieldKeyWordEmpty = true; </script>';
} else { } else {
if (strlen($config['search_keywords']) == 0) { $search_bar .= '<script type="text/javascript"> var fieldKeyWordEmpty = false; </script>';
$search_bar .= '<script type="text/javascript"> var fieldKeyWordEmpty = true; </script>';
} else {
$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) { $search_bar .= '<input type="text" id="keywords" name="keywords"';
$show_qr_code_header = 'display: none;'; 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 { } 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( $search_bar .= 'onfocus="javascript: if (fieldKeyWordEmpty) $(\'#keywords\').val(\'\');"
'images/qrcode_icon.png', onkeyup="javascript: fieldKeyWordEmpty = false;"
true, style="margin-top:5px;" class="search_input" />';
[
'alt' => __('QR Code of the page'),
'title' => __('QR Code of the page'),
]
).'</a>'.'</div>';
echo "<div style='display: none;' id='qrcode_container' title='".__('QR code of the page')."'>"; // $search_bar .= 'onClick="javascript: document.quicksearch.submit()"';
echo "<div id='qrcode_container_image'></div>"; $search_bar .= "<input type='hidden' name='head_search_keywords' value='abc' />";
echo '</div>'; $search_bar .= '</form>';
?>
<script type='text/javascript'> $header_searchbar = '<div id="header_searchbar">'.ui_print_help_tip(__('Blank characters are used as AND conditions'), true);
$(document).ready(function() { $header_searchbar .= $search_bar.'</div>';
$( "#qrcode_container" ).dialog({ }
autoOpen: false,
modal: true
}); // ======= Autorefresh code =============================
}); $autorefresh_txt = '';
</script> $autorefresh_additional = '';
<?php
if ($config['tutorial_mode'] !== 'expert' && !$config['disable_help']) { $ignored_params = [
$table->data[0]['clippy'] = '<a href="javascript: show_clippy();">'.html_print_image( 'agent_config' => false,
'images/clippy_icon.png', 'code' => false,
true, ];
[
'id' => 'clippy', if (!isset($_GET['sec2'])) {
'class' => 'clippy', $_GET['sec2'] = '';
'alt' => __('%s assistant', get_product_name()), }
'title' => __(
'%s assistant', if (!isset($_GET['refr'])) {
get_product_name() $_GET['refr'] = null;
), }
]
).'</a>'; $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&amp;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>'; if ($do_refresh) {
?> $autorefresh_img = html_print_image('images/header_refresh_gray.png', true, ['class' => 'bot', 'alt' => 'lightning', 'title' => __('Configure autorefresh')]);
</td>
--> if ($_GET['refr']) {
</tr> $autorefresh_txt .= ' (<span id="refrcounter">'.date('i:s', $config['refr']).'</span>)';
</table> }
$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--> <!-- Notifications content wrapper-->
<div id='notification-content' style='display:none;' /></div> <div id='notification-content' style='display:none;' /></div>
<!-- Old style div wrapper --> <!-- Old style div wrapper -->
<div id="alert_messages" style="display: none"></div>; <div id="alert_messages" style="display: none"></div>
<script type="text/javascript"> <script type="text/javascript">
/* <![CDATA[ */ /* <![CDATA[ */
@ -541,7 +481,6 @@ config_check();
?> ?>
$("a.autorefresh_txt").toggle (); $("a.autorefresh_txt").toggle ();
$("#combo_refr").toggle (); $("#combo_refr").toggle ();
$("#combo_refr").css('padding-right', '9px');
href = $("a.autorefresh").attr ("href"); href = $("a.autorefresh").attr ("href");
<?php <?php
if ($select[0]['time_autorefresh']) { if ($select[0]['time_autorefresh']) {
@ -583,6 +522,7 @@ config_check();
<?php <?php
if ($_GET['refr']) { if ($_GET['refr']) {
?> ?>
$("#header_autorefresh").css('padding-right', '5px');
var refr_time = <?php echo (int) get_parameter('refr', 0); ?>; var refr_time = <?php echo (int) get_parameter('refr', 0); ?>;
var t = new Date(); var t = new Date();
t.setTime (t.getTime () + t.setTime (t.getTime () +
@ -603,7 +543,6 @@ config_check();
$("a.autorefresh").click (function () { $("a.autorefresh").click (function () {
$("a.autorefresh_txt").toggle (); $("a.autorefresh_txt").toggle ();
$("#combo_refr").toggle (); $("#combo_refr").toggle ();
$("#combo_refr").css('padding-right', '9px');
$("select#ref").change (function () { $("select#ref").change (function () {
href = $("a.autorefresh").attr ("href"); href = $("a.autorefresh").attr ("href");
$(document).attr ("location", href + this.value); $(document).attr ("location", href + this.value);

View File

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

View File

@ -16,16 +16,80 @@ if (! isset($config['id_user'])) {
exit(); exit();
} }
?>
<script type="text/javascript" language="javascript">
$(document).ready(function(){
var menuType_value = localStorage.getItem("menuType");
if (menuType_value == 'classic') {
$('#menu_full').removeClass('menu_full_collapsed').addClass('menu_full_classic');
$('.logo_icon').css('display','none');
$('.logo_full').css('display','block');
$('div#title_menu').removeClass('title_menu_collapsed').addClass('title_menu_classic');
$('div#page').removeClass('page_collapsed').addClass('page_classic');
$('#header_table').removeClass('header_table_collapsed').addClass('header_table_classic');
$('#button_collapse').removeClass('button_collapsed').addClass('button_classic');
$('ul.submenu').css('left', '214px');
$('li.menu_icon').removeClass('menu_icon_collapsed').addClass("no_hidden_menu");
}
else{
if(menuType_value != 'collapsed'){
localStorage.setItem("menuType", "collapsed");
}
$('#menu_full').removeClass('menu_full_classic').addClass('menu_full_collapsed');
$('.logo_full').css('display','none');
$('.logo_icon').css('display','block');
$('div#title_menu').removeClass('title_menu_classic').addClass('title_menu_collapsed');
$('div#page').removeClass('page_classic').addClass('page_collapsed');
$('#header_table').removeClass('header_table_classic').addClass('header_table_collapsed');
$('#button_collapse').removeClass('button_classic').addClass('button_collapsed');
$('ul.submenu').css('left', '59px');
$('li.menu_icon').removeClass("no_hidden_menu").addClass('menu_icon_collapsed');
}
});
// Set the height of the menu.
$(window).on('load', function (){
$("#menu_full").height($("#container").height());
});
</script>
<?php
$autohidden_menu = 0; $autohidden_menu = 0;
if (isset($config['autohidden_menu']) && $config['autohidden_menu']) { if (isset($config['autohidden_menu']) && $config['autohidden_menu']) {
$autohidden_menu = 1; $autohidden_menu = 1;
} }
$menu_container_id = '';
// Menu container prepared to autohide menu // Menu container prepared to autohide menu
echo '<div id="'.$menu_container_id.'">'; echo '<div id="menu_full">';
$custom_logo = 'images/custom_logo/'.$config['custom_logo'];
$custom_logo_collapsed = 'images/custom_logo/'.$config['custom_logo_collapsed'];
if (!defined('PANDORA_ENTERPRISE')) {
$logo_title = get_product_name().' Opensource';
$custom_logo = 'images/custom_logo/pandora_logo_head_green.png';
$custom_logo_collapsed = 'images/custom_logo/pandora_logo_green_collapsed.png';
} else {
if (file_exists(ENTERPRISE_DIR.'/'.$custom_logo)) {
$custom_logo = ENTERPRISE_DIR.'/'.$custom_logo;
}
$logo_title = get_product_name().' Enterprise';
}
echo '<div class="logo_green"><a href="index.php?sec=main">';
if (isset($config['custom_logo'])) {
echo html_print_image($custom_logo, true, ['border' => '0', 'width' => '215', 'alt' => $logo_title, 'class' => 'logo_full', 'style' => 'display:none']);
}
if (isset($config['custom_logo_collapsed'])) {
echo html_print_image($custom_logo_collapsed, true, ['border' => '0', 'width' => '60', 'alt' => $logo_title, 'class' => 'logo_icon', 'style' => 'display:block']);
}
echo '</a></div>';
// echo '<div class="tit bg titop">:: '.__('Operation').' ::</div>'; // echo '<div class="tit bg titop">:: '.__('Operation').' ::</div>';
require 'operation/menu.php'; require 'operation/menu.php';
@ -45,16 +109,14 @@ if (check_acl($config['id_user'], 0, 'AW')
require 'godmode/menu.php'; require 'godmode/menu.php';
echo '<div id="button_collapse" class="button_collapse"></div>';
// require ("links_menu.php"); // require ("links_menu.php");
echo '</div>'; echo '</div>';
// menu_container // menu_container
ui_require_jquery_file('cookie'); ui_require_jquery_file('cookie');
$config_fixed_menu = false;
if (isset($config['fixed_menu'])) {
$config_fixed_menu = $config['fixed_menu'];
}
$config_fixed_header = false; $config_fixed_header = false;
if (isset($config['fixed_header'])) { if (isset($config['fixed_header'])) {
$config_fixed_header = $config['fixed_header']; $config_fixed_header = $config['fixed_header'];
@ -64,25 +126,35 @@ if (isset($config['fixed_header'])) {
<script type="text/javascript" language="javascript"> <script type="text/javascript" language="javascript">
/* <![CDATA[ */ /* <![CDATA[ */
$('#button_collapse').on('click', function() {
if($('#menu_full').hasClass('menu_full_classic')){
localStorage.setItem("menuType", "collapsed");
$('ul.submenu').css('left', '59px');
}
else if($('#menu_full').hasClass('menu_full_collapsed')){
localStorage.setItem("menuType", "classic");
$('ul.submenu').css('left', '214px');
}
$('.logo_full').toggle();
$('.logo_icon').toggle();
$('#menu_full').toggleClass('menu_full_classic menu_full_collapsed');
$('#button_collapse').toggleClass('button_classic button_collapsed');
$('div#title_menu').toggleClass('title_menu_classic title_menu_collapsed');
$('div#page').toggleClass('page_classic page_collapsed');
$('#header_table').toggleClass('header_table_classic header_table_collapsed');
$('li.menu_icon').toggleClass("no_hidden_menu menu_icon_collapsed");
});
var autohidden_menu = <?php echo $autohidden_menu; ?>; var autohidden_menu = <?php echo $autohidden_menu; ?>;
var fixed_menu = <?php echo json_encode((bool) $config_fixed_menu); ?>;
var fixed_header = <?php echo json_encode((bool) $config_fixed_header); ?>; var fixed_header = <?php echo json_encode((bool) $config_fixed_header); ?>;
var id_user = "<?php echo $config['id_user']; ?>"; var id_user = "<?php echo $config['id_user']; ?>";
var cookie_name = id_user + '-pandora_menu_state'; var cookie_name = id_user + '-pandora_menu_state';
var cookie_name_encoded = btoa(cookie_name); var cookie_name_encoded = btoa(cookie_name);
var click_display = "<?php echo $config['click_display']; ?>"; var click_display = "<?php echo $config['click_display']; ?>";
var classic_menu = parseInt("<?php echo $config['classic_menu']; ?>");
if ((isNaN(classic_menu)) || (classic_menu == 0)) {
classic_menu = false;
}
else {
classic_menu = true;
}
if (classic_menu) {
autohidden_menu = 1;
}
var menuState = $.cookie(cookie_name_encoded); var menuState = $.cookie(cookie_name_encoded);
if (!menuState) { if (!menuState) {
@ -109,236 +181,7 @@ function close_submenus () {
$('div.menu>ul>li.selected>ul').addClass('invisible'); $('div.menu>ul>li.selected>ul').addClass('invisible');
} }
$(document).ready( function() {
//Daniel maya 02/06/2016 Fixed menu position--INI
if (fixed_menu) {
$('div#menu')
.css('position', 'fixed')
.css('z-index', '9000')
.css('top','80px')
}else{
$('div#menu')
.css('z-index', '9000')
}
if (fixed_header) {
$('div#menu')
.css('position', 'fixed')
.css('z-index', '9000')
.css('top','80px')
$('#menu_tab_frame_view').css('margin-top','20px')
}
//Daniel maya 02/06/2016 Fixed menu position--END
/*
$("img.toggle").click (function (e) {
//In case the links gets activated, we don't want to follow link
e.preventDefault();
var menuItem = $(this).parent();
var submenu = menuItem.children("ul");
if (submenu.is(":visible")) {
submenu.slideUp();
if (typeof menuState[menuItem.attr('id')] != 'undefined')
delete menuState[menuItem.attr('id')];
}
else {
submenu.slideDown();
menuState[menuItem.attr('id')] = 1;
}
$.cookie(cookie_name_encoded, JSON.stringify(menuState), {expires: 7});
});
//Cerrar aqui los comentarios cuando esté el menu terminado
if (fixed_menu) {
$('div#menu')
.css('position', 'fixed')
.css('z-index', '9000')
.css('left', '0')
.css('top', $('div#head').innerHeight() + 'px')
.css('height', '100%')
.css('overflow', 'hidden')
.hover(function (e) {
if (!autohidden_menu) {
$(this).css('overflow', 'auto').children('div').css('width', 'auto');
}
}, function (e) {
if (!autohidden_menu) {
$(this).css('overflow', 'hidden').children('div').css('width', '100%');
}
})
.children('div')
.css('margin-bottom', $('div#head').innerHeight() + 'px');
if (!fixed_header) {
$(window).scroll(function () {
if ($(this).scrollTop() <= $('div#head').innerHeight()) {
$('div#menu').css('top', $('div#head').innerHeight() - $(this).scrollTop() + 'px' );
} else {
$('div#menu').css('top', '0');
}
});
}
}
function show_menu () {
$('#menu_container').animate({"left": "+=80px"}, 200, function () {
if (fixed_menu) {
$('#menu_container').parent().css('overflow', 'auto');
}
});
//show_menu_pretty();
}
function show_menu_pretty() {
open_submenus();
$('div.menu ul li').css('background-position', '');
$('ul.submenu li a, li.menu_icon a, li.links a, div.menu>ul>li>img.toggle').show();
$('.titop').css('color', 'white');
$('.bg3').css('color', 'white');
$('.bg4').css('color', 'white');
}
function hide_menu () {
if (fixed_menu) {
$('#menu_container').parent().css('overflow', 'hidden');
}
$('#menu_container').animate({"left": "-=80px"}, 100);
//hide_menu_pretty();
}
function hide_menu_pretty() {
close_submenus();
$('div.menu li').css('background-position', '85px 5px');
$('ul.submenu li a, li.menu_icon a, li.links a, div.menu>ul>li>img.toggle').hide();
$('.titop').css('color', $('.titop').css('background-color'));
$('.bg3').css('color', $('.bg3').css('background-color'));
$('.bg4').css('color', $('.bg4').css('background-color'));
}
*/
if (autohidden_menu) {
//handlerIn, handlerOut);
//openTime = 0;
//handsIn = 0;
//$('#main').css('margin-left', '50px');
//hide_menu_pretty();
/*
$('#menu').hover(function() {
handsIn = 1;
if (openTime == 0) {
show_menu();
openTime = new Date().getTime();
}
}).mouseleave(function() {
handsIn = 0;
setTimeout(function() {
openedTime = new Date().getTime() - openTime;
if(openedTime > 3000 && handsIn == 0) {
hide_menu();
openTime = 0;
}
}, 3500);
});
*/
handsInMenu = 0;
openTimeMenu = 0;
if (classic_menu) {
$('div#title_menu').show();
handsInMenu = 1;
openTimeMenu = new Date().getTime();
$('#menu').css('width', '145px');
$('#menu').css('position', 'block');
$('div#menu').css('top', '80px');
$('li.menu_icon').addClass( " no_hidden_menu" );
$('ul.submenu').css('left', '144px');
$('#menu').mouseleave(function() {
handsInMenu = 0;
setTimeout(function() {
openedMenu = new Date().getTime() - openTimeMenu;
if(openedMenu > 1000 && handsInMenu == 0) {
$('#menu').css('width', '145px');
$('#menu').css('position', 'block');
$('li.menu_icon').addClass( " no_hidden_menu" );
$('ul.submenu').css('left', '144px');
}
}, 2500);
});
}
else {
if(!click_display){
$('#menu').mouseenter(function() {
$('div#title_menu').show();
handsInMenu = 1;
openTimeMenu = new Date().getTime();
$('#menu').css('width', '145px');
$('li.menu_icon').addClass( " no_hidden_menu" );
$('li.menu_icon').find('li').addClass( " no_hidden_menu" );
$('ul.submenu').css('left', '144px');
}).mouseleave(function() {
handsInMenu = 0;
setTimeout(function() {
openedMenu = new Date().getTime() - openTimeMenu;
if(openedMenu > 1000 && handsInMenu == 0) {
$('#menu').css('width', '45px');
$('li.menu_icon').removeClass( " no_hidden_menu");
$('li.menu_icon').find('li').removeClass( " no_hidden_menu" );
$('ul.submenu').css('left', '44px');
$('div#title_menu').hide();
}
}, 2500);
});
}else{
$(document).ready(function() {
$('#menu').on("click", function() {
$('div#title_menu').show();
handsInMenu = 1;
openTimeMenu = new Date().getTime();
$('#menu').css('width', '145px');
$('li.menu_icon').addClass( " no_hidden_menu" );
$('li.menu_icon').find('li').addClass( " no_hidden_menu" );
$('ul.submenu').css('left', '144px');
}).mouseleave(function() {
handsInMenu = 0;
setTimeout(function() {
openedMenu = new Date().getTime() - openTimeMenu;
if(openedMenu > 1000 && handsInMenu == 0) {
$('#menu').css('width', '45px');
$('li.menu_icon').removeClass( " no_hidden_menu");
$('li.menu_icon').find('li').removeClass( " no_hidden_menu" );
$('ul.submenu').css('left', '44px');
$('div#title_menu').hide();
}
}, 5500);
});
});
}
}
}
else {
$('div#title_menu').hide();
if(!click_display){
$('#menu').mouseenter(function() {
handsInMenu = 1;
openTimeMenu = new Date().getTime();
$('ul.submenu').css('left', '44px');
}).mouseleave(function() {
handsInMenu = 0;
setTimeout(function() {
openedMenu = new Date().getTime() - openTimeMenu;
if(openedMenu > 1000 && handsInMenu == 0) {
$('li.menu_icon').removeClass( " no_hidden_menu");
$('li.menu_icon').find('li').removeClass( " no_hidden_menu" );
$('ul.submenu').css('left', '44px');
}
}, 2500);
});
}
}
});
/* ]]> */ /* ]]> */
</script> </script>
@ -348,182 +191,199 @@ $(document).ready( function() {
handsIn = 0; handsIn = 0;
handsIn2 = 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); table_hover = $(this);
handsIn = 1; handsIn = 1;
openTime = new Date().getTime(); openTime = new Date().getTime();
$("ul#sub"+table_hover[0].id).show(); $("ul#sub"+table_hover[0].id).show();
if( typeof(table_noHover) != 'undefined') get_menu_items(table_hover);
if ( "ul#sub"+table_hover[0].id != "ul#sub"+table_noHover[0].id )
$("ul#sub"+table_noHover[0].id).hide();
}).mouseleave(function() { }).mouseleave(function() {
table_noHover = $(this); table_noHover = $(this);
handsIn = 0; handsIn = 0;
setTimeout(function() { setTimeout(function() {
opened = new Date().getTime() - openTime; opened = new Date().getTime() - openTime;
if(opened > 3000 && handsIn == 0) { if(opened > 5000 && handsIn == 0) {
openTime = 4000; openTime = 6000;
$("ul#sub"+table_hover[0].id).hide(); $("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{ }else{
$(document).ready(function() { $('#main').click(function() {
if (autohidden_menu) { openTime = 4000;
$('.menu_icon').on("click", function() { if( typeof(table_hover) != 'undefined')
if( typeof(table_hover) != 'undefined'){ $("ul#sub"+table_hover[0].id).hide();
$("ul#sub"+table_hover[0].id).hide(); if( typeof(table_hover2) != 'undefined')
} $("ul#sub"+table_hover2[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();
});
}
}); });
} }
- $('.has_submenu').mouseenter(function() {
table_hover2 = $(this); $('div.menu>ul>li>ul>li>a').click(function() {
handsIn2 = 1; openTime = 4000;
openTime2 = new Date().getTime(); if( typeof(table_hover) != 'undefined')
$("#sub"+table_hover2[0].id).show(); $("ul#sub"+table_hover[0].id).hide();
if( typeof(table_noHover2) != 'undefined') if( typeof(table_hover2) != 'undefined')
if ( "ul#sub"+table_hover2[0].id != "ul#sub"+table_noHover2[0].id ) $("ul#sub"+table_hover2[0].id).hide();
$("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() { $('div.menu>ul>li>ul>li>ul>li>a').click(function() {
if (!classic_menu) { openTime = 4000;
//Daniel maya 02/06/2016 Display menu with click --INI if( typeof(table_hover) != 'undefined')
if(!click_display){ $("ul#sub"+table_hover[0].id).hide();
$('#container').click(function() { if( typeof(table_hover2) != 'undefined')
openTime = 4000; $("ul#sub"+table_hover2[0].id).hide();
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');
});
}
}
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();
});
}
}); });
});
</script> </script>

View File

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

View File

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

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 664 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 294 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 516 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 510 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 813 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 311 B

After

Width:  |  Height:  |  Size: 342 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 748 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 755 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 881 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 611 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 305 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 458 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 313 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 364 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 471 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 498 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 490 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 621 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 531 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 416 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 871 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 630 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 739 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 355 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 651 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 624 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 599 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 441 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 B

View File

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

View File

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

View File

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

Binary file not shown.

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,4 +1,7 @@
/** /**
*
* Name: Default theme
*
* Extension to manage a list of gateways and the node address where they should * Extension to manage a list of gateways and the node address where they should
* point to. * point to.
* *
@ -26,15 +29,74 @@
* ============================================================================ * ============================================================================
*/ */
/* Tree view styles */
/*@import url(tree.css);
@import url(fixed-bottom-box.css);*/
/* /*
* --------------------------------------------------------------------- * ---------------------------------------------------------------------
* - GENERAL STYLES - * - GENERAL STYLES -
* --------------------------------------------------------------------- * ---------------------------------------------------------------------
*/ */
/* latin-ext */
@font-face {
font-family: "Open Sans";
font-style: normal;
font-weight: 400;
src: local("Open Sans Regular"), local("OpenSans-Regular"),
url(../fonts/mem8YaGs126MiZpBA-UFW50bbck.woff2) format("woff2");
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,
U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: "Open Sans";
font-style: normal;
font-weight: 400;
src: local("Open Sans Regular"), local("OpenSans-Regular"),
url(../fonts/mem8YaGs126MiZpBA-UFVZ0b.woff2) format("woff2");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
font-family: "Open Sans";
font-style: normal;
font-weight: 600;
src: local("Open Sans SemiBold"), local("OpenSans-SemiBold"),
url(../fonts/mem5YaGs126MiZpBA-UNirkOXOhpOqc.woff2) format("woff2");
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,
U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: "Open Sans";
font-style: normal;
font-weight: 600;
src: local("Open Sans SemiBold"), local("OpenSans-SemiBold"),
url(../fonts/mem5YaGs126MiZpBA-UNirkOUuhp.woff2) format("woff2");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
font-family: "Open Sans";
font-style: normal;
font-weight: 700;
src: local("Open Sans Bold"), local("OpenSans-Bold"),
url(../fonts/mem5YaGs126MiZpBA-UN7rgOXOhpOqc.woff2) format("woff2");
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,
U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: "Open Sans";
font-style: normal;
font-weight: 700;
src: local("Open Sans Bold"), local("OpenSans-Bold"),
url(../fonts/mem5YaGs126MiZpBA-UN7rgOUuhp.woff2) format("woff2");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
U+FEFF, U+FFFD;
}
@font-face { @font-face {
font-family: "Nunito"; font-family: "Nunito";
font-style: normal; font-style: normal;
@ -135,11 +197,14 @@ a:hover {
color: #373737; color: #373737;
text-decoration: underline; text-decoration: underline;
} }
:focus {
outline-color: #82b92e;
}
a:focus, a:focus,
input:focus, input:focus,
button:focus { button:focus {
outline-width: 0;
outline: 0; outline: 0;
outline-width: 0;
} }
th > label { th > label {
padding-top: 7px; padding-top: 7px;
@ -331,7 +396,7 @@ th {
/* /*
* --------------------------------------------------------------------- * ---------------------------------------------------------------------
* - GLOBAL STYLES - * - GLOBAL STYLES -
* --------------------------------------------------------------------- * ---------------------------------------------------------------------
*/ */
div#page { div#page {
@ -339,6 +404,10 @@ div#page {
background-image: none; background-image: none;
clear: both; clear: both;
width: auto; width: auto;
margin-top: 20px !important;
padding-left: 60px; /* This is overwritten by the classic menu (215px)*/
margin-right: 35px;
margin-left: 35px;
} }
body.pure { body.pure {
@ -356,12 +425,10 @@ div#container {
div#main { div#main {
width: auto; width: auto;
margin: 0px 0% 0px 0%; margin: 0 auto;
float: left;
position: relative; position: relative;
min-height: 850px; min-height: 850px;
margin-left: 60px; max-width: 100%;
max-width: 93%;
min-width: 93%; min-width: 93%;
} }
@ -377,14 +444,6 @@ textarea.conf_error {
background-position: top right; background-position: top right;
} }
input.button {
font-family: Arial, Sans-serif;
border: 4px solid #ccc;
background: #fff;
padding: 2px 3px;
margin: 10px 15px;
}
a.white_bold { a.white_bold {
color: #eee; color: #eee;
text-decoration: none; text-decoration: none;
@ -588,17 +647,22 @@ a.footer span {
} }
div#foot { div#foot {
font-size: 6pt !important;
border-top: solid 2px #222;
padding-top: 8px; padding-top: 8px;
padding-bottom: 5px; padding-bottom: 5px;
text-align: center; text-align: center;
background: #333333; background: #343434;
height: 30px; height: 30px;
clear: both; clear: both;
width: auto; width: auto;
} }
div#foot a,
div#foot span {
font-family: "Open Sans", sans-serif;
font-size: 8.5pt;
color: #9ca4a6;
}
/* /*
* --------------------------------------------------------------------- * ---------------------------------------------------------------------
* - HEADER AND LEFT MENU STYLES - * - HEADER AND LEFT MENU STYLES -
@ -625,13 +689,12 @@ div#head {
width: 100%; width: 100%;
height: 60px; height: 60px;
padding-top: 0px; padding-top: 0px;
margin-bottom: 20px; margin: 0 auto;
border-bottom-style: solid; border-bottom: 1px solid #9ca4a6;
border-bottom-width: 3px;
border-color: #82b92e;
min-width: 882px; min-width: 882px;
background-color: #333; background-color: #fff;
color: white; color: #000;
z-index: 2;
} }
.fixed_header { .fixed_header {
@ -991,11 +1054,6 @@ tr.disabled_row_user * {
} }
/* global syles */ /* global syles */
.bg {
/* op menu */
background: #82b92e;
}
.bg { .bg {
/* op menu */ /* op menu */
background: #82b92e; background: #82b92e;
@ -1198,7 +1256,7 @@ div.title_line {
#menu_tab_frame, #menu_tab_frame,
#menu_tab_frame_view { #menu_tab_frame_view {
display: block !important; display: block !important;
border-bottom: 1px solid #80ba27; border-bottom: 2px solid #82b92e;
max-height: 31px; max-height: 31px;
min-height: 31px; min-height: 31px;
width: 100%; width: 100%;
@ -1247,16 +1305,14 @@ div.title_line {
color: #fff; color: #fff;
} }
#menu_tab li.nomn { #menu_tab li.nomn,
min-width: 30px;
height: 28px;
}
#menu_tab li.nomn_high { #menu_tab li.nomn_high {
min-width: 30px; min-width: 30px;
height: 28px; height: 28px;
margin-top: 0;
} }
/* --- Submenu --- */ /* --- Tabs Submenu --- */
ul.subsubmenu { ul.subsubmenu {
border-bottom-right-radius: 5px; border-bottom-right-radius: 5px;
border-bottom-left-radius: 5px; border-bottom-left-radius: 5px;
@ -1264,12 +1320,10 @@ ul.subsubmenu {
-moz-border-bottom-left-radius: 5px; -moz-border-bottom-left-radius: 5px;
-webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-right-radius: 5px;
-webkit-border-bottom-left-radius: 5px; -webkit-border-bottom-left-radius: 5px;
background: #ececec !important;
} }
ul.subsubmenu li { ul.subsubmenu li {
background-color: #ececec; background-color: #fff;
font-weight: bold; font-weight: bold;
text-decoration: none; text-decoration: none;
font-size: 14px; font-size: 14px;
@ -1968,25 +2022,123 @@ div#pandora_logo_header {
float: left; float: left;
} }
#header_table img { /*
* ---------------------------------------------------------------------
* - HEADER -
* ---------------------------------------------------------------------
*/
#header_table {
margin: 0px;
padding: 0px;
margin-top: 0px; margin-top: 0px;
padding-left: 95px; /* This is overwritten by the classic menu */
padding-right: 35px;
}
#header_table_inner {
height: 60px;
/*width: 100%;*/
display: flex;
align-items: center;
justify-content: space-between;
}
#header_table_inner a,
#header_table_inner span {
font-family: "Open Sans", sans-serif;
}
.header_left {
display: flex;
justify-content: flex-start;
align-items: center;
}
.header_center {
display: flex;
justify-content: center;
align-items: center;
}
.header_right {
display: flex;
justify-content: flex-end;
align-items: center;
}
.header_left > div,
.header_center > div {
padding-right: 15px;
}
.header_right > div {
padding-left: 15px;
}
#header_table_inner #header_user span {
color: #777;
}
.header_left img,
.header_center img,
.header_right img {
vertical-align: middle;
}
#header_user img {
padding-right: 5px;
}
#header_alert,
#header_message {
padding-right: 0px;
}
#header_alert p,
#header_message p {
border-radius: 50%;
padding: 0;
margin: 0;
width: 15px;
position: relative;
height: 15px;
top: -5px;
text-align: center;
display: inline-block;
vertical-align: super;
}
#header_alert p {
background-color: #ec4e1b;
left: -12px;
}
#header_message p {
background-color: #82b92e;
left: -9px;
}
#header_alert span,
#header_message span {
color: #fff;
font-size: 7pt;
font-weight: 600;
font-family: "Open Sans", sans-serif;
} }
.autorefresh_disabled { .autorefresh_disabled {
cursor: not-allowed !important; cursor: not-allowed !important;
} }
a.autorefresh { a.autorefresh_txt,
padding-right: 8px;
}
#refrcounter { #refrcounter {
color: white; color: #1c1c1c;
font-size: 8.5pt;
} }
/*
#combo_refr select { #combo_refr select {
margin-right: 8px; margin-right: 8px;
} }*/
.disabled_module { .disabled_module {
color: #aaa; color: #aaa;
@ -1997,22 +2149,6 @@ div.warn {
padding: 2px 1px 6px 25px; padding: 2px 1px 6px 25px;
} }
.submenu_not_selected {
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;
font-weight: normal !important;
}
/* Submenus havent borders */ /* Submenus havent borders */
.submenu_not_selected, .submenu_not_selected,
.submenu_selected, .submenu_selected,
@ -2021,9 +2157,6 @@ div.warn {
min-height: 35px !important; min-height: 35px !important;
} }
ol.steps {
margin-bottom: 70px;
}
div#steps_clean { div#steps_clean {
display: none; display: none;
} }
@ -2728,16 +2861,27 @@ a.tip > img {
* --------------------------------------------------------------------- * ---------------------------------------------------------------------
*/ */
input.search_input { input.search_input {
background: white url("../../images/input_zoom.png") no-repeat right; background-image: url("../../images/input_zoom_gray.png");
background-position: center right 10px;
background-repeat: no-repeat;
background-size: 17px;
background-color: #f2f6f7 !important;
padding: 0px; padding: 0px;
padding-left: 5px;
margin: 0; margin: 0;
width: 80%; width: 200px;
height: 19px; height: 35px;
margin-bottom: 5px; margin-bottom: 5px;
margin-left: 2px; margin-left: 2px;
padding-right: 25px; padding-left: 15px;
color: #999; padding-right: 40px;
color: #777;
font-family: "Open Sans", sans-serif;
font-size: 8.5pt;
border-top-left-radius: 50px;
border-bottom-left-radius: 50px;
border-top-right-radius: 50px;
border-bottom-right-radius: 50px;
border-color: transparent;
} }
/*.vertical_fields td input, .vertical_fields td select { /*.vertical_fields td input, .vertical_fields td select {
@ -2809,6 +2953,7 @@ div.nodata_container {
position: absolute; position: absolute;
top: 0; top: 0;
right: 20px; right: 20px;
background: #f9faf9;
} }
#rmf_data { #rmf_data {
@ -3119,12 +3264,14 @@ div.div_groups_status {
} }
#title_menu { #title_menu {
color: #fff; color: #9ca4a6;
float: right; float: right;
width: 70%; width: 72%;
letter-spacing: 0pt; letter-spacing: 0pt;
font-size: 8pt; font-size: 10pt;
white-space: pre-wrap; white-space: pre-wrap;
padding-top: 0 !important;
font-family: "Open Sans", sans-serif;
} }
.no_hidden_menu { .no_hidden_menu {
@ -3133,22 +3280,26 @@ div.div_groups_status {
#menu_tab li.nomn, #menu_tab li.nomn,
#menu_tab li.nomn_high { #menu_tab li.nomn_high {
background-color: #ececec; background-color: #fff;
padding-right: 3px; padding-right: 3px;
padding-left: 3px; padding-left: 3px;
font-weight: bold; font-weight: bold;
text-decoration: none; text-decoration: none;
font-size: 14px; font-size: 14px;
border-color: #e2e2e2; border-left: 2px solid #e2e2e2;
border-style: solid; margin-top: 0;
border-width: 1px; min-width: 30px;
margin-top: -10px; height: 28px;
}
#menu_tab li:hover {
background-color: #ececec;
} }
#menu_tab li.nomn_high, #menu_tab li.nomn_high,
#menu_tab li.nomn_high span { #menu_tab li.nomn_high span {
color: #fff; color: #fff;
background-color: #fff; background-color: #ececec;
} }
#menu_tab li.nomn img, #menu_tab li.nomn img,
@ -3507,7 +3658,7 @@ div.simple_value > a > span.text p {
.modalheadertext { .modalheadertext {
color: white; color: white;
position: relative; position: relative;
font-family: Nunito; font-family: "Nunito", sans-serif;
font-size: 13pt; font-size: 13pt;
top: 8px; top: 8px;
} }
@ -3520,7 +3671,7 @@ div.simple_value > a > span.text p {
background-color: #82b92e; background-color: #82b92e;
color: white; color: white;
position: relative; position: relative;
font-family: Nunito; font-family: "Nunito", sans-serif;
font-size: 11pt; font-size: 11pt;
} }
.modalclosex { .modalclosex {
@ -3587,7 +3738,7 @@ div.simple_value > a > span.text p {
-o-transition-property: background-color, color; -o-transition-property: background-color, color;
-o-transition-duration: 1s; -o-transition-duration: 1s;
color: #82b92e; color: #82b92e;
font-family: Nunito; font-family: "Nunito", sans-serif;
font-size: 10pt; font-size: 10pt;
position: relative; position: relative;
top: 6px; top: 6px;
@ -3646,7 +3797,7 @@ div.simple_value > a > span.text p {
-o-transition-property: background-color, color; -o-transition-property: background-color, color;
-o-transition-duration: 1s; -o-transition-duration: 1s;
color: #fa5858; color: #fa5858;
font-family: Nunito; font-family: "Nunito", sans-serif;
font-size: 10pt; font-size: 10pt;
position: relative; position: relative;
top: 6px; top: 6px;
@ -3704,7 +3855,7 @@ div.simple_value > a > span.text p {
-o-transition-property: background-color, color; -o-transition-property: background-color, color;
-o-transition-duration: 1s; -o-transition-duration: 1s;
color: #82b92e; color: #82b92e;
font-family: Nunito; font-family: "Nunito", sans-serif;
font-size: 10pt; font-size: 10pt;
position: relative; position: relative;
top: 6px; top: 6px;
@ -4140,9 +4291,6 @@ form ul.form_flex li ul li {
} }
/* snmp */ /* snmp */
#snmp_data {
background: #f9faf9;
}
#snmp_data .databox { #snmp_data .databox {
border: 0px; border: 0px;
} }
@ -4262,10 +4410,10 @@ div#dialog_messages table th:last-child {
*/ */
.notification-ball { .notification-ball {
border: white solid 2px; border: #343434 solid 2px;
border-radius: 50px; border-radius: 50%;
width: 18px; width: 20px;
height: 18px; height: 20px;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
@ -4567,3 +4715,25 @@ input:checked + .p-slider:before {
} }
/* --- END TOAST --- */ /* --- END TOAST --- */
/* Button for Go to top */
#top_btn {
display: none;
position: fixed;
bottom: 100px;
right: 4px;
border: none;
outline: none;
background: url("../../images/to_top_menu.png") no-repeat center;
background-color: #82b92e;
width: 27px;
height: 27px;
cursor: pointer;
border-radius: 5px;
}
#top_btn:hover {
background: url("../../images/to_top_menu_hover.png") no-repeat center;
background-color: #fff;
border: 2px solid #82b92e;
}

View File

@ -1023,20 +1023,12 @@ if (get_parameter('login', 0) !== 0) {
// Header // Header
if ($config['pure'] == 0) { if ($config['pure'] == 0) {
if ($config['classic_menu']) { echo '<div id="container"><div id="head">';
echo '<div id="container"><div id="head">'; include 'general/header.php';
include 'general/header.php'; echo '</div><div id="page"><div id="menu">';
echo '</div><div id="menu">'; include 'general/main_menu.php';
include 'general/main_menu.php'; echo '</div>';
echo '</div>'; echo '<button onclick="topFunction()" id="top_btn" title="Go to top"></button>';
echo '<div style="padding-left:100px;" id="page">';
} else {
echo '<div id="container"><div id="head">';
include 'general/header.php';
echo '</div><div id="page" style="margin-top:20px;"><div id="menu">';
include 'general/main_menu.php';
echo '</div>';
}
} else { } else {
echo '<div id="main_pure">'; echo '<div id="main_pure">';
// Require menu only to build structure to use it in ACLs // Require menu only to build structure to use it in ACLs
@ -1248,6 +1240,27 @@ require 'include/php_to_js_values.php';
?> ?>
<script type="text/javascript" language="javascript"> <script type="text/javascript" language="javascript">
// When the user scrolls down 400px from the top of the document, show the button.
window.onscroll = function() {scrollFunction()};
function scrollFunction() {
if (document.body.scrollTop > 400 || document.documentElement.scrollTop > 400) {
document.getElementById("top_btn").style.display = "block";
} else {
document.getElementById("top_btn").style.display = "none";
}
}
// When the user clicks on the button, scroll to the top of the document.
function topFunction() {
//document.body.scrollTop = 0; // For Safari.
//document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera.
$("HTML, BODY").animate({ scrollTop: 0 }, 500);
}
//Initial load of page //Initial load of page
$(document).ready(adjustFooter); $(document).ready(adjustFooter);

View File

@ -128,8 +128,8 @@
</div> </div>
<div style='height: 10px'> <div style='height: 10px'>
<?php <?php
$version = '7.0NG.732'; $version = '7.0NG.732';
$build = '190304'; $build = '190307';
$banner = "v$version Build $build"; $banner = "v$version Build $build";
error_reporting(0); error_reporting(0);

View File

@ -988,6 +988,10 @@ if ($group_rep == 2) {
'A maximum of %s event custom responses can be selected', 'A maximum of %s event custom responses can be selected',
$config['max_execution_event_response'] $config['max_execution_event_response']
).'</span>'; ).'</span>';
echo '<span id="max_custom_selected" style="display:none; color:#FC4444; line-height: 200%;">';
echo __(
'Please, select an event'
).'</span>';
echo '</div>'; echo '</div>';
} }
} }
@ -998,9 +1002,11 @@ if ($group_rep == 2) {
function execute_event_response(event_list_btn) { function execute_event_response(event_list_btn) {
$('#max_custom_event_resp_msg').hide(); $('#max_custom_event_resp_msg').hide();
$('#max_custom_selected').hide();
var response_id = $('select[name=response_id]').val(); var response_id = $('select[name=response_id]').val();
if (!isNaN(response_id)) { // It is a custom response if (!isNaN(response_id)) { // It is a custom response
var response = get_response(response_id); var response = get_response(response_id);
@ -1015,59 +1021,58 @@ if ($group_rep == 2) {
var total_checked = $(".chk_val:checked").length; var total_checked = $(".chk_val:checked").length;
// Limit number of events to apply custom responses to for performance reasons // Check select an event.
if(total_checked == 0){
$('#max_custom_selected').show();
return;
}
// Limit number of events to apply custom responses
// to for performance reasons.
if (total_checked > <?php echo $config['max_execution_event_response']; ?> ) { if (total_checked > <?php echo $config['max_execution_event_response']; ?> ) {
$('#max_custom_event_resp_msg').show(); $('#max_custom_event_resp_msg').show();
return; return;
} }
var response_command = [];
$(".response_command_input").each(function() {
response_command[$(this).attr("name")] = $(this).val();
});
if (event_list_btn) { if (event_list_btn) {
$('#button-submit_event_response').hide(function() { $('#button-submit_event_response').hide(function() {
$('#response_loading_dialog').show(function() { $('#response_loading_dialog').show(function() {
var check_params = get_response_params(
response_id
);
$(".chk_val").each(function() { if(check_params[0] !== ''){
if ($(this).is(":checked")) { show_event_response_command_dialog(
event_id = $(this).val(); response_id,
server_id = $('#hidden-server_id_'+event_id).val(); response,
response['target'] = get_response_target( total_checked
event_id, );
response_id, }
server_id else{
); check_massive_response_event(
if (total_checked-1 === counter) end=1; response_id,
show_massive_response_dialog( response,
event_id, total_checked,
response_id, response_command
response, );
counter, }
end
);
counter++;
}
});
}); });
}); });
} }
else { else {
$('#button-btn_str').hide(function() { $('#button-btn_str').hide(function() {
$('#execute_again_loading').show(function() { $('#execute_again_loading').show(function() {
check_massive_response_event(
$(".chk_val").each(function() { response_id,
response,
if ($(this).is(":checked")) { total_checked,
//var server_id = $('#hidden-server_id_'+). response_command
event_id = $(this).val(); );
server_id = $('#hidden-server_id_'+event_id).val();
response['target'] = get_response_target(event_id, response_id, server_id);
if (total_checked-1 === counter) end=1;
show_massive_response_dialog(event_id, response_id, response, counter, end);
counter++;
}
});
}); });
}); });
} }
@ -1087,6 +1092,42 @@ if ($group_rep == 2) {
} }
} }
} }
function check_massive_response_event(
response_id,
response,
total_checked,
response_command
){
var counter=0;
var end=0;
$(".chk_val").each(function() {
if ($(this).is(":checked")) {
event_id = $(this).val();
server_id = $('#hidden-server_id_'+event_id).val();
response['target'] = get_response_target(
event_id,
response_id,
server_id,
response_command
);
if (total_checked-1 === counter)
end=1;
show_massive_response_dialog(
event_id,
response_id,
response,
counter,
end
);
counter++;
}
});
}
</script> </script>
<?php <?php
} else { } else {

View File

@ -611,6 +611,7 @@ if ($delete) {
echo "<div id='event_details_window'></div>"; echo "<div id='event_details_window'></div>";
echo "<div id='event_response_window'></div>"; echo "<div id='event_response_window'></div>";
echo "<div id='event_response_command_window' title='".__('Parameters')."'></div>";
ui_require_jquery_file('bgiframe'); ui_require_jquery_file('bgiframe');
ui_require_javascript_file('pandora_events'); ui_require_javascript_file('pandora_events');

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