-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkickstart.html
executable file
·403 lines (389 loc) · 13.5 KB
/
kickstart.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
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
<!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="login.html">退出登录</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="has-sub active">
<a href="javascript:;">
<b class="caret pull-right"></b>
<i class="fa fa-cogs"></i>
<span>页面</span>
</a>
<ul class="sub-menu">
<li class="active"><a href="page_blank.html">空白页</a></li>
</ul>
</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">Kickstarts</li>
</ol>
<!-- end breadcrumb -->
<!-- begin page-header -->
<h1 class="page-header">Kickstarts <small>编辑ks</small></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">ks列表信息</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 -->
<!-- out of page -->
<!-- #modal-dialog -->
<div class="modal fade" id="modal-dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">编辑kickstart</h4>
</div>
<div class="modal-body">
<form
action="http://seantheme.com/"
method="POST"
name="email_to_form"
>
<!-- begin filename -->
<label class="control-label">文件名:</label>
<div class="m-b-15">
<input type="text" class="form-control" id="filename" />
</div>
<!-- end filename -->
<!-- begin content -->
<label class="control-label">内容:</label>
<div class="m-b-15">
<textarea
class="textarea form-control"
id="filecontent"
rows="12"
style="resize:none;"
></textarea>
</div>
</form>
</div>
<div class="modal-footer">
<a
href="javascript:;"
class="btn btn-sm btn-white"
data-dismiss="modal"
>取消</a
>
<a
href="javascript:;"
class="btn btn-sm btn-primary"
onclick="SavaKS()"
>保存</a
>
</div>
</div>
</div>
</div>
<!-- ================== 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/plugins/DataTables/js/dataTables.tableTools.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({
dom: 'T<"clear">lfrtip',
tableTools: {
// sSwfPath: "assets/plugins/DataTables/swf/copy_csv_xls_pdf.swf"
aButtons: [
{
sExtends: "select",
sButtonText: "新增kickstart项目",
fnClick: function(nButton, oConfig, oFlash) {
$("#filename").val("");
$("#filecontent").val("");
$("#modal-dialog").modal({
backdrop: "static",
keyboard: false
});
}
}
]
},
ajax: {
url: "http://10.241.53.227:22222/ks_list",
dataSrc: "", //默认为data
type: "get",
error: function() {
alert("服务器未正常响应,请重试");
}
},
// bAutoWidth: false,
// aoColumns: [{ sWidth: "20%" }, { sWidth: "60%" }, { sWidth: "20%" }],
columns: [
{
data: "path",
title: "路径",
defaultContent: ""
},
{
data: null,
title: "操作",
defaultContent:
"<button class='btn btn-info 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: ": 以降序排列此列"
}
}
});
// 编辑
function EditData(name) {
$.ajax({
type: "get",
url: "http://10.241.53.227:22222/ks_edit?name=" + name,
dataType: "json",
success: function(response) {
if (response.code == 0) {
$("#filename").val(name);
$("#filecontent").val(response.ksdata);
$("#modal-dialog").modal({
backdrop: "static",
keyboard: false
});
}
}
});
}
// 点击
$("#data-table tbody").on("click", "button", function() {
var tds = $(this)
.parents("tr")
.children();
var td = tds[0];
// alert($(td).text());
EditData($(td).text());
});
});
</script>
<script>
function SavaKS() {
var ksfile_name = $("#filename").val();
var ksdata = $("filecontent").val();
$.ajax({
type: "post",
url: "http://10.241.53.227:22222/ks_save",
data: {
ksfile_name,
ksdata
},
dataType: "json",
success: function(response) {}
});
}
</script>
</body>
</html>