150 lines
6.2 KiB
Plaintext
150 lines
6.2 KiB
Plaintext
<#def designatedPath="/orderMerchantList.htm"/>
|
||
${zhiqim_manager_breadcrumb("商家管理")}
|
||
${zhiqim_manager_content()}
|
||
<script>
|
||
function doViewStackTrace(stackTraceId)
|
||
{
|
||
if (!stackTraceId)
|
||
return;
|
||
|
||
var stackTraceElem = document.getElementById(stackTraceId);
|
||
var stackTrace = stackTraceElem.innerText;
|
||
if (!stackTraceElem || Z.V.isEmptyBlank(stackTraceElem.innerText))
|
||
{
|
||
Z.failure("未找到内容");
|
||
return;
|
||
}
|
||
|
||
var dialog = document.getElementById("stackTraceDialog");
|
||
if (!dialog)
|
||
Z.dialog({text:'<div id="stackTraceDialog" class="z-pd6 z-text-ellipsis z-px18"></div>',width:1024,height:300,shadow:false});
|
||
|
||
var text = '';
|
||
for(var i=0; i < stackTrace.length; i++)
|
||
{
|
||
var c = stackTrace[i]
|
||
if (c == '\r\n' || c == '\n')
|
||
c = '▲';
|
||
else if (c == '\t')
|
||
c = ' ';
|
||
else if (c == '\r')
|
||
continue;
|
||
text += c;
|
||
}
|
||
|
||
var html = '';
|
||
var arr = Z.AR.toArray(text, "▲");
|
||
for(var i=0; i < arr.length; i++)
|
||
{
|
||
var str = arr[i];
|
||
var start = -1;
|
||
if (i==0)
|
||
html += '<u style="color:rgb(0, 0 ,173)">';
|
||
|
||
if (i > 0)
|
||
html += '<br/>';
|
||
|
||
for(var j= 0; j < str.length; j++)
|
||
{
|
||
var c=str[j]
|
||
|
||
if (c == '(')
|
||
html += '(<u style="color:rgb(0, 0 ,173)">'
|
||
|
||
else if (c==')')
|
||
html += '</u>)';
|
||
else
|
||
html += c;
|
||
|
||
//第一行下划线结束
|
||
if ((c == ':' && i == 0) || j == str.length - 1)
|
||
html += '</u>';
|
||
}
|
||
}
|
||
console.log(arr);
|
||
dialog = document.getElementById("stackTraceDialog");
|
||
Z(dialog).html(html);
|
||
}
|
||
|
||
</script>
|
||
<#-- 导航 -->
|
||
<div data-role="z-tabnav" class="z-tabnav-main z-mg-b20 ${zmr_color_class}">
|
||
<nav>
|
||
<ul>
|
||
<li onclick="Z.L.href('orderMerchantList.htm')">商家列表</li>
|
||
<li class="z-active">接口日志</li>
|
||
</ul>
|
||
<div class="z-text-right z-mg-t10 z-mg-r5">
|
||
</div>
|
||
</nav>
|
||
</div>
|
||
${zhiqim_manager_title("查询条件")}
|
||
<form method="post">
|
||
<table class="z-table z-bordered z-pd6 z-bg-white">
|
||
<tr>
|
||
<td width="25%">用户IP:<input name="remoteIp" class="${zmr_color_class} z-input z-w160 z-mg-l4" value="${remoteIp}" maxlength="64" placeholder="用户名"></td>
|
||
<td width="25%">用户名称:<input name="remoteUser" class="${zmr_color_class} z-input z-w180 z-mg-l4" value="${remoteUser}" maxlength="64" placeholder="用户名"></td>
|
||
<td width="25%">创建时间:<input id="startTime" name="startTime" class="z-input z-w150 ${zmr_color_class}" readonly="true" onfocus="Z.datetime(this);" value="${startTime}"> -
|
||
<input id="startTime" name="endTime" class="z-input z-mg-l3 z-w150 ${zmr_color_class}" readonly="true" onfocus="Z.datetime(this);" value="${endTime}">
|
||
</td>
|
||
<td width="25%">接口名称:<select name="apiName" class="z-select z-w180" data-role="z-select-search" data-class="z-blue">
|
||
<option value="">全部</option>
|
||
<option value="/designRest.htm" <#if Strings.equals("/designRest.htm", apiName)>selected</#if>>designRest</option>
|
||
<#for item : apiList>
|
||
<option value="${item.value()}" <#if item.value().equals(apiName)>selected</#if>>${item.desc()}</option>
|
||
</#for>
|
||
</select>
|
||
</td>
|
||
</tr>
|
||
<tr class="z-h40">
|
||
<td>状态码:<input name="statusCode" class="z-input z-w160 z-mg-l4 ${zmr_color_class} " data-options="type:Integer;paste:true" value="${statusCode}" maxlength="64" placeholder="状态码"></td>
|
||
<td>结果描述:<input name="invokeMessage" class="z-input z-w180 z-mg-l4 ${zmr_color_class}" value="${invokeMessage}" maxlength="200" placeholder="模糊匹配"></td>
|
||
<td colspan="2">
|
||
<button class="z-button z-large z-w120 z-mg-r15 ${zmr_color_class}">查询</button><button class="z-button z-large" type="button" onclick="Z.FM.clearForm(this.form);">清空</button>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
</tr>
|
||
</table>
|
||
</form>
|
||
<#-- 列表 -->
|
||
<table class="z-table z-bordered z-h40-tr z-pd6 z-bg-white z-text-center">
|
||
<tr bgcolor="${zmr_thead_bgcolor}">
|
||
<td width="60">选择</td>
|
||
<td width="120">用户名</td>
|
||
<td width="8%">用户IP</td>
|
||
<td width="14%">接口名</td>
|
||
<td width="200">错误编号</td>
|
||
<td width="100">调用结果</td>
|
||
<td width="*">结果描述/错误原因</td>
|
||
<td width="140">创建时间</td>
|
||
<td width="300">操作</td>
|
||
</tr>
|
||
${zhiqim_manager_tr_no_record(pageResult, 10, "暂时没有数据信息")}
|
||
<#for item : pageResult.list()>
|
||
<tr class="z-pointer" ${zhiqim_manager_tr_onmouse()} ${zhiqim_manager_tr_click_radio()}>
|
||
<td><input type="radio" class="z-radio" data-role="z-radio" data-class="z-blue" id="invokeLogId" name="invokeLogId" value="${item.getInvokeLogId()}"></td>
|
||
<td>${item.getRemoteUser()}</td>
|
||
<td>${item.getRemoteIp()}</td>
|
||
<td>${item.getApiName()}</td>
|
||
<td>${item.getErrorId()}</td>
|
||
<td><#if item.getStatusCode() gt 0><span class="z-text-red">失败</span><#else><span class="z-text-red">成功</span></#if></td>
|
||
<td class="zi-text-left">
|
||
<div class="z-text-ellipsis z-pd6" style="max-width:600px">
|
||
${item.getInvokeMessage()}
|
||
</div>
|
||
</td>
|
||
<td>${item.getCreateTime()}</td>
|
||
<td>
|
||
<#if Validates.isNotEmptyBlank(item.getInvokeStackTrace())>
|
||
<button type="button" class="z-button z-cyan" onclick="doViewStackTrace('stackTrace${item.getInvokeLogId()}')"><i class="z-font z-query"></i>查看错误代码</button>
|
||
<#var stackTrace= item.getInvokeStackTrace()/>
|
||
<span id="stackTrace${item.getInvokeLogId()}" class="z-hide">${stackTrace}</span>
|
||
</#if>
|
||
<button type="button" class="z-button z-red" onclick="Z.L.href('apiInvokeLogDelete.htm?invokeLogId=${item.getInvokeLogId()}')"><i class="z-font z-delete"></i>清除</button>
|
||
</td>
|
||
</tr>
|
||
</#for>
|
||
</table>
|
||
${zhiqim_manager_paging(pageResult, "apiInvokeLog.htm")}
|
||
${zhiqim_manager_content_end()} |