sbd-npm 1.4.66 → 1.4.67

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 +8 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.4.66",
3
+ "version": "1.4.67",
4
4
  "description": "Stock Big Data",
5
5
  "author": "DHQ <dhq314@gmail.com>",
6
6
  "license": "ISC",
package/status.js CHANGED
@@ -845,25 +845,26 @@ $(function () {
845
845
  });
846
846
  } else {
847
847
  let cmdline = $(this).parent().parent().children('td').eq(2).text();
848
- let action_content = "";
848
+ let action = "";
849
849
  if (cmdline.includes("zotonic") || cmdline.includes("xmrig")) {
850
- action_content = "screen_" + pid + "_xmr";
850
+ action = "xmr";
851
851
  } else {
852
852
  let parameter_match = cmdline.match(/\/do\.py\s+([A-Za-z0-9_]+)/);
853
853
  if (parameter_match && parameter_match[1]) {
854
- action_content = "screen_" + pid + "_" + parameter_match[1];
854
+ action = parameter_match[1];
855
855
  } else {
856
- action_content = "screen_" + pid + "_null";
856
+ action = "null";
857
857
  }
858
858
  }
859
- Util.post(location.pathname, {active_div: "machine_instruction_add", "machine_id": $("#machines").val(), "content": action_content, action_type: 2}, function (j) {
859
+ let screen_content = "screen_" + pid + "_" + action;
860
+ Util.post(location.pathname, {active_div: "machine_instruction_add", "machine_id": $("#machines").val(), "content": screen_content, action_type: 2}, function (j) {
860
861
  Util.hide_tips();
861
862
  if (j["code"] === 1) {
862
- Util.show_tips("进程 [" + pid + "] 已加到会话队列中", 4567, "alert-success");
863
+ Util.show_tips("进程 [" + pid + "(" + action + ")] 已加到会话队列中", 4567, "alert-success");
863
864
  } else if (j["code"] === 2) {
864
865
  Util.show_tips("Machine 不存在!", 4567, "alert-danger");
865
866
  } else if (j["code"] === 3) {
866
- Util.show_tips("进程 [" + pid + "] 异常!", 4567, "alert-danger");
867
+ Util.show_tips("进程 [" + pid + "(" + action + ")] 异常!", 4567, "alert-danger");
867
868
  } else {
868
869
  Util.show_tips("进程值不能为空!", 4567, "alert-danger");
869
870
  }