Pbench Agent postprocessing creates result.html files, which display a table of result data for each iteration. Each row contains a relative link to the iteration directory, with the intention of linking to the web server directory listing. Because the result.html was loaded using the inventory API as /datasets/<id>/inventory/result.html, the relative path access also routes to the inventory API, which doesn't support directories and therefore fails.
It's hard to fix this to work like the old server without some way to interact with the dashboard UI code (ideally it would open the appropriate directory in the TOC view). Nevertheless, this PR implements a change that improves the behavior a bit (it's no longer an error), by handling this request as an HTML 301 (redirect, as "permanently moved") to the appropriate /contents URI.
Right now the browser will display the raw contents JSON response, which is a bit ugly if not entirely uninformative.
This PR also cleans up the inventory code path a bit, collapsing the cache manager stream API into get_inventory as it's not called anywhere else.
PBENCH-1291
Pbench Agent postprocessing creates
result.html
files, which display a table of result data for each iteration. Each row contains a relative link to the iteration directory, with the intention of linking to the web server directory listing. Because theresult.html
was loaded using theinventory
API as/datasets/<id>/inventory/result.html
, the relative path access also routes to theinventory
API, which doesn't support directories and therefore fails.It's hard to fix this to work like the old server without some way to interact with the dashboard UI code (ideally it would open the appropriate directory in the TOC view). Nevertheless, this PR implements a change that improves the behavior a bit (it's no longer an error), by handling this request as an HTML
301
(redirect, as "permanently moved") to the appropriate/contents
URI.Right now the browser will display the raw
contents
JSON response, which is a bit ugly if not entirely uninformative.This PR also cleans up the
inventory
code path a bit, collapsing the cache managerstream
API intoget_inventory
as it's not called anywhere else.