sbd-npm 1.4.21 → 1.4.22
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 +13 -13
package/package.json
CHANGED
package/status.js
CHANGED
@@ -547,18 +547,18 @@ $(function () {
|
|
547
547
|
Status.init_client_cookie_modal();
|
548
548
|
}
|
549
549
|
}
|
550
|
-
Util.post(location.pathname, {active_div: localStorage[Status.tab_token], is_init: is_init,
|
550
|
+
Util.post(location.pathname, {active_div: localStorage[Status.tab_token], is_init: is_init, machine_id: $("#workers").val()}, function (j) {
|
551
551
|
if (j["workers"]) {
|
552
552
|
let select_html = [];
|
553
553
|
select_html.push("<option value=''>共 ", j["workers"].length, " 个Worker</option>");
|
554
554
|
j["workers"].forEach(function (w) {
|
555
|
-
select_html.push("<option value='", w["
|
555
|
+
select_html.push("<option value='", w["machine_id"], "'>", w["ip"], "(", w["num"], ")</option>");
|
556
556
|
});
|
557
557
|
$("#workers").html(select_html.join(""));
|
558
558
|
if (j["workers"].length > 0) {
|
559
559
|
$("#workers").change(function() {
|
560
|
-
let
|
561
|
-
if (
|
560
|
+
let machine_id = $(this).val();
|
561
|
+
if (machine_id) {
|
562
562
|
Util.show_loading();
|
563
563
|
Util.set_table_loading("worker_process_div_body");
|
564
564
|
Status.handle_worker();
|
@@ -655,7 +655,7 @@ $(function () {
|
|
655
655
|
if (j["workers"]) {
|
656
656
|
let worker_html = [];
|
657
657
|
j["workers"].forEach(function (w) {
|
658
|
-
worker_html.push("<option value='", w["
|
658
|
+
worker_html.push("<option value='", w["machine_id"], "'>", w["ip"], "(", w["num"], ")</option>");
|
659
659
|
});
|
660
660
|
let caw_obj = $("#client_action_worker");
|
661
661
|
caw_obj.html(worker_html.join(""));
|
@@ -679,18 +679,18 @@ $(function () {
|
|
679
679
|
Util.hide_tips();
|
680
680
|
});
|
681
681
|
$("#client_action_add").click(function() {
|
682
|
-
let action_type = 1,
|
682
|
+
let action_type = 1, machine_id = "1";
|
683
683
|
if ($("#action_worker_div").css("display") === "block") {
|
684
684
|
action_type = 2;
|
685
|
-
|
685
|
+
machine_id = $("#client_action_worker").val();
|
686
686
|
}
|
687
|
-
if (
|
687
|
+
if (machine_id) {
|
688
688
|
let action_content = $("#client_action_content").val();
|
689
689
|
if (action_content) {
|
690
690
|
Util.show_loading();
|
691
691
|
$("#client_action_tips").html("");
|
692
692
|
$("#client_action_add").attr("disabled", true);
|
693
|
-
Util.post(location.pathname, {active_div: "client_action_add", "
|
693
|
+
Util.post(location.pathname, {active_div: "client_action_add", "machine_id": machine_id, "content": action_content, action_type: action_type}, function (j) {
|
694
694
|
$("#client_action_add").attr("disabled", false);
|
695
695
|
if (j["code"] && j["code"] === 1) {
|
696
696
|
$("#client_action_tips").html("<b class='text-success'>任务`" + action_content + "`添加成功!</b>");
|
@@ -749,7 +749,7 @@ $(function () {
|
|
749
749
|
if (j["workers"]) {
|
750
750
|
let worker_html = [];
|
751
751
|
j["workers"].forEach(function (w) {
|
752
|
-
worker_html.push("<option value='", w["
|
752
|
+
worker_html.push("<option value='", w["machine_id"], "'>", w["ip"], "(", w["num"], ")</option>");
|
753
753
|
});
|
754
754
|
let caw_obj = $("#client_cookie_worker");
|
755
755
|
caw_obj.html(worker_html.join(""));
|
@@ -767,14 +767,14 @@ $(function () {
|
|
767
767
|
Util.hide_tips();
|
768
768
|
});
|
769
769
|
$("#client_cookie_add").click(function() {
|
770
|
-
let
|
771
|
-
if (
|
770
|
+
let machine_id = $("#client_cookie_worker").val();
|
771
|
+
if (machine_id) {
|
772
772
|
let client_cookie = $("#client_cookie_content").val();
|
773
773
|
if (client_cookie) {
|
774
774
|
Util.show_loading();
|
775
775
|
$("#client_cookie_tips").html("");
|
776
776
|
$("#client_cookie_add").attr("disabled", true);
|
777
|
-
Util.post(location.pathname, {active_div: "client_cookie_add", "
|
777
|
+
Util.post(location.pathname, {active_div: "client_cookie_add", "machine_id": machine_id, "cookie": client_cookie}, function (j) {
|
778
778
|
$("#client_cookie_add").attr("disabled", false);
|
779
779
|
if (j["code"] && j["code"] === 1) {
|
780
780
|
$("#client_cookie_tips").html("<b class='text-success'>Cookie添加成功!</b>");
|