显示优化

This commit is contained in:
rjb
2025-10-17 23:26:07 +08:00
parent 44a9f3ffcc
commit 4129d63afc
7 changed files with 397 additions and 13 deletions

View File

@@ -1897,3 +1897,6 @@ werkzeug.routing.exceptions.BuildError: Could not build url for endpoint 'meal_p
2025-10-13 07:50:22,407 INFO: 应用启动 [in /home/renjianbo/aitsc/config/base.py:82]
2025-10-13 07:56:50,939 INFO: 应用启动 [in /home/renjianbo/aitsc/config/base.py:82]
2025-10-13 08:01:21,495 INFO: 应用启动 [in /home/renjianbo/aitsc/config/base.py:82]
2025-10-17 23:09:02,391 INFO: 应用启动 [in /home/renjianbo/aitsc/config/base.py:82]
2025-10-17 23:11:02,368 INFO: 应用启动 [in /home/renjianbo/aitsc/config/base.py:82]
2025-10-17 23:17:26,078 INFO: 应用启动 [in /home/renjianbo/aitsc/config/base.py:82]

View File

@@ -1 +1 @@
9312
11425

View File

@@ -12193,3 +12193,71 @@
66.132.153.134 - - [17/Oct/2025:14:14:33 +0800] "GET /favicon.ico HTTP/1.1" 404 207 "-" "Mozilla/5.0 (compatible; CensysInspect/1.1; +https://about.censys.io/)" 688
66.132.153.134 - - [17/Oct/2025:14:14:34 +0800] "GET /robots.txt HTTP/1.1" 404 207 "-" "Mozilla/5.0 (compatible; CensysInspect/1.1; +https://about.censys.io/)" 693
34.77.161.183 - - [17/Oct/2025:16:07:37 +0800] "GET / HTTP/1.1" 200 1505892 "-" "python-requests/2.32.5" 568607
185.224.128.17 - - [17/Oct/2025:23:06:39 +0800] "CONNECT example.com:80 HTTP/1.1" 404 207 "-" "-" 699
127.0.0.1 - - [17/Oct/2025:23:09:06 +0800] "GET / HTTP/1.1" 200 1505873 "-" "curl/7.29.0" 412972
127.0.0.1 - - [17/Oct/2025:23:09:17 +0800] "GET / HTTP/1.1" 200 1505873 "-" "curl/7.29.0" 223265
123.139.94.45 - - [17/Oct/2025:23:09:25 +0800] "GET / HTTP/1.1" 200 1505873 "http://101.43.95.130:5002/login" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 1500990
123.139.94.45 - - [17/Oct/2025:23:09:26 +0800] "GET /static/js/interactions.js HTTP/1.1" 404 207 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 1015
123.139.94.45 - - [17/Oct/2025:23:09:27 +0800] "GET /api/check-login HTTP/1.1" 200 115 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 810
127.0.0.1 - - [17/Oct/2025:23:10:06 +0800] "GET / HTTP/1.1" 200 1505873 "-" "curl/7.29.0" 413707
127.0.0.1 - - [17/Oct/2025:23:10:15 +0800] "GET / HTTP/1.1" 200 1505873 "-" "curl/7.29.0" 181067
127.0.0.1 - - [17/Oct/2025:23:11:05 +0800] "GET / HTTP/1.1" 200 1507909 "-" "curl/7.29.0" 663654
127.0.0.1 - - [17/Oct/2025:23:11:12 +0800] "GET / HTTP/1.1" 200 1507909 "-" "curl/7.29.0" 255629
127.0.0.1 - - [17/Oct/2025:23:11:19 +0800] "GET / HTTP/1.1" 200 1507909 "-" "curl/7.29.0" 229148
123.139.94.45 - - [17/Oct/2025:23:11:26 +0800] "GET / HTTP/1.1" 200 1507909 "http://101.43.95.130:5002/login" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 1457416
123.139.94.45 - - [17/Oct/2025:23:11:27 +0800] "GET /static/js/interactions.js HTTP/1.1" 404 207 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 5324
123.139.94.45 - - [17/Oct/2025:23:11:28 +0800] "GET /api/check-login HTTP/1.1" 200 115 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 901
123.139.94.45 - - [17/Oct/2025:23:12:40 +0800] "POST / HTTP/1.1" 200 1513604 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 26121489
123.139.94.45 - - [17/Oct/2025:23:12:42 +0800] "GET /static/js/interactions.js HTTP/1.1" 404 207 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 5401
123.139.94.45 - - [17/Oct/2025:23:12:43 +0800] "GET /api/check-login HTTP/1.1" 200 115 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 904
123.139.94.45 - - [17/Oct/2025:23:14:14 +0800] "GET / HTTP/1.1" 200 1507909 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 1410938
123.139.94.45 - - [17/Oct/2025:23:14:15 +0800] "GET /static/js/interactions.js HTTP/1.1" 404 207 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 5301
123.139.94.45 - - [17/Oct/2025:23:14:16 +0800] "GET /api/check-login HTTP/1.1" 200 115 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 817
123.139.94.45 - - [17/Oct/2025:23:14:22 +0800] "GET / HTTP/1.1" 200 1507909 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 1755639
123.139.94.45 - - [17/Oct/2025:23:14:23 +0800] "GET /static/js/interactions.js HTTP/1.1" 404 207 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 1211
123.139.94.45 - - [17/Oct/2025:23:14:24 +0800] "GET /api/check-login HTTP/1.1" 200 115 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 792
123.139.94.45 - - [17/Oct/2025:23:14:38 +0800] "GET / HTTP/1.1" 200 1507909 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 2220420
123.139.94.45 - - [17/Oct/2025:23:14:39 +0800] "GET /static/js/interactions.js HTTP/1.1" 404 207 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 1207
123.139.94.45 - - [17/Oct/2025:23:14:39 +0800] "GET /api/check-login HTTP/1.1" 200 115 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 1059
54.208.119.170 - - [17/Oct/2025:23:16:00 +0800] "GET / HTTP/1.1" 200 1507909 "-" "got (https://github.com/sindresorhus/got)" 1869529
127.0.0.1 - - [17/Oct/2025:23:17:32 +0800] "GET / HTTP/1.1" 200 174204 "-" "curl/7.29.0" 634247
123.139.94.45 - - [17/Oct/2025:23:17:40 +0800] "GET / HTTP/1.1" 200 174204 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 564499
123.139.94.45 - - [17/Oct/2025:23:17:41 +0800] "GET /static/js/interactions.js HTTP/1.1" 404 207 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 5329
123.139.94.45 - - [17/Oct/2025:23:17:41 +0800] "GET /api/check-login HTTP/1.1" 200 115 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 4692
123.139.94.45 - - [17/Oct/2025:23:17:49 +0800] "GET / HTTP/1.1" 200 174204 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 941257
123.139.94.45 - - [17/Oct/2025:23:17:49 +0800] "GET /static/js/interactions.js HTTP/1.1" 404 207 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 5188
123.139.94.45 - - [17/Oct/2025:23:17:49 +0800] "GET /api/check-login HTTP/1.1" 200 115 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 1170
123.139.94.45 - - [17/Oct/2025:23:17:52 +0800] "GET /api/templates/%E4%B8%93%E4%B8%9A%E6%9C%8D%E5%8A%A1 HTTP/1.1" 200 2702 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 490244
123.139.94.45 - - [17/Oct/2025:23:17:54 +0800] "GET /api/templates/%E4%BA%A7%E5%93%81%E7%AE%A1%E7%90%86 HTTP/1.1" 200 9044 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 466084
123.139.94.45 - - [17/Oct/2025:23:17:55 +0800] "GET /api/templates/%E5%85%A8%E6%A0%88%E5%BC%80%E5%8F%91 HTTP/1.1" 200 9397 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 116086
123.139.94.45 - - [17/Oct/2025:23:17:56 +0800] "GET /api/templates/%E5%85%AC%E5%8A%A1%E5%91%98%E8%80%83%E8%AF%95 HTTP/1.1" 200 29843 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 177610
123.139.94.45 - - [17/Oct/2025:23:17:58 +0800] "GET /api/templates/%E5%86%85%E5%AE%B9%E5%88%9B%E4%BD%9C HTTP/1.1" 200 3561 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 115376
123.139.94.45 - - [17/Oct/2025:23:17:59 +0800] "GET /api/templates/%E5%AE%A2%E6%88%B7%E6%9C%8D%E5%8A%A1 HTTP/1.1" 200 951 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 118062
123.139.94.45 - - [17/Oct/2025:23:18:00 +0800] "GET /api/templates/%E5%95%86%E4%B8%9A%E8%90%A5%E9%94%80 HTTP/1.1" 200 2681 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 118846
123.139.94.45 - - [17/Oct/2025:23:18:01 +0800] "GET /api/templates/%E6%99%BA%E6%85%A7%E5%9F%8E%E5%B8%82 HTTP/1.1" 200 1781 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 104533
123.139.94.45 - - [17/Oct/2025:23:18:02 +0800] "GET /api/templates/%E6%8A%80%E6%9C%AF%E7%A0%94%E5%8F%91 HTTP/1.1" 200 8891 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 115125
123.139.94.45 - - [17/Oct/2025:23:18:04 +0800] "GET /api/templates/%E5%95%86%E4%B8%9A%E8%90%A5%E9%94%80 HTTP/1.1" 200 2681 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 115204
123.139.94.45 - - [17/Oct/2025:23:18:09 +0800] "GET /api/templates/%E4%B8%93%E4%B8%9A%E6%9C%8D%E5%8A%A1 HTTP/1.1" 200 2702 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 115346
123.139.94.45 - - [17/Oct/2025:23:18:09 +0800] "GET /api/templates/%E4%BA%A7%E5%93%81%E7%AE%A1%E7%90%86 HTTP/1.1" 200 9044 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 115363
123.139.94.45 - - [17/Oct/2025:23:18:11 +0800] "GET /api/templates/%E9%80%9A%E7%94%A8 HTTP/1.1" 200 1110 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 114984
123.139.94.45 - - [17/Oct/2025:23:18:14 +0800] "GET /api/templates/%E5%85%A8%E6%A0%88%E5%BC%80%E5%8F%91 HTTP/1.1" 200 9397 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 115233
123.139.94.45 - - [17/Oct/2025:23:18:15 +0800] "GET /api/templates/%E4%BA%A7%E5%93%81%E7%AE%A1%E7%90%86 HTTP/1.1" 200 9044 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 115176
123.139.94.45 - - [17/Oct/2025:23:19:01 +0800] "GET /api/templates/%E4%BA%BA%E5%8A%9B%E8%B5%84%E6%BA%90 HTTP/1.1" 200 1662 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 114453
123.139.94.45 - - [17/Oct/2025:23:19:02 +0800] "GET /api/templates/%E5%86%85%E5%AE%B9%E5%88%9B%E4%BD%9C HTTP/1.1" 200 3561 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 466278
123.139.94.45 - - [17/Oct/2025:23:19:02 +0800] "GET /api/templates/%E5%88%9B%E6%84%8F%E8%AE%BE%E8%AE%A1 HTTP/1.1" 200 726 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 114803
123.139.94.45 - - [17/Oct/2025:23:19:03 +0800] "GET /api/templates/%E5%89%8D%E7%AB%AF%E5%BC%80%E5%8F%91 HTTP/1.1" 200 18538 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 115348
123.139.94.45 - - [17/Oct/2025:23:19:05 +0800] "GET /api/templates/%E5%86%85%E5%AE%B9%E5%88%9B%E4%BD%9C HTTP/1.1" 200 3561 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 115061
123.139.94.45 - - [17/Oct/2025:23:19:06 +0800] "GET /api/templates/%E5%B8%82%E5%9C%BA%E8%90%A5%E9%94%80 HTTP/1.1" 200 1666 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 114093
123.139.94.45 - - [17/Oct/2025:23:19:08 +0800] "GET /api/templates/%E5%85%A8%E6%A0%88%E5%BC%80%E5%8F%91 HTTP/1.1" 200 9397 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 114110
123.139.94.45 - - [17/Oct/2025:23:19:09 +0800] "GET /api/templates/%E4%BA%BA%E5%8A%9B%E8%B5%84%E6%BA%90 HTTP/1.1" 200 1662 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 114117
123.139.94.45 - - [17/Oct/2025:23:19:09 +0800] "GET /api/templates/%E4%BA%A7%E5%93%81%E7%AE%A1%E7%90%86 HTTP/1.1" 200 9044 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 114366
123.139.94.45 - - [17/Oct/2025:23:19:10 +0800] "GET /api/templates/%E4%B8%93%E4%B8%9A%E6%9C%8D%E5%8A%A1 HTTP/1.1" 200 2702 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 112490
123.139.94.45 - - [17/Oct/2025:23:19:10 +0800] "GET /api/templates/%E9%80%9A%E7%94%A8 HTTP/1.1" 200 1110 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 104118
123.139.94.45 - - [17/Oct/2025:23:19:12 +0800] "GET /api/templates/all HTTP/1.1" 200 217077 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 524874
123.139.94.45 - - [17/Oct/2025:23:19:45 +0800] "GET /api/templates/%E9%80%9A%E7%94%A8 HTTP/1.1" 200 1110 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 117892
123.139.94.45 - - [17/Oct/2025:23:19:59 +0800] "GET /api/templates/%E4%BA%BA%E5%8A%9B%E8%B5%84%E6%BA%90 HTTP/1.1" 200 1662 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 117654
123.139.94.45 - - [17/Oct/2025:23:20:00 +0800] "GET /api/templates/%E4%BA%A7%E5%93%81%E7%AE%A1%E7%90%86 HTTP/1.1" 200 9044 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 119177
123.139.94.45 - - [17/Oct/2025:23:20:42 +0800] "GET /api/templates/%E9%80%9A%E7%94%A8 HTTP/1.1" 200 1110 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 113853
123.139.94.45 - - [17/Oct/2025:23:22:20 +0800] "GET /api/templates/%E4%BA%BA%E5%8A%9B%E8%B5%84%E6%BA%90 HTTP/1.1" 200 1662 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 117832
123.139.94.45 - - [17/Oct/2025:23:22:28 +0800] "GET /api/templates/%E5%85%AC%E5%8A%A1%E5%91%98%E8%80%83%E8%AF%95 HTTP/1.1" 200 29843 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 171743
123.139.94.45 - - [17/Oct/2025:23:22:44 +0800] "GET /api/templates/%E5%85%A8%E6%A0%88%E5%BC%80%E5%8F%91 HTTP/1.1" 200 9397 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 113009

View File

@@ -7402,3 +7402,69 @@ werkzeug.routing.exceptions.BuildError: Could not build url for endpoint 'meal_p
[2025-10-17 14:35:42 +0800] [1842] [WARNING] Invalid request from ip=37.60.241.154: Invalid HTTP request line: 'SSH-2.0-OpenSSH'
[2025-10-17 17:15:48 +0800] [17673] [WARNING] Invalid request from ip=88.214.50.115: Invalid HTTP request line: '\x03\x00\x00/*à\x00\x00\x00\x00\x00Cookie: mstshash=Administr'
[2025-10-17 19:18:52 +0800] [17671] [WARNING] Invalid request from ip=79.124.49.210: Invalid HTTP request line: '\x03\x00\x00/*à\x00\x00\x00\x00\x00Cookie: mstshash=Administr'
[2025-10-17 23:09:04 +0800] [23219] [INFO] Starting gunicorn 21.2.0
[2025-10-17 23:10:29 +0800] [1842] [INFO] Worker exiting (pid: 1842)
[2025-10-17 23:10:29 +0800] [1843] [INFO] Worker exiting (pid: 1843)
[2025-10-17 23:10:29 +0800] [17673] [INFO] Worker exiting (pid: 17673)
[2025-10-17 23:10:29 +0800] [9312] [INFO] Handling signal: term
[2025-10-17 23:10:29 +0800] [17671] [INFO] Worker exiting (pid: 17671)
[2025-10-17 23:10:29 +0800] [17674] [INFO] Worker exiting (pid: 17674)
[2025-10-17 23:10:29 +0800] [9312] [ERROR] Worker (pid:17673) was sent SIGTERM!
[2025-10-17 23:10:29 +0800] [9312] [ERROR] Worker (pid:1842) was sent SIGTERM!
[2025-10-17 23:10:29 +0800] [9312] [ERROR] Worker (pid:1843) was sent SIGTERM!
[2025-10-17 23:10:29 +0800] [9312] [INFO] Shutting down: Master
[2025-10-17 23:11:03 +0800] [16423] [INFO] Starting gunicorn 21.2.0
[2025-10-17 23:11:03 +0800] [16423] [INFO] Gunicorn服务器启动中...
[2025-10-17 23:11:03 +0800] [16423] [INFO] Listening at: http://0.0.0.0:5002 (16423)
[2025-10-17 23:11:03 +0800] [16423] [INFO] Using worker: sync
[2025-10-17 23:11:03 +0800] [16423] [INFO] 工作进程 [booting] 即将启动
[2025-10-17 23:11:03 +0800] [16434] [INFO] Booting worker with pid: 16434
[2025-10-17 23:11:03 +0800] [16434] [INFO] 工作进程 16434 已启动
[2025-10-17 23:11:03 +0800] [16434] [INFO] 工作进程 16434 初始化完成
[2025-10-17 23:11:03 +0800] [16423] [INFO] 工作进程 [booting] 即将启动
[2025-10-17 23:11:03 +0800] [16435] [INFO] Booting worker with pid: 16435
[2025-10-17 23:11:03 +0800] [16435] [INFO] 工作进程 16435 已启动
[2025-10-17 23:11:03 +0800] [16435] [INFO] 工作进程 16435 初始化完成
[2025-10-17 23:11:03 +0800] [16423] [INFO] 工作进程 [booting] 即将启动
[2025-10-17 23:11:03 +0800] [16436] [INFO] Booting worker with pid: 16436
[2025-10-17 23:11:03 +0800] [16436] [INFO] 工作进程 16436 已启动
[2025-10-17 23:11:03 +0800] [16423] [INFO] 工作进程 [booting] 即将启动
[2025-10-17 23:11:03 +0800] [16436] [INFO] 工作进程 16436 初始化完成
[2025-10-17 23:11:03 +0800] [16437] [INFO] Booting worker with pid: 16437
[2025-10-17 23:11:03 +0800] [16437] [INFO] 工作进程 16437 已启动
[2025-10-17 23:11:03 +0800] [16437] [INFO] 工作进程 16437 初始化完成
[2025-10-17 23:11:03 +0800] [16423] [INFO] 工作进程 [booting] 即将启动
[2025-10-17 23:11:03 +0800] [16438] [INFO] Booting worker with pid: 16438
[2025-10-17 23:11:03 +0800] [16438] [INFO] 工作进程 16438 已启动
[2025-10-17 23:11:03 +0800] [16438] [INFO] 工作进程 16438 初始化完成
[2025-10-17 23:17:03 +0800] [16434] [INFO] Worker exiting (pid: 16434)
[2025-10-17 23:17:03 +0800] [16423] [INFO] Handling signal: term
[2025-10-17 23:17:03 +0800] [16435] [INFO] Worker exiting (pid: 16435)
[2025-10-17 23:17:03 +0800] [16436] [INFO] Worker exiting (pid: 16436)
[2025-10-17 23:17:03 +0800] [16437] [INFO] Worker exiting (pid: 16437)
[2025-10-17 23:17:03 +0800] [16438] [INFO] Worker exiting (pid: 16438)
[2025-10-17 23:17:04 +0800] [16423] [INFO] Shutting down: Master
[2025-10-17 23:17:26 +0800] [11425] [INFO] Starting gunicorn 21.2.0
[2025-10-17 23:17:26 +0800] [11425] [INFO] Gunicorn服务器启动中...
[2025-10-17 23:17:26 +0800] [11425] [INFO] Listening at: http://0.0.0.0:5002 (11425)
[2025-10-17 23:17:26 +0800] [11425] [INFO] Using worker: sync
[2025-10-17 23:17:26 +0800] [11425] [INFO] 工作进程 [booting] 即将启动
[2025-10-17 23:17:26 +0800] [11434] [INFO] Booting worker with pid: 11434
[2025-10-17 23:17:26 +0800] [11434] [INFO] 工作进程 11434 已启动
[2025-10-17 23:17:26 +0800] [11434] [INFO] 工作进程 11434 初始化完成
[2025-10-17 23:17:26 +0800] [11425] [INFO] 工作进程 [booting] 即将启动
[2025-10-17 23:17:26 +0800] [11435] [INFO] Booting worker with pid: 11435
[2025-10-17 23:17:26 +0800] [11435] [INFO] 工作进程 11435 已启动
[2025-10-17 23:17:26 +0800] [11435] [INFO] 工作进程 11435 初始化完成
[2025-10-17 23:17:27 +0800] [11425] [INFO] 工作进程 [booting] 即将启动
[2025-10-17 23:17:27 +0800] [11439] [INFO] Booting worker with pid: 11439
[2025-10-17 23:17:27 +0800] [11439] [INFO] 工作进程 11439 已启动
[2025-10-17 23:17:27 +0800] [11439] [INFO] 工作进程 11439 初始化完成
[2025-10-17 23:17:27 +0800] [11425] [INFO] 工作进程 [booting] 即将启动
[2025-10-17 23:17:27 +0800] [11440] [INFO] Booting worker with pid: 11440
[2025-10-17 23:17:27 +0800] [11440] [INFO] 工作进程 11440 已启动
[2025-10-17 23:17:27 +0800] [11440] [INFO] 工作进程 11440 初始化完成
[2025-10-17 23:17:27 +0800] [11425] [INFO] 工作进程 [booting] 即将启动
[2025-10-17 23:17:27 +0800] [11444] [INFO] Booting worker with pid: 11444
[2025-10-17 23:17:27 +0800] [11444] [INFO] 工作进程 11444 已启动
[2025-10-17 23:17:27 +0800] [11444] [INFO] 工作进程 11444 初始化完成

View File

@@ -177,13 +177,24 @@ def get_template_icon(category):
@main_bp.route('/', methods=['GET', 'POST'])
def index():
form = PromptForm()
templates = PromptTemplate.query.all()
# 获取所有可用的分类选项
industries = sorted(set(t.industry for t in templates if t.industry))
professions = sorted(set(t.profession for t in templates if t.profession))
categories = sorted(set(t.category for t in templates if t.category))
sub_categories = sorted(set(t.sub_category for t in templates if t.sub_category))
# 获取所有模板用于分类选项
all_templates = PromptTemplate.query.all()
# 默认只显示"通用"分类的模板,提升加载性能
templates = PromptTemplate.query.filter_by(category="通用").all()
# 获取所有可用的分类选项(基于所有模板)
industries = sorted(set(t.industry for t in all_templates if t.industry))
professions = sorted(set(t.profession for t in all_templates if t.profession))
# 特殊处理分类排序,让"通用"分类排在第一位
all_categories = sorted(set(t.category for t in all_templates if t.category))
categories = []
if "通用" in all_categories:
categories.append("通用")
all_categories.remove("通用")
categories.extend(all_categories)
sub_categories = sorted(set(t.sub_category for t in all_templates if t.sub_category))
if form.validate_on_submit():
template_id = request.form.get('template_id')
@@ -231,6 +242,35 @@ def index():
professions=professions, categories=categories,
sub_categories=sub_categories)
@main_bp.route('/api/templates/<category>')
def get_templates_by_category(category):
"""根据分类获取模板的API端点"""
if category == "all":
templates = PromptTemplate.query.all()
else:
templates = PromptTemplate.query.filter_by(category=category).all()
# 将模板转换为字典格式
template_list = []
for template in templates:
template_dict = {
'id': template.id,
'name': template.name,
'description': template.description,
'category': template.category,
'industry': template.industry,
'profession': template.profession,
'sub_category': template.sub_category,
'system_prompt': template.system_prompt
}
template_list.append(template_dict)
return jsonify({
'success': True,
'templates': template_list,
'count': len(template_list)
})
@main_bp.route('/prompt/<int:prompt_id>')
def show_prompt(prompt_id):
prompt = Prompt.query.get_or_404(prompt_id)

View File

@@ -57,9 +57,13 @@
<!-- 场景分类 -->
<div class="sidebar-categories">
<div class="category-tabs">
<div class="tab active" data-category="all">全部</div>
<div class="tab" data-category="all">全部</div>
{% for category in categories %}
{% if category == "通用" %}
<div class="tab active" data-category="{{ category }}">{{ category }}</div>
{% else %}
<div class="tab" data-category="{{ category }}">{{ category }}</div>
{% endif %}
{% endfor %}
</div>
</div>
@@ -2602,6 +2606,45 @@
.action-section {
animation: slideInUp 0.6s ease-out 0.5s both;
}
/* 加载状态样式 */
.loading-spinner {
text-align: center;
padding: 2rem;
color: #666;
font-size: 1.1rem;
}
.loading-spinner::before {
content: '';
display: inline-block;
width: 20px;
height: 20px;
border: 2px solid #f3f3f3;
border-top: 2px solid #007bff;
border-radius: 50%;
animation: spin 1s linear infinite;
margin-right: 10px;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.error-message {
text-align: center;
padding: 2rem;
color: #dc3545;
font-size: 1.1rem;
}
.no-templates {
text-align: center;
padding: 2rem;
color: #666;
font-size: 1.1rem;
}
</style>
<script>
@@ -2714,7 +2757,13 @@ document.addEventListener('DOMContentLoaded', function() {
professionFilter.value = 'all';
subCategoryFilter.value = 'all';
document.querySelector('.tab.active').classList.remove('active');
document.querySelector('[data-category="all"]').classList.add('active');
// 默认选中通用分类而不是全部
const generalTab = document.querySelector('[data-category="通用"]');
if (generalTab) {
generalTab.classList.add('active');
} else {
document.querySelector('[data-category="all"]').classList.add('active');
}
filterTemplates();
}
@@ -2727,12 +2776,164 @@ document.addEventListener('DOMContentLoaded', function() {
tab.addEventListener('click', () => {
tabs.forEach(t => t.classList.remove('active'));
tab.classList.add('active');
filterTemplates();
// 动态加载分类模板
const category = tab.dataset.category;
loadTemplatesByCategory(category);
});
});
// 初始化筛选
filterTemplates();
// 动态加载分类模板的函数
function loadTemplatesByCategory(category) {
// 显示加载状态
const templateGrid = document.querySelector('.template-grid');
if (templateGrid) {
templateGrid.innerHTML = '<div class="loading-spinner">正在加载模板...</div>';
}
// 发送AJAX请求获取模板
fetch(`/api/templates/${category}`)
.then(response => response.json())
.then(data => {
if (data.success) {
renderTemplates(data.templates);
} else {
console.error('加载模板失败');
}
})
.catch(error => {
console.error('加载模板出错:', error);
templateGrid.innerHTML = '<div class="error-message">加载失败,请刷新页面重试</div>';
});
}
// 渲染模板到页面
function renderTemplates(templates) {
const templateGrid = document.querySelector('.template-grid');
if (!templateGrid) return;
if (templates.length === 0) {
templateGrid.innerHTML = '<div class="no-templates">该分类下暂无模板</div>';
return;
}
let html = '';
templates.forEach(template => {
html += `
<div class="template-card"
data-category="${template.category || ''}"
data-industry="${template.industry || ''}"
data-profession="${template.profession || ''}"
data-subcategory="${template.sub_category || ''}"
data-template-id="${template.id}"
data-template-content="${template.system_prompt}">
<div class="template-header">
<div class="template-icon">
<i class="fas fa-star"></i>
</div>
<h3>${template.name}</h3>
</div>
<div class="template-badges">
<span class="badge badge-primary">${template.category || '未分类'}</span>
</div>
<div class="template-content">
<p class="template-description">${template.description || '暂无描述'}</p>
<div class="template-meta">
<span class="usage-count">0 次使用</span>
<span class="difficulty-level">初级</span>
</div>
<div class="template-fields">
<div class="field">
<span class="field-label">行业:</span>
<span class="field-value">${template.industry || '未设置'}</span>
</div>
<div class="field">
<span class="field-label">职业:</span>
<span class="field-value">${template.profession || '未设置'}</span>
</div>
<div class="field">
<span class="field-label">领域:</span>
<span class="field-value">${template.sub_category || '未设置'}</span>
</div>
</div>
</div>
<div class="template-actions">
<input type="radio" name="template_id" value="${template.id}" id="template_${template.id}">
<label for="template_${template.id}" class="template-label">
<span class="radio-custom"></span>
<span class="label-text">选择此模板</span>
</label>
<button type="button" class="btn-copy" onclick="copyText('${template.system_prompt.replace(/'/g, "\\'")}')">
<i class="fas fa-copy"></i>
复制内容
</button>
</div>
<div class="template-preview" style="display: none;">
<div class="preview-header">
<h4>${template.name}</h4>
<button type="button" class="preview-close">
<i class="fas fa-times"></i>
</button>
</div>
<div class="preview-content">
<h5>模板内容</h5>
<div class="preview-text">${template.system_prompt}</div>
<h5>使用说明</h5>
<div class="preview-description">${template.description || '暂无使用说明'}</div>
</div>
</div>
</div>
`;
});
templateGrid.innerHTML = html;
// 重新绑定事件
initializeTemplateEvents();
}
// 初始化模板事件
function initializeTemplateEvents() {
// 绑定模板选择事件
document.querySelectorAll('input[name="template_id"]').forEach(radio => {
radio.addEventListener('change', function() {
document.querySelectorAll('.template-card').forEach(card => {
card.classList.remove('selected');
});
if (this.checked) {
this.closest('.template-card').classList.add('selected');
}
});
});
// 绑定复制按钮事件
document.querySelectorAll('.btn-copy').forEach(button => {
button.addEventListener('click', function(e) {
e.preventDefault();
const text = this.closest('.template-card').dataset.templateContent;
copyText(text);
});
});
}
// 初始化筛选 - 默认选中通用分类
// 确保通用分类被选中
const generalTab = document.querySelector('[data-category="通用"]');
if (generalTab) {
// 移除所有active类
document.querySelectorAll('.tab').forEach(tab => tab.classList.remove('active'));
// 选中通用分类
generalTab.classList.add('active');
}
// 页面初始加载时不需要调用filterTemplates因为模板已经通过服务器端筛选了
});
function copyText(text) {
@@ -3788,7 +3989,13 @@ function performSearchAndFilter() {
document.getElementById('professionFilter').value = 'all';
document.getElementById('subCategoryFilter').value = 'all';
document.querySelectorAll('.tab').forEach(tab => tab.classList.remove('active'));
document.querySelector('[data-category="all"]').classList.add('active');
// 默认选中通用分类而不是全部
const generalTab = document.querySelector('[data-category="通用"]');
if (generalTab) {
generalTab.classList.add('active');
} else {
document.querySelector('[data-category="all"]').classList.add('active');
}
performSearchAndFilter();
});
}