严智鑫
2024-05-13 cedce4883f0d204f5bf7bf87c0bf4858dabb0c23
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
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
 
<html>
 
<head>
    <title>设备管理</title>
 <link type="image/x-icon" href="${ctx}/static/images/favicon.ico" rel="shortcut icon">
<link href="${ctx}/static/bootstrap/2.3.2/css/bootstrap.min.css" type="text/css" rel="stylesheet" />
<link href="${ctx}/static/jquery-validation/1.11.1/validate.css" type="text/css" rel="stylesheet" />
<link href="${ctx}/static/styles/default.css" type="text/css" rel="stylesheet" />
<link href="${ctx}/static/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" type="text/css" rel="stylesheet" />
<link href="${ctx}/static/bootstrap-switch/css/bootstrap2/bootstrap-switch.css" type="text/css" rel="stylesheet" />
 
<script src="${ctx}/static/jquery/jquery-1.9.1.min.js" type="text/javascript"></script>
<script type="text/javascript" src="${ctx}/static/bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="${ctx}/static/jquery-validation/1.11.1/jquery.validate.min.js" type="text/javascript"></script>
<script src="${ctx}/static/jquery-validation/1.11.1/messages_bs_zh.js" type="text/javascript"></script>
<script src="${ctx}/static/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js" type="text/javascript"></script>
<script src="${ctx}/static/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" type="text/javascript"></script>
<script src="${ctx}/static/holder.js" type="text/javascript"></script>
<script src="${ctx}/static/bootstrap-switch/js/bootstrap-switch.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript" src="${ctx}/static/util.js"></script>      
    <script type="text/javascript">
    function modifyPort(type, id, port) {
        $('#modifyPortModal').modal('toggle');
        $('#portInput').val(port);
        $('#modifyPortForm').attr('action', '${ctx}/device/modifyport/' + type + "/" + id);
    }
    </script>
</head>
<body>
<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <div>
        <section class="content-header">
              <h1>
            设备端口
                <small></small>
              </h1>
          <ol class="breadcrumb">
            <li><a href="${ctx }/device/deviceManage"><i class="fa fa-reply"></i>端口信息</a></li>
            <li class="active"></li>
          </ol>
        </section>
    </div>
    <div>
    <!-- Main content -->
    <section class="content container-fluid">
    <div class="box" style="margin-top: 20px;">
         <div style="overflow: auto;height:650px;" class="box-body no-padding">
        <table class="table table-striped" style="font-size: medium;" id="table">
            <thead><tr>
                <th>#</th>
                <th>设备</th>
                <th>端口</th>
                <th>操作</th>
            </tr></thead>
            <tbody>
                <c:forEach items="${deviceList}" var="device" varStatus="status">
                    <tr>
                        <td>${status.index + 1}</td>
                        <td>${device.name}</td>
                        <td>${device.port}</td>
                        <td>
                            <a class="btn btn-primary" href="#" onclick="modifyPort('${device.type}', ${device.id}, ${device.port})">修改端口</a>
                        </td>
                    </tr>
                </c:forEach>
            </tbody>
        </table>
        </div>
        </div>
    
    <div id="modifyPortModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="height: 200px;">
        <form id="modifyPortForm" method="post" class="form-horizontal">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h3 id="myModalLabel">修改端口</h3>
            </div>
            <div class="modal-body">
                <div class="control-group">
                    <label class="control-label" for="portInput">端口</label>
                    <div class="controls">
                        <input type="text" id="portInput" name="devicePort" class="required" placeholder="Port">
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="submit" class="btn btn-primary">提交</button>
                <button type="button" class="btn" data-dismiss="modal">关闭</button>
            </div>
        </form>
    </div>
    </section>
    </div>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->
</body>
</html>