Bug #12515
closed
Workbench base URL for multi-site search results should be configurable
Added by Tom Morris over 7 years ago.
Updated 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.
- Target version changed from 2017-11-08 Sprint to 2017-11-22 Sprint
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?
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
})
Sorry, for the delay.
This LGTM, thanks for the explanation, will have to read a lot more about Mithril.
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
Applied in changeset arvados|commit:2f66ce454917c8d9d016a9438e529a0a20317028.
Also available in: Atom
PDF