sbd-npm 1.4.68 → 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.
- package/package.json +1 -1
- package/status.js +35 -26
package/package.json
CHANGED
package/status.js
CHANGED
@@ -796,7 +796,11 @@ $(function () {
|
|
796
796
|
if (is_screen === 1) {
|
797
797
|
let screen_html = "";
|
798
798
|
if (screen_pid === item["pid"]) {
|
799
|
-
|
799
|
+
if (j["screen_pid_status"] && j["screen_pid_status"] === 1) {
|
800
|
+
screen_html = "<a data-screen='1' class='process_screen' href='#'><span title='会话数据已成功获取' class='label label-success'>会话</span></a>";
|
801
|
+
} else {
|
802
|
+
screen_html = "<a class='process_screen' href='#'><span title='会话数据获取中...' class='label label-info'>会话</span></a>";
|
803
|
+
}
|
800
804
|
} else {
|
801
805
|
screen_html = "<a class='process_screen' href='#'>会话</a>";
|
802
806
|
}
|
@@ -858,33 +862,38 @@ $(function () {
|
|
858
862
|
action = "null";
|
859
863
|
}
|
860
864
|
}
|
861
|
-
|
862
|
-
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) {
|
863
866
|
Util.hide_tips();
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
|
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
|
+
}
|
875
884
|
}
|
876
|
-
}
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
|
885
|
-
|
886
|
-
}
|
887
|
-
}
|
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
|
+
}
|
888
897
|
}
|
889
898
|
});
|
890
899
|
});
|