diff --git a/logs/access.log b/logs/access.log index 0ea576c..41c2155 100644 --- a/logs/access.log +++ b/logs/access.log @@ -57,3 +57,84 @@ 192.168.0.114 - - [11/Oct/2025:21:57:19 +0300] "GET /static/script.js HTTP/1.1" 304 0 "http://192.168.0.205:8781/fg_scan" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2353 192.168.0.114 - - [11/Oct/2025:21:57:19 +0300] "GET /static/style.css HTTP/1.1" 304 0 "http://192.168.0.205:8781/fg_scan" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2227 192.168.0.114 - - [11/Oct/2025:21:57:19 +0300] "GET /static/css/base.css HTTP/1.1" 304 0 "http://192.168.0.205:8781/fg_scan" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2364 +192.168.0.114 - - [11/Oct/2025:23:42:48 +0300] "GET /print_module HTTP/1.1" 200 69964 "http://192.168.0.205:8781/etichete" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 101179 +192.168.0.114 - - [11/Oct/2025:23:42:49 +0300] "GET /favicon.ico HTTP/1.1" 404 207 "http://192.168.0.205:8781/print_module" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2436 +192.168.0.114 - - [11/Oct/2025:23:42:49 +0300] "GET /get_unprinted_orders HTTP/1.1" 200 3 "http://192.168.0.205:8781/print_module" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 21253 +192.168.0.114 - - [11/Oct/2025:23:42:56 +0300] "GET /get_unprinted_orders HTTP/1.1" 200 3 "http://192.168.0.205:8781/print_module" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 21004 +192.168.0.114 - - [11/Oct/2025:23:42:58 +0300] "GET /etichete HTTP/1.1" 302 207 "http://192.168.0.205:8781/print_module" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 4062 +192.168.0.114 - - [11/Oct/2025:23:42:58 +0300] "GET /dashboard HTTP/1.1" 302 189 "http://192.168.0.205:8781/print_module" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2067 +192.168.0.114 - - [11/Oct/2025:23:42:58 +0300] "GET / HTTP/1.1" 200 1189 "http://192.168.0.205:8781/print_module" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 39733 +192.168.0.114 - - [11/Oct/2025:23:42:58 +0300] "GET /static/style.css HTTP/1.1" 304 0 "http://192.168.0.205:8781/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 14441 +192.168.0.114 - - [11/Oct/2025:23:42:58 +0300] "GET /static/css/login.css HTTP/1.1" 304 0 "http://192.168.0.205:8781/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 19734 +192.168.0.114 - - [11/Oct/2025:23:42:58 +0300] "GET /static/css/base.css HTTP/1.1" 304 0 "http://192.168.0.205:8781/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 36719 +192.168.0.114 - - [11/Oct/2025:23:42:58 +0300] "GET /static/script.js HTTP/1.1" 304 0 "http://192.168.0.205:8781/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 32429 +192.168.0.114 - - [11/Oct/2025:23:42:58 +0300] "GET /static/logo_login.jpg HTTP/1.1" 304 0 "http://192.168.0.205:8781/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 36409 +192.168.0.114 - - [11/Oct/2025:23:43:02 +0300] "POST / HTTP/1.1" 302 207 "http://192.168.0.205:8781/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 10979 +192.168.0.114 - - [11/Oct/2025:23:43:02 +0300] "GET /dashboard HTTP/1.1" 200 2527 "http://192.168.0.205:8781/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 39462 +192.168.0.114 - - [11/Oct/2025:23:43:02 +0300] "GET /static/css/base.css HTTP/1.1" 304 0 "http://192.168.0.205:8781/dashboard" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2631 +192.168.0.114 - - [11/Oct/2025:23:43:02 +0300] "GET /static/style.css HTTP/1.1" 304 0 "http://192.168.0.205:8781/dashboard" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 3309 +192.168.0.114 - - [11/Oct/2025:23:43:02 +0300] "GET /static/script.js HTTP/1.1" 304 0 "http://192.168.0.205:8781/dashboard" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2279 +192.168.0.114 - - [11/Oct/2025:23:43:02 +0300] "GET /static/scan_me.jpg HTTP/1.1" 304 0 "http://192.168.0.205:8781/dashboard" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 28541 +192.168.0.114 - - [11/Oct/2025:23:43:04 +0300] "GET /quality HTTP/1.1" 200 8292 "http://192.168.0.205:8781/dashboard" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 41498 +192.168.0.114 - - [11/Oct/2025:23:43:04 +0300] "GET /static/css/base.css HTTP/1.1" 304 0 "http://192.168.0.205:8781/quality" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2483 +192.168.0.114 - - [11/Oct/2025:23:43:04 +0300] "GET /static/script.js HTTP/1.1" 304 0 "http://192.168.0.205:8781/quality" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2184 +192.168.0.114 - - [11/Oct/2025:23:43:04 +0300] "GET /static/scan_me.jpg HTTP/1.1" 304 0 "http://192.168.0.205:8781/quality" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 12446 +192.168.0.114 - - [11/Oct/2025:23:43:04 +0300] "GET /static/style.css HTTP/1.1" 304 0 "http://192.168.0.205:8781/quality" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 28778 +192.168.0.114 - - [11/Oct/2025:23:43:14 +0300] "GET /warehouse HTTP/1.1" 200 2424 "http://192.168.0.205:8781/dashboard" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 8261 +192.168.0.114 - - [11/Oct/2025:23:43:14 +0300] "GET /static/scan_me.jpg HTTP/1.1" 304 0 "http://192.168.0.205:8781/warehouse" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2342 +192.168.0.114 - - [11/Oct/2025:23:43:14 +0300] "GET /static/script.js HTTP/1.1" 304 0 "http://192.168.0.205:8781/warehouse" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2463 +192.168.0.114 - - [11/Oct/2025:23:43:14 +0300] "GET /static/css/base.css HTTP/1.1" 304 0 "http://192.168.0.205:8781/warehouse" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2320 +192.168.0.114 - - [11/Oct/2025:23:43:14 +0300] "GET /static/style.css HTTP/1.1" 304 0 "http://192.168.0.205:8781/warehouse" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2891 +192.168.0.114 - - [11/Oct/2025:23:43:17 +0300] "GET /store_articles HTTP/1.1" 200 1342 "http://192.168.0.205:8781/warehouse" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 5528 +192.168.0.114 - - [11/Oct/2025:23:43:17 +0300] "GET /static/css/base.css HTTP/1.1" 304 0 "http://192.168.0.205:8781/store_articles" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2352 +192.168.0.114 - - [11/Oct/2025:23:43:17 +0300] "GET /static/style.css HTTP/1.1" 304 0 "http://192.168.0.205:8781/store_articles" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2304 +192.168.0.114 - - [11/Oct/2025:23:43:17 +0300] "GET /static/scan_me.jpg HTTP/1.1" 304 0 "http://192.168.0.205:8781/store_articles" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2626 +192.168.0.114 - - [11/Oct/2025:23:43:17 +0300] "GET /static/script.js HTTP/1.1" 304 0 "http://192.168.0.205:8781/store_articles" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2817 +192.168.0.114 - - [11/Oct/2025:23:43:31 +0300] "GET /create_locations HTTP/1.1" 200 25693 "http://192.168.0.205:8781/warehouse" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 41369 +192.168.0.114 - - [11/Oct/2025:23:43:31 +0300] "GET /static/style.css HTTP/1.1" 304 0 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2231 +192.168.0.114 - - [11/Oct/2025:23:43:31 +0300] "GET /static/css/warehouse.css HTTP/1.1" 200 0 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 3633 +192.168.0.114 - - [11/Oct/2025:23:43:31 +0300] "GET /static/css/base.css HTTP/1.1" 304 0 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 5048 +192.168.0.114 - - [11/Oct/2025:23:43:31 +0300] "GET /static/scan_me.jpg HTTP/1.1" 304 0 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2353 +192.168.0.114 - - [11/Oct/2025:23:43:31 +0300] "GET /static/qz-tray.js HTTP/1.1" 304 0 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 3234 +192.168.0.114 - - [11/Oct/2025:23:43:31 +0300] "GET /static/JsBarcode.all.min.js HTTP/1.1" 304 0 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 5169 +192.168.0.114 - - [11/Oct/2025:23:43:31 +0300] "GET /static/html2canvas.min.js HTTP/1.1" 304 0 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2237 +192.168.0.114 - - [11/Oct/2025:23:43:31 +0300] "GET /static/script.js HTTP/1.1" 304 0 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2198 +192.168.0.114 - - [11/Oct/2025:23:43:53 +0300] "POST /create_locations HTTP/1.1" 200 26208 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 74309 +192.168.0.114 - - [11/Oct/2025:23:43:53 +0300] "GET /static/css/base.css HTTP/1.1" 304 0 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2265 +192.168.0.114 - - [11/Oct/2025:23:43:53 +0300] "GET /static/css/warehouse.css HTTP/1.1" 304 0 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2314 +192.168.0.114 - - [11/Oct/2025:23:43:53 +0300] "GET /static/style.css HTTP/1.1" 304 0 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 3017 +192.168.0.114 - - [11/Oct/2025:23:43:53 +0300] "GET /static/qz-tray.js HTTP/1.1" 304 0 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 3191 +192.168.0.114 - - [11/Oct/2025:23:43:53 +0300] "GET /static/scan_me.jpg HTTP/1.1" 304 0 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2214 +192.168.0.114 - - [11/Oct/2025:23:43:53 +0300] "GET /static/JsBarcode.all.min.js HTTP/1.1" 304 0 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2868 +192.168.0.114 - - [11/Oct/2025:23:43:53 +0300] "GET /static/html2canvas.min.js HTTP/1.1" 304 0 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2161 +192.168.0.114 - - [11/Oct/2025:23:43:53 +0300] "GET /static/script.js HTTP/1.1" 304 0 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2297 +192.168.0.114 - - [11/Oct/2025:23:44:24 +0300] "POST /generate_location_label_pdf HTTP/1.1" 200 1736 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 12409 +192.168.0.114 - - [11/Oct/2025:23:44:55 +0300] "POST /delete_location HTTP/1.1" 200 70 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 25679 +192.168.0.114 - - [11/Oct/2025:23:44:56 +0300] "POST /create_locations HTTP/1.1" 200 26208 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 44866 +192.168.0.114 - - [11/Oct/2025:23:44:56 +0300] "GET /static/css/base.css HTTP/1.1" 304 0 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2302 +192.168.0.114 - - [11/Oct/2025:23:44:56 +0300] "GET /static/style.css HTTP/1.1" 304 0 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 5024 +192.168.0.114 - - [11/Oct/2025:23:44:56 +0300] "GET /static/JsBarcode.all.min.js HTTP/1.1" 304 0 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2165 +192.168.0.114 - - [11/Oct/2025:23:44:56 +0300] "GET /static/qz-tray.js HTTP/1.1" 304 0 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2380 +192.168.0.114 - - [11/Oct/2025:23:44:56 +0300] "GET /static/css/warehouse.css HTTP/1.1" 304 0 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2367 +192.168.0.114 - - [11/Oct/2025:23:44:56 +0300] "GET /static/html2canvas.min.js HTTP/1.1" 304 0 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2227 +192.168.0.114 - - [11/Oct/2025:23:44:56 +0300] "GET /static/script.js HTTP/1.1" 304 0 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2281 +192.168.0.114 - - [11/Oct/2025:23:44:56 +0300] "GET /static/scan_me.jpg HTTP/1.1" 304 0 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 14504 +192.168.0.114 - - [11/Oct/2025:23:45:04 +0300] "POST /create_locations HTTP/1.1" 200 26217 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 75007 +192.168.0.114 - - [11/Oct/2025:23:45:04 +0300] "GET /static/JsBarcode.all.min.js HTTP/1.1" 304 0 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2167 +192.168.0.114 - - [11/Oct/2025:23:45:04 +0300] "GET /static/scan_me.jpg HTTP/1.1" 304 0 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2189 +192.168.0.114 - - [11/Oct/2025:23:45:04 +0300] "GET /static/style.css HTTP/1.1" 304 0 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 5672 +192.168.0.114 - - [11/Oct/2025:23:45:04 +0300] "GET /static/css/base.css HTTP/1.1" 304 0 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 6102 +192.168.0.114 - - [11/Oct/2025:23:45:04 +0300] "GET /static/css/warehouse.css HTTP/1.1" 304 0 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 5486 +192.168.0.114 - - [11/Oct/2025:23:45:04 +0300] "GET /static/qz-tray.js HTTP/1.1" 304 0 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2273 +192.168.0.114 - - [11/Oct/2025:23:45:04 +0300] "GET /static/html2canvas.min.js HTTP/1.1" 304 0 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2247 +192.168.0.114 - - [11/Oct/2025:23:45:04 +0300] "GET /static/script.js HTTP/1.1" 304 0 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2193 +192.168.0.114 - - [11/Oct/2025:23:45:22 +0300] "POST /delete_location HTTP/1.1" 200 70 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 7534 +192.168.0.114 - - [11/Oct/2025:23:45:23 +0300] "POST /create_locations HTTP/1.1" 200 26208 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 14515 +192.168.0.114 - - [11/Oct/2025:23:45:23 +0300] "GET /static/style.css HTTP/1.1" 304 0 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2204 +192.168.0.114 - - [11/Oct/2025:23:45:23 +0300] "GET /static/css/base.css HTTP/1.1" 304 0 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 3061 +192.168.0.114 - - [11/Oct/2025:23:45:23 +0300] "GET /static/css/warehouse.css HTTP/1.1" 304 0 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2244 +192.168.0.114 - - [11/Oct/2025:23:45:23 +0300] "GET /static/scan_me.jpg HTTP/1.1" 304 0 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2511 +192.168.0.114 - - [11/Oct/2025:23:45:23 +0300] "GET /static/JsBarcode.all.min.js HTTP/1.1" 304 0 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2814 +192.168.0.114 - - [11/Oct/2025:23:45:23 +0300] "GET /static/qz-tray.js HTTP/1.1" 304 0 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2176 +192.168.0.114 - - [11/Oct/2025:23:45:23 +0300] "GET /static/script.js HTTP/1.1" 304 0 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2165 +192.168.0.114 - - [11/Oct/2025:23:45:23 +0300] "GET /static/html2canvas.min.js HTTP/1.1" 304 0 "http://192.168.0.205:8781/create_locations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" 2216 diff --git a/logs/error.log b/logs/error.log index 62f0524..692d8c4 100644 --- a/logs/error.log +++ b/logs/error.log @@ -52,3 +52,87 @@ [2025-10-11 21:58:19 +0300] [11531] [INFO] Worker exiting (pid: 11531) [2025-10-11 21:58:19 +0300] [11532] [INFO] Worker exiting (pid: 11532) [2025-10-11 21:58:20 +0300] [11502] [INFO] Shutting down: Master +[2025-10-11 23:41:31 +0300] [19040] [INFO] Starting gunicorn 23.0.0 +[2025-10-11 23:41:31 +0300] [19040] [INFO] Listening at: http://0.0.0.0:8781 (19040) +[2025-10-11 23:41:31 +0300] [19040] [INFO] Using worker: sync +[2025-10-11 23:41:31 +0300] [19040] [INFO] Trasabilitate Application server is ready. Listening on: [('0.0.0.0', 8781)] +[2025-10-11 23:41:31 +0300] [19040] [INFO] Worker spawned (pid: [booting]) +[2025-10-11 23:41:31 +0300] [19056] [INFO] Booting worker with pid: 19056 +[2025-10-11 23:41:31 +0300] [19056] [INFO] Worker spawned (pid: 19056) +[2025-10-11 23:41:31 +0300] [19040] [INFO] Worker spawned (pid: [booting]) +[2025-10-11 23:41:31 +0300] [19064] [INFO] Booting worker with pid: 19064 +[2025-10-11 23:41:31 +0300] [19064] [INFO] Worker spawned (pid: 19064) +[2025-10-11 23:41:31 +0300] [19040] [INFO] Worker spawned (pid: [booting]) +[2025-10-11 23:41:31 +0300] [19065] [INFO] Booting worker with pid: 19065 +[2025-10-11 23:41:31 +0300] [19065] [INFO] Worker spawned (pid: 19065) +[2025-10-11 23:41:31 +0300] [19040] [INFO] Worker spawned (pid: [booting]) +[2025-10-11 23:41:31 +0300] [19066] [INFO] Booting worker with pid: 19066 +[2025-10-11 23:41:31 +0300] [19066] [INFO] Worker spawned (pid: 19066) +[2025-10-11 23:41:31 +0300] [19040] [INFO] Worker spawned (pid: [booting]) +[2025-10-11 23:41:31 +0300] [19067] [INFO] Booting worker with pid: 19067 +[2025-10-11 23:41:31 +0300] [19067] [INFO] Worker spawned (pid: 19067) +[2025-10-11 23:41:31 +0300] [19040] [INFO] Worker spawned (pid: [booting]) +[2025-10-11 23:41:31 +0300] [19068] [INFO] Booting worker with pid: 19068 +[2025-10-11 23:41:31 +0300] [19068] [INFO] Worker spawned (pid: 19068) +[2025-10-11 23:41:31 +0300] [19040] [INFO] Worker spawned (pid: [booting]) +[2025-10-11 23:41:31 +0300] [19069] [INFO] Booting worker with pid: 19069 +[2025-10-11 23:41:31 +0300] [19069] [INFO] Worker spawned (pid: 19069) +[2025-10-11 23:41:31 +0300] [19040] [INFO] Worker spawned (pid: [booting]) +[2025-10-11 23:41:31 +0300] [19070] [INFO] Booting worker with pid: 19070 +[2025-10-11 23:41:31 +0300] [19070] [INFO] Worker spawned (pid: 19070) +[2025-10-11 23:41:31 +0300] [19040] [INFO] Worker spawned (pid: [booting]) +[2025-10-11 23:41:31 +0300] [19073] [INFO] Booting worker with pid: 19073 +[2025-10-11 23:41:31 +0300] [19073] [INFO] Worker spawned (pid: 19073) +[2025-10-11 23:46:18 +0300] [19040] [INFO] Handling signal: term +[2025-10-11 23:46:18 +0300] [19056] [INFO] Worker exiting (pid: 19056) +[2025-10-11 23:46:18 +0300] [19064] [INFO] Worker exiting (pid: 19064) +[2025-10-11 23:46:18 +0300] [19065] [INFO] Worker exiting (pid: 19065) +[2025-10-11 23:46:18 +0300] [19066] [INFO] Worker exiting (pid: 19066) +[2025-10-11 23:46:18 +0300] [19067] [INFO] Worker exiting (pid: 19067) +[2025-10-11 23:46:18 +0300] [19069] [INFO] Worker exiting (pid: 19069) +[2025-10-11 23:46:18 +0300] [19068] [INFO] Worker exiting (pid: 19068) +[2025-10-11 23:46:18 +0300] [19070] [INFO] Worker exiting (pid: 19070) +[2025-10-11 23:46:19 +0300] [19073] [INFO] Worker exiting (pid: 19073) +[2025-10-11 23:46:20 +0300] [19040] [INFO] Shutting down: Master +[2025-10-12 00:03:31 +0300] [20372] [INFO] Starting gunicorn 23.0.0 +[2025-10-12 00:03:31 +0300] [20372] [INFO] Listening at: http://0.0.0.0:8781 (20372) +[2025-10-12 00:03:31 +0300] [20372] [INFO] Using worker: sync +[2025-10-12 00:03:31 +0300] [20372] [INFO] Trasabilitate Application server is ready. Listening on: [('0.0.0.0', 8781)] +[2025-10-12 00:03:31 +0300] [20372] [INFO] Worker spawned (pid: [booting]) +[2025-10-12 00:03:31 +0300] [20395] [INFO] Booting worker with pid: 20395 +[2025-10-12 00:03:31 +0300] [20395] [INFO] Worker spawned (pid: 20395) +[2025-10-12 00:03:31 +0300] [20372] [INFO] Worker spawned (pid: [booting]) +[2025-10-12 00:03:31 +0300] [20396] [INFO] Booting worker with pid: 20396 +[2025-10-12 00:03:31 +0300] [20396] [INFO] Worker spawned (pid: 20396) +[2025-10-12 00:03:31 +0300] [20372] [INFO] Worker spawned (pid: [booting]) +[2025-10-12 00:03:31 +0300] [20397] [INFO] Booting worker with pid: 20397 +[2025-10-12 00:03:31 +0300] [20397] [INFO] Worker spawned (pid: 20397) +[2025-10-12 00:03:31 +0300] [20372] [INFO] Worker spawned (pid: [booting]) +[2025-10-12 00:03:31 +0300] [20398] [INFO] Booting worker with pid: 20398 +[2025-10-12 00:03:31 +0300] [20398] [INFO] Worker spawned (pid: 20398) +[2025-10-12 00:03:31 +0300] [20372] [INFO] Worker spawned (pid: [booting]) +[2025-10-12 00:03:31 +0300] [20399] [INFO] Booting worker with pid: 20399 +[2025-10-12 00:03:31 +0300] [20399] [INFO] Worker spawned (pid: 20399) +[2025-10-12 00:03:31 +0300] [20372] [INFO] Worker spawned (pid: [booting]) +[2025-10-12 00:03:31 +0300] [20400] [INFO] Booting worker with pid: 20400 +[2025-10-12 00:03:31 +0300] [20400] [INFO] Worker spawned (pid: 20400) +[2025-10-12 00:03:31 +0300] [20372] [INFO] Worker spawned (pid: [booting]) +[2025-10-12 00:03:31 +0300] [20401] [INFO] Booting worker with pid: 20401 +[2025-10-12 00:03:31 +0300] [20401] [INFO] Worker spawned (pid: 20401) +[2025-10-12 00:03:31 +0300] [20372] [INFO] Worker spawned (pid: [booting]) +[2025-10-12 00:03:31 +0300] [20402] [INFO] Booting worker with pid: 20402 +[2025-10-12 00:03:31 +0300] [20402] [INFO] Worker spawned (pid: 20402) +[2025-10-12 00:03:31 +0300] [20372] [INFO] Worker spawned (pid: [booting]) +[2025-10-12 00:03:31 +0300] [20403] [INFO] Booting worker with pid: 20403 +[2025-10-12 00:03:31 +0300] [20403] [INFO] Worker spawned (pid: 20403) +[2025-10-12 00:06:57 +0300] [20372] [INFO] Handling signal: term +[2025-10-12 00:06:57 +0300] [20395] [INFO] Worker exiting (pid: 20395) +[2025-10-12 00:06:57 +0300] [20396] [INFO] Worker exiting (pid: 20396) +[2025-10-12 00:06:57 +0300] [20398] [INFO] Worker exiting (pid: 20398) +[2025-10-12 00:06:57 +0300] [20397] [INFO] Worker exiting (pid: 20397) +[2025-10-12 00:06:57 +0300] [20399] [INFO] Worker exiting (pid: 20399) +[2025-10-12 00:06:57 +0300] [20400] [INFO] Worker exiting (pid: 20400) +[2025-10-12 00:06:57 +0300] [20401] [INFO] Worker exiting (pid: 20401) +[2025-10-12 00:06:57 +0300] [20402] [INFO] Worker exiting (pid: 20402) +[2025-10-12 00:06:57 +0300] [20403] [INFO] Worker exiting (pid: 20403) +[2025-10-12 00:06:58 +0300] [20372] [INFO] Shutting down: Master diff --git a/py_app/app.log b/py_app/app.log new file mode 100644 index 0000000..8cfc659 --- /dev/null +++ b/py_app/app.log @@ -0,0 +1,4 @@ + * Serving Flask app 'app' + * Debug mode: on +Address already in use +Port 8781 is in use by another program. Either identify and stop that program, or start the server with a different port. diff --git a/py_app/app/routes.py b/py_app/app/routes.py index 1d82037..64ffc17 100755 --- a/py_app/app/routes.py +++ b/py_app/app/routes.py @@ -2755,18 +2755,24 @@ def update_location(): from app.warehouse import update_location try: data = request.get_json() + print(f"DEBUG: Received update request data: {data}") + location_id = data.get('location_id') location_code = data.get('location_code') size = data.get('size') description = data.get('description') + print(f"DEBUG: Extracted values - ID: {location_id}, Code: {location_code}, Size: {size}, Description: {description}") + if not location_id or not location_code: return jsonify({'success': False, 'error': 'Location ID and code are required'}) result = update_location(location_id, location_code, size, description) + print(f"DEBUG: Update result: {result}") return jsonify(result) except Exception as e: + print(f"DEBUG: Update route exception: {e}") return jsonify({'success': False, 'error': str(e)}) @warehouse_bp.route('/delete_location', methods=['POST']) @@ -2774,15 +2780,20 @@ def delete_location(): from app.warehouse import delete_location_by_id try: data = request.get_json() + print(f"DEBUG: Received delete request data: {data}") + location_id = data.get('location_id') + print(f"DEBUG: Extracted location_id: {location_id} (type: {type(location_id)})") if not location_id: return jsonify({'success': False, 'error': 'Location ID is required'}) result = delete_location_by_id(location_id) + print(f"DEBUG: Delete result: {result}") return jsonify(result) except Exception as e: + print(f"DEBUG: Delete route exception: {e}") return jsonify({'success': False, 'error': str(e)}) diff --git a/py_app/app/templates/create_locations.html b/py_app/app/templates/create_locations.html index 6cf4ca0..525a1a1 100755 --- a/py_app/app/templates/create_locations.html +++ b/py_app/app/templates/create_locations.html @@ -2,6 +2,7 @@ {% block title %}Create Warehouse Locations{% endblock %} {% block head %} + {% endblock %} @@ -400,20 +401,72 @@ document.addEventListener('DOMContentLoaded', function() { // Edit button functionality editButton.addEventListener('click', function() { + console.log('Edit button clicked', selectedLocation); if (selectedLocation) { openEditModal(selectedLocation); + } else { + showNotification('❌ No location selected', 'error'); } }); // Delete button functionality deleteButton.addEventListener('click', function() { + console.log('Delete button clicked', selectedLocation); if (selectedLocation) { openDeleteModal(selectedLocation); + } else { + showNotification('❌ No location selected', 'error'); } }); // Initialize QZ Tray initializeQZTray(); + + // Handle edit form submission + document.getElementById('edit-form').addEventListener('submit', function(e) { + e.preventDefault(); + + const formData = new FormData(this); + const data = { + location_id: parseInt(formData.get('location_id')), + location_code: formData.get('location_code'), + size: formData.get('size') ? parseInt(formData.get('size')) : null, + description: formData.get('description') || null + }; + + console.log('Attempting to update location:', data); + + // Send update request + fetch("{{ url_for('warehouse.update_location') }}", { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify(data) + }) + .then(response => { + console.log('Update response status:', response.status); + if (!response.ok) { + throw new Error(`HTTP error! status: ${response.status}`); + } + return response.json(); + }) + .then(result => { + console.log('Update result:', result); + if (result.success) { + showNotification('✅ Location updated successfully!', 'success'); + closeEditModal(); + // Reload page to show changes + setTimeout(() => window.location.reload(), 1000); + } else { + showNotification('❌ Error updating location: ' + result.error, 'error'); + } + }) + .catch(error => { + console.error('Error:', error); + showNotification('❌ Error updating location: ' + error.message, 'error'); + }); + }); }); // Print barcode function with enhanced QZ Tray support @@ -437,7 +490,7 @@ async function printLocationBarcode() { printStatus.textContent = 'Generating label...'; // Generate PDF for the 4x8cm label - const response = await fetch('/generate_location_label_pdf', { + const response = await fetch("{{ url_for('warehouse.generate_location_label_pdf') }}", { method: 'POST', headers: { 'Content-Type': 'application/json', @@ -569,22 +622,31 @@ document.getElementById('edit-form').addEventListener('submit', function(e) { const formData = new FormData(this); const data = { - location_id: formData.get('location_id'), + location_id: parseInt(formData.get('location_id')), location_code: formData.get('location_code'), - size: formData.get('size'), - description: formData.get('description') + size: formData.get('size') ? parseInt(formData.get('size')) : null, + description: formData.get('description') || null }; + console.log('Attempting to update location:', data); + // Send update request - fetch('/update_location', { + fetch("{{ url_for('warehouse.update_location') }}", { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify(data) }) - .then(response => response.json()) + .then(response => { + console.log('Update response status:', response.status); + if (!response.ok) { + throw new Error(`HTTP error! status: ${response.status}`); + } + return response.json(); + }) .then(result => { + console.log('Update result:', result); if (result.success) { showNotification('✅ Location updated successfully!', 'success'); closeEditModal(); @@ -600,6 +662,46 @@ document.getElementById('edit-form').addEventListener('submit', function(e) { }); }); +// Handle delete confirmation +function confirmDelete() { + const locationId = document.getElementById('delete-confirm-id').textContent; + + console.log('Attempting to delete location ID:', locationId); + + // Send delete request + fetch("{{ url_for('warehouse.delete_location') }}", { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify({ + location_id: parseInt(locationId) + }) + }) + .then(response => { + console.log('Delete response status:', response.status); + if (!response.ok) { + throw new Error(`HTTP error! status: ${response.status}`); + } + return response.json(); + }) + .then(result => { + console.log('Delete result:', result); + if (result.success) { + showNotification('✅ Location deleted successfully!', 'success'); + closeDeleteModal(); + // Reload page to show changes + setTimeout(() => window.location.reload(), 1000); + } else { + showNotification('❌ Error deleting location: ' + result.error, 'error'); + } + }) + .catch(error => { + console.error('Error:', error); + showNotification('❌ Error deleting location: ' + error.message, 'error'); + }); +} + // Handle delete confirmation function confirmDelete() { const locationId = document.getElementById('delete-confirm-id').textContent; @@ -644,4 +746,271 @@ window.addEventListener('click', function(event) { + + + + + + + + + {% endblock %} diff --git a/py_app/app/warehouse.py b/py_app/app/warehouse.py index e897312..22ed6fb 100755 --- a/py_app/app/warehouse.py +++ b/py_app/app/warehouse.py @@ -89,7 +89,7 @@ def delete_locations_by_ids(ids_str): cursor = conn.cursor() deleted = 0 for id in ids: - cursor.execute("DELETE FROM warehouse_locations WHERE id = ?", (id,)) + cursor.execute("DELETE FROM warehouse_locations WHERE id = %s", (id,)) if cursor.rowcount: deleted += 1 conn.commit() @@ -226,20 +226,20 @@ def update_location(location_id, location_code, size, description): cursor = conn.cursor() # Check if location exists - cursor.execute("SELECT id FROM warehouse_locations WHERE id = ?", (location_id,)) + cursor.execute("SELECT id FROM warehouse_locations WHERE id = %s", (location_id,)) if not cursor.fetchone(): conn.close() return {"success": False, "error": "Location not found"} # Check if location code already exists for different location - cursor.execute("SELECT id FROM warehouse_locations WHERE location_code = ? AND id != ?", (location_code, location_id)) + cursor.execute("SELECT id FROM warehouse_locations WHERE location_code = %s AND id != %s", (location_code, location_id)) if cursor.fetchone(): conn.close() return {"success": False, "error": "Location code already exists"} # Update location cursor.execute( - "UPDATE warehouse_locations SET location_code = ?, size = ?, description = ? WHERE id = ?", + "UPDATE warehouse_locations SET location_code = %s, size = %s, description = %s WHERE id = %s", (location_code, size if size else None, description, location_id) ) conn.commit() @@ -250,6 +250,8 @@ def update_location(location_id, location_code, size, description): except Exception as e: print(f"Error updating location: {e}") return {"success": False, "error": str(e)} + print(f"Error updating location: {e}") + return {"success": False, "error": str(e)} def delete_location_by_id(location_id): """Delete a warehouse location by ID""" @@ -258,14 +260,14 @@ def delete_location_by_id(location_id): cursor = conn.cursor() # Check if location exists - cursor.execute("SELECT location_code FROM warehouse_locations WHERE id = ?", (location_id,)) + cursor.execute("SELECT location_code FROM warehouse_locations WHERE id = %s", (location_id,)) location = cursor.fetchone() if not location: conn.close() return {"success": False, "error": "Location not found"} # Delete location - cursor.execute("DELETE FROM warehouse_locations WHERE id = ?", (location_id,)) + cursor.execute("DELETE FROM warehouse_locations WHERE id = %s", (location_id,)) conn.commit() conn.close()