sbd-npm 1.5.36 → 1.5.38
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 +66 -63
- package/util.js +11 -11
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 + "' ") : "";
|
|
@@ -93,7 +93,7 @@ $(function () {
|
|
|
93
93
|
});
|
|
94
94
|
mysql_remote_ip = mri_html.join("、");
|
|
95
95
|
}
|
|
96
|
-
html.push("<tr><th><a data-toggle='modal' data-target='.
|
|
96
|
+
html.push("<tr><th><a data-toggle='modal' data-target='.mysql_ssh_modal'>数据库正在连接的IP</a></th><td colspan='5'>", mysql_remote_ip, "</td></tr>");
|
|
97
97
|
|
|
98
98
|
let max_files_tips = "系统允许打开的最大文件描述符数量(即每个进程最多能打开多少个文件,包括网络连接、管道、实际文件等)";
|
|
99
99
|
html.push("<tr><th>最大文件描述符数量 <i class='glyphicon glyphicon-info-sign' data-toggle='tooltip' data-original-title='", max_files_tips, "'></i></th><td>", (j.max_files == "None" ? "--" : j.max_files), "</td>");
|
|
@@ -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++;
|
|
@@ -190,9 +190,9 @@ $(function () {
|
|
|
190
190
|
});
|
|
191
191
|
},
|
|
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++;
|
|
@@ -209,9 +209,9 @@ $(function () {
|
|
|
209
209
|
html.push("<td>", Util.seconds_to_format(item.latest_time), "</td>");
|
|
210
210
|
html.push("</tr>");
|
|
211
211
|
});
|
|
212
|
-
Util.render_table_html("
|
|
213
|
-
$("#
|
|
214
|
-
$("#
|
|
212
|
+
Util.render_table_html("mysql_ssh_modal_body_body", html);
|
|
213
|
+
$("#mysql_ssh_summary").html(" 共 <span class='label label-info'>" + j.total_len + "</span> 条,屏蔽 <span class='label label-danger'>" + j.block_len + "</span> 条");
|
|
214
|
+
$("#mysql_ssh_modal_body_body .block_ip").each(function() {
|
|
215
215
|
$(this).click(function() {
|
|
216
216
|
let ip = $(this).parent().parent().children('td').eq(1).text();
|
|
217
217
|
let ip_address = $(this).parent().parent().children('td').eq(2).text();
|
|
@@ -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()
|
|
@@ -1716,13 +1713,13 @@ $(function () {
|
|
|
1716
1713
|
Util.set_table_loading("mysql_process_modal_body_body");
|
|
1717
1714
|
});
|
|
1718
1715
|
|
|
1719
|
-
Util.init_modal_skeleton("
|
|
1720
|
-
$("#
|
|
1716
|
+
Util.init_modal_skeleton("mysql_ssh_modal");
|
|
1717
|
+
$("#mysql_ssh_modal_title").html("连接 <select id='mysql_ssh_type'><option value='1'>MySQL</option><option value='2'>SSH</option></select> 的IP日志统计数据");
|
|
1721
1718
|
Util.init_table_skeleton({
|
|
1722
|
-
"element_id": "
|
|
1723
|
-
"caption": '<caption class="' + (Util.is_mobile() ? "text-left" : "text-right") + '" id="
|
|
1719
|
+
"element_id": "mysql_ssh_modal_body",
|
|
1720
|
+
"caption": '<caption class="' + (Util.is_mobile() ? "text-left" : "text-right") + '" id="mysql_ssh_summary"></caption>',
|
|
1724
1721
|
"head_columns": [
|
|
1725
|
-
{"name": "", "select_id": "
|
|
1722
|
+
{"name": "", "select_id": "mysql_ssh_filter", "select_options": [{"key": "0", "val": "全部"},{"key": "1", "val": "正常"},{"key": "2", "val": "屏蔽"},{"key": "3", "val": "异常"}]},
|
|
1726
1723
|
{"name": "IP", "table_sort": 1, "tooltip": "IP地址(Internet Protocol Address)是指互联网协议地址"},
|
|
1727
1724
|
{"name": "地址信息", "table_sort": 1},
|
|
1728
1725
|
{"name": "连接次数", "table_sort": 1},
|
|
@@ -1730,19 +1727,25 @@ $(function () {
|
|
|
1730
1727
|
{"name": "最后一次连接时间", "class": "info", "table_sort": 1},
|
|
1731
1728
|
]
|
|
1732
1729
|
});
|
|
1733
|
-
$("#
|
|
1734
|
-
$("#
|
|
1735
|
-
Util.set_table_loading("
|
|
1736
|
-
Status.
|
|
1730
|
+
$("#mysql_ssh_type").change(function() {
|
|
1731
|
+
$("#mysql_ssh_summary").html("");
|
|
1732
|
+
Util.set_table_loading("mysql_ssh_modal_body_body");
|
|
1733
|
+
Status.fetch_mysql_ssh_ip_data();
|
|
1734
|
+
});
|
|
1735
|
+
$("#mysql_ssh_filter").change(function() {
|
|
1736
|
+
$("#mysql_ssh_summary").html("");
|
|
1737
|
+
Util.set_table_loading("mysql_ssh_modal_body_body");
|
|
1738
|
+
Status.fetch_mysql_ssh_ip_data();
|
|
1737
1739
|
});
|
|
1738
|
-
let mam_object = $('#
|
|
1740
|
+
let mam_object = $('#mysql_ssh_modal');
|
|
1739
1741
|
mam_object.on('shown.bs.modal', function (e) {
|
|
1740
|
-
$("#
|
|
1741
|
-
|
|
1742
|
+
$("#mysql_ssh_type").val("1");
|
|
1743
|
+
$("#mysql_ssh_filter").val("0");
|
|
1744
|
+
Status.fetch_mysql_ssh_ip_data();
|
|
1742
1745
|
});
|
|
1743
1746
|
mam_object.on('hidden.bs.modal', function () {
|
|
1744
|
-
$("#
|
|
1745
|
-
Util.set_table_loading("
|
|
1747
|
+
$("#mysql_ssh_summary").html("");
|
|
1748
|
+
Util.set_table_loading("mysql_ssh_modal_body_body");
|
|
1746
1749
|
});
|
|
1747
1750
|
|
|
1748
1751
|
let request_arguments = Util.request_arguments();
|
package/util.js
CHANGED
|
@@ -2901,27 +2901,27 @@ const Util = {
|
|
|
2901
2901
|
|
|
2902
2902
|
/**
|
|
2903
2903
|
* 提示信息显示
|
|
2904
|
-
* @param
|
|
2904
|
+
* @param message
|
|
2905
2905
|
* @param interval 信息持续的时间(毫秒,到期则关闭)
|
|
2906
2906
|
* @param cls 样式:alert-warning | alert-danger
|
|
2907
2907
|
* @param loading 设置加载状态效果表现
|
|
2908
2908
|
*/
|
|
2909
|
-
show_tips: function (
|
|
2909
|
+
show_tips: function (message, interval = 0, cls = "", loading = 0) {
|
|
2910
2910
|
let tips_object = document.getElementById(Util.tips_token);
|
|
2911
2911
|
if (tips_object) {
|
|
2912
2912
|
if (loading > 0) {
|
|
2913
|
-
let
|
|
2913
|
+
let origin_message = message.replace(/\./g, '');
|
|
2914
2914
|
let origin_txt = tips_object.innerText.replace(/\./g, '');
|
|
2915
|
-
if (
|
|
2915
|
+
if (origin_message === origin_txt) {
|
|
2916
2916
|
loading = loading < 5 ? (loading + 1) : 1;
|
|
2917
2917
|
let load_string = ".".repeat(loading);
|
|
2918
|
-
tips_object.innerHTML =
|
|
2918
|
+
tips_object.innerHTML = origin_message + load_string;
|
|
2919
2919
|
setTimeout(() => {
|
|
2920
|
-
Util.show_tips(
|
|
2920
|
+
Util.show_tips(message, interval, cls, loading);
|
|
2921
2921
|
}, 300);
|
|
2922
2922
|
}
|
|
2923
2923
|
} else {
|
|
2924
|
-
tips_object.innerHTML =
|
|
2924
|
+
tips_object.innerHTML = message;
|
|
2925
2925
|
}
|
|
2926
2926
|
} else {
|
|
2927
2927
|
if (loading === 0) {
|
|
@@ -2929,15 +2929,15 @@ const Util = {
|
|
|
2929
2929
|
tips_object.id = Util.tips_token;
|
|
2930
2930
|
tips_object.className = "alert " + (cls === "" ? "alert-warning" : cls);
|
|
2931
2931
|
tips_object.style = "position: fixed; right: 0; top: 0; z-index: 999;";
|
|
2932
|
-
tips_object.innerHTML =
|
|
2932
|
+
tips_object.innerHTML = message;
|
|
2933
2933
|
document.getElementsByTagName('body')[0].appendChild(tips_object);
|
|
2934
2934
|
if (interval > 0) {
|
|
2935
2935
|
setTimeout(Util.hide_tips, interval);
|
|
2936
2936
|
}
|
|
2937
|
-
if (
|
|
2938
|
-
loading =
|
|
2937
|
+
if (message.endsWith('.')) {
|
|
2938
|
+
loading = message.replace(/[^.]/g, '').length;
|
|
2939
2939
|
setTimeout(() => {
|
|
2940
|
-
Util.show_tips(
|
|
2940
|
+
Util.show_tips(message, interval, cls, loading);
|
|
2941
2941
|
}, 200);
|
|
2942
2942
|
}
|
|
2943
2943
|
}
|