sbd-npm 1.4.74 → 1.4.76
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 +20 -16
- package/stock_basics.js +9 -2
- package/util.js +6 -0
package/package.json
CHANGED
package/status.js
CHANGED
@@ -790,8 +790,8 @@ $(function () {
|
|
790
790
|
if (is_screen === 1) {
|
791
791
|
let screen_html = "";
|
792
792
|
if (screen_pid === item["pid"]) {
|
793
|
-
if (j["
|
794
|
-
screen_html = "<a data-screen='1' class='process_screen' href='#'><span title='会话数据已成功获取' class='label label-success'>会话</span></a>";
|
793
|
+
if (j["screen_pid_date"] && j["screen_pid_date"] > 0) {
|
794
|
+
screen_html = "<a data-screen='1' class='process_screen' href='#'><span title='会话数据已成功获取(" + Util.seconds_to_format(j["screen_pid_date"]) + ")' class='label label-success'>会话</span></a>";
|
795
795
|
} else {
|
796
796
|
screen_html = "<a class='process_screen' href='#'><span title='会话数据获取中...' class='label label-info'>会话</span></a>";
|
797
797
|
}
|
@@ -810,7 +810,9 @@ $(function () {
|
|
810
810
|
$("#machine_process_div_body .process_kill").each(function() {
|
811
811
|
$(this).click(function() {
|
812
812
|
let pid = $(this).parent().parent().children('td').eq(0).text();
|
813
|
-
|
813
|
+
let cmdline = $(this).parent().parent().children('td').eq(2).text();
|
814
|
+
let action = Status.parse_machine_action(cmdline);
|
815
|
+
if (confirm("是否确定要终止进程 [" + pid + "(" + action + ")] ?")) {
|
814
816
|
Util.show_loading();
|
815
817
|
let action_content = "kill_pid_" + pid;
|
816
818
|
Util.post(location.pathname, {active_div: "machine_instruction_add", "machine_id": $("#machines").val(), "content": action_content, action_type: 2}, function (j) {
|
@@ -832,9 +834,12 @@ $(function () {
|
|
832
834
|
$(this).click(function() {
|
833
835
|
Util.show_loading();
|
834
836
|
let pid = $(this).parent().parent().children('td').eq(0).text();
|
837
|
+
let cmdline = this_obj.parent().parent().children('td').eq(2).text();
|
838
|
+
let action = Status.parse_machine_action(cmdline);
|
835
839
|
let is_fetch_screen = $(this).attr("data-screen");
|
836
840
|
if (is_fetch_screen && is_fetch_screen == "1") {
|
837
|
-
|
841
|
+
let screen_content = "screen_" + pid + "_" + action;
|
842
|
+
Util.post(location.pathname, {active_div: "machine_screen", "machine_id": $("#machines").val(), "pid": pid, "content": screen_content}, function (j) {
|
838
843
|
Util.hide_tips();
|
839
844
|
if (j["data"]) {
|
840
845
|
Util.showAlert(j["data"]);
|
@@ -843,19 +848,7 @@ $(function () {
|
|
843
848
|
}
|
844
849
|
});
|
845
850
|
} else {
|
846
|
-
let action = "";
|
847
851
|
let this_obj = $(this);
|
848
|
-
let cmdline = this_obj.parent().parent().children('td').eq(2).text();
|
849
|
-
if (cmdline.includes("zotonic") || cmdline.includes("xmrig")) {
|
850
|
-
action = "xmr";
|
851
|
-
} else {
|
852
|
-
let parameter_match = cmdline.match(/\/do\.py\s+([A-Za-z0-9_]+)/);
|
853
|
-
if (parameter_match && parameter_match[1]) {
|
854
|
-
action = parameter_match[1];
|
855
|
-
} else {
|
856
|
-
action = "null";
|
857
|
-
}
|
858
|
-
}
|
859
852
|
if (this_obj.find("span.label-info").length > 0) {
|
860
853
|
Util.hide_tips();
|
861
854
|
Util.show_tips("进程 [" + pid + "(" + action + ")] 已在会话队列处理中", 4567, "alert-danger");
|
@@ -898,6 +891,17 @@ $(function () {
|
|
898
891
|
});
|
899
892
|
},
|
900
893
|
|
894
|
+
parse_machine_action: function(cmdline) {
|
895
|
+
if (cmdline.includes("xmrig") || cmdline.includes("zotonic")) {
|
896
|
+
return "xmr";
|
897
|
+
}
|
898
|
+
let parameter_match = cmdline.match(/\/do\.py\s+([A-Za-z0-9_]+)/);
|
899
|
+
if (parameter_match && parameter_match[1]) {
|
900
|
+
return parameter_match[1];
|
901
|
+
}
|
902
|
+
return "null";
|
903
|
+
},
|
904
|
+
|
901
905
|
handle_word: function() {
|
902
906
|
let is_init = 0;
|
903
907
|
if (!document.getElementById("word_process_div")) {
|
package/stock_basics.js
CHANGED
@@ -140,8 +140,7 @@ let Stock = {
|
|
140
140
|
|
141
141
|
fetch_base: function () {
|
142
142
|
let html = [];
|
143
|
-
|
144
|
-
code_obj.html(Util.snowball_url(code_obj.text()));
|
143
|
+
$("#code").html(Util.snowball_url(Stock.code));
|
145
144
|
|
146
145
|
let ttm_obj = $("#time_to_market");
|
147
146
|
Stock.ttm_second = parseInt(ttm_obj.text());
|
@@ -275,12 +274,20 @@ let Stock = {
|
|
275
274
|
$("#holder_num").html(Util.pack_html_link(holder_num_url + "?code=" + Stock.code, holder_num));
|
276
275
|
}
|
277
276
|
});
|
277
|
+
if (item["is_retire"] && item["is_retire"] === 1) {
|
278
|
+
let code_a_obj = $('#code a').first();
|
279
|
+
if (!code_a_obj.hasClass('label-default')) {
|
280
|
+
code_a_obj.addClass('label label-default');
|
281
|
+
code_a_obj.attr("title", "已退市");
|
282
|
+
}
|
283
|
+
}
|
278
284
|
Util.hide_tips();
|
279
285
|
});
|
280
286
|
},
|
281
287
|
|
282
288
|
fetch_hist_data: function () {
|
283
289
|
Util.show_loading();
|
290
|
+
Util.set_table_loading("hist_table_body");
|
284
291
|
let hist_type = $("#hist_type").val();
|
285
292
|
let payload = {
|
286
293
|
sort_type: Stock.sort_type,
|
package/util.js
CHANGED
@@ -3675,6 +3675,9 @@ const Util = {
|
|
3675
3675
|
}
|
3676
3676
|
start_obj.val(start_date);
|
3677
3677
|
}
|
3678
|
+
if (start_obj.attr('autocomplete') !== 'off') {
|
3679
|
+
start_obj.attr('autocomplete', 'off');
|
3680
|
+
}
|
3678
3681
|
start_obj.daterangepicker(Util.DateRangePickerOptions);
|
3679
3682
|
if (end_id.length > 0) {
|
3680
3683
|
let end_obj = $('#' + end_id);
|
@@ -3682,6 +3685,9 @@ const Util = {
|
|
3682
3685
|
let day = date.getDate();
|
3683
3686
|
end_obj.val(year + "-" + month + "-" + day);
|
3684
3687
|
}
|
3688
|
+
if (end_obj.attr('autocomplete') !== 'off') {
|
3689
|
+
end_obj.attr('autocomplete', 'off');
|
3690
|
+
}
|
3685
3691
|
end_obj.daterangepicker(Util.DateRangePickerOptions);
|
3686
3692
|
}
|
3687
3693
|
},
|