sbd-npm 1.4.11 → 1.4.12
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/status.js +21 -5
package/package.json
CHANGED
package/status.js
CHANGED
@@ -607,7 +607,9 @@ $(function () {
|
|
607
607
|
html.push('<div class="form-group">');
|
608
608
|
html.push('<label class="control-label col-md-3 col-sm-3 col-xs-12" for="search_ip">任务命令 </label>');
|
609
609
|
html.push('<div class="col-md-6 col-sm-6 col-xs-12">');
|
610
|
-
html.push('<
|
610
|
+
html.push('<select id="client_action_content" class="form-control col-md-7 col-xs-12">');
|
611
|
+
html.push('<option value="">任务命令</option>');
|
612
|
+
html.push('</select>');
|
611
613
|
html.push('</div>');
|
612
614
|
html.push('</div>');
|
613
615
|
html.push('<div class="form-group">');
|
@@ -625,11 +627,23 @@ $(function () {
|
|
625
627
|
Util.show_loading();
|
626
628
|
Util.post(location.pathname, {active_div: "client_action"}, function (j) {
|
627
629
|
if (j["workers"]) {
|
628
|
-
let
|
630
|
+
let worker_html = [];
|
629
631
|
j["workers"].forEach(function (w) {
|
630
|
-
|
632
|
+
worker_html.push("<option value='", w["key"], "'>", w["ip"], "(", w["num"], ")</option>");
|
633
|
+
});
|
634
|
+
let caw_obj = $("#client_action_worker");
|
635
|
+
caw_obj.html(worker_html.join(""));
|
636
|
+
let worker = $("#workers").val();
|
637
|
+
if (worker) {
|
638
|
+
caw_obj.find("option[value='" + worker + "']").attr("selected", true);
|
639
|
+
}
|
640
|
+
}
|
641
|
+
if (j["actions"]) {
|
642
|
+
let action_html = [];
|
643
|
+
j["actions"].forEach(function (action) {
|
644
|
+
action_html.push("<option value='", action, "'>", action, "</option>");
|
631
645
|
});
|
632
|
-
$("#
|
646
|
+
$("#client_action_content").html(action_html.join(""));
|
633
647
|
}
|
634
648
|
Util.hide_tips();
|
635
649
|
});
|
@@ -646,9 +660,11 @@ $(function () {
|
|
646
660
|
if (action_content) {
|
647
661
|
Util.show_loading();
|
648
662
|
$("#client_action_tips").html("");
|
663
|
+
$("#client_action_add").attr("disabled", true);
|
649
664
|
Util.post(location.pathname, {active_div: "client_action_add", "key": worker_key, "content": action_content}, function (j) {
|
665
|
+
$("#client_action_add").attr("disabled", false);
|
650
666
|
if (j["code"] && j["code"] === 1) {
|
651
|
-
$("#client_action_tips").html("<b class='text-success'
|
667
|
+
$("#client_action_tips").html("<b class='text-success'>任务`" + action_content + "`添加成功!</b>");
|
652
668
|
} else if (j["code"] && j["code"] === 2) {
|
653
669
|
$("#client_action_tips").html("<b class='text-danger'>Worker 不存在!</b>");
|
654
670
|
} else if (j["code"] && j["code"] === 3) {
|