diff --git a/ui/resources/templates/tasks/warcs.ftlh b/ui/resources/templates/tasks/warcs.ftlh index 57c8a1b..16c8d54 100644 --- a/ui/resources/templates/tasks/warcs.ftlh +++ b/ui/resources/templates/tasks/warcs.ftlh @@ -8,6 +8,7 @@ Filename Records Size + State @@ -16,6 +17,7 @@ ${warc.filename} ${warc.records} ${warc.displaySize} + ${warc.stateName} [/#list] diff --git a/ui/src/bamboo/crawl/Warc.java b/ui/src/bamboo/crawl/Warc.java index 1778ff7..ed645c7 100644 --- a/ui/src/bamboo/crawl/Warc.java +++ b/ui/src/bamboo/crawl/Warc.java @@ -53,6 +53,20 @@ public void setStateId(int stateId) { this.stateId = stateId; } + public String getStateName() { + return switch (stateId) { + case Warc.DELETED -> "deleted"; + case Warc.SOLR_ERROR -> "solr_error"; + case Warc.CDX_ERROR -> "cdx_error"; + case Warc.IMPORT_ERROR -> "import_error"; + case Warc.OPEN -> "open"; + case Warc.IMPORTED -> "imported"; + case Warc.CDX_INDEXED -> "cdx_indexed"; + case Warc.SOLR_INDEXED -> "solr_indexed"; + default -> "unknown_" + stateId; + }; + } + public Path getPath() { return path; }