diff --git a/CHANGELOG.md b/CHANGELOG.md index c8721ca45..52d026fd2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Changed - Consolidated field names sent by the EventSinkService to maxaimize reuse. +- Add status column to files report to indicate if files are ARCHIVED, etc. - Reworked auto-archival configuration options to make their meanings more clear. ## 1.15.1 - 2021-03-12 diff --git a/app/api/Reporting.scala b/app/api/Reporting.scala index 674f0d45c..c88c8e412 100644 --- a/app/api/Reporting.scala +++ b/app/api/Reporting.scala @@ -39,7 +39,7 @@ class Reporting @Inject()(selections: SelectionService, var headerRow = true val enum = Enumerator.generateM({ val chunk = if (headerRow) { - val header = "type,id,name,owner,owner_id,size_kb,uploaded,views,downloads,last_viewed,last_downloaded,location,parent_datasets,parent_collections,parent_spaces\n" + val header = "type,id,name,owner,owner_id,size_kb,uploaded,views,downloads,last_viewed,last_downloaded,location,parent_datasets,parent_collections,parent_spaces,status\n" headerRow = false Some(header.getBytes("UTF-8")) } else { @@ -137,7 +137,7 @@ class Reporting @Inject()(selections: SelectionService, // TODO: This will still fail on excessively large instances without Enumerator refactor - should we maintain this endpoint or remove? - var contents: String = "type,id,name,owner,owner_id,size_kb,uploaded/created,views,downloads,last_viewed,last_downloaded,location,parent_datasets,parent_collections,parent_spaces\n" + var contents: String = "type,id,name,owner,owner_id,size_kb,uploaded/created,views,downloads,last_viewed,last_downloaded,location,parent_datasets,parent_collections,parent_spaces,status\n" collections.getMetrics().foreach(coll => { contents += _buildCollectionRow(coll, true) @@ -288,7 +288,8 @@ class Reporting @Inject()(selections: SelectionService, contents += "\""+f.loader_id+"\"," contents += "\""+ds_list+"\"," contents += "\""+coll_list+"\"," - contents += "\""+space_list+"\"" + contents += "\""+space_list+"\"," + contents += "\""+f.status+"\"" contents += "\n" return contents @@ -343,6 +344,7 @@ class Reporting @Inject()(selections: SelectionService, if (returnAllColums) contents += "," // datasets do not have parent_datasets contents += "\""+coll_list+"\"," contents += "\""+space_list+"\"" + if (returnAllColums) contents += "," // datasets do not have status contents += "\n" return contents @@ -391,6 +393,7 @@ class Reporting @Inject()(selections: SelectionService, if (returnAllColums) contents += "," // collections do not have parent_datasets contents += "\""+coll_list+"\"," contents += "\""+space_list+"\"" + if (returnAllColums) contents += "," // collections do not have status contents += "\n" return contents