Merge branch 'ent-2252-5716-fallos-en-extension-chrome-de-eventos-2' into 'develop'

Fixed agent link on javascript chrome extension

See merge request artica/pandorafms!2035
This commit is contained in:
vgilc 2018-12-04 10:16:30 +01:00
commit f7b5b6d57b
2 changed files with 4 additions and 4 deletions

View File

@ -144,7 +144,7 @@ function parseReplyEvents (reply) {
fetchedEvents.push({ fetchedEvents.push({
'id' : event.id_evento, 'id' : event.id_evento,
'agent_name' : event.agent_name, 'agent_name' : event.agent_name,
'agent' : event.id_agent, 'agent' : event.id_agente,
'date' : event.timestamp, 'date' : event.timestamp,
'title' : event.evento, 'title' : event.evento,
'module' : event.id_agentmodule, 'module' : event.id_agentmodule,
@ -215,7 +215,7 @@ function getNotification(pEvent){
if(pEvent['module'] != 0) even += " in the module with Id "+ pEvent['module']; if(pEvent['module'] != 0) even += " in the module with Id "+ pEvent['module'];
even += "."; even += ".";
var url = (pEvent['agent']=="") var url = (pEvent['agent'] == 0)
? localStorage["ip_address"]+"/index.php?sec=eventos&sec2=operation/events/events" ? 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=" + pEvent['agent']; : localStorage["ip_address"]+"/index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=" + pEvent['agent'];

View File

@ -91,12 +91,12 @@ function showEvents(){
var a = document.createElement('a'); var a = document.createElement('a');
var temp_style; var temp_style;
var agent_url = (allEvents[i]["agent_name"] == 0) var agent_url = (allEvents[i]["agent"] == 0)
? localStorage["ip_address"] ? localStorage["ip_address"]
+ "/index.php?sec=eventos&sec2=operation/events/events" + "/index.php?sec=eventos&sec2=operation/events/events"
: localStorage["ip_address"] : localStorage["ip_address"]
+ "/index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=" + "/index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente="
+ allEvents[i]['agent_name']; + allEvents[i]['agent'];
a.setAttribute("href",agent_url); a.setAttribute("href",agent_url);
a.target = "_blank"; a.target = "_blank";
a.className = 'a_2_mo'; a.className = 'a_2_mo';