123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8" />
- <title>欢迎页面-X-admin2.0</title>
-
- <link rel="stylesheet" href="./static/css/font.css">
- <link rel="stylesheet" href="./static/css/xadmin.css">
- <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
- <script src="./static/lib/layui/layui.js" charset="utf-8"></script>
- <script type="text/javascript" src="./static/js/xadmin.js"></script>
- </head>
- <body>
- <input type="text" id="token" value={{.token}} hidden=true>
- 场景:
- <input id="scene" type="text" value={{.Scene}}>
- <br>
- 事件ID:
- <input id="eventid" type="text" value={{.EventId}}>
- <br>
- 开始时间:
- <input type="date" id="start_time" name="trip-start" value={{.Start_time}} min="2018-01-01 00:00:00" max="2018-12-31 00:00:00" />
- <br>
- 结束时间:
- <input type="date" id="end_time" name="trip-start" value={{.End_time}} min="2018-01-01 23:59:59" max="2018-12-31 23:59:59" />
- <br>
- <br>
- <input class="layui-btn" type="button" onclick="submitUpdate()" value=查询>
- <br><br>
- <table border="1">
- <thead>
- <th style="width:200px;">时间</th>
- <th style="width:128px;">服务器ID</th>
- <th style="width:128px;">场景</th>
- <th style="width:128px;">事件ID</th>
- <th style="width:400px;">内容</th>
- </thead>
- <tbody>
- {{range .Events}}
- <tr>
- <td style = "text-align:center;">{{TimeToStr .EventTime}}</td>
- <td style = "text-align:center;">{{.ServerId}}</td>
- <td style = "text-align:center;">{{.Scene}}</td>
- <td style = "text-align:center;">{{.EventId}}</td>
- <td style = "text-align:center;">{{.Label}}</td>
- </tr>
- {{end}}
- </tbody>
- </table>
-
- <script language="JavaScript">
-
- function submitUpdate () {
- var scene = document.getElementById("scene").value;
- var eventid = document.getElementById("eventid").value;
- var start_time = document.getElementById("start_time").value;
- var end_time = document.getElementById("end_time").value;
-
- var text = "token=" + encodeURI(token);
- text += "&scene=" + encodeURI(scene);
- text += "&eventid=" + encodeURI(eventid);
- text += "&start_time=" + encodeURI(start_time);
- text += "&end_time=" + encodeURI(end_time);
-
- $.ajax({
- type:"get",
- url:"/client?" + text,
- success:function (data) {
- // alert(data.status);
- if (data.status){
- window.location.href="/client?"+text;
- }else{
- if (data.info){
- alert(data.info);
- }else{
- window.location.href="/client?"+text;
- }
- }
- }
- });
- }
- </script>
- </body>
- </html>
|