Yay, found more yak shaving when fixing #1886. Certain things seem to require refactoring in the class and its usage:
We return a list instead of a dict based on the iRODS path. The latter would make it much simpler to handle the data in JQuery instead of needlessly iterating through a list
coll_objects term should be renamed. What even is that
Same with data for return data within the view
We set data-stats-url in template, but always just use the path substring from the URL. Should probably just use the iRODS path instead. I guess this is residue from the old implementation which mostly used get()
We should query once per project and have the project UUID in stats
..come to think of it, is get() even used anymore? Yes, by the Vue app
403 and 500 statuses is not handled in the JQuery
Unnecessary break structures in view
stats unnecessarily returned in Ajax view even with non-200 status (it never gets used)
HTTP status fields are returned as strings instead of integers for some weird reason
POST tests for the view contain the md5 attribute even though it's no longer used
Taskflow and regular view tests are in the same test_views module, that isn't according to conventions
Tasks
[x] Return dict instead of path from view, update usage
[x] Rename odd variables
[x] Use data-stats-path instead of URL
[x] Group queries per project
[x] Verify get() usage, remove if no longer needed
Yay, found more yak shaving when fixing #1886. Certain things seem to require refactoring in the class and its usage:
coll_objects
term should be renamed. What even is thatdata
for return data within the viewdata-stats-url
in template, but always just use the path substring from the URL. Should probably just use the iRODS path instead. I guess this is residue from the old implementation which mostly usedget()
..come to think of it, isYes, by the Vue appget()
even used anymore?403
and500
statuses is not handled in the JQuerybreak
structures in viewstats
unnecessarily returned in Ajax view even with non-200 status (it never gets used)POST
tests for the view contain themd5
attribute even though it's no longer usedtest_views
module, that isn't according to conventionsTasks
data-stats-path
instead of URLVerifyget()
usage, remove if no longer needed403
and500
statusbreak
spaghettistats