Back to home page

EIC code displayed by LXR

 
 

    


Warning, /swf-monitor/docs/USER_VIEW.md is written in an unsupported language. File is not indexed.

0001 # The user view
0002 
0003 The user view is the reduced face of epicprod for collaborators: the
0004 same pages with less on them, behind one parameter. It is entered from
0005 the bold **User view** link before Requests in the production nav, or
0006 from any URL carrying `?user_view=1`, and left by any URL without it.
0007 
0008 ## The parameter
0009 
0010 `user_view` is universal. `?user_view=1` renders a page in the user
0011 view and `?user_view=0` leaves it; a request that does not state it
0012 renders the page as it was. The context processor
0013 (`monitor_app.context_processors.system_status_nav`) exposes
0014 `user_view` (boolean) and `user_view_param` (`'1'`, `'0'` or empty) to
0015 every template, so any page tailors itself with
0016 `{% if not user_view %}` around what a collaborator does not need, and
0017 a view reads `request.GET.get('user_view')` when it should not build
0018 what it will not show.
0019 
0020 The view follows the URL alone. Nothing is remembered in the browser
0021 or in a session: a URL without `user_view=1` renders the full view,
0022 whatever page came before. The base template sets `data-user-view` on
0023 the document element from the parameter and nothing else. The user
0024 nav's own links carry the parameter, and a page's internal links carry
0025 it where the destination is meant to stay in the user view.
0026 
0027 ## The nav
0028 
0029 Contained simplicity. The brand at top left reads "epicprod User View"
0030 and is a plain link to the user view home, which is the production root
0031 in the mode: `https://epic-devcloud.org/prod/?user_view=1` (the
0032 production hub view renders the home when the parameter is on; the
0033 earlier `pcs/user/` redirects there). It has no pulldown, and the mode
0034 flipper is not shown. The menu is Requests (Request form, Request
0035 list), Campaign (Current campaign, Campaign Catalog),
0036 Find data, then a wider gap and Full epicprod view, which leaves the
0037 user view. The System menu and the built-at line are not shown; the
0038 account name and Logout remain.
0039 
0040 The conventions: white is for the title or a major section label,
0041 everything else in the menu bar is the menu-bar blue (`#8fc7e8`), and
0042 the user view has no sections, so its only white text is the brand.
0043 `style.css` paints plain top-level links white; a link added to the
0044 user nav takes the class `nav-user-item` for the blue.
0045 
0046 ## Pages
0047 
0048 - Current campaign is the campaign plan (`pcs/plan/`) without the
0049   delivery map; the view does not build the snapper embed under
0050   `user_view=1`. It lists each physics configuration once, as its
0051   newest edition with a task of its own: a production edition over an
0052   EVGEN-stage record, a current edition over a withdrawn one, then the
0053   newest release (`pcs.views._campaign_plan_state`).
0054 - The home page is the production root with the parameter; the hub
0055   view renders the user home template there. `pcs/user/` redirects to
0056   it.
0057 
0058 Further tailoring is named page by page.