2021-02-03 22:08:01 +03:00
|
|
|
<div class="flex justify-between mb6 items-stretch gh-members-chart-wrapper gh-main-width"
|
2020-05-22 19:58:01 +03:00
|
|
|
{{did-insert (perform this.fetchStatsTask)}}
|
|
|
|
>
|
2019-12-17 13:29:26 +03:00
|
|
|
|
|
|
|
{{!-- Chart title/filter graph --}}
|
2021-02-03 22:08:01 +03:00
|
|
|
<div class="flex-auto gh-content-box mr6 gh-members-chart-box">
|
2019-12-17 13:29:26 +03:00
|
|
|
<div class="flex justify-between items-center gh-members-chart-header">
|
2021-02-03 22:08:01 +03:00
|
|
|
<h2 class="f-small ttu white fw5 mb0">Total members</h2>
|
2019-12-17 13:29:26 +03:00
|
|
|
<div class="view-actions">
|
2020-05-22 13:38:50 +03:00
|
|
|
<div class="gh-contentfilter gh-contentfilter-menu gh-contentfilter-type">
|
2020-01-15 16:53:51 +03:00
|
|
|
<PowerSelect
|
|
|
|
@selected={{this.selectedRange}}
|
2020-05-22 19:58:01 +03:00
|
|
|
@options={{this.availableRanges}}
|
2020-01-23 11:16:15 +03:00
|
|
|
@searchEnabled={{false}}
|
2020-01-15 16:53:51 +03:00
|
|
|
@onChange={{action "changeDateRange"}}
|
2020-05-18 00:35:53 +03:00
|
|
|
@triggerComponent="gh-power-select/trigger"
|
2020-01-15 16:53:51 +03:00
|
|
|
@triggerClass="gh-contentfilter-menu-trigger"
|
|
|
|
@dropdownClass="gh-contentfilter-menu-dropdown gh-members-chart-dropdown"
|
2020-01-23 11:16:15 +03:00
|
|
|
@matchTriggerWidth={{false}}
|
2020-01-15 16:53:51 +03:00
|
|
|
data-test-type-select="true"
|
|
|
|
as |range|
|
|
|
|
>
|
|
|
|
{{range.name}}
|
|
|
|
</PowerSelect>
|
2019-12-17 13:29:26 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="gh-members-chart-container">
|
2020-05-27 18:12:13 +03:00
|
|
|
{{#if (not this.stats)}}
|
2020-05-22 19:58:01 +03:00
|
|
|
<GhLoadingSpinner />
|
|
|
|
{{else}}
|
|
|
|
<EmberChart
|
|
|
|
@type="LineWithLine"
|
|
|
|
@options={{this.chartOptions}}
|
|
|
|
@data={{this.chartData}}
|
|
|
|
@height={{300}} />
|
|
|
|
{{/if}}
|
2019-12-17 13:29:26 +03:00
|
|
|
</div>
|
|
|
|
<div class="flex justify-between pa4 pt0 pb2 nt1">
|
2020-05-22 19:58:01 +03:00
|
|
|
<span class="f8 midlightgrey">{{this.startDateLabel}}</span>
|
2019-12-17 13:29:26 +03:00
|
|
|
<span class="f8 midlightgrey">Today</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{!-- Summary --}}
|
2021-02-03 22:08:01 +03:00
|
|
|
<div class="gh-content-box gh-members-chart-summary flex flex-column justify-between">
|
2019-12-17 13:29:26 +03:00
|
|
|
<div class="flex-auto flex flex-column justify-center items-start pa4 bb b--whitegrey">
|
2021-02-03 22:08:01 +03:00
|
|
|
<h3 class="f-small ttu black fw5">Total Members</h3>
|
2020-05-27 18:12:13 +03:00
|
|
|
<div class="gh-members-chart-summary-data">{{if (not this.stats) "-" (format-number this.stats.total)}}</div>
|
2019-12-17 13:29:26 +03:00
|
|
|
</div>
|
|
|
|
<div class="flex-auto flex flex-column justify-center items-start pa4 bb b--whitegrey">
|
2020-07-06 17:19:47 +03:00
|
|
|
{{#if (eq this.selectedRange.days "all-time")}}
|
2021-02-03 22:08:01 +03:00
|
|
|
<h3 class="f-small ttu black fw5">All time signups</h3>
|
2019-12-17 13:29:26 +03:00
|
|
|
{{else}}
|
2021-02-03 22:08:01 +03:00
|
|
|
<h3 class="f-small ttu black fw5">Signed up in the last {{this.selectedRange.days}} days</h3>
|
2019-12-17 13:29:26 +03:00
|
|
|
{{/if}}
|
2020-05-27 18:12:13 +03:00
|
|
|
<div class="gh-members-chart-summary-data">{{if (not this.stats) "-" (format-number this.stats.total_in_range)}}</div>
|
2019-12-17 13:29:26 +03:00
|
|
|
</div>
|
|
|
|
<div class="flex-auto flex flex-column justify-center items-start pa4">
|
2021-02-03 22:08:01 +03:00
|
|
|
<h3 class="f-small ttu black fw5">Signed up today</h3>
|
2020-05-27 18:12:13 +03:00
|
|
|
<div class="gh-members-chart-summary-data">{{if (not this.stats) "-" (format-number this.stats.new_today)}}</div>
|
2019-12-17 13:29:26 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|