esoe 2 months ago
parent
commit
2db6a9ecfb
  1. 56
      storage/logs/teh.log
  2. 23
      storage/src/main/java/gsp/technologies/storage/controllers/face/FaceController.java
  3. 10
      storage/src/main/java/gsp/technologies/storage/models/xlsx/Xlsx.java
  4. 2
      storage/src/main/resources/templates/mainframe.html
  5. 26
      storage/src/main/resources/templates/view-xlsx.html

56
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.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: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-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"}

23
storage/src/main/java/gsp/technologies/storage/controllers/face/FaceController.java

@ -1,5 +1,6 @@
package gsp.technologies.storage.controllers.face; package gsp.technologies.storage.controllers.face;
import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.net.URI; import java.net.URI;
import java.util.List; 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.controllers.api.ApiLink;
import gsp.technologies.storage.models.FileMetadata; 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; import jakarta.servlet.http.HttpServletResponse;
@Controller @Controller
@ -170,16 +173,34 @@ public class FaceController {
/** /**
* Определяем расширение файла и если это xlsx, * Определяем расширение файла и если это xlsx,
* отображаем страницу с содержимым xlsx-файла * отображаем страницу с содержимым xlsx-файла
* - можно добавить отображалки по другим типам файлов (md, pdf, docx и т.д.)
* @param filename * @param filename
* @return * @return
*/ */
@GetMapping("/files/view") @GetMapping("/files/view")
public String view(Model model, 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"); LOG.info("GET /view");
if (FileMetadata.ext(filename).toLowerCase().equals("xlsx")) { if (FileMetadata.ext(filename).toLowerCase().equals("xlsx")) {
LOG.info("Файл {} является xlsx-файлом", filename); 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); model.addAttribute("filename", filename);
return "view-xlsx"; return "view-xlsx";
} }

10
storage/src/main/java/gsp/technologies/storage/models/xlsx/Xlsx.java

@ -99,6 +99,16 @@ public class Xlsx {
Map<Integer, List<XlsxCell>> content(int pageSize, int pageNumber) { Map<Integer, List<XlsxCell>> content(int pageSize, int pageNumber) {
Map<Integer, List<XlsxCell>> map = new HashMap<>(); Map<Integer, List<XlsxCell>> 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()); File file = new File(metadata.getPath());
LOG.info("размер файла: " + metadata.getSize()); LOG.info("размер файла: " + metadata.getSize());
LOG.info("Страница: " + pageNumber); LOG.info("Страница: " + pageNumber);

2
storage/src/main/resources/templates/mainframe.html

@ -30,6 +30,7 @@
<div class="files"> <div class="files">
<h2>Files (tree): <span th:text="${root}"></span></h2> <h2>Files (tree): <span th:text="${root}"></span></h2>
<hr>
<table rules="all"> <table rules="all">
<tr th:each="file : ${files}"> <tr th:each="file : ${files}">
<td th:text="${file.name}"></td> <td th:text="${file.name}"></td>
@ -44,6 +45,7 @@
<a th:href="@{/face/v1/files/download-file?filename={filename}(filename=${file.name})}">скачать</a> <a th:href="@{/face/v1/files/download-file?filename={filename}(filename=${file.name})}">скачать</a>
</td> </td>
<td><a th:href="@{/face/v1/files/delete-file?filename={filename}(filename=${file.name})}">удалить</a></td> <td><a th:href="@{/face/v1/files/delete-file?filename={filename}(filename=${file.name})}">удалить</a></td>
<td><a th:href="@{/api/v1/files/xlsx?filename={filename}(filename=${file.name})}">просмотреть json</a></td>
<td><a th:href="@{/face/v1/files/view?filename={filename}(filename=${file.name})}">просмотреть</a></td> <td><a th:href="@{/face/v1/files/view?filename={filename}(filename=${file.name})}">просмотреть</a></td>
</tr> </tr>
</table> </table>

26
storage/src/main/resources/templates/view-xlsx.html

@ -8,10 +8,36 @@
<header> <header>
<h1>VIEW-XLSX</h1> <h1>VIEW-XLSX</h1>
<hr> <hr>
<h1>
<a th:href="@{/face/v1/mainframe}">TO MAINFRAME</a>
</h1>
<hr>
</header> </header>
<main> <main>
<div class="files"> <div class="files">
<h2>Просмотр xlsx-контента: <span th:text="${filename}"></span></h2> <h2>Просмотр xlsx-контента: <span th:text="${filename}"></span></h2>
<hr>
<form th:action="@{/face/v1/files/view}" th:method="get">
<input type="hidden" th:name="filename" th:value="${filename}">
<label for="pageSize">pageSize:</label>
<input type="text" th:name="pageSize" th:value="${xlsx.pageSize}">
<br>
<label for="pageNumber">pageNumber</label>
<input type="text" th:name="pageNumber" th:value="${xlsx.pageNumber}">
<br>
<input type="submit" value="показать"/>
</form>
<hr>
<table rules="all">
<thead></thead>
<tbody>
<tr th:each="row: ${xlsx.content.values()}">
<!-- <td th:if="${rowStat.count} &gt; 1" th:each="cell : ${row}"> -->
<td th:each="cell : ${row}">
<span th:text="${cell.content}"></span>
</td>
</tbody>
</table>
</div> </div>
<hr> <hr>
</main> </main>

Loading…
Cancel
Save