Skip to content

Commit

Permalink
refactor documentation and names
Browse files Browse the repository at this point in the history
  • Loading branch information
John Tordoff committed Oct 1, 2024
1 parent 53fb3d6 commit 927f8c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
9 changes: 0 additions & 9 deletions api/institutions/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,15 +364,6 @@ class NewInstitutionSummaryMetricsSerializer(JSONAPISerializer):
used only when the INSTITUTIONAL_DASHBOARD_2024 feature flag is active
(and should be renamed without "New" when that flag is permanently active)
Summary contains counts of
- Total users in the institution
- Total public project count for the institution
- Total private project count for the institution
- Total public registration count for the institution
- Total private registration count for the institution
- Total published preprint count for the institution
'''

class Meta:
Expand Down
8 changes: 4 additions & 4 deletions api/institutions/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ def get_default_search(self):
)


class _NewInstitutionSummaryMetricsList(JSONAPIBaseView, generics.RetrieveAPIView, InstitutionMixin):
class _NewInstitutionSummaryMetricsDetail(JSONAPIBaseView, generics.RetrieveAPIView, InstitutionMixin):
'''list view for institution-summary metrics
used only when the INSTITUTIONAL_DASHBOARD_2024 feature flag is active
Expand Down Expand Up @@ -621,12 +621,12 @@ def get_default_search(self):
)


institution_summary_metrics_list_view = toggle_view_by_flag(
institution_summary_metrics_detail_view = toggle_view_by_flag(
flag_name=osf.features.INSTITUTIONAL_DASHBOARD_2024,
old_view=_OldInstitutionSummaryMetrics.as_view(),
new_view=_NewInstitutionSummaryMetricsList.as_view(),
new_view=_NewInstitutionSummaryMetricsDetail.as_view(),
)
institution_summary_metrics_list_view.view_name = 'institution-summary-metrics'
institution_summary_metrics_detail_view.view_name = 'institution-summary-metrics'


institution_user_metrics_list_view = toggle_view_by_flag(
Expand Down

0 comments on commit 927f8c0

Please sign in to comment.