Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #8516 (closed)

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

BaseController __init__() not load data

Reported by: wmoore Owned by: wmoore
Priority: major Milestone: OMERO-4.4
Component: Web Version: n.a.
Keywords: n.a. Cc: atarkowska, cxallan
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: 0.0d
Sprint: 2012-04-24 (13)

Description (last modified by wmoore)

The loading of data that occurrs in BaseController? init() should be handled by the new @render_response decorator or within view functions themselfs, so as to only load user, groups etc when needed.

Need to check where this data is currently being used before removing!

This work includes removing all uses of 'eContext' within the Controllers.

Change History (7)

comment:1 Changed 7 years ago by wmoore

  • Description modified (diff)

comment:2 Changed 7 years ago by wmoore

  • Remaining Time changed from 0.5 to 0
  • Resolution set to fixed
  • Status changed from new to closed

Removed all loading of data in BaseContainer?.init() and all references to eContext.

Replaced usage of eContext either with ome.user provided by new decorator or by E.g. conn.isLeader() in views.py methods.
NB: This included a change to Blitz Gateway to move isLeader() from group to conn.

Final commit https://github.com/will-moore/openmicroscopy/commit/831a87aba20d678e5dc76669c91eda8207d5c7f4 on branch https://github.com/will-moore/openmicroscopy/tree/render_decorator_7394

Closing...

comment:3 Changed 7 years ago by Will Moore <will@…>

(In [b6255a4b7169b70cf1be446015a24ab628d75daf/ome.git] on branch develop) Removing eContext.breadcrumb from webclient. See #8516

comment:4 Changed 7 years ago by Will Moore <will@…>

(In [403517de75db462a9251744e5e3e6d0121f0e3c2/ome.git] on branch develop) Using {{ ome.user }} instead of eContext.user. See #8516

comment:5 Changed 7 years ago by Will Moore <will@…>

(In [0a3a73bef8a568e7a97beaf000e4db8669f60aa0/ome.git] on branch develop) Use {{ ome.eventContext }} instead of eContext.context. See #8516

comment:6 Changed 7 years ago by Will Moore <will@…>

(In [66821281add9a8ee57e5cba84e4ba9145826d0ec/ome.git] on branch develop) Don't load groups in BaseContainer?.init See #8516

The forms that need all groups load them in views.py. Other pages that were
being passed the form_active_group were not actually using it - this has been removed
from views.py too.

comment:7 Changed 7 years ago by Will Moore <will@…>

(In [543b47c34c78f8292c799a1e43a12b848a972781/ome.git] on branch develop) Blitz group.isLeader() moved to conn.isLeader()

This method is not based on a Group, but on the eventContext, so it should be available
on the conn itself, not on any particular Group object. Part of cleanup: See #8516

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.86767 sec.)

We're Hiring!