diff --git a/code/common/config/src/main/java/nu/marginalia/storage/model/FileStorage.java b/code/common/config/src/main/java/nu/marginalia/storage/model/FileStorage.java index 7994622a..9924f410 100644 --- a/code/common/config/src/main/java/nu/marginalia/storage/model/FileStorage.java +++ b/code/common/config/src/main/java/nu/marginalia/storage/model/FileStorage.java @@ -2,6 +2,7 @@ package nu.marginalia.storage.model; import java.nio.file.Path; import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; import java.util.Objects; /** @@ -91,4 +92,8 @@ public record FileStorage ( result = 31 * result + (description != null ? description.hashCode() : 0); return result; } + + public String date() { + return createDateTime.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME); + } } diff --git a/code/services-core/control-service/src/main/java/nu/marginalia/control/node/svc/ControlNodeService.java b/code/services-core/control-service/src/main/java/nu/marginalia/control/node/svc/ControlNodeService.java index 35bc44f3..a5f35587 100644 --- a/code/services-core/control-service/src/main/java/nu/marginalia/control/node/svc/ControlNodeService.java +++ b/code/services-core/control-service/src/main/java/nu/marginalia/control/node/svc/ControlNodeService.java @@ -214,11 +214,15 @@ public class ControlNodeService { ); } - private Object nodeActionsModel(Request request, Response response) { + private Object nodeActionsModel(Request request, Response response) throws SQLException { int nodeId = Integer.parseInt(request.params("id")); return Map.of( - "node", new IndexNode(nodeId) + "node", new IndexNode(nodeId), + "currentCrawlData", + fileStorageService.getStorage(fileStorageService.getActiveFileStorages(nodeId, FileStorageType.CRAWL_DATA)), + "currentProcessData", + fileStorageService.getStorage(fileStorageService.getActiveFileStorages(nodeId, FileStorageType.PROCESSED_DATA)) ); } diff --git a/code/services-core/control-service/src/main/resources/static/control/noanimation.css b/code/services-core/control-service/src/main/resources/static/control/noanimation.css new file mode 100644 index 00000000..c768218a --- /dev/null +++ b/code/services-core/control-service/src/main/resources/static/control/noanimation.css @@ -0,0 +1,10 @@ +/* Remove eye-grating animation from bootstrap */ + +*, ::before, ::after { + animation-delay: -1s !important; + animation-duration: 1s !important; + animation-iteration-count: 1 !important; + background-attachment: initial !important; + scroll-behavior: auto !important; + transition-duration: 0s !important; +} \ No newline at end of file diff --git a/code/services-core/control-service/src/main/resources/templates/control/node/node-actions.hdb b/code/services-core/control-service/src/main/resources/templates/control/node/node-actions.hdb index e9c394a7..2ba96bc0 100644 --- a/code/services-core/control-service/src/main/resources/templates/control/node/node-actions.hdb +++ b/code/services-core/control-service/src/main/resources/templates/control/node/node-actions.hdb @@ -34,6 +34,161 @@
+
+

+ +

+
+ + {{#unless currentCrawlData}} + No crawl data is currently set as active for this node. A crawl is not possible. + {{/unless}} + + {{#if currentCrawlData}} + This will trigger a crawl on Node {{node.id}}. This crawl data will be loaded: + + + + + + + {{#each currentCrawlData}} + + + + + + {{/each}} +
DatePathDescription
{{date}}{{path}}{{description}}
+
+ +
+ {{/if}} + +
+
+ +
+

+ +

+
+ + {{#unless currentCrawlData}} + No crawl data is currently set as active for this node. Processing is not possible. + {{/unless}} + + {{#if currentCrawlData}} + This will reprocess crawl data on Node {{node.id}}. This crawl data will be loaded: + + + + + + + + {{#each currentCrawlData}} + + + + + + {{/each}} +
DatePathDescription
{{date}}{{path}}{{description}}
+
+ +
+ {{/if}} +
+
+ +
+

+ +

+
+ + {{#unless currentProcessData}} + No processed data is currently set as active for this node. Loading is not possible. + {{/unless}} + + {{#if currentProcessData}} + This will load processed data on Node {{node.id}}. This processed data will be loaded: + + + + + + + + {{#each currentProcessData}} + + + + + + {{/each}} +
DatePathDescription
{{date}}{{path}}{{description}}
+
+ +
+ {{/if}} +
+
+ +
+

+ +

+
+

This will recalculate the rankings and search sets for the index

+ +
+ +
+
+
+

- -
-

- -

-
-

This will recalculate the rankings and search sets for the index

- -
- -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/code/services-core/control-service/src/main/resources/templates/control/node/node-storage-list.hdb b/code/services-core/control-service/src/main/resources/templates/control/node/node-storage-list.hdb index 177d68e9..7758c58a 100644 --- a/code/services-core/control-service/src/main/resources/templates/control/node/node-storage-list.hdb +++ b/code/services-core/control-service/src/main/resources/templates/control/node/node-storage-list.hdb @@ -53,38 +53,6 @@ - -
- {{#if view.specs}} - New Spec - {{/if}} - {{#if view.processed}} -
- -
- {{/if}} - {{#if view.crawl}} -
- -
-
- -
- {{/if}} -
- {{#each storage}} diff --git a/code/services-core/control-service/src/main/resources/templates/control/partials/head-includes.hdb b/code/services-core/control-service/src/main/resources/templates/control/partials/head-includes.hdb index 61d8448a..2725fca9 100644 --- a/code/services-core/control-service/src/main/resources/templates/control/partials/head-includes.hdb +++ b/code/services-core/control-service/src/main/resources/templates/control/partials/head-includes.hdb @@ -1,3 +1,4 @@ + \ No newline at end of file