sbd-npm 1.5.37 → 1.5.39
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 +1 -1
- package/package.json +1 -1
- package/status.js +42 -44
- package/util.js +2 -2
package/constant.js
CHANGED
|
@@ -102,7 +102,7 @@ const MenuList = [
|
|
|
102
102
|
{'key': 'macro_new_loan', 'name': '新增贷款', 'url': '/0x9c15138535acbadaae6fdd41a5310db3a3120c9f'},
|
|
103
103
|
{'key': 'macro_social_financing', 'name': '社会融资规模', 'url': '/0xd69b245526fe230ecf93b762a37d9ecd80b6a9a9'},
|
|
104
104
|
{'key': 'macro_shibor', 'name': 'Shibor 拆放利率', 'url': '/0xcdde4b3c2d0d85b8c2c265448857f867dcc8ed1d'},
|
|
105
|
-
{'key': 'macro_pmi', 'name': '
|
|
105
|
+
{'key': 'macro_pmi', 'name': '制造业采购指数', 'url': '/0x916eca3c36e9c460bf04d0680296dfb37388c8c1'},
|
|
106
106
|
{'key': 'macro_new_investor', 'name': '新增投资者', 'url': '/0xa494b9fc0b63bb025e751a27843b52b77bce9fe0'},
|
|
107
107
|
{'key': 'macro_gold', 'name': '黄金ETF(GLD)', 'url': '/0xb2bd8a25b4ac0846b99767603ff2e4be42dc56d1'},
|
|
108
108
|
{'key': 'macro_crude', 'name': '原油', 'url': '/0xa5dd55db58c43a3c3e05cc08afc7e614e73ad3ba'},
|
package/package.json
CHANGED
package/status.js
CHANGED
|
@@ -24,8 +24,8 @@ $(function () {
|
|
|
24
24
|
|
|
25
25
|
fetch_data: function () {
|
|
26
26
|
Util.show_loading();
|
|
27
|
-
let
|
|
28
|
-
switch (
|
|
27
|
+
let action = localStorage[Status.tab_token];
|
|
28
|
+
switch (action) {
|
|
29
29
|
case "status":
|
|
30
30
|
Status.handle_status();
|
|
31
31
|
break;
|
|
@@ -69,11 +69,11 @@ $(function () {
|
|
|
69
69
|
Status.handle_site_map();
|
|
70
70
|
break;
|
|
71
71
|
}
|
|
72
|
-
Status.data[
|
|
72
|
+
Status.data[action] = 1;
|
|
73
73
|
},
|
|
74
74
|
|
|
75
75
|
handle_status: function () {
|
|
76
|
-
Util.post(location.pathname, {
|
|
76
|
+
Util.post(location.pathname, {action: localStorage[Status.tab_token], date: $("#ip_date").val()}, function (j) {
|
|
77
77
|
let html = [];
|
|
78
78
|
if (!document.getElementById("start_time")) {
|
|
79
79
|
let error_tips = j.error_num > 0 ? ("class='danger' title='" + j.error_num + "' ") : "";
|
|
@@ -169,7 +169,7 @@ $(function () {
|
|
|
169
169
|
|
|
170
170
|
fetch_mysql_process_data: function() {
|
|
171
171
|
Util.show_loading();
|
|
172
|
-
Util.post(location.pathname, {"
|
|
172
|
+
Util.post(location.pathname, {"action": "mysql_process"}, function (j) {
|
|
173
173
|
let html = [], current_connections = 0;
|
|
174
174
|
j.data.forEach(function (item) {
|
|
175
175
|
current_connections++;
|
|
@@ -192,7 +192,7 @@ $(function () {
|
|
|
192
192
|
|
|
193
193
|
fetch_mysql_ssh_ip_data: function() {
|
|
194
194
|
Util.show_loading();
|
|
195
|
-
Util.post(location.pathname, {"
|
|
195
|
+
Util.post(location.pathname, {"action": "mysql_ssh_ip", "data_type": $("#mysql_ssh_type").val(), "filter_type": $("#mysql_ssh_filter").val()}, function (j) {
|
|
196
196
|
let html = [], ip_num = 0;
|
|
197
197
|
j.data.forEach(function (item) {
|
|
198
198
|
ip_num++;
|
|
@@ -226,11 +226,10 @@ $(function () {
|
|
|
226
226
|
let match_ip_data = Util.regexp_match_ip(ip);
|
|
227
227
|
if (match_ip_data && match_ip_data[0]) {
|
|
228
228
|
ip = match_ip_data[0];
|
|
229
|
-
ip_address = ip_address.
|
|
230
|
-
ip_address = ip + "[" + ip_address[0].trim() + "]";
|
|
229
|
+
ip_address = ip + "[" + ip_address.trim() + "]";
|
|
231
230
|
if (confirm("是否确定要屏蔽IP “ " + ip_address + " ” ?")) {
|
|
232
231
|
Util.show_loading();
|
|
233
|
-
Util.post(location.pathname, {"
|
|
232
|
+
Util.post(location.pathname, {"action": "block_ip", "ip": ip}, function (j) {
|
|
234
233
|
Util.hide_tips();
|
|
235
234
|
if (j.code === 1) {
|
|
236
235
|
Util.show_tips("IP “ " + ip_address + " ” 已加到屏蔽队列中", 4567, "alert-success");
|
|
@@ -291,7 +290,7 @@ $(function () {
|
|
|
291
290
|
}
|
|
292
291
|
}
|
|
293
292
|
let is_py_process = $("#is_py_process").prop("checked") ? "1" : "0";
|
|
294
|
-
Util.post(location.pathname, {
|
|
293
|
+
Util.post(location.pathname, {action: localStorage[Status.tab_token], is_py_process: is_py_process}, function (j) {
|
|
295
294
|
let html = [], process_num = 0;
|
|
296
295
|
let screen_pid = j.screen_pid ? j.screen_pid : 0;
|
|
297
296
|
let screen_pid_date = j.screen_pid_date ? j.screen_pid_date : 0;
|
|
@@ -340,7 +339,7 @@ $(function () {
|
|
|
340
339
|
]
|
|
341
340
|
});
|
|
342
341
|
}
|
|
343
|
-
Util.post(location.pathname, {
|
|
342
|
+
Util.post(location.pathname, {action: "get_block_ip"}, function (j) {
|
|
344
343
|
let html = [], ip_num = j.num;
|
|
345
344
|
$("#block_ip_num").html(" 共 <span class='label label-info'>" + ip_num + "</span> 条(" + j.total_ip_num + ") ");
|
|
346
345
|
j.data.forEach(function (item) {
|
|
@@ -375,7 +374,7 @@ $(function () {
|
|
|
375
374
|
},
|
|
376
375
|
|
|
377
376
|
fetch_login_log: function (filter_type) {
|
|
378
|
-
Util.post(location.pathname, {
|
|
377
|
+
Util.post(location.pathname, {action: localStorage[Status.tab_token]}, function (j) {
|
|
379
378
|
let html = [], login_num = 0, anomaly_num = 0;
|
|
380
379
|
j.data.forEach(function (item) {
|
|
381
380
|
login_num++;
|
|
@@ -438,7 +437,7 @@ $(function () {
|
|
|
438
437
|
]
|
|
439
438
|
});
|
|
440
439
|
}
|
|
441
|
-
Util.post(location.pathname, {
|
|
440
|
+
Util.post(location.pathname, {action: localStorage[Status.tab_token]}, function (j) {
|
|
442
441
|
let html = [], table_num = 0;
|
|
443
442
|
j.data.forEach(function (item) {
|
|
444
443
|
table_num++;
|
|
@@ -483,7 +482,7 @@ $(function () {
|
|
|
483
482
|
"head_columns": head_columns
|
|
484
483
|
});
|
|
485
484
|
}
|
|
486
|
-
Util.post(location.pathname, {
|
|
485
|
+
Util.post(location.pathname, {action: localStorage[Status.tab_token]}, function (j) {
|
|
487
486
|
let html = [], database_variable_num = 0;
|
|
488
487
|
j.data.forEach(function (item) {
|
|
489
488
|
database_variable_num++;
|
|
@@ -551,7 +550,7 @@ $(function () {
|
|
|
551
550
|
]
|
|
552
551
|
});
|
|
553
552
|
}
|
|
554
|
-
Util.post(location.pathname, {
|
|
553
|
+
Util.post(location.pathname, {action: localStorage[Status.tab_token]}, function (j) {
|
|
555
554
|
let html = [], environment_num = 0;
|
|
556
555
|
j.data.forEach(function (item) {
|
|
557
556
|
environment_num++;
|
|
@@ -588,7 +587,7 @@ $(function () {
|
|
|
588
587
|
"head_columns": head_columns
|
|
589
588
|
});
|
|
590
589
|
}
|
|
591
|
-
Util.post(location.pathname, {
|
|
590
|
+
Util.post(location.pathname, {action: localStorage[Status.tab_token]}, function (j) {
|
|
592
591
|
let html = [], sysctl_num = 0;
|
|
593
592
|
j.data.forEach(function (item) {
|
|
594
593
|
sysctl_num++;
|
|
@@ -644,7 +643,7 @@ $(function () {
|
|
|
644
643
|
$("#task_add").prop('disabled', true);
|
|
645
644
|
Util.show_loading();
|
|
646
645
|
$("#task_tips").html("");
|
|
647
|
-
Util.post(location.pathname, {
|
|
646
|
+
Util.post(location.pathname, {action: "task_add", "task_content": task_content, machine_id: $("#task_machines").val()}, function (j) {
|
|
648
647
|
if (j.code === 1) {
|
|
649
648
|
Status.task_status = 1;
|
|
650
649
|
$("#task_add").html('任务处理中...').removeClass("btn-default").addClass("btn-warning");
|
|
@@ -711,7 +710,7 @@ $(function () {
|
|
|
711
710
|
|
|
712
711
|
fetch_task_data: function(is_init = 0) {
|
|
713
712
|
let machine_id = $("#task_machines").val();
|
|
714
|
-
Util.post(location.pathname, {
|
|
713
|
+
Util.post(location.pathname, {action: localStorage[Status.tab_token], is_init: is_init, machine_id: machine_id}, function (j) {
|
|
715
714
|
if (j.machines) {
|
|
716
715
|
Status.pack_machine_component("task_machines", j.machines);
|
|
717
716
|
if (j.machines.length > 0) {
|
|
@@ -806,7 +805,7 @@ $(function () {
|
|
|
806
805
|
if (confirm("是否确定要“ 刷新Machine ” ?")) {
|
|
807
806
|
Util.show_loading();
|
|
808
807
|
$("#machine_refresh").prop("disabled", true).html("正在处理中...");
|
|
809
|
-
Util.post(location.pathname, {
|
|
808
|
+
Util.post(location.pathname, {action: "machine_refresh"}, function (j) {
|
|
810
809
|
setTimeout(() => {
|
|
811
810
|
$('#machine_process_div').html('');
|
|
812
811
|
$('#machines').html('<option value="">暂无Machine</option>');
|
|
@@ -820,7 +819,7 @@ $(function () {
|
|
|
820
819
|
});
|
|
821
820
|
}
|
|
822
821
|
}
|
|
823
|
-
Util.post(location.pathname, {
|
|
822
|
+
Util.post(location.pathname, {action: localStorage[Status.tab_token], is_init: is_init, machine_id: $("#machines").val()}, function (j) {
|
|
824
823
|
if (j.machines) {
|
|
825
824
|
Status.pack_machine_component("machines", j.machines);
|
|
826
825
|
if (j.machines.length > 0) {
|
|
@@ -930,7 +929,7 @@ $(function () {
|
|
|
930
929
|
Util.show_loading();
|
|
931
930
|
let instruction = "kill_pid_" + pid;
|
|
932
931
|
let machine_id = action_type === 2 ? $("#machines").val() : "";
|
|
933
|
-
Util.post(location.pathname, {
|
|
932
|
+
Util.post(location.pathname, {action: "machine_instruction_add", "machine_id": machine_id, "instruction": instruction, "action_type": action_type}, function (j) {
|
|
934
933
|
Util.hide_tips();
|
|
935
934
|
if (j.code === 1) {
|
|
936
935
|
Util.show_tips("进程 " + pid_action + " 已加到终止队列中", 4567, "alert-success");
|
|
@@ -966,7 +965,7 @@ $(function () {
|
|
|
966
965
|
if (is_fetch_screen && is_fetch_screen == "1") {
|
|
967
966
|
let instruction = "screen_" + pid + "_" + action;
|
|
968
967
|
let machine_id = action_type === 2 ? $("#machines").val() : "";
|
|
969
|
-
Util.post(location.pathname, {
|
|
968
|
+
Util.post(location.pathname, {action: "machine_screen", "machine_id": machine_id, "pid": pid, "instruction": instruction}, function (j) {
|
|
970
969
|
Util.hide_tips();
|
|
971
970
|
if (j.data) {
|
|
972
971
|
Util.showAlert(j.data);
|
|
@@ -982,7 +981,7 @@ $(function () {
|
|
|
982
981
|
} else {
|
|
983
982
|
let instruction = "screen_" + pid + "_" + action;
|
|
984
983
|
let machine_id = action_type === 2 ? $("#machines").val() : "";
|
|
985
|
-
Util.post(location.pathname, {
|
|
984
|
+
Util.post(location.pathname, {action: "machine_instruction_add", "machine_id": machine_id, "instruction": instruction, "action_type": action_type}, function (j) {
|
|
986
985
|
Util.hide_tips();
|
|
987
986
|
if (j.code === 1) {
|
|
988
987
|
$("#" + element_id + " a").each(function() {
|
|
@@ -1164,7 +1163,7 @@ $(function () {
|
|
|
1164
1163
|
$("#action_machine_div").css("display", "block");
|
|
1165
1164
|
}
|
|
1166
1165
|
let machine_id = $("#machines").val();
|
|
1167
|
-
Util.post(location.pathname, {
|
|
1166
|
+
Util.post(location.pathname, {action: "machine_instruction", action_type: action_type, "machine_id": machine_id}, function (j) {
|
|
1168
1167
|
if (j.machines) {
|
|
1169
1168
|
Status.pack_machine_component("machine_instruction_machine", j.machines);
|
|
1170
1169
|
if (machine_id) {
|
|
@@ -1200,7 +1199,7 @@ $(function () {
|
|
|
1200
1199
|
Util.show_loading();
|
|
1201
1200
|
$("#machine_instruction_tips").html("");
|
|
1202
1201
|
$("#machine_instruction_add").prop("disabled", true);
|
|
1203
|
-
Util.post(location.pathname, {
|
|
1202
|
+
Util.post(location.pathname, {action: "machine_instruction_add", "machine_id": machine_id, "instruction": instruction, action_type: action_type}, function (j) {
|
|
1204
1203
|
$("#machine_instruction_add").prop("disabled", false);
|
|
1205
1204
|
if (j.code === 1) {
|
|
1206
1205
|
$("#machine_instruction_tips").html("<b class='text-success'>任务`" + instruction + "`添加成功!</b>");
|
|
@@ -1256,7 +1255,7 @@ $(function () {
|
|
|
1256
1255
|
let ccm_object = $('#machine_cookie_modal');
|
|
1257
1256
|
ccm_object.on('show.bs.modal', function (e) {
|
|
1258
1257
|
Util.show_loading();
|
|
1259
|
-
Util.post(location.pathname, {
|
|
1258
|
+
Util.post(location.pathname, {action: "machine_instruction", action_type: 2}, function (j) {
|
|
1260
1259
|
if (j.machines) {
|
|
1261
1260
|
Status.pack_machine_component("machine_cookie_machine", j.machines);
|
|
1262
1261
|
let machine_id = $("#machines").val();
|
|
@@ -1281,7 +1280,7 @@ $(function () {
|
|
|
1281
1280
|
Util.show_loading();
|
|
1282
1281
|
$("#machine_cookie_tips").html("");
|
|
1283
1282
|
$("#machine_cookie_add").prop("disabled", true);
|
|
1284
|
-
Util.post(location.pathname, {
|
|
1283
|
+
Util.post(location.pathname, {action: "machine_cookie_add", "machine_id": machine_id, "cookie": machine_cookie}, function (j) {
|
|
1285
1284
|
$("#machine_cookie_add").prop("disabled", false);
|
|
1286
1285
|
if (j.code === 1) {
|
|
1287
1286
|
$("#machine_cookie_tips").html("<b class='text-success'>Cookie添加成功!</b>");
|
|
@@ -1344,7 +1343,7 @@ $(function () {
|
|
|
1344
1343
|
$('#word_modify').css('display', 'none');
|
|
1345
1344
|
$("#word_value").val("Loading...").attr('readonly', true);
|
|
1346
1345
|
$("#word_chinese").val("Loading...").attr('readonly', true);
|
|
1347
|
-
Util.post(location.pathname, {"
|
|
1346
|
+
Util.post(location.pathname, {"action": "word_random"}, function (j) {
|
|
1348
1347
|
if (j.word) {
|
|
1349
1348
|
$("#word_value").val(j.word);
|
|
1350
1349
|
$("#word_chinese").val(j.chinese);
|
|
@@ -1361,7 +1360,7 @@ $(function () {
|
|
|
1361
1360
|
$("#word_modify").off("click").click(function () {
|
|
1362
1361
|
let chinese = $("#word_chinese").val();
|
|
1363
1362
|
if (chinese) {
|
|
1364
|
-
Util.post(location.pathname, {"
|
|
1363
|
+
Util.post(location.pathname, {"action": "word_modify", "word": word, "chinese": chinese}, function (j) {
|
|
1365
1364
|
if (j.code === 1) {
|
|
1366
1365
|
$("#word_chinese").val(j.chinese);
|
|
1367
1366
|
$(tr_object).children('td').eq(2).html(j.chinese);
|
|
@@ -1535,11 +1534,9 @@ $(function () {
|
|
|
1535
1534
|
let parent_width = $(this).parent().parent().width();
|
|
1536
1535
|
if (width < parent_width) {
|
|
1537
1536
|
let margin_left = Math.round((parent_width - width) / 2);
|
|
1538
|
-
$("#color_result").css(
|
|
1539
|
-
$("#color_result").css('margin-left', margin_left + "px");
|
|
1537
|
+
$("#color_result").css({ "width": width + "px", "margin-left": margin_left + "px" });
|
|
1540
1538
|
} else {
|
|
1541
|
-
$("#color_result").css(
|
|
1542
|
-
$("#color_result").css('margin-left', "0px");
|
|
1539
|
+
$("#color_result").css({ "width": parent_width + "px", "margin-left": "0px" });
|
|
1543
1540
|
}
|
|
1544
1541
|
let c_object = $("#color");
|
|
1545
1542
|
let color = c_object.val();
|
|
@@ -1555,18 +1552,19 @@ $(function () {
|
|
|
1555
1552
|
},
|
|
1556
1553
|
|
|
1557
1554
|
handle_site_map: function () {
|
|
1558
|
-
let html = [];
|
|
1559
|
-
|
|
1560
|
-
let url =
|
|
1555
|
+
let html = [], index = 0;
|
|
1556
|
+
document.querySelectorAll('.side-menu li a').forEach(function (element_object) {
|
|
1557
|
+
let url = element_object.getAttribute('href');
|
|
1561
1558
|
if (url) {
|
|
1562
|
-
let title =
|
|
1563
|
-
if (title
|
|
1564
|
-
|
|
1559
|
+
let title = element_object.textContent.trim();
|
|
1560
|
+
if (title) {
|
|
1561
|
+
index += 1;
|
|
1562
|
+
html.push('<a href="', url, '" target="_blank" class="btn btn-default">', index, '.', title, '</a>');
|
|
1565
1563
|
}
|
|
1566
1564
|
}
|
|
1567
1565
|
});
|
|
1568
|
-
html.push('<a href="/xmr" target="_blank" class="btn btn-default"
|
|
1569
|
-
|
|
1566
|
+
html.push('<a href="/xmr" target="_blank" class="btn btn-default">', (index + 1), '.门罗币XMR</a>');
|
|
1567
|
+
document.getElementById('site_map_zone').innerHTML = html.join('');
|
|
1570
1568
|
Util.hide_tips();
|
|
1571
1569
|
},
|
|
1572
1570
|
|
|
@@ -1585,8 +1583,7 @@ $(function () {
|
|
|
1585
1583
|
if (country === isp) {
|
|
1586
1584
|
isp = "";
|
|
1587
1585
|
}
|
|
1588
|
-
|
|
1589
|
-
return ip_address.trim();
|
|
1586
|
+
return (country + province + city + district + isp).trim();
|
|
1590
1587
|
},
|
|
1591
1588
|
|
|
1592
1589
|
phone_query: function() {
|
|
@@ -1672,7 +1669,7 @@ $(function () {
|
|
|
1672
1669
|
$("#ip_daily_search").click(function() {
|
|
1673
1670
|
Util.show_loading();
|
|
1674
1671
|
let payload = {
|
|
1675
|
-
|
|
1672
|
+
action: "ip_daily_search",
|
|
1676
1673
|
ip: $("#search_ip").val(),
|
|
1677
1674
|
location: $("#search_location").val(),
|
|
1678
1675
|
referer: $("#search_referer").val()
|
|
@@ -1742,6 +1739,7 @@ $(function () {
|
|
|
1742
1739
|
});
|
|
1743
1740
|
let mam_object = $('#mysql_ssh_modal');
|
|
1744
1741
|
mam_object.on('shown.bs.modal', function (e) {
|
|
1742
|
+
$("#mysql_ssh_type").val("1");
|
|
1745
1743
|
$("#mysql_ssh_filter").val("0");
|
|
1746
1744
|
Status.fetch_mysql_ssh_ip_data();
|
|
1747
1745
|
});
|
package/util.js
CHANGED
|
@@ -1468,7 +1468,7 @@ const Util = {
|
|
|
1468
1468
|
}
|
|
1469
1469
|
Util.init_table_skeleton(table_options);
|
|
1470
1470
|
Util["portfolio_table_id"] = table_id;
|
|
1471
|
-
Util.post(location.pathname, {
|
|
1471
|
+
Util.post(location.pathname, {action: portfolio}, function (j) {
|
|
1472
1472
|
Util["portfolio_data"] = j.data ? j.data : [];
|
|
1473
1473
|
Util["portfolio_index"] = j.index_list ? j.index_list : [];
|
|
1474
1474
|
Util.render_type_option($("#portfolio_industry"), j.data, "industry", Util.render_portfolio_html);
|
|
@@ -1699,7 +1699,7 @@ const Util = {
|
|
|
1699
1699
|
|
|
1700
1700
|
fetch_word_data: function(is_init, specify_day, search_key) {
|
|
1701
1701
|
Util.show_loading();
|
|
1702
|
-
Util.post(location.pathname, {
|
|
1702
|
+
Util.post(location.pathname, {action: "word", is_init: is_init, specify_day: specify_day, search_key: search_key}, function (j) {
|
|
1703
1703
|
let html = [], index = 0;
|
|
1704
1704
|
let is_mobile = Util.is_mobile();
|
|
1705
1705
|
let is_speech_synthesis = document.getElementById("word_recite") ? 1 : 0;
|