-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdistros.html
executable file
·349 lines (333 loc) · 11.8 KB
/
distros.html
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
<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
<!--[if !IE]><!-->
<html lang="zh-CN">
<!--<![endif]-->
<head>
<meta charset="utf-8" />
<title>操作系统自动化安装管理系统</title>
<meta
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
name="viewport"
/>
<meta content="" name="description" />
<meta content="" name="author" />
<!-- ================== BEGIN BASE CSS STYLE ================== -->
<link
href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700"
rel="stylesheet"
/>
<link
href="assets/plugins/jquery-ui/themes/base/minified/jquery-ui.min.css"
rel="stylesheet"
/>
<link
href="assets/plugins/bootstrap/css/bootstrap.min.css"
rel="stylesheet"
/>
<link
href="assets/plugins/font-awesome/css/font-awesome.min.css"
rel="stylesheet"
/>
<link href="assets/css/animate.min.css" rel="stylesheet" />
<link href="assets/css/style.min.css" rel="stylesheet" />
<link href="assets/css/style-responsive.min.css" rel="stylesheet" />
<link href="assets/css/theme/default.css" rel="stylesheet" id="theme" />
<!-- ================== END BASE CSS STYLE ================== -->
<!-- ================== BEGIN BASE JS ================== -->
<link
href="assets/plugins/DataTables/css/data-table.css"
rel="stylesheet"
/>
<script src="assets/plugins/pace/pace.min.js"></script>
<!-- ================== END BASE JS ================== -->
</head>
<body>
<!-- begin #page-loader -->
<div id="page-loader" class="fade in"><span class="spinner"></span></div>
<!-- end #page-loader -->
<!-- begin #page-container -->
<div id="page-container" class="fade page-sidebar-fixed page-header-fixed">
<!-- begin #header -->
<div id="header" class="header navbar navbar-default navbar-fixed-top">
<!-- begin container-fluid -->
<div class="container-fluid">
<!-- begin mobile sidebar expand / collapse button -->
<div class="navbar-header">
<a href="index.html" class="navbar-brand"
><span class="navbar-logo"></span> OSAIMS
</a>
<button
type="button"
class="navbar-toggle"
data-click="sidebar-toggled"
>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<!-- end mobile sidebar expand / collapse button -->
<!-- begin header navigation right -->
<ul class="nav navbar-nav navbar-right">
<li class="dropdown navbar-user">
<a
href="javascript:;"
class="dropdown-toggle"
data-toggle="dropdown"
>
<img
src="http://ww1.sinaimg.cn/large/006tNc79ly1g3chy90b1vj303a03c0sp.jpg"
alt="avatar"
/>
<span class="hidden-xs">陶俊存</span> <b class="caret"></b>
</a>
<ul class="dropdown-menu animated fadeInLeft">
<li class="arrow"></li>
<li><a href="javascript:;">个人中心</a></li>
<li class="divider"></li>
<li><a href="javascript:;">系统设置</a></li>
<li class="divider"></li>
<li><a href="javascript:;">退出登录</a></li>
</ul>
</li>
</ul>
<!-- end header navigation right -->
</div>
<!-- end container-fluid -->
</div>
<!-- end #header -->
<!-- begin #sidebar -->
<div id="sidebar" class="sidebar">
<!-- begin sidebar scrollbar -->
<div data-scrollbar="true" data-height="100%">
<!-- begin sidebar nav -->
<ul class="nav">
<li class="has-sub">
<a href="javascript:;">
<b class="caret pull-right"></b>
<i class="fa fa-laptop"></i>
<span>Dashboard</span>
</a>
<ul class="sub-menu">
<li><a href="index.html">Dashboard v1</a></li>
<li><a href="index_v2.html">Dashboard v2</a></li>
</ul>
</li>
<li class="active">
<a href="javascript:;">
<b class="caret pull-right"></b>
<i class="fa fa-cogs"></i>
<span>Distros</span>
</a>
</li>
<!-- begin sidebar minify button -->
<li>
<a
href="javascript:;"
class="sidebar-minify-btn"
data-click="sidebar-minify"
><i class="fa fa-angle-double-left"></i
></a>
</li>
<!-- end sidebar minify button -->
</ul>
<!-- end sidebar nav -->
</div>
<!-- end sidebar scrollbar -->
</div>
<div class="sidebar-bg"></div>
<!-- end #sidebar -->
<!-- begin #content -->
<div id="content" class="content">
<!-- begin breadcrumb -->
<ol class="breadcrumb pull-right">
<li><a href="javascript:;">Home</a></li>
<li><a href="javascript:;">Configuration</a></li>
<li class="active">Distros</li>
</ol>
<!-- end breadcrumb -->
<!-- begin page-header -->
<h1 class="page-header">Distros</h1>
<!-- end page-header -->
<div class="panel panel-inverse">
<div class="panel-heading">
<div class="panel-heading-btn">
<a
href="javascript:;"
class="btn btn-xs btn-icon btn-circle btn-default"
data-click="panel-expand"
><i class="fa fa-expand"></i
></a>
<a
href="javascript:;"
class="btn btn-xs btn-icon btn-circle btn-warning"
data-click="panel-collapse"
><i class="fa fa-minus"></i
></a>
<a
href="javascript:;"
class="btn btn-xs btn-icon btn-circle btn-danger"
data-click="panel-remove"
><i class="fa fa-times"></i
></a>
</div>
<h4 class="panel-title">输入分发信息</h4>
</div>
<!-- panel body -->
<div class="panel-body">
<div class="table-responsive">
<table
id="data-table"
class="table table-striped table-bordered"
></table>
</div>
</div>
</div>
</div>
<!-- end #content -->
<!-- begin scroll to top btn -->
<a
href="javascript:;"
class="btn btn-icon btn-circle btn-success btn-scroll-to-top fade"
data-click="scroll-top"
><i class="fa fa-angle-up"></i
></a>
<!-- end scroll to top btn -->
</div>
<!-- end page container -->
<!-- ================== BEGIN BASE JS ================== -->
<script src="assets/plugins/jquery/jquery-1.9.1.min.js"></script>
<script src="assets/plugins/jquery/jquery-migrate-1.1.0.min.js"></script>
<script src="assets/plugins/jquery-ui/ui/minified/jquery-ui.min.js"></script>
<script src="assets/plugins/bootstrap/js/bootstrap.min.js"></script>
<!--[if lt IE 9]>
<script src="assets/crossbrowserjs/html5shiv.js"></script>
<script src="assets/crossbrowserjs/respond.min.js"></script>
<script src="assets/crossbrowserjs/excanvas.min.js"></script>
<![endif]-->
<script src="assets/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="assets/plugins/jquery-cookie/jquery.cookie.js"></script>
<!-- ================== END BASE JS ================== -->
<!-- ================== BEGIN PAGE LEVEL JS ================== -->
<script src="assets/plugins/DataTables/js/jquery.dataTables.js"></script>
<script src="assets/js/apps.min.js"></script>
<!-- ================== END PAGE LEVEL JS ================== -->
<script>
$(document).ready(function() {
App.init();
});
</script>
<script>
$(function() {
var table = $("#data-table").DataTable({
ajax: {
url: "http://10.241.53.227:22222/distros",
dataSrc: "", //默认为data
type: "get",
error: function() {
alert("服务器未正常响应,请重试");
}
},
// bAutoWidth: false,
// aoColumns: [{ sWidth: "20%" }, { sWidth: "60%" }, { sWidth: "20%" }],
columns: [
{
data: "name",
title: "镜像名称",
defaultContent: ""
}
// {
// data: null,
// title: "操作",
// defaultContent:
// "<button class='btn btn-success btn-sm'>提交</button> <button class='btn btn-warning btn-sm'>删除</button>"
// }
],
language: {
sProcessing: "处理中...",
sLengthMenu: "显示 _MENU_ 项结果",
sZeroRecords: "没有匹配结果",
sInfo: "显示第 _START_ 至 _END_ 项结果,共 _TOTAL_ 项",
sInfoEmpty: "显示第 0 至 0 项结果,共 0 项",
sInfoFiltered: "(由 _MAX_ 项结果过滤)",
sInfoPostFix: "",
sSearch: "搜索:",
sUrl: "",
sEmptyTable: "表中数据为空",
sLoadingRecords: "载入中...",
sInfoThousands: ",",
oPaginate: {
sFirst: "首页",
sPrevious: "上页",
sNext: "下页",
sLast: "末页"
},
oAria: {
sSortAscending: ": 以升序排列此列",
sSortDescending: ": 以降序排列此列"
}
}
});
// 双击变input,失焦设置tr及data
// $("#data-table tbody").on("dblclick", "td", function() {
// if (table.cell(this).index().columnVisible == 1) {
// return false;
// }
// var tr = $(this).parents("tr");
// var that = this;
// var tds = tr.children();
// var oldValue = $(tds[0]).html();
// $(tds[0]).html(
// "<input type='text' class='form-control' value='" +
// oldValue +
// "' />"
// );
// $($(tds[0]).children("input")[0]).on("blur", function() {
// var newValue = $($(this)[0]).val();
// $(
// $($(this)[0])
// .parents("tr")
// .children()[0]
// ).html(newValue);
// table.cell(that).data(newValue);
// });
// });
// 点击
$("#data-table tbody").on("click", "button", function() {
var td = $(this).parent("td");
var index = table.cell(td).index().row;
// 提交
if ($(this).hasClass("btn-success")) {
SubmitData(index);
} else {
// 删除
DeleteData(index);
}
});
// 提交重命名
function SubmitData(index) {
// 发送指定index的数据
$.ajax({
type: "method",
url: "url",
data: "data",
dataType: "dataType",
success: function(response) {}
});
}
// 删除数据
function DeleteData(index) {
// 发送指定index的数据
$.ajax({
type: "method",
url: "url",
data: "data",
dataType: "dataType",
success: function(response) {}
});
}
});
</script>
</body>
</html>