-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex_service.html
361 lines (317 loc) · 20 KB
/
index_service.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SDN Project | Main </title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="font-awesome/css/font-awesome.css" rel="stylesheet">
<link href="css/plugins/iCheck/custom.css" rel="stylesheet">
<link href="css/plugins/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css" rel="stylesheet">
<link href="css/plugins/steps/jquery.steps.css" rel="stylesheet">
<link href="css/plugins/select2/select2.min.css" rel="stylesheet">
<link href="css/plugins/toastr/toastr.min.css" rel="stylesheet">
<link href="css/animate.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<link href="css/topology.css" rel="stylesheet">
<style>
.wrapper-content {
padding: 5px 5px 5px;
}
.wizard > .content > .body {
position: relative;
}
</style>
</head>
<body>
<div id="wrapper">
<nav class="navbar-default navbar-static-side" role="navigation">
<div class="sidebar-collapse">
<ul class="nav metismenu" id="side-menu">
<li class="nav-header">
<div class="dropdown profile-element">
<a data-toggle="dropdown" class="dropdown-toggle" href="#">
<span class="clear"> <span class="block m-t-xs"> <strong class="font-bold">User name</strong>
</span> <span class="text-muted text-xs block">User role <b class="caret"></b></span> </span> </a>
<ul class="dropdown-menu animated fadeInRight m-t-xs">
<li><a href="#">Logout</a></li>
</ul>
</div>
<div class="logo-element">
SDN
</div>
</li>
<li>
<a href="index.html"><i class="fa fa-star"></i> <span class="nav-label">Главная страница</span></a>
</li>
<li>
<a href="#"><i class="fa fa-th-large"></i> <span class="nav-label">Устройства</span> <span class="fa arrow"></span></a>
<ul class="nav nav-second-level">
<li><a href="index_list_all.html">Все устройства</a></li>
</ul>
</li>
<li>
<a href="index_d3.html"><i class="fa fa-sitemap"></i> <span class="nav-label">Топология</span> </a>
</li>
<li class="active">
<a href="#"><i class="fa fa-th-large"></i> <span class="nav-label">Сервисы</span> <span class="fa arrow"></span></a>
<ul class="nav nav-second-level">
<li><a href="index_service.html">Добавить сервис</a></li>
</ul>
</li>
<li>
<a href="#"><i class="fa fa-bar-chart-o"></i> <span class="nav-label">Статистика</span> </a>
</li>
<li>
<a href="#"><i class="fa fa-table"></i> <span class="nav-label">История</span> </a>
</li>
</ul>
</div>
</nav>
<div id="page-wrapper" class="gray-bg">
<div class="row border-bottom">
<nav class="navbar navbar-static-top white-bg" role="navigation" style="margin-bottom: 0">
<div class="navbar-header">
<a class="navbar-minimalize minimalize-styl-2 btn btn-primary " href="#"><i class="fa fa-bars"></i> </a>
<form role="search" class="navbar-form-custom" method="post" action="#">
<div class="form-group">
<input type="text" placeholder="Search for something..." class="form-control" name="top-search" id="top-search">
</div>
</form>
</div>
<ul class="nav navbar-top-links navbar-right">
<li>
<a href="#">
<i class="fa fa-sign-out"></i> Log out
</a>
</li>
</ul>
</nav>
</div>
<div class="wrapper wrapper-content animated fadeInRight">
<div id="graphContainer" class="graphContainer">
</div>
<div class="row">
<div class="col-lg-12">
<div class="ibox">
<div class="ibox-content">
<h3 id="name_header">
Добавление нового сервиса
</h3>
<form id="form" action="#" class="wizard-big">
<h1>Название</h1>
<fieldset>
<div class="row">
<div class="col-lg-12">
<div class="form-group">
<label><h3>Название сервиса</h3></label>
<input id="serviceName" name="serviceName" type="text" class="form-control required" title="Необходимо название">
</div>
</div>
</div>
</fieldset>
<h1>Выбор узлов доступа</h1>
<fieldset>
<div class="row">
<div class="col-lg-6">
<label><h3 id="select_device">Выберите узел на топологии</h3></label>
<div class="panel-body" style="padding: 0px;">
<div class="panel-group" id="accordion">
<div class="panel panel-default">
<div class="panel-heading">
<h5 class="panel-title">
<a id="coll_one" data-toggle="collapse" data-parent="#accordion" href="#collapseOne">Выбрать физический порт</a>
</h5>
</div>
<div id="collapseOne" class="panel-collapse collapse">
<div class="panel-body">
<div class="col-sm-10"><select id="port_select" class="form-control m-b" name="account">
<option></option>
</select>
</div>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#collapseTwo">Выбрать IP адрес</a>
</h4>
</div>
<div id="collapseTwo" class="panel-collapse collapse">
<div class="panel-body">
<div class="col-sm-10"><input id="ip_input" type="text" class="form-control"></div>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#collapseThree">Выбрать TCP/UDP порт</a>
</h4>
</div>
<div id="collapseThree" class="panel-collapse collapse">
<div class="panel-body">
<div class="row">
<div class="col-sm-5"><input id="udp_port_input" type="number" class="form-control"></div>
<div class="radio radio radio-inline" style="margin-top:10px;">
<input type="radio" id="inlineRadio1" value="option1" name="radioInline" checked="">
<label for="inlineRadio1"> TCP </label>
</div>
<div class="radio radio radio-inline" style="margin-top:10px;">
<input type="radio" id="inlineRadio2" value="option2" name="radioInline">
<label for="inlineRadio2"> UDP </label>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<button id="device_add" class="btn btn-primary " type="button"><i class="fa fa-check"></i> Добавить</button>
</div>
<div class="col-lg-6">
<label id="select_device2"><h3 id="device_count">Всего добавлено узлов: 0</h3></label>
<div class="panel panel-default">
<table id="all_dev_table" class="table table-bordered" style="margin-bottom: 0px;">
<thead>
<tr>
<th></th>
<th>Узел </th>
<th>Физический порт </th>
<th>IP адрес</th>
<th>TCP/UDP порт</th>
</tr>
</thead>
<tbody>
<tr></tr>
</tbody>
</table>
</div>
<button id="dev_delete" class="btn btn-danger " type="button"><i class="fa fa-trash"></i> Удалить</button>
</div>
</div>
</fieldset>
<h1>Требования к сервису</h1>
<fieldset>
<div class="row">
<div class="col-lg-6">
<label><h3>Требования к маршруту прохождения трафика</h3></label>
<div class="row">
<div class="col-md-8">
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-info-circle"></i> Обязательные узлы
</div>
<select id="node_list" class="select2_demo_2 form-control" multiple="multiple">
</select>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-info-circle"></i> Обязательные линки
</div>
<select id="link_list" class="select2_demo_2 form-control" multiple="multiple">
</select>
</div>
</div>
</div>
<button id="node_add" class="btn btn-primary " type="button"><i class="fa fa-check"></i> Добавить</button>
</div>
<div class="col-lg-6">
<label><h3>Требования к качеству сервиса</h3></label>
<div class="panel-body" style="padding: 0px;">
<div class="panel-group" id="accordion">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#collapseFour">Полоса пропускания</a>
</h4>
</div>
<div id="collapseFour" class="panel-collapse collapse in">
<div class="panel-body">
<div class="row">
<div class="col-sm-6"><input id="bw_input" type="number" class="form-control"></div>
<label style="margin-bottom: 0px; margin-top: 10px;">Kbit/s</label>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="ibox-title back-change hidden"></div>
</fieldset>
</form>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div>
<strong>Copyright</strong> SDN Project Company © 2016
</div>
</div>
</div>
</div>
<script>
var data = {
"nodes": [
{ "id": 0, "name": "Zelax 1", "icon": "img/switch.svg", "IpAddress": "10.30.1.1", "Ports": [{"name": "Ethernet1/0/9", "name2": 2}, {"name": "Ethernet1/0/1", "name2": 2}]},
{ "id": 1, "name": "Zelax 2", "icon": "img/switch-d.svg", "IpAddress": "10.20.1.1", "Ports": [{"name": "Ethernet1/0/9", "name2": 2}, {"name": "Ethernet1/0/19", "name2": 2}]},
{ "id": 2, "name": "Zelax 3", "icon": "img/switch.svg", "IpAddress": "10.31.1.1", "Ports": [{"name": "Ethernet1/0/9", "name2": 2}, {"name": "Ethernet1/0/29", "name2": 2}]},
{ "id": 3, "name": "Router 31", "icon": "img/router.svg", "IpAddress": "10.36.2.1", "Ports": [{"name": "Ethernet1/0/9", "name2": 2}, {"name": "Ethernet1/0/39", "name2": 2}]},
{ "id": 4, "name": "Router 3", "icon": "img/router-d.svg", "IpAddress": "10.31.5.1", "Ports": [{"name": "Ethernet1/0/2", "name2": 2}, {"name": "Ethernet1/0/9", "name2": 2}] },
{ "id": 5, "name": "Router 41", "icon": "img/router.svg", "IpAddress": "10.31.5.1", "Ports": [{"name": "Ethernet1/0/1", "name2": 2}, {"name": "Ethernet1/0/3", "name2": 2}]},
{ "id": 6, "name": "Router 5", "icon": "img/router.svg", "IpAddress": "10.31.5.1", "Ports": [{"name": "Ethernet1/0/3", "name2": 2}, {"name": "Ethernet1/0/19", "name2": 2}]},
{ "id": 7, "name": "Brocade 1", "icon": "img/switch.svg", "IpAddress": "10.31.5.1", "Ports": [{"name": "Ethernet1/0/5", "name2": 2}, {"name": "Ethernet1/0/1", "name2": 2}]},
{ "id": 8, "name": "Brocade 2", "icon": "img/switch.svg", "IpAddress": "10.31.5.1", "Ports": [{"name": "Ethernet1/0/5", "name2": 2}, {"name": "Ethernet1/0/8", "name2": 2}, {"name": "Ethernet1/0/54", "name2": 2}, {"name": "Ethernet1/0/1", "name2": 2}]}
],
"links": [
{ "source": 0, "port_src": "Ethernet1/0/3", "port_dst": "Ethernet1/0/1", "target": 1, "name": "Z1-Z2", "Link_found": "0", "Bandwidth": "10" },
{ "source": 0, "port_src": "Ethernet1/0/2", "port_dst": "Ethernet1/0/2", "target": 2, "name": "Z1-Z3", "Link_found": "1", "Bandwidth": "1" },
{ "source": 0, "port_src": "Ethernet1/0/4", "port_dst": "Ethernet1/0/3", "target": 3, "name": "Z1-R31", "Link_found": "0", "Bandwidth": "100" },
{ "source": 1, "port_src": "Ethernet1/0/3", "port_dst": "Ethernet1/0/1", "target": 2, "name": "Z2-Z3", "Link_found": "1", "Bandwidth": "15" },
{ "source": 3, "port_src": "Ethernet1/0/3", "port_dst": "Ethernet1/0/1", "target": 4, "name": "R31-R3", "Link_found": "0", "Bandwidth": "5" },
{ "source": 3, "port_src": "Ethernet1/0/1", "port_dst": "Ethernet1/0/2", "target": 5, "name": "R31-R41", "Link_found": "0", "Bandwidth": "25" },
{ "source": 3, "port_src": "Ethernet1/0/5", "port_dst": "Ethernet1/0/3", "target": 6, "name": "R31-R5", "Link_found": "1", "Bandwidth": "10" },
{ "source": 4, "port_src": "Ethernet1/0/3", "port_dst": "Ethernet1/0/1", "target": 5, "name": "R3-R41", "Link_found": "0", "Bandwidth": "5" },
{ "source": 4, "port_src": "Ethernet1/0/5", "port_dst": "Ethernet1/0/1", "target": 6, "name": "R3-R5", "Link_found": "0", "Bandwidth": "100" },
{ "source": 5, "port_src": "Ethernet1/0/3", "port_dst": "Ethernet1/0/1", "target": 6, "name": "R41-R5", "Link_found": "1", "Bandwidth": "1" },
{ "source": 6, "port_src": "Ethernet1/0/3", "port_dst": "Ethernet1/0/1", "target": 7, "name": "R5-B1", "Link_found": "0", "Bandwidth": "15" },
{ "source": 7, "port_src": "Ethernet1/0/1", "port_dst": "Ethernet1/0/5", "target": 8, "name": "B1-B2", "Link_found": "0", "Bandwidth": "10" }
]
};
var result = {};
</script>
<!-- Mainly scripts -->
<script src="js/jquery-2.1.1.js"></script>
<script src="js/bootstrap.min.js"></script>
<!-- Custom and plugin javascript -->
<script src="js/inspinia.js"></script>
<script src="js/plugins/pace/pace.min.js"></script>
<script src="js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<!-- Chosen -->
<script src="js/plugins/chosen/chosen.jquery.js"></script>
<!-- iCheck -->
<script src="js/plugins/iCheck/icheck.min.js"></script>
<!-- MENU -->
<script src="js/plugins/metisMenu/jquery.metisMenu.js"></script>
<!-- Select2 -->
<script src="js/plugins/select2/select2.full.min.js"></script>
<!-- Topology script -->
<script src="js/d3.min.js"></script>
<script src="my.js"></script>
<!-- Steps -->
<script src="js/steps/jquery.steps.min.js"></script>
<!-- Jquery Validate -->
<script src="js/plugins/validate/jquery.validate.min.js"></script>
<!-- Toastr events plugin -->
<script src="js/plugins/toastr/toastr.min.js"></script>
<!-- Form Wizard interaction script -->
<script src="form.js"></script>
<!-- Wizard interaction script -->
<script src="services.js"></script>
</body>
</html>