Revision 57910
Added by Andreas Mantas over 4 years ago
modules/uoa-repository-dashboard-gui/trunk/src/app/services/repository.service.ts | ||
---|---|---|
74 | 74 |
return this.httpClient.get<RepositorySnippet[]>(url, headerOptions); |
75 | 75 |
} |
76 | 76 |
|
77 |
getRepositoriesOfUser(userEmail: string): Observable<Repository[]> { |
|
77 |
getRepositoriesOfUser(userEmail: string): Observable<RepositorySnippet[]> {
|
|
78 | 78 |
const url = `${this.apiUrl}getRepositoriesOfUser/${userEmail}/0/100`; |
79 | 79 |
console.log(`knocking on: ${url}`); |
80 |
return this.httpClient.get<Repository[]>(url, headerOptions); |
|
80 |
return this.httpClient.get<RepositorySnippet[]>(url, headerOptions);
|
|
81 | 81 |
} |
82 | 82 |
|
83 | 83 |
|
modules/uoa-repository-dashboard-gui/trunk/src/app/shared/reusablecomponents/repository-tiles.component.html | ||
---|---|---|
34 | 34 |
<img *ngIf="repo.logoUrl" class="el-image uk-border-rounded" src="{{ repo.logoUrl }}" alt=""> |
35 | 35 |
</div> |
36 | 36 |
<div class="uk-first-column"> |
37 |
<h3 class="el-title uk-margin uk-h5 uk-margin-remove-adjacent uk-margin-small-bottom">{{ repo.officialName }}</h3>
|
|
37 |
<h3 class="el-title uk-margin uk-h5 uk-margin-remove-adjacent uk-margin-small-bottom">{{ repo.officialname }}</h3>
|
|
38 | 38 |
<div class="{{ getBadgeCSS(repo) }}"> |
39 | 39 |
{{ getBadgeText(repo) }} |
40 | 40 |
</div> |
modules/uoa-repository-dashboard-gui/trunk/src/app/shared/reusablecomponents/repository-tiles.component.ts | ||
---|---|---|
1 | 1 |
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; |
2 |
import { Repository } from '../../domain/typeScriptClasses';
|
|
2 |
import {RepositorySnippet} from '../../domain/typeScriptClasses';
|
|
3 | 3 |
import { RepositoryService } from '../../services/repository.service'; |
4 | 4 |
import { AuthenticationService } from '../../services/authentication.service'; |
5 | 5 |
import { loadingReposMessage, loadingUserRepoInfoEmpty, reposRetrievalError } from '../../domain/shared-messages'; |
... | ... | |
10 | 10 |
}) |
11 | 11 |
|
12 | 12 |
export class RepositoryTilesComponent implements OnInit { |
13 |
reposOfUser: Repository[] = []; |
|
13 |
reposOfUser: RepositorySnippet[] = [];
|
|
14 | 14 |
tilesView: boolean; |
15 | 15 |
errorMessage: string; |
16 | 16 |
warningMessage: string; |
... | ... | |
32 | 32 |
this.repoService.getRepositoriesOfUser(this.authService.getUserEmail()) |
33 | 33 |
.subscribe( |
34 | 34 |
repos => this.reposOfUser = repos.sort( function(a, b) { |
35 |
if (a.officialName < b.officialName) {
|
|
35 |
if (a.officialname < b.officialname) {
|
|
36 | 36 |
return -1; |
37 |
} else if (a.officialName > b.officialName) {
|
|
37 |
} else if (a.officialname > b.officialname) {
|
|
38 | 38 |
return 1; |
39 | 39 |
} else { |
40 | 40 |
return 0; |
... | ... | |
55 | 55 |
); |
56 | 56 |
} |
57 | 57 |
|
58 |
getLinkToNext(repo: Repository): string { |
|
58 |
getLinkToNext(repo: RepositorySnippet): string {
|
|
59 | 59 |
if (this.parent === 'metrics') { |
60 | 60 |
if (repo.piwikInfo) { |
61 | 61 |
if (repo.piwikInfo.validated === true) { |
... | ... | |
71 | 71 |
} |
72 | 72 |
} |
73 | 73 |
|
74 |
getBadgeCSS(repo: Repository): string { |
|
74 |
getBadgeCSS(repo: RepositorySnippet): string {
|
|
75 | 75 |
if (this.parent === 'metrics') { |
76 | 76 |
if (repo.piwikInfo) { |
77 | 77 |
if (repo.piwikInfo.validated === true) { |
... | ... | |
85 | 85 |
} |
86 | 86 |
} |
87 | 87 |
|
88 |
getBadgeText(repo: Repository): string { |
|
88 |
getBadgeText(repo: RepositorySnippet): string {
|
|
89 | 89 |
if (this.parent === 'metrics') { |
90 | 90 |
if (repo.piwikInfo) { |
91 | 91 |
if (repo.piwikInfo.validated === true) { |
modules/uoa-repository-dashboard-gui/trunk/src/app/domain/typeScriptClasses.ts | ||
---|---|---|
162 | 162 |
registeredby: string; |
163 | 163 |
organizations: Organization[]; |
164 | 164 |
registrationdate: Date; |
165 |
piwikInfo: PiwikInfo; |
|
166 |
logoUrl: string; |
|
167 |
description: string; |
|
168 |
consentTermsOfUse: string; |
|
169 |
consentTermsOfUseDate: Date; |
|
170 |
fullTextDownload: string; |
|
165 | 171 |
} |
166 | 172 |
|
167 | 173 |
export class Organization { |
Also available in: Unified diff
replaced Repository object with updated RepositorySnippet in getRepositoriesOfUsers (see ticket #5190)