sbd-npm 1.4.22 → 1.4.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/constant.js +2 -1
- package/package.json +2 -2
- package/status.js +72 -72
- package/stock_basics.js +143 -143
- package/summary_daily.js +56 -56
- package/util.js +295 -293
package/constant.js
CHANGED
@@ -23,6 +23,8 @@ const MenuList = [
|
|
23
23
|
'name': '趋势分析',
|
24
24
|
'icon': 'edit',
|
25
25
|
'menu': [
|
26
|
+
{'key': 'trend_boll_breakthrough', 'name': '布林中轨突破', 'url': '/0x948dafbd3c218b21bb8a63e75ba0dcf01c48cf05'},
|
27
|
+
{'key': 'trend_boll_lower_band', 'name': '布林下轨统计分析', 'url': '/0x3b8132154797a6971a73da743122cb1e8a3c22ca', 'is_hide': 1},
|
26
28
|
{'key': 'trend_price', 'name': '股价阶段涨跌幅度', 'url': '/0x84527c7c3487b39afd820f2b309355cd75c01653'},
|
27
29
|
{'key': 'trend_day3_stabilize', 'name': '连续三日收涨', 'url': '/0x7e9df652521f334030e0be383f5fe10f01a67243'},
|
28
30
|
{'key': 'trend_contra_trade', 'name': '反包', 'url': '/0xa3645ec3bf460f8c0c2ce35d22ab3f50bdd87c5f'},
|
@@ -32,7 +34,6 @@ const MenuList = [
|
|
32
34
|
{'key': 'trend_bull_trend', 'name': '多头趋势', 'url': '/0x37b24777154ee090926e57bfa5602efa5c89b8a8'},
|
33
35
|
{'key': 'trend_fund_hold', 'name': '基金持股变化', 'url': '/0x706c0e77ca3e314b5186c763e6ee857b744e9880'},
|
34
36
|
{'key': 'trend_money_inflow', 'name': '资金流入历史最高', 'url': '/0xfbfc92be1eebe9ccf5b2f14b9a2ea25f2cc941b8'},
|
35
|
-
{'key': 'trend_boll', 'name': '布林线', 'url': '/0x7f2c6b9542ce7626669ab4910cbf7e8812883fea'},
|
36
37
|
{'key': 'trend_holder_minimum', 'name': '股东数历史最少', 'url': '/0xf0c0c360a283689c83ae216c6bbb03777d8068ca'},
|
37
38
|
{'key': 'trend_down_maximum', 'name': '历史高位最大跌幅', 'url': '/0x8d7b8abeec94e2ebe4b25115272d9d5899355c43'},
|
38
39
|
{'key': 'trend_week_minimum', 'name': '周成交低点', 'url': '/0xa9dfc159b157ae3b694a12dc42fb8feaa75bcf51'},
|
package/package.json
CHANGED
package/status.js
CHANGED
@@ -53,15 +53,15 @@ $(function () {
|
|
53
53
|
|
54
54
|
handle_status: function () {
|
55
55
|
Util.post(location.pathname, {active_div: localStorage[Status.tab_token], date: $("#ip_date").val()}, function (j) {
|
56
|
-
let
|
56
|
+
let html = [];
|
57
57
|
if (!$("#start_time").length) {
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
$("#status_head").prepend(
|
58
|
+
html.push("<tr><th id='start_time' width='25%'>系统时区:</th><td>", Status.map_url(j["timezone"]), "</td>");
|
59
|
+
html.push("<th id='start_time' width='25%'>服务器运行时间:</th><td colspan='3'>", Util.seconds_to_format(j["start_time"]), "(" + j["up_time"] + ")</td></tr>");
|
60
|
+
html.push("<tr><th width='25%'>数据库最后同步时间:</th><td>", Util.seconds_to_format(j["sync_end_time"]), "</td>");
|
61
|
+
html.push("<th width='20%'>数据库句柄更新时间:</th><td colspan='3'>", Util.seconds_to_format(j["db_time"]), "</td></tr>");
|
62
|
+
html.push("<tr><th width='25%'>成交量最后同步时间:</th><td>", Util.seconds_to_format(j["sync_amount_time"]), "</td>");
|
63
|
+
html.push("<th width='20%'>位置数据最后同步时间:</th><td colspan='3'>", Util.seconds_to_format(j["location_time"]), "</td></tr>");
|
64
|
+
$("#status_head").prepend(html.join(""));
|
65
65
|
}
|
66
66
|
Status.render_ip_daily(j["ip_daily_data"]);
|
67
67
|
// 数据库
|
@@ -81,7 +81,7 @@ $(function () {
|
|
81
81
|
});
|
82
82
|
$("#mysql_remote_ip").html(mysql_remote_ip.join("、"));
|
83
83
|
}
|
84
|
-
|
84
|
+
html = [];
|
85
85
|
let current_connections = 0, db_ip_array = [];
|
86
86
|
j["process_list"].forEach(function (item) {
|
87
87
|
let match_ip_data = Util.regexp_match_ip(item["Host"]);
|
@@ -89,20 +89,20 @@ $(function () {
|
|
89
89
|
db_ip_array.push(match_ip_data[0]);
|
90
90
|
}
|
91
91
|
current_connections++;
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
92
|
+
html.push("<tr>");
|
93
|
+
html.push("<td>", item["Id"], "</td>");
|
94
|
+
html.push("<td>", item["User"], "</td>");
|
95
|
+
html.push("<td>", Status.pack_ip_link(item["Host"]), "</td>");
|
96
|
+
html.push("<td>", item["db"], "</td>");
|
97
|
+
html.push("<td>", item["Command"], "</td>");
|
98
|
+
html.push("<td>", item["Time"], "</td>");
|
99
|
+
html.push("<td>", item["State"], "</td>");
|
100
|
+
html.push("<td>", item["Info"], "</td>");
|
101
|
+
html.push("</tr>");
|
102
102
|
});
|
103
103
|
$("#max_connections").html("<span class='label label-info'>" + current_connections + "</span> / " + j["max_connections"]);
|
104
104
|
$("#hard_disk").html(j["disk_available_size"] + " / " + j["disk_total_size"]);
|
105
|
-
Util.render_table_html("process_list",
|
105
|
+
Util.render_table_html("process_list", html);
|
106
106
|
if (db_ip_array.length > 0) {
|
107
107
|
let din_obj = $("#db_ip_num");
|
108
108
|
din_obj.html("(" + db_ip_array.length + ")");
|
@@ -128,26 +128,26 @@ $(function () {
|
|
128
128
|
},
|
129
129
|
|
130
130
|
render_ip_daily: function(ip_daily_data) {
|
131
|
-
let
|
131
|
+
let html = [], referer_search = "", referer_replacement = "";
|
132
132
|
let u = new URL(window.location.href);
|
133
133
|
if (u.hostname && u.port) {
|
134
134
|
referer_search = u.hostname + "/";
|
135
135
|
referer_replacement = u.hostname + ":" + u.port + "/";
|
136
136
|
}
|
137
137
|
ip_daily_data.forEach(function (item) {
|
138
|
-
|
139
|
-
|
140
|
-
|
138
|
+
html.push("<tr>");
|
139
|
+
html.push("<td>", Status.pack_ip_link(item["ip"]), "</td>");
|
140
|
+
html.push("<td>", Status.map_url(item['location']), "</td>");
|
141
141
|
item["referer"] = item["referer"].replace("?", "?");
|
142
142
|
if (referer_search && referer_replacement) {
|
143
143
|
item["referer"] = item["referer"].replace(referer_search, referer_replacement);
|
144
144
|
}
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
145
|
+
html.push("<td title='", item["referer"], "'>", Util.pack_html_link("http://" + item["referer"], Util.substring(item["referer"], 50)), "</td>");
|
146
|
+
html.push("<td>", item["visit"], "</td>");
|
147
|
+
html.push("<td>", Util.seconds_to_format(item["time"]), "</td>");
|
148
|
+
html.push("</tr>");
|
149
149
|
});
|
150
|
-
Util.render_table_html("ip_daily_data",
|
150
|
+
Util.render_table_html("ip_daily_data", html);
|
151
151
|
},
|
152
152
|
|
153
153
|
pack_ip_link: function(ip) {
|
@@ -228,17 +228,17 @@ $(function () {
|
|
228
228
|
});
|
229
229
|
}
|
230
230
|
Util.post(location.pathname, {active_div: localStorage[Status.tab_token]}, function (j) {
|
231
|
-
let
|
231
|
+
let html = [], ip_num = j["num"];
|
232
232
|
$("#ip_num").html("共 <span class='label label-info'>" + j["num"] + "</span> 条");
|
233
233
|
j["data"].forEach(function (item) {
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
234
|
+
html.push("<tr>");
|
235
|
+
html.push("<td>", ip_num, "</td>");
|
236
|
+
html.push("<td>", Util.pack_html_link(Status.ip_url(item["ip"]), item["ip"]), "</td>");
|
237
|
+
html.push("<td>", Status.map_url(Status.convert_ip_address(item)), "</td>");
|
238
|
+
html.push("</tr>");
|
239
239
|
ip_num--;
|
240
240
|
});
|
241
|
-
Util.render_table_html("block_ip_div_body",
|
241
|
+
Util.render_table_html("block_ip_div_body", html);
|
242
242
|
Util.hide_tips();
|
243
243
|
});
|
244
244
|
},
|
@@ -259,20 +259,20 @@ $(function () {
|
|
259
259
|
});
|
260
260
|
}
|
261
261
|
Util.post(location.pathname, {active_div: localStorage[Status.tab_token]}, function (j) {
|
262
|
-
let
|
262
|
+
let html = [], login_num = 0;
|
263
263
|
j["data"].forEach(function (item) {
|
264
264
|
login_num++;
|
265
265
|
let cls = item["date"].indexOf('logged in') > -1 ? "danger" : "";
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
266
|
+
html.push("<tr class='", cls, "'>");
|
267
|
+
html.push("<td>", login_num, "</td>");
|
268
|
+
html.push("<td>", item["user"], "</td>");
|
269
|
+
html.push("<td>", item["terminal"], "</td>");
|
270
|
+
html.push("<td>", Status.pack_ip_link(item["ip"]), "</td>");
|
271
|
+
html.push("<td>", Status.map_url(Status.convert_ip_address(item)), "</td>");
|
272
|
+
html.push("<td>", item["date"], "</td>");
|
273
|
+
html.push("</tr>");
|
274
274
|
});
|
275
|
-
Util.render_table_html("login_log_div_body",
|
275
|
+
Util.render_table_html("login_log_div_body", html);
|
276
276
|
$("#login_log_num").html("共 <span class='label label-info'>" + login_num + "</span> 条");
|
277
277
|
Util.hide_tips();
|
278
278
|
});
|
@@ -298,23 +298,23 @@ $(function () {
|
|
298
298
|
});
|
299
299
|
}
|
300
300
|
Util.post(location.pathname, {active_div: localStorage[Status.tab_token]}, function (j) {
|
301
|
-
let
|
301
|
+
let html = [], table_num = 0;
|
302
302
|
j["data"].forEach(function (item) {
|
303
303
|
table_num++;
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
304
|
+
html.push("<tr>");
|
305
|
+
html.push("<td>", table_num, "</td>");
|
306
|
+
html.push("<td>", item["TABLE_NAME"], "</td>");
|
307
|
+
html.push("<td>", item["ENGINE"], "</td>");
|
308
|
+
html.push("<td>", item["ROW_FORMAT"], "</td>");
|
309
|
+
html.push("<td>", item["TABLE_ROWS"], "</td>");
|
310
|
+
html.push("<td>", item["data_size"], "</td>");
|
311
|
+
html.push("<td>", item["index_size"], "</td>");
|
312
|
+
html.push("<td>", item["UPDATE_TIME"], "</td>");
|
313
|
+
html.push("<td>", item["CREATE_TIME"], "</td>");
|
314
|
+
html.push("<td>", item["TABLE_COMMENT"], "</td>");
|
315
|
+
html.push("</tr>");
|
316
316
|
});
|
317
|
-
Util.render_table_html("database_table_div_body",
|
317
|
+
Util.render_table_html("database_table_div_body", html);
|
318
318
|
$("#table_num").html("共 <span class='label label-info'>" + table_num + "</span> 条");
|
319
319
|
Util.hide_tips();
|
320
320
|
});
|
@@ -360,24 +360,24 @@ $(function () {
|
|
360
360
|
});
|
361
361
|
}
|
362
362
|
$.get("/action?action=request_headers", {}, function (j) {
|
363
|
-
let
|
363
|
+
let html = [];
|
364
364
|
for (let key in j) {
|
365
365
|
if (j.hasOwnProperty(key)) {
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
366
|
+
html.push("<tr>");
|
367
|
+
html.push("<td class='text-right'>", key, "</td>");
|
368
|
+
html.push("<td class='text-left' style='word-break: break-all'>", j[key], "</td>");
|
369
|
+
html.push("</tr>");
|
370
370
|
}
|
371
371
|
}
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
372
|
+
html.push("<tr><td class='text-right'>浏览器代号</td><td class='text-left' style='word-break: break-all'>" + navigator.appCodeName + "</td></tr>");
|
373
|
+
html.push("<tr><td class='text-right'>浏览器名称</td><td class='text-left' style='word-break: break-all'>" + navigator.appName + "</td></tr>");
|
374
|
+
html.push("<tr><td class='text-right'>浏览器版本</td><td class='text-left' style='word-break: break-all'>" + navigator.appVersion + "</td></tr>");
|
375
|
+
html.push("<tr><td class='text-right'>启用Cookies</td><td class='text-left' style='word-break: break-all'>" + navigator.cookieEnabled + "</td></tr>");
|
376
|
+
html.push("<tr><td class='text-right'>硬件平台</td><td class='text-left' style='word-break: break-all'>" + navigator.platform + "</td></tr>");
|
377
377
|
if (navigator.systemLanguage) {
|
378
|
-
|
378
|
+
html.push("<tr><td class='text-right'>系统语言</td><td class='text-left' style='word-break: break-all'>" + navigator.systemLanguage + "</td></tr>");
|
379
379
|
}
|
380
|
-
Util.render_table_html("request_headers_div_body",
|
380
|
+
Util.render_table_html("request_headers_div_body", html);
|
381
381
|
Util.hide_tips();
|
382
382
|
});
|
383
383
|
},
|