sbd-npm 1.3.74 → 1.3.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 +37 -2
- package/summary_daily.js +20 -14
- package/util.js +9 -1
package/package.json
CHANGED
package/status.js
CHANGED
@@ -24,6 +24,9 @@ $(function () {
|
|
24
24
|
case "database_table":
|
25
25
|
Status.handle_database_table();
|
26
26
|
break;
|
27
|
+
case "database_variable":
|
28
|
+
Status.handle_database_variable();
|
29
|
+
break;
|
27
30
|
case "request_headers":
|
28
31
|
Status.handle_request_headers();
|
29
32
|
break;
|
@@ -62,7 +65,7 @@ $(function () {
|
|
62
65
|
j["mysql_remote_ip"].forEach(function (remote_ip) {
|
63
66
|
mysql_remote_ip.push(Status.pack_ip_link(remote_ip));
|
64
67
|
});
|
65
|
-
$("#mysql_remote_ip").
|
68
|
+
$("#mysql_remote_ip").html(mysql_remote_ip.join("、"));
|
66
69
|
}
|
67
70
|
_html = [];
|
68
71
|
let current_connections = 0, db_ip_array = [];
|
@@ -84,6 +87,7 @@ $(function () {
|
|
84
87
|
_html.push("</tr>");
|
85
88
|
});
|
86
89
|
$("#max_connections").html("<span class='label label-info'>" + current_connections + "</span> / " + j["max_connections"]);
|
90
|
+
$("#hard_disk").html(j["disk_available_size"] + " / " + j["disk_total_size"]);
|
87
91
|
Util.render_table_html("process_list", _html);
|
88
92
|
if (db_ip_array.length > 0) {
|
89
93
|
let din_obj = $("#db_ip_num");
|
@@ -246,7 +250,7 @@ $(function () {
|
|
246
250
|
{"name": "序号", "table_sort": 1},
|
247
251
|
{"name": "表名", "table_sort": 1},
|
248
252
|
{"name": "表引擎", "table_sort": 1},
|
249
|
-
{"name": "
|
253
|
+
{"name": "行格式", "table_sort": 1},
|
250
254
|
{"name": "数据量", "table_sort": 1},
|
251
255
|
{"name": "数据大小", "table_sort": 1, "class": "info"},
|
252
256
|
{"name": "索引大小", "table_sort": 1},
|
@@ -279,6 +283,34 @@ $(function () {
|
|
279
283
|
});
|
280
284
|
},
|
281
285
|
|
286
|
+
handle_database_variable: function () {
|
287
|
+
if (!document.getElementById("database_variable_div_body")) {
|
288
|
+
Util.init_table_skeleton({
|
289
|
+
"element_id": "database_variable_div",
|
290
|
+
"caption": '<caption class="text-right" id="database_variable_num"></caption>',
|
291
|
+
"head_cols": [
|
292
|
+
{"name": "序号", "style": "width: 100px;", "table_sort": 1},
|
293
|
+
{"name": "键", "table_sort": 1},
|
294
|
+
{"name": "值", "table_sort": 1},
|
295
|
+
]
|
296
|
+
});
|
297
|
+
}
|
298
|
+
Util.post(location.pathname, {active_div: localStorage[Status.tab_token]}, function (j) {
|
299
|
+
let html = [], database_variable_num = 0;
|
300
|
+
j["data"].forEach(function (item) {
|
301
|
+
database_variable_num++;
|
302
|
+
html.push("<tr>");
|
303
|
+
html.push("<td>", database_variable_num, "</td>");
|
304
|
+
html.push("<td class='text-right'>", item["key"], "</td>");
|
305
|
+
html.push("<td class='text-left' style='word-break: break-all'>", item["val"], "</td>");
|
306
|
+
html.push("</tr>");
|
307
|
+
});
|
308
|
+
Util.render_table_html("database_variable_div_body", html);
|
309
|
+
$("#database_variable_num").html("共 <span class='label label-info'>" + database_variable_num + "</span> 条");
|
310
|
+
Util.hide_tips();
|
311
|
+
});
|
312
|
+
},
|
313
|
+
|
282
314
|
handle_request_headers: function () {
|
283
315
|
if (!document.getElementById("request_headers_div_body")) {
|
284
316
|
Util.init_table_skeleton({
|
@@ -519,6 +551,9 @@ $(function () {
|
|
519
551
|
let city = data["city"] ? data["city"] : "";
|
520
552
|
let district = data["district"] ? data["district"] : "";
|
521
553
|
let isp = data["isp"] ? (" - " + data["isp"]) : "";
|
554
|
+
if (country === city) {
|
555
|
+
country = "";
|
556
|
+
}
|
522
557
|
if (country === province || province === city) {
|
523
558
|
province = "";
|
524
559
|
}
|
package/summary_daily.js
CHANGED
@@ -299,25 +299,28 @@ $(function () {
|
|
299
299
|
pack_market_overview: function (market_overview_dict) {
|
300
300
|
let _html = [], previous_mo_amount = 0, mo_amount = 0, mo_amount_cls = "", mo_amount_sign = "";
|
301
301
|
for (let market_type in market_overview_dict) {
|
302
|
-
if (market_overview_dict.hasOwnProperty(market_type)) {
|
303
|
-
let market = market_overview_dict[market_type];
|
302
|
+
if (market_overview_dict.hasOwnProperty(market_type) && market_overview_dict[market_type]["name"]) {
|
303
|
+
let market_capital = "--", pe = "--", volume = "--", amount = "--", market = market_overview_dict[market_type];
|
304
|
+
_html.push("<tr>");
|
305
|
+
_html.push("<td style='padding: 18px 0;'>", Util.pack_html_link(market["url"], market["name"]), "</td>");
|
304
306
|
if (market["item"]) {
|
305
307
|
if (market_type !== 5 && market["item"]) {
|
306
308
|
previous_mo_amount += market["item"]["prev_amount"];
|
307
309
|
mo_amount += market["item"]["amount"];
|
308
310
|
}
|
309
|
-
|
310
|
-
|
311
|
-
if (
|
312
|
-
|
311
|
+
if (market["item"]["market_capital"] && market["item"]["market_capital"] > 0) {
|
312
|
+
market_capital = market["item"]["market_capital"] + "万亿";
|
313
|
+
} else if (market["item"]["prev_market_capital"] && market["item"]["prev_market_capital"] > 0) {
|
314
|
+
market_capital = market["item"]["prev_market_capital"] + "万亿";
|
315
|
+
}
|
316
|
+
if (market["item"]["pe"]) {
|
317
|
+
pe = market["item"]["pe"];
|
318
|
+
} else if (market["item"]["prev_pe"]) {
|
319
|
+
pe = market["item"]["prev_pe"];
|
313
320
|
}
|
314
|
-
|
315
|
-
|
316
|
-
market["item"]["pe"] = market["item"]["prev_pe"];
|
321
|
+
if (market["item"]["volume"] && market["item"]["volume"] > 0) {
|
322
|
+
volume = market["item"]["volume"] + "亿股";
|
317
323
|
}
|
318
|
-
_html.push("<td style='padding: 18px 0;'>", (market["item"]["pe"] ? market["item"]["pe"] : "--"), "</td>");
|
319
|
-
_html.push("<td style='padding: 18px 0;'>", (market["item"]["volume"] ? (market["item"]["volume"] + "亿股") : "--"), "</td>");
|
320
|
-
let amount = "--";
|
321
324
|
if (market["item"]["amount"] && market["item"]["amount"] > 0) {
|
322
325
|
if (market["item"]["prev_amount"] && market["item"]["prev_amount"] > 0 && market["item"]["amount"] !== market["item"]["prev_amount"]) {
|
323
326
|
if (market["item"]["amount"] > market["item"]["prev_amount"]) {
|
@@ -329,9 +332,12 @@ $(function () {
|
|
329
332
|
amount = market["item"]["amount"] + "亿";
|
330
333
|
}
|
331
334
|
}
|
332
|
-
_html.push("<td style='padding: 18px 0;'>", amount, "</td>");
|
333
|
-
_html.push("</tr>");
|
334
335
|
}
|
336
|
+
_html.push("<td style='padding: 18px 0;'>", market_capital, "</td>");
|
337
|
+
_html.push("<td style='padding: 18px 0;'>", pe, "</td>");
|
338
|
+
_html.push("<td style='padding: 18px 0;'>", volume, "</td>");
|
339
|
+
_html.push("<td style='padding: 18px 0;'>", amount, "</td>");
|
340
|
+
_html.push("</tr>");
|
335
341
|
}
|
336
342
|
}
|
337
343
|
$("#market_overview_zone").html(_html.join(""));
|
package/util.js
CHANGED
@@ -674,7 +674,15 @@ const Util = {
|
|
674
674
|
let weekday = date.getDay();
|
675
675
|
if (weekday > 0 && weekday < 6) {
|
676
676
|
let hour = date.getHours();
|
677
|
-
|
677
|
+
if (hour === 9) {
|
678
|
+
let minute = date.getMinutes();
|
679
|
+
return minute >= 30;
|
680
|
+
} else if (hour === 11) {
|
681
|
+
let minute = date.getMinutes();
|
682
|
+
return minute <= 30;
|
683
|
+
} else {
|
684
|
+
return hour > 9 && hour < 15 && hour !== 12;
|
685
|
+
}
|
678
686
|
}
|
679
687
|
return false;
|
680
688
|
},
|