|
|
@@ -38,17 +38,29 @@ function getLogList(count, page, keyword, fromDate, endDate) {
|
|
|
for (var i = 0; i < logList.length; i++) {
|
|
|
var trow = getDataRow(logList[i], i); //定义一个方法,返回tr数据
|
|
|
tbody.appendChild(trow);
|
|
|
+ // 查询错误详情
|
|
|
(function(i) {
|
|
|
$("#para_detail_" + logList[i].id ).click(function () {
|
|
|
getPara(logList[i].id, logList[i].enName, logList[i].url);
|
|
|
$('#loadingDiv').show();
|
|
|
});
|
|
|
})(i);
|
|
|
+ // 查询参数详情
|
|
|
(function(i) {
|
|
|
$("#pa_detail_" + logList[i].id ).click(function () {
|
|
|
getDetail(logList[i].detail, logList[i].enName);
|
|
|
+ $('#loadingDiv').show();
|
|
|
});
|
|
|
})(i);
|
|
|
+ // 查询错误列表
|
|
|
+ (function(i) {
|
|
|
+ if (logList[i].uuid != null && logList[i].uuid != "") {
|
|
|
+ $("#not_exit_data_" + logList[i].id ).click(function () {
|
|
|
+ getNotExistData(logList[i].uuid, logList[i].msg, logList[i].enName);
|
|
|
+ $('#loadingDiv').show();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })(i);
|
|
|
}
|
|
|
|
|
|
// 点击搜索
|
|
|
@@ -118,6 +130,21 @@ function getDetail(detail, name) {
|
|
|
$('#paraDetail').modal('show');
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * 获取错误列表
|
|
|
+ */
|
|
|
+function getNotExistData(uuid, msg, name) {
|
|
|
+ $.get('log/notExistData', {sign: uuid, msg: msg}, function (data) {
|
|
|
+ $('#para-content').empty();
|
|
|
+ $('#para-title').empty();
|
|
|
+ $("<p style='font-size: 16px; font-weight: bold'>").text(name).appendTo("#para-title");
|
|
|
+ var result = JSON.stringify(JSON.parse(data.content), null, 4);
|
|
|
+ $("<pre>").html(syntaxHighlight(result)).appendTo("#para-content");
|
|
|
+ $('#loadingDiv').hide();
|
|
|
+ $('#paraDetail').modal('show');
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
function syntaxHighlight(json) {
|
|
|
if (typeof json != 'string') {
|
|
|
json = JSON.stringify(json, undefined, 2);
|
|
|
@@ -177,9 +204,14 @@ function getDataRow(log, i) {
|
|
|
|
|
|
var msgCell = document.createElement('td'); //msg
|
|
|
msgCell.setAttribute("class", "text-center");
|
|
|
- msgCell.setAttribute("title", log.msg);
|
|
|
msgCell.setAttribute("style", "max-height: 400px; overflow-y: auto;");
|
|
|
msgCell.innerHTML = log.msg; //填充数据
|
|
|
+ if (log.uuid != null && log.uuid != "") {
|
|
|
+ msgCell.setAttribute("title", "查看详情");
|
|
|
+ msgCell.setAttribute("id", "not_exit_data_" + log.id);
|
|
|
+ var button = "<a style='color: red'><i class='icon-edit'>more>></i></a>";
|
|
|
+ msgCell.innerHTML += button;
|
|
|
+ }
|
|
|
row.appendChild(msgCell);
|
|
|
|
|
|
var detailCell = document.createElement('td'); //detail
|