Project

General

Profile

Actions

Bug #15159

closed

[workbench2] "Open in new tab" shows "cannot serve inline content"

Added by Chrystian Klingenberg almost 5 years ago. Updated over 2 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Story points:
-
Release relationship:
Auto

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.


Subtasks 1 (0 open1 closed)

Arvados - Task #17975: Review 15159-disable-open-in-new-tab-when-cannot-serve-inlineResolvedLucas Di Pentima08/16/2021Actions
Actions #1

Updated by Chrystian Klingenberg almost 5 years ago

  • Target version changed from Backlog Q1, Q2 to Workbench2 Q3, Q4
Actions #2

Updated by Peter Amstutz over 4 years ago

  • Release set to 20
  • Target version deleted (Workbench2 Q3, Q4)
Actions #3

Updated by Ward Vandewege over 2 years ago

  • Target version set to 2021-08-18 sprint
  • Description updated (diff)
  • Subject changed from [Data operations] "Open in new tab" is downloading on c97qk to [workbench2] "Open in new tab" shows "cannot serve inline content"
Actions #4

Updated by Ward Vandewege over 2 years ago

  • Release changed from 20 to 41
Actions #5

Updated by Peter Amstutz over 2 years ago

  • Target version changed from 2021-08-18 sprint to 2021-09-01 sprint
Actions #6

Updated by Peter Amstutz over 2 years ago

  • Target version changed from 2021-09-01 sprint to 2021-08-18 sprint
Actions #7

Updated by Peter Amstutz over 2 years ago

  • Description updated (diff)
Actions #8

Updated by Peter Amstutz over 2 years ago

  • Assigned To set to Stephen Smith
Actions #9

Updated by Stephen Smith over 2 years ago

  • Status changed from New to In Progress
Actions #10

Updated by Stephen Smith over 2 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

Tests: developer-tests-workbench2: #468

Actions #11

Updated by Lucas Di Pentima over 2 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 in src/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?
Actions #12

Updated by Peter Amstutz over 2 years ago

  • Target version changed from 2021-08-18 sprint to 2021-09-01 sprint
Actions #13

Updated by Stephen Smith over 2 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
Actions #14

Updated by Lucas Di Pentima over 2 years ago

This LGTM, thanks!

Actions #15

Updated by Peter Amstutz over 2 years ago

  • Release deleted (41)
Actions #16

Updated by Stephen Smith over 2 years ago

  • Status changed from In Progress to Resolved

Merged in arvados-workbench2|c2924c3bde785dc609eaff088e96a464426666e6
and commit:arvados|e1df29a3d682b28400ca35e490aa4a95aa564246

Actions #17

Updated by Peter Amstutz over 2 years ago

  • Release set to 41
Actions

Also available in: Atom PDF