sbd-npm 1.4.7 → 1.4.8
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 +23 -17
- package/util.js +1 -1
package/package.json
CHANGED
package/status.js
CHANGED
@@ -163,7 +163,7 @@ $(function () {
|
|
163
163
|
if (!document.getElementById("process_div_body")) {
|
164
164
|
Util.init_table_skeleton({
|
165
165
|
"element_id": "process_div",
|
166
|
-
"caption": '<caption class="text-right" id="process_num"></caption>',
|
166
|
+
"caption": '<caption class="text-right">共 <span class="label label-info" id="process_num"></span> 进程,<input checked type="checkbox" id="is_py_process"> 只显示Python进程</caption>',
|
167
167
|
"head_cols": [
|
168
168
|
{"name": "进程ID", "table_sort": 1},
|
169
169
|
{"name": "进程名", "table_sort": 1},
|
@@ -175,24 +175,30 @@ $(function () {
|
|
175
175
|
{"name": "创建时间", "table_sort": 1},
|
176
176
|
]
|
177
177
|
});
|
178
|
+
$("#is_py_process").click(function () {
|
179
|
+
Util.show_loading();
|
180
|
+
Util.set_table_loading("process_div_body");
|
181
|
+
Status.handle_process();
|
182
|
+
});
|
178
183
|
}
|
179
|
-
|
180
|
-
|
184
|
+
let is_py_process = $("#is_py_process").prop("checked") ? "1" : "0";
|
185
|
+
Util.post(location.pathname, {active_div: localStorage[Status.tab_token], is_py_process: is_py_process}, function (j) {
|
186
|
+
let html = [], process_num = 0;
|
181
187
|
j["data"].forEach(function (item) {
|
182
188
|
process_num++;
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
189
|
+
html.push("<tr>");
|
190
|
+
html.push("<td>", item["pid"], "</td>");
|
191
|
+
html.push("<td>", item["name"], "</td>");
|
192
|
+
html.push("<td>", item["username"], "</td>");
|
193
|
+
html.push("<td>", item["status"], "</td>");
|
194
|
+
html.push("<td data-val='", item["rss"], "'>", Util.trans_byte_size(item["rss"]), "</td>");
|
195
|
+
html.push("<td data-val='", item["vms"], "'>", Util.trans_byte_size(item["vms"]), "</td>");
|
196
|
+
html.push("<td title='", item["cmdline"], "'>", Util.sub_str(item["cmdline"], 60), "</td>");
|
197
|
+
html.push("<td>", Util.seconds_to_format(item["create_time"]), "</td>");
|
198
|
+
html.push("</tr>");
|
193
199
|
});
|
194
|
-
$("#process_div_body").html(
|
195
|
-
$("#process_num").html(
|
200
|
+
$("#process_div_body").html(html.join(""));
|
201
|
+
$("#process_num").html(process_num);
|
196
202
|
Util.hide_tips();
|
197
203
|
});
|
198
204
|
},
|
@@ -425,7 +431,7 @@ $(function () {
|
|
425
431
|
if ($("#is_refresh_task").prop("checked")) {
|
426
432
|
Status.task_timer_id = setTimeout(function () {
|
427
433
|
Status.fetch_task_data();
|
428
|
-
},
|
434
|
+
}, 5678);
|
429
435
|
}
|
430
436
|
} else {
|
431
437
|
Status.task_status = 0;
|
@@ -471,7 +477,7 @@ $(function () {
|
|
471
477
|
Status.task_status = 0;
|
472
478
|
ta_obj.html('添加任务').prop('disabled', false).removeClass("btn-warning").addClass("btn-default");
|
473
479
|
tc_obj.prop('disabled', false);
|
474
|
-
$("#task_tips").html("<b class='text-success'>任务 `" + j["content"] + "`
|
480
|
+
$("#task_tips").html("<b class='text-success'>任务 `" + j["content"] + "` DONE</b>");
|
475
481
|
} else {
|
476
482
|
Status.task_status = 1;
|
477
483
|
ta_obj.html('任务处理中...').prop('disabled', true).removeClass("btn-default").addClass("btn-warning");
|
package/util.js
CHANGED
@@ -3271,7 +3271,7 @@ const Util = {
|
|
3271
3271
|
pack_fund_rating: function (item) {
|
3272
3272
|
if (item["rating"]) {
|
3273
3273
|
let rating = item["rating"];
|
3274
|
-
if (rating.includes("买入") || rating.includes("增持")) {
|
3274
|
+
if (rating.includes("买入") || rating.includes("增持") || rating.includes("推荐")) {
|
3275
3275
|
return "<b class='text-danger'>" + rating + "</b>";
|
3276
3276
|
} else if (rating.includes("卖出") || rating.includes("减持")) {
|
3277
3277
|
return "<b class='text-success'>" + rating + "</b>";
|