<%@ Page Language="C#" masterpagefile="~/Main.master" AutoEventWireup="true" CodeFile="Welcome.aspx.cs" Inherits="Welcome" %>
|
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
|
<script>
|
$(function () {
|
function getClass(b) {
|
return b ? "label m-b label-warning" : "label m-b label-primary";
|
}
|
|
function refreshStatis() {
|
if ($(document).height() == 0) {
|
setTimeout(refreshStatis, 50000);
|
}
|
else {
|
$.post("gwstatisv3.ashx", { action: "getRealtimeStatis5m" }, function (r) {
|
if (r.OK) {
|
var ophtml = [];
|
|
$.each(r.Message.OpList, function (i) {
|
var successRatio = this.OpOutCount > 0 ? Math.round(this.OpSuccessCount * 100.0 / this.OpOutCount, 2) : 0;
|
var reportRatio = this.OpOutCount > 0 ? Math.round((this.OpFailedCount + this.OpSuccessCount) * 100.0 / this.OpOutCount, 2) : 0;
|
ophtml.push("<tr>");
|
ophtml.push("<td>" + this.OpID + "</td>");
|
ophtml.push("<td>" + this.OpName + "</td>");
|
ophtml.push("<td><span class='" + getClass(this.OpOutCount < this.OpOutThreshold) + "'>" + this.OpOutCount + "</span></td>");
|
ophtml.push("<td>" + this.OpOutThreshold + "</td>");
|
ophtml.push("<td><span class='" + getClass(successRatio < this.OpSuccessRatioThreshold) + "'>" + successRatio + "%" + "</span></td>");
|
ophtml.push("<td>" + this.OpSuccessRatioThreshold + "%" + "</td>");
|
ophtml.push("<td><span class='" + getClass(reportRatio < this.OpReportRatioThreshold) + "'>" + reportRatio + "%" + "</span></td>");
|
ophtml.push("<td>" + this.OpReportRatioThreshold + "%" + "</td>");
|
ophtml.push("</tr>");
|
});
|
|
$("#opTable tbody").html(ophtml.join("\n"));
|
|
|
var aphtml = [];
|
|
$.each(r.Message.ApList, function (i) {
|
aphtml.push("<tr>");
|
aphtml.push("<td>" + this.ApID + "</td>");
|
aphtml.push("<td>" + this.ApName + "</td>");
|
aphtml.push("<td><span class='" + getClass(this.ApInCount < this.ApInThreshold) + "'>" + this.ApInCount + "</span></td>");
|
aphtml.push("<td>" + this.ApInThreshold + "</td>");
|
aphtml.push("<td><span class='" + getClass(this.ApPendingCount > this.ApPendingThreshold) + "'>" + this.ApPendingCount + "</td>");
|
aphtml.push("<td>" + this.ApPendingThreshold + "</span></td>");
|
aphtml.push("</tr>");
|
});
|
$("#apTable tbody").html(aphtml.join("\n"));
|
|
setTimeout(refreshStatis, 3000);
|
}
|
}, "json");
|
}
|
}
|
|
refreshStatis();
|
});
|
</script>
|
</asp:Content>
|
<asp:Content ID="Content2" ContentPlaceHolderID="content" runat="Server">
|
<div class="ibox">
|
<div class="ibox-title">
|
<h3>
|
接入点状态</h3>
|
</div>
|
<div class="ibox-content">
|
<table class="table table-striped table-bordered table-hover" id="apTable">
|
<thead>
|
<tr>
|
<td>
|
接入点编号
|
</td>
|
<td>
|
接入点名称
|
</td>
|
<td>
|
5分钟入口流量
|
</td>
|
<td>
|
门限
|
</td>
|
<td>
|
5分钟阻塞量
|
</td>
|
<td>
|
门限
|
</td>
|
</tr>
|
</thead>
|
<tbody>
|
</tbody>
|
</table>
|
</div>
|
<div class="ibox-title">
|
<h3>
|
通道状态</h3>
|
</div>
|
<div class="ibox-content">
|
<table class="table table-striped table-bordered table-hover" id="opTable">
|
<thead>
|
<tr>
|
<td>
|
通道编号
|
</td>
|
<td>
|
通道名称
|
</td>
|
<td>
|
5分钟出口流量
|
</td>
|
<td>
|
门限
|
</td>
|
<td>
|
5分钟成功率
|
</td>
|
<td>
|
门限
|
</td>
|
<td>
|
5分钟报告率
|
</td>
|
<td>
|
门限
|
</td>
|
</tr>
|
</thead>
|
<tbody>
|
</tbody>
|
</table>
|
</div>
|
|
<div class="ibox-title">
|
<h3>
|
数据库表空间</h3>
|
</div>
|
<div class="ibox-content">
|
<table class="table table-striped table-bordered table-hover">
|
<%= RenderTableSpaceTable() %>
|
</table>
|
</div>
|
</div>
|
</asp:Content>
|