1
|
<div class="uk-section-default uk-section uk-section-small uk-padding-remove-bottom" style="min-height: 325px">
|
2
|
|
3
|
<!-- MARGIN-TOP -->
|
4
|
<div class="uk-sticky-placeholder" style="height: 84px; margin: 0px;" aria-hidden="true"></div>
|
5
|
<div class="uk-container">
|
6
|
|
7
|
<div class="uk-grid-margin uk-grid uk-grid-stack" uk-grid="">
|
8
|
<div class="uk-width-1-1@m uk-first-column">
|
9
|
|
10
|
<h1 class="uk-h2">Get usage statistics report</h1>
|
11
|
|
12
|
<!-- TOP HELP CONTENT -->
|
13
|
<help-content #topHelperContent [position]="'top'"
|
14
|
[ngClass]="topHelperContent.isPresent()?'uk-margin-medium-top uk-margin-medium-bottom':'clear-style'">
|
15
|
</help-content>
|
16
|
|
17
|
<div class="uk-container uk-margin-medium-top uk-margin-medium-bottom">
|
18
|
<div class="uk-grid">
|
19
|
|
20
|
<!-- LEFT HELP CONTENT -->
|
21
|
<aside-help-content #leftHelperContent [position]="'left'"
|
22
|
[ngClass]="leftHelperContent.isPresent()?'tm-sidebar uk-width-1-4@m uk-first-column':'clear-style'">
|
23
|
</aside-help-content>
|
24
|
|
25
|
<!-- MIDDLE -->
|
26
|
<div class=" uk-width-expand@m" style="min-height:500px;">
|
27
|
|
28
|
<div *ngIf="errorMessage" class="uk-alert uk-alert-warning">{{errorMessage}}</div>
|
29
|
<div *ngIf="loadingMessage" class="loading-big">
|
30
|
<div class="loader-big" style="text-align: center; padding-top: 170px; color: rgb(47, 64, 80); font-weight: bold;">
|
31
|
{{ loadingMessage }}
|
32
|
</div>
|
33
|
<div class="whiteFilm"></div>
|
34
|
</div>
|
35
|
<div *ngIf="repoResponse" class="uk-margin-top">
|
36
|
<h3>{{ repoResponse.ReportDefinition['@Name'] }} Report Results
|
37
|
<span *ngIf="repoResponse.Report &&
|
38
|
repoResponse.Report.Report &&
|
39
|
repoResponse.Report.Report.Customer &&
|
40
|
repoResponse.Report.Report.Customer.ReportItems &&
|
41
|
repoResponse.Report.Report.Customer.ReportItems.length > 0">for {{ repoResponse.Report.Report.Customer.ReportItems[0].ItemPlatform }}</span>
|
42
|
</h3>
|
43
|
<div class="uk-width-1-2">
|
44
|
<table class="uk-table">
|
45
|
<tr>
|
46
|
<th>Period covered</th>
|
47
|
<td>{{ coveredPeriod }}</td>
|
48
|
</tr>
|
49
|
<tr>
|
50
|
<th>Filters</th>
|
51
|
<td>
|
52
|
<span *ngFor="let filter of repoResponse.ReportDefinition.Filters.Filter; let i = index">
|
53
|
<br *ngIf="i>0">
|
54
|
{{ filter.Name }}: {{ filter.Value }}
|
55
|
</span>
|
56
|
</td>
|
57
|
</tr>
|
58
|
<tr>
|
59
|
<th>Date run</th>
|
60
|
<td>{{ repoResponse.Report.Report['@Created'] | date: "yyyy-MM-dd HH:mm:ss" }}</td>
|
61
|
</tr>
|
62
|
<tr>
|
63
|
<th>Number of results</th>
|
64
|
<td>{{ repoResponse.ReportDefinition.Filters.ReportAttribute[1].Value }}</td>
|
65
|
</tr>
|
66
|
</table>
|
67
|
</div>
|
68
|
<div *ngIf="repoResponse.Report.Report.Customer &&
|
69
|
repoResponse.Report.Report.Customer.ReportItems">
|
70
|
<div>
|
71
|
<div class="show-options uk-inline" style="float: right;">
|
72
|
<div class="filterLabel" style="display: inline;">Results per page:</div>
|
73
|
<div [formGroup]="pageSizeSelect" class="inlineBlock">
|
74
|
<select class="form-control" formControlName="selectPageSize" (change)="getPageSize()">
|
75
|
<option value="10" selected>10</option>
|
76
|
<option value="25">25</option>
|
77
|
<option value="50">50</option>
|
78
|
<option value="100">100</option>
|
79
|
</select>
|
80
|
</div>
|
81
|
</div>
|
82
|
</div><br>
|
83
|
<div class="contentAndPagerPanel">
|
84
|
|
85
|
<!-- TOP PAGINATION LINKS -->
|
86
|
<div>
|
87
|
<ul class="uk-pagination">
|
88
|
<li>
|
89
|
<a class="uk-link uk-link-muted" (click)="goToPreviousPage()">
|
90
|
<span class="uk-margin-small-right uk-pagination-previous uk-icon" uk-pagination-previous="">
|
91
|
<svg width="7" height="12" viewBox="0 0 7 12" xmlns="http://www.w3.org/2000/svg"
|
92
|
icon="pagination-previous" ratio="1"></svg>
|
93
|
</span>
|
94
|
Previous
|
95
|
</a>
|
96
|
</li>
|
97
|
<li class="uk-margin-auto-left">
|
98
|
<a class="uk-link uk-link-muted" (click)="goToNextPage()">
|
99
|
Next
|
100
|
<span class="uk-margin-small-left uk-pagination-next uk-icon" uk-pagination-next="">
|
101
|
<svg width="7" height="12" viewBox="0 0 7 12" xmlns="http://www.w3.org/2000/svg"
|
102
|
icon="pagination-next" ratio="1"></svg>
|
103
|
</span>
|
104
|
</a>
|
105
|
</li>
|
106
|
</ul>
|
107
|
<div class="resultsPageLabel">page {{ (totalPages > 0) ? page+1 : 0 }} of {{ totalPages }}</div>
|
108
|
</div>
|
109
|
|
110
|
|
111
|
<!-- RESULTS TABLE -->
|
112
|
<div>
|
113
|
<div>
|
114
|
<div class="uk-overflow-auto uk-scrollspy-inview uk-animation-slide-top-medium uk-margin-top uk-margin-bottom">
|
115
|
|
116
|
<table class="uk-table uk-table-middle uk-table-striped" style="vertical-align: top !important;">
|
117
|
<thead>
|
118
|
<tr>
|
119
|
<th *ngIf="chosenReport !== 'RR1'">Title</th>
|
120
|
<th *ngIf="chosenReport !== 'RR1'">Publisher</th>
|
121
|
<th *ngIf="chosenReport === 'RR1'">Platform name</th>
|
122
|
<th>{{ (chosenReport !== 'RR1') ? 'Item Urls' : 'Url' }}</th>
|
123
|
<th>Type</th>
|
124
|
<th colspan="2">Downloads/Views</th>
|
125
|
</tr>
|
126
|
</thead>
|
127
|
<td colspan="6" *ngIf="infoMessage" class="uk-alert">{{ infoMessage }}</td>
|
128
|
<tbody *ngFor="let item of repoResponse.Report.Report.Customer.ReportItems; let item_i = index"
|
129
|
style="border-bottom: 1px solid whitesmoke;">
|
130
|
<tr>
|
131
|
<td *ngIf="chosenReport !== 'RR1'">{{ item.ItemName }}</td>
|
132
|
<td *ngIf="chosenReport !== 'RR1'">{{ item.ItemPublisher }}</td>
|
133
|
<td *ngIf="chosenReport === 'RR1'">{{ item.ItemPlatform }}</td>
|
134
|
<td style="min-width: 300px;">
|
135
|
<span *ngFor="let url of transformItem(item.ItemIdentifier); let i = index">
|
136
|
<br *ngIf="i>0">{{ url }}
|
137
|
</span>
|
138
|
</td>
|
139
|
<td>{{ item.ItemDataType }}</td>
|
140
|
<td class="uk-text-center"
|
141
|
*ngIf="repoResponse.ReportDefinition.Filters.ReportAttribute[0].Value === 'Monthly'" colspan="2">
|
142
|
<a *ngIf="item.ItemPerformance && (item.ItemPerformance.length > 0)"
|
143
|
(click)="displayItemPerformance(item_i)">{{ (selectedItemIndex === item_i) ? 'Hide' : 'See' }} results</a>
|
144
|
</td>
|
145
|
<td class="uk-text-center"
|
146
|
*ngIf="repoResponse.ReportDefinition.Filters.ReportAttribute[0].Value === 'Totals'">
|
147
|
{{ item.ItemPerformance[0].Instance[0].Count }}
|
148
|
</td>
|
149
|
<td class="uk-text-center"
|
150
|
*ngIf="repoResponse.ReportDefinition.Filters.ReportAttribute[0].Value === 'Totals'">
|
151
|
{{ item.ItemPerformance[0].Instance[1].Count }}
|
152
|
</td>
|
153
|
</tr>
|
154
|
<tr *ngIf="(selectedItemIndex === item_i)">
|
155
|
<td colspan="6">
|
156
|
<div class="uk-animation-slide-top-medium uk-margin-small-top">
|
157
|
<table class="uk-table uk-table-middle uk-table-striped innerTable">
|
158
|
<tr>
|
159
|
<th>Month</th>
|
160
|
<th>Downloads</th>
|
161
|
<th>Views</th>
|
162
|
</tr>
|
163
|
<tr *ngFor="let month of item.ItemPerformance">
|
164
|
<td>{{ month.Period.Begin | date: "MMM yyyy" }}</td>
|
165
|
<td>{{ month.Instance[0].Count }}</td>
|
166
|
<td>{{ month.Instance[1].Count }}</td>
|
167
|
</tr>
|
168
|
</table>
|
169
|
</div>
|
170
|
</td>
|
171
|
</tr>
|
172
|
</tbody>
|
173
|
</table>
|
174
|
|
175
|
</div>
|
176
|
</div>
|
177
|
</div>
|
178
|
|
179
|
<!-- BOTTOM PAGINATION LINKS -->
|
180
|
<div>
|
181
|
<ul class="uk-pagination">
|
182
|
<li>
|
183
|
<a class="uk-link uk-link-muted" (click)="goToPreviousPage()">
|
184
|
<span class="uk-margin-small-right uk-pagination-previous uk-icon" uk-pagination-previous="">
|
185
|
<svg width="7" height="12" viewBox="0 0 7 12" xmlns="http://www.w3.org/2000/svg"
|
186
|
icon="pagination-previous" ratio="1"></svg>
|
187
|
</span>
|
188
|
Previous
|
189
|
</a>
|
190
|
</li>
|
191
|
<li class="uk-margin-auto-left">
|
192
|
<a class="uk-link uk-link-muted" (click)="goToNextPage()">
|
193
|
Next
|
194
|
<span class="uk-margin-small-left uk-pagination-next uk-icon" uk-pagination-next="">
|
195
|
<svg width="7" height="12" viewBox="0 0 7 12" xmlns="http://www.w3.org/2000/svg"
|
196
|
icon="pagination-next" ratio="1"></svg>
|
197
|
</span>
|
198
|
</a>
|
199
|
</li>
|
200
|
</ul>
|
201
|
<div class="resultsPageLabel">page {{ (totalPages > 0) ? page+1 : 0 }} of {{ totalPages }}</div>
|
202
|
</div>
|
203
|
</div>
|
204
|
</div>
|
205
|
|
206
|
</div>
|
207
|
|
208
|
</div>
|
209
|
|
210
|
<!-- RIGHT HELP CONTENT -->
|
211
|
<aside-help-content #rightHelperContent [position]="'right'"
|
212
|
[ngClass]="rightHelperContent.isPresent()?'tm-sidebar uk-width-1-4@m uk-first-column':'clear-style'">
|
213
|
</aside-help-content>
|
214
|
|
215
|
</div>
|
216
|
</div>
|
217
|
|
218
|
|
219
|
<!-- BOTTOM HELP CONTENT -->
|
220
|
<help-content #bottomHelperContent [position]="'bottom'"
|
221
|
[ngClass]="bottomHelperContent.isPresent()?'uk-margin-medium-top uk-margin-medium-bottom':'clear-style'">
|
222
|
</help-content>
|
223
|
|
224
|
|
225
|
</div>
|
226
|
</div>
|
227
|
</div>
|
228
|
</div>
|
229
|
|