sbd-npm 1.4.23 → 1.4.25

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
@@ -213,8 +213,8 @@ const MenuList = [
213
213
  'name': '雪球',
214
214
  'icon': 'star',
215
215
  'menu': [
216
- {'key': 'snowball_trend', 'name': '自选趋势', 'url': '/0xeac2ca3d52697daa7aed771a48bb171d7444b20f'},
217
216
  {'key': 'snowball_user', 'name': '用户列表', 'url': '/0x180887e91b7acef7489e55b42d3c0a8ed9e0095a'},
217
+ {'key': 'snowball_trend', 'name': '自选趋势', 'url': '/0xeac2ca3d52697daa7aed771a48bb171d7444b20f'},
218
218
  {'key': 'snowball_tweet', 'name': '推文', 'url': '/0x598d09b0a082120be3b35cb1ddbd4c2581be71d0'},
219
219
  {'key': 'snowball_red_packet', 'name': '红包数据', 'url': '/0xc85d5ceba4416d89a9b1f1c8476197101267d9e8'},
220
220
  {'key': 'snowball_tool', 'name': '搜索工具', 'url': '/0xd7650207847ff99322e8432ffdbe54f9f11c6fe3'},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.4.23",
3
+ "version": "1.4.25",
4
4
  "description": "Stock Big Data",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/status.js CHANGED
@@ -539,12 +539,22 @@ $(function () {
539
539
  hw_html.push('</div>');
540
540
  hw_html.push('&nbsp;&nbsp;<a href="#" data-toggle="modal" data-target=".client_action_modal" data-type="2" class="btn btn-warning">添加任务</a>');
541
541
  hw_html.push('<a href="#" data-toggle="modal" data-target=".client_cookie_modal" class="btn btn-warning">雪球Cookie</a>');
542
+ hw_html.push('<a href="#" id="machine_refresh" class="btn btn-warning">刷新Machine</a>');
542
543
  hw_html.push('</form>');
543
544
  hw_html.push('<div id="worker_process_div"></div>');
544
545
  $("#worker_div").html(hw_html.join(""));
545
546
  if (!document.getElementById("client_action_add")) {
546
547
  Status.init_client_action_modal();
547
548
  Status.init_client_cookie_modal();
549
+ $("#machine_refresh").click(function() {
550
+ Util.show_loading();
551
+ $("#machine_refresh").attr("disabled", true).html("正在处理中...");
552
+ Util.post(location.pathname, {active_div: "machine_refresh"}, function (j) {
553
+ $("#machine_refresh").html("刷新Machine").attr("disabled", false);
554
+ Util.hide_tips();
555
+ });
556
+ return false;
557
+ });
548
558
  }
549
559
  }
550
560
  Util.post(location.pathname, {active_div: localStorage[Status.tab_token], is_init: is_init, machine_id: $("#workers").val()}, function (j) {
@@ -604,7 +614,7 @@ $(function () {
604
614
  html.push("</tr>");
605
615
  });
606
616
  Util.render_table_html("worker_process_div_body", html);
607
- $("#worker_process_tip").html('共 <span class="label label-info">' + process_num + '</span> 进程,最后更新时间:' + Util.seconds_to_format(j["date"]));
617
+ $("#worker_process_tip").html('共 <span class="label label-info">' + process_num + '</span> 进程,最后更新时间:' + Util.seconds_to_format(j["date"]) + ',Revision:' + j["revision"] + ',MachineId:' + j["machine_id"]);
608
618
  $("#workers option[value='" + $("#workers").val() + "']").text(j["ip"] + "(" + process_num + ")");
609
619
  }
610
620
  Util.hide_tips();
package/util.js CHANGED
@@ -279,6 +279,7 @@ const Util = {
279
279
  $.ajax({
280
280
  url: url,
281
281
  headers: {
282
+ 'Cache-Control': 'no-cache',
282
283
  'X-CSRF-TOKEN': Util.get_cookie('_csrf_token')
283
284
  },
284
285
  async: true,
@@ -2455,11 +2456,11 @@ const Util = {
2455
2456
  },
2456
2457
 
2457
2458
  /**
2458
- * 时间花费
2459
+ * 计算执行过程中所花费的时间
2459
2460
  * @param time
2460
2461
  * @returns {string}
2461
2462
  */
2462
- count_down_time: function (time) {
2463
+ calculate_execution_time: function (time) {
2463
2464
  let result = "";
2464
2465
  if (time > 1000) {
2465
2466
  let second = Math.round(time / 1000);