Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 6 additions & 3 deletions app/api/Reporting.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down