Merge remote-tracking branch 'origin/develop' into ent-4457-bug-visual-style-font

This commit is contained in:
marcos.alconada 2019-09-05 12:03:37 +02:00
commit 9e4b5ca5c8
151 changed files with 1913 additions and 1296 deletions

View File

@ -1,170 +1,183 @@
var max_events;
var bg;
$(document).ready(function(){
max_events=localStorage["events"];
if(localStorage["events"]==undefined){
localStorage["events"]="20";
}
bg=chrome.extension.getBackgroundPage();
$(document).ready(function() {
max_events = localStorage["events"];
if (localStorage["events"] == undefined) {
localStorage["events"] = "20";
}
bg = chrome.extension.getBackgroundPage();
// Display the information
if (bg.fetchEvents().length == 0) {
showError("Error in fetching data!! Check your internet connection");
} else {
showEvents();
}
// Display the information
if (bg.fetchEvents().length == 0) {
showError("No events");
} else {
showEvents();
}
// Adding buttons listeners
document.getElementById("m_refresh").addEventListener("click", mrefresh);
// Adding buttons listeners
document.getElementById("m_refresh").addEventListener("click", mrefresh);
// Added listener to background messages
chrome.runtime.onMessage.addListener(function(message,sender,sendResponse){
switch (message.text) {
case "FETCH_EVENTS":
setSpinner();
//$('div.b').hide();
break;
case "FETCH_EVENTS_SUCCESS":
unsetSpinner();
showEvents();
break;
case "FETCH_EVENTS_DATA_ERROR":
unsetSpinner();
showError("Error in fetching data!! Check your internet connection");
break;
case "FETCH_EVENTS_URL_ERROR":
unsetSpinner();
showError("Configure ip address,API password, user name and password with correct values");
break;
default:
console.log("Unrecognized message: ", message.text);
break;
}
});
// Added listener to background messages
chrome.runtime.onMessage.addListener(function(message, sender, sendResponse) {
switch (message.text) {
case "FETCH_EVENTS":
setSpinner();
//$('div.b').hide();
break;
case "FETCH_EVENTS_SUCCESS":
unsetSpinner();
showEvents();
break;
case "FETCH_EVENTS_DATA_ERROR":
unsetSpinner();
showError("Error in fetching data!! Check your internet connection");
break;
case "FETCH_EVENTS_URL_ERROR":
unsetSpinner();
showError(
"Configure ip address,API password, user name and password with correct values"
);
break;
default:
console.log("Unrecognized message: ", message.text);
break;
}
});
});
function setSpinner () {
$('#refr_img_id').attr("src", "images/spinny.gif");
function setSpinner() {
$("#refr_img_id").attr("src", "images/spinny.gif");
}
function unsetSpinner() {
$('#refr_img_id').attr("src", "images/refresh.png");
$("#refr_img_id").attr("src", "images/refresh.png");
}
function clearError() {
$('.error').hide();
$('.error a').text("");
$('.result').css('height', null);
$(".error").hide();
$(".error a").text("");
$(".result").css("height", null);
}
function showError(text){
$('.error a').text(text);
$('.error').show();
$('.result').height(420);
function showError(text) {
$(".error a").text(text);
$(".error").show();
$(".result").height(420);
}
function showEvents(){
function showEvents() {
clearError();
$("#events").empty();
var e_refr = document.getElementById("event_temp");
if (e_refr) {
wrapper.removeChild(e_refr);
}
var allEvents = bg.fetchEvents();
var notVisitedEvents = bg.fetchNotVisited();
var eve = document.createElement("div");
eve.id = "event_temp";
eve.setAttribute("class", "b");
clearError();
$('#events').empty();
var e_refr = document.getElementById('event_temp');
if(e_refr){
wrapper.removeChild(e_refr);
}
var allEvents = bg.fetchEvents();
var notVisitedEvents = bg.fetchNotVisited();
var eve=document.createElement('div');
eve.id="event_temp";
eve.setAttribute("class","b");
var i=0;
if(allEvents.length>0){
while(i<max_events && i<allEvents.length){
var eve_title=document.createElement('div');
eve_title.id = 'e_' + i + '_' + allEvents[i]['id'];
var img = document.createElement('img');
img.src = 'images/plus.png';
img.className ='pm';
img.id='i_' + i + '_' + allEvents[i]['id'];
eve_title.appendChild(img);
var div_empty = document.createElement('img');
var a = document.createElement('a');
var temp_style;
var agent_url = (allEvents[i]["agent"] == 0)
? localStorage["ip_address"]
+ "/index.php?sec=eventos&sec2=operation/events/events"
: localStorage["ip_address"]
+ "/index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente="
+ allEvents[i]['agent'];
a.setAttribute("href",agent_url);
a.target = "_blank";
a.className = 'a_2_mo';
a.innerText = allEvents[i]['title'];
eve_title.setAttribute("class","event sev-" + allEvents[i]['severity']);
var i = 0;
if (allEvents.length > 0) {
while (i < max_events && i < allEvents.length) {
var eve_title = document.createElement("div");
eve_title.id = "e_" + i + "_" + allEvents[i]["id"];
var img = document.createElement("img");
img.src = "images/plus.png";
img.className = "pm";
img.id = "i_" + i + "_" + allEvents[i]["id"];
eve_title.appendChild(img);
var div_empty = document.createElement("img");
var a = document.createElement("a");
var temp_style;
if (notVisitedEvents[allEvents[i]['id']] === true) {
eve_title.style.fontWeight = 600;
}
eve_title.appendChild(a);
eve.appendChild(eve_title);
var time=allEvents[i]['date'].split(" ");
var time_text = time[0]+" "+time[1];
var p = document.createElement('p');
var id = (allEvents[i]['module']==0)
? "."
: " in the module with Id "+ allEvents[i]['module'] + ".";
p.innerText = allEvents[i]['type']+" : "+allEvents[i]['source']+". Event occured at "+ time_text+id;
p.id = 'p_' + i;
eve_title.appendChild(p);
i++;
}
$('#events').append(eve);
var agent_url =
allEvents[i]["agent"] == 0
? localStorage["ip_address"] +
"/index.php?sec=eventos&sec2=operation/events/events"
: localStorage["ip_address"] +
"/index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=" +
allEvents[i]["agent"];
a.setAttribute("href", agent_url);
a.target = "_blank";
a.className = "a_2_mo";
$('img.pm').click(showHide);
$('div.b').show();
} else {
showError("Error in fetching data!! Check your internet connection");
}
localStorage["new_events"]=0;
bg.updateBadge();
a.innerText = allEvents[i]["title"];
eve_title.setAttribute("class", "event sev-" + allEvents[i]["severity"]);
if (notVisitedEvents[allEvents[i]["id"]] === true) {
eve_title.style.fontWeight = 600;
}
eve_title.appendChild(a);
eve.appendChild(eve_title);
var time = allEvents[i]["date"].split(" ");
var time_text = time[0] + " " + time[1];
var p = document.createElement("p");
var id =
allEvents[i]["module"] == 0
? "."
: " in the module with Id " + allEvents[i]["module"] + ".";
p.innerText =
allEvents[i]["type"] +
" : " +
allEvents[i]["source"] +
". Event occured at " +
time_text +
id;
p.id = "p_" + i;
eve_title.appendChild(p);
i++;
}
$("#events").append(eve);
$("img.pm").click(showHide);
$("div.b").show();
} else {
showError("No events");
}
localStorage["new_events"] = 0;
bg.updateBadge();
}
function showHide() {
var id = $(this).attr('id');
// Image id has the form i_<position>_<eventId>
var nums = id.split('_');
var pid = "p_" + nums[1];
var id = $(this).attr("id");
// Image id has the form i_<position>_<eventId>
var nums = id.split("_");
var pid = "p_" + nums[1];
// Mark as visited if visited
if($(this).parent().css('font-weight') == '600') {
bg.removeNotVisited(nums[2]);
$(this).parent().css('font-weight', '');
}
// Mark as visited if visited
if (
$(this)
.parent()
.css("font-weight") == "600"
) {
bg.removeNotVisited(nums[2]);
$(this)
.parent()
.css("font-weight", "");
}
// Toggle information
if($('#' + pid).css('display') == 'none') {
$('#' + pid).slideDown();
$(this).attr({src: 'images/minus.png'});
}
else {
$('#' + pid).slideUp();
$(this).attr({src: 'images/plus.png'});
}
// Toggle information
if ($("#" + pid).css("display") == "none") {
$("#" + pid).slideDown();
$(this).attr({ src: "images/minus.png" });
} else {
$("#" + pid).slideUp();
$(this).attr({ src: "images/plus.png" });
}
}
function mrefresh(){
localStorage["new_events"]=0;
bg.updateBadge();
clearError();
bg.resetInterval();
bg.main();
function mrefresh() {
localStorage["new_events"] = 0;
bg.updateBadge();
clearError();
bg.resetInterval();
bg.main();
}

View File

@ -1,30 +1,30 @@
{
"name": "__MSG_name__",
"version": "2.1",
"manifest_version": 2,
"description": "Pandora FMS Event viewer Chrome extension",
"homepage_url": "http://pandorafms.com",
"browser_action": {
"default_title": "__MSG_default_title__",
"default_icon": "images/icon.png",
"default_popup": "popup.html"
},
"background": {
"page": "background.html"
},
"icons": {
"128": "images/icon128.png",
"16": "images/icon16.png",
"32": "images/icon32.png",
"48": "images/icon48.png"
},
"options_page": "options.html",
"permissions": [
"tabs",
"notifications",
"http://*/*",
"https://*/*",
"background"
],
"default_locale": "en"
}
"name": "__MSG_name__",
"version": "2.2",
"manifest_version": 2,
"description": "Pandora FMS Event viewer Chrome extension",
"homepage_url": "http://pandorafms.com",
"browser_action": {
"default_title": "__MSG_default_title__",
"default_icon": "images/icon.png",
"default_popup": "popup.html"
},
"background": {
"page": "background.html"
},
"icons": {
"128": "images/icon128.png",
"16": "images/icon16.png",
"32": "images/icon32.png",
"48": "images/icon48.png"
},
"options_page": "options.html",
"permissions": [
"tabs",
"notifications",
"http://*/*",
"https://*/*",
"background"
],
"default_locale": "en"
}

View File

@ -14,6 +14,7 @@ RUN yum -y install \
# Install Pandora FMS agent
RUN cd /tmp/pandora_agent/unix \
&& chmod +x pandora_agent_installer \
&& ./pandora_agent_installer --install
# Set default variables
@ -40,7 +41,7 @@ if [ $TIMEZONE != "" ]; then\n \
fi\n \
/etc/init.d/pandora_agent_daemon start\n \
rm -f $0\n \
bash' \
tail -f /var/log/pandora/pandora_agent.log' \
>> /entrypoint.sh && \
chmod +x /entrypoint.sh

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.737, AIX version
# Version 7.0NG.738, AIX version
# Licensed under GPL license v2,
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.737, FreeBSD Version
# Version 7.0NG.738, FreeBSD Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.737, HP-UX Version
# Version 7.0NG.738, HP-UX Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.737, GNU/Linux
# Version 7.0NG.738, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.737, GNU/Linux
# Version 7.0NG.738, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.737, Solaris Version
# Version 7.0NG.738, Solaris Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,6 +1,6 @@
# Base config file for Pandora FMS Windows Agent
# (c) 2006-2010 Artica Soluciones Tecnologicas
# Version 7.0NG.737
# Version 7.0NG.738
# This program is Free Software, you can redistribute it and/or modify it
# under the terms of the GNU General Public Licence as published by the Free Software

View File

@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
# Version 7.0NG.737, AIX version
# Version 7.0NG.738, AIX version
# General Parameters
# ==================

View File

@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
# Version 7.0NG.737
# Version 7.0NG.738
# FreeBSD/IPSO version
# Licenced under GPL licence, 2003-2007 Sancho Lerena

View File

@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
# Version 7.0NG.737, HPUX Version
# Version 7.0NG.738, HPUX Version
# General Parameters
# ==================

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.737
# Version 7.0NG.738
# Licensed under GPL license v2,
# (c) 2003-2010 Artica Soluciones Tecnologicas
# please visit http://pandora.sourceforge.net

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.737
# Version 7.0NG.738
# Licensed under GPL license v2,
# (c) 2003-2009 Artica Soluciones Tecnologicas
# please visit http://pandora.sourceforge.net

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.737
# Version 7.0NG.738
# Licensed under GPL license v2,
# please visit http://pandora.sourceforge.net

View File

@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
# Version 7.0NG.737, Solaris version
# Version 7.0NG.738, Solaris version
# General Parameters
# ==================

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.737, AIX version
# Version 7.0NG.738, AIX version
# Licensed under GPL license v2,
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: 7.0NG.737-190806
Version: 7.0NG.738-190905
Architecture: all
Priority: optional
Section: admin

View File

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

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.737, GNU/Linux
# Version 7.0NG.738, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2012 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.737, FreeBSD Version
# Version 7.0NG.738, FreeBSD Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2016 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.737, HP-UX Version
# Version 7.0NG.738, HP-UX Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.737, GNU/Linux
# Version 7.0NG.738, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2014 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.737, GNU/Linux
# Version 7.0NG.738, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.737, NetBSD Version
# Version 7.0NG.738, NetBSD Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
# Version 7.0NG.737, Solaris Version
# Version 7.0NG.738, Solaris Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com

View File

@ -41,8 +41,8 @@ my $Sem = undef;
# Semaphore used to control the number of threads
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.737';
use constant AGENT_BUILD => '190806';
use constant AGENT_VERSION => '7.0NG.738';
use constant AGENT_BUILD => '190905';
# Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000;

View File

@ -2,8 +2,8 @@
#Pandora FMS Linux Agent
#
%define name pandorafms_agent_unix
%define version 7.0NG.737
%define release 190806
%define version 7.0NG.738
%define release 190905
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -2,8 +2,8 @@
#Pandora FMS Linux Agent
#
%define name pandorafms_agent_unix
%define version 7.0NG.737
%define release 190806
%define version 7.0NG.738
%define release 190905
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -9,8 +9,8 @@
# Please see http://www.pandorafms.org. This code is licensed under GPL 2.0 license.
# **********************************************************************
PI_VERSION="7.0NG.737"
PI_BUILD="190806"
PI_VERSION="7.0NG.738"
PI_BUILD="190905"
OS_NAME=`uname -s`
FORCE=0

View File

@ -1,6 +1,6 @@
# Base config file for Pandora FMS Windows Agent
# (c) 2006-2017 Artica Soluciones Tecnologicas
# Version 7.0NG.737
# Version 7.0NG.738
# This program is Free Software, you can redistribute it and/or modify it
# under the terms of the GNU General Public Licence as published by the Free Software

View File

@ -3,7 +3,7 @@ AllowLanguageSelection
{Yes}
AppName
{Pandora FMS Windows Agent v7.0NG.737}
{Pandora FMS Windows Agent v7.0NG.738}
ApplicationID
{17E3D2CF-CA02-406B-8A80-9D31C17BD08F}
@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{190806}
{190905}
ViewReadme
{Yes}

View File

@ -1214,7 +1214,8 @@ Pandora_Module_Factory::getModuleFromDefinition (string definition) {
module_source,
module_eventtype,
module_eventcode,
module_pattern);
module_pattern,
module_application);
} else if (module_wmiquery != "") {
module = new Pandora_Module_WMIQuery (module_name,
module_wmiquery, module_wmicolumn);

View File

@ -53,7 +53,7 @@ static EvtUpdateBookmarkT EvtUpdateBookmarkF = NULL;
* @param name Module name.
* @param service_name Service internal name to check.
*/
Pandora_Module_Logchannel::Pandora_Module_Logchannel (string name, string source, string type, string id, string pattern)
Pandora_Module_Logchannel::Pandora_Module_Logchannel (string name, string source, string type, string id, string pattern, string application)
: Pandora_Module (name) {
int i;
vector<wstring> query;
@ -93,6 +93,13 @@ Pandora_Module_Logchannel::Pandora_Module_Logchannel (string name, string source
query.push_back(ss.str());
}
// Set the application
if (application != "") {
wstringstream ss;
ss << L"*[System/Provider[@Name='" << application.c_str() << L"']]";
query.push_back(ss.str());
}
// Fill the filter
if (query.size() == 0) {
this->filter = L"*";
@ -579,4 +586,4 @@ Pandora_Module_Logchannel::GetMessageString(EVT_HANDLE hMetadata, EVT_HANDLE hEv
}
return pBuffer;
}
}

View File

@ -75,7 +75,7 @@ namespace Pandora_Modules {
LPWSTR GetMessageString(EVT_HANDLE hMetadata, EVT_HANDLE hEvent, EVT_FORMAT_MESSAGE_FLAGS FormatId);
public:
Pandora_Module_Logchannel (string name, string source, string type, string id, string pattern);
Pandora_Module_Logchannel (string name, string source, string type, string id, string pattern, string application);
void run ();
};
}

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("7.0NG.737(Build 190806)")
#define PANDORA_VERSION ("7.0NG.738(Build 190905)")
string pandora_path;
string pandora_dir;

View File

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

View File

@ -1,5 +1,5 @@
package: pandorafms-console
Version: 7.0NG.737-190806
Version: 7.0NG.738-190905
Architecture: all
Priority: optional
Section: admin

View File

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

View File

@ -1,5 +1,7 @@
START TRANSACTION;
UPDATE `tconfig` SET `value` = 'mini_severity,evento,id_agente,estado,timestamp' WHERE `token` LIKE 'event_fields';
DELETE FROM `talert_commands` WHERE `id` = 11;
DELETE FROM `tconfig` WHERE `token` LIKE 'integria_enabled';

View File

@ -1243,7 +1243,7 @@ ALTER TABLE titem MODIFY `source_data` int(10) unsigned;
INSERT INTO `tconfig` (`token`, `value`) VALUES ('big_operation_step_datos_purge', '100');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('small_operation_step_datos_purge', '1000');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('days_autodisable_deletion', '30');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 30);
INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 31);
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_docs_logo', 'default_docs.png');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_support_logo', 'default_support.png');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_logo_white_bg_preview', 'pandora_logo_head_white_bg.png');
@ -1251,6 +1251,7 @@ UPDATE tconfig SET value = 'https://licensing.artica.es/pandoraupdate7/server.ph
DELETE FROM `tconfig` WHERE `token` = 'current_package_enterprise';
INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '737');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('status_monitor_fields', 'policy,agent,data_type,module_name,server_type,interval,status,graph,warn,data,timestamp');
UPDATE `tconfig` SET `value` = 'mini_severity,evento,id_agente,estado,timestamp' WHERE `token` LIKE 'event_fields';
DELETE FROM `tconfig` WHERE `token` LIKE 'integria_enabled';
DELETE FROM `tconfig` WHERE `token` LIKE 'integria_api_password';
DELETE FROM `tconfig` WHERE `token` LIKE 'integria_inventory';

View File

@ -389,9 +389,12 @@ if (isset($login_failed)) {
echo '<h1>'.__('ERROR').'</h1>';
echo '<p>'.$config['auth_error'].'</p>';
echo '</div>';
echo '<div class="text_message_alert">';
echo '<p><strong>Remaining attempts: '.$attemps.'</strong></p>';
echo '</div>';
if ($config['enable_pass_policy']) {
echo '<div class="text_message_alert">';
echo '<p><strong>Remaining attempts: '.$attemps.'</strong></p>';
echo '</div>';
}
echo '<div class="button_message_alert">';
html_print_submit_button('Ok', 'hide-login-error', false);
echo '</div>';

View File

@ -172,6 +172,7 @@ unset($table);
echo '<div id="right">';
// News.
require_once 'general/news_dialog.php';
$options = [];
$options['id_user'] = $config['id_user'];
$options['modal'] = false;
@ -188,6 +189,7 @@ if (!empty($news)) {
$comparation_suffix = __('ago');
}
$output_news = '<div id="news_board" class="new">';
foreach ($news as $article) {
$image = false;

View File

@ -804,20 +804,20 @@ $table_adv_options .= '
'.$table_adv_gis.$table_adv_agent_icon.$table_adv_url.$table_adv_quiet.$table_adv_status.$table_adv_remote.$table_adv_safe.'
</div>';
echo '<div class="ui_toggle">';
ui_toggle(
$table_adv_options,
__('Advanced options'),
'',
'',
true,
false,
'white_box white_box_opened',
'no-border flex'
);
echo '</div>';
if (enterprise_installed()) {
echo '<div class="ui_toggle">';
ui_toggle(
$table_adv_options,
__('Advanced options'),
'',
'',
true,
false,
'white_box white_box_opened',
'no-border flex'
);
echo '</div>';
}
$table = new stdClass();
$table->width = '100%';
@ -825,7 +825,7 @@ $table->class = 'custom_fields_table';
$table->head = [
0 => __('Click to display').ui_print_help_tip(
__('This field allows url insertion using the BBCode\'s url tag').'.<br />'.__('The format is: [url=\'url to navigate\']\'text to show\'[/url]').'.<br /><br />'.__('e.g.: [url=google.com]Google web search[/url]'),
__('This field allows url insertion using the BBCode\'s url tag').'.<br />'.__('The format is: [url=\'url to navigate\']\'text to show\'[/url] or [url]\'url to navigate\'[/url] ').'.<br /><br />'.__('e.g.: [url=google.com]Google web search[/url] or [url]www.goole.com[/url]'),
true
),
];
@ -931,18 +931,48 @@ foreach ($fields as $field) {
$i += 2;
}
if (!empty($fields)) {
if (enterprise_installed()) {
if (!empty($fields)) {
echo '<div class="ui_toggle">';
ui_toggle(
html_print_table($table, true),
__('Custom fields'),
'',
'',
true,
false,
'white_box white_box_opened',
'no-border'
);
echo '</div>';
}
} else {
echo '<div class="ui_toggle">';
ui_toggle(
html_print_table($table, true),
__('Custom fields'),
$table_adv_options,
__('Advanced options'),
'',
'',
true,
false,
'white_box white_box_opened',
'no-border'
'no-border flex'
);
if (!empty($fields)) {
ui_toggle(
html_print_table($table, true),
__('Custom fields'),
'',
'',
true,
false,
'white_box white_box_opened',
'no-border'
);
}
echo '<div class="action-buttons" style="display: flex; justify-content: flex-end; align-items: center; width: '.$table->width.'">';
echo '</div>';
}

View File

@ -1559,8 +1559,14 @@ if ($update_module) {
foreach ($plugin_parameter_split as $key => $value) {
if ($key == 1) {
$values['plugin_parameter'] .= 'http_auth_user&#x20;'.$http_user.'&#x0a;';
$values['plugin_parameter'] .= 'http_auth_pass&#x20;'.$http_pass.'&#x0a;';
if ($http_user) {
$values['plugin_parameter'] .= 'http_auth_user&#x20;'.$http_user.'&#x0a;';
}
if ($http_pass) {
$values['plugin_parameter'] .= 'http_auth_pass&#x20;'.$http_pass.'&#x0a;';
}
$values['plugin_parameter'] .= $value.'&#x0a;';
} else {
$values['plugin_parameter'] .= $value.'&#x0a;';
@ -1757,8 +1763,14 @@ if ($create_module) {
foreach ($plugin_parameter_split as $key => $value) {
if ($key == 1) {
$values['plugin_parameter'] .= 'http_auth_user&#x20;'.$http_user.'&#x0a;';
$values['plugin_parameter'] .= 'http_auth_pass&#x20;'.$http_pass.'&#x0a;';
if ($http_user) {
$values['plugin_parameter'] .= 'http_auth_user&#x20;'.$http_user.'&#x0a;';
}
if ($http_pass) {
$values['plugin_parameter'] .= 'http_auth_pass&#x20;'.$http_pass.'&#x0a;';
}
$values['plugin_parameter'] .= $value.'&#x0a;';
} else {
$values['plugin_parameter'] .= $value.'&#x0a;';

View File

@ -232,10 +232,17 @@ $table->data[0][0] = '<b>'.__('Filter name').'</b>';
$table->data[0][1] = html_print_input_text('id_name', $id_name, false, 20, 80, true);
$table->data[1][0] = '<b>'.__('Save in group').'</b>'.ui_print_help_tip(__('This group will be use to restrict the visibility of this filter with ACLs'), true);
$returnAllGroup = users_can_manage_group_all();
// If the user can't manage All group but the filter is for All group, the user should see All group in the select.
if ($returnAllGroup === false && $id_group_filter == 0) {
$returnAllGroup = true;
}
$table->data[1][1] = html_print_select_groups(
$config['id_user'],
$access,
users_can_manage_group_all(),
$returnAllGroup,
'id_group_filter',
$id_group_filter,
'',

View File

@ -93,10 +93,11 @@ if ($strict_acl) {
users_can_manage_group_all()
);
} else {
// All users should see the filters with the All group.
$groups_user = users_get_groups(
$config['id_user'],
$access,
users_can_manage_group_all(),
true,
true
);
}

View File

@ -143,12 +143,12 @@ $table->data[3] = $data;
$data = [];
$data[0] = '<span id="command_label" class="labels">'.__('Command').'</span><span id="url_label" style="display:none;" class="labels">'.__('URL').'</span>'.ui_print_help_icon('response_macros', true);
$data[1] = html_print_input_text(
$data[1] = html_print_textarea(
'target',
3,
1,
$event_response['target'],
'',
100,
255,
'style="min-height:initial;"',
true
);

View File

@ -700,7 +700,7 @@ if ($fields === false) {
foreach ($fields as $field) {
$data[0] = '<b>'.$field['name'].'</b>';
$data[0] .= ui_print_help_tip(
__('This field allows url insertion using the BBCode\'s url tag').'.<br />'.__('The format is: [url=\'url to navigate\']\'text to show\'[/url]').'.<br /><br />'.__('e.g.: [url=google.com]Google web search[/url]'),
__('This field allows url insertion using the BBCode\'s url tag').'.<br />'.__('The format is: [url=\'url to navigate\']\'text to show\'[/url] or [url]\'url to navigate\'[/url] ').'.<br /><br />'.__('e.g.: [url=google.com]Google web search[/url] or [url]www.goole.com[/url]'),
true
);
$combo = [];

View File

@ -1317,7 +1317,7 @@ $class = 'databox filters';
if (metaconsole_load_external_db($connection) == NOERR) {
$agent_name = db_get_value_filter(
'nombre',
'alias',
'tagente',
['id_agente' => $idAgent]
);

View File

@ -267,7 +267,7 @@ if ($moduleFilter != 0) {
// Filter report items created from metaconsole in normal console list and the opposite
if (defined('METACONSOLE') and $config['metaconsole'] == 1) {
$where .= ' AND ((server_name IS NOT NULL AND length(server_name) != 0) '.'OR '.$type_escaped.' IN (\'general\', \'SLA\', \'exception\', \'availability\', \'availability_graph\', \'top_n\',\'SLA_monthly\',\'SLA_weekly\',\'SLA_hourly\'))';
$where .= ' AND ((server_name IS NOT NULL AND length(server_name) != 0) '.'OR '.$type_escaped.' IN (\'general\', \'SLA\', \'exception\', \'availability\', \'availability_graph\', \'top_n\',\'SLA_monthly\',\'SLA_weekly\',\'SLA_hourly\',\'text\'))';
} else {
$where .= ' AND ((server_name IS NULL OR length(server_name) = 0) '.'OR '.$type_escaped.' IN (\'general\', \'SLA\', \'exception\', \'availability\', \'top_n\'))';
}
@ -342,7 +342,7 @@ if ($items) {
$table->size[0] = '5px';
$table->size[1] = '15%';
$table->size[4] = '8%';
$table->size[6] = '90px';
$table->size[6] = '120px';
$table->size[7] = '30px';
$table->head[0] = '<span title="'.__('Position').'">'.__('P.').'</span>';

View File

@ -1,4 +1,22 @@
<script type="text/javascript">
function dialog_message(message_id) {
$(message_id)
.css("display", "inline")
.dialog({
modal: true,
show: "blind",
hide: "blind",
width: "400px",
buttons: {
Close: function() {
$(this).dialog("close");
}
}
});
}
function check_all_checkboxes() {
if ($("input[name=all_delete]").prop("checked")) {
$(".check_delete").prop("checked", true);
@ -578,7 +596,7 @@ switch ($action) {
break;
}
if (! $delete) {
if (! $delete && !empty($type_access_selected)) {
db_pandora_audit(
'ACL Violation',
'Trying to access report builder deletion'

View File

@ -100,7 +100,15 @@ if ($update_filter > -2) {
'filter' => $filter,
'unified_filters_id' => $new_unified_id,
];
if ($values['description'] == '') {
$result = false;
$msg = __('Description is empty');
} else if ($values['filter'] == '') {
$result = false;
$msg = __('Filter is empty');
} else {
$result = db_process_sql_insert('tsnmp_filter', $values);
}
} else {
for ($i = 0; $i < $index_post; $i++) {
$filter = get_parameter('filter_'.$i);
@ -109,12 +117,28 @@ if ($update_filter > -2) {
'filter' => $filter,
'unified_filters_id' => $new_unified_id,
];
$result = db_process_sql_insert('tsnmp_filter', $values);
if ($values['filter'] != '' && $values['description'] != '') {
$result = db_process_sql_insert('tsnmp_filter', $values);
}
}
if ($result === null) {
if ($values['description'] != '') {
$result = false;
$msg = __('Filters are empty');
} else {
$result = false;
$msg = __('Description is empty');
}
}
}
if ($result === false) {
ui_print_error_message(__('There was a problem creating the filter'));
if (!isset($msg)) {
$msg = __('There was a problem creating the filter');
}
ui_print_error_message($msg);
} else {
ui_print_success_message(__('Successfully created'));
}
@ -215,8 +239,10 @@ if ($edit_filter > -2) {
$result_unified = db_get_all_rows_sql('SELECT DISTINCT(unified_filters_id) FROM tsnmp_filter ORDER BY unified_filters_id ASC');
$aglomerate_result = [];
foreach ($result_unified as $res) {
$aglomerate_result[$res['unified_filters_id']] = db_get_all_rows_sql('SELECT * FROM tsnmp_filter WHERE unified_filters_id = '.$res['unified_filters_id'].' ORDER BY id_snmp_filter ASC');
if (is_array($result_unified) === true) {
foreach ($result_unified as $res) {
$aglomerate_result[$res['unified_filters_id']] = db_get_all_rows_sql('SELECT * FROM tsnmp_filter WHERE unified_filters_id = '.$res['unified_filters_id'].' ORDER BY id_snmp_filter ASC');
}
}
$table = new stdClass();
@ -282,7 +308,8 @@ if ($edit_filter > -2) {
?>
<script type="text/javascript">
var id = "<?php echo $index; ?>";
// +1 because there is already a defined 'filter' field.
var id = parseInt("<?php echo $index; ?>")+1;
var homeurl = "<?php echo $config['homeurl']; ?>";
$(document).ready (function () {

View File

@ -31,6 +31,10 @@ $delete = (int) get_parameter('delete_tag', 0);
$tag_name = (string) get_parameter('tag_name', '');
$tab = (string) get_parameter('tab', 'list');
if ($delete != 0 && is_metaconsole()) {
open_meta_frame();
}
// Metaconsole nodes
$servers = false;
if (is_metaconsole()) {
@ -316,6 +320,9 @@ echo '<table border=0 cellpadding=0 cellspacing=0 width=100%>';
echo '</tr>';
echo '</table>';
if ($delete != 0 && is_metaconsole()) {
close_meta_frame();
}
// ~ enterprise_hook('close_meta_frame');
?>

View File

@ -31,6 +31,11 @@ global $config;
check_login();
if (!enterprise_installed()) {
include 'general/noaccess.php';
exit;
}
if (! check_acl($config['id_user'], 0, 'PM')
&& ! is_user_admin($config['id_user'])
) {

View File

@ -30,19 +30,21 @@ if ($php_version_array[0] < 7) {
$tab = get_parameter('tab', 'online');
$buttons = [
'setup' => [
'active' => ($tab == 'setup') ? true : false,
'text' => '<a href="index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=setup">'.html_print_image('images/gm_setup.png', true, ['title' => __('Options')]).'</a>',
],
'offline' => [
$buttons['setup'] = [
'active' => ($tab == 'setup') ? true : false,
'text' => '<a href="index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=setup">'.html_print_image('images/gm_setup.png', true, ['title' => __('Options')]).'</a>',
];
if (enterprise_installed()) {
$buttons['offline'] = [
'active' => ($tab == 'offline') ? true : false,
'text' => '<a href="index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=offline">'.html_print_image('images/box.png', true, ['title' => __('Offline update manager')]).'</a>',
],
'online' => [
'active' => ($tab == 'online') ? true : false,
'text' => '<a href="index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=online">'.html_print_image('images/op_gis.png', true, ['title' => __('Online update manager')]).'</a>',
],
];
}
$buttons['online'] = [
'active' => ($tab == 'online') ? true : false,
'text' => '<a href="index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=online">'.html_print_image('images/op_gis.png', true, ['title' => __('Online update manager')]).'</a>',
];

View File

@ -256,6 +256,52 @@ if ($create_user) {
$password_confirm = '';
$new_user = true;
} else {
$have_number = false;
$have_simbols = false;
if ($config['enable_pass_policy']) {
if ($config['pass_needs_numbers']) {
$nums = preg_match('/([[:alpha:]])*(\d)+(\w)*/', $password_confirm);
if ($nums == 0) {
ui_print_error_message(__('Password must contain numbers'));
$user_info = $values;
$password_new = '';
$password_confirm = '';
$new_user = true;
} else {
$have_number = true;
}
}
if ($config['pass_needs_symbols']) {
$symbols = preg_match('/(\w)*(\W)+(\w)*/', $password_confirm);
if ($symbols == 0) {
ui_print_error_message(__('Password must contain symbols'));
$user_info = $values;
$password_new = '';
$password_confirm = '';
$new_user = true;
} else {
$have_simbols = true;
}
}
if ($config['pass_needs_symbols'] && $config['pass_needs_numbers']) {
if ($have_number && $have_simbols) {
$result = create_user($id, $password_new, $values);
}
} else if ($config['pass_needs_symbols'] && !$config['pass_needs_numbers']) {
if ($have_simbols) {
$result = create_user($id, $password_new, $values);
}
} else if (!$config['pass_needs_symbols'] && $config['pass_needs_numbers']) {
if ($have_number) {
$result = create_user($id, $password_new, $values);
}
}
} else {
$result = create_user($id, $password_new, $values);
}
$info = '{"Id_user":"'.$values['id_user'].'","FullName":"'.$values['fullname'].'","Firstname":"'.$values['firstname'].'","Lastname":"'.$values['lastname'].'","Email":"'.$values['email'].'","Phone":"'.$values['phone'].'","Comments":"'.$values['comments'].'","Is_admin":"'.$values['is_admin'].'","Language":"'.$values['language'].'","Timezone":"'.$values['timezone'].'","Block size":"'.$values['block_size'].'"';
if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) {
@ -264,7 +310,10 @@ if ($create_user) {
$info .= '}';
}
$result = create_user($id, $password_new, $values);
$can_create = false;
if ($result) {
$res = save_pass_history($id, $password_new);
}
@ -575,6 +624,10 @@ if ($delete_profile) {
);
}
if ($values) {
$user_info = $values;
}
$table = new stdClass();
$table->id = 'user_configuration_table';
$table->width = '100%';

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

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