sbd-npm 1.4.39 → 1.4.40

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/status.js +9 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.4.39",
3
+ "version": "1.4.40",
4
4
  "description": "Stock Big Data",
5
5
  "author": "DHQ <dhq314@gmail.com>",
6
6
  "license": "ISC",
package/status.js CHANGED
@@ -505,7 +505,7 @@ $(function () {
505
505
  $("#task_add").prop('disabled', true);
506
506
  Util.show_loading();
507
507
  $("#task_tips").html("");
508
- Util.post(location.pathname, {active_div: "task_add", "task_content": task_content}, function (j) {
508
+ Util.post(location.pathname, {active_div: "task_add", "task_content": task_content, machine_id: $("#task_machines").val()}, function (j) {
509
509
  if (j["code"] && j["code"] === 1) {
510
510
  Status.task_status = 1;
511
511
  $("#task_add").html('任务处理中...').removeClass("btn-default").addClass("btn-warning");
@@ -554,9 +554,16 @@ $(function () {
554
554
  },
555
555
 
556
556
  fetch_task_data: function(is_init = 0) {
557
- Util.post(location.pathname, {active_div: localStorage[Status.tab_token], is_init: is_init}, function (j) {
557
+ Util.post(location.pathname, {active_div: localStorage[Status.tab_token], is_init: is_init, machine_id: $("#task_machines").val()}, function (j) {
558
558
  if (j["machines"]) {
559
559
  Status.pack_machine_component("task_machines", j["machines"]);
560
+ if (j["machines"].length > 0) {
561
+ $("#task_machines").change(function() {
562
+ Util.show_loading();
563
+ $("#task_result").val("");
564
+ Status.fetch_task_data(0);
565
+ });
566
+ }
560
567
  } else {
561
568
  if (is_init === 1) {
562
569
  $('#task_machines').html('<option value="">暂无Machine</option>');