Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
ref #4584 - [Monitoring > Event Logs > System Logs] Unable to export …
Browse files Browse the repository at this point in the history
…data in CSV or XML
  • Loading branch information
lpinsivy committed Aug 24, 2016
1 parent a63c316 commit 1d213f9
Showing 1 changed file with 25 additions and 13 deletions.
38 changes: 25 additions & 13 deletions www/include/eventLogs/viewLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ function apply_period() {

function apply_period_engine() {
var openid = document.getElementById('openid').innerHTML;
logEngine();
logsEngine();
}

var _limit = 30;
Expand Down Expand Up @@ -491,18 +491,30 @@ function logs(id, formu, type) {
proc.transform("logView4xml");
} else {
var openid = document.getElementById('openid').innerHTML;
if (type == 'CSV') {
var _addr = './include/eventLogs/export/data.php?output='+_output+'&oh='+_oh+'&warning='+_warning+'&unknown='+_unknown+'&critical='+_critical+'&ok='+_ok+'&unreachable='+_unreachable+'&down='+_down+'&up='+_up+'&num='+_num+'&error='+_error+'&alert='+_alert+'&notification='+_notification+'&search_H='+_search_H+'&search_S='+_search_S+'&period='+period+'&StartDate='+StartDate+'&EndDate='+EndDate+'&StartTime='+StartTime+'&EndTime='+EndTime+'&limit='+_limit+'&id='+openid+'<?php if (isset($search) && $search) {
print "&search_host=".$search;
} if (isset($search_service) && $search_service) {
print "&search_service=".$search_service;
} ?>&export=1';
} else if (type == 'XML') {
var _addr = './include/eventLogs/xml/data.php?output='+_output+'&oh='+_oh+'&warning='+_warning+'&unknown='+_unknown+'&critical='+_critical+'&ok='+_ok+'&unreachable='+_unreachable+'&down='+_down+'&up='+_up+'&num='+_num+'&error='+_error+'&alert='+_alert+'&notification='+_notification+'&search_H='+_search_H+'&search_S='+_search_S+'&period='+period+'&StartDate='+StartDate+'&EndDate='+EndDate+'&StartTime='+StartTime+'&EndTime='+EndTime+'&limit='+_limit+'&id='+openid+'<?php if (isset($search) && $search) {
print "&search_host=".$search;
} if (isset($search_service) && $search_service) {
print "&search_service=".$search_service;
} ?>&export=1';
if (_engine == 0) {
if (type == 'CSV') {
var _addr = './include/eventLogs/export/data.php?output='+_output+'&oh='+_oh+'&warning='+_warning+'&unknown='+_unknown+'&critical='+_critical+
'&ok='+_ok+'&unreachable='+_unreachable+'&down='+_down+'&up='+_up+'&num='+_num+'&error='+_error+'&alert='+_alert+'&notification='+_notification+
'&search_H='+_search_H+'&search_S='+_search_S+'&period='+period+'&StartDate='+StartDate+'&EndDate='+EndDate+'&StartTime='+StartTime+'&EndTime='
+EndTime+'&limit='+_limit+'&id='+openid+'<?php if (isset($search) && $search) { print "&search_host=".$search;} if (isset($search_service) && $search_service) {
print "&search_service=".$search_service;} ?>&export=1';
} else if (type == 'XML') {
var _addr = './include/eventLogs/xml/data.php?output='+_output+'&oh='+_oh+'&warning='+_warning+'&unknown='+_unknown+'&critical='+_critical+
'&ok='+_ok+'&unreachable='+_unreachable+'&down='+_down+'&up='+_up+'&num='+_num+'&error='+_error+'&alert='+_alert+'&notification='+_notification+
'&search_H='+_search_H+'&search_S='+_search_S+'&period='+period+'&StartDate='+StartDate+'&EndDate='+EndDate+'&StartTime='+StartTime+'&EndTime='
+EndTime+'&limit='+_limit+'&id='+openid+'<?php if (isset($search) && $search) { print "&search_host=".$search; print "&search_host=".$search;
} if (isset($search_service) && $search_service) { print "&search_service=".$search_service; } ?>&export=1';
}
} else {
if (type == 'CSV') {
var _addr = './include/eventLogs/export/data.php?engine=true&output='+_output+'&error=true&alert=false&ok=false&unreachable=false&down=false&up=false'+
'&unknown=false&critical=false&warning=false&period='+period+'&StartDate='+StartDate+'&EndDate='+EndDate+'&StartTime='+StartTime+'&EndTime='+EndTime+
'&num='+_num+'&limit='+_limit+'&id=<?php echo $poller ?>&export=1';
} else if (type == 'XML') {
var _addr = './include/eventLogs/xml/data.php?engine=true&output='+_output+'&error=true&alert=false&ok=false&unreachable=false&down=false&up=false'+
'&unknown=false&critical=false&warning=false&period='+period+'&StartDate='+StartDate+'&EndDate='+EndDate+'&StartTime='+StartTime+'&EndTime='+EndTime+
'&num='+_num+'&limit='+_limit+'&id=<?php echo $poller ?>&export=1';
}
}
document.location.href = _addr;
}
Expand Down

0 comments on commit 1d213f9

Please sign in to comment.