-
Notifications
You must be signed in to change notification settings - Fork 0
/
detail.jst
executable file
·515 lines (493 loc) · 20.6 KB
/
detail.jst
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/style.css">
<title></title>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.form.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
</head>
<body>
<div class="main_detail">
<div class="detail_content">
<div class="left">
<div></div>
<div class="list-group">
<a href="javascript:void(0);" class="list-group-item active">
<p class="list-group-item-text">
状态信息
</p>
</a>
<a href="javascript:void(0);" class="list-group-item">
<p class="list-group-item-text">
调试模式
</p>
</a>
<a href="javascript:void(0);" class="list-group-item">
<p class="list-group-item-text">
版本配置
</p>
</a>
<a href="javascript:void(0);" class="list-group-item">
<p class="list-group-item-text">
系统管理
</p>
</a>
</div>
</div>
<div class="right">
<div class="right_main">
<div class="panel panel-warning" id="status">
<div class="panel-heading">
状态信息
</div>
<div class="panel-body" style="overflow-y: auto;">
<table class="table table-striped table-bordered table_status" >
<thead>
<th colspan="2" style="background-color:#FFFFCC ">版本信息</th>
</thead>
<tbody>
<tr>
<td>LINUX版本</td>
<td><% readVer("linux");%></td>
</tr>
<tr>
<td>ZYNQ_PL版本</td>
<td><% readVer("zynq");%></td>
</tr>
<tr>
<td>FPGA0版本</td>
<td><% readVer("fpga0");%></td>
</tr>
<tr>
<td>FPGA1版本</td>
<td><% readVer("fpga1");%></td>
</tr>
</tbody>
</table>
<table class="table table-striped table-bordered table_status" >
<thead>
<th colspan="2" style="background-color: #B0C4DE">电压信息</th>
</thead>
<tbody>
<td>电压显示</td>
<td><% getVol("vol"); %></td>
</tr>
<tr>
<td>核压显示</td>
<td><% getVol("core"); %></td>
</tr>
<tr>
<td>DDR电压</td>
<td><% getVol("ddr"); %></td>
</tr>
</tbody>
</table>
<table class="table table-striped table-bordered table_status" >
<thead>
<th colspan="2" style="background-color: #B0E0E6">温度显示</th>
</thead>
<tbody>
<tr>
<td>温度显示</td>
<td id="temp"></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="panel panel-success" id="debugger">
<div class="panel-heading">
调试模式
</div>
<div class="panel-body" style="overflow-y: auto;">
<div class="panel-body-content">
<div>
<div class="panel panel-default" style="height: 270px;">
<div class="panel-heading">
<h3 class="panel-title">
角度发送
</h3>
</div>
<div class="panel-body" >
<form class="form-horizontal" role="form" id="saveReportForm1" method="get" action="action/readPhase" onsubmit="return saveReport1(this)" >
<div class="form-group">
<label for="theta1" class="col-sm-3 control-label" style="font-size: 100">Theta</label>
<div class="col-sm-9">
<input type="text" name="theta" class="form-control" id="theta1" placeholder="请输入Theta">
</div>
</div>
<div class="form-group">
<label for="mask" class="col-sm-3 control-label">Phi</label>
<div class="col-sm-9">
<table>
<tr> <input type="text" name="phi" class="form-control" id="mask" placeholder="请输入Phi"></tr>
<tr><td>结果:</td><td id="phi1"><td></tr>
<tr><td></td><td id="phi2"><td></tr>
</table>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-6 col-sm-6">
<button type="submit" class="btn btn-default" id="btn1">提交</button>
<!--<input type="submit" value="提交">-->
</div>
</div>
</form>
</div>
</div>
</div>
<div>
<div class="panel panel-default" style="height: 270px">
<div class="panel-heading">
<h3 class="panel-title">
单通道配置
</h3>
</div>
<div class="panel-body" >
<form class="form-horizontal" role="form" id="saveReportForm2" method="get" action="action/channelSet" onsubmit="return saveReport1(this)">
<div class="form-group">
<label for="theta2" class="col-sm-3 control-label" style="font-size: 100">通道号</label>
<div class="col-sm-9">
<input type="text" name="cha" class="form-control" id="theta2" placeholder="请输入通道号">
</div>
</div>
<div class="form-group">
<label for="phy1" class="col-sm-3 control-label">相位</label>
<div class="col-sm-9">
<input type="text" name="phase" class="form-control" id="phy1" placeholder="请输入相位">
</div>
</div>
<div class="form-group">
<label for="phy2" class="col-sm-3 control-label">衰减</label>
<div class="col-sm-9">
<input type="text" name="datt" class="form-control" id="phy2" placeholder="请输入衰减">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-6 col-sm-6">
<!--<input type="submit" value="提交">-->
<button type="submit" class="btn btn-default" id="btn2">提交</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="adjustment">
<h3>校准数据</h3>
<div class="adjustment_content">
<form id="saveReportForm4" class="form-horizontal table_version" method="post" action="/action/deletecali" onsubmit="return saveReport2(this)">
<table class="table table_adjustment" style="margin:10px 0 ">
<tbody>
<tr style="border-radius: 10px;">
<td colspan="2" style="text-align: center;"><input type="file" name="浏览" id="" /></td>
<td rowspan="2" class="flash"><p>flash状态</p></td>
</tr>
<tr>
<td><button id="fat-btn" class="btn btn-primary" type="submit">删除校准数据文件</button></td>
<td><button id="fat-btn" class="btn btn-primary" type="submit">写入校准数据文件</button></td>
</tr>
</tbody>
</table>
</form>
</div>
</div>
<div class="RS422_debug">
<h3>RS422调试</h3>
<div class="RS422_debug_content">
<table class="table table_RS422_debug" style="margin: 10px 0">
<tbody>
<tr>
<form role="form" action="action/rs422_normal" onsubmit="return saveReport1(this)">
<td><button id="fat-btn" class="btn btn-primary" type="submit">正常模式</button></td>
</form>
<form role="form" action="action/rs422_loop_line" onsubmit="return saveReport1(this)">
<td><button id="fat-btn" class="btn btn-primary" type="submit">串行环回</button></td>
</form>
<form role="form" action="action/rs422_loop_data" onsubmit="return saveReport1(this)">
<td><button id="fat-btn" class="btn btn-primary" type="submit">数据环回</button></td>
</form>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="panel panel-info" id="version">
<div class="panel-heading">
版本配置
</div>
<div class="panel-body">
<form id="saveReportForm3" class="form-horizontal" method="post" action="/action/uploadTest" enctype="multipart/form-data" onsubmit="return saveReport2(this)">
<table class="table table-striped table-bordered table_version" >
<thead>
<th colspan="5" style="background-color: #B0C4DE">软件配置</th>
</thead>
</table>
</form>
<form id="saveReportForm4" class="form-horizontal table_version" method="post" action="/action/uploadTest" enctype="multipart/form-data" onsubmit="return saveReport2(this)">
<table class="table table-striped table-bordered table_version" >
<tbody>
<tr>
<td>LINUX版本</td>
<td>00000000</td>
<td>
<a href="javascript:void(0);" class="a-upload">
<input type="file" name="file" id="test2" />
浏览
</a>
</td>
<td class="file_item"></td>
<td><button type="submit" class="btn btn-default" id="btn4">提交</button></td>
</tr>
</tbody>
</table>
</form>
<form id="saveReportForm5" class="form-horizontal table_version" method="post" action="/action/uploadTest" enctype="multipart/form-data" onsubmit="return saveReport2(this)" style="margin-bottom:20px">
<table class="table table-striped table-bordered table_version" >
<tbody>
<tr>
<td>软件版本</td>
<td>00000000</td>
<td>
<a href="javascript:void(0);" class="a-upload">
<input type="file" name="file" id="test3" />
浏览
</a>
</td>
<td class="file_item"></td>
<td><button type="submit" class="btn btn-default" id="btn5">提交</button></td>
</tr>
</tbody>
</table>
</form>
<form id="saveReportForm6" class="form-horizontal table_version" method="post" action="/action/uploadTest" enctype="multipart/form-data" onsubmit="return saveReport2(this)">
<table class="table table-striped table-bordered table_version" >
<thead>
<th colspan="5" style="background-color: #B0C4DE">FPGA配置</th>
</thead>
<tbody>
<tr>
<td>ZYNQ_PL版本</td>
<td>00000000</td>
<td>
<a href="javascript:void(0);" class="a-upload">
<input type="file" name="file" id="test4" />
浏览
</a>
</td>
<td class="file_item"></td>
<td><button type="submit" class="btn btn-default" id="btn6">提交</button></td>
</tr>
</tbody>
</table>
</form>
<form id="saveReportForm7" class="form-horizontal table_version" method="post" action="/action/uploadTest" enctype="multipart/form-data" onsubmit="return saveReport2(this)">
<table class="table table-striped table-bordered table_version" >
<tbody>
<tr>
<td>FPGA0版本</td>
<td>00000000</td>
<td>
<a href="javascript:void(0);" class="a-upload">
<input type="file" name="file" id="test5" />
浏览
</a>
</td>
<td class="file_item"></td>
<td><button type="submit" class="btn btn-default" id="btn7">提交</button></td>
</tr>
</tbody>
</table>
</form>
<form id="saveReportForm8" class="form-horizontal table_version" method="post" action="/action/uploadTest" enctype="multipart/form-data" onsubmit="return saveReport2(this)">
<table class="table table-striped table-bordered table_version" >
<tbody>
<tr>
<td>FPGA1版本</td>
<td>00000000</td>
<td>
<a href="javascript:void(0);" class="a-upload">
<input type="file" name="file" id="test6" />
浏览
</a>
</td>
<td class="file_item"></td>
<td><button type="submit" class="btn btn-default" id="btn8">提交</button></td>
</tr>
</tbody>
</table>
</form>
</div>
</div>
<div class="panel panel-danger" id="system">
<div class="panel-heading">
系统管理
</div>
<div class="panel-body" >
<div class="panel panel-default" style="height: 260px;">
<div class="panel-heading">
<h3 class="panel-title">
管理口令
</h3>
</div>
<div class="panel-body" >
<form class="form-horizontal" role="form" method="get" action="action/upload" onsubmit="return saveReport1(this)">
<div class="form-group">
<label for="old_password" class="col-sm-2 control-label">原口令</label>
<div class="col-sm-5">
<input type="password" class="form-control" name="old_password" id="old_password" placeholder="请输入原口令" />
</div>
</div>
<div class="form-group">
<label for="new_password" class="col-sm-2 control-label">新口令</label>
<div class="col-sm-5">
<input type="password" class="form-control" name="new_password" id="new_password" placeholder="请输入新口令" />
</div>
</div>
<div class="form-group">
<label for="confirm_password" class="col-sm-2 control-label">口令确认</label>
<div class="col-sm-5">
<input type="password" class="form-control" name="confirm_password" id="confirm_password" placeholder="请确认口令" />
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-4 col-sm-10">
<button type="submit" class="btn btn-default" id="btn9">提交</button>
</div>
</div>
</form>
</div>
</div>
<div class="panel panel-default" style="height: 260px;">
<div class="panel-heading">
<h3 class="panel-title">
网络管理
</h3>
</div>
<div class="panel-body" >
<form class="form-horizontal" role="form">
<div class="form-group">
<label for="net_address" class="col-sm-2 control-label">网络地址</label>
<div class="col-sm-5">
<input type="password" class="form-control" id="net_address" placeholder="请输入网络地址">
</div>
</div>
<div class="form-group">
<label for="netmask_address" class="col-sm-2 control-label">子网掩码</label>
<div class="col-sm-5">
<input type="text" class="form-control" id="netmask_address" placeholder="请输入子网掩码">
</div>
</div>
<div class="form-group">
<label for="gateway" class="col-sm-2 control-label">网关</label>
<div class="col-sm-5">
<input type="text" class="form-control" id="gateway" placeholder="请输入网关">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-4 col-sm-10">
<button type="submit" class="btn btn-default">提交</button>
</div>
</div>
</form>
</div>
</div>
<div class="panel panel-default" style="height: 140px;">
<div class="panel-heading">
<h3 class="panel-title">
日志管理
</h3>
</div>
<div class="panel-body">
<div>
<button id="fat-btn" class="btn btn-primary" data-loading-text="上传日志"
type="button">上传日志
</button>
<button id="fat-btn" class="btn btn-primary" data-loading-text="删除日志"
type="button">删除日志
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
function saveReport1(form) {
// jquery 表单提交
$(form).ajaxSubmit(
{ type: 'get', // 提交方式 get/post url: 'your url', // 需要提交的 url
data: {},
success: function(data) { // data 保存提交后返回的数据,一般为 json 数据
console.log("data = ",data);
// 此处可对 data 作相关处理
if ( $(form ).attr("id")== "saveReportForm1") {
$("#phi1").text(data);
//document.getElementById("phi1"),innerText = data;
}
alert('提交成功!');
},
error:function(){
console.log("error");
}
//$(this).resetForm(); // 提交后重置表单
});
return false; // 必须返回false,否则表单会自己再做一次提交操作,并且页面跳转
}
function saveReport2(form) {
$(form).ajaxSubmit(
{ type: 'post',
data: {},
success: function(data) {
alert('提交成功!');
}
});
return false; // 必须返回false,否则表单会自己再做一次提交操作,并且页面跳转
}
$(function(){
$(".left .list-group-item").click(function(){
$(".left .list-group-item").removeClass("active");
$(this).focus().addClass("active");
var index = $(this).index();
$(".right_main").animate({"scrollTop":index * $("#status").outerHeight(true)},300);
});
$("form").on("change","input[type='file']",function(e){
var filePath=$(this).val();
var arr=filePath.split('\\');
var fileName=arr[arr.length-1];
$(this).parent().parent().parent().find(".file_item").html(fileName);
})
});
var int=self.setInterval("loadXMLDoc()",1000)
function clock()
{
var t=new Date()
document.getElementById("datetime").innerHTML=t
}
function loadXMLDoc()
{
var xmlhttp;
xmlhttp=new XMLHttpRequest();
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("temp").innerHTML=xmlhttp.responseText;
}
}
xmlhttp.open("GET","/action/gettemp",true);
xmlhttp.send();
}
</script>
</body>
</html>