Merge remote-tracking branch 'origin/ent-4642-Listado-de-tickets-integración-Integria' into ent-4461-Configuracion-integracion-integria

This commit is contained in:
alejandro-campos 2019-09-17 14:56:54 +02:00
commit f2a6dbb60e
171 changed files with 2720 additions and 1741 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # 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, # Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com # http://www.pandorafms.com

View File

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

View File

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

View File

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

View File

@ -1,6 +1,6 @@
# Base config file for Pandora FMS Windows Agent # Base config file for Pandora FMS Windows Agent
# (c) 2006-2010 Artica Soluciones Tecnologicas # (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 # 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 # 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 # Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents # Base config file for Pandora agents
# Version 7.0NG.737, AIX version # Version 7.0NG.738, AIX version
# General Parameters # General Parameters
# ================== # ==================

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix package: pandorafms-agent-unix
Version: 7.0NG.737-190801 Version: 7.0NG.738-190913
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.737-190801" pandora_version="7.0NG.738-190913"
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

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

View File

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

View File

@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents # 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, # Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com # http://www.pandorafms.com

View File

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

View File

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

View File

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

View File

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

View File

@ -41,8 +41,8 @@ my $Sem = undef;
# Semaphore used to control the number of threads # Semaphore used to control the number of threads
my $ThreadSem = undef; my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.737'; use constant AGENT_VERSION => '7.0NG.738';
use constant AGENT_BUILD => '190801'; use constant AGENT_BUILD => '190913';
# 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

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

View File

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

View File

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

View File

@ -1,6 +1,6 @@
# Base config file for Pandora FMS Windows Agent # Base config file for Pandora FMS Windows Agent
# (c) 2006-2017 Artica Soluciones Tecnologicas # (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 # 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 # under the terms of the GNU General Public Licence as published by the Free Software

View File

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

View File

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

View File

@ -53,7 +53,7 @@ static EvtUpdateBookmarkT EvtUpdateBookmarkF = NULL;
* @param name Module name. * @param name Module name.
* @param service_name Service internal name to check. * @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) { : Pandora_Module (name) {
int i; int i;
vector<wstring> query; vector<wstring> query;
@ -93,6 +93,13 @@ Pandora_Module_Logchannel::Pandora_Module_Logchannel (string name, string source
query.push_back(ss.str()); 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 // Fill the filter
if (query.size() == 0) { if (query.size() == 0) {
this->filter = L"*"; this->filter = L"*";
@ -579,4 +586,4 @@ Pandora_Module_Logchannel::GetMessageString(EVT_HANDLE hMetadata, EVT_HANDLE hEv
} }
return pBuffer; return pBuffer;
} }

View File

@ -75,7 +75,7 @@ namespace Pandora_Modules {
LPWSTR GetMessageString(EVT_HANDLE hMetadata, EVT_HANDLE hEvent, EVT_FORMAT_MESSAGE_FLAGS FormatId); LPWSTR GetMessageString(EVT_HANDLE hMetadata, EVT_HANDLE hEvent, EVT_FORMAT_MESSAGE_FLAGS FormatId);
public: 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 (); void run ();
}; };
} }

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.737(Build 190801)") #define PANDORA_VERSION ("7.0NG.738(Build 190913)")
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.737(Build 190801))" VALUE "ProductVersion", "(7.0NG.738(Build 190913))"
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.737-190801 Version: 7.0NG.738-190913
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.737-190801" pandora_version="7.0NG.738-190913"
package_pear=0 package_pear=0
package_pandora=1 package_pandora=1

View File

@ -44,24 +44,16 @@ $groups = groups_get_all();
// Add the All group to the beginning to be always the first // Add the All group to the beginning to be always the first
// Use this instead array_unshift to keep the array keys // Use this instead array_unshift to keep the array keys
$groups = ([0 => __('All')] + $groups); $groups = ([0 => __('All')] + $groups);
$html = ''; $groups_selected = [];
$style = 'style="padding: 2px 10px; display: inline-block;"';
foreach ($groups as $id => $name) { foreach ($groups as $id => $name) {
$checked = in_array($id, $file['groups']); if (in_array($id, $file['groups'])) {
$all_checked = false; $groups_selected[] = $id;
if ($id === 0) {
$checkbox = html_print_checkbox_extended('groups[]', $id, $checked, false, '', 'class="chkb_all"', true);
$all_checked = $checked;
} else {
$checkbox = html_print_checkbox_extended('groups[]', $id, $checked, $all_checked, '', 'class="chkb_group"', true);
} }
$html .= "<div $style>$name&nbsp;$checkbox</div>";
} }
$row = []; $row = [];
$row[0] = __('Groups'); $row[0] = __('Groups');
$row[1] = $html; $row[1] = html_print_select($groups, 'groups[]', $groups_selected, '', '', '', true, true, '', '', '');
$table->data[] = $row; $table->data[] = $row;
$table->colspan[][1] = 3; $table->colspan[][1] = 3;

View File

@ -193,7 +193,7 @@ function files_repo_add_file($file_input_name='upfile', $description='', $groups
global $config; global $config;
$attachment_path = io_safe_output($config['attachment_store']); $attachment_path = io_safe_output($config['attachment_store']);
$files_repo_path = $attachment_path.'/'.'files_repo'; $files_repo_path = $attachment_path.'/files_repo';
$result = []; $result = [];
$result['status'] = false; $result['status'] = false;

View File

@ -0,0 +1,12 @@
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';
DELETE FROM `tconfig` WHERE `token` LIKE 'integria_api_password';
DELETE FROM `tconfig` WHERE `token` LIKE 'integria_inventory';
DELETE FROM `tconfig` WHERE `token` LIKE 'integria_url';
COMMIT;

View File

@ -0,0 +1,7 @@
START TRANSACTION;
UPDATE `tlayout_data` SET `height` = 70 , `width` = 70 WHERE `height` = 0 && `width` = 0 && image NOT LIKE '%dot%' && ((`type` IN (0,5)) ||
(`type` = 10 && `image` IS NOT NULL && `image` != '' && `image` != 'none') ||
(`type` = 11 && `image` IS NOT NULL && `image` != '' && `image` != 'none' && `show_statistics` = 0));
COMMIT;

View File

@ -1225,6 +1225,8 @@ ALTER TABLE `talert_commands` ADD COLUMN `fields_hidden` text;
UPDATE `talert_actions` SET `field4` = 'text/html', `field4_recovery` = 'text/html' WHERE id = 1; UPDATE `talert_actions` SET `field4` = 'text/html', `field4_recovery` = 'text/html' WHERE id = 1;
DELETE FROM `talert_commands` WHERE `id` = 11;
-- --------------------------------------------------------------------- -- ---------------------------------------------------------------------
-- Table `tmap` -- Table `tmap`
-- --------------------------------------------------------------------- -- ---------------------------------------------------------------------
@ -1241,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 ('big_operation_step_datos_purge', '100');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('small_operation_step_datos_purge', '1000'); 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 ('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_docs_logo', 'default_docs.png');
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_support_logo', 'default_support.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'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_logo_white_bg_preview', 'pandora_logo_head_white_bg.png');
@ -1249,6 +1251,11 @@ UPDATE tconfig SET value = 'https://licensing.artica.es/pandoraupdate7/server.ph
DELETE FROM `tconfig` WHERE `token` = 'current_package_enterprise'; DELETE FROM `tconfig` WHERE `token` = 'current_package_enterprise';
INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '737'); 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'); 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';
DELETE FROM `tconfig` WHERE `token` LIKE 'integria_url';
-- --------------------------------------------------------------------- -- ---------------------------------------------------------------------
-- Table `tconfig_os` -- Table `tconfig_os`

View File

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

View File

@ -172,6 +172,7 @@ unset($table);
echo '<div id="right">'; echo '<div id="right">';
// News. // News.
require_once 'general/news_dialog.php';
$options = []; $options = [];
$options['id_user'] = $config['id_user']; $options['id_user'] = $config['id_user'];
$options['modal'] = false; $options['modal'] = false;
@ -188,6 +189,7 @@ if (!empty($news)) {
$comparation_suffix = __('ago'); $comparation_suffix = __('ago');
} }
$output_news = '<div id="news_board" class="new">'; $output_news = '<div id="news_board" class="new">';
foreach ($news as $article) { foreach ($news as $article) {
$image = false; $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.' '.$table_adv_gis.$table_adv_agent_icon.$table_adv_url.$table_adv_quiet.$table_adv_status.$table_adv_remote.$table_adv_safe.'
</div>'; </div>';
if (enterprise_installed()) {
echo '<div class="ui_toggle">'; echo '<div class="ui_toggle">';
ui_toggle( ui_toggle(
$table_adv_options, $table_adv_options,
__('Advanced options'), __('Advanced options'),
'', '',
'', '',
true, true,
false, false,
'white_box white_box_opened', 'white_box white_box_opened',
'no-border flex' 'no-border flex'
); );
echo '</div>'; echo '</div>';
}
$table = new stdClass(); $table = new stdClass();
$table->width = '100%'; $table->width = '100%';
@ -825,7 +825,7 @@ $table->class = 'custom_fields_table';
$table->head = [ $table->head = [
0 => __('Click to display').ui_print_help_tip( 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 true
), ),
]; ];
@ -931,18 +931,48 @@ foreach ($fields as $field) {
$i += 2; $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">'; echo '<div class="ui_toggle">';
ui_toggle( ui_toggle(
html_print_table($table, true), $table_adv_options,
__('Custom fields'), __('Advanced options'),
'', '',
'', '',
true, true,
false, false,
'white_box white_box_opened', '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>'; echo '</div>';
} }

View File

@ -1358,7 +1358,11 @@ if ($update_module || $create_module) {
$parent_module_id = (int) get_parameter('parent_module_id'); $parent_module_id = (int) get_parameter('parent_module_id');
$ip_target = (string) get_parameter('ip_target'); $ip_target = (string) get_parameter('ip_target');
if ($ip_target == '') { // No autofill if the module is a webserver module.
if ($ip_target == ''
&& $id_module_type < MODULE_WEBSERVER_CHECK_LATENCY
&& $id_module_type > MODULE_WEBSERVER_RETRIEVE_STRING_DATA
) {
$ip_target = 'auto'; $ip_target = 'auto';
} }
@ -1381,11 +1385,7 @@ if ($update_module || $create_module) {
$ff_type = (int) get_parameter('ff_type'); $ff_type = (int) get_parameter('ff_type');
$each_ff = (int) get_parameter('each_ff'); $each_ff = (int) get_parameter('each_ff');
$ff_timeout = (int) get_parameter('ff_timeout'); $ff_timeout = (int) get_parameter('ff_timeout');
$unit = (string) get_parameter('unit_select'); $unit = (string) get_parameter('unit');
if ($unit == 'none') {
$unit = (string) get_parameter('unit_text');
}
$id_tag = (array) get_parameter('id_tag_selected'); $id_tag = (array) get_parameter('id_tag_selected');
$serialize_ops = (string) get_parameter('serialize_ops'); $serialize_ops = (string) get_parameter('serialize_ops');
$critical_instructions = (string) get_parameter('critical_instructions'); $critical_instructions = (string) get_parameter('critical_instructions');
@ -1559,8 +1559,14 @@ if ($update_module) {
foreach ($plugin_parameter_split as $key => $value) { foreach ($plugin_parameter_split as $key => $value) {
if ($key == 1) { if ($key == 1) {
$values['plugin_parameter'] .= 'http_auth_user&#x20;'.$http_user.'&#x0a;'; if ($http_user) {
$values['plugin_parameter'] .= 'http_auth_pass&#x20;'.$http_pass.'&#x0a;'; $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;'; $values['plugin_parameter'] .= $value.'&#x0a;';
} else { } else {
$values['plugin_parameter'] .= $value.'&#x0a;'; $values['plugin_parameter'] .= $value.'&#x0a;';
@ -1757,8 +1763,14 @@ if ($create_module) {
foreach ($plugin_parameter_split as $key => $value) { foreach ($plugin_parameter_split as $key => $value) {
if ($key == 1) { if ($key == 1) {
$values['plugin_parameter'] .= 'http_auth_user&#x20;'.$http_user.'&#x0a;'; if ($http_user) {
$values['plugin_parameter'] .= 'http_auth_pass&#x20;'.$http_pass.'&#x0a;'; $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;'; $values['plugin_parameter'] .= $value.'&#x0a;';
} else { } else {
$values['plugin_parameter'] .= $value.'&#x0a;'; $values['plugin_parameter'] .= $value.'&#x0a;';
@ -2095,8 +2107,7 @@ if ($delete_module) {
} }
} }
// MODULE DUPLICATION // MODULE DUPLICATION.
// ==================.
if (!empty($duplicate_module)) { if (!empty($duplicate_module)) {
// DUPLICATE agent module ! // DUPLICATE agent module !
$id_duplicate_module = $duplicate_module; $id_duplicate_module = $duplicate_module;
@ -2142,8 +2153,46 @@ if (!empty($duplicate_module)) {
} }
} }
// UPDATE GIS // MODULE ENABLE/DISABLE.
// ==========. if ($enable_module) {
$result = modules_change_disabled($enable_module, 0);
$modulo_nombre = db_get_row_sql('SELECT nombre FROM tagente_modulo WHERE id_agente_modulo = '.$enable_module.'');
$modulo_nombre = $modulo_nombre['nombre'];
if ($result === NOERR) {
enterprise_hook('config_agents_enable_module_conf', [$id_agente, $enable_module]);
db_pandora_audit('Module management', 'Enable #'.$enable_module.' | '.$modulo_nombre.' | '.$agent['alias']);
} else {
db_pandora_audit('Module management', 'Fail to enable #'.$enable_module.' | '.$modulo_nombre.' | '.$agent['alias']);
}
ui_print_result_message(
$result,
__('Successfully enabled'),
__('Could not be enabled')
);
}
if ($disable_module) {
$result = modules_change_disabled($disable_module, 1);
$modulo_nombre = db_get_row_sql('SELECT nombre FROM tagente_modulo WHERE id_agente_modulo = '.$disable_module.'');
$modulo_nombre = $modulo_nombre['nombre'];
if ($result === NOERR) {
enterprise_hook('config_agents_disable_module_conf', [$id_agente, $disable_module]);
db_pandora_audit('Module management', 'Disable #'.$disable_module.' | '.$modulo_nombre.' | '.$agent['alias']);
} else {
db_pandora_audit('Module management', 'Fail to disable #'.$disable_module.' | '.$modulo_nombre.' | '.$agent['alias']);
}
ui_print_result_message(
$result,
__('Successfully disabled'),
__('Could not be disabled')
);
}
// UPDATE GIS.
$updateGIS = get_parameter('update_gis', 0); $updateGIS = get_parameter('update_gis', 0);
if ($updateGIS) { if ($updateGIS) {
$updateGisData = get_parameter('update_gis_data'); $updateGisData = get_parameter('update_gis_data');
@ -2231,8 +2280,11 @@ switch ($tab) {
break; break;
case 'alert': case 'alert':
// Because $id_agente is set, it will show only agent alerts. /*
// This var is for not display create button on alert list. * Because $id_agente is set, it will show only agent alerts
* This var is for not display create button on alert list
*/
$dont_display_alert_create_bttn = true; $dont_display_alert_create_bttn = true;
include 'godmode/alerts/alert_list.php'; include 'godmode/alerts/alert_list.php';
break; break;

View File

@ -443,6 +443,14 @@ ui_pagination($total_agents, "index.php?sec=gagente&sec2=godmode/agentes/modific
if ($agents !== false) { if ($agents !== false) {
// Urls to sort the table. // Urls to sort the table.
// Agent name size and description for Chinese and Japanese languages are adjusted
$agent_font_size = '7';
$description_font_size = '6.5';
if ($config['language'] == 'ja' || $config['language'] == 'zh_CN' || $own_info['language'] == 'ja' || $own_info['language'] == 'zh_CN') {
$agent_font_size = '15';
$description_font_size = '11';
}
$url_up_agente = 'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search.'&os='.$os.'&offset='.$offset.'&sort_field=name&sort=up&disabled=$disabled'; $url_up_agente = 'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search.'&os='.$os.'&offset='.$offset.'&sort_field=name&sort=up&disabled=$disabled';
$url_down_agente = 'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search.'&os='.$os.'&offset='.$offset.'&sort_field=name&sort=down&disabled=$disabled'; $url_down_agente = 'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search.'&os='.$os.'&offset='.$offset.'&sort_field=name&sort=down&disabled=$disabled';
$url_up_remote = 'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search.'&os='.$os.'&offset='.$offset.'&sort_field=remote&sort=up&disabled=$disabled'; $url_up_remote = 'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search.'&os='.$os.'&offset='.$offset.'&sort_field=remote&sort=up&disabled=$disabled';
@ -529,7 +537,7 @@ if ($agents !== false) {
} else { } else {
echo '<a alt ='.$agent['nombre']." href='index.php?sec=gagente& echo '<a alt ='.$agent['nombre']." href='index.php?sec=gagente&
sec2=godmode/agentes/configurar_agente&tab=$main_tab& sec2=godmode/agentes/configurar_agente&tab=$main_tab&
id_agente=".$agent['id_agente']."'>".'<span style="font-size: 7pt" title="'.$agent['nombre'].'">'.$agent['alias'].'</span>'.'</a>'; id_agente=".$agent['id_agente']."'>".'<span style="font-size: '.$agent_font_size.'pt" title="'.$agent['nombre'].'">'.$agent['alias'].'</span>'.'</a>';
} }
echo '</strong>'; echo '</strong>';
@ -629,7 +637,7 @@ if ($agents !== false) {
// Group icon and name // Group icon and name
echo "<td class='$tdcolor' align='left' valign='middle'>".ui_print_group_icon($agent['id_grupo'], true).'</td>'; echo "<td class='$tdcolor' align='left' valign='middle'>".ui_print_group_icon($agent['id_grupo'], true).'</td>';
// Description // Description
echo "<td class='".$tdcolor."f9'>".ui_print_truncate_text($agent['comentarios'], 'description', true, true, true, '[&hellip;]', 'font-size: 6.5pt;').'</td>'; echo "<td class='".$tdcolor."f9'>".ui_print_truncate_text($agent['comentarios'], 'description', true, true, true, '[&hellip;]', 'font-size: '.$description_font_size.'pt;').'</td>';
// Action // Action
// When there is only one element in page it's necesary go back page. // When there is only one element in page it's necesary go back page.
if ((count($agents) == 1) && ($offset >= $config['block_size'])) { if ((count($agents) == 1) && ($offset >= $config['block_size'])) {

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[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); $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( $table->data[1][1] = html_print_select_groups(
$config['id_user'], $config['id_user'],
$access, $access,
users_can_manage_group_all(), $returnAllGroup,
'id_group_filter', 'id_group_filter',
$id_group_filter, $id_group_filter,
'', '',

View File

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

View File

@ -143,12 +143,12 @@ $table->data[3] = $data;
$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[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', 'target',
3,
1,
$event_response['target'], $event_response['target'],
'', 'style="min-height:initial;"',
100,
255,
true true
); );

View File

@ -700,7 +700,7 @@ if ($fields === false) {
foreach ($fields as $field) { foreach ($fields as $field) {
$data[0] = '<b>'.$field['name'].'</b>'; $data[0] = '<b>'.$field['name'].'</b>';
$data[0] .= ui_print_help_tip( $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 true
); );
$combo = []; $combo = [];

View File

@ -1930,11 +1930,7 @@ function process_manage_edit($module_name, $agents_select=null, $module_status='
case 'unit_select': case 'unit_select':
if ($value != -1) { if ($value != -1) {
if ($value == 'none') { $values['unit'] = (string) get_parameter('unit');
$values['unit'] = (string) get_parameter('unit_text');
} else {
$values['unit'] = $value;
}
} }
break; break;

View File

@ -1317,7 +1317,7 @@ $class = 'databox filters';
if (metaconsole_load_external_db($connection) == NOERR) { if (metaconsole_load_external_db($connection) == NOERR) {
$agent_name = db_get_value_filter( $agent_name = db_get_value_filter(
'nombre', 'alias',
'tagente', 'tagente',
['id_agente' => $idAgent] ['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 // Filter report items created from metaconsole in normal console list and the opposite
if (defined('METACONSOLE') and $config['metaconsole'] == 1) { 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 { } else {
$where .= ' AND ((server_name IS NULL OR length(server_name) = 0) '.'OR '.$type_escaped.' IN (\'general\', \'SLA\', \'exception\', \'availability\', \'top_n\'))'; $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[0] = '5px';
$table->size[1] = '15%'; $table->size[1] = '15%';
$table->size[4] = '8%'; $table->size[4] = '8%';
$table->size[6] = '90px'; $table->size[6] = '120px';
$table->size[7] = '30px'; $table->size[7] = '30px';
$table->head[0] = '<span title="'.__('Position').'">'.__('P.').'</span>'; $table->head[0] = '<span title="'.__('Position').'">'.__('P.').'</span>';

View File

@ -1,4 +1,22 @@
<script type="text/javascript"> <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() { function check_all_checkboxes() {
if ($("input[name=all_delete]").prop("checked")) { if ($("input[name=all_delete]").prop("checked")) {
$(".check_delete").prop("checked", true); $(".check_delete").prop("checked", true);
@ -578,7 +596,7 @@ switch ($action) {
break; break;
} }
if (! $delete) { if (! $delete && !empty($type_access_selected)) {
db_pandora_audit( db_pandora_audit(
'ACL Violation', 'ACL Violation',
'Trying to access report builder deletion' 'Trying to access report builder deletion'

View File

@ -100,7 +100,15 @@ if ($update_filter > -2) {
'filter' => $filter, 'filter' => $filter,
'unified_filters_id' => $new_unified_id, '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); $result = db_process_sql_insert('tsnmp_filter', $values);
}
} else { } else {
for ($i = 0; $i < $index_post; $i++) { for ($i = 0; $i < $index_post; $i++) {
$filter = get_parameter('filter_'.$i); $filter = get_parameter('filter_'.$i);
@ -109,12 +117,28 @@ if ($update_filter > -2) {
'filter' => $filter, 'filter' => $filter,
'unified_filters_id' => $new_unified_id, '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) { 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 { } else {
ui_print_success_message(__('Successfully created')); 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'); $result_unified = db_get_all_rows_sql('SELECT DISTINCT(unified_filters_id) FROM tsnmp_filter ORDER BY unified_filters_id ASC');
$aglomerate_result = []; $aglomerate_result = [];
foreach ($result_unified as $res) { if (is_array($result_unified) === true) {
$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'); 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(); $table = new stdClass();
@ -282,7 +308,8 @@ if ($edit_filter > -2) {
?> ?>
<script type="text/javascript"> <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']; ?>"; var homeurl = "<?php echo $config['homeurl']; ?>";
$(document).ready (function () { $(document).ready (function () {

View File

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

View File

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

View File

@ -30,19 +30,21 @@ if ($php_version_array[0] < 7) {
$tab = get_parameter('tab', 'online'); $tab = get_parameter('tab', 'online');
$buttons = [ $buttons['setup'] = [
'setup' => [ 'active' => ($tab == 'setup') ? true : false,
'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>',
'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' => [ if (enterprise_installed()) {
$buttons['offline'] = [
'active' => ($tab == 'offline') ? true : false, '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>', '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 = ''; $password_confirm = '';
$new_user = true; $new_user = true;
} else { } 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'].'"'; $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) { if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) {
@ -264,7 +310,10 @@ if ($create_user) {
$info .= '}'; $info .= '}';
} }
$result = create_user($id, $password_new, $values); $can_create = false;
if ($result) { if ($result) {
$res = save_pass_history($id, $password_new); $res = save_pass_history($id, $password_new);
} }
@ -575,6 +624,10 @@ if ($delete_profile) {
); );
} }
if ($values) {
$user_info = $values;
}
$table = new stdClass(); $table = new stdClass();
$table->id = 'user_configuration_table'; $table->id = 'user_configuration_table';
$table->width = '100%'; $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

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