funboost 48.7__py3-none-any.whl → 48.9__py3-none-any.whl

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.

Potentially problematic release.


This version of funboost might be problematic. Click here for more details.

Files changed (43) hide show
  1. funboost/__init__.py +1 -1
  2. funboost/__main__.py +2 -0
  3. funboost/concurrent_pool/custom_threadpool_executor.py +1 -1
  4. funboost/constant.py +17 -2
  5. funboost/consumers/base_consumer.py +42 -28
  6. funboost/consumers/rabbitmq_amqpstorm_consumer.py +6 -1
  7. funboost/core/active_cousumer_info_getter.py +50 -10
  8. funboost/core/booster.py +2 -1
  9. funboost/core/cli/funboost_fire.py +10 -0
  10. funboost/core/current_task.py +17 -0
  11. funboost/core/func_params_model.py +21 -17
  12. funboost/core/loggers.py +1 -0
  13. funboost/core/msg_result_getter.py +1 -0
  14. funboost/funboost_config_deafult.py +1 -1
  15. funboost/function_result_web/__pycache__/app.cpython-37.pyc +0 -0
  16. funboost/function_result_web/__pycache__/app.cpython-39.pyc +0 -0
  17. funboost/function_result_web/__pycache__/functions.cpython-37.pyc +0 -0
  18. funboost/function_result_web/__pycache__/functions.cpython-39.pyc +0 -0
  19. funboost/function_result_web/app.py +42 -2
  20. funboost/function_result_web/app_debug_start.py +6 -0
  21. funboost/function_result_web/functions.py +66 -3
  22. funboost/function_result_web/static/js/form-memory.js +92 -0
  23. funboost/function_result_web/static/js_cdn/chart.js +20 -0
  24. funboost/function_result_web/static/js_cdn/tabulator-tables@5.5.0/dist/js/tabulator.min.js +1 -1
  25. funboost/function_result_web/templates/about.html +0 -9
  26. funboost/function_result_web/templates/conusme_speed.html +2 -2
  27. funboost/function_result_web/templates/fun_result_table.html +1 -1
  28. funboost/function_result_web/templates/index.html +64 -9
  29. funboost/function_result_web/templates/queue_op.html +419 -28
  30. funboost/function_result_web/templates/rpc_call.html +312 -0
  31. funboost/function_result_web/templates/running_consumer_by_ip.html +2 -2
  32. funboost/function_result_web/templates/running_consumer_by_queue_name.html +2 -2
  33. funboost/publishers/rabbitmq_amqpstorm_publisher.py +1 -1
  34. funboost/utils/ctrl_c_end.py +19 -1
  35. funboost/utils/dependency_packages_in_pythonpath/aioredis/readme.md +6 -0
  36. funboost/utils/dependency_packages_in_pythonpath/readme.md +6 -0
  37. {funboost-48.7.dist-info → funboost-48.9.dist-info}/METADATA +173 -81
  38. {funboost-48.7.dist-info → funboost-48.9.dist-info}/RECORD +42 -39
  39. {funboost-48.7.dist-info → funboost-48.9.dist-info}/WHEEL +1 -1
  40. funboost/function_result_web/templates/index_/321/204/342/225/225/320/235/321/205/320/237/320/277/321/206/320/232/320/250/321/205/320/237/320/260.html +0 -153
  41. {funboost-48.7.dist-info → funboost-48.9.dist-info}/LICENSE +0 -0
  42. {funboost-48.7.dist-info → funboost-48.9.dist-info}/entry_points.txt +0 -0
  43. {funboost-48.7.dist-info → funboost-48.9.dist-info}/top_level.txt +0 -0
@@ -33,15 +33,6 @@
33
33
  </head>
34
34
  <body>
35
35
  <div class="container">
36
- <nav class="navbar navbar-default navbar-fixed-top" style="min-height: 40px;">
37
- <div class="container-fluid">
38
- <div class="navbar-header pull-right">
39
- <a href="{{url_for('logout')}}" class="btn btn-danger" style="margin: 4px 15px;">
40
- <i class="fa fa-sign-out"></i> 退出
41
- </a>
42
- </div>
43
- </div>
44
- </nav>
45
36
  <h1>funboost web manager 说明</h1>
46
37
  <div class="info-block">
47
38
  <h4>1. 函数结果 和 消费速率</h4>
@@ -102,7 +102,7 @@
102
102
  var html = '<option value="">请选择队列...</option>';
103
103
  for (var item of result) {
104
104
  html += '<option value="' + item.collection_name + '">' +
105
- item.collection_name + ' (' + item.count + ')</option>';
105
+ item.collection_name + '&nbsp;&nbsp;&nbsp;&nbsp;(result_count:' + item.count + ')</option>';
106
106
  }
107
107
  $("#col_name_search").html(html);
108
108
 
@@ -110,7 +110,7 @@
110
110
  $("#col_name_search").select2({
111
111
  placeholder: "请输入队列名称搜索...",
112
112
  allowClear: true,
113
- width: '300px'
113
+ width: '500px'
114
114
  });
115
115
 
116
116
  // 监听选择变化
@@ -172,7 +172,7 @@
172
172
  var html = '<option value="">请选择队列...</option>';
173
173
  for (var item of result) {
174
174
  html += '<option value="' + item.collection_name + '">' +
175
- item.collection_name + ' (' + item.count + ')</option>';
175
+ item.collection_name + '&nbsp;&nbsp;&nbsp;&nbsp;(result_count:' + item.count + ')</option>';
176
176
  }
177
177
  $("#col_name_search").html(html);
178
178
 
@@ -133,35 +133,45 @@
133
133
  <div class="sidebar">
134
134
  <ul class="nav flex-column">
135
135
  <li class="nav-item">
136
- <a class="nav-link " href="#" data-target="/tpl/fun_result_table.html">
136
+ <a class="nav-link " href="/?page=fun_result_table" data-target="/tpl/fun_result_table.html">
137
137
  <i class="fa fa-table"></i><span>函数结果表</span>
138
138
  </a>
139
139
  </li>
140
140
  <li class="nav-item">
141
- <a class="nav-link" href="#" data-target="/tpl/conusme_speed.html">
141
+ <a class="nav-link" href="/?page=conusme_speed" data-target="/tpl/conusme_speed.html">
142
142
  <i class="fa fa-tachometer"></i><span>消费速率图</span>
143
143
  </a>
144
144
  </li>
145
145
  <li class="nav-item">
146
- <a class="nav-link" href="#" data-target="/tpl/running_consumer_by_ip.html">
146
+ <a class="nav-link" href="/?page=running_consumer_by_ip" data-target="/tpl/running_consumer_by_ip.html">
147
147
  <i class="fa fa-server"></i><span>运行中消费者(by ip)</span>
148
148
  </a>
149
149
  </li>
150
150
  <li class="nav-item">
151
- <a class="nav-link" href="#" data-target="/tpl/running_consumer_by_queue_name.html">
151
+ <a class="nav-link" href="/?page=running_consumer_by_queue_name" data-target="/tpl/running_consumer_by_queue_name.html">
152
152
  <i class="fa fa-list"></i><span>运行中消费者(by queue)</span>
153
153
  </a>
154
154
  </li>
155
155
  <li class="nav-item ">
156
- <a class="nav-link active" href="#" data-target="/tpl/queue_op.html">
156
+ <a class="nav-link active" href="/?page=queue_op" data-target="/tpl/queue_op.html">
157
157
  <i class="fa fa-cogs"></i><span>队列操作</span>
158
158
  </a>
159
159
  </li>
160
160
  <li class="nav-item">
161
- <a class="nav-link" href="#" data-target="/tpl/about.html">
161
+ <a class="nav-link" href="/?page=rpc_call" data-target="/tpl/rpc_call.html">
162
+ <i class="fa fa-cogs"></i><span>rpc调用</span>
163
+ </a>
164
+ </li>
165
+ <li class="nav-item">
166
+ <a class="nav-link" href="/?page=about" data-target="/tpl/about.html">
162
167
  <i class="fa fa-info-circle"></i><span>说明</span>
163
168
  </a>
164
169
  </li>
170
+ <li class="nav-item">
171
+ <a class="nav-link" href="javascript:void(0)" id="logoutBtn">
172
+ <i class="fa fa-sign-out"></i><span>退出登录</span>
173
+ </a>
174
+ </li>
165
175
  </ul>
166
176
  </div>
167
177
 
@@ -176,6 +186,26 @@
176
186
 
177
187
 
178
188
 
189
+ <!-- 添加退出确认模态框 -->
190
+ <div class="modal fade" id="logoutModal" tabindex="-1" role="dialog" aria-labelledby="logoutModalLabel">
191
+ <div class="modal-dialog modal-sm" role="document">
192
+ <div class="modal-content">
193
+ <div class="modal-header">
194
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
195
+ <h4 class="modal-title" id="logoutModalLabel">确认退出</h4>
196
+ </div>
197
+ <div class="modal-body">
198
+ 确定要退出登录吗?
199
+ </div>
200
+ <div class="modal-footer">
201
+ <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
202
+ <button type="button" class="btn btn-primary" id="confirmLogout">确认退出</button>
203
+ </div>
204
+ </div>
205
+ </div>
206
+ </div>
207
+
208
+ <script src="{{ url_for('static',filename='js/form-memory.js') }}"></script>
179
209
  <script>
180
210
  $(document).ready(function () {
181
211
  // ... 现有代码 ...
@@ -197,12 +227,27 @@
197
227
  });
198
228
 
199
229
  $(document).ready(function () {
200
- // 初始加载 Home 页面
201
- loadPage('/tpl/queue_op.html');
230
+ // 检查URL参数是否指定了页面
231
+ var urlParams = new URLSearchParams(window.location.search);
232
+ var pageName = urlParams.get('page');
233
+
234
+ // 初始加载页面
235
+ if (pageName) {
236
+ // 根据URL参数加载页面
237
+ loadPage('/tpl/' + pageName + '.html');
238
+ // 设置对应导航为active
239
+ $('.sidebar .nav-link').removeClass('active');
240
+ $('.sidebar .nav-link[href="/?page=' + pageName + '"]').addClass('active');
241
+ } else {
242
+ // 默认加载队列操作页面
243
+ loadPage('/tpl/queue_op.html');
244
+ }
202
245
 
203
246
  // 导航栏点击事件
204
247
  $('.sidebar .nav-link').click(function (e) {
205
- e.preventDefault();
248
+ // 不阻止默认行为,允许页面跳转
249
+ // e.preventDefault();
250
+
206
251
  // 移除所有导航项的 active 类
207
252
  $('.sidebar .nav-link').removeClass('active');
208
253
  // 为当前点击的导航项添加 active 类
@@ -226,6 +271,16 @@
226
271
  }
227
272
  });
228
273
  }
274
+
275
+ // 退出登录确认
276
+ $('#logoutBtn').click(function(e) {
277
+ e.preventDefault();
278
+ $('#logoutModal').modal('show');
279
+ });
280
+
281
+ $('#confirmLogout').click(function() {
282
+ window.location.href = '/logout';
283
+ });
229
284
  });
230
285
  </script>
231
286
  </body>