From 2db6a9ecfb2bfe838aee1986b45d183a22fed9f8 Mon Sep 17 00:00:00 2001 From: esoe Date: Fri, 4 Oct 2024 16:50:02 +0300 Subject: [PATCH] qq --- storage/logs/teh.log | 56 +++++++++++++++++++ .../controllers/face/FaceController.java | 23 +++++++- .../storage/models/xlsx/Xlsx.java | 10 ++++ .../main/resources/templates/mainframe.html | 2 + .../main/resources/templates/view-xlsx.html | 26 +++++++++ 5 files changed, 116 insertions(+), 1 deletion(-) diff --git a/storage/logs/teh.log b/storage/logs/teh.log index dfcf45c..954a58a 100644 --- a/storage/logs/teh.log +++ b/storage/logs/teh.log @@ -18,3 +18,59 @@ {"@timestamp":"2024-10-04T10:48:18.071923300Z","log.level":"INFO","process.pid":19152,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"No active profile set, falling back to 1 default profile: \"default\"","ecs.version":"8.11"} {"@timestamp":"2024-10-04T10:48:18.936503100Z","log.level":"INFO","process.pid":19152,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.services.FileServiceImpl","message":"Создание директории root(), для хранения файлов: C:\\Users\\devuser\\Documents\\code\\teh\\storage\\uploads","ecs.version":"8.11"} {"@timestamp":"2024-10-04T10:48:19.816968700Z","log.level":"INFO","process.pid":19152,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"Started StorageApplicationTests in 2.229 seconds (process running for 3.279)","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T11:10:13.876807300Z","log.level":"INFO","process.pid":8852,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"Starting StorageApplicationTests using Java 17.0.7 with PID 8852 (started by devuser in C:\\Users\\devuser\\Documents\\code\\teh\\storage)","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T11:10:13.884808Z","log.level":"INFO","process.pid":8852,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"No active profile set, falling back to 1 default profile: \"default\"","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T11:10:14.776969Z","log.level":"INFO","process.pid":8852,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.services.FileServiceImpl","message":"Создание директории root(), для хранения файлов: C:\\Users\\devuser\\Documents\\code\\teh\\storage\\uploads","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T11:10:15.610297700Z","log.level":"INFO","process.pid":8852,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"Started StorageApplicationTests in 2.193 seconds (process running for 3.244)","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T11:17:21.871166800Z","log.level":"INFO","process.pid":19912,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"Starting StorageApplicationTests using Java 17.0.7 with PID 19912 (started by devuser in C:\\Users\\devuser\\Documents\\code\\teh\\storage)","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T11:17:21.879681900Z","log.level":"INFO","process.pid":19912,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"No active profile set, falling back to 1 default profile: \"default\"","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T11:17:22.792044500Z","log.level":"INFO","process.pid":19912,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.services.FileServiceImpl","message":"Создание директории root(), для хранения файлов: C:\\Users\\devuser\\Documents\\code\\teh\\storage\\uploads","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T11:17:23.607573Z","log.level":"INFO","process.pid":19912,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"Started StorageApplicationTests in 2.157 seconds (process running for 3.233)","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T11:23:10.348815700Z","log.level":"INFO","process.pid":23280,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"Starting StorageApplicationTests using Java 17.0.7 with PID 23280 (started by devuser in C:\\Users\\devuser\\Documents\\code\\teh\\storage)","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T11:23:10.354747500Z","log.level":"INFO","process.pid":23280,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"No active profile set, falling back to 1 default profile: \"default\"","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T11:23:11.287271800Z","log.level":"INFO","process.pid":23280,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.services.FileServiceImpl","message":"Создание директории root(), для хранения файлов: C:\\Users\\devuser\\Documents\\code\\teh\\storage\\uploads","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T11:23:12.077036700Z","log.level":"INFO","process.pid":23280,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"Started StorageApplicationTests in 2.197 seconds (process running for 3.27)","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T11:30:26.881446700Z","log.level":"INFO","process.pid":26512,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"Starting StorageApplicationTests using Java 17.0.7 with PID 26512 (started by devuser in C:\\Users\\devuser\\Documents\\code\\teh\\storage)","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T11:30:26.888249300Z","log.level":"INFO","process.pid":26512,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"No active profile set, falling back to 1 default profile: \"default\"","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T11:30:28.068100800Z","log.level":"INFO","process.pid":26512,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.services.FileServiceImpl","message":"Создание директории root(), для хранения файлов: C:\\Users\\devuser\\Documents\\code\\teh\\storage\\uploads","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T11:30:28.981049800Z","log.level":"INFO","process.pid":26512,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"Started StorageApplicationTests in 2.702 seconds (process running for 4.038)","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T11:35:26.524070400Z","log.level":"INFO","process.pid":17400,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"Starting StorageApplicationTests using Java 17.0.7 with PID 17400 (started by devuser in C:\\Users\\devuser\\Documents\\code\\teh\\storage)","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T11:35:26.536360800Z","log.level":"INFO","process.pid":17400,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"No active profile set, falling back to 1 default profile: \"default\"","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T11:35:27.549806600Z","log.level":"INFO","process.pid":17400,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.services.FileServiceImpl","message":"Создание директории root(), для хранения файлов: C:\\Users\\devuser\\Documents\\code\\teh\\storage\\uploads","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T11:35:28.433246900Z","log.level":"INFO","process.pid":17400,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"Started StorageApplicationTests in 2.387 seconds (process running for 3.431)","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T12:24:43.676778500Z","log.level":"INFO","process.pid":17300,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"Starting StorageApplicationTests using Java 17.0.7 with PID 17300 (started by devuser in C:\\Users\\devuser\\Documents\\code\\teh\\storage)","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T12:24:43.681783300Z","log.level":"INFO","process.pid":17300,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"No active profile set, falling back to 1 default profile: \"default\"","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T12:24:44.681755900Z","log.level":"INFO","process.pid":17300,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.services.FileServiceImpl","message":"Создание директории root(), для хранения файлов: C:\\Users\\devuser\\Documents\\code\\teh\\storage\\uploads","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T12:24:45.716322700Z","log.level":"INFO","process.pid":17300,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"Started StorageApplicationTests in 2.526 seconds (process running for 3.607)","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T12:26:28.860646500Z","log.level":"INFO","process.pid":14972,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"Starting StorageApplicationTests using Java 17.0.7 with PID 14972 (started by devuser in C:\\Users\\devuser\\Documents\\code\\teh\\storage)","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T12:26:28.866734100Z","log.level":"INFO","process.pid":14972,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"No active profile set, falling back to 1 default profile: \"default\"","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T12:26:29.897513Z","log.level":"INFO","process.pid":14972,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.services.FileServiceImpl","message":"Создание директории root(), для хранения файлов: C:\\Users\\devuser\\Documents\\code\\teh\\storage\\uploads","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T12:26:30.766184500Z","log.level":"INFO","process.pid":14972,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"Started StorageApplicationTests in 2.375 seconds (process running for 3.479)","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T12:42:59.595580200Z","log.level":"INFO","process.pid":20992,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"Starting StorageApplicationTests using Java 17.0.7 with PID 20992 (started by devuser in C:\\Users\\devuser\\Documents\\code\\teh\\storage)","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T12:42:59.600089100Z","log.level":"INFO","process.pid":20992,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"No active profile set, falling back to 1 default profile: \"default\"","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T12:43:00.571674Z","log.level":"INFO","process.pid":20992,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.services.FileServiceImpl","message":"Создание директории root(), для хранения файлов: C:\\Users\\devuser\\Documents\\code\\teh\\storage\\uploads","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T12:43:01.368231600Z","log.level":"INFO","process.pid":20992,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"Started StorageApplicationTests in 2.253 seconds (process running for 3.35)","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T12:53:32.518211900Z","log.level":"INFO","process.pid":17808,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"Starting StorageApplicationTests using Java 17.0.7 with PID 17808 (started by devuser in C:\\Users\\devuser\\Documents\\code\\teh\\storage)","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T12:53:32.526075600Z","log.level":"INFO","process.pid":17808,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"No active profile set, falling back to 1 default profile: \"default\"","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T12:53:33.505279300Z","log.level":"INFO","process.pid":17808,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.services.FileServiceImpl","message":"Создание директории root(), для хранения файлов: C:\\Users\\devuser\\Documents\\code\\teh\\storage\\uploads","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T12:53:34.327040500Z","log.level":"INFO","process.pid":17808,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"Started StorageApplicationTests in 2.294 seconds (process running for 3.34)","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T12:59:07.501143900Z","log.level":"INFO","process.pid":20632,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"Starting StorageApplicationTests using Java 17.0.7 with PID 20632 (started by devuser in C:\\Users\\devuser\\Documents\\code\\teh\\storage)","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T12:59:07.510319200Z","log.level":"INFO","process.pid":20632,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"No active profile set, falling back to 1 default profile: \"default\"","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T12:59:08.404968Z","log.level":"INFO","process.pid":20632,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.services.FileServiceImpl","message":"Создание директории root(), для хранения файлов: C:\\Users\\devuser\\Documents\\code\\teh\\storage\\uploads","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T12:59:09.312051600Z","log.level":"INFO","process.pid":20632,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"Started StorageApplicationTests in 2.291 seconds (process running for 3.346)","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T13:21:17.432695500Z","log.level":"INFO","process.pid":18856,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"Starting StorageApplicationTests using Java 17.0.7 with PID 18856 (started by devuser in C:\\Users\\devuser\\Documents\\code\\teh\\storage)","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T13:21:17.438318700Z","log.level":"INFO","process.pid":18856,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"No active profile set, falling back to 1 default profile: \"default\"","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T13:21:18.359912100Z","log.level":"INFO","process.pid":18856,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.services.FileServiceImpl","message":"Создание директории root(), для хранения файлов: C:\\Users\\devuser\\Documents\\code\\teh\\storage\\uploads","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T13:21:19.217317500Z","log.level":"INFO","process.pid":18856,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"Started StorageApplicationTests in 2.221 seconds (process running for 3.292)","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T13:27:34.144333600Z","log.level":"INFO","process.pid":5620,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"Starting StorageApplicationTests using Java 17.0.7 with PID 5620 (started by devuser in C:\\Users\\devuser\\Documents\\code\\teh\\storage)","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T13:27:34.149848300Z","log.level":"INFO","process.pid":5620,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"No active profile set, falling back to 1 default profile: \"default\"","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T13:27:35.073036400Z","log.level":"INFO","process.pid":5620,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.services.FileServiceImpl","message":"Создание директории root(), для хранения файлов: C:\\Users\\devuser\\Documents\\code\\teh\\storage\\uploads","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T13:27:35.922756400Z","log.level":"INFO","process.pid":5620,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"Started StorageApplicationTests in 2.237 seconds (process running for 3.315)","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T13:31:17.366109900Z","log.level":"INFO","process.pid":26436,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"Starting StorageApplicationTests using Java 17.0.7 with PID 26436 (started by devuser in C:\\Users\\devuser\\Documents\\code\\teh\\storage)","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T13:31:17.371633600Z","log.level":"INFO","process.pid":26436,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"No active profile set, falling back to 1 default profile: \"default\"","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T13:31:18.300041Z","log.level":"INFO","process.pid":26436,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.services.FileServiceImpl","message":"Создание директории root(), для хранения файлов: C:\\Users\\devuser\\Documents\\code\\teh\\storage\\uploads","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T13:31:19.161383900Z","log.level":"INFO","process.pid":26436,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"Started StorageApplicationTests in 2.243 seconds (process running for 3.298)","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T13:39:06.010588100Z","log.level":"INFO","process.pid":22984,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"Starting StorageApplicationTests using Java 17.0.7 with PID 22984 (started by devuser in C:\\Users\\devuser\\Documents\\code\\teh\\storage)","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T13:39:06.016588500Z","log.level":"INFO","process.pid":22984,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"No active profile set, falling back to 1 default profile: \"default\"","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T13:39:06.971331700Z","log.level":"INFO","process.pid":22984,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.services.FileServiceImpl","message":"Создание директории root(), для хранения файлов: C:\\Users\\devuser\\Documents\\code\\teh\\storage\\uploads","ecs.version":"8.11"} +{"@timestamp":"2024-10-04T13:39:07.815732300Z","log.level":"INFO","process.pid":22984,"process.thread.name":"main","service.name":"face","service.version":"1","service.environment":"Production","service.node.name":"Primary","log.logger":"gsp.technologies.storage.StorageApplicationTests","message":"Started StorageApplicationTests in 2.256 seconds (process running for 3.331)","ecs.version":"8.11"} diff --git a/storage/src/main/java/gsp/technologies/storage/controllers/face/FaceController.java b/storage/src/main/java/gsp/technologies/storage/controllers/face/FaceController.java index f6e8575..b6c3a35 100644 --- a/storage/src/main/java/gsp/technologies/storage/controllers/face/FaceController.java +++ b/storage/src/main/java/gsp/technologies/storage/controllers/face/FaceController.java @@ -1,5 +1,6 @@ package gsp.technologies.storage.controllers.face; +import java.io.File; import java.io.IOException; import java.net.URI; import java.util.List; @@ -29,6 +30,8 @@ import org.springframework.web.util.UriComponentsBuilder; import gsp.technologies.storage.controllers.api.ApiLink; import gsp.technologies.storage.models.FileMetadata; +import gsp.technologies.storage.models.xlsx.Xlsx; +import gsp.technologies.storage.models.xlsx.XlsxPage; import jakarta.servlet.http.HttpServletResponse; @Controller @@ -170,16 +173,34 @@ public class FaceController { /** * Определяем расширение файла и если это xlsx, * отображаем страницу с содержимым xlsx-файла + * - можно добавить отображалки по другим типам файлов (md, pdf, docx и т.д.) * @param filename * @return */ @GetMapping("/files/view") public String view(Model model, - @RequestParam(name = "filename") String filename) { + @RequestParam(name = "filename") String filename, + @RequestParam(name = "pageNumber", defaultValue = "0") Integer pageNumber, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) { LOG.info("GET /view"); if (FileMetadata.ext(filename).toLowerCase().equals("xlsx")) { LOG.info("Файл {} является xlsx-файлом", filename); + //преобразуем имя файла в путь + String path = client.get() + .uri(ApiLink.ROOT.full()) + .retrieve() + .bodyToMono(String.class) + .block(); + + path = path + File.separator + filename; + LOG.info("Путь к xlsx-файлу: {}", path); + + // добавляем модель данные xlsx + Xlsx xlsx = new Xlsx(path); + XlsxPage page = xlsx.page(pageSize, pageNumber); + + model.addAttribute("xlsx", page); model.addAttribute("filename", filename); return "view-xlsx"; } diff --git a/storage/src/main/java/gsp/technologies/storage/models/xlsx/Xlsx.java b/storage/src/main/java/gsp/technologies/storage/models/xlsx/Xlsx.java index 5cd02a2..1092c79 100644 --- a/storage/src/main/java/gsp/technologies/storage/models/xlsx/Xlsx.java +++ b/storage/src/main/java/gsp/technologies/storage/models/xlsx/Xlsx.java @@ -99,6 +99,16 @@ public class Xlsx { Map> content(int pageSize, int pageNumber) { Map> map = new HashMap<>(); + if (pageNumber < 0 || pageNumber >= totalPages(pageSize)) { + LOG.info("Страница не существует"); + return map; + } + + if (pageSize <= 0) { + LOG.info("Неверно задан размер страницы"); + return map; + } + File file = new File(metadata.getPath()); LOG.info("размер файла: " + metadata.getSize()); LOG.info("Страница: " + pageNumber); diff --git a/storage/src/main/resources/templates/mainframe.html b/storage/src/main/resources/templates/mainframe.html index 267ffaf..dccd982 100644 --- a/storage/src/main/resources/templates/mainframe.html +++ b/storage/src/main/resources/templates/mainframe.html @@ -30,6 +30,7 @@

Files (tree):

+
@@ -44,6 +45,7 @@ скачать +
удалитьпросмотреть json просмотреть
diff --git a/storage/src/main/resources/templates/view-xlsx.html b/storage/src/main/resources/templates/view-xlsx.html index 684bbe4..5032032 100644 --- a/storage/src/main/resources/templates/view-xlsx.html +++ b/storage/src/main/resources/templates/view-xlsx.html @@ -8,10 +8,36 @@

VIEW-XLSX


+

+ TO MAINFRAME +

+

Просмотр xlsx-контента:

+
+
+ + + +
+ + +
+ +
+
+ + + + + + + +
+ +