Authored by skinny.wu

添加筛选错误信息的按钮

@@ -73,6 +73,8 @@ @@ -73,6 +73,8 @@
73 73
74 <div class="container-fluid"> 74 <div class="container-fluid">
75 75
  76 + <button id = "btn_only_error" class="btn btn-default" style="margin-top: 15px" onclick="onlyErrorBtnOnClick()">Only Errors</button>
  77 +
76 <%--<div class="widget-box" style="background: white">--%> 78 <%--<div class="widget-box" style="background: white">--%>
77 <%--<div class="widget-title" style="background: white">--%> 79 <%--<div class="widget-title" style="background: white">--%>
78 <%--<h5>DNS Monitor状态 host: ${host} uid: ${uid} </h5>--%> 80 <%--<h5>DNS Monitor状态 host: ${host} uid: ${uid} </h5>--%>
@@ -81,6 +83,8 @@ @@ -81,6 +83,8 @@
81 <input id = "host" value="${host}" type="hidden" > 83 <input id = "host" value="${host}" type="hidden" >
82 <input id = "uid" value="${uid}" type="hidden" > 84 <input id = "uid" value="${uid}" type="hidden" >
83 85
  86 +
  87 +
84 <%--<div class="container-fluid">--%> 88 <%--<div class="container-fluid">--%>
85 <div id="div_table" style="margin-top: 15px"> 89 <div id="div_table" style="margin-top: 15px">
86 90
@@ -75,3 +75,18 @@ function aHref(page) { @@ -75,3 +75,18 @@ function aHref(page) {
75 75
76 getHistroyInfo(); 76 getHistroyInfo();
77 } 77 }
  78 +
  79 +//当Only Btn点击,则更改isFailedStatus状态,同时修改btn的样式
  80 +function onlyErrorBtnOnClick() {
  81 +
  82 + currentPage = 0;
  83 +
  84 + if(isFailedStatus == false) {
  85 + isFailedStatus = true;
  86 + document.getElementById("btn_only_error").className= "btn btn-primary";
  87 + } else {
  88 + isFailedStatus = false;
  89 + document.getElementById("btn_only_error").className="btn btn-default";
  90 + }
  91 + getHistroyInfo();
  92 +}