|
|
@@ -43,7 +43,12 @@ function getLogList(count, page, keyword, fromDate, endDate) {
|
|
|
getPara(logList[i].id, logList[i].enName, logList[i].url);
|
|
|
$('#loadingDiv').show();
|
|
|
});
|
|
|
- })(i)
|
|
|
+ })(i);
|
|
|
+ (function(i) {
|
|
|
+ $("#pa_detail_" + logList[i].id ).click(function () {
|
|
|
+ getDetail(logList[i].detail, logList[i].enName);
|
|
|
+ });
|
|
|
+ })(i);
|
|
|
}
|
|
|
|
|
|
// 点击搜索
|
|
|
@@ -101,6 +106,18 @@ function getPara(id, name, url) {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * 获取详情
|
|
|
+ */
|
|
|
+function getDetail(detail, name) {
|
|
|
+ $('#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(detail), null, 4);
|
|
|
+ $("<pre>").html(syntaxHighlight(result)).appendTo("#para-content");
|
|
|
+ $('#paraDetail').modal('show');
|
|
|
+}
|
|
|
+
|
|
|
function syntaxHighlight(json) {
|
|
|
if (typeof json != 'string') {
|
|
|
json = JSON.stringify(json, undefined, 2);
|
|
|
@@ -166,11 +183,11 @@ function getDataRow(log, i) {
|
|
|
row.appendChild(msgCell);
|
|
|
|
|
|
var detailCell = document.createElement('td'); //detail
|
|
|
- detailCell.setAttribute("class", "text-left");
|
|
|
+ detailCell.setAttribute("class", "text-center");
|
|
|
detailCell.setAttribute("title", log.detail);
|
|
|
- detailCell.setAttribute("id", "pa_detail");
|
|
|
- var result = JSON.stringify(JSON.parse(log.detail), null, 4);
|
|
|
- $("<pre>").html(syntaxHighlight(result)).appendTo(detailCell);
|
|
|
+ detailCell.setAttribute("id", "pa_detail_" + log.id);
|
|
|
+ detailCell.setAttribute("title", "查看详情");
|
|
|
+ detailCell.innerHTML = "详情"; //填充数据
|
|
|
row.appendChild(detailCell);
|
|
|
|
|
|
var paraCell = document.createElement('td'); //parameters
|