sbd-npm 1.4.69 → 1.4.70

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 +30 -25
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.4.69",
3
+ "version": "1.4.70",
4
4
  "description": "Stock Big Data",
5
5
  "author": "DHQ <dhq314@gmail.com>",
6
6
  "license": "ISC",
package/status.js CHANGED
@@ -862,33 +862,38 @@ $(function () {
862
862
  action = "null";
863
863
  }
864
864
  }
865
- let screen_content = "screen_" + pid + "_" + action;
866
- Util.post(location.pathname, {active_div: "machine_instruction_add", "machine_id": $("#machines").val(), "content": screen_content, action_type: 2}, function (j) {
865
+ if (this_obj.find("span.label-info").length > 0) {
867
866
  Util.hide_tips();
868
- if (j["code"] === 1) {
869
- $('#machine_process_div_body a').each(function() {
870
- let span_obj = $(this).find('span.label.label-info');
871
- if (span_obj.length) {
872
- var span_text = span_obj.text();
873
- span_obj.remove();
874
- $(this).append(span_text);
875
- } else {
876
- let is_fetch_screen = $(this).attr("data-screen");
877
- if (is_fetch_screen && is_fetch_screen == "1") {
878
- $(this).text('会话').removeAttr('data-screen');
867
+ Util.show_tips("进程 [" + pid + "(" + action + ")] 已在会话队列处理中", 4567, "alert-danger");
868
+ } else {
869
+ let screen_content = "screen_" + pid + "_" + action;
870
+ Util.post(location.pathname, {active_div: "machine_instruction_add", "machine_id": $("#machines").val(), "content": screen_content, action_type: 2}, function (j) {
871
+ Util.hide_tips();
872
+ if (j["code"] === 1) {
873
+ $('#machine_process_div_body a').each(function() {
874
+ let span_obj = $(this).find('span.label.label-info');
875
+ if (span_obj.length) {
876
+ var span_text = span_obj.text();
877
+ span_obj.remove();
878
+ $(this).append(span_text);
879
+ } else {
880
+ let is_fetch_screen = $(this).attr("data-screen");
881
+ if (is_fetch_screen && is_fetch_screen == "1") {
882
+ $(this).text('会话').removeAttr('data-screen');
883
+ }
879
884
  }
880
- }
881
- });
882
- this_obj.html("<span title='会话数据获取中...' class='label label-info'>会话</span>");
883
- Util.show_tips("进程 [" + pid + "(" + action + ")] 已加到会话队列中", 4567, "alert-success");
884
- } else if (j["code"] === 2) {
885
- Util.show_tips("Machine 不存在!", 4567, "alert-danger");
886
- } else if (j["code"] === 3) {
887
- Util.show_tips("进程 [" + pid + "(" + action + ")] 异常!", 4567, "alert-danger");
888
- } else {
889
- Util.show_tips("进程值不能为空!", 4567, "alert-danger");
890
- }
891
- });
885
+ });
886
+ this_obj.html("<span title='会话数据获取中...' class='label label-info'>会话</span>");
887
+ Util.show_tips("进程 [" + pid + "(" + action + ")] 已加到会话队列中", 4567, "alert-success");
888
+ } else if (j["code"] === 2) {
889
+ Util.show_tips("Machine 不存在!", 4567, "alert-danger");
890
+ } else if (j["code"] === 3) {
891
+ Util.show_tips("进程 [" + pid + "(" + action + ")] 异常!", 4567, "alert-danger");
892
+ } else {
893
+ Util.show_tips("进程值不能为空!", 4567, "alert-danger");
894
+ }
895
+ });
896
+ }
892
897
  }
893
898
  });
894
899
  });