();
482 | //行数统计
483 | long count = 0;
484 | // 使用随机读取
485 | RandomAccessFile reader = null;
486 | try {
487 | //使用读模式
488 | reader = new RandomAccessFile(file, RAF_MODE);
489 | //读取文件长度
490 | long length = reader.length();
491 | //如果是0,代表是空文件,直接返回空结果
492 | if (length == 0L) {
493 | return result;
494 | } else {
495 | //初始化游标
496 | long pos = length - 1;
497 | while (pos > 0) {
498 | pos--;
499 | //开始读取
500 | reader.seek(pos);
501 | //如果读取到\n代表是读取到一行
502 | if (reader.readByte() == '\n') {
503 | //使用readLine获取当前行,ISO-8859-1,解决中文乱码的问题
504 | String line = new String(reader.readLine().getBytes("ISO-8859-1"), cset);
505 | //保存结果
506 | result.add(line);
507 | //行数统计,如果到达了numRead指定的行数,就跳出循环
508 | count++;
509 | if (count == numRead) {
510 | break;
511 | }
512 | }
513 | }
514 | if (pos == 0) {
515 | reader.seek(0);
516 | result.add(reader.readLine());
517 | }
518 | }
519 | } catch (IOException e) {
520 | IOUtils.closeQuietly(reader);
521 | e.printStackTrace();
522 | } finally {
523 | IOUtils.closeQuietly(reader);
524 | }
525 | // 倒序
526 | Collections.reverse(result);
527 | return result;
528 | }
529 |
530 |
531 | }
532 |
--------------------------------------------------------------------------------
/log-collection/src/main/java/com/gizwits/tail/TailerListener.java:
--------------------------------------------------------------------------------
1 |
2 | package com.gizwits.tail;
3 |
4 | public interface TailerListener {
5 |
6 | /**
7 | * The tailer will call this method during construction,
8 | * giving the listener a method of stopping the tailer.
9 | *
10 | * @param tailer the tailer.
11 | */
12 | void init(Tailer tailer);
13 |
14 | /**
15 | * This method is called if the tailed file is not found.
16 | *
17 | * Note: this is called from the tailer thread.
18 | */
19 | void fileNotFound();
20 |
21 | /**
22 | * Called if a file rotation is detected.
23 | *
24 | * This method is called before the file is reopened, and fileNotFound may
25 | * be called if the new file has not yet been created.
26 | *
27 | * Note: this is called from the tailer thread.
28 | */
29 | void fileRotated();
30 |
31 | /**
32 | * Handles a line from a Tailer.
33 | *
34 | * Note: this is called from the tailer thread.
35 | *
36 | * @param line the line.
37 | */
38 | void handle(String line);
39 |
40 | /**
41 | * Handles an Exception .
42 | *
43 | * Note: this is called from the tailer thread.
44 | *
45 | * @param ex the exception.
46 | */
47 | void handle(Exception ex);
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/log-collection/src/main/java/com/gizwits/tail/TailerListenerAdapter.java:
--------------------------------------------------------------------------------
1 |
2 | package com.gizwits.tail;
3 |
4 |
5 | public class TailerListenerAdapter implements TailerListener {
6 |
7 | /**
8 | * The tailer will call this method during construction,
9 | * giving the listener a method of stopping the tailer.
10 | *
11 | * @param tailer the tailer.
12 | */
13 | public void init(final Tailer tailer) {
14 | }
15 |
16 | /**
17 | * This method is called if the tailed file is not found.
18 | */
19 | public void fileNotFound() {
20 | }
21 |
22 | /**
23 | * Called if a file rotation is detected.
24 | *
25 | * This method is called before the file is reopened, and fileNotFound may
26 | * be called if the new file has not yet been created.
27 | */
28 | public void fileRotated() {
29 | }
30 |
31 | /**
32 | * Handles a line from a Tailer.
33 | *
34 | * @param line the line.
35 | */
36 | public void handle(final String line) {
37 | }
38 |
39 | /**
40 | * Handles an Exception .
41 | *
42 | * @param ex the exception.
43 | */
44 | public void handle(final Exception ex) {
45 | }
46 |
47 | /**
48 | * Called each time the Tailer reaches the end of the file.
49 | *
50 | * Note: this is called from the tailer thread.
51 | *
52 | * Note: a future version of commons-io will pull this method up to the TailerListener interface,
53 | * for now clients must subclass this class to use this feature.
54 | *
55 | * @since 2.5
56 | */
57 | public void endOfFileReached() {
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/log-collection/src/main/java/com/gizwits/util/LRUCache.java:
--------------------------------------------------------------------------------
1 | package com.gizwits.util;
2 |
3 | import java.util.LinkedHashMap;
4 | import java.util.Map;
5 |
6 | /**
7 | * Created by feel on 2017/1/17.
8 | * A cache implementing a least recently used policy.
9 | * 最频繁访问驻留缓存算法 LinkedHashMap,内部已经帮我们实现了该算法
10 | * sun.misc.LRUCache
11 | * py4j.reflection.LRUCache
12 | * org.apache.kafka.common.cache.LRUCache
13 | * ch.qos.logback.classic.turbo.LRUMessageCache
14 | */
15 | public class LRUCache extends LinkedHashMap {
16 |
17 | private int cacheSize;
18 |
19 | /**
20 | * true代表使用访问顺序
21 | *
22 | * @param cacheSize
23 | */
24 | public LRUCache(int cacheSize) {
25 | super(16, 0.75f, true);
26 | this.cacheSize = cacheSize;
27 | }
28 |
29 | protected boolean removeEldestEntry(Map.Entry eldest) {
30 | return size() >= cacheSize;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/log-collection/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=8080
2 | security.user.name=admin
3 | security.user.password=123
4 | security.user.role=USER
5 | security.basic.authorize-mode=authenticated
6 | security.enable-csrf=false
7 | app.product_key=xx
8 | app.did=xx
9 | app.mac=xx
10 | app.auth_id=xx
11 | app.auth_secret=xx
12 | app.subkey=client
13 | app.prefetch_count=50
14 | wechat.mp.appId=xx
15 | wechat.mp.secret=xx
16 | wechat.mp.token=weixin
17 | wechat.mp.aesKey=xx
18 | semantic.api=http://nlp
19 | logMonitor.logpath=log-collection.log
--------------------------------------------------------------------------------
/log-collection/src/main/resources/banner.txt:
--------------------------------------------------------------------------------
1 | _
2 | _______| |
3 | |_________|
4 | _________
5 | | _______| 万物互联
6 | | | ____
7 | | | |__ | 机智云
8 | | |_____| |
9 | |_________| Gizwits
10 | 机智云只为硬件而生的云服务
11 |
12 |
--------------------------------------------------------------------------------
/log-collection/src/main/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
10 | [%level] %d{yyyy/MM/dd-HH:mm:ss} [%thread] TTL=%r %logger{36} [%c : %line] - %msg%n
11 |
12 |
13 |
14 |
15 |
17 |
18 | log-collection.log
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | log-collection.%i.log.zip
27 | 1
28 | 30
29 |
30 |
31 |
32 | 10MB
33 |
34 |
35 |
36 | [%level] %d{yyyy/MM/dd-HH:mm:ss} [%thread] TTL=%r %logger{36} [%c : %line] - %msg%n
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 |
--------------------------------------------------------------------------------
/log-collection/src/main/resources/static/css/main.css:
--------------------------------------------------------------------------------
1 |
2 | .iconfont {
3 | font-family: "iconfont" !important;
4 | speak: none;
5 | font-style: normal;
6 | font-weight: normal;
7 | font-variant: normal;
8 | text-transform: none;
9 | -webkit-font-smoothing: antialiased;
10 | -moz-osx-font-smoothing: grayscale
11 | }
12 |
13 | html {
14 | height: 100%
15 | }
16 |
17 | body {
18 | height: 100%;
19 | font-family: 'noto-thin'
20 | }
21 |
22 | body #main {
23 | height: 100%
24 | }
25 |
26 | body h2, body h3 {
27 | font-family: 'noto-light'
28 | }
29 |
30 | #lowie-main {
31 | display: none
32 | }
33 |
34 | .lower-ie #main {
35 | display: none
36 | }
37 |
38 | .lower-ie #lowie-main {
39 | display: block;
40 | height: 100%;
41 | width: 100%;
42 | padding: 200px 0 100px;
43 | background-color: #2a3c54
44 | }
45 |
46 | .lower-ie #lowie-main img {
47 | display: block;
48 | width: 60%;
49 | margin: 0 auto
50 | }
51 |
52 | .navbar-default {
53 | border: none;
54 | background-color: #293c55;
55 | z-index: 13;
56 | -webkit-transition: background-color 0.5s linear;
57 | transition: background-color 0.5s linear
58 | }
59 |
60 | .navbar-default .navbar-nav {
61 | margin: 0 -15px;
62 | -webkit-transition: background-color 0.5s linear;
63 | transition: background-color 0.5s linear
64 | }
65 |
66 | .navbar-default .navbar-nav li {
67 | position: relative
68 | }
69 |
70 | .navbar-default .navbar-nav li a {
71 | color: #eee;
72 | background-color: none !important
73 | }
74 |
75 | .navbar-default .navbar-nav li a:hover, .navbar-default .navbar-nav li a:focus {
76 | color: #f9f9f9;
77 | background-color: #162436
78 | }
79 |
80 | .navbar-default .navbar-nav li a .iconfont {
81 | font-size: 12px
82 | }
83 |
84 | .navbar-default .navbar-nav li.open {
85 | background-color: #162436;
86 | color: #fff
87 | }
88 |
89 | .navbar-default .navbar-nav li.open >
90 | a:focus, .navbar-default .navbar-nav li.open >
91 | a:hover {
92 | color: #eee;
93 | background-color: #162436
94 | }
95 |
96 | .navbar-default .navbar-nav li.active >
97 | a {
98 | padding-top: 11px;
99 | border-top: 4px solid #a9334c;
100 | color: #fff;
101 | background-color: transparent;
102 | font-family: noto-light
103 | }
104 |
105 | .navbar-default .navbar-nav li.active >
106 | a:hover, .navbar-default .navbar-nav li.active >
107 | a:focus {
108 | color: #f9f9f9;
109 | background-color: #162436
110 | }
111 |
112 | .navbar-default .navbar-nav li .dropdown-menu {
113 | width: 100%;
114 | padding: 0;
115 | background-color: #162436;
116 | -webkit-box-shadow: none;
117 | box-shadow: none;
118 | border: none
119 | }
120 |
121 | .navbar-default .navbar-nav li .dropdown-menu li {
122 | background-color: #162436;
123 | border-top: none;
124 | padding: 5px 0
125 | }
126 |
127 | .navbar-default .navbar-nav li .dropdown-menu li:hover, .navbar-default .navbar-nav li .dropdown-menu li:focus {
128 | background-color: #a9334c
129 | }
130 |
131 | .navbar-default .navbar-nav li .dropdown-menu li:hover a, .navbar-default .navbar-nav li .dropdown-menu li:focus a {
132 | background-color: #a9334c
133 | }
134 |
135 | .navbar-default .navbar-logo {
136 | height: 32px;
137 | margin-top: -6px;
138 | margin-left: -2px
139 | }
140 |
141 | .navbar-default .navbar-collapse {
142 | border-top: none
143 | }
144 |
145 | .navbar-default .navbar-toggle {
146 | padding: 1px 5px;
147 | margin: 7px 16px 0 0;
148 | border-color: #384E6B;
149 | background-color: #384E6B
150 | }
151 |
152 | .navbar-default .navbar-toggle .icon-bar {
153 | margin: 7px 0 !important;
154 | height: 1px;
155 | background-color: #fff
156 | }
157 |
158 | .navbar-default .navbar-toggle:hover, .navbar-default .navbar-toggle:focus {
159 | border-color: #384E6B;
160 | background-color: #384E6B
161 | }
162 |
163 | #menu-btn {
164 | display: none;
165 | float: right;
166 | height: 45px;
167 | line-height: 45px;
168 | margin: 5px 20px 0 0;
169 | font-size: 30px;
170 | color: #fff;
171 | cursor: pointer
172 | }
173 |
174 | .navbar-bg {
175 | background-color: transparent
176 | }
177 |
178 | .navbar-bg .navbar-nav li a {
179 | color: #fff
180 | }
181 |
182 | .navbar-bg .navbar-nav li.active a {
183 | color: #fff;
184 | background-color: transparent
185 | }
186 |
187 | .navbar-bg .navbar-toggle {
188 | border-color: #517A94;
189 | background-color: #517A94
190 | }
191 |
192 | .navbar-bg .navbar-toggle:hover {
193 | border-color: #384E6B;
194 | background-color: #384E6B
195 | }
196 |
197 | @media (max-width: 768px) {
198 | .navbar-default .navbar-nav {
199 | background-color: #293c55;
200 | -webkit-transition: background-color 0.5s linear;
201 | transition: background-color 0.5s linear
202 | }
203 |
204 | .navbar-default .navbar-nav .open .dropdown-menu {
205 | padding: 0
206 | }
207 |
208 | .navbar-default .navbar-nav .open .dropdown-menu li a {
209 | color: #fff
210 | }
211 |
212 | .navbar-default .navbar-nav li.active >
213 | a {
214 | border-left: 4px solid #a9334c;
215 | border-top: none;
216 | padding: 10px 15px 10px 11px
217 | }
218 |
219 | .navbar-bg .navbar-nav {
220 | background-color: #4B7995
221 | }
222 |
223 | .navbar-bg .navbar-toggle {
224 | background-color: transparent;
225 | border: none
226 | }
227 |
228 | .navbar-bg .navbar-toggle:focus {
229 | border-color: #5A88A2 !important;
230 | background-color: #5A88A2 !important
231 | }
232 |
233 | .navbar-bg .navbar-toggle:hover {
234 | border-color: #5A88A2;
235 | background-color: #5A88A2
236 | }
237 |
238 | #menu-btn {
239 | display: block
240 | }
241 |
242 | #nav-download {
243 | display: none
244 | }
245 | }
246 |
247 | #footer {
248 | padding: 35px 5%;
249 | font-size: 12px;
250 | text-align: left;
251 | background-color: #2a3c54;
252 | color: #fff
253 | }
254 |
255 | #footer .list-wrapper {
256 | *zoom: 1
257 | }
258 |
259 | #footer .list-wrapper:before, #footer .list-wrapper:after {
260 | display: table;
261 | line-height: 0;
262 | content: ""
263 | }
264 |
265 | #footer .list-wrapper:after {
266 | clear: both
267 | }
268 |
269 | #footer ul, #footer li {
270 | list-style: none;
271 | padding: 0;
272 | margin: 0
273 | }
274 |
275 | #footer a {
276 | line-height: 22px;
277 | color: #fff
278 | }
279 |
280 | #footer h2 {
281 | margin-bottom: 10px;
282 | font-size: 13px;
283 | font-weight: 400;
284 | color: #fff
285 | }
286 |
287 | #footer .product-list a {
288 | color: #5b8b95
289 | }
290 |
291 | #footer .copyrights {
292 | margin-top: 30px;
293 | padding-top: 15px;
294 | border-top: 1px solid rgba(255, 255, 255, 0.2);
295 | text-align: center;
296 | clear: left
297 | }
298 |
299 | #footer .product-list, #footer .echarts-product, #footer .contact-list, #footer .more {
300 | float: left;
301 | width: 30%
302 | }
303 |
304 | #footer .more {
305 | width: 10%
306 | }
307 |
308 | @keyframes textAnimation {
309 | 0% {
310 | -webkit-transform: translateX(-300px);
311 | transform: translateX(-300px)
312 | }
313 | 100% {
314 | -webkit-transform: translateX(0);
315 | transform: translateX(0)
316 | }
317 | }
318 |
319 | @-webkit-keyframes textAnimation {
320 | 0% {
321 | -webkit-transform: translateX(-300px);
322 | transform: translateX(-300px)
323 | }
324 | 100% {
325 | -webkit-transform: translateX(0);
326 | transform: translateX(0)
327 | }
328 | }
329 |
330 | @keyframes imgAnimation {
331 | 0% {
332 | -webkit-transform: translateX(500px);
333 | transform: translateX(500px)
334 | }
335 | 100% {
336 | -webkit-transform: translateX(0);
337 | transform: translateX(0)
338 | }
339 | }
340 |
341 | @-webkit-keyframes imgAnimation {
342 | 0% {
343 | -webkit-transform: translateX(500px);
344 | transform: translateX(500px)
345 | }
346 | 100% {
347 | -webkit-transform: translateX(0);
348 | transform: translateX(0)
349 | }
350 | }
351 |
352 | body {
353 | width: 100%;
354 | overflow-x: hidden;
355 | background-color: #fff
356 | }
357 |
358 | .section {
359 | margin-top: 25px;
360 | color: #707d8d
361 | }
362 |
363 | .section h2 {
364 | margin: 110px 0 40px;
365 | font-size: 44px
366 | }
367 |
368 | .section p {
369 | font-size: 19px;
370 | line-height: 28px
371 | }
372 |
373 | #page-index .navbar-default {
374 | margin-bottom: -51px
375 | }
376 |
377 | .section-one {
378 | background-color: #4f7f9b;
379 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#4f7f9b), to(#293c55));
380 | background-image: -webkit-linear-gradient(top, #4f7f9b, #293c55);
381 | background-image: -webkit-gradient(linear, left top, left bottom, from(#4f7f9b), to(#293c55));
382 | background-image: linear-gradient(to bottom, #4f7f9b, #293c55);
383 | background-repeat: repeat-x
384 | }
385 |
386 | .section-one .container-one {
387 | padding-top: 200px;
388 | }
389 |
390 | .section-one .text, .section-one .shadow, .section-one .line {
391 | display: block;
392 | margin: 0 auto
393 | }
394 |
395 | .section-one #animate-logo {
396 | width: 50%;
397 | margin: 0 auto
398 | }
399 |
400 | .section-one .shadow {
401 | width: 51%;
402 | margin: 10px auto 60px
403 | }
404 |
405 | .section-one .line {
406 | width: 100%
407 | }
408 |
409 | #wave {
410 | width: 100%;
411 | height: 200px
412 | }
413 |
414 | .section-two {
415 | position: relative;
416 | background-color: #293c55;
417 | color: #fff
418 | }
419 |
420 | .section-two .img-bg, .section-two .img-bg-footer, .section-two .header, .section-two .footer {
421 | position: absolute;
422 | left: 0;
423 | width: 100%;
424 | z-index: 1
425 | }
426 |
427 | .section-two .header {
428 | top: 50px;
429 | z-index: 2
430 | }
431 |
432 | .section-two .footer {
433 | bottom: 0
434 | }
435 |
436 | .section-two .earth {
437 | position: relative;
438 | display: block;
439 | width: 460px;
440 | margin: 60px auto 0;
441 | z-index: 11
442 | }
443 |
444 | .section-two .intro-wrap {
445 | position: absolute;
446 | left: 0;
447 | top: 50%;
448 | width: 100%;
449 | text-align: center
450 | }
451 |
452 | .section-two h2 {
453 | position: absolute;
454 | left: 0;
455 | top: 30%;
456 | width: 100%;
457 | text-align: center;
458 | top: 60px
459 | }
460 |
461 | .section-two .intro-source {
462 | width: 70%;
463 | margin: 0 auto;
464 | line-height: 24px;
465 | text-align: left
466 | }
467 |
468 | .section-three {
469 | background-color: #f0f4fa
470 | }
471 |
472 | .section-three .file {
473 | display: block;
474 | width: 80%;
475 | height: 350px;
476 | margin: 0 auto
477 | }
478 |
479 | .section-four .container-four {
480 | text-align: center;
481 | background-color: #fff
482 | }
483 |
484 | .section-four .text-wrap {
485 | padding-left: 10%;
486 | text-align: left
487 | }
488 |
489 | .section-four .text-wrap-animate {
490 | transform: translateZ(0);
491 | -webkit-transform: translateZ(0);
492 | -moz-transform: translateZ(0);
493 | -o-transform: translateZ(0);
494 | animation: textAnimation .7s ease-out;
495 | -moz-animation: textAnimation .7s ease-out;
496 | -webkit-animation: textAnimation .7s ease-out;
497 | -o-animation: textAnimation .7s ease-out
498 | }
499 |
500 | .section-four h2 {
501 | margin-top: 60px
502 | }
503 |
504 | .section-four .device-wrap {
505 | float: right
506 | }
507 |
508 | .section-four .device-wrap-animate {
509 | transform: translateZ(0);
510 | -webkit-transform: translateZ(0);
511 | -moz-transform: translateZ(0);
512 | -o-transform: translateZ(0);
513 | animation: imgAnimation .7s ease-out;
514 | -moz-animation: imgAnimation .7s ease-out;
515 | -webkit-animation: imgAnimation .7s ease-out;
516 | -o-animation: imgAnimation .7s ease-out
517 | }
518 |
519 | .section-four .device {
520 | display: block;
521 | width: 90%
522 | }
523 |
524 | .section-five {
525 | background-color: #f0f4fa
526 | }
527 |
528 | .section-five .container-five {
529 | text-align: center
530 | }
531 |
532 | .section-five .text-wrap {
533 | display: none
534 | }
535 |
536 | .section-five h2 {
537 | margin-bottom: 20px
538 | }
539 |
540 | .section-five p {
541 | width: 80%;
542 | margin: 0 auto 30px
543 | }
544 |
545 | .section-five .list {
546 | height: 300px;
547 | line-height: 300px
548 | }
549 |
550 | .section-five i {
551 | display: inline-block;
552 | width: 8px;
553 | height: 8px;
554 | margin: 0 6px;
555 | -webkit-border-radius: 4px;
556 | border-radius: 4px;
557 | border: 1px solid #b7c4d4
558 | }
559 |
560 | .section-five img {
561 | width: 8%;
562 | -webkit-border-radius: 150px;
563 | border-radius: 150px;
564 | border: 1px solid #b7c4d4;
565 | -webkit-transition: all 0.2s ease-out;
566 | transition: all 0.2s ease-out
567 | }
568 |
569 | .section-five .cur-item {
570 | width: 12%;
571 | margin: 0 6px;
572 | -webkit-border-radius: 200px;
573 | border-radius: 200px;
574 | border-color: #7fccf2;
575 | -webkit-box-shadow: 0 0 10px #b7c4d4;
576 | box-shadow: 0 0 10px #b7c4d4
577 | }
578 |
579 | .section-six .container-six {
580 | padding: 120px 0 60px;
581 | text-align: center;
582 | background-color: #fff
583 | }
584 |
585 | .section-six h2 {
586 | font-size: 19px;
587 | line-height: 30px;
588 | margin: 0
589 | }
590 |
591 | .section-six .start-btn {
592 | display: block;
593 | margin: 40px auto;
594 | width: 210px;
595 | line-height: 46px;
596 | font-size: 21px;
597 | text-decoration: none;
598 | background-color: #5CB6E3;
599 | color: #fff
600 | }
601 |
602 | .section-six .start-btn:hover {
603 | background-color: #91D7F7
604 | }
605 |
606 | .section-one, .section-two {
607 | margin-top: 0
608 | }
609 |
610 | #fp-nav ul li {
611 | width: 14px !important;
612 | height: 14px !important;
613 | margin-bottom: 10px !important
614 | }
615 |
616 | #fp-nav ul li a span {
617 | width: 14px !important;
618 | height: 14px !important;
619 | left: 0 !important;
620 | top: 0 !important;
621 | margin: 0 !important;
622 | border: 1px solid #6090b6 !important;
623 | background: none !important
624 | }
625 |
626 | #fp-nav ul li .active span {
627 | background: #6090b6 !important
628 | }
629 |
630 | .lower-ie #fp-nav {
631 | display: none
632 | }
633 |
634 | @media (max-width: 992px) and (min-width: 768px) {
635 | .section-three h2 {
636 | margin: 20px 0 20px 0
637 | }
638 |
639 | .section-four h2 {
640 | margin: 0 0 20px 0
641 | }
642 | }
643 |
644 | @media (max-width: 768px) {
645 | #wave {
646 | height: 140px
647 | }
648 |
649 | #file-size-chart {
650 | height: 290px
651 | }
652 |
653 | #fp-nav.right {
654 | right: 15px
655 | }
656 |
657 | .section {
658 | text-align: center
659 | }
660 |
661 | .section h2 {
662 | margin: 10px;
663 | font-size: 30px
664 | }
665 |
666 | .section p {
667 | font-size: 15px;
668 | line-height: 28px
669 | }
670 |
671 | .section-six .container-six {
672 | padding: 0
673 | }
674 |
675 | .section-six h2 {
676 | font-size: 19px
677 | }
678 |
679 | #footer h2 {
680 | margin: 0
681 | }
682 |
683 | .section-one #animate-logo {
684 | width: 80%
685 | }
686 |
687 | .section-one .container-one {
688 | padding-top: 100px
689 | }
690 |
691 | .section-one .text {
692 | width: 70%
693 | }
694 |
695 | .section-one .shadow {
696 | width: 78%;
697 | margin: 20px auto 30px
698 | }
699 |
700 | .section-two h2 {
701 | top: 190px;
702 | margin: 0
703 | }
704 |
705 | .section-two .intro-wrap {
706 | top: 250px
707 | }
708 |
709 | .section-two .earth {
710 | width: 300px
711 | }
712 |
713 | .section-three .container-three .file {
714 | margin-bottom: 25px
715 | }
716 |
717 | .section-four .text-wrap {
718 | width: 100%;
719 | padding-left: 0;
720 | margin: 0 0 20px 0;
721 | text-align: center
722 | }
723 |
724 | .section-four .device {
725 | display: block;
726 | margin: 0 auto 40px
727 | }
728 |
729 | .section-five .container-five p {
730 | margin: 0 auto
731 | }
732 |
733 | .section-five .container-five i {
734 | display: none
735 | }
736 |
737 | .section-five .container-five .list {
738 | padding: 20px 12px 30px 20px;
739 | height: auto;
740 | line-height: normal
741 | }
742 |
743 | .section-five .container-five img {
744 | width: 20%;
745 | margin-right: 2%
746 | }
747 |
748 | .section-five .container-five .cur-item {
749 | width: 20%;
750 | margin: 0 2% 0 0;
751 | border-color: #b7c4d4;
752 | -webkit-box-shadow: none;
753 | box-shadow: none
754 | }
755 |
756 | .section-five .container-five .text-wrap {
757 | display: block
758 | }
759 |
760 | .section-five .container-five .text-header-wrap {
761 | display: none
762 | }
763 | }
764 |
765 | @media (max-width: 480px) {
766 | .section {
767 | text-align: center
768 | }
769 |
770 | .section h2 {
771 | font-size: 20px
772 | }
773 |
774 | .section p {
775 | font-size: 13px
776 | }
777 |
778 | .section-three h2, .section-four h2, .section-five h2 {
779 | margin: 10px
780 | }
781 |
782 | .section-three P, .section-four P, .section-five P {
783 | line-height: 28px
784 | }
785 |
786 | .section-two h2 {
787 | top: 140px;
788 | margin: 0
789 | }
790 |
791 | .section-two .intro-wrap {
792 | top: 200px
793 | }
794 |
795 | .section-six h2 {
796 | font-size: 14px
797 | }
798 |
799 | #footer {
800 | display: none
801 | }
802 | }
803 |
804 | @media (max-width: 320px) {
805 | .section-two h2 {
806 | top: 95px;
807 | margin: 0
808 | }
809 |
810 | .section-two .intro-wrap {
811 | top: 130px
812 | }
813 | }
814 |
815 | #left-chart-nav {
816 | position: fixed;
817 |
818 | top: 49px;
819 | bottom: 0;
820 | left: 0;
821 | border-top: 1px solid #0e151f;
822 | width: 155px;
823 | background-color: #293c55;
824 | overflow-y: auto;
825 | z-index: 15
826 | }
827 |
828 | #left-chart-nav:hover {
829 | overflow-y: auto
830 | }
831 |
832 | #left-chart-nav ul {
833 | padding: 0
834 | }
835 |
836 | #left-chart-nav li {
837 | height: 54px;
838 | padding: 10px 15px;
839 | -webkit-transition: 0.5s;
840 | transition: 0.5s;
841 | margin: 0 auto
842 | }
843 |
844 | #left-chart-nav li a {
845 | color: #ccc;
846 | position: relative;
847 | display: block;
848 | -webkit-transition: 0.5s;
849 | transition: 0.5s
850 | }
851 |
852 | #left-chart-nav li a .chart-name {
853 | display: inline-block;
854 | height: 32px;
855 | line-height: 32px;
856 | margin-left: 20px
857 | }
858 |
859 | #left-chart-nav li.active {
860 | background-color: #e43c59
861 | }
862 |
863 | #left-chart-nav li:hover {
864 | background-color: #162436
865 | }
866 |
867 | @media (max-width: 768px) {
868 | #left-chart-nav {
869 | display: none
870 | }
871 | }
872 |
873 | #nav-mask {
874 | display: none;
875 | position: fixed;
876 | top: 50px;
877 | left: 155px;
878 | bottom: 0;
879 | right: 0;
880 | width: 100%;
881 | height: 100%;
882 | background: rgba(0, 0, 0, 0.3);
883 | z-index: 12
884 | }
885 |
886 | #nav-layer {
887 | display: none;
888 | position: fixed;
889 | width: 620px;
890 | max-height: 350px;
891 | left: 155px;
892 | top: 200px;
893 | z-index: 15;
894 | background-color: #fff;
895 | overflow-y: scroll;
896 | -webkit-box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
897 | box-shadow: 0 0 20px rgba(0, 0, 0, 0.5)
898 | }
899 |
900 | #nav-layer .chart-list {
901 | *zoom: 1;
902 | width: 100%;
903 | clear: both;
904 | padding: 10px;
905 | -webkit-box-sizing: border-box;
906 | box-sizing: border-box
907 | }
908 |
909 | #nav-layer .chart-list:before, #nav-layer .chart-list:after {
910 | display: table;
911 | line-height: 0;
912 | content: ""
913 | }
914 |
915 | #nav-layer .chart-list:after {
916 | clear: both
917 | }
918 |
919 | #nav-layer li {
920 | float: left;
921 | width: 180px;
922 | margin: 10px 10px;
923 | padding: 5px;
924 | -webkit-box-shadow: 0 0 1px rgba(0, 0, 0, 0.3);
925 | box-shadow: 0 0 1px rgba(0, 0, 0, 0.3);
926 | -webkit-transition: -webkit-box-shadow 0.5s ease-out;
927 | transition: -webkit-box-shadow 0.5s ease-out;
928 | transition: box-shadow 0.5s ease-out;
929 | transition: box-shadow 0.5s ease-out, -webkit-box-shadow 0.5s ease-out
930 | }
931 |
932 | #nav-layer li:hover {
933 | -webkit-box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
934 | box-shadow: 0 0 20px rgba(0, 0, 0, 0.3)
935 | }
936 |
937 | #nav-layer img {
938 | width: 100%;
939 | height: 100%
940 | }
941 |
942 | #left-chart-nav-line .chart-icon {
943 | background-position-x: -1px;
944 | background-position-y: -1px
945 | }
946 |
947 | #left-chart-nav-bar .chart-icon {
948 | background-position-x: -1px;
949 | background-position-y: -33px
950 | }
951 |
952 | #left-chart-nav-scatter .chart-icon {
953 | background-position-x: -1px;
954 | background-position-y: -65px
955 | }
956 |
957 | #left-chart-nav-pie .chart-icon {
958 | background-position-x: -1px;
959 | background-position-y: -129px
960 | }
961 |
962 | #left-chart-nav-radar .chart-icon {
963 | background-position-x: -1px;
964 | background-position-y: -161px
965 | }
966 |
967 | #left-chart-nav-funnel .chart-icon {
968 | background-position-x: -1px;
969 | background-position-y: -321px
970 | }
971 |
972 | #left-chart-nav-gauge .chart-icon {
973 | background-position-x: -1px;
974 | background-position-y: -289px
975 | }
976 |
977 | #left-chart-nav-map .chart-icon {
978 | background-position-x: -1px;
979 | background-position-y: -257px
980 | }
981 |
982 | #left-chart-nav-graph .chart-icon {
983 | background-position-x: -1px;
984 | background-position-y: -225px
985 | }
986 |
987 | #left-chart-nav-treemap .chart-icon {
988 | background-position-x: -1px;
989 | background-position-y: -449px
990 | }
991 |
992 | #left-chart-nav-parallel .chart-icon {
993 | background-position-x: -1px;
994 | background-position-y: -513px
995 | }
996 |
997 | #left-chart-nav-sankey .chart-icon {
998 | background-position-x: -1px;
999 | background-position-y: -545px
1000 | }
1001 |
1002 | #left-chart-nav-candlestick .chart-icon {
1003 | background-position-x: -1px;
1004 | background-position-y: -97px
1005 | }
1006 |
1007 | #left-chart-nav-boxplot .chart-icon {
1008 | background-position-x: -1px;
1009 | background-position-y: -577px
1010 | }
1011 |
1012 | #left-chart-nav-heatmap .chart-icon {
1013 | background-position-x: -1px;
1014 | background-position-y: -353px
1015 | }
1016 |
1017 | #explore-container {
1018 | position: relative;
1019 | /*margin-left: 155px;*/
1020 | z-index: 10;
1021 | /*background-color: #f9f9f9*/
1022 | }
1023 |
1024 | .chart-list-panel {
1025 | margin: 75px 15px 30px 15px
1026 | }
1027 |
1028 | .chart-list-panel h3 {
1029 | margin-bottom: 20px;
1030 | border-bottom: 1px solid #ccc;
1031 | padding-bottom: 5px;
1032 | margin-top: 50px
1033 | }
1034 |
1035 | .chart-list-panel .chart .chart-link {
1036 | position: relative;
1037 | display: block
1038 | }
1039 |
1040 | .chart-list-panel .chart .chart-link .chart-area {
1041 | width: 100%;
1042 | height: 100%;
1043 | padding: 8px
1044 | }
1045 |
1046 | .chart-list-panel .chart .chart-link .chart-title {
1047 | color: #293c55;
1048 | overflow: hidden;
1049 | text-overflow: ellipsis;
1050 | white-space: nowrap;
1051 | padding: 10px 10px 2px 10px;
1052 | margin: 0;
1053 | font-weight: normal;
1054 | font-size: 16px
1055 | }
1056 |
1057 | .chart-list-panel .chart .chart-info {
1058 | padding: 5px 0;
1059 | font-weight: bold
1060 | }
1061 |
1062 | .chart-list-panel .chart .chart-info .chart-icon {
1063 | float: right
1064 | }
1065 |
1066 | .chart-list-panel .chart .chart-info .chart-icon .chart-delete {
1067 | display: none;
1068 | -webkit-transition: 1s;
1069 | transition: 1s
1070 | }
1071 |
1072 | .chart-list-panel .chart:hover .chart-info .chart-icon .chart-delete {
1073 | display: block;
1074 | text-decoration: none
1075 | }
1076 |
1077 | @media (max-width: 768px) {
1078 | .chart-list-panel .chart .chart-link .chart-hover {
1079 | opacity: 1;
1080 | position: static;
1081 | color: #666;
1082 | margin-top: 0;
1083 | height: auto
1084 | }
1085 |
1086 | .chart-list-panel .chart .chart-link .chart-hover .chart-title {
1087 | border-top: none;
1088 | color: #e43c59;
1089 | margin-top: 20px;
1090 | margin-bottom: 0
1091 | }
1092 |
1093 | .chart-list-panel .chart .chart-link .chart-hover .chart-subtitle {
1094 | display: none
1095 | }
1096 |
1097 | .chart-list-panel .chart .chart-link .chart-hover .chart-title:before, .chart-list-panel .chart .chart-link .chart-hover .chart-subtitle:after {
1098 | display: none
1099 | }
1100 |
1101 | .chart-list-panel .chart .chart-link:hover .chart-hover-bg {
1102 | display: none
1103 | }
1104 |
1105 | #explore-container {
1106 | margin-left: 0
1107 | }
1108 |
1109 | #chart-demo {
1110 | left: 0
1111 | }
1112 | }
1113 |
1114 | h1, h2, h3, h4, h5, h6, p {
1115 | font-weight: 400;
1116 | margin: 0;
1117 | padding: 0
1118 | }
1119 |
1120 | ul {
1121 | list-style: none;
1122 | padding: 0;
1123 | margin: 0
1124 | }
1125 |
1126 | li {
1127 | list-style: none
1128 | }
1129 |
1130 | ul {
1131 | margin: 0px;
1132 | padding: 0px
1133 | }
1134 |
1135 | #action {
1136 | margin-top: 50px;
1137 | margin-bottom: 100px;
1138 | text-align: center
1139 | }
1140 |
1141 | .clear {
1142 | clear: both
1143 | }
1144 |
1145 | .not-found {
1146 | padding: 150px 0 160px;
1147 | height: 100%;
1148 | background-color: #2a3c54;
1149 | overflow: hidden
1150 | }
1151 |
1152 | .not-found img {
1153 | display: block;
1154 | width: 60%;
1155 | margin: 0 auto
1156 | }
1157 |
1158 | .not-found .text {
1159 | margin-top: 50px;
1160 | text-align: center;
1161 | font-size: 20px;
1162 | color: #fff
1163 | }
1164 |
1165 | .not-found .link {
1166 | margin-left: 10px;
1167 | color: #3183c6
1168 | }
1169 |
1170 | @media (max-width: 768px) {
1171 | .not-found .text {
1172 | padding: 0 15px;
1173 | font-size: 14px
1174 | }
1175 | }
1176 |
1177 |
1178 |
1179 |
1180 |
1181 |
1182 |
1183 |
--------------------------------------------------------------------------------
/log-collection/src/main/resources/static/js/bootstrap.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * Bootstrap v3.3.6 (http://getbootstrap.com)
3 | * Copyright 2011-2015 Twitter, Inc.
4 | * Licensed under the MIT license
5 | */
6 | if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>2)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.6",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.6",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.6",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.6",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.6",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&jdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-mo.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.6",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.6",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.6",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
--------------------------------------------------------------------------------
/log-collection/src/main/resources/static/js/html5shiv.js:
--------------------------------------------------------------------------------
1 | /*
2 | HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
3 | */
4 | (function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();
5 | a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x";
6 | c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML=" ";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||
7 | "undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);
8 | if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d #mq-test-1 { width: 42px; }',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";function b(){u(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))};if(c.ajax=f,c.queue=d,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/,maxw:/\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/},c.mediaQueriesSupported=a.matchMedia&&null!==a.matchMedia("only all")&&a.matchMedia("only all").matches,!c.mediaQueriesSupported){var g,h,i,j=a.document,k=j.documentElement,l=[],m=[],n=[],o={},p=30,q=j.getElementsByTagName("head")[0]||k,r=j.getElementsByTagName("base")[0],s=q.getElementsByTagName("link"),t=function(){var a,b=j.createElement("div"),c=j.body,d=k.style.fontSize,e=c&&c.style.fontSize,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",c||(c=f=j.createElement("body"),c.style.background="none"),k.style.fontSize="100%",c.style.fontSize="100%",c.appendChild(b),f&&k.insertBefore(c,k.firstChild),a=b.offsetWidth,f?k.removeChild(c):c.removeChild(b),k.style.fontSize=d,e&&(c.style.fontSize=e),a=i=parseFloat(a)},u=function(b){var c="clientWidth",d=k[c],e="CSS1Compat"===j.compatMode&&d||j.body[c]||d,f={},o=s[s.length-1],r=(new Date).getTime();if(b&&g&&p>r-g)return a.clearTimeout(h),h=a.setTimeout(u,p),void 0;g=r;for(var v in l)if(l.hasOwnProperty(v)){var w=l[v],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?i||t():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?i||t():1)),w.hasquery&&(z&&A||!(z||e>=x)||!(A||y>=e))||(f[w.media]||(f[w.media]=[]),f[w.media].push(m[w.rules]))}for(var C in n)n.hasOwnProperty(C)&&n[C]&&n[C].parentNode===q&&q.removeChild(n[C]);n.length=0;for(var D in f)if(f.hasOwnProperty(D)){var E=j.createElement("style"),F=f[D].join("\n");E.type="text/css",E.media=D,q.insertBefore(E,o.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(j.createTextNode(F)),n.push(E)}},v=function(a,b,d){var e=a.replace(c.regex.keyframes,"").match(c.regex.media),f=e&&e.length||0;b=b.substring(0,b.lastIndexOf("/"));var g=function(a){return a.replace(c.regex.urls,"$1"+b+"$2$3")},h=!f&&d;b.length&&(b+="/"),h&&(f=1);for(var i=0;f>i;i++){var j,k,n,o;h?(j=d,m.push(g(a))):(j=e[i].match(c.regex.findStyles)&&RegExp.$1,m.push(RegExp.$2&&g(RegExp.$2))),n=j.split(","),o=n.length;for(var p=0;o>p;p++)k=n[p],l.push({media:k.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:m.length-1,hasquery:k.indexOf("(")>-1,minw:k.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:k.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},w=function(){if(d.length){var b=d.shift();f(b.href,function(c){v(c,b.href,b.media),o[b.href]=!0,a.setTimeout(function(){w()},0)})}},x=function(){for(var b=0;by;c=p<=y?++b:--b){r=e.charAt(c);if(r===t.NULL){break}i+=r}}return new n(o,a,i)};n.unmarshall=function(n){var i;return function(){var r,o,s,u;s=n.split(RegExp(""+t.NULL+t.LF+"*"));u=[];for(r=0,o=s.length;r0){u.push(e(i))}}return u}()};n.marshall=function(e,i,r){var o;o=new n(e,i,r);return o.toString()+t.NULL};return n}();e=function(){var e;function r(t){this.ws=t;this.ws.binaryType="arraybuffer";this.counter=0;this.connected=false;this.heartbeat={outgoing:1e4,incoming:1e4};this.maxWebSocketFrameSize=16*1024;this.subscriptions={}}r.prototype.debug=function(t){var e;return typeof window!=="undefined"&&window!==null?(e=window.console)!=null?e.log(t):void 0:void 0};e=function(){if(Date.now){return Date.now()}else{return(new Date).valueOf}};r.prototype._transmit=function(t,e,i){var r;r=n.marshall(t,e,i);if(typeof this.debug==="function"){this.debug(">>> "+r)}while(true){if(r.length>this.maxWebSocketFrameSize){this.ws.send(r.substring(0,this.maxWebSocketFrameSize));r=r.substring(this.maxWebSocketFrameSize);if(typeof this.debug==="function"){this.debug("remaining = "+r.length)}}else{return this.ws.send(r)}}};r.prototype._setupHeartbeat=function(n){var r,o,s,u,a,c;if((a=n.version)!==i.VERSIONS.V1_1&&a!==i.VERSIONS.V1_2){return}c=function(){var t,e,i,r;i=n["heart-beat"].split(",");r=[];for(t=0,e=i.length;t>> PING"):void 0}}(this))}if(!(this.heartbeat.incoming===0||o===0)){s=Math.max(this.heartbeat.incoming,o);if(typeof this.debug==="function"){this.debug("check PONG every "+s+"ms")}return this.ponger=i.setInterval(s,function(t){return function(){var n;n=e()-t.serverActivity;if(n>s*2){if(typeof t.debug==="function"){t.debug("did not receive server activity for the last "+n+"ms")}return t.ws.close()}}}(this))}};r.prototype._parseConnect=function(){var t,e,n,i;t=1<=arguments.length?o.call(arguments,0):[];i={};switch(t.length){case 2:i=t[0],e=t[1];break;case 3:if(t[1]instanceof Function){i=t[0],e=t[1],n=t[2]}else{i.login=t[0],i.passcode=t[1],e=t[2]}break;case 4:i.login=t[0],i.passcode=t[1],e=t[2],n=t[3];break;default:i.login=t[0],i.passcode=t[1],e=t[2],n=t[3],i.host=t[4]}return[i,e,n]};r.prototype.connect=function(){var r,s,u,a;r=1<=arguments.length?o.call(arguments,0):[];a=this._parseConnect.apply(this,r);u=a[0],this.connectCallback=a[1],s=a[2];if(typeof this.debug==="function"){this.debug("Opening Web Socket...")}this.ws.onmessage=function(i){return function(r){var o,u,a,c,f,h,l,p,d,g,b,m;c=typeof ArrayBuffer!=="undefined"&&r.data instanceof ArrayBuffer?(o=new Uint8Array(r.data),typeof i.debug==="function"?i.debug("--- got data length: "+o.length):void 0,function(){var t,e,n;n=[];for(t=0,e=o.length;t
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
13 |
14 |
15 |
16 |
17 |
18 | 日志采集系统
19 |
20 |
21 |
22 |
23 |
24 |
25 |
35 |
36 |
37 |
38 |
47 |
48 |
49 |
106 |
107 |
108 |
--------------------------------------------------------------------------------
/ngrok:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bestfeel/gizwits-iot-course/c9383f955bc9201fc5971ffa4e94c501caa44e7b/ngrok
--------------------------------------------------------------------------------
/python-ngrok.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: UTF-8 -*-
3 | # 建议Python 2.7.13 或 Python 3.1 以上运行
4 | # Version: v1.41
5 | import socket
6 | import ssl
7 | import json
8 | import struct
9 | import random
10 | import sys
11 | import time
12 | import logging
13 | import threading
14 |
15 | host = 'server.ngrok.cc' # Ngrok服务器地址
16 | port = 4443 # 端口
17 | bufsize = 1024 # 吞吐量
18 |
19 | Tunnels = list() # 全局渠道赋值
20 | body = dict() #一个隧道
21 | '''
22 | 参数说明
23 | protocol 协议:tcp、http
24 | hostname 自定义域名,平台上选择自定义域名的时候填写,需要和平台上的一致
25 | subdomain 前置域名,平台上选择前置域名的时候填写,需要和平台上的一致
26 | rport 远程端口,TCP模式使用,需要和平台上的一致
27 | lhost 映射的ip地址,本机使用127.0.0.1,可以是局域网其他ip,如果在自己电脑映射路由器 192.168.1.1
28 | lport 映射端口,修改成自己要映射的端口,例如80,或者22
29 |
30 | 如果需要同时启动多个隧道则
31 | '''
32 | body['protocol'] = 'http'
33 | body['hostname'] = 'www.baidu.com'
34 | body['subdomain'] = ''
35 | body['rport'] = 0
36 | body['lhost'] = '127.0.0.1'
37 | body['lport'] = 80
38 |
39 | # 启动多个隧道
40 | body1 = dict();
41 | body1['protocol'] = 'http'
42 | body1['hostname'] = ''
43 | body1['subdomain'] = 'test'
44 | body1['rport'] = 0
45 | body1['lhost'] = '127.0.0.1'
46 | body1['lport'] = 80
47 | Tunnels.append(body) # 加入渠道队列
48 | Tunnels.append(body1) # 加入渠道队列
49 |
50 |
51 | mainsocket = 0
52 |
53 | ClientId = ''
54 | pingtime = 0
55 |
56 | def getloacladdr(Tunnels, Url):
57 | protocol = Url[0:Url.find(':')]
58 | hostname = Url[Url.find('//') + 2:]
59 | subdomain = hostname[0:hostname.find('.')]
60 | rport = Url[Url.rfind(':') + 1:]
61 |
62 | for tunnelinfo in Tunnels:
63 | if tunnelinfo.get('protocol') == protocol:
64 | if tunnelinfo.get('hostname') == hostname:
65 | return tunnelinfo
66 | if tunnelinfo.get('subdomain') == subdomain:
67 | return tunnelinfo
68 | if tunnelinfo.get('protocol') == 'tcp':
69 | if tunnelinfo.get('rport') == int(rport):
70 | return tunnelinfo
71 |
72 | return dict()
73 |
74 | def dnsopen(host):
75 | try:
76 | ip = socket.gethostbyname(host)
77 | except socket.error:
78 | return False
79 |
80 | return ip
81 |
82 | def connectremote(host, port):
83 | try:
84 | host = socket.gethostbyname(host)
85 | client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
86 | ssl_client = ssl.wrap_socket(client, ssl_version=ssl.PROTOCOL_SSLv23)
87 | ssl_client.connect((host, port))
88 | ssl_client.setblocking(1)
89 | logger = logging.getLogger('%s:%d' % ('Conn', ssl_client.fileno()))
90 | logger.debug('New connection to: %s:%d' % (host, port))
91 | except socket.error:
92 | return False
93 |
94 | return ssl_client
95 |
96 | def connectlocal(localhost, localport):
97 | try:
98 | localhost = socket.gethostbyname(localhost)
99 | client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
100 | client.connect((localhost, localport))
101 | client.setblocking(1)
102 | logger = logging.getLogger('%s:%d' % ('Conn', client.fileno()))
103 | logger.debug('New connection to: %s:%d' % (localhost, localport))
104 | except socket.error:
105 | return False
106 |
107 | return client
108 |
109 | def NgrokAuth():
110 | Payload = dict()
111 | Payload['ClientId'] = ''
112 | Payload['OS'] = 'darwin'
113 | Payload['Arch'] = 'amd64'
114 | Payload['Version'] = '2'
115 | Payload['MmVersion'] = '1.7'
116 | Payload['User'] = 'user'
117 | Payload['Password'] = ''
118 | body = dict()
119 | body['Type'] = 'Auth'
120 | body['Payload'] = Payload
121 | buffer = json.dumps(body)
122 | return(buffer)
123 |
124 | def ReqTunnel(Protocol, Hostname, Subdomain, RemotePort):
125 | Payload = dict()
126 | Payload['ReqId'] = getRandChar(8)
127 | Payload['Protocol'] = Protocol
128 | Payload['Hostname'] = Hostname
129 | Payload['Subdomain'] = Subdomain
130 | Payload['HttpAuth'] = ''
131 | Payload['RemotePort'] = RemotePort
132 | body = dict()
133 | body['Type'] = 'ReqTunnel'
134 | body['Payload'] = Payload
135 | buffer = json.dumps(body)
136 | return(buffer)
137 |
138 | def RegProxy(ClientId):
139 | Payload = dict()
140 | Payload['ClientId'] = ClientId
141 | body = dict()
142 | body['Type'] = 'RegProxy'
143 | body['Payload'] = Payload
144 | buffer = json.dumps(body)
145 | return(buffer)
146 |
147 | def Ping():
148 | Payload = dict()
149 | body = dict()
150 | body['Type'] = 'Ping'
151 | body['Payload'] = Payload
152 | buffer = json.dumps(body)
153 | return(buffer)
154 |
155 | def lentobyte(len):
156 | return struct.pack(' 0:
205 | if not recvbuf:
206 | recvbuf = recvbut
207 | else:
208 | recvbuf += recvbut
209 |
210 | if type == 1 or (type == 2 and linkstate == 1):
211 | lenbyte = tolen(recvbuf[0:8])
212 | if len(recvbuf) >= (8 + lenbyte):
213 | buf = recvbuf[8:lenbyte + 8].decode('utf-8')
214 | logger = logging.getLogger('%s:%d' % ('Recv', sock.fileno()))
215 | logger.debug('Reading message with length: %d' % len(buf))
216 | logger.debug('Read message: %s' % buf)
217 | js = json.loads(buf)
218 | if type == 1:
219 | if js['Type'] == 'ReqProxy':
220 | newsock = connectremote(host, port)
221 | if newsock:
222 | thread = threading.Thread(target = HKClient, args = (newsock, 0, 2))
223 | thread.setDaemon(True)
224 | thread.start()
225 | if js['Type'] == 'AuthResp':
226 | ClientId = js['Payload']['ClientId']
227 | logger = logging.getLogger('%s' % 'client')
228 | logger.info('Authenticated with server, client id: %s' % ClientId)
229 | sendpack(sock, Ping())
230 | pingtime = time.time()
231 | for tunnelinfo in Tunnels:
232 | # 注册通道
233 | sendpack(sock, ReqTunnel(tunnelinfo['protocol'], tunnelinfo['hostname'], tunnelinfo['subdomain'], tunnelinfo['rport']))
234 | if js['Type'] == 'NewTunnel':
235 | if js['Payload']['Error'] != '':
236 | logger = logging.getLogger('%s' % 'client')
237 | logger.error('Server failed to allocate tunnel: %s' % js['Payload']['Error'])
238 | time.sleep(30)
239 | else:
240 | logger = logging.getLogger('%s' % 'client')
241 | logger.info('Tunnel established at %s' % js['Payload']['Url'])
242 | if type == 2:
243 | if linkstate == 1:
244 | if js['Type'] == 'StartProxy':
245 | loacladdr = getloacladdr(Tunnels, js['Payload']['Url'])
246 |
247 | newsock = connectlocal(loacladdr['lhost'], loacladdr['lport'])
248 | if newsock:
249 | thread = threading.Thread(target = HKClient, args = (newsock, 0, 3, sock))
250 | thread.setDaemon(True)
251 | thread.start()
252 | tosock = newsock
253 | linkstate = 2
254 | else:
255 | body = 'Tunnel %s unavailable Unable to initiate connection to %s . This port is not yet available for web server.
'
256 | html = body % (js['Payload']['Url'], loacladdr['lhost'] + ':' + str(loacladdr['lport']))
257 | header = "HTTP/1.0 502 Bad Gateway" + "\r\n"
258 | header += "Content-Type: text/html" + "\r\n"
259 | header += "Content-Length: %d" + "\r\n"
260 | header += "\r\n" + "%s"
261 | buf = header % (len(html.encode('utf-8')), html)
262 | sendbuf(sock, buf.encode('utf-8'))
263 |
264 | if len(recvbuf) == (8 + lenbyte):
265 | recvbuf = bytes()
266 | else:
267 | recvbuf = recvbuf[8 + lenbyte:]
268 |
269 | if type == 3 or (type == 2 and linkstate == 2):
270 | sendbuf(tosock, recvbuf)
271 | recvbuf = bytes()
272 |
273 | except socket.error:
274 | break
275 |
276 | if type == 1:
277 | mainsocket = False
278 | if type == 3:
279 | if tosock.fileno() != -1:
280 | tosock.shutdown(socket.SHUT_WR)
281 |
282 | logger = logging.getLogger('%s:%d' % ('Close', sock.fileno()))
283 | logger.debug('Closing')
284 | sock.close()
285 |
286 | # 客户端程序初始化
287 | if __name__ == '__main__':
288 | logging.basicConfig(level=logging.DEBUG, format='[%(asctime)s] [%(levelname)s:%(lineno)d] [%(name)s] %(message)s', datefmt='%Y/%m/%d %H:%M:%S')
289 | while True:
290 | try:
291 | # 检测控制连接是否连接.
292 | if mainsocket == False:
293 | ip = dnsopen(host)
294 | if ip == False:
295 | logging.info('update dns')
296 | time.sleep(10)
297 | continue
298 | mainsocket = connectremote(ip, port)
299 | if mainsocket == False:
300 | logging.info('connect failed...!')
301 | time.sleep(10)
302 | continue
303 | thread = threading.Thread(target = HKClient, args = (mainsocket, 0, 1))
304 | thread.setDaemon(True)
305 | thread.start()
306 |
307 | # 发送心跳
308 | if pingtime + 20 < time.time() and pingtime != 0:
309 | sendpack(mainsocket, Ping())
310 | pingtime = time.time()
311 |
312 | time.sleep(1)
313 |
314 | except socket.error:
315 | pingtime = 0
316 | except KeyboardInterrupt:
317 | sys.exit()
318 |
--------------------------------------------------------------------------------
/smock.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 |
4 | ./sunny clientid d8ef1acd4ddfa552
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/sunny:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bestfeel/gizwits-iot-course/c9383f955bc9201fc5971ffa4e94c501caa44e7b/sunny
--------------------------------------------------------------------------------
/sunny.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bestfeel/gizwits-iot-course/c9383f955bc9201fc5971ffa4e94c501caa44e7b/sunny.exe
--------------------------------------------------------------------------------