Skip to content

Commit

Permalink
Adding route for institutional dashboard (#9392)
Browse files Browse the repository at this point in the history
## Purpose

Serve the ember institutional dashboard

## Changes

Adding route to ember, adding return ember app to institution views.

## QA Notes

  - Does this change require a data migration? If so, what data will we migrate?
No
  - What is the level of risk?
minimal
    - Any permissions code touched?
No
    - Is this an additive or subtractive change, other?
Additive
  - How can QA verify? (Through UI, API, AdminApp or AdminAdminApp?)
UI
    - If verifying through API, what's the new version? Please include the endpoints in PR notes or Dev docs.
N/A
  - What features or workflows might this change impact?
Institutional Dashboard
  - How will this impact performance?
N/A
-->

## Documentation

N/A

## Side Effects
N/A

## Ticket

https://openscience.atlassian.net/browse/ENG-1823
  • Loading branch information
corbinSanders committed May 21, 2020
1 parent 26a2949 commit f57aca3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions website/institutions/views.py
Expand Up @@ -3,6 +3,7 @@
from framework.exceptions import HTTPError

from osf.models import Institution
from website.ember_osf_web.views import use_ember_app

def serialize_institution(inst):
return {
Expand All @@ -21,3 +22,6 @@ def view_institution(inst_id, **kwargs):
except Institution.DoesNotExist:
raise HTTPError(http_status.HTTP_404_NOT_FOUND)
return serialize_institution(inst)

def view_institution_dashboard(inst_id, **kwargs):
return use_ember_app()
9 changes: 9 additions & 0 deletions website/routes.py
Expand Up @@ -1093,6 +1093,15 @@ def make_url_map(app):
Rule('/institutions/<inst_id>/', 'get', institution_views.view_institution, OsfWebRenderer('institution.mako', trust=False))
])

process_rules(app, [
Rule([
'/institutions/<inst_id>/dashboard/',
],
'get',
institution_views.view_institution_dashboard,
notemplate)
])

# Project

# Web
Expand Down

0 comments on commit f57aca3

Please sign in to comment.