Bug #15159
closed[workbench2] "Open in new tab" shows "cannot serve inline content"
100%
Description
When Arvados is configured without wildcard dns/ssl for keep-web, the "open in new tab" option in the three-dot menus to the right of file names in a collection shows this error message in a new tab:
cannot serve inline content at this URL (possible configuration error; see https://doc.arvados.org/install/install-keep-web.html#dns)"
In this configuration, Arvados can not do inline previews due to CORS; download of the file remains possible.
If showing the file in a new tab is not possible, just remove the "open in a new tab" option when Arvados is running in this configuration (only!).
Inline content works when one of these are true:
- There is a wildcard '*' in the WebDAV ExternalURL
- Collections.TrustAllContent is true
Collections.TrustAllContent configuration needs to be exported.
Updated by Chrystian Klingenberg over 5 years ago
- Target version changed from Backlog Q1, Q2 to Workbench2 Q3, Q4
Updated by Peter Amstutz almost 5 years ago
- Target version deleted (
Workbench2 Q3, Q4) - Release set to 20
Updated by Ward Vandewege over 3 years ago
- Subject changed from [Data operations] "Open in new tab" is downloading on c97qk to [workbench2] "Open in new tab" shows "cannot serve inline content"
- Description updated (diff)
- Target version set to 2021-08-18 sprint
Updated by Peter Amstutz over 3 years ago
- Target version changed from 2021-08-18 sprint to 2021-09-01 sprint
Updated by Peter Amstutz over 3 years ago
- Target version changed from 2021-09-01 sprint to 2021-08-18 sprint
Updated by Stephen Smith over 3 years ago
- Status changed from New to In Progress
Updated by Stephen Smith over 3 years ago
Changes at arvados-workbench2|1f30af2350ce0ef9b7a0c40d7c931a7ff9c2cc6c branch 15159-disable-open-in-new-tab-when-cannot-serve-inline
and commit:arvados|f41684bd6aef3b1a9683edc64d5d95669a392853 branch 15159-export-trustallcontent
Updated by Lucas Di Pentima over 3 years ago
Some comments:
- At file
src/views-components/details-panel/file-details.tsx:L28
we're showing inline image previews that will need to be skipped when appropriate. - Do you think it would be good to do some unit testing on
CollectionFileViewerAction
so that we can test both ways the 'Open in new tab' menu item (when it should and shouldn't appear)? I believe this could be done by mocking the state as we do for example insrc/views-components/data-explorer/renderers.test.tsx
- The removed assertions on the Cypress test I think should be replaced with some check on the cluster config and a negated assertion: instead of removing the assertions, request the cluster config and assert that
TrustAllContent
is false and also no '*
' char is present on the appropriate config URL, and assert that the menu item isn't there. This way we wouldn't be removing a check but updating it making sure the new changes work as intended (or at least one of the cases, that's why I think unit testing all the cases is convenient). Do you agree?
Updated by Peter Amstutz over 3 years ago
- Target version changed from 2021-08-18 sprint to 2021-09-01 sprint
Updated by Stephen Smith over 3 years ago
Changes at arvados-workbench2|1303689480b4e7df4d9d998a79c9c689453abc35
Tests: developer-tests-workbench2: #469
- Added a showPreview flag to file-details getDetails, I changed the function signature to take an object to avoid having to match the position of the arguments when TabNr isn't being passed in
- Added jest test with a mock store testing the insecure case, trustallcontent=true, and wildcard in inline url cases
- Changed cypress tests to check TrustAllContent, for wildcard in inline url, and make sure open in new tab is not present
Updated by Stephen Smith over 3 years ago
- Status changed from In Progress to Resolved
Merged in arvados-workbench2|c2924c3bde785dc609eaff088e96a464426666e6
and commit:arvados|e1df29a3d682b28400ca35e490aa4a95aa564246