|
@@ -8,7 +8,7 @@ $(function() {
|
8
|
8
|
}
|
9
|
9
|
|
10
|
10
|
// pull log
|
11
|
|
- var fromLineNum = 0;
|
|
11
|
+ var fromLineNum = 0; // [from, to]
|
12
|
12
|
var pullFailCount = 0;
|
13
|
13
|
function pullLog() {
|
14
|
14
|
// pullFailCount, max=20
|
|
@@ -42,8 +42,13 @@ $(function() {
|
42
|
42
|
console.log('pullLog fromLineNum not match');
|
43
|
43
|
return;
|
44
|
44
|
}
|
45
|
|
- if (fromLineNum == (data.content.toLineNum + 1) ) {
|
|
45
|
+ if (fromLineNum > data.content.toLineNum ) {
|
46
|
46
|
console.log('pullLog already line-end');
|
|
47
|
+ // valid end
|
|
48
|
+ if (data.content.end) {
|
|
49
|
+ logRunStop('<span style="color: green;">[Rolling Log Finish]</span>');
|
|
50
|
+ return;
|
|
51
|
+ }
|
47
|
52
|
return;
|
48
|
53
|
}
|
49
|
54
|
|
|
@@ -52,11 +57,9 @@ $(function() {
|
52
|
57
|
$('#logConsole').append(data.content.logContent);
|
53
|
58
|
pullFailCount = 0;
|
54
|
59
|
|
55
|
|
- // valid end
|
56
|
|
- if (data.content.end) {
|
57
|
|
- logRunStop('<span style="color: green;">[Rolling Log Finish]</span>');
|
58
|
|
- return;
|
59
|
|
- }
|
|
60
|
+ // scroll to bottom
|
|
61
|
+ scrollTo(0, document.body.scrollHeight);
|
|
62
|
+
|
60
|
63
|
} else {
|
61
|
64
|
console.log('pullLog fail:'+data.msg);
|
62
|
65
|
}
|
|
@@ -69,7 +72,7 @@ $(function() {
|
69
|
72
|
|
70
|
73
|
// handler already callback, end
|
71
|
74
|
if (handleCode > 0) {
|
72
|
|
- logRunStop('<span style="color: green;">[Log Finish]</span>');
|
|
75
|
+ logRunStop('<span style="color: green;">[Load Log Finish]</span>');
|
73
|
76
|
return;
|
74
|
77
|
}
|
75
|
78
|
|