sbd-npm 1.4.25 → 1.4.26

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 +13 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.4.25",
3
+ "version": "1.4.26",
4
4
  "description": "Stock Big Data",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/status.js CHANGED
@@ -439,7 +439,11 @@ $(function () {
439
439
  if (!document.getElementById("task_result")) {
440
440
  $("#task_result_zone").html('<textarea rows="20" id="task_result" class="form-control"></textarea>');
441
441
  }
442
- $("#task_result").val("任务 `" + task_content + "` 处理中...");
442
+ let task_result = "任务 `" + j["content"] + "` 处理中...";
443
+ if (j["chinese"]) {
444
+ task_result += " [" + j["chinese"] + "]";
445
+ }
446
+ $("#task_result").val(task_result);
443
447
  if ($("#is_refresh_task").prop("checked")) {
444
448
  Status.task_timer_id = setTimeout(function () {
445
449
  Status.fetch_task_data();
@@ -550,8 +554,12 @@ $(function () {
550
554
  Util.show_loading();
551
555
  $("#machine_refresh").attr("disabled", true).html("正在处理中...");
552
556
  Util.post(location.pathname, {active_div: "machine_refresh"}, function (j) {
553
- $("#machine_refresh").html("刷新Machine").attr("disabled", false);
554
- Util.hide_tips();
557
+ setTimeout(function () {
558
+ $('#workers').html('<option value="">暂无Machine</option>');
559
+ $("#machine_refresh").html("刷新Machine").attr("disabled", false);
560
+ Util.hide_tips();
561
+ Util.show_tips("刷新成功", 3456, "alert-success");
562
+ }, 3456);
555
563
  });
556
564
  return false;
557
565
  });
@@ -616,6 +624,8 @@ $(function () {
616
624
  Util.render_table_html("worker_process_div_body", html);
617
625
  $("#worker_process_tip").html('共 <span class="label label-info">' + process_num + '</span> 进程,最后更新时间:' + Util.seconds_to_format(j["date"]) + ',Revision:' + j["revision"] + ',MachineId:' + j["machine_id"]);
618
626
  $("#workers option[value='" + $("#workers").val() + "']").text(j["ip"] + "(" + process_num + ")");
627
+ } else if (is_init === 1) {
628
+ $('#workers').html('<option value="">暂无Machine</option>');
619
629
  }
620
630
  Util.hide_tips();
621
631
  });