Project

General

Profile

« Previous | Next » 

Revision 57586

1. update dashboard
1a. fill validation history table
1b. add ‘view more..’ links
1c. make cards clickable
2. fix redirect to /getImpact after login
3. skip grid/list views when there is only 1 registered repo

View differences:

modules/uoa-repository-dashboard-gui/branches/new-ui/src/app/pages/dashboard/dashboard.component.html
28 28
      <div class="uk-grid uk-grid-width-large-1-4 uk-grid-width-medium-1-2 uk-grid-medium uk-sortable sortable-handler" data-uk-sortable="" data-uk-grid-margin="">
29 29
        <div class="uk-row-first" style="">
30 30
          <div class="md-card">
31
            <div class="md-card-content">
32
              <div class="uk-float-right uk-margin-top uk-margin-small-right"><span class="peity_visitors peity_data" style="display: none;">5,3,9,6,5,9,7</span><svg class="peity" height="28" width="48"><rect data-value="5" fill="#d84315" x="1.3714285714285717" y="12.444444444444443" width="4.114285714285715" height="15.555555555555557"></rect><rect data-value="3" fill="#d84315" x="8.228571428571428" y="18.666666666666668" width="4.114285714285716" height="9.333333333333332"></rect><rect data-value="9" fill="#d84315" x="15.085714285714287" y="0" width="4.1142857142857086" height="28"></rect><rect data-value="6" fill="#d84315" x="21.942857142857147" y="9.333333333333336" width="4.114285714285707" height="18.666666666666664"></rect><rect data-value="5" fill="#d84315" x="28.800000000000004" y="12.444444444444443" width="4.114285714285707" height="15.555555555555557"></rect><rect data-value="9" fill="#d84315" x="35.65714285714286" y="0" width="4.114285714285707" height="28"></rect><rect data-value="7" fill="#d84315" x="42.51428571428572" y="6.222222222222221" width="4.114285714285707" height="21.77777777777778"></rect></svg></div>
33
              <span class="uk-text-muted uk-text-small">Views</span>
34
              <h2 class="uk-margin-remove">
35
                <span *ngIf="pageViews == '--'" class="countUpMe">{{ pageViews }}</span>
36
                <span *ngIf="pageViews != '--'" class="countUpMe">{{ pageViews | number }}</span>
37
              </h2>
38
            </div>
31
            <a [routerLink]="['/getImpact/show_metrics/', selectedRepo.id]">
32
              <div class="md-card-content">
33
                <div class="uk-float-right uk-margin-top uk-margin-small-right"><span class="peity_visitors peity_data" style="display: none;">5,3,9,6,5,9,7</span><svg class="peity" height="28" width="48"><rect data-value="5" fill="#d84315" x="1.3714285714285717" y="12.444444444444443" width="4.114285714285715" height="15.555555555555557"></rect><rect data-value="3" fill="#d84315" x="8.228571428571428" y="18.666666666666668" width="4.114285714285716" height="9.333333333333332"></rect><rect data-value="9" fill="#d84315" x="15.085714285714287" y="0" width="4.1142857142857086" height="28"></rect><rect data-value="6" fill="#d84315" x="21.942857142857147" y="9.333333333333336" width="4.114285714285707" height="18.666666666666664"></rect><rect data-value="5" fill="#d84315" x="28.800000000000004" y="12.444444444444443" width="4.114285714285707" height="15.555555555555557"></rect><rect data-value="9" fill="#d84315" x="35.65714285714286" y="0" width="4.114285714285707" height="28"></rect><rect data-value="7" fill="#d84315" x="42.51428571428572" y="6.222222222222221" width="4.114285714285707" height="21.77777777777778"></rect></svg></div>
34
                <span class="uk-text-muted uk-text-small">Views</span>
35
                <h2 class="uk-margin-remove">
36
                  <span *ngIf="pageViews == '--'" class="countUpMe">{{ pageViews }}</span>
37
                  <span *ngIf="pageViews != '--'" class="countUpMe">{{ pageViews | number }}</span>
38
                </h2>
39
              </div>
40
            </a>
39 41
          </div>
40 42
        </div>
41 43
        <div style="">
42 44
          <div class="md-card">
43
            <div class="md-card-content">
44
              <div class="uk-float-right uk-margin-top uk-margin-small-right"><span class="peity_sale peity_data" style="display: none;">5,3,9,6,5,9,7,3,5,2</span><svg class="peity" height="28" width="64"><polygon fill="#d1e4f6" points="0 27.5 0 12.5 7.111111111111111 18.5 14.222222222222221 0.5 21.333333333333332 9.5 28.444444444444443 12.5 35.55555555555556 0.5 42.666666666666664 6.5 49.77777777777777 18.5 56.888888888888886 12.5 64 21.5 64 27.5"></polygon><polyline fill="none" points="0 12.5 7.111111111111111 18.5 14.222222222222221 0.5 21.333333333333332 9.5 28.444444444444443 12.5 35.55555555555556 0.5 42.666666666666664 6.5 49.77777777777777 18.5 56.888888888888886 12.5 64 21.5" stroke="#0288d1" stroke-width="1" stroke-linecap="square"></polyline></svg></div>
45
              <span class="uk-text-muted uk-text-small">Downloads</span>
46
              <h2 class="uk-margin-remove">
47
                <span *ngIf="totalDownloads == '--'">{{ totalDownloads }}</span>
48
                <span *ngIf="totalDownloads != '--'">{{ totalDownloads | number }}</span>
49
              </h2>
50
            </div>
45
            <a [routerLink]="['/getImpact/show_metrics/', selectedRepo.id]">
46
              <div class="md-card-content">
47
                <div class="uk-float-right uk-margin-top uk-margin-small-right"><span class="peity_sale peity_data" style="display: none;">5,3,9,6,5,9,7,3,5,2</span><svg class="peity" height="28" width="64"><polygon fill="#d1e4f6" points="0 27.5 0 12.5 7.111111111111111 18.5 14.222222222222221 0.5 21.333333333333332 9.5 28.444444444444443 12.5 35.55555555555556 0.5 42.666666666666664 6.5 49.77777777777777 18.5 56.888888888888886 12.5 64 21.5 64 27.5"></polygon><polyline fill="none" points="0 12.5 7.111111111111111 18.5 14.222222222222221 0.5 21.333333333333332 9.5 28.444444444444443 12.5 35.55555555555556 0.5 42.666666666666664 6.5 49.77777777777777 18.5 56.888888888888886 12.5 64 21.5" stroke="#0288d1" stroke-width="1" stroke-linecap="square"></polyline></svg></div>
48
                <span class="uk-text-muted uk-text-small">Downloads</span>
49
                <h2 class="uk-margin-remove">
50
                  <span *ngIf="totalDownloads == '--'">{{ totalDownloads }}</span>
51
                  <span *ngIf="totalDownloads != '--'">{{ totalDownloads | number }}</span>
52
                </h2>
53
              </div>
54
            </a>
51 55
          </div>
52 56
        </div>
53 57
        <div style="">
54 58
          <div class="md-card">
55
            <div class="md-card-content">
56
              <div class="uk-float-right uk-margin-top uk-margin-small-right"><span class="peity_orders peity_data" style="display: none;">64/100</span><svg class="peity" height="24" width="24"><path d="M 12 0 A 12 12 0 1 1 2.7538410866905263 19.649087876984275 L 7.376920543345263 15.824543938492138 A 6 6 0 1 0 12 6" data-value="64" fill="#8bc34a"></path><path d="M 2.7538410866905263 19.649087876984275 A 12 12 0 0 1 11.999999999999998 0 L 11.999999999999998 6 A 6 6 0 0 0 7.376920543345263 15.824543938492138" data-value="36" fill="#eee"></path></svg></div>
57
              <span class="uk-text-muted uk-text-small">Events</span>
58
              <h2 class="uk-margin-remove">
59
                <span class="countUpMe">{{ totalNumberOfEvents | number }}</span>
60
              </h2>
61
            </div>
59
            <a [routerLink]="['/content/events/', selectedRepo.id]">
60
              <div class="md-card-content">
61
                <div class="uk-float-right uk-margin-top uk-margin-small-right"><span class="peity_orders peity_data" style="display: none;">64/100</span><svg class="peity" height="24" width="24"><path d="M 12 0 A 12 12 0 1 1 2.7538410866905263 19.649087876984275 L 7.376920543345263 15.824543938492138 A 6 6 0 1 0 12 6" data-value="64" fill="#8bc34a"></path><path d="M 2.7538410866905263 19.649087876984275 A 12 12 0 0 1 11.999999999999998 0 L 11.999999999999998 6 A 6 6 0 0 0 7.376920543345263 15.824543938492138" data-value="36" fill="#eee"></path></svg></div>
62
                <span class="uk-text-muted uk-text-small">Events</span>
63
                <h2 class="uk-margin-remove">
64
                  <span class="countUpMe">{{ totalNumberOfEvents | number }}</span>
65
                </h2>
66
              </div>
67
            </a>
62 68
          </div>
63 69
        </div>
64 70
        <div style="">
65 71
          <div class="md-card">
66
            <div class="md-card-content">
67
              <div class="uk-float-right uk-margin-top uk-margin-small-right"><span class="peity_live peity_data" style="display: none;">7,5,8,7,6,5,2,5,3,10,10,3,6,5,6,3,3,6,8,3</span><svg class="peity" height="28" width="64"><polygon fill="#efebe9" points="0 27.5 0 8.600000000000001 3.3684210526315788 14 6.7368421052631575 5.899999999999999 10.105263157894736 8.600000000000001 13.473684210526315 11.3 16.842105263157894 14 20.210526315789473 22.1 23.57894736842105 14 26.94736842105263 19.4 30.31578947368421 0.5 33.68421052631579 0.5 37.05263157894737 19.4 40.421052631578945 11.3 43.78947368421052 14 47.1578947368421 11.3 50.526315789473685 19.4 53.89473684210526 19.4 57.263157894736835 11.3 60.63157894736842 5.899999999999999 64 19.4 64 27.5"></polygon><polyline fill="none" points="0 8.600000000000001 3.3684210526315788 14 6.7368421052631575 5.899999999999999 10.105263157894736 8.600000000000001 13.473684210526315 11.3 16.842105263157894 14 20.210526315789473 22.1 23.57894736842105 14 26.94736842105263 19.4 30.31578947368421 0.5 33.68421052631579 0.5 37.05263157894737 19.4 40.421052631578945 11.3 43.78947368421052 14 47.1578947368421 11.3 50.526315789473685 19.4 53.89473684210526 19.4 57.263157894736835 11.3 60.63157894736842 5.899999999999999 64 19.4" stroke="#5d4037" stroke-width="1" stroke-linecap="square"></polyline></svg></div>
68
              <ng-container *ngIf="lastIndexedVersion">
69
                <span class="uk-text-muted uk-text-small">Records collected <span *ngIf="lastIndexedVersion.date">on {{lastIndexedVersion.date | date : "yyyy-MM-dd"}}</span></span>
70
                <h2 class="uk-margin-remove">{{lastIndexedVersion.numberOfRecords | number}}</h2>
71
              </ng-container>
72
              <ng-container *ngIf="!lastIndexedVersion">
73
                <span class="uk-text-muted uk-text-small">Records collected</span>
74
                <h2 class="uk-margin-remove">no data available</h2>
75
              </ng-container>
76
            </div>
72
            <a [routerLink]="['/compatibility/monitor/', selectedRepo.id]">
73
              <div class="md-card-content">
74
                <div class="uk-float-right uk-margin-top uk-margin-small-right"><span class="peity_live peity_data" style="display: none;">7,5,8,7,6,5,2,5,3,10,10,3,6,5,6,3,3,6,8,3</span><svg class="peity" height="28" width="64"><polygon fill="#efebe9" points="0 27.5 0 8.600000000000001 3.3684210526315788 14 6.7368421052631575 5.899999999999999 10.105263157894736 8.600000000000001 13.473684210526315 11.3 16.842105263157894 14 20.210526315789473 22.1 23.57894736842105 14 26.94736842105263 19.4 30.31578947368421 0.5 33.68421052631579 0.5 37.05263157894737 19.4 40.421052631578945 11.3 43.78947368421052 14 47.1578947368421 11.3 50.526315789473685 19.4 53.89473684210526 19.4 57.263157894736835 11.3 60.63157894736842 5.899999999999999 64 19.4 64 27.5"></polygon><polyline fill="none" points="0 8.600000000000001 3.3684210526315788 14 6.7368421052631575 5.899999999999999 10.105263157894736 8.600000000000001 13.473684210526315 11.3 16.842105263157894 14 20.210526315789473 22.1 23.57894736842105 14 26.94736842105263 19.4 30.31578947368421 0.5 33.68421052631579 0.5 37.05263157894737 19.4 40.421052631578945 11.3 43.78947368421052 14 47.1578947368421 11.3 50.526315789473685 19.4 53.89473684210526 19.4 57.263157894736835 11.3 60.63157894736842 5.899999999999999 64 19.4" stroke="#5d4037" stroke-width="1" stroke-linecap="square"></polyline></svg></div>
75
                <ng-container *ngIf="lastIndexedVersion">
76
                  <span class="uk-text-muted uk-text-small">Records collected <span *ngIf="lastIndexedVersion.date">on {{lastIndexedVersion.date | date : "yyyy-MM-dd"}}</span></span>
77
                  <h2 class="uk-margin-remove">{{lastIndexedVersion.numberOfRecords | number}}</h2>
78
                </ng-container>
79
                <ng-container *ngIf="!lastIndexedVersion">
80
                  <span class="uk-text-muted uk-text-small">Records collected</span>
81
                  <h2 class="uk-margin-remove">no data available</h2>
82
                </ng-container>
83
              </div>
84
            </a>
77 85
          </div>
78 86
        </div>
79 87
      </div>
......
154 162
                  </div>
155 163
                </div>
156 164
              </div>
157

  
165
              <div class="uk-position-bottom-right" style="margin-bottom: 10px; margin-right: 10px"><a [routerLink]="['/compatibility/monitor/', selectedRepo.id]">view more..</a></div>
158 166
            </div>
159 167
          </div>
160 168
        </div>
......
166 174
            <div class="md-card-content">
167 175
              <h3 class="heading_a uk-margin-bottom">Validation History</h3>
168 176
              <div class="uk-overflow-container">
169
                <table class="uk-table">
177
                <div *ngIf="noValidationsMessage">{{ noValidationsMessage }}</div>
178
                <div *ngIf="errorValidationsMessage" class="uk-alert uk-alert-danger">{{ errorValidationsMessage }}</div>
179
                <div *ngIf="loadingJobSummaryMessage" class="loading-big">
180
                  <div class="loader-big" style="text-align: center; padding-top: 170px; color: rgb(47, 64, 80); font-weight: bold;">
181
                    {{ loadingJobSummaryMessage }}
182
                  </div>
183
                  <div class="whiteFilm"></div>
184
                </div>
185

  
186
                <table *ngIf="storedJob && (storedJob.length > 0) && !noValidationsMessage" class="uk-table">
170 187
                  <thead>
171 188
                  <tr>
172 189
                    <th class="uk-text-nowrap">Base URL</th>
190
                    <th class="uk-text-nowrap">Validation Type</th>
173 191
                    <th class="uk-text-nowrap">Status</th>
174
                    <th class="uk-text-nowrap">Guidelines</th>
175
                    <th class="uk-text-nowrap uk-text-right">Score</th>
192
                    <th class="uk-text-nowrap">Score</th>
193
                    <th class="uk-text-nowrap uk-text-right">Guidelines</th>
176 194
                  </tr>
177 195
                  </thead>
178 196
                  <tbody>
179
                  <tr class="uk-table-middle">
180
                    <td class="uk-width-3-10 uk-text-nowrap"><a href="page_scrum_board.html">ALTR-231</a></td>
181
                    <td class="uk-width-2-10 uk-text-nowrap"><span class="uk-badge">In progress</span></td>
182
                    <td class="uk-width-3-10">
183
                      <div class="uk-progress uk-progress-mini uk-progress-warning uk-margin-remove">
184
                        <div class="uk-progress-bar" style="width: 40%;"></div>
185
                      </div>
197
                  <tr *ngFor="let job of storedJob" class="uk-table-middle uk-text-muted">
198
                    <td class="uk-width-3-10 uk-text-nowrap"><div>{{ job.baseUrl }}</div></td>
199
                    <td>
200
                      <div *ngIf="job.validationType.includes('C')" class="">OAI Content</div>
201
                      <div *ngIf="job.validationType.includes('U')" class="">OAI Usage</div>
186 202
                    </td>
187
                    <td class="uk-width-2-10 uk-text-right uk-text-muted uk-text-small">24.11.2015</td>
188
                  </tr>
189
                  <tr class="uk-table-middle">
190
                    <td class="uk-width-3-10 uk-text-nowrap"><a href="page_scrum_board.html">ALTR-82</a></td>
191
                    <td class="uk-width-2-10 uk-text-nowrap"><span class="uk-badge uk-badge-warning">Open</span></td>
192
                    <td class="uk-width-3-10">
193
                      <div class="uk-progress uk-progress-mini uk-progress-success uk-margin-remove">
194
                        <div class="uk-progress-bar" style="width: 82%;"></div>
195
                      </div>
203
                    <td class="uk-text-nowrap">
204
                      <div [ngClass]="job.contentJobStatus == 'finished' ? 'uk-badge uk-badge-success':
205
                      ( job.contentJobStatus == 'ongoing' ) ? 'uk-badge' :
206
                      ( job.contentJobStatus == 'none' ) ? 'uk-badge uk-badge-warning' : 'clear-style' ">{{ job.contentJobStatus }}</div>
207
                      <br *ngIf="job.contentJobStatus == 'finished' || 'ongoing' || 'none' ">
208
                      <div [ngClass]="job.usageJobStatus == 'finished' ? 'uk-badge uk-badge-success':
209
                      ( job.usageJobStatus == 'ongoing' ) ? 'uk-badge' :
210
                      ( job.usageJobStatus == 'none' ) ? 'uk-badge uk-badge-warning' : 'clear-style' ">{{ job.usageJobStatus }}</div>
196 211
                    </td>
197
                    <td class="uk-width-2-10 uk-text-right uk-text-muted uk-text-small">21.11.2015</td>
198
                  </tr>
199
                  <tr class="uk-table-middle">
200
                    <td class="uk-width-3-10 uk-text-nowrap"><a href="page_scrum_board.html">ALTR-123</a></td>
201
                    <td class="uk-width-2-10 uk-text-nowrap"><span class="uk-badge uk-badge-primary">New</span></td>
202
                    <td class="uk-width-3-10">
203
                      <div class="uk-progress uk-progress-mini uk-margin-remove">
204
                        <div class="uk-progress-bar" style="width: 0;"></div>
205
                      </div>
212
                    <td>
213
                      <div>{{ job.contentJobScore }}</div>
214
                      <div>{{ job.usageJobScore }}</div>
206 215
                    </td>
207
                    <td class="uk-width-2-10 uk-text-right uk-text-muted uk-text-small">12.11.2015</td>
216
                    <td class="uk-width-3-10 uk-text-right"><div>{{ job.guidelinesShortName }}</div></td>
208 217
                  </tr>
209
                  <tr class="uk-table-middle">
210
                    <td class="uk-width-3-10 uk-text-nowrap"><a href="page_scrum_board.html">ALTR-164</a></td>
211
                    <td class="uk-width-2-10 uk-text-nowrap"><span class="uk-badge uk-badge-success">Resolved</span></td>
212
                    <td class="uk-width-3-10">
213
                      <div class="uk-progress uk-progress-mini uk-progress-primary uk-margin-remove">
214
                        <div class="uk-progress-bar" style="width: 61%;"></div>
215
                      </div>
216
                    </td>
217
                    <td class="uk-width-2-10 uk-text-right uk-text-muted uk-text-small">17.11.2015</td>
218
                  </tr>
219
                  <tr class="uk-table-middle">
220
                    <td class="uk-width-3-10 uk-text-nowrap"><a href="page_scrum_board.html">ALTR-123</a></td>
221
                    <td class="uk-width-2-10 uk-text-nowrap"><span class="uk-badge uk-badge-danger">Overdue</span></td>
222
                    <td class="uk-width-3-10">
223
                      <div class="uk-progress uk-progress-mini uk-progress-danger uk-margin-remove">
224
                        <div class="uk-progress-bar" style="width: 10%;"></div>
225
                      </div>
226
                    </td>
227
                    <td class="uk-width-2-10 uk-text-right uk-text-muted uk-text-small">12.11.2015</td>
228
                  </tr>
229
                  <tr class="uk-table-middle">
230
                    <td class="uk-width-3-10"><a href="page_scrum_board.html">ALTR-92</a></td>
231
                    <td class="uk-width-2-10"><span class="uk-badge uk-badge-success">Open</span></td>
232
                    <td class="uk-width-3-10">
233
                      <div class="uk-progress uk-progress-mini uk-margin-remove">
234
                        <div class="uk-progress-bar" style="width: 90%;"></div>
235
                      </div>
236
                    </td>
237
                    <td class="uk-width-2-10 uk-text-right uk-text-muted uk-text-small">08.11.2015</td>
238
                  </tr>
239 218
                  </tbody>
240 219
                </table>
220
                <div class="uk-position-bottom-right" style="margin-bottom: 10px; margin-right: 10px"><a [routerLink]="['/compatibility/browseHistory/']">view more..</a></div>
241 221
              </div>
242 222
            </div>
243 223
          </div>
......
267 247
                    <span class="sub-heading">Last month's reports</span>
268 248
                  </h2>
269 249
                  <div class="uk-margin-top">
270
                    <a class="md-btn md-btn-large md-btn-block md-btn-wave-light waves-effect waves-button waves-light" >AR1</a>
250
                    <a class="md-btn md-btn-large md-btn-block md-btn-wave-light waves-effect waves-button waves-light"
251
                       [routerLink]="['/getImpact/usagestats-report-results']" [queryParams]="{ report:'AR1', beginDate: currentDate, endDate: currentDate, repoId: shortSelectedRepoId, granularity:'Monthly'}">AR1</a>
271 252
                  </div>
272 253
                  <div class="uk-margin-top">
273
                    <a class="md-btn md-btn-large md-btn-block md-btn-wave-light waves-effect waves-button waves-light" >IR1</a>
254
                    <a class="md-btn md-btn-large md-btn-block md-btn-wave-light waves-effect waves-button waves-light"
255
                       [routerLink]="['/getImpact/usagestats-report-results']" [queryParams]="{ report:'IR1', beginDate: currentDate, endDate: currentDate, repoId: shortSelectedRepoId, granularity:'Monthly'}">IR1</a>
274 256
                  </div>
275 257
                  <div class="uk-margin-top">
276
                    <a class="md-btn md-btn-large md-btn-block md-btn-wave-light waves-effect waves-button waves-light" >RR1</a>
258
                    <a class="md-btn md-btn-large md-btn-block md-btn-wave-light waves-effect waves-button waves-light"
259
                       [routerLink]="['/getImpact/usagestats-report-results']" [queryParams]="{ report:'RR1', beginDate: currentDate, endDate: currentDate, repoId: shortSelectedRepoId, granularity:'Monthly'}">RR1</a>
277 260
                  </div>
278 261
                  <div class="uk-margin-top">
279
                    <a class="md-btn md-btn-large md-btn-block md-btn-wave-light waves-effect waves-button waves-light" >BR1</a>
262
                    <a class="md-btn md-btn-large md-btn-block md-btn-wave-light waves-effect waves-button waves-light"
263
                       [routerLink]="['/getImpact/usagestats-report-results']" [queryParams]="{ report:'BR1', beginDate: currentDate, endDate: currentDate, repoId: shortSelectedRepoId, granularity:'Monthly'}">BR1</a>
280 264
                  </div>
281 265
                  <div class="uk-margin-top">
282
                    <a class="md-btn md-btn-large md-btn-block md-btn-wave-light waves-effect waves-button waves-light" >BR2</a>
266
                    <a class="md-btn md-btn-large md-btn-block md-btn-wave-light waves-effect waves-button waves-light"
267
                       [routerLink]="['/getImpact/usagestats-report-results']" [queryParams]="{ report:'BR2', beginDate: currentDate, endDate: currentDate, repoId: shortSelectedRepoId, granularity:'Monthly'}">BR2</a>
283 268
                  </div>
284 269
                  <div *ngIf="selectedRepo && selectedRepo.datasourceType === 'journal'" class="uk-margin-top">
285
                    <a class="md-btn md-btn-large md-btn-block md-btn-wave-light waves-effect waves-button waves-light" >RR1</a>
270
                    <a class="md-btn md-btn-large md-btn-block md-btn-wave-light waves-effect waves-button waves-light"
271
                       [routerLink]="['/getImpact/usagestats-report-results']" [queryParams]="{ report:'RR1', beginDate: currentDate, endDate: currentDate, repoId: shortSelectedRepoId, granularity:'Monthly'}">RR1</a>
286 272
                  </div>
287 273
                </div>
288 274

  
289 275
              </div>
290 276

  
291 277
            </div>
278
            <div class="uk-position-bottom-right" style="margin-bottom: 10px; margin-right: 10px"><a [routerLink]="['/getImpact/show_metrics/', selectedRepo.id]">view more..</a></div>
292 279
          </div>
293 280

  
294 281
        </div>
......
328 315
                </ul>
329 316
              </div>
330 317
            </div>
318
            <div class="uk-position-bottom-right" style="margin-bottom: 10px; margin-right: 10px"><a [routerLink]="['/content/events/', selectedRepo.id]">view more..</a></div>
331 319
          </div>
332 320
        </div>
333 321

  
......
363 351
                </ul>
364 352
              </div>
365 353
            </div>
354
            <div class="uk-position-bottom-right" style="margin-bottom: 10px; margin-right: 10px"><a [routerLink]="['/content/events/', selectedRepo.id]">view more..</a></div>
366 355
          </div>
367 356
        </div>
368 357

  
......
398 387
                </ul>
399 388
              </div>
400 389
            </div>
390
            <div class="uk-position-bottom-right" style="margin-bottom: 10px; margin-right: 10px"><a [routerLink]="['/content/notifications']">view more..</a></div>
401 391
          </div>
402 392
        </div>
403 393
      </div>
modules/uoa-repository-dashboard-gui/branches/new-ui/src/app/pages/dashboard/dashboard.component.ts
6 6
  MetricsInfo, PiwikInfo,
7 7
  Repository,
8 8
  RepositorySnippet,
9
  RepositorySummaryInfo, UsageSummary
9
  RepositorySummaryInfo, StoredJob, UsageSummary
10 10
} from '../../domain/typeScriptClasses';
11 11
import {
12
  loadingAggregationHistory,
13
  loadingAggregationHistoryError, loadingMetrics, loadingMetricsError,
12
  loadingAggregationHistory, loadingAggregationHistoryError, loadingMetrics, loadingMetricsError,
14 13
  loadingReposMessage, loadingSubscriptions, loadingTopics, loadingTopicsError,
15
  loadingUserRepoInfoEmpty, noAggregationHistory, noSubscriptionsFound, noTopicsFound,
16
  reposRetrievalError
17
} from "../../domain/shared-messages";
18
import {DashboardService} from "../../services/dashboard.service";
19
import {DomSanitizer, SafeResourceUrl} from "@angular/platform-browser";
20
import {PiwikService} from "../../services/piwik.service";
14
  loadingUserRepoInfoEmpty, noAggregationHistory, noSubscriptionsFound, noTopicsFound, reposRetrievalError,
15
  loadingJobSummary, loadingJobSummaryError
16
} from '../../domain/shared-messages';
17
import {DashboardService} from '../../services/dashboard.service';
18
import {DomSanitizer, SafeResourceUrl} from '@angular/platform-browser';
19
import {PiwikService} from '../../services/piwik.service';
20
import {ValidatorService} from '../../services/validator.service';
21 21

  
22 22
@Component ({
23 23
  selector: 'app-dashboard',
......
37 37
              private repositoryService: RepositoryService,
38 38
              private dashboardService: DashboardService,
39 39
              private piwikService: PiwikService,
40
              private validatorService: ValidatorService,
40 41
              private sanitizer: DomSanitizer) { }
41 42

  
42 43
  repositories: RepositorySummaryInfo[] = [];
......
65 66
  totalDownloads = '--';
66 67
  viewsUrl: SafeResourceUrl;
67 68
  downloadsUrl: SafeResourceUrl;
69
  shortSelectedRepoId: string;
70
  currentDate: string;
68 71

  
69 72
  // Broker
70 73
  brokerSummary: BrokerSummary;
......
80 83
  totalMore: number = 0;
81 84
  totalMissing: number = 0;
82 85

  
86
  // Validation
87
  storedJob: StoredJob[] = [];
88
  noValidationsMessage: string;
89
  errorValidationsMessage: string;
90
  loadingJobSummaryMessage: string;
83 91

  
84 92
  ngOnInit() {
85 93
    // this.getUserEmail();
......
91 99
    let body = document.getElementsByTagName('body')[0];
92 100
    body.classList.remove("top_bar_active");
93 101
    body.classList.remove("page_heading_active");
102

  
103
    const currentTime = new Date();
104
    this.currentDate = currentTime.getFullYear() + '-' + (currentTime.getMonth() + 1);
94 105
  }
95 106

  
96 107
  getReposOfUser(): void {
......
99 110
      .subscribe(
100 111
        repos => {
101 112
          this.sortRepositoriesByName(repos);
102
          if(this.reposOfUser && this.reposOfUser.length>0) {
113
          if (this.reposOfUser && this.reposOfUser.length > 0) {
103 114
            this.selectedRepo = this.reposOfUser[0];
104 115
            this.getSelectedRepositorySummaryInfo(this.reposOfUser[0]);
105 116
          }
......
132 143

  
133 144
  changeSelectedRepository(repoId: string) {
134 145
    this.selectedRepo =  this.reposOfUser.find(x => x.id == repoId);
146
    console.log('selectedRepo ' + this.selectedRepo.id);
135 147
    this.getSelectedRepositorySummaryInfo(this.selectedRepo);
136 148
  }
137 149

  
......
163 175
    this.totalDownloads = '--';
164 176
    this.viewsUrl = null;
165 177
    this.downloadsUrl = null;
178
    this.shortSelectedRepoId = null;
166 179
    this.dashboardService.getUsageSummary(selectedRepo.id).subscribe(
167 180
      usageSummary => this.getUsageSummary(usageSummary),
168 181
      error => {
......
171 184
        console.log(error);
172 185
      } ,
173 186
      () => {
187
        this.shortSelectedRepoId = selectedRepo.id.replace('____', '').replace('_____', '').replace('::', ':');
174 188
        this.loadingUsageStatsMessage = '';
175 189
        this.errorUsageStatsMessage = '';
176 190
      }
......
202 216
      }
203 217
    );
204 218

  
219
    // Validation
220
    this.loadingJobSummaryMessage = loadingJobSummary;
221
    this.noValidationsMessage = '';
222
    this.errorValidationsMessage = '';
223
    this.validatorService.getValidationSummary(selectedRepo.id).subscribe(
224
      validationSummary => {
225
        this.storedJob = validationSummary;
226
        console.log(validationSummary);
227
      },
228
      error => {
229
        this.errorValidationsMessage = loadingJobSummaryError;
230
        this.loadingJobSummaryMessage = '';
231
        console.log(error);
232
      } ,
233
      () => {
234
        this.getValidationSummary(this.storedJob);
235
        this.loadingJobSummaryMessage = '';
236
      }
237
    );
205 238
  }
206 239

  
207 240
  getCollectionMonitorSummary(collectionMonitorSummary: CollectionMonitorSummary) {
......
249 282

  
250 283
    this.noUsageStats = '';
251 284

  
252
    if(usageSummary.piwikInfo==null)
253
      this.noUsageStats = 'This repository does not have our Usage Statistics service enabled yet.'
254
    else {
285
    if (usageSummary.piwikInfo == null) {
286
      this.noUsageStats = 'This repository does not have our Usage Statistics service enabled yet';
287
    } else {
255 288
      this.usageSummary = usageSummary;
256 289
      this.piwik = usageSummary.piwikInfo;
257 290
      this.repoMetrics = usageSummary.metricsInfo;
......
269 302
    }
270 303
  }
271 304

  
305
  getValidationSummary(validationSummary: StoredJob[]) {
306
    if (validationSummary == null) { this.noValidationsMessage = 'There is no validation history for this repository at the moment'; }
307
  }
308

  
272 309
  getViewsUrl () {
273 310
    this.viewsUrl = this.sanitizer.bypassSecurityTrustResourceUrl(
274 311
      `${this.repoMetrics.diagramsBaseURL}merge.php?com=query
......
333 370
  getRepositoriesSummaryInfo(userEmail: string) {
334 371
    this.repositoryService.getRepositoriesSummaryInfo(userEmail).subscribe(
335 372
      repositories => { this.repositories = repositories; this.loading=false },
336
      error => { console.log('Errrrror'); this.loading=false },
373
      error => { console.log('getRepSumError'); this.loading=false },
337 374
      () => { console.log(this.repositories); this.loading=false }
338 375
    );
339 376
  }
modules/uoa-repository-dashboard-gui/branches/new-ui/src/app/pages/landing/landing.component.html
29 29
          <div class="uk-margin uk-text-center uk-child-width-1-1 uk-grid-match uk-child-width-1-1@s uk-child-width-1-4@m uk-child-width-1-4@l uk-grid-large uk-grid" uk-grid="">
30 30
            <div class="uk-first-column">
31 31
              <div class="el-item uk-card uk-card-hover uk-card-small uk-card-body">
32
                <a (click)="goToPage('/compatibility/validate')" class="el-link uk-position-cover uk-position-z-index uk-margin-remove-adjacent"></a>
32
                <a (click)="goToPage('/compatibility/validate')" class="el-link uk-margin-remove-adjacent"></a>
33 33
                <img src="../../../assets/imgs/Path%20163.svg" class="el-image" alt="" uk-svg="" hidden="true">
34 34
                <h3 class="el-title uk-margin uk-h3">Validate</h3>
35 35
                <!--<div class="el-content uk-margin uk-text-lead">-->
......
41 41
            </div>
42 42
            <div class="">
43 43
              <div class="el-item uk-card uk-card-hover uk-card-small uk-card-body">
44
                <a (click)="goToPage('/sources/register')" class="el-link uk-position-cover uk-position-z-index uk-margin-remove-adjacent"></a>
44
                <a (click)="goToPage('/sources/register')" class="el-link uk-margin-remove-adjacent"></a>
45 45
                <img src="../../../assets/imgs/Group%20987.svg" class="el-image" alt="" uk-svg="" hidden="true">
46 46
                <h3 class="el-title uk-margin uk-h3" style="margin-top: 26px !important;">Register</h3>
47 47
                <div class="el-content uk-margin">
......
52 52
            </div>
53 53
            <div class="">
54 54
              <div class="el-item uk-card uk-card-hover uk-card-small uk-card-body">
55
                <a (click)="goToPage('/content/events')" class="el-link uk-position-cover uk-position-z-index uk-margin-remove-adjacent"></a>
55
                <a (click)="goToPage('/content/events')" class="el-link uk-margin-remove-adjacent"></a>
56 56
                <img src="../../../assets/imgs/Group%20409.svg" class="el-image" alt="" uk-svg="" hidden="true">
57 57
                <h3 class="el-title uk-margin uk-h3">Enrich</h3>
58 58
                <div class="el-content uk-margin">
......
63 63
            </div>
64 64
            <div class="">
65 65
              <div class="el-item uk-card uk-card-hover uk-card-small uk-card-body">
66
                <a (click)="goToPage('/getImpact')" class="el-link uk-position-cover uk-position-z-index uk-margin-remove-adjacent"></a>
66
                <a (click)="goToPage('/getImpact')" class="el-link uk-margin-remove-adjacent"></a>
67 67
                <img src="../../../assets/imgs/Group%20410.svg" class="el-image" alt="" uk-svg="" hidden="true">
68 68
                <h3 class="el-title uk-margin uk-h3" style="margin-top: 34px !important;">Measure</h3>
69 69
                <div class="el-content uk-margin">
modules/uoa-repository-dashboard-gui/branches/new-ui/src/app/services/validator.service.ts
6 6
import { Injectable } from '@angular/core';
7 7
import { environment } from '../../environments/environment';
8 8
import { Observable } from 'rxjs';
9
import { InterfaceInformation, JobForValidation, RuleSet, StoredJob } from '../domain/typeScriptClasses';
9
import {InterfaceInformation, JobForValidation, RuleSet, StoredJob} from '../domain/typeScriptClasses';
10 10

  
11 11
const headerOptions = {
12 12
  headers : new HttpHeaders().set('Content-Type', 'application/json')
......
82 82
    return this.httpClient.post<JobForValidation>(url, body, headerOptions);
83 83
  }
84 84

  
85
  getValidationSummary(repoId: string): Observable<StoredJob[]> {
86
    const url = `${this.apiUrl}validationSummary/${repoId}/?size=5`;
87
    console.log(`knocking on: ${url}`);
88

  
89
    return this.httpClient.get<StoredJob[]>(url, headerOptions);
90
  }
85 91
}
modules/uoa-repository-dashboard-gui/branches/new-ui/src/app/shared/sidemenu/sidemenu.component.ts
5 5
import { AuthenticationService } from '../../services/authentication.service';
6 6
import { environment } from '../../../environments/environment';
7 7
import {FormGroup} from "@angular/forms";
8
import {Repository} from '../../domain/typeScriptClasses';
9
import {loadingReposMessage, loadingUserRepoInfoEmpty, reposRetrievalError} from '../../domain/shared-messages';
10
import {RepositoryService} from '../../services/repository.service';
8 11

  
9 12
@Component({
10 13
  selector: 'side-menu',
......
23 26

  
24 27
  toggle: number[] = [];
25 28

  
26
  constructor(public authService: AuthenticationService) { }
29
  userEmail: string;
30
  reposOfUser: Repository[] = [];
31
  private skipGridView = false;
27 32

  
33
  constructor(public authService: AuthenticationService,
34
              private repositoryService: RepositoryService) { }
35

  
28 36
  ngOnInit() {
29 37

  
30 38
    const pathName = window.location.pathname;
......
44 52

  
45 53
    const baseUrl = window.location.origin;
46 54
    this.inBeta = ( baseUrl.includes('beta') || baseUrl.includes('athenarc') );
55

  
56
    this.getReposOfUser();
47 57
  }
48 58

  
49 59
  onClick(id: string) {
......
88 98
  checkIfCollapsed(position: number) {
89 99
    return this.toggle[position] === position;
90 100
  }
101

  
102
  getReposOfUser(): void {
103
    this.repositoryService.getRepositoriesOfUser(this.authService.getUserEmail())
104
      .subscribe(
105
        repos => { this.reposOfUser = repos; },
106
        error => { console.log(error); },
107
        () => { if (this.reposOfUser.length == 1) { this.skipGridView = true; } }
108
      );
109
  }
91 110
}
modules/uoa-repository-dashboard-gui/branches/new-ui/src/app/shared/sidemenu/sidemenu.component.html
33 33
        </a>
34 34
        <ul [ngClass]="{'uk-display-block': checkIfCollapsed(1)}">
35 35
          <li [routerLinkActive]="['act_item']"><a [routerLink]="['/sources', 'register']">Register</a></li>
36
          <li [routerLinkActive]="['act_item']"><a [routerLink]="['/sources', 'update']">Update</a></li>
36
          <li *ngIf="!skipGridView" [routerLinkActive]="['act_item']"><a [routerLink]="['/sources', 'update']">Update</a></li>
37
          <li *ngIf="skipGridView" [routerLinkActive]="['act_item']"><a [routerLink]="['/sources/update', reposOfUser[0].id]">Update</a></li>
37 38
        </ul>
38 39
      </li>
39 40
      <li class="submenu_trigger" [ngClass]="{'act_section': checkIfCollapsed(2) }" routerLinkActive="current_section">
......
44 45
        <ul [ngClass]="{'uk-display-block': checkIfCollapsed(2)}">
45 46
          <li routerLinkActive="act_item"><a [routerLink]="['/compatibility', 'validate']">Validate</a></li>
46 47
          <li routerLinkActive="act_item"><a [routerLink]="['/compatibility', 'browseHistory']">Validation History</a></li>
47
          <li routerLinkActive="act_item"><a [routerLink]="['/compatibility', 'monitor']">Collection Monitor</a></li>
48
          <li *ngIf="!skipGridView" routerLinkActive="act_item"><a [routerLink]="['/compatibility', 'monitor']">Collection Monitor</a></li>
49
          <li *ngIf="skipGridView" routerLinkActive="act_item"><a [routerLink]="['/compatibility/monitor', reposOfUser[0].id]">Collection Monitor</a></li>
48 50
        </ul>
49 51
      </li>
50 52
      <li class="submenu_trigger" [ngClass]="{'act_section': checkIfCollapsed(3) }" [routerLinkActive]="['current_section']">
......
53 55
          <span class="menu_title">Content</span>
54 56
        </a>
55 57
        <ul [ngClass]="{'uk-display-block': checkIfCollapsed(3)}">
56
          <li [routerLinkActive]="['act_item']"><a [routerLink]="['/content', 'events']">Events</a></li>
58
          <li *ngIf="!skipGridView" [routerLinkActive]="['act_item']"><a [routerLink]="['/content', 'events']">Events</a></li>
59
          <li *ngIf="skipGridView" [routerLinkActive]="['act_item']"><a [routerLink]="['/content/events', reposOfUser[0].id]">Events</a></li>
57 60
          <li [routerLinkActive]="['act_item']"><a [routerLink]="['/content', 'notifications']">Notifications</a></li>
58 61
        </ul>
59 62
      </li>
60 63
      <li class="" [routerLinkActive]="['current_section']" title="Metrics">
61
        <a [routerLink]="['/getImpact']">
64
        <a *ngIf="!skipGridView" [routerLink]="['/getImpact']">
62 65
          <span class="menu_icon"><i class="material-icons">&#xE86F;</i></span>
63 66
          <span class="menu_title">Metrics</span>
64 67
        </a>
68
        <a *ngIf="skipGridView" [routerLink]="['/getImpact/show_metrics', reposOfUser[0].id]">
69
          <span class="menu_icon"><i class="material-icons">&#xE86F;</i></span>
70
          <span class="menu_title">Metrics</span>
71
        </a>
65 72
      </li>
66 73
      <li class="submenu_trigger" [ngClass]="{'act_section': checkIfCollapsed(4) }" [routerLinkActive]="['current_section']">
67 74
        <a (click)="setToggle(4)">

Also available in: Unified diff