sbd-npm 1.4.24 → 1.4.26
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 +22 -2
package/package.json
CHANGED
package/status.js
CHANGED
@@ -439,7 +439,11 @@ $(function () {
|
|
439
439
|
if (!document.getElementById("task_result")) {
|
440
440
|
$("#task_result_zone").html('<textarea rows="20" id="task_result" class="form-control"></textarea>');
|
441
441
|
}
|
442
|
-
|
442
|
+
let task_result = "任务 `" + j["content"] + "` 处理中...";
|
443
|
+
if (j["chinese"]) {
|
444
|
+
task_result += " [" + j["chinese"] + "]";
|
445
|
+
}
|
446
|
+
$("#task_result").val(task_result);
|
443
447
|
if ($("#is_refresh_task").prop("checked")) {
|
444
448
|
Status.task_timer_id = setTimeout(function () {
|
445
449
|
Status.fetch_task_data();
|
@@ -539,12 +543,26 @@ $(function () {
|
|
539
543
|
hw_html.push('</div>');
|
540
544
|
hw_html.push(' <a href="#" data-toggle="modal" data-target=".client_action_modal" data-type="2" class="btn btn-warning">添加任务</a>');
|
541
545
|
hw_html.push('<a href="#" data-toggle="modal" data-target=".client_cookie_modal" class="btn btn-warning">雪球Cookie</a>');
|
546
|
+
hw_html.push('<a href="#" id="machine_refresh" class="btn btn-warning">刷新Machine</a>');
|
542
547
|
hw_html.push('</form>');
|
543
548
|
hw_html.push('<div id="worker_process_div"></div>');
|
544
549
|
$("#worker_div").html(hw_html.join(""));
|
545
550
|
if (!document.getElementById("client_action_add")) {
|
546
551
|
Status.init_client_action_modal();
|
547
552
|
Status.init_client_cookie_modal();
|
553
|
+
$("#machine_refresh").click(function() {
|
554
|
+
Util.show_loading();
|
555
|
+
$("#machine_refresh").attr("disabled", true).html("正在处理中...");
|
556
|
+
Util.post(location.pathname, {active_div: "machine_refresh"}, function (j) {
|
557
|
+
setTimeout(function () {
|
558
|
+
$('#workers').html('<option value="">暂无Machine</option>');
|
559
|
+
$("#machine_refresh").html("刷新Machine").attr("disabled", false);
|
560
|
+
Util.hide_tips();
|
561
|
+
Util.show_tips("刷新成功", 3456, "alert-success");
|
562
|
+
}, 3456);
|
563
|
+
});
|
564
|
+
return false;
|
565
|
+
});
|
548
566
|
}
|
549
567
|
}
|
550
568
|
Util.post(location.pathname, {active_div: localStorage[Status.tab_token], is_init: is_init, machine_id: $("#workers").val()}, function (j) {
|
@@ -604,8 +622,10 @@ $(function () {
|
|
604
622
|
html.push("</tr>");
|
605
623
|
});
|
606
624
|
Util.render_table_html("worker_process_div_body", html);
|
607
|
-
$("#worker_process_tip").html('共 <span class="label label-info">' + process_num + '</span> 进程,最后更新时间:' + Util.seconds_to_format(j["date"]));
|
625
|
+
$("#worker_process_tip").html('共 <span class="label label-info">' + process_num + '</span> 进程,最后更新时间:' + Util.seconds_to_format(j["date"]) + ',Revision:' + j["revision"] + ',MachineId:' + j["machine_id"]);
|
608
626
|
$("#workers option[value='" + $("#workers").val() + "']").text(j["ip"] + "(" + process_num + ")");
|
627
|
+
} else if (is_init === 1) {
|
628
|
+
$('#workers').html('<option value="">暂无Machine</option>');
|
609
629
|
}
|
610
630
|
Util.hide_tips();
|
611
631
|
});
|