sbd-npm 1.5.49 → 1.5.51

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/constant.js CHANGED
@@ -161,8 +161,9 @@ const MenuList = [
161
161
  'icon': 'retweet',
162
162
  'menu': [
163
163
  {'key': 'portfolio_recommend', 'name': '特别关注', 'url': '/0x2da99e58e28de94b670c4200657ac7e26dd8dceb'},
164
- {'key': 'portfolio_gao', 'name': '高大侠', 'url': '/0x44fe5ef98b6802a9e7a893a1dcc231031ef8683d'},
165
164
  {'key': 'portfolio_stratagem', 'name': '上兵伐谋zgz', 'url': '/0x622a4a04d7a04e3b28c85a36500371ba28edea83'},
165
+ {'key': 'portfolio_gao', 'name': '高大侠', 'url': '/0x44fe5ef98b6802a9e7a893a1dcc231031ef8683d'},
166
+ {'key': 'portfolio_ming', 'name': '明泓投资', 'url': '/0x70144fc2814bd29d01c8090245cf5518bbee41b1'},
166
167
  {'key': 'portfolio_uestc', 'name': '独钓寒江雪', 'url': '/0x7cbaee9df4ea09cc2ad0d001f4b948109b75f39f'},
167
168
  {'key': 'portfolio_ning', 'name': '宁湖', 'url': '/0x69717049aefea13348d702755a4ed38a2f0e40ad'},
168
169
  {'key': 'portfolio_two', 'name': '两瓢(彭波)', 'url': '/0x376350389c657c5153d59959b6351935c9357651'},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.5.49",
3
+ "version": "1.5.51",
4
4
  "description": "Stock Big Data",
5
5
  "author": "DHQ <dhq314@gmail.com>",
6
6
  "license": "ISC",
package/status.js CHANGED
@@ -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>");
@@ -898,7 +898,7 @@ $(function () {
898
898
  html.push("<td>", item.pid, "</td>");
899
899
  html.push("<td>", item.status, "</td>");
900
900
  html.push("<td data-val='", item.rss, "'>", Util.trans_byte_size(item.rss), "</td>");
901
- let cmdline = Util.truncate(item.cmdline, 100);
901
+ let cmdline = Util.truncate(item.cmdline, -100);
902
902
  if (is_xmr === 1) {
903
903
  html.push("<td>", Util.pack_html_link("/xmr", cmdline), "</td>");
904
904
  } else {
@@ -1499,7 +1499,7 @@ $(function () {
1499
1499
  if (ip_address.length > 0) {
1500
1500
  let map_url = Status.map_url(ip_address, "<i class='glyphicon glyphicon-map-marker'></i>");
1501
1501
  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");
1502
+ 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
1503
  ip_result += "&nbsp;&nbsp;&nbsp;" + Util.pack_html_link("https://whois.pconline.com.cn/ipJson.jsp?ip=" + j.ip + "&json=true", "2");
1504
1504
  ip_result += "&nbsp;&nbsp;&nbsp;" + Util.pack_html_link("http://ip-api.com/json/" + j.ip + "?lang=zh-CN", "3");
1505
1505
  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
  },