Bug #12515
closedWorkbench base URL for multi-site search results should be configurable
Description
Currently the workbench URL is hardcoded to be https://workbench.foo.arvadosapi.com, which doesn't work if, for example, a customer has their cluster configured so that the workbench lives at https://wb.foo.arvadosapi.com
Updated by Tom Clegg over 7 years ago
- Status changed from New to In Progress
API server config already has this config. Need to add it to discovery doc, and have Workbench fetch discovery doc to find workbench address.
Updated by Tom Clegg over 7 years ago
part 1 (add to discovery doc): 12515-configured-workbench-address @ a5d1a2aa40ad211b4faf870c603ae7ad5263b6bc
Updated by Tom Clegg over 7 years ago
- Target version changed from 2017-11-08 Sprint to 2017-11-22 Sprint
Updated by Tom Clegg over 7 years ago
part 2 (use advertised wb site when possible): 12515-use-configured-wb @ 63f1542e94f3f1e66cbf0d88f557105ff5d104d0
Updated by Lucas Di Pentima about 7 years ago
Some questions:
- Can we have a workbench integration test to check that the correct URL is being selected? How about one for the new discovery doc value?
- File
apps/workbench/app/assets/javascripts/models/session_db.js
- Line 146: I don’t quite understand how m.stream() works, and its relation with comment on line 130, could you explain a little? On mithril documentation, it seems to be some kind of callback, right?
Updated by Tom Clegg about 7 years ago
Lucas Di Pentima wrote:
- Can we have a workbench integration test to check that the correct URL is being selected?
So far we've punted on tests for the client-side stuff. Doesn't seem worthwhile to write such tests in Ruby, and we don't have a js setup yet. I'm inclined to keep punting for now.
How about one for the new discovery doc value?
Sure, that one's easy.
12515-configured-workbench-address @ e1da2448fac9f060cdfe7f62a8783cd9b8cfaf96
- File
apps/workbench/app/assets/javascripts/models/session_db.js
- Line 146: I don’t quite understand how m.stream() works, and its relation with comment on line 130, could you explain a little? On mithril documentation, it seems to be some kind of callback, right?
A stream is a getter-setter that can also register "on update" hooks, so you can do stuff like this
ddstream = db.discoveryDoc(session)
if (ddstream() !== null) {
// discovery doc has arrived
url = ddstream().workbenchUrl
}
or like this
ddstream = db.discoveryDoc(session)
ddstream.map(function(dd) {
// this function runs when a discovery doc arrives
url = dd.workbenchUrl
})
Updated by Lucas Di Pentima about 7 years ago
Sorry, for the delay.
This LGTM, thanks for the explanation, will have to read a lot more about Mithril.
Updated by Anonymous about 7 years ago
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
Applied in changeset arvados|commit:2f66ce454917c8d9d016a9438e529a0a20317028.