Skip to content

Commit

Permalink
[No ticket] Update language and counts on summary page (#2381)
Browse files Browse the repository at this point in the history
-   Ticket: [No ticket]
-   Feature flag: n/a

## Purpose
- Update and clarify language on summary page

## Summary of Changes
- Update Registration count to account for embargoed registrations
  - Update label
- Update labels for Licenses, Add-ons, Storage Region graphs
  • Loading branch information
futa-ikeda authored Nov 7, 2024
1 parent 0a3b593 commit 4320073
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ module('Integration | institutions | dashboard | -components | kpi-chart-wrapper

// And the title is verified
assert.dom(`${parentDom} [data-test-chart-title]`)
.hasText('Licenses');
.hasText('Top 10 Licenses');

// And the expanded data position 0 name is verified
assert.dom(`${parentDom} [data-test-expanded-name="0"]`)
Expand Down Expand Up @@ -259,7 +259,7 @@ module('Integration | institutions | dashboard | -components | kpi-chart-wrapper

// And the title is verified
assert.dom(`${parentDom} [data-test-chart-title]`)
.hasText('Add-ons');
.hasText('Top 10 Add-ons');

// And the expanded data position 0 name is verified
assert.dom(`${parentDom} [data-test-expanded-name="0"]`)
Expand Down Expand Up @@ -295,7 +295,7 @@ module('Integration | institutions | dashboard | -components | kpi-chart-wrapper

// And the title is verified
assert.dom(`${parentDom} [data-test-chart-title]`)
.hasText('Storage Regions');
.hasText('Top Storage Regions');

// And the expanded data position 0 name is verified
assert.dom(`${parentDom} [data-test-expanded-name="0"]`)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ module('Integration | institutions | dashboard | -components | total-count-kpi-w
assert.dom(parentContainer)
.exists('The Total Registration Widget exists');
assert.dom(parentContainer)
.hasText('100 OSF Registrations');
.hasText('300 OSF Public and Embargoed Registrations');
assert.dom(`${parentContainer} [data-test-kpi-icon]`)
.hasAttribute('data-icon', 'archive');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ export default class TotalCountKpiWrapperComponent extends Component<TotalCountK
return summaryMetrics.privateProjectCount + summaryMetrics.publicProjectCount;
}

private calculateRegistrations(summaryMetrics: InstitutionSummaryMetricModel): number {
return summaryMetrics.embargoedRegistrationCount + summaryMetrics.publicRegistrationCount;
}

@task
@waitFor
private async loadData(): Promise<void> {
Expand Down Expand Up @@ -70,7 +74,7 @@ export default class TotalCountKpiWrapperComponent extends Component<TotalCountK
},
{
title: this.intl.t('institutions.dashboard.kpi-panel.registrations'),
total: metrics.summaryMetrics.publicRegistrationCount,
total: this.calculateRegistrations(metrics.summaryMetrics),
icon: 'archive',
},
{
Expand Down
8 changes: 4 additions & 4 deletions translations/en-us.yml
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ institutions:
kpi-panel:
users: 'Total Users'
projects: 'OSF Public and Private Projects'
registrations: 'OSF Registrations'
registrations: 'OSF Public and Embargoed Registrations'
preprints: 'OSF Preprints'
storage: 'Total Storage in {unit}'
file-count: 'Total Public File Count'
Expand All @@ -859,9 +859,9 @@ institutions:
total-osf-objects:
title: 'Total OSF Objects'
preprints: 'Preprints'
licenses: 'Licenses'
add-ons: 'Add-ons'
storage-regions: 'Storage Regions'
licenses: 'Top 10 Licenses'
add-ons: 'Top 10 Add-ons'
storage-regions: 'Top Storage Regions'
public-vs-private-data-storage:
title: 'Public vs Private Data Storage'
public: 'Public Data Storage'
Expand Down

0 comments on commit 4320073

Please sign in to comment.