Story #2961

Individual tab partials can update w/o refreshing whole page, for example pipeline status page can refresh status tab based on eventbus activity

Added by Peter Amstutz over 6 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Start date:
06/06/2014
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Story points:
1.0

Subtasks

Task #2999: Cache selected current_user field in session cookie to eliminate API server round trip to load current_userResolvedPeter Amstutz

Task #2989: Optimize controllers not to generate expensive API calls for data that isn't used for the current panelResolvedPeter Amstutz

Task #3000: Review 2961-load-tab-partialsResolvedPeter Amstutz

Task #2988: Support loading partials and AJAX loadingResolvedPeter Amstutz


Related issues

Related to Arvados - Bug #3013: Tab pane url is incorrect if the url of the page itself has a query stringResolved

Associated revisions

Revision 70148c49
Added by Peter Amstutz over 6 years ago

Merge branch '2961-load-tab-partials' closes #2961

History

#1 Updated by Peter Amstutz over 6 years ago

  • Description updated (diff)

#2 Updated by Peter Amstutz over 6 years ago

  • Subject changed from Pipeline status page live-updates from eventbus to Individual tab partials can update w/o refreshing whole page, for example pipeline status page can refresh status tab based on eventbus activity
  • Story points set to 1.0

#3 Updated by Peter Amstutz over 6 years ago

  • Description updated (diff)

#4 Updated by Peter Amstutz over 6 years ago

  • Assigned To set to Peter Amstutz

#5 Updated by Brett Smith over 6 years ago

  • I'm getting a number of Workbench test failures. I'm concerned that calling super from various index methods could have unintended side effects, since ApplicationController#index always reassigns to the objects array. Some of these other controllers build data structures that accompany or parallel @objects, and things could get out of whack if ApplicationController#index munges that. Would it make sense to make the rendering at the end of @ApplicationController#index its own method, and then call that from the end of these other index methods?
  • ERB output in JavaScript (e.g., ajaxRefreshTabPane) needs to be run through escape_javascript.
  • Please update the comments in event_log.js to match your changes.
  • Please remove the debug puts from ApplicationController.

#6 Updated by Peter Amstutz over 6 years ago

  • Made the suggested change, added #render_index which is used where appropriate instead of #super
  • Workbench tests should pass
  • Added missing user uuid to session
  • Tracks up-to-date state of each panel, only reloads it if it believes it needs to be reloaded.

#7 Updated by Brett Smith over 6 years ago

Very nice, thanks. My only question now is about the changes related to ApplicationController#current_user. I remember some discussion about caching user information in the session, but since thread_with_api_token usually calls User.current, it seems like this usually won't save us a round-trip with the API server. Nothing else in the branch seems to be using the data saved in the session, either. What is this getting us?

#8 Updated by Brett Smith over 6 years ago

Brett Smith wrote:

Very nice, thanks. My only question now is about the changes related to ApplicationController#current_user. I remember some discussion about caching user information in the session, but since thread_with_api_token usually calls User.current, it seems like this usually won't save us a round-trip with the API server. Nothing else in the branch seems to be using the data saved in the session, either. What is this getting us?

Covered in-person. I wasn't paying enough attention to realize that User.current only gets called if params[:api_token]. Looks good to me; please merge.

#9 Updated by Anonymous over 6 years ago

  • Status changed from New to Resolved

Applied in changeset arvados|commit:70148c4918a95ee9a49a18bf5789801d02e8ef5e.

Also available in: Atom PDF