sbd-npm 1.4.61 → 1.4.62
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 +20 -1
package/package.json
CHANGED
package/status.js
CHANGED
@@ -761,7 +761,7 @@ $(function () {
|
|
761
761
|
html.push("<td title='", item["cmdline"], "'>", cmdline, "</td>");
|
762
762
|
}
|
763
763
|
html.push("<td>", Util.seconds_to_format(item["create_time"]), "</td>");
|
764
|
-
html.push("<td><a class='process_kill' href='#'>终止</a></td>");
|
764
|
+
html.push("<td><a class='process_kill' href='#'>终止</a> <a class='process_screen' href='#'>会话</a></td>");
|
765
765
|
html.push("</tr>");
|
766
766
|
});
|
767
767
|
Util.render_table_html("machine_process_div_body", html);
|
@@ -788,6 +788,25 @@ $(function () {
|
|
788
788
|
}
|
789
789
|
});
|
790
790
|
});
|
791
|
+
$("#machine_process_div_body .process_screen").each(function() {
|
792
|
+
$(this).click(function() {
|
793
|
+
let pid = $(this).parent().parent().children('td').eq(0).text();
|
794
|
+
Util.show_loading();
|
795
|
+
let action_content = "screen_" + pid;
|
796
|
+
Util.post(location.pathname, {active_div: "machine_instruction_add", "machine_id": $("#machines").val(), "content": action_content, action_type: 2}, function (j) {
|
797
|
+
Util.hide_tips();
|
798
|
+
if (j["code"] === 1) {
|
799
|
+
Util.show_tips("进程 [" + pid + "] 已加到会话队列中", 4567, "alert-success");
|
800
|
+
} else if (j["code"] === 2) {
|
801
|
+
Util.show_tips("Machine 不存在!", 4567, "alert-danger");
|
802
|
+
} else if (j["code"] === 3) {
|
803
|
+
Util.show_tips("进程 [" + pid + "] 异常!", 4567, "alert-danger");
|
804
|
+
} else {
|
805
|
+
Util.show_tips("进程值不能为空!", 4567, "alert-danger");
|
806
|
+
}
|
807
|
+
});
|
808
|
+
});
|
809
|
+
});
|
791
810
|
} else if (is_init === 1) {
|
792
811
|
$('#machines').html('<option value="">暂无Machine</option>');
|
793
812
|
}
|