sbd-npm 1.5.50 → 1.5.52

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.5.50",
3
+ "version": "1.5.52",
4
4
  "description": "Stock Big Data",
5
5
  "author": "DHQ <dhq314@gmail.com>",
6
6
  "license": "ISC",
package/snowball_tool.js CHANGED
@@ -369,7 +369,7 @@ $(function () {
369
369
  let html = [];
370
370
  j.data.forEach(function (item, index) {
371
371
  html.push("<tr>");
372
- html.push("<td>", (index + 1), "</td>");
372
+ html.push("<td>", Util.pack_html_link("https://www.xueqiu.com/u/" + item.uid, index + 1), "</td>");
373
373
  html.push("<td><a class='user_td' data-val='", item.uid, "' href='#'>", item.user_name, "</a></td>");
374
374
  html.push("<td class='code_item'>", Util.snowball_url(Util.is_alphabet(item.code) ? item.code.toUpperCase() : item.code), "</td>");
375
375
  html.push("<td>", Util.stock_url(item.code, item.name ? item.name : item.code.toUpperCase()), "</td>");
package/snowball_tweet.js CHANGED
@@ -256,6 +256,8 @@ $(function () {
256
256
  }
257
257
  } else if (SnowballTweet.user_data[item.uid]) {
258
258
  user_name = Util.pack_html_link(user_url, SnowballTweet.user_data[item.uid]);
259
+ } else if (item.user_name) {
260
+ user_name = Util.pack_html_link(user_url, item.user_name);
259
261
  } else {
260
262
  user_name = Util.pack_html_link(user_url, item.uid);
261
263
  }
package/status.js CHANGED
@@ -213,8 +213,8 @@ $(function () {
213
213
  html.push("<td>", Util.pack_html_link(Status.ip_url(item.ip), item.ip), "</td>");
214
214
  html.push("<td>", Status.map_url(Status.convert_ip_address(item)), "</td>");
215
215
  html.push("<td>", item.times, "</td>");
216
- html.push("<td>", Util.seconds_to_format(item.first_time), "</td>");
217
- html.push("<td>", Util.seconds_to_format(item.latest_time), "</td>");
216
+ html.push("<td data-val='", item.first_time, "'>", Util.seconds_to_format(item.first_time), "</td>");
217
+ html.push("<td data-val='", item.latest_time, "'>", Util.seconds_to_format(item.latest_time), "</td>");
218
218
  html.push("</tr>");
219
219
  });
220
220
  Util.render_table_html("mysql_ssh_modal_body_body", html);
@@ -320,7 +320,7 @@ $(function () {
320
320
  html.push("<td>", item.status, "</td>");
321
321
  html.push("<td data-val='", item.rss, "'>", Util.trans_byte_size(item.rss), "</td>");
322
322
  html.push("<td data-val='", item.vms, "'>", Util.trans_byte_size(item.vms), "</td>");
323
- html.push("<td title='", item.cmdline, "'>", Util.truncate(item.cmdline, 60), "</td>");
323
+ html.push("<td title='", item.cmdline, "'>", Util.truncate(item.cmdline, -60), "</td>");
324
324
  html.push("<td>", Util.seconds_to_format(item.create_time), "</td>");
325
325
  html.push(Status.pack_screen_html(is_screen, item.pid, screen_pid, screen_pid_date, item.cmdline));
326
326
  html.push("</tr>");
@@ -534,11 +534,13 @@ $(function () {
534
534
  html.push("</tr>");
535
535
  }
536
536
  }
537
- html.push("<tr><td class='text-right'>浏览器代号</td><td class='text-left' style='word-break: break-all'>" + navigator.appCodeName + "</td></tr>");
538
- html.push("<tr><td class='text-right'>浏览器名称</td><td class='text-left' style='word-break: break-all'>" + navigator.appName + "</td></tr>");
539
- html.push("<tr><td class='text-right'>浏览器版本</td><td class='text-left' style='word-break: break-all'>" + navigator.appVersion + "</td></tr>");
540
- html.push("<tr><td class='text-right'>启用Cookies</td><td class='text-left' style='word-break: break-all'>" + navigator.cookieEnabled + "</td></tr>");
541
- html.push("<tr><td class='text-right'>硬件平台</td><td class='text-left' style='word-break: break-all'>" + navigator.platform + "</td></tr>");
537
+ html.push("<tr><td class='text-right'>浏览器代号</td><td class='text-left' style='word-break: break-all'>", navigator.appCodeName, "</td></tr>");
538
+ html.push("<tr><td class='text-right'>浏览器名称</td><td class='text-left' style='word-break: break-all'>", navigator.appName, "</td></tr>");
539
+ html.push("<tr><td class='text-right'>浏览器版本</td><td class='text-left' style='word-break: break-all'>", navigator.appVersion, "</td></tr>");
540
+ html.push("<tr><td class='text-right'>启用Cookies</td><td class='text-left' style='word-break: break-all'>", navigator.cookieEnabled, "</td></tr>");
541
+ html.push("<tr><td class='text-right'>硬件平台</td><td class='text-left' style='word-break: break-all'>", navigator.platform, "</td></tr>");
542
+ html.push("<tr><td class='text-right'>默认语言</td><td class='text-left' style='word-break: break-all'>", navigator.language, "</td></tr>");
543
+ html.push("<tr><td class='text-right'>所在时区</td><td class='text-left' style='word-break: break-all'>", Intl.DateTimeFormat().resolvedOptions().timeZone, "</td></tr>");
542
544
  if (navigator.systemLanguage) {
543
545
  html.push("<tr><td class='text-right'>系统语言</td><td class='text-left' style='word-break: break-all'>" + navigator.systemLanguage + "</td></tr>");
544
546
  }
@@ -898,7 +900,7 @@ $(function () {
898
900
  html.push("<td>", item.pid, "</td>");
899
901
  html.push("<td>", item.status, "</td>");
900
902
  html.push("<td data-val='", item.rss, "'>", Util.trans_byte_size(item.rss), "</td>");
901
- let cmdline = Util.truncate(item.cmdline, 100);
903
+ let cmdline = Util.truncate(item.cmdline, -100);
902
904
  if (is_xmr === 1) {
903
905
  html.push("<td>", Util.pack_html_link("/xmr", cmdline), "</td>");
904
906
  } else {
@@ -1499,7 +1501,7 @@ $(function () {
1499
1501
  if (ip_address.length > 0) {
1500
1502
  let map_url = Status.map_url(ip_address, "<i class='glyphicon glyphicon-map-marker'></i>");
1501
1503
  let ip_result = Util.pack_html_link(Status.ip_url(j.ip), "<b class='text-success'>" + ip_address + "</b>") + "&nbsp;&nbsp;&nbsp;" + map_url;
1502
- ip_result += "&nbsp;&nbsp;&nbsp;" + Util.pack_html_link("https://apis.map.qq.com/ws/location/v1/ip?output=jsonp&key=SGVBZ-4RO34-NB2US-DQKYK-ZEUVJ-4KFZF&ip=" + j.ip + "&callback=Callback&_=" + Util.now(), "1");
1504
+ ip_result += "&nbsp;&nbsp;&nbsp;" + Util.pack_html_link("https://apis.map.qq.com/ws/location/v1/ip?output=jsonp&key=SZYBZ-M7A6J-WSSF3-X7725-OH4J3-PZBIO&ip=" + j.ip + "&callback=Callback&_=" + Util.now(), "1");
1503
1505
  ip_result += "&nbsp;&nbsp;&nbsp;" + Util.pack_html_link("https://whois.pconline.com.cn/ipJson.jsp?ip=" + j.ip + "&json=true", "2");
1504
1506
  ip_result += "&nbsp;&nbsp;&nbsp;" + Util.pack_html_link("http://ip-api.com/json/" + j.ip + "?lang=zh-CN", "3");
1505
1507
  if (j.domain) {
package/util.js CHANGED
@@ -3895,9 +3895,15 @@ const Util = {
3895
3895
  * @returns {*}
3896
3896
  */
3897
3897
  truncate: function (str, len) {
3898
- if (str.length > len) {
3899
- str = str.slice(0, len) + "...";
3900
- //str = str.substring(0, len) + "...";
3898
+ if (len < 0) {
3899
+ if (str.length > Math.abs(len)) {
3900
+ str = "..." + str.slice(len);
3901
+ }
3902
+ } else {
3903
+ if (str.length > len) {
3904
+ str = str.slice(0, len) + "...";
3905
+ //str = str.substring(0, len) + "...";
3906
+ }
3901
3907
  }
3902
3908
  return str
3903
3909
  },