sbd-npm 1.4.76 → 1.4.78
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 +15 -14
- package/util.js +4 -3
package/package.json
CHANGED
package/status.js
CHANGED
@@ -812,17 +812,18 @@ $(function () {
|
|
812
812
|
let pid = $(this).parent().parent().children('td').eq(0).text();
|
813
813
|
let cmdline = $(this).parent().parent().children('td').eq(2).text();
|
814
814
|
let action = Status.parse_machine_action(cmdline);
|
815
|
-
|
815
|
+
let pid_action = "[" + pid + "(" + action + ")]";
|
816
|
+
if (confirm("是否确定要终止进程 " + pid_action + " ?")) {
|
816
817
|
Util.show_loading();
|
817
|
-
let
|
818
|
-
Util.post(location.pathname, {active_div: "machine_instruction_add", "machine_id": $("#machines").val(), "
|
818
|
+
let instruction = "kill_pid_" + pid;
|
819
|
+
Util.post(location.pathname, {active_div: "machine_instruction_add", "machine_id": $("#machines").val(), "instruction": instruction, action_type: 2}, function (j) {
|
819
820
|
Util.hide_tips();
|
820
821
|
if (j["code"] === 1) {
|
821
|
-
Util.show_tips("进程
|
822
|
+
Util.show_tips("进程 " + pid_action + " 已加到终止队列中", 4567, "alert-success");
|
822
823
|
} else if (j["code"] === 2) {
|
823
824
|
Util.show_tips("Machine 不存在!", 4567, "alert-danger");
|
824
825
|
} else if (j["code"] === 3) {
|
825
|
-
Util.show_tips("进程
|
826
|
+
Util.show_tips("进程 " + pid_action + " 异常!", 4567, "alert-danger");
|
826
827
|
} else {
|
827
828
|
Util.show_tips("进程值不能为空!", 4567, "alert-danger");
|
828
829
|
}
|
@@ -834,12 +835,12 @@ $(function () {
|
|
834
835
|
$(this).click(function() {
|
835
836
|
Util.show_loading();
|
836
837
|
let pid = $(this).parent().parent().children('td').eq(0).text();
|
837
|
-
let cmdline =
|
838
|
+
let cmdline = $(this).parent().parent().children('td').eq(2).text();
|
838
839
|
let action = Status.parse_machine_action(cmdline);
|
839
840
|
let is_fetch_screen = $(this).attr("data-screen");
|
840
841
|
if (is_fetch_screen && is_fetch_screen == "1") {
|
841
|
-
let
|
842
|
-
Util.post(location.pathname, {active_div: "machine_screen", "machine_id": $("#machines").val(), "pid": pid, "
|
842
|
+
let instruction = "screen_" + pid + "_" + action;
|
843
|
+
Util.post(location.pathname, {active_div: "machine_screen", "machine_id": $("#machines").val(), "pid": pid, "instruction": instruction}, function (j) {
|
843
844
|
Util.hide_tips();
|
844
845
|
if (j["data"]) {
|
845
846
|
Util.showAlert(j["data"]);
|
@@ -853,8 +854,8 @@ $(function () {
|
|
853
854
|
Util.hide_tips();
|
854
855
|
Util.show_tips("进程 [" + pid + "(" + action + ")] 已在会话队列处理中", 4567, "alert-danger");
|
855
856
|
} else {
|
856
|
-
let
|
857
|
-
Util.post(location.pathname, {active_div: "machine_instruction_add", "machine_id": $("#machines").val(), "
|
857
|
+
let instruction = "screen_" + pid + "_" + action;
|
858
|
+
Util.post(location.pathname, {active_div: "machine_instruction_add", "machine_id": $("#machines").val(), "instruction": instruction, action_type: 2}, function (j) {
|
858
859
|
Util.hide_tips();
|
859
860
|
if (j["code"] === 1) {
|
860
861
|
$('#machine_process_div_body a').each(function() {
|
@@ -1036,15 +1037,15 @@ $(function () {
|
|
1036
1037
|
machine_id = $("#machine_instruction_machine").val();
|
1037
1038
|
}
|
1038
1039
|
if (machine_id) {
|
1039
|
-
let
|
1040
|
-
if (
|
1040
|
+
let instruction = $("#machine_instruction_content").val();
|
1041
|
+
if (instruction) {
|
1041
1042
|
Util.show_loading();
|
1042
1043
|
$("#machine_instruction_tips").html("");
|
1043
1044
|
$("#machine_instruction_add").attr("disabled", true);
|
1044
|
-
Util.post(location.pathname, {active_div: "machine_instruction_add", "machine_id": machine_id, "
|
1045
|
+
Util.post(location.pathname, {active_div: "machine_instruction_add", "machine_id": machine_id, "instruction": instruction, action_type: action_type}, function (j) {
|
1045
1046
|
$("#machine_instruction_add").attr("disabled", false);
|
1046
1047
|
if (j["code"] === 1) {
|
1047
|
-
$("#machine_instruction_tips").html("<b class='text-success'>任务`" +
|
1048
|
+
$("#machine_instruction_tips").html("<b class='text-success'>任务`" + instruction + "`添加成功!</b>");
|
1048
1049
|
} else if (j["code"] === 2) {
|
1049
1050
|
$("#machine_instruction_tips").html("<b class='text-danger'>Machine 不存在!</b>");
|
1050
1051
|
} else if (j["code"] === 3) {
|
package/util.js
CHANGED
@@ -1725,13 +1725,14 @@ const Util = {
|
|
1725
1725
|
$(this).click(function () {
|
1726
1726
|
let tr_obj = $(this).parent().parent();
|
1727
1727
|
let word = $(tr_obj).children('td').eq(1).text();
|
1728
|
-
let
|
1729
|
-
|
1728
|
+
let word_chinese = $(tr_obj).children('td').eq(2).text();
|
1729
|
+
word_chinese = "“ " + word + "「" + word_chinese + "」”";
|
1730
|
+
if (confirm("是否确定要删除 " + word_chinese + " ?")) {
|
1730
1731
|
Util.show_loading();
|
1731
1732
|
Util.post(location.pathname, {"active_div": "word_del", "word": word}, function () {
|
1732
1733
|
$(tr_obj).remove();
|
1733
1734
|
Util.hide_tips();
|
1734
|
-
Util.show_tips("删除
|
1735
|
+
Util.show_tips("删除 " + word_chinese + " 成功", 4567, "alert-success");
|
1735
1736
|
});
|
1736
1737
|
}
|
1737
1738
|
});
|