sbd-npm 1.4.49 → 1.4.50
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 +6 -2
- package/util.js +2 -1
package/package.json
CHANGED
package/status.js
CHANGED
@@ -554,7 +554,8 @@ $(function () {
|
|
554
554
|
},
|
555
555
|
|
556
556
|
fetch_task_data: function(is_init = 0) {
|
557
|
-
|
557
|
+
let machine_id = $("#task_machines").val();
|
558
|
+
Util.post(location.pathname, {active_div: localStorage[Status.tab_token], is_init: is_init, machine_id: machine_id}, function (j) {
|
558
559
|
if (j["machines"]) {
|
559
560
|
Status.pack_machine_component("task_machines", j["machines"]);
|
560
561
|
if (j["machines"].length > 0) {
|
@@ -614,6 +615,9 @@ $(function () {
|
|
614
615
|
$("#task_add").html('添加任务').prop('disabled', false).removeClass("btn-warning").addClass("btn-default");
|
615
616
|
}
|
616
617
|
}
|
618
|
+
if (j["ip_process_num"]) {
|
619
|
+
$("#task_machines option[value='" + machine_id + "']").text(j["ip_process_num"]);
|
620
|
+
}
|
617
621
|
Util.hide_tips();
|
618
622
|
});
|
619
623
|
},
|
@@ -713,7 +717,7 @@ $(function () {
|
|
713
717
|
});
|
714
718
|
Util.render_table_html("machine_process_div_body", html);
|
715
719
|
$("#machine_process_tip").html('共 <span class="label label-info">' + process_num + '</span> 进程,最后更新时间:' + Util.seconds_to_format(j["date"]) + ',Revision:' + j["revision"] + ',MachineId:' + j["machine_id"]);
|
716
|
-
$("#machines option[value='" +
|
720
|
+
$("#machines option[value='" + j["machine_id"] + "']").text(j["ip"] + "(" + process_num + ")");
|
717
721
|
} else if (is_init === 1) {
|
718
722
|
$('#machines').html('<option value="">暂无Machine</option>');
|
719
723
|
}
|
package/util.js
CHANGED
@@ -1714,7 +1714,8 @@ const Util = {
|
|
1714
1714
|
$(this).click(function () {
|
1715
1715
|
let tr_obj = $(this).parent().parent();
|
1716
1716
|
let word = $(tr_obj).children('td').eq(1).text();
|
1717
|
-
|
1717
|
+
let chinese = $(tr_obj).children('td').eq(2).text();
|
1718
|
+
if (confirm("是否确定要删除“ " + word + "「" + chinese + "」 ” ?")) {
|
1718
1719
|
Util.post(location.pathname, {"active_div": "word_del", "word": word}, function () {
|
1719
1720
|
$(tr_obj).remove();
|
1720
1721
|
Util.show_tips("删除 “ " + word + " ” 成功", 3456, "alert-success");
|