1
+ {% extends "base-left.html" %}
2
+ {% load staticfiles %}
3
+ {% load extra_tags %}
4
+
5
+ {% block css %}
6
+ < link rel ="stylesheet " href ="{% static 'js/plugins/layer/skin/layer.css' %} ">
7
+ {% endblock %}
8
+
9
+ {% block content %}
10
+
11
+ < section class ="content ">
12
+
13
+ < div class ="nav-tabs-custom ">
14
+ < ul class ="nav nav-tabs ">
15
+ < li class ="active "> < a href ="#activity " data-toggle ="tab "> 设备详情</ a > </ li >
16
+ < li > < a href ="#history " data-toggle ="tab "> 历史纪录</ a > </ li >
17
+ </ ul >
18
+ < div class ="tab-content ">
19
+ < div class ="active tab-pane " id ="activity ">
20
+ < div class ="box-body no-padding ">
21
+ < div class ="btn-group pull-right margin ">
22
+ < button type ="button " class ="btn btn-primary btn-sm margin-r-5 "
23
+ onclick ="doUpload({{ device.id }}) ">
24
+ < i class ="fa fa-cloud-upload "> 上传资料</ i >
25
+ </ button >
26
+ < button type ="button " class ="btn btn-primary btn-sm margin-r-5 " title ="认证管理 " onclick ="doDevice2Connection({{ device.id }}) ">
27
+ < i class ="fa fa-user "> 认证管理</ i >
28
+ </ button >
29
+ < button type ="button " class ="btn btn-primary btn-sm margin-r-5 " title ="自动更新 " onclick ="doAutoUpdate({{ device.id }}) ">
30
+ < i class ="fa fa-circle-o-notch "> 自动更新</ i >
31
+ </ button >
32
+ < button type ="button " class ="btn btn-primary btn-sm margin-r-5 " title ="编辑 " onclick ="doUpdate({{ device.id }}) ">
33
+ < i class ="fa fa-pencil "> 编辑</ i >
34
+ </ button >
35
+ < button type ="button " id ="btnReturn " class ="btn btn-primary btn-sm ">
36
+ < i class ="fa fa-arrow-left "> </ i > 返回
37
+ </ button >
38
+ </ div >
39
+ </ div >
40
+ < div class ="table-responsive mailbox-messages ">
41
+ < table class ="table " id ="tbWorkList " style ="white-space: nowrap; ">
42
+ < tbody >
43
+ < tr class ="info ">
44
+ < td width ="10% "> < strong > 主机名</ strong > </ td >
45
+ < td class ="text-left "> {{ device.sys_hostname }}</ td >
46
+ < td width ="10% "> < strong > SN编号</ strong > </ td >
47
+ < td class ="text-left "> {{ device.sn_number }}</ td >
48
+ </ tr >
49
+ < tr >
50
+ < td > < strong > 系统类型</ strong > </ td >
51
+ < td > {{ device.os_type }}</ td >
52
+ < td > < strong > 设备类型</ strong > </ td >
53
+ < td > {{ device.device_type }}</ td >
54
+ </ tr >
55
+ < tr class ="info ">
56
+ < td > < strong > 设备地址</ strong > </ td >
57
+ < td > {{ device.hostname }}</ td >
58
+ < td > < strong > MAC地址</ strong > </ td >
59
+ < td > {{ device.mac_address }}</ td >
60
+ </ tr >
61
+ < tr >
62
+ < td > < strong > 网络类型</ strong > </ td >
63
+ < td > {% get_con all_code device.network_type 'value' %}</ td >
64
+ < td > < strong > 服务类型</ strong > </ td >
65
+ < td > {% get_con all_code device.service_type 'value' %}</ td >
66
+ </ tr >
67
+ < tr class ="info ">
68
+ < td > < strong > 业务类型</ strong > </ td >
69
+ < td > {% get_con all_code device.operation_type 'value' %}</ td >
70
+ < td > < strong > 机柜信息</ strong > </ td >
71
+ < td > {% get_con all_cabinet device.dev_cabinet 'number' %}</ td >
72
+ </ tr >
73
+ < tr >
74
+ < td > < strong > 购买日期</ strong > </ td >
75
+ < td > {{ device.buyDate }}</ td >
76
+ < td > < strong > 质保日期</ strong > </ td >
77
+ < td > {{ device.warrantyDate }}</ td >
78
+ </ tr >
79
+ < tr class ="info ">
80
+ < td > < strong > 所属</ strong > </ td >
81
+ < td > {% if device.parent %}
82
+ {{ device.parent.sys_hostname }}({{ device.parent.hostname }})
83
+ {% endif %}
84
+ </ td >
85
+ < td > < strong > 责任人</ strong > </ td >
86
+ < td > {% get_con all_user device.leader 'name' %}</ td >
87
+ </ tr >
88
+ < tr >
89
+ < td > < strong > 入库时间</ strong > </ td >
90
+ < td > {{ device.add_time }}</ td >
91
+ < td > < strong > 最后变更</ strong > </ td >
92
+ < td > {{ device.modify_time }}</ td >
93
+ </ tr >
94
+ < tr class ="info ">
95
+ < td > < strong > 最后操作人</ strong > </ td >
96
+ < td > {{ device.changed_by.name }}</ td >
97
+ < td > < strong > </ strong > </ td >
98
+ < td > </ td >
99
+ </ tr >
100
+ < tr >
101
+ < td > < strong > 备注信息</ strong > </ td >
102
+ < td colspan ="3 "> {{ device.desc }}</ td >
103
+ </ tr >
104
+ </ tbody >
105
+ </ table >
106
+ </ div >
107
+ < br >
108
+ < div class ="box-footer ">
109
+
110
+ < ul class ="mailbox-attachments clearfix " id ="imageContainer ">
111
+ {% for file in all_file %}
112
+ < li class ="imageItem ">
113
+ < div class ="mailbox-attachment-info ">
114
+ < a href ="/media/{{ file.file_content }} " target ="_blank "> < i
115
+ class ="fa fa-file-text "> </ i >
116
+ < small > {{ file.file_content|cut:'asset_file/' }}</ small >
117
+ </ a >
118
+ < span class ="mailbox-attachment-size ">
119
+ < b > 上传人</ b > :{{ file.upload_user }}
120
+ < a href ="/media/{{ file.file_content }} " download ="{{ file.file_content }} "
121
+ class ="btn btn-primary btn-xs pull-right ">
122
+ < i class ="fa fa-cloud-download " title ="下载文件 "> </ i >
123
+ </ a >
124
+ < button class ="btn btn-adn btn-xs pull-right margin-r-5 "
125
+ onclick ="doDelete({{ file.id }}) ">
126
+ < i class ="fa fa-trash " title ="删除文件 "> </ i >
127
+ </ button >
128
+ </ span >
129
+ </ div >
130
+ </ li >
131
+ {% endfor %}
132
+ </ ul >
133
+ </ div >
134
+ </ div >
135
+ <!-- /.tab-pane -->
136
+ < div class ="tab-pane " id ="history ">
137
+ < div class ="box-body ">
138
+ < ul class ="todo-list ">
139
+ {% for log in logs %}
140
+ < li >
141
+ <!-- drag handle -->
142
+ < span class ="handle ">
143
+ < small class ="text-maroon ">
144
+ < i class ="glyphicon glyphicon-time "> </ i >
145
+ {{ log.history_date }}
146
+
147
+ {{ log.changed_by }}
148
+
149
+ {{ log.history_type }}
150
+ </ small >
151
+ </ span >
152
+ < span class ="text-sm ">
153
+ {{ log.changes | compare_result }}
154
+ </ span >
155
+ <!--
156
+ <button class="btn btn-xs btn-danger pull-right">还原数据</button>
157
+ -->
158
+ </ li >
159
+ {% endfor %}
160
+ </ ul >
161
+ </ div >
162
+ </ div >
163
+
164
+ <!-- /.tab-pane -->
165
+ </ div >
166
+ <!-- /.tab-content -->
167
+ </ div >
168
+ </ section >
169
+
170
+ <!-- /.content -->
171
+
172
+ {% endblock %}
173
+
174
+ {% block javascripts %}
175
+ < script src ="{% static 'js/plugins/layer/layer.js' %} "> </ script >
176
+ < script src ="{% static 'plugins/masonry/masonry.js' %} "> </ script >
177
+ < script type ="text/javascript ">
178
+ $ ( function ( ) {
179
+ $ ( '#CMDB-EAM' ) . addClass ( 'active' ) ;
180
+ $ ( '#CMDB-EAM-DEVICE' ) . addClass ( 'active' ) ;
181
+
182
+ } ) ;
183
+
184
+ $ ( "#btnReturn" ) . click ( function ( ) {
185
+ history . back ( ) ;
186
+ } ) ;
187
+
188
+
189
+
190
+ </ script >
191
+
192
+ {% endblock %}
0 commit comments