sbd-npm 1.4.50 → 1.4.51

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/status.js +10 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.4.50",
3
+ "version": "1.4.51",
4
4
  "description": "Stock Big Data",
5
5
  "author": "DHQ <dhq314@gmail.com>",
6
6
  "license": "ISC",
package/status.js CHANGED
@@ -141,7 +141,11 @@ $(function () {
141
141
  referer_replacement = u.hostname + ":" + u.port + "/";
142
142
  }
143
143
  ip_daily_data.forEach(function (item) {
144
- html.push("<tr>");
144
+ if (item["is_block"] === 1) {
145
+ html.push("<tr class='danger'>");
146
+ } else {
147
+ html.push("<tr>");
148
+ }
145
149
  html.push("<td>", Status.pack_ip_link(item["ip"]), "</td>");
146
150
  html.push("<td>", Status.map_url(item['location']), "</td>");
147
151
  item["referer"] = item["referer"].replace("?", "?");
@@ -499,7 +503,7 @@ $(function () {
499
503
  $("#task_div").html(ht_html.join(""));
500
504
  $("#task_add").click(function() {
501
505
  let task_content = $("#task_content").val();
502
- task_content = task_content.replace(/[^\w\u4e00-\u9fff]/g, ''); // 去掉除字母、数字、下划线(_)、汉字外的其他字符
506
+ task_content = task_content.replace(/[^\w\u4e00-\u9fff]/g, ''); // 去掉除字母、数字、下划线(_)、汉字外的其他字符(䒚 /[^\w\u3400-\u9fff\u{20000}-\u{2EBEF}]/gu)
503
507
  if (task_content && task_content.length > 0) {
504
508
  $("#task_content").prop('disabled', true);
505
509
  $("#task_add").prop('disabled', true);
@@ -525,9 +529,11 @@ $(function () {
525
529
  } else {
526
530
  Status.task_status = 0;
527
531
  if (j["code"] && j["code"] === 2) {
528
- $("#task_tips").html("<b class='text-danger'>已添加新任务在处理中!</b>");
532
+ let do_content = j["do_content"] ? ("(" + j["do_content"] + ")") : "";
533
+ $("#task_tips").html("<b class='text-danger'>已添加新任务" + do_content + "在处理中!</b>");
529
534
  } else if (j["code"] && j["code"] === 3) {
530
- $("#task_tips").html("<b class='text-danger'>有任务在执行中!</b>");
535
+ let doing_content = j["doing_content"] ? ("(" + j["doing_content"] + ")") : "";
536
+ $("#task_tips").html("<b class='text-danger'>有任务" + doing_content + "在执行中!</b>");
531
537
  } else {
532
538
  $("#task_tips").html("<b class='text-danger'>参数异常!</b>");
533
539
  }