Revision 61400
Added by Konstantinos Triantafyllou over 2 years ago
modules/uoa-usage-statistics/branches/angular-11/angular.json | ||
---|---|---|
1 |
{ |
|
2 |
"$schema": "./node_modules/@angular/cli/lib/config/schema.json", |
|
3 |
"version": 1, |
|
4 |
"newProjectRoot": "projects", |
|
5 |
"projects": { |
|
6 |
"usage-counts": { |
|
7 |
"root": "", |
|
8 |
"sourceRoot": "src", |
|
9 |
"projectType": "application", |
|
10 |
"prefix": "app", |
|
11 |
"schematics": { |
|
12 |
"@schematics/angular:class": { |
|
13 |
"skipTests": true |
|
14 |
}, |
|
15 |
"@schematics/angular:component": { |
|
16 |
"skipTests": true |
|
17 |
}, |
|
18 |
"@schematics/angular:directive": { |
|
19 |
"skipTests": true |
|
20 |
}, |
|
21 |
"@schematics/angular:guard": { |
|
22 |
"skipTests": true |
|
23 |
}, |
|
24 |
"@schematics/angular:module": { |
|
25 |
"skipTests": true |
|
26 |
}, |
|
27 |
"@schematics/angular:pipe": { |
|
28 |
"skipTests": true |
|
29 |
}, |
|
30 |
"@schematics/angular:service": { |
|
31 |
"skipTests": true |
|
32 |
} |
|
33 |
}, |
|
34 |
"architect": { |
|
35 |
"build": { |
|
36 |
"builder": "@angular-devkit/build-angular:browser", |
|
37 |
"options": { |
|
38 |
"aot": true, |
|
39 |
"outputPath": "dist/usage-counts", |
|
40 |
"index": "src/index.html", |
|
41 |
"main": "src/main.ts", |
|
42 |
"polyfills": "src/polyfills.ts", |
|
43 |
"tsConfig": "src/tsconfig.app.json", |
|
44 |
"assets": [ |
|
45 |
"src/assets", |
|
46 |
"src/robots.txt", |
|
47 |
"src/sitemap.xml" |
|
48 |
], |
|
49 |
"styles": [ |
|
50 |
"src/styles.css", |
|
51 |
"src/material.scss" |
|
52 |
], |
|
53 |
"scripts": [ |
|
54 |
"src/assets/common-assets/common/jquery.js", |
|
55 |
"src/assets/common-assets/common/uikit.min.js", |
|
56 |
"src/assets/common-assets/common/uikit-icons.min.js", |
|
57 |
"node_modules/jquery/dist/jquery.js" |
|
58 |
] |
|
59 |
}, |
|
60 |
"configurations": { |
|
61 |
"development": { |
|
62 |
"optimization": true, |
|
63 |
"outputHashing": "all", |
|
64 |
"sourceMap": false, |
|
65 |
"namedChunks": false, |
|
66 |
"aot": true, |
|
67 |
"extractLicenses": true, |
|
68 |
"vendorChunk": false, |
|
69 |
"buildOptimizer": true, |
|
70 |
"budgets": [ |
|
71 |
{ |
|
72 |
"type": "initial", |
|
73 |
"maximumWarning": "2mb", |
|
74 |
"maximumError": "5mb" |
|
75 |
}, |
|
76 |
{ |
|
77 |
"type": "anyComponentStyle", |
|
78 |
"maximumWarning": "6kb" |
|
79 |
} |
|
80 |
] |
|
81 |
}, |
|
82 |
"beta": { |
|
83 |
"fileReplacements": [ |
|
84 |
{ |
|
85 |
"replace": "src/environments/environment.ts", |
|
86 |
"with": "src/environments/environment.beta.ts" |
|
87 |
} |
|
88 |
], |
|
89 |
"optimization": true, |
|
90 |
"outputHashing": "all", |
|
91 |
"sourceMap": false, |
|
92 |
"namedChunks": false, |
|
93 |
"aot": true, |
|
94 |
"extractLicenses": true, |
|
95 |
"vendorChunk": false, |
|
96 |
"buildOptimizer": true, |
|
97 |
"budgets": [ |
|
98 |
{ |
|
99 |
"type": "initial", |
|
100 |
"maximumWarning": "2mb", |
|
101 |
"maximumError": "5mb" |
|
102 |
}, |
|
103 |
{ |
|
104 |
"type": "anyComponentStyle", |
|
105 |
"maximumWarning": "6kb" |
|
106 |
} |
|
107 |
] |
|
108 |
}, |
|
109 |
"production": { |
|
110 |
"assets": [ |
|
111 |
"src/assets", |
|
112 |
"src/sitemap.xml", |
|
113 |
{ |
|
114 |
"input": "src/prod/", |
|
115 |
"output": "/", |
|
116 |
"glob": "*.txt" |
|
117 |
} |
|
118 |
], |
|
119 |
"index": { |
|
120 |
"input": "src/prod/index.html", |
|
121 |
"output": "index.html" |
|
122 |
}, |
|
123 |
"fileReplacements": [ |
|
124 |
{ |
|
125 |
"replace": "src/environments/environment.ts", |
|
126 |
"with": "src/environments/environment.prod.ts" |
|
127 |
} |
|
128 |
], |
|
129 |
"optimization": true, |
|
130 |
"outputHashing": "all", |
|
131 |
"sourceMap": false, |
|
132 |
"namedChunks": false, |
|
133 |
"aot": true, |
|
134 |
"extractLicenses": true, |
|
135 |
"vendorChunk": false, |
|
136 |
"buildOptimizer": true, |
|
137 |
"budgets": [ |
|
138 |
{ |
|
139 |
"type": "initial", |
|
140 |
"maximumWarning": "2mb", |
|
141 |
"maximumError": "5mb" |
|
142 |
}, |
|
143 |
{ |
|
144 |
"type": "anyComponentStyle", |
|
145 |
"maximumWarning": "6kb" |
|
146 |
} |
|
147 |
] |
|
148 |
} |
|
149 |
} |
|
150 |
}, |
|
151 |
"serve": { |
|
152 |
"builder": "@angular-devkit/build-angular:dev-server", |
|
153 |
"options": { |
|
154 |
"browserTarget": "usage-counts:build" |
|
155 |
}, |
|
156 |
"configurations": { |
|
157 |
"production": { |
|
158 |
"browserTarget": "usage-counts:build:production" |
|
159 |
} |
|
160 |
} |
|
161 |
}, |
|
162 |
"extract-i18n": { |
|
163 |
"builder": "@angular-devkit/build-angular:extract-i18n", |
|
164 |
"options": { |
|
165 |
"browserTarget": "usage-counts:build" |
|
166 |
} |
|
167 |
}, |
|
168 |
"test": { |
|
169 |
"builder": "@angular-devkit/build-angular:karma", |
|
170 |
"options": { |
|
171 |
"main": "src/test.ts", |
|
172 |
"polyfills": "src/polyfills.ts", |
|
173 |
"tsConfig": "src/tsconfig.spec.json", |
|
174 |
"karmaConfig": "src/karma.conf.js", |
|
175 |
"styles": [ |
|
176 |
"src/styles.css" |
|
177 |
], |
|
178 |
"scripts": [], |
|
179 |
"assets": [ |
|
180 |
"src/assets" |
|
181 |
] |
|
182 |
} |
|
183 |
}, |
|
184 |
"lint": { |
|
185 |
"builder": "@angular-devkit/build-angular:tslint", |
|
186 |
"options": { |
|
187 |
"tsConfig": [ |
|
188 |
"src/tsconfig.app.json", |
|
189 |
"src/tsconfig.spec.json" |
|
190 |
], |
|
191 |
"exclude": [ |
|
192 |
"**/node_modules/**" |
|
193 |
] |
|
194 |
} |
|
195 |
} |
|
196 |
} |
|
197 |
}, |
|
198 |
"usage-counts-e2e": { |
|
199 |
"root": "e2e/", |
|
200 |
"projectType": "application", |
|
201 |
"prefix": "", |
|
202 |
"architect": { |
|
203 |
"e2e": { |
|
204 |
"builder": "@angular-devkit/build-angular:protractor", |
|
205 |
"options": { |
|
206 |
"protractorConfig": "e2e/protractor.conf.js", |
|
207 |
"devServerTarget": "usage-counts:serve" |
|
208 |
}, |
|
209 |
"configurations": { |
|
210 |
"production": { |
|
211 |
"devServerTarget": "usage-counts:serve:production" |
|
212 |
} |
|
213 |
} |
|
214 |
}, |
|
215 |
"lint": { |
|
216 |
"builder": "@angular-devkit/build-angular:tslint", |
|
217 |
"options": { |
|
218 |
"tsConfig": "e2e/tsconfig.e2e.json", |
|
219 |
"exclude": [ |
|
220 |
"**/node_modules/**" |
|
221 |
] |
|
222 |
} |
|
223 |
} |
|
224 |
} |
|
225 |
} |
|
226 |
}, |
|
227 |
"defaultProject": "usage-counts" |
|
228 |
} |
modules/uoa-usage-statistics/branches/angular-11/package.json | ||
---|---|---|
1 |
{ |
|
2 |
"name": "usage-counts", |
|
3 |
"version": "0.0.0", |
|
4 |
"scripts": { |
|
5 |
"ng": "ng", |
|
6 |
"start": "ng serve --host 0.0.0.0 --disable-host-check --port=4800", |
|
7 |
"build": "ng build", |
|
8 |
"build-dev": "ng build --configuration=development", |
|
9 |
"build-beta": "ng build --configuration=beta", |
|
10 |
"build-prod": "ng build --prod", |
|
11 |
"webpack-bundle-analyzer": "ng build --stats-json && webpack-bundle-analyzer dist/graph/browser/stats.json --host 0.0.0.0", |
|
12 |
"test": "ng test", |
|
13 |
"lint": "ng lint", |
|
14 |
"e2e": "ng e2e", |
|
15 |
"postinstall": "chmod +x clean-library.sh && ./clean-library.sh", |
|
16 |
"after-build-clean": "rm -rf dist/usage-counts/assets/common-assets/.svn/" |
|
17 |
}, |
|
18 |
"private": true, |
|
19 |
"dependencies": { |
|
20 |
"@angular/animations": "~11.2.14", |
|
21 |
"@angular/cdk": "^11.2.13", |
|
22 |
"@angular/common": "~11.2.14", |
|
23 |
"@angular/compiler": "~11.2.14", |
|
24 |
"@angular/core": "~11.2.14", |
|
25 |
"@angular/forms": "~11.2.14", |
|
26 |
"@angular/localize": "^11.2.14", |
|
27 |
"@angular/material": "^11.2.13", |
|
28 |
"@angular/platform-browser": "~11.2.14", |
|
29 |
"@angular/platform-browser-dynamic": "~11.2.14", |
|
30 |
"@angular/router": "~11.2.14", |
|
31 |
"clipboard": "^1.5.16", |
|
32 |
"core-js": "^2.5.4", |
|
33 |
"express": "^4.15.2", |
|
34 |
"jquery": "^3.4.1", |
|
35 |
"ng-recaptcha": "^7.0.1", |
|
36 |
"rxjs": "^6.5.1", |
|
37 |
"ts-md5": "^1.2.0", |
|
38 |
"tslib": "^2.0.0", |
|
39 |
"zone.js": "~0.10.2" |
|
40 |
}, |
|
41 |
"devDependencies": { |
|
42 |
"@angular-devkit/build-angular": "~0.1102.14", |
|
43 |
"@angular/cli": "~11.2.14", |
|
44 |
"@angular/compiler-cli": "~11.2.14", |
|
45 |
"@angular/language-service": "~11.2.14", |
|
46 |
"@types/express": "^4.17.0", |
|
47 |
"@types/node": "^12.11.1", |
|
48 |
"@types/jasmine": "~3.6.0", |
|
49 |
"@types/jasminewd2": "~2.0.3", |
|
50 |
"codelyzer": "^6.0.0", |
|
51 |
"jasmine-core": "~3.6.0", |
|
52 |
"jasmine-spec-reporter": "~5.0.0", |
|
53 |
"karma": "~6.3.3", |
|
54 |
"karma-chrome-launcher": "~3.1.0", |
|
55 |
"karma-coverage-istanbul-reporter": "~3.0.2", |
|
56 |
"karma-jasmine": "~4.0.0", |
|
57 |
"karma-jasmine-html-reporter": "^1.5.0", |
|
58 |
"protractor": "~7.0.0", |
|
59 |
"ts-node": "~7.0.0", |
|
60 |
"typescript": "~4.0.7" |
|
61 |
} |
|
62 |
} |
modules/uoa-usage-statistics/branches/angular-11/tsconfig.json | ||
---|---|---|
1 |
{ |
|
2 |
"compileOnSave": false, |
|
3 |
"compilerOptions": { |
|
4 |
"baseUrl": "./", |
|
5 |
"downlevelIteration": true, |
|
6 |
"outDir": "./dist/out-tsc", |
|
7 |
"sourceMap": true, |
|
8 |
"declaration": false, |
|
9 |
"module": "es2020", |
|
10 |
"moduleResolution": "node", |
|
11 |
"emitDecoratorMetadata": true, |
|
12 |
"experimentalDecorators": true, |
|
13 |
"importHelpers": true, |
|
14 |
"target": "es2015", |
|
15 |
"typeRoots": [ |
|
16 |
"node_modules/@types" |
|
17 |
], |
|
18 |
"lib": [ |
|
19 |
"es2018", |
|
20 |
"dom" |
|
21 |
] |
|
22 |
} |
|
23 |
} |
modules/uoa-usage-statistics/branches/angular-11/.browserslistrc | ||
---|---|---|
1 |
# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers |
|
2 |
# For additional information regarding the format and rule options, please see: |
|
3 |
# https://github.com/browserslist/browserslist#queries |
|
4 |
# |
|
5 |
# For IE 9-11 support, please remove 'not' from the last line of the file and adjust as needed |
|
6 |
|
|
7 |
> 0.5% |
|
8 |
last 2 versions |
|
9 |
Firefox ESR |
|
10 |
not dead |
|
11 |
not IE 9-11 |
modules/uoa-usage-statistics/branches/angular-11/src/app/services/usage-stats.service.ts | ||
---|---|---|
1 |
import {Injectable} from '@angular/core'; |
|
2 |
import {HttpClient} from '@angular/common/http'; |
|
3 |
import {CountryUsageStat, UsageStat} from '../entities/usage-stat'; |
|
4 |
import {Observable} from 'rxjs'; |
|
5 |
import {properties} from '../../environments/environment'; |
|
6 |
import {map} from 'rxjs/operators'; |
|
7 |
|
|
8 |
@Injectable({ |
|
9 |
providedIn: "root" |
|
10 |
}) |
|
11 |
export class UsageStatsService { |
|
12 |
|
|
13 |
constructor(private http: HttpClient) {} |
|
14 |
|
|
15 |
|
|
16 |
getAllMetrics(): Observable<UsageStat> { |
|
17 |
let url = properties.metricsAPIURL + 'allmetrics'; |
|
18 |
return this.http.get<UsageStat>((properties.useLongCache?(properties.cacheUrl + encodeURIComponent(url)):url)); |
|
19 |
} |
|
20 |
|
|
21 |
getCountryMetrics(country: string): Observable<CountryUsageStat> { |
|
22 |
let url = properties.metricsAPIURL + 'countryusagestats/' + country; |
|
23 |
return this.http.get<CountryUsageStat>((properties.useLongCache?(properties.cacheUrl + encodeURIComponent(url)):url)).pipe(map(stat => { |
|
24 |
if(stat.total_repos == "0" && !stat.views && !stat.downloads) { |
|
25 |
return null; |
|
26 |
} else { |
|
27 |
return stat; |
|
28 |
} |
|
29 |
})); |
|
30 |
} |
|
31 |
} |
modules/uoa-usage-statistics/branches/angular-11/src/app/services/countries.ts | ||
---|---|---|
1 |
export const countries = [ |
|
2 |
{name: 'Afghanistan', code: 'AF'}, |
|
3 |
{name: 'Albania', code: 'AL'}, |
|
4 |
{name: 'Algeria', code: 'DZ'}, |
|
5 |
{name: 'American Samoa', code: 'AS'}, |
|
6 |
{name: 'Andorra', code: 'AD'}, |
|
7 |
{name: 'Angola', code: 'AO'}, |
|
8 |
{name: 'Anguilla', code: 'AI'}, |
|
9 |
{name: 'Antarctica', code: 'AQ'}, |
|
10 |
{name: 'Antigua and Barbuda', code: 'AG'}, |
|
11 |
{name: 'Argentina', code: 'AR'}, |
|
12 |
{name: 'Armenia', code: 'AM'}, |
|
13 |
{name: 'Aruba', code: 'AW'}, |
|
14 |
{name: 'Australia', code: 'AU'}, |
|
15 |
{name: 'Austria', code: 'AT'}, |
|
16 |
{name: 'Azerbaijan', code: 'AZ'}, |
|
17 |
{name: 'Bahamas', code: 'BS'}, |
|
18 |
{name: 'Bahrain', code: 'BH'}, |
|
19 |
{name: 'Bangladesh', code: 'BD'}, |
|
20 |
{name: 'Barbados', code: 'BB'}, |
|
21 |
{name: 'Belarus', code: 'BY'}, |
|
22 |
{name: 'Belgium', code: 'BE'}, |
|
23 |
{name: 'Belize', code: 'BZ'}, |
|
24 |
{name: 'Benin', code: 'BJ'}, |
|
25 |
{name: 'Bermuda', code: 'BM'}, |
|
26 |
{name: 'Bhutan', code: 'BT'}, |
|
27 |
{name: 'Bolivia, Plurinational State of', code: 'BO'}, |
|
28 |
{name: 'Bosnia and Herzegovina', code: 'BA'}, |
|
29 |
{name: 'Botswana', code: 'BW'}, |
|
30 |
{name: 'Bouvet Island', code: 'BV'}, |
|
31 |
{name: 'Brazil', code: 'BR'}, |
|
32 |
{name: 'British Indian Ocean Territory', code: 'IO'}, |
|
33 |
{name: 'Brunei Darussalam', code: 'BN'}, |
|
34 |
{name: 'Bulgaria', code: 'BG'}, |
|
35 |
{name: 'Burkina Faso', code: 'BF'}, |
|
36 |
{name: 'Burundi', code: 'BI'}, |
|
37 |
{name: 'Cambodia', code: 'KH'}, |
|
38 |
{name: 'Cameroon', code: 'CM'}, |
|
39 |
{name: 'Canada', code: 'CA'}, |
|
40 |
{name: 'Cape Verde', code: 'CV'}, |
|
41 |
{name: 'Cayman Islands', code: 'KY'}, |
|
42 |
{name: 'Central African Republic', code: 'CF'}, |
|
43 |
{name: 'Chad', code: 'TD'}, |
|
44 |
{name: 'Chile', code: 'CL'}, |
|
45 |
{name: 'China', code: 'CN'}, |
|
46 |
{name: 'Christmas Island', code: 'CX'}, |
|
47 |
{name: 'Cocos (Keeling) Islands', code: 'CC'}, |
|
48 |
{name: 'Colombia', code: 'CO'}, |
|
49 |
{name: 'Comoros', code: 'KM'}, |
|
50 |
{name: 'Congo', code: 'CG'}, |
|
51 |
{name: 'Congo, The Democratic Republic of the', code: 'CD'}, |
|
52 |
{name: 'Cook Islands', code: 'CK'}, |
|
53 |
{name: 'Costa Rica', code: 'CR'}, |
|
54 |
{name: 'Côte d\'\'Ivoire', code: 'CI'}, |
|
55 |
{name: 'Croatia', code: 'HR'}, |
|
56 |
{name: 'Cuba', code: 'CU'}, |
|
57 |
{name: 'Cyprus', code: 'CY'}, |
|
58 |
{name: 'Czech Republic', code: 'CZ'}, |
|
59 |
{name: 'Denmark', code: 'DK'}, |
|
60 |
{name: 'Djibouti', code: 'DJ'}, |
|
61 |
{name: 'Dominica', code: 'DM'}, |
|
62 |
{name: 'Dominican Republic', code: 'DO'}, |
|
63 |
{name: 'Ecuador', code: 'EC'}, |
|
64 |
{name: 'Egypt', code: 'EG'}, |
|
65 |
{name: 'El Salvador', code: 'SV'}, |
|
66 |
{name: 'Equatorial Guinea', code: 'GQ'}, |
|
67 |
{name: 'Eritrea', code: 'ER'}, |
|
68 |
{name: 'Estonia', code: 'EE'}, |
|
69 |
{name: 'Ethiopia', code: 'ET'}, |
|
70 |
{name: 'Falkland Islands (Malvinas)', code: 'FK'}, |
|
71 |
{name: 'Faroe Islands', code: 'FO'}, |
|
72 |
{name: 'Fiji', code: 'FJ'}, |
|
73 |
{name: 'Finland', code: 'FI'}, |
|
74 |
{name: 'France', code: 'FR'}, |
|
75 |
{name: 'French Guiana', code: 'GF'}, |
|
76 |
{name: 'French Polynesia', code: 'PF'}, |
|
77 |
{name: 'French Southern Territories', code: 'TF'}, |
|
78 |
{name: 'Gabon', code: 'GA'}, |
|
79 |
{name: 'Gambia', code: 'GM'}, |
|
80 |
{name: 'Georgia', code: 'GE'}, |
|
81 |
{name: 'Germany', code: 'DE'}, |
|
82 |
{name: 'Ghana', code: 'GH'}, |
|
83 |
{name: 'Gibraltar', code: 'GI'}, |
|
84 |
{name: 'Greece', code: 'GR'}, |
|
85 |
{name: 'Greenland', code: 'GL'}, |
|
86 |
{name: 'Grenada', code: 'GD'}, |
|
87 |
{name: 'Guadeloupe', code: 'GP'}, |
|
88 |
{name: 'Guam', code: 'GU'}, |
|
89 |
{name: 'Guatemala', code: 'GT'}, |
|
90 |
{name: 'Guernsey', code: 'GG'}, |
|
91 |
{name: 'Guinea', code: 'GN'}, |
|
92 |
{name: 'Guinea-Bissau', code: 'GW'}, |
|
93 |
{name: 'Guyana', code: 'GY'}, |
|
94 |
{name: 'Haiti', code: 'HT'}, |
|
95 |
{name: 'Heard Island and Mcdonald Islands', code: 'HM'}, |
|
96 |
{name: 'Holy See (Vatican City State)', code: 'VA'}, |
|
97 |
{name: 'Honduras', code: 'HN'}, |
|
98 |
{name: 'Hong Kong', code: 'HK'}, |
|
99 |
{name: 'Hungary', code: 'HU'}, |
|
100 |
{name: 'Iceland', code: 'IS'}, |
|
101 |
{name: 'India', code: 'IN'}, |
|
102 |
{name: 'Indonesia', code: 'ID'}, |
|
103 |
{name: 'Iran, Islamic Republic of', code: 'IR'}, |
|
104 |
{name: 'Iraq', code: 'IQ'}, |
|
105 |
{name: 'Ireland', code: 'IE'}, |
|
106 |
{name: 'Isle of Man', code: 'IM'}, |
|
107 |
{name: 'Israel', code: 'IL'}, |
|
108 |
{name: 'Italy', code: 'IT'}, |
|
109 |
{name: 'Jamaica', code: 'JM'}, |
|
110 |
{name: 'Japan', code: 'JP'}, |
|
111 |
{name: 'Jersey', code: 'JE'}, |
|
112 |
{name: 'Jordan', code: 'JO'}, |
|
113 |
{name: 'Kazakhstan', code: 'KZ'}, |
|
114 |
{name: 'Kenya', code: 'KE'}, |
|
115 |
{name: 'Kiribati', code: 'KI'}, |
|
116 |
{name: 'Korea, Democratic People\'\'s Republic of', code: 'KP'}, |
|
117 |
{name: 'Korea, Republic of', code: 'KR'}, |
|
118 |
{name: 'Kuwait', code: 'KW'}, |
|
119 |
{name: 'Kyrgyzstan', code: 'KG'}, |
|
120 |
{name: 'Lao People\'\'s Democratic Republic', code: 'LA'}, |
|
121 |
{name: 'Latvia', code: 'LV'}, |
|
122 |
{name: 'Lebanon', code: 'LB'}, |
|
123 |
{name: 'Lesotho', code: 'LS'}, |
|
124 |
{name: 'Liberia', code: 'LR'}, |
|
125 |
{name: 'Libya', code: 'LY'}, |
|
126 |
{name: 'Liechtenstein', code: 'LI'}, |
|
127 |
{name: 'Lithuania', code: 'LT'}, |
|
128 |
{name: 'Luxembourg', code: 'LU'}, |
|
129 |
{name: 'Macao', code: 'MO'}, |
|
130 |
{name: 'Madagascar', code: 'MG'}, |
|
131 |
{name: 'Malawi', code: 'MW'}, |
|
132 |
{name: 'Malaysia', code: 'MY'}, |
|
133 |
{name: 'Maldives', code: 'MV'}, |
|
134 |
{name: 'Mali', code: 'ML'}, |
|
135 |
{name: 'Malta', code: 'MT'}, |
|
136 |
{name: 'Marshall Islands', code: 'MH'}, |
|
137 |
{name: 'Martinique', code: 'MQ'}, |
|
138 |
{name: 'Mauritania', code: 'MR'}, |
|
139 |
{name: 'Mauritius', code: 'MU'}, |
|
140 |
{name: 'Mayotte', code: 'YT'}, |
|
141 |
{name: 'Mexico', code: 'MX'}, |
|
142 |
{name: 'Micronesia, Federated States of', code: 'FM'}, |
|
143 |
{name: 'Moldova, Republic of', code: 'MD'}, |
|
144 |
{name: 'Monaco', code: 'MC'}, |
|
145 |
{name: 'Mongolia', code: 'MN'}, |
|
146 |
{name: 'Montenegro', code: 'ME'}, |
|
147 |
{name: 'Montserrat', code: 'MS'}, |
|
148 |
{name: 'Morocco', code: 'MA'}, |
|
149 |
{name: 'Mozambique', code: 'MZ'}, |
|
150 |
{name: 'Myanmar', code: 'MM'}, |
|
151 |
{name: 'Namibia', code: 'NA'}, |
|
152 |
{name: 'Nauru', code: 'NR'}, |
|
153 |
{name: 'Nepal', code: 'NP'}, |
|
154 |
{name: 'Netherlands', code: 'NL'}, |
|
155 |
{name: 'New Caledonia', code: 'NC'}, |
|
156 |
{name: 'New Zealand', code: 'NZ'}, |
|
157 |
{name: 'Nicaragua', code: 'NI'}, |
|
158 |
{name: 'Niger', code: 'NE'}, |
|
159 |
{name: 'Nigeria', code: 'NG'}, |
|
160 |
{name: 'Niue', code: 'NU'}, |
|
161 |
{name: 'Norfolk Island', code: 'NF'}, |
|
162 |
{name: 'North Macedonia', code: 'MK'}, |
|
163 |
{name: 'Northern Mariana Islands', code: 'MP'}, |
|
164 |
{name: 'Norway', code: 'NO'}, |
|
165 |
{name: 'Oman', code: 'OM'}, |
|
166 |
{name: 'Pakistan', code: 'PK'}, |
|
167 |
{name: 'Palau', code: 'PW'}, |
|
168 |
{name: 'Palestine, State of', code: 'PS'}, |
|
169 |
{name: 'Panama', code: 'PA'}, |
|
170 |
{name: 'Papua New Guinea', code: 'PG'}, |
|
171 |
{name: 'Paraguay', code: 'PY'}, |
|
172 |
{name: 'Peru', code: 'PE'}, |
|
173 |
{name: 'Philippines', code: 'PH'}, |
|
174 |
{name: 'Pitcairn', code: 'PN'}, |
|
175 |
{name: 'Poland', code: 'PL'}, |
|
176 |
{name: 'Portugal', code: 'PT'}, |
|
177 |
{name: 'Puerto Rico', code: 'PR'}, |
|
178 |
{name: 'Qatar', code: 'QA'}, |
|
179 |
{name: 'Réunion', code: 'RE'}, |
|
180 |
{name: 'Romania', code: 'RO'}, |
|
181 |
{name: 'Russian Federation', code: 'RU'}, |
|
182 |
{name: 'Rwanda', code: 'RW'}, |
|
183 |
{name: 'Saint Barthélemy', code: 'BL'}, |
|
184 |
{name: 'Saint Helena, Ascension and Tristan da Cunha', code: 'SH'}, |
|
185 |
{name: 'Saint Kitts and Nevis', code: 'KN'}, |
|
186 |
{name: 'Saint Lucia', code: 'LC'}, |
|
187 |
{name: 'Saint Martin (French part)', code: 'MF'}, |
|
188 |
{name: 'Saint Pierre and Miquelon', code: 'PM'}, |
|
189 |
{name: 'Saint Vincent and the Grenadines', code: 'VC'}, |
|
190 |
{name: 'Samoa', code: 'WS'}, |
|
191 |
{name: 'San Marino', code: 'SM'}, |
|
192 |
{name: 'Sao Tome and Principe', code: 'ST'}, |
|
193 |
{name: 'Saudi Arabia', code: 'SA'}, |
|
194 |
{name: 'Senegal', code: 'SN'}, |
|
195 |
{name: 'Serbia', code: 'CS'}, |
|
196 |
{name: 'Seychelles', code: 'SC'}, |
|
197 |
{name: 'Sierra Leone', code: 'SL'}, |
|
198 |
{name: 'Singapore', code: 'SG'}, |
|
199 |
{name: 'Slovakia', code: 'SK'}, |
|
200 |
{name: 'Slovenia', code: 'SI'}, |
|
201 |
{name: 'Solomon Islands', code: 'SB'}, |
|
202 |
{name: 'Somalia', code: 'SO'}, |
|
203 |
{name: 'South Africa', code: 'ZA'}, |
|
204 |
{name: 'South Georgia and the South Sandwich Islands', code: 'GS'}, |
|
205 |
{name: 'Spain', code: 'ES'}, |
|
206 |
{name: 'Sri Lanka', code: 'LK'}, |
|
207 |
{name: 'Sudan', code: 'SD'}, |
|
208 |
{name: 'Suriname', code: 'SR'}, |
|
209 |
{name: 'Svalbard and Jan Mayen', code: 'SJ'}, |
|
210 |
{name: 'Swaziland', code: 'SZ'}, |
|
211 |
{name: 'Sweden', code: 'SE'}, |
|
212 |
{name: 'Switzerland', code: 'CH'}, |
|
213 |
{name: 'Syrian Arab Republic', code: 'SY'}, |
|
214 |
{name: 'Taiwan, Province of China', code: 'TW'}, |
|
215 |
{name: 'Tajikistan', code: 'TJ'}, |
|
216 |
{name: 'Tanzania, United Republic of', code: 'TZ'}, |
|
217 |
{name: 'Thailand', code: 'TH'}, |
|
218 |
{name: 'Timor-Leste', code: 'TL'}, |
|
219 |
{name: 'Togo', code: 'TG'}, |
|
220 |
{name: 'Tokelau', code: 'TK'}, |
|
221 |
{name: 'Tonga', code: 'TO'}, |
|
222 |
{name: 'Trinidad and Tobago', code: 'TT'}, |
|
223 |
{name: 'Tunisia', code: 'TN'}, |
|
224 |
{name: 'Turkey', code: 'TR'}, |
|
225 |
{name: 'Turkmenistan', code: 'TM'}, |
|
226 |
{name: 'Turks and Caicos Islands', code: 'TC'}, |
|
227 |
{name: 'Tuvalu', code: 'TV'}, |
|
228 |
{name: 'Uganda', code: 'UG'}, |
|
229 |
{name: 'Ukraine', code: 'UA'}, |
|
230 |
{name: 'United Arab Emirates', code: 'AE'}, |
|
231 |
{name: 'United Kingdom', code: 'GB'}, |
|
232 |
{name: 'United States', code: 'US'}, |
|
233 |
{name: 'United States Minor Outlying Islands', code: 'UM'}, |
|
234 |
{name: 'Uruguay', code: 'UY'}, |
|
235 |
{name: 'Uzbekistan', code: 'UZ'}, |
|
236 |
{name: 'Vanuatu', code: 'VU'}, |
|
237 |
{name: 'Venezuela, Bolivarian Republic of', code: 'VE'}, |
|
238 |
{name: 'Viet Nam', code: 'VN'}, |
|
239 |
{name: 'Virgin Islands, British', code: 'VG'}, |
|
240 |
{name: 'Virgin Islands, U.S.', code: 'VI'}, |
|
241 |
{name: 'Wallis and Futuna', code: 'WF'}, |
|
242 |
{name: 'Western Sahara', code: 'EH'}, |
|
243 |
{name: 'Yemen', code: 'YE'}, |
|
244 |
{name: 'Zambia', code: 'ZM'}, |
|
245 |
{name: 'Zimbabwe', code: 'ZW'}, |
|
246 |
{name: 'Ã…land Islands', code: 'AX'} |
|
247 |
]; |
modules/uoa-usage-statistics/branches/angular-11/src/app/services/layout.service.ts | ||
---|---|---|
1 |
import {Injectable} from '@angular/core'; |
|
2 |
import {ActivationStart, Router} from '@angular/router'; |
|
3 |
import {BehaviorSubject, Observable} from 'rxjs'; |
|
4 |
|
|
5 |
@Injectable({ |
|
6 |
providedIn: 'root' |
|
7 |
}) |
|
8 |
export class LayoutService { |
|
9 |
|
|
10 |
private isHomeSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(true); |
|
11 |
|
|
12 |
constructor(private router: Router) { |
|
13 |
this.router.events.subscribe(event => { |
|
14 |
if (event instanceof ActivationStart) { |
|
15 |
let data = event.snapshot.data; |
|
16 |
if (data['isHome'] == undefined || |
|
17 |
data['isHome'] === false) { |
|
18 |
this.setIsHome(false); |
|
19 |
} else { |
|
20 |
this.setIsHome(true); |
|
21 |
} |
|
22 |
} |
|
23 |
}); |
|
24 |
} |
|
25 |
|
|
26 |
public setIsHome(isHome: boolean) { |
|
27 |
this.isHomeSubject.next(isHome); |
|
28 |
} |
|
29 |
|
|
30 |
public get isHome(): Observable<boolean> { |
|
31 |
return this.isHomeSubject.asObservable(); |
|
32 |
} |
|
33 |
} |
modules/uoa-usage-statistics/branches/angular-11/src/app/app.component.html | ||
---|---|---|
1 |
<navbar *ngIf= "showMenu && header" [header]="header" portal="usage-counts" [onlyTop]="false" [userMenu]="false" [showLogo]="!isHome" |
|
2 |
[user]="user" [userMenuItems]=userMenuItems [menuItems]=menuItems [properties]=properties></navbar> |
|
3 |
<schema2jsonld [URL]="properties.domain" |
|
4 |
[logoURL]="properties.domain + '/assets/common-assets/logo-small-usage-counts.png'" |
|
5 |
type="home" description=" UsageCounts service collects usage data from repositories, journals and other scientific data sources, aggregates them and delivers standardized activity reports about research usage and uptake. It complements existing citation mechanisms and assists institutional repository managers, research communities, research organizations, funders and policy makers track and evaluate research from an early stage. " |
|
6 |
name="OpenAIRE - UsageCounts" [searchAction]="false" [searchActionRoute]=null> |
|
7 |
</schema2jsonld> |
|
8 |
<div class="custom-main-content"> |
|
9 |
<main [class.full-height]="isHome"> |
|
10 |
<router-outlet></router-outlet> |
|
11 |
</main> |
|
12 |
</div> |
|
13 |
<bottom *ngIf="!isHome" class="footer uk-visible@m" |
|
14 |
[showSocialButtons]="true" [showMenuItems]="true" [showOpenaire]="true" |
|
15 |
[darkBackground]="false" [centered]="true"></bottom> |
|
16 |
<bottom class="footer uk-hidden@m" |
|
17 |
[showSocialButtons]="true" [showMenuItems]="true" [showOpenaire]="true" |
|
18 |
[darkBackground]="false" [centered]="true"></bottom> |
|
19 |
<cookie-law position="bottom"> |
|
20 |
OpenAIRE uses cookies in order to function properly.<br> |
|
21 |
Cookies are small pieces of data that websites store in your browser to allow us to give you the best browsing experience possible. |
|
22 |
By using the OpenAIRE portal you accept our use of cookies. <a href="//ec.europa.eu/ipg/basics/legal/cookies/index_en.htm" target="_blank"> Read more <span class="uk-icon"> |
|
23 |
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="chevron-right" ratio="1"><polyline fill="none" stroke="#000" stroke-width="1.03" points="7 4 13 10 7 16"></polyline></svg> |
|
24 |
</span></a> |
|
25 |
</cookie-law> |
|
26 |
|
modules/uoa-usage-statistics/branches/angular-11/src/app/entities/usage-stat.ts | ||
---|---|---|
1 |
export interface UsageStat { |
|
2 |
repositories: any; |
|
3 |
total_downloads: any; |
|
4 |
total_views: any; |
|
5 |
} |
|
6 |
|
|
7 |
export interface CountryUsageStat { |
|
8 |
country: string; |
|
9 |
views: any; |
|
10 |
downloads:any; |
|
11 |
total_repos: any; |
|
12 |
} |
modules/uoa-usage-statistics/branches/angular-11/src/app/app.component.ts | ||
---|---|---|
1 |
import {Component, OnDestroy, OnInit} from '@angular/core'; |
|
2 |
import {MenuItem, RootMenuItem} from './openaireLibrary/sharedComponents/menu'; |
|
3 |
import {EnvProperties} from './openaireLibrary/utils/properties/env-properties'; |
|
4 |
import {User} from './openaireLibrary/login/utils/helper.class'; |
|
5 |
import {properties} from '../environments/environment'; |
|
6 |
import {LayoutService} from './services/layout.service'; |
|
7 |
import {Header} from './openaireLibrary/sharedComponents/navigationBar.component'; |
|
8 |
import {SmoothScroll} from './openaireLibrary/utils/smooth-scroll'; |
|
9 |
|
|
10 |
@Component({ |
|
11 |
selector: 'app', |
|
12 |
templateUrl: './app.component.html', |
|
13 |
}) |
|
14 |
|
|
15 |
export class AppComponent implements OnInit, OnDestroy { |
|
16 |
title = 'Metadata Registry Service'; |
|
17 |
userMenuItems: MenuItem[] = []; |
|
18 |
menuItems: RootMenuItem [] = []; |
|
19 |
logInUrl = null; |
|
20 |
logOutUrl = null; |
|
21 |
properties: EnvProperties = properties; |
|
22 |
showMenu: boolean = false; |
|
23 |
user: User; |
|
24 |
isHome: boolean; |
|
25 |
header: Header; |
|
26 |
logoPath: string = 'assets/common-assets/'; |
|
27 |
|
|
28 |
constructor(private layoutService: LayoutService, |
|
29 |
private smoothScroll: SmoothScroll) {} |
|
30 |
|
|
31 |
ngOnInit() { |
|
32 |
this.logInUrl = this.properties.loginUrl; |
|
33 |
this.logOutUrl = this.properties.logoutUrl; |
|
34 |
this.showMenu = true; |
|
35 |
this.layoutService.isHome.subscribe(isHome => { |
|
36 |
this.isHome = isHome |
|
37 |
this.header = { |
|
38 |
route: "/", |
|
39 |
url: null, |
|
40 |
title: 'usage-counts', |
|
41 |
logoUrl: this.logoPath + 'logo-large-usage-counts.png', |
|
42 |
logoSmallUrl:this.logoPath + 'logo-small-usage-counts.png', |
|
43 |
position:'left', |
|
44 |
badge:true |
|
45 |
}; |
|
46 |
this.buildMenu(isHome); |
|
47 |
}); |
|
48 |
} |
|
49 |
|
|
50 |
buildMenu(isHome) { |
|
51 |
this.menuItems = [ |
|
52 |
{ |
|
53 |
rootItem: new MenuItem("resources", "Resources", "", "/resources", false, [], null, {}), |
|
54 |
items: [ |
|
55 |
new MenuItem("provide", "OpenAIRE Provide", "", "/resources", false, [], null, {}), |
|
56 |
new MenuItem("apis", "APIs and Reports", "", "/resources", false, [], null, {}, null, 'apis') |
|
57 |
] |
|
58 |
}, |
|
59 |
{ |
|
60 |
rootItem: new MenuItem("analytics", "Analytics", "", "/analytics", false, [], null, {}), |
|
61 |
items: [] |
|
62 |
}, |
|
63 |
{ |
|
64 |
rootItem: new MenuItem("contact", "Contact", "", "/contact", false, [], null, {}), |
|
65 |
items: [] |
|
66 |
}, |
|
67 |
{ |
|
68 |
rootItem: new MenuItem("about", "About", "", "/about", false, [], null, {}), |
|
69 |
items: [ |
|
70 |
new MenuItem("architecture", "Architecture", "", "/about", false, [], null, {}, null, 'architecture'), |
|
71 |
/* |
|
72 |
new MenuItem("faqs", "FAQs", "", "/about", false, [], null, {}, null, 'faqs') |
|
73 |
*/ |
|
74 |
] |
|
75 |
} |
|
76 |
]; |
|
77 |
if(!isHome) { |
|
78 |
this.menuItems = [{ |
|
79 |
rootItem: new MenuItem("home", "Home", "", "/", false, [], null, {}), |
|
80 |
items: [] |
|
81 |
}].concat(this.menuItems); |
|
82 |
} |
|
83 |
} |
|
84 |
|
|
85 |
ngOnDestroy() { |
|
86 |
this.smoothScroll.clearSubscriptions(); |
|
87 |
} |
|
88 |
} |
modules/uoa-usage-statistics/branches/angular-11/src/app/analytics/analytics.component.html | ||
---|---|---|
1 |
<schema2jsonld [URL]="properties.domain" |
|
2 |
[logoURL]="properties.domain + '/assets/common-assets/logo-small-usage-counts.png'" |
|
3 |
type="other" [description]="description" [name]="title"> |
|
4 |
</schema2jsonld> |
|
5 |
<div class="analytics"> |
|
6 |
<div *ngIf="countryFb" class="uk-container uk-text-center countries"> |
|
7 |
<a class="uk-visible@l next uk-flex uk-flex-middle uk-text-uppercase" routerLink="./" fragment="graph-analysis"> |
|
8 |
Graph Analysis |
|
9 |
<icon name="arrow_down" [flex]="true" class="uk-margin-left"></icon> |
|
10 |
</a> |
|
11 |
<div class="uk-section uk-section-small"> |
|
12 |
<div class="uk-padding-small uk-padding-remove-vertical"> |
|
13 |
<h2 class="uk-margin-medium-bottom portal-color uk-text-bold">Track Countries Usage Activity</h2> |
|
14 |
<div class="uk-container uk-text-bold"> |
|
15 |
<div class="uk-width-4-5@m uk-align-center"> |
|
16 |
<div search-input #searchInput [control]="countryFb" [showSearch]="showSearch" |
|
17 |
placeholder="SEARCH FOR A COUNTRY" |
|
18 |
[selected]="country" [loading]="loading" [list]="countries" (searchEmitter)="search($event)" (resetEmitter)="reset()"> |
|
19 |
</div> |
|
20 |
</div> |
|
21 |
<div class="uk-margin-medium-bottom"> |
|
22 |
<div class="uk-text-uppercase">{{(country) ? country : 'worldwide'}}</div> |
|
23 |
<div class="uk-text-muted uk-text-uppercase uk-text-small">Results</div> |
|
24 |
</div> |
|
25 |
<div class="uk-width-2-3 uk-margin-large-bottom uk-margin-auto-left uk-margin-auto-right"> |
|
26 |
<div *ngIf="loading" class="uk-padding-large uk-width-1-1"> |
|
27 |
<loading></loading> |
|
28 |
</div> |
|
29 |
<div *ngIf="display && !loading" class="uk-grid uk-child-width-1-3@m uk-child-width-1-2@s" |
|
30 |
uk-grid> |
|
31 |
<div *ngIf="display.total_repos && state > 0" [class.uk-animation-fade]="state == 1"> |
|
32 |
<div class="card uk-margin-bottom"> |
|
33 |
<div class="uk-margin-medium-bottom"> |
|
34 |
Repositories |
|
35 |
</div> |
|
36 |
<h4> |
|
37 |
{{display.total_repos.number | number}}{{(display.total_repos.size) ? display.total_repos.size : ""}} |
|
38 |
</h4> |
|
39 |
<img src="../../assets/usage-statistics-assets/analytics/1.1.svg"> |
|
40 |
</div> |
|
41 |
</div> |
|
42 |
<div *ngIf="display.repositories && state > 0" [class.uk-animation-fade]="state == 1"> |
|
43 |
<div class="card uk-margin-bottom"> |
|
44 |
<div class="uk-margin-medium-bottom"> |
|
45 |
Repositories |
|
46 |
</div> |
|
47 |
<h4> |
|
48 |
{{display.repositories.number | number}}{{(display.repositories.size) ? display.repositories.size : ""}} |
|
49 |
</h4> |
|
50 |
<img src="../../assets/usage-statistics-assets/analytics/1.1.svg"> |
|
51 |
</div> |
|
52 |
</div> |
|
53 |
<div *ngIf="display.total_views && state > 1" [class.uk-animation-fade]="state == 2"> |
|
54 |
<div class="card uk-margin-bottom"> |
|
55 |
<div class="uk-margin-medium-bottom"> |
|
56 |
Views |
|
57 |
</div> |
|
58 |
<h4> |
|
59 |
{{display.total_views.number | number}}{{(display.total_views.size) ? display.total_views.size : ""}} |
|
60 |
</h4> |
|
61 |
<img src="../../assets/usage-statistics-assets/analytics/1.2.svg"> |
|
62 |
</div> |
|
63 |
</div> |
|
64 |
<div *ngIf="display.views && state > 1" [class.uk-animation-fade]="state == 2"> |
|
65 |
<div class="card uk-margin-bottom"> |
|
66 |
<div class="uk-margin-medium-bottom"> |
|
67 |
Views |
|
68 |
</div> |
|
69 |
<h4> |
|
70 |
{{display.views.number | number}}{{(display.views.size) ? display.views.size : ""}} |
|
71 |
</h4> |
|
72 |
<img src="../../assets/usage-statistics-assets/analytics/1.2.svg"> |
|
73 |
</div> |
|
74 |
</div> |
|
75 |
<div *ngIf="display.total_downloads && state > 2" [class.uk-animation-fade]="state == 3"> |
|
76 |
<div class="card uk-margin-bottom"> |
|
77 |
<div class="uk-margin-medium-bottom"> |
|
78 |
Downloads |
|
79 |
</div> |
|
80 |
<h4> |
|
81 |
{{display.total_downloads.number | number}}{{(display.total_downloads.size) ? display.total_downloads.size : ""}} |
|
82 |
</h4> |
|
83 |
<img src="../../assets/usage-statistics-assets/analytics/1.3.svg"> |
|
84 |
</div> |
|
85 |
</div> |
|
86 |
<div *ngIf="display.downloads && state > 2" [class.uk-animation-fade]="state == 3"> |
|
87 |
<div class="card uk-margin-bottom"> |
|
88 |
<div class="uk-margin-medium-bottom"> |
|
89 |
Downloads |
|
90 |
</div> |
|
91 |
<h4> |
|
92 |
{{display.downloads.number | number}}{{(display.downloads.size) ? display.downloads.size : ""}} |
|
93 |
</h4> |
|
94 |
<img src="../../assets/usage-statistics-assets/analytics/1.3.svg"> |
|
95 |
</div> |
|
96 |
</div> |
|
97 |
</div> |
|
98 |
<div *ngIf="!display && !loading" class="card uk-animation-fade"> |
|
99 |
<div class="uk-position-center"> |
|
100 |
No results found for that country |
|
101 |
</div> |
|
102 |
</div> |
|
103 |
</div> |
|
104 |
</div> |
|
105 |
</div> |
|
106 |
</div> |
|
107 |
</div> |
|
108 |
<div id="graph-analysis" class="uk-visible@m"> |
|
109 |
<div class="uk-container uk-section uk-text-center"> |
|
110 |
<div class="uk-padding-small uk-padding-remove-vertical"> |
|
111 |
<h3 class="uk-margin-medium-bottom uk-text-bold">Worldwide Monthly Usage Events</h3> |
|
112 |
<div class="uk-padding second"> |
|
113 |
<div class="iframe-card uk-margin-left uk-margin-right"> |
|
114 |
<iframe width="742" height="453" seamless frameborder="0" scrolling="no" |
|
115 |
src="https://docs.google.com/spreadsheets/d/e/2PACX-1vRN9KbdyQSnWrC-yNpZj3C0U6_Qp-XQBSm9KY0G1Pz5UMoi1Q0bL5RaC1-oBw3o6kYoT7drlGCjUNCy/pubchart?oid=82603024&format=interactive"></iframe> |
|
116 |
</div> |
|
117 |
</div> |
|
118 |
</div> |
|
119 |
</div> |
|
120 |
<div *ngIf="charts" class="uk-container uk-section uk-text-center"> |
|
121 |
<div class="uk-padding-small uk-padding-remove-vertical"> |
|
122 |
<h3 class="uk-margin-medium-bottom uk-text-bold">Worldwide Monthly Views & Downloads</h3> |
|
123 |
<div class="uk-padding third"> |
|
124 |
<div class="iframe-card uk-margin-left uk-margin-right uk-text-center"> |
|
125 |
<div> |
|
126 |
<ul class="uk-subnav uk-subnav-divider uk-margin-remove-bottom"> |
|
127 |
<li [class.uk-active]="years == 0"><a class="uk-text-primary" (click)="changeYear(0)">This year</a></li> |
|
128 |
<li [class.uk-active]="years == 1"><a class="uk-text-primary" (click)="changeYear(1)">Last 2 years</a> |
|
129 |
</li> |
|
130 |
<li [class.uk-active]="years == 2"><a class="uk-text-primary" (click)="changeYear(2)">Last 5 years</a> |
|
131 |
</li> |
|
132 |
</ul> |
|
133 |
</div> |
|
134 |
<div *ngIf="iframeLoading" class="uk-padding-large uk-width-1-1" role="alert"> |
|
135 |
<loading></loading> |
|
136 |
</div> |
|
137 |
<iframe (load)="onLoad()" class="uk-animation-fade" width="742" height="453" seamless frameborder="0" |
|
138 |
scrolling="no" [class.uk-hidden]="iframeLoading" |
|
139 |
[src]="charts[years]"></iframe> |
|
140 |
</div> |
|
141 |
</div> |
|
142 |
</div> |
|
143 |
</div> |
|
144 |
</div> |
|
145 |
</div> |
modules/uoa-usage-statistics/branches/angular-11/src/app/analytics/analytics.component.ts | ||
---|---|---|
1 |
import {Component, OnDestroy, OnInit, ViewChild} from '@angular/core'; |
|
2 |
import {CountryUsageStat, UsageStat} from '../entities/usage-stat'; |
|
3 |
import {FormControl} from '@angular/forms'; |
|
4 |
import {Observable, Subscriber, Subscription} from 'rxjs'; |
|
5 |
import {UsageStatsService} from '../services/usage-stats.service'; |
|
6 |
import {map, startWith} from 'rxjs/operators'; |
|
7 |
import {countries} from '../services/countries'; |
|
8 |
import {DomSanitizer, Meta, SafeUrl, Title} from '@angular/platform-browser'; |
|
9 |
import {StringUtils} from '../openaireLibrary/utils/string-utils.class'; |
|
10 |
import {ActivatedRoute, Router} from '@angular/router'; |
|
11 |
import {NumberUtils} from '../openaireLibrary/utils/number-utils.class'; |
|
12 |
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties'; |
|
13 |
import {properties} from '../../environments/environment'; |
|
14 |
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service'; |
|
15 |
import {SEOService} from '../openaireLibrary/sharedComponents/SEO/SEO.service'; |
|
16 |
import {SearchInputComponent} from '../openaireLibrary/sharedComponents/search-input/search-input.component'; |
|
17 |
|
|
18 |
@Component({ |
|
19 |
selector: 'analytics', |
|
20 |
templateUrl: 'analytics.component.html', |
|
21 |
styleUrls: ['analytics.component.css'], |
|
22 |
}) |
|
23 |
export class AnalyticsComponent implements OnInit, OnDestroy { |
|
24 |
public countryFb: FormControl; |
|
25 |
public countries: Observable<string[]>; |
|
26 |
public country: string; |
|
27 |
public loading: boolean = true; |
|
28 |
public iframeLoading: boolean = true; |
|
29 |
public display: UsageStat | CountryUsageStat; |
|
30 |
public showSearch: boolean = false; |
|
31 |
public state: number = 0; |
|
32 |
private timeouts: any[] = []; |
|
33 |
public years = 0; |
|
34 |
public charts: SafeUrl[]; |
|
35 |
properties: EnvProperties = properties; |
|
36 |
description = "Track Countries Usage Activity. Worldwide Monthly Usage Events, Monthly Views & Downloads."; |
|
37 |
title = "OpenAIRE - UsageCounts | Analytics"; |
|
38 |
subs: Subscription[] = []; |
|
39 |
searchSub: Subscription = null; |
|
40 |
@ViewChild('searchInput') searchInput: SearchInputComponent; |
|
41 |
|
|
42 |
constructor(private usageStatsService: UsageStatsService, |
|
43 |
private route: ActivatedRoute, |
|
44 |
private router: Router, |
|
45 |
private _title: Title, private _piwikService: PiwikService, |
|
46 |
private _meta: Meta, private seoService: SEOService, |
|
47 |
private sanitizer: DomSanitizer) { |
|
48 |
} |
|
49 |
|
|
50 |
ngOnInit() { |
|
51 |
this._title.setTitle(this.title); |
|
52 |
this._meta.updateTag({content: this.description}, "name='description'"); |
|
53 |
this._meta.updateTag({content: this.description}, "property='og:description'"); |
|
54 |
this._meta.updateTag({content: this.title}, "property='og:title'"); |
|
55 |
this._title.setTitle(this.title); |
|
56 |
let url = this.properties.domain + this.properties.baseLink + this.router.url; |
|
57 |
this.seoService.createLinkForCanonicalURL(url, false); |
|
58 |
this._meta.updateTag({content: url}, "property='og:url'"); |
|
59 |
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { |
|
60 |
this.subs.push(this._piwikService.trackView(this.properties, this.title).subscribe()); |
|
61 |
} |
|
62 |
this.init(); |
|
63 |
this.search(true); |
|
64 |
for(let i = 0; i < 3; i++) { |
|
65 |
this.charts = [ |
|
66 |
this.getSafeUrl('https://docs.google.com/spreadsheets/d/e/2PACX-1vQ-HejU11H1dMKa2MeIvLevnH0jtJUvduan3WMTjgDYCeq6g_WBPFBbZvg83hLuMv7XNyDQ3vHZWNYc/pubchart?oid=919355937&format=interactive'), |
|
67 |
this.getSafeUrl('https://docs.google.com/spreadsheets/d/e/2PACX-1vQ-HejU11H1dMKa2MeIvLevnH0jtJUvduan3WMTjgDYCeq6g_WBPFBbZvg83hLuMv7XNyDQ3vHZWNYc/pubchart?oid=1667183135&format=interactive'), |
|
68 |
this.getSafeUrl('https://docs.google.com/spreadsheets/d/e/2PACX-1vQ-HejU11H1dMKa2MeIvLevnH0jtJUvduan3WMTjgDYCeq6g_WBPFBbZvg83hLuMv7XNyDQ3vHZWNYc/pubchart?oid=2070534117&format=interactive') |
|
69 |
] |
|
70 |
} |
|
71 |
} |
|
72 |
|
|
73 |
public ngOnDestroy() { |
|
74 |
this.subs.forEach(subscription => { |
|
75 |
if (subscription instanceof Subscriber) { |
|
76 |
subscription.unsubscribe(); |
|
77 |
} |
|
78 |
}); |
|
79 |
this.clearTimeouts(); |
|
80 |
} |
|
81 |
|
|
82 |
private init() { |
|
83 |
this.countryFb = new FormControl(null); |
|
84 |
this.countries = this.countryFb.valueChanges |
|
85 |
.pipe( |
|
86 |
startWith(''), |
|
87 |
map(value => this._filter(value)) |
|
88 |
); |
|
89 |
} |
|
90 |
|
|
91 |
changeYear(i: number) { |
|
92 |
if(!this.iframeLoading) { |
|
93 |
this.iframeLoading = true; |
|
94 |
this.years = i; |
|
95 |
} |
|
96 |
} |
|
97 |
|
|
98 |
onLoad() { |
|
99 |
this.iframeLoading = false; |
|
100 |
} |
|
101 |
|
|
102 |
roundUsageStat(stats: UsageStat) { |
|
103 |
if(stats) { |
|
104 |
stats.repositories = NumberUtils.roundNumber(Number.parseInt(stats.repositories)); |
|
105 |
stats.total_downloads = NumberUtils.roundNumber(Number.parseInt(stats.total_downloads)); |
|
106 |
stats.total_views = NumberUtils.roundNumber(Number.parseInt(stats.total_views)); |
|
107 |
} |
|
108 |
return stats; |
|
109 |
} |
|
110 |
|
|
111 |
roundCountryUsageStat(stats: CountryUsageStat) { |
|
112 |
if(stats) { |
|
113 |
stats.total_repos = NumberUtils.roundNumber(Number.parseInt(stats.total_repos)); |
|
114 |
stats.downloads = NumberUtils.roundNumber(Number.parseInt(stats.downloads)); |
|
115 |
stats.views = NumberUtils.roundNumber(Number.parseInt(stats.views)); |
|
116 |
} |
|
117 |
return stats; |
|
118 |
} |
|
119 |
|
|
120 |
public search(show: boolean = false) { |
|
121 |
this.country = this.countryFb.value; |
|
122 |
this.showSearch = show; |
|
123 |
this.loading = true; |
|
124 |
this.clearTimeouts(); |
|
125 |
if (this.country && this.country.length > 0) { |
|
126 |
this.country = StringUtils.capitalize(this.country); |
|
127 |
this.searchSub = this.usageStatsService.getCountryMetrics(this.country).subscribe(stats => { |
|
128 |
this.display = this.roundCountryUsageStat(stats); |
|
129 |
this.loading = false; |
|
130 |
if (this.display) { |
|
131 |
this.state = 1; |
|
132 |
this.animation(); |
|
133 |
} |
|
134 |
}, error => { |
|
135 |
this.display = null; |
|
136 |
this.loading = false; |
|
137 |
}); |
|
138 |
} else { |
|
139 |
this.usageStatsService.getAllMetrics().subscribe(stats => { |
|
140 |
this.display = this.roundUsageStat(stats); |
|
141 |
this.loading = false; |
|
142 |
if (this.display) { |
|
143 |
this.state = 1; |
|
144 |
this.animation(); |
|
145 |
} |
|
146 |
}, error => { |
|
147 |
this.display = null; |
|
148 |
this.loading = false; |
|
149 |
}); |
|
150 |
} |
|
151 |
} |
|
152 |
|
|
153 |
private animation() { |
|
154 |
this.timeouts.push(setTimeout(() => { |
|
155 |
if (this.state != 3) { |
|
156 |
this.animation(); |
|
157 |
} |
|
158 |
this.state++; |
|
159 |
}, 800)); |
|
160 |
} |
|
161 |
|
|
162 |
private _filter(value: string): string[] { |
|
163 |
const filterValue = value.toLowerCase(); |
|
164 |
return countries.map(value => value.name).filter(option => filterValue && option.toLowerCase().includes(filterValue)); |
|
165 |
} |
|
166 |
|
|
167 |
clearTimeouts() { |
|
168 |
this.timeouts.forEach(timeout => { |
|
169 |
clearTimeout(timeout); |
|
170 |
}); |
|
171 |
this.state = 0; |
|
172 |
if(this.searchSub instanceof Subscription) { |
|
173 |
this.searchSub.unsubscribe(); |
|
174 |
} |
|
175 |
} |
|
176 |
|
|
177 |
reset() { |
|
178 |
this.clearTimeouts(); |
|
179 |
if (this.state == 0) { |
|
180 |
this.init(); |
|
181 |
this.searchInput.reset(); |
|
182 |
this.search(true); |
|
183 |
} |
|
184 |
} |
|
185 |
|
|
186 |
public getSafeUrl(url: string): SafeUrl { |
|
187 |
return this.sanitizer.bypassSecurityTrustResourceUrl(url); |
|
188 |
} |
|
189 |
} |
modules/uoa-usage-statistics/branches/angular-11/src/app/analytics/analytics.component.css | ||
---|---|---|
1 |
.countries { |
|
2 |
position: relative; |
|
3 |
} |
|
4 |
|
|
5 |
@media only screen and (min-width: 1200px) { |
|
6 |
.countries { |
|
7 |
min-height: calc(100vh - 100px); |
|
8 |
} |
|
9 |
} |
|
10 |
|
|
11 |
@media only screen and (min-width: 960px) { |
|
12 |
.countries { |
|
13 |
background-image: url("~src/assets/usage-statistics-assets/analytics/1.svg"); |
|
14 |
background-size: contain; |
|
15 |
background-repeat: no-repeat; |
|
16 |
background-position: top center; |
|
17 |
} |
|
18 |
} |
|
19 |
|
|
20 |
.countries a.next { |
|
21 |
position: absolute; |
|
22 |
bottom: 10vh; |
|
23 |
right: -10%; |
|
24 |
color: var(--portal-main-color); |
|
25 |
line-height: 24px; |
|
26 |
font-size: 18px; |
|
27 |
letter-spacing: 1.8px; |
|
28 |
z-index: 1; |
|
29 |
} |
|
30 |
|
|
31 |
.countries a.next svg { |
|
32 |
fill: currentColor |
|
33 |
} |
|
34 |
|
|
35 |
.countries a.next:hover { |
|
36 |
color: var(--portal-dark-color); |
|
37 |
} |
|
38 |
|
|
39 |
.card { |
|
40 |
background: #FFFFFF 0 0 no-repeat padding-box; |
|
41 |
box-shadow: 0 3px 6px #00000029; |
|
42 |
border-radius: 4px; |
|
43 |
padding: 40px 0; |
|
44 |
text-align: center; |
|
45 |
position: relative; |
|
46 |
height: 110px; |
|
47 |
font-weight: 700; |
|
48 |
} |
|
49 |
|
|
50 |
.card h4 { |
|
51 |
font-weight: 700; |
|
52 |
} |
|
53 |
|
|
54 |
.card > img { |
|
55 |
position: absolute; |
|
56 |
bottom: 0; |
|
57 |
left: 50%; |
|
58 |
transform: translate(-50%, 50%); |
|
59 |
} |
|
60 |
|
|
61 |
.second { |
|
62 |
background-image: url("~src/assets/usage-statistics-assets/analytics/2.2.svg"), url("/assets/usage-statistics-assets/analytics/2.1.svg"); |
|
63 |
background-size: auto; |
|
64 |
background-repeat: no-repeat; |
|
65 |
background-position: bottom left, top right; |
|
66 |
} |
|
67 |
|
|
68 |
.third { |
|
69 |
background-image: url("~src/assets/usage-statistics-assets/analytics/3.2.svg"), url("/assets/usage-statistics-assets/analytics/3.1.svg"); |
|
70 |
background-size: auto; |
|
71 |
background-repeat: no-repeat; |
|
72 |
background-position: bottom left, bottom right; |
|
73 |
} |
|
74 |
|
|
75 |
.third ul { |
|
76 |
padding-left: 0 !important; |
|
77 |
display: inline-flex; |
|
78 |
vertical-align: middle; |
|
79 |
flex-wrap: nowrap; |
|
80 |
} |
|
81 |
|
|
82 |
.third .uk-subnav-divider > :nth-child(n+2):not(.uk-first-column)::before { |
|
83 |
margin-right: 10px !important; |
|
84 |
border-left: 1px solid #f2f2f2 !important; |
|
85 |
} |
|
86 |
|
|
87 |
.third .uk-subnav > * { |
|
88 |
padding-left: 10px; |
|
89 |
flex: inherit; |
|
90 |
} |
|
91 |
|
|
92 |
.third ul > li > a { |
|
93 |
text-transform: none; |
|
94 |
letter-spacing: 0; |
|
95 |
} |
|
96 |
|
|
97 |
.third ul > li.uk-active > a, .third ul > li.uk-active > a:hover { |
|
98 |
color: var(--portal-main-color) !important; |
|
99 |
font-weight: 700; |
|
100 |
} |
|
101 |
|
|
102 |
.third .uk-subnav > *:nth-child(1) { |
|
103 |
padding-left: 0 !important; |
|
104 |
} |
|
105 |
|
|
106 |
.iframe-card { |
|
107 |
background: #FFFFFF 0 0 no-repeat padding-box; |
|
108 |
box-shadow: 1px 10px 12px #00000029; |
|
109 |
border: 1px solid #E0E0E0; |
|
110 |
border-radius: 5px; |
|
111 |
padding: 30px; |
|
112 |
min-height: 496px; |
|
113 |
} |
modules/uoa-usage-statistics/branches/angular-11/src/app/analytics/analytics.module.ts | ||
---|---|---|
1 |
import {NgModule} from '@angular/core'; |
|
2 |
import {CommonModule} from '@angular/common'; |
|
3 |
import {RouterModule} from '@angular/router'; |
|
4 |
|
|
5 |
import {AnalyticsComponent} from './analytics.component'; |
|
6 |
import {MatAutocompleteModule} from '@angular/material/autocomplete'; |
|
7 |
import {ReactiveFormsModule} from '@angular/forms'; |
|
8 |
import {MatFormFieldModule} from '@angular/material/form-field'; |
|
9 |
import {MatInputModule} from '@angular/material/input'; |
|
10 |
import {Schema2jsonldModule} from '../openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module'; |
|
11 |
import {IconsModule} from '../openaireLibrary/utils/icons/icons.module'; |
|
12 |
import {IconsService} from '../openaireLibrary/utils/icons/icons.service'; |
|
13 |
import {arrow_down} from '../openaireLibrary/utils/icons/icons'; |
|
14 |
import {LoadingModule} from '../openaireLibrary/utils/loading/loading.module'; |
|
15 |
import {SearchInputModule} from '../openaireLibrary/sharedComponents/search-input/search-input.module'; |
|
16 |
|
|
17 |
@NgModule({ |
|
18 |
imports: [ |
|
19 |
CommonModule, |
|
20 |
ReactiveFormsModule, |
|
21 |
RouterModule.forChild([{ |
|
22 |
path: '', component: AnalyticsComponent |
|
23 |
}]), |
|
24 |
Schema2jsonldModule, |
|
25 |
IconsModule, |
|
26 |
LoadingModule, |
|
27 |
SearchInputModule |
|
28 |
], |
|
29 |
declarations: [AnalyticsComponent], |
|
30 |
exports: [AnalyticsComponent] |
|
31 |
}) |
|
32 |
export class AnalyticsModule { |
|
33 |
constructor(private iconsService: IconsService) { |
|
34 |
this.iconsService.registerIcons([arrow_down]); |
|
35 |
} |
|
36 |
} |
modules/uoa-usage-statistics/branches/angular-11/src/app/home/home.component.html | ||
---|---|---|
1 |
<ng-template #first let-small="small"> |
|
2 |
<div class="uk-container uk-section first"> |
|
3 |
<div class="uk-grid uk-flex uk-flex-top" uk-grid> |
|
4 |
<div class="uk-hidden@m uk-flex uk-flex-center uk-width-1-1 uk-margin-medium-bottom"> |
|
5 |
<img src="assets/usage-statistics-assets/home/1-static.svg"/> |
|
6 |
</div> |
|
7 |
<div class="uk-width-3-5@m"> |
|
8 |
<h1><span class="portal-color uk-text-bold">UsageCounts Service</span><br> |
|
9 |
by OpenAIRE</h1> |
|
10 |
<div [class.uk-margin-xlarge-right]="!small"> |
|
11 |
<div class="uk-margin-medium-bottom"> |
|
12 |
UsageCounts service collects usage data from Open Science content providers repositories, journals, and |
|
13 |
other scientific data sources. Then, it aggregates them, delivering standardized activity reports about |
|
14 |
research usage and uptake. It complements existing citation mechanisms and assists institutional repository |
|
15 |
managers, research communities, research organizations, funders, and policy makers to track and evaluate |
|
16 |
research from an early stage. |
|
17 |
</div> |
|
18 |
<a routerLink="/about" class="uk-button uk-button-primary">Learn More</a> |
|
19 |
</div> |
|
20 |
</div> |
|
21 |
</div> |
|
22 |
</div> |
|
23 |
</ng-template> |
|
24 |
<ng-template #second let-small="small"> |
|
25 |
<div class="second uk-container uk-container-large"> |
|
26 |
<div class="uk-container"> |
|
27 |
<div class="uk-grid uk-flex uk-flex-middle" uk-grid> |
|
28 |
<div class="uk-flex uk-flex-last@m uk-width-expand"> |
|
29 |
<h2 class="uk-text-bold portal-color uk-text-right@m">Why OpenAIRE UsageCounts?</h2> |
|
30 |
</div> |
|
31 |
<div class="uk-width-1-1 uk-width-2-5@m"> |
|
32 |
<p> |
|
33 |
OpenAIRE <span class="portal-color uk-text-bold">UsageCounts applies</span> the Open Metrics framework which |
|
34 |
standardizes the sharing and exchange of usage |
|
35 |
data and develops trusted metrics to promote open science. |
|
36 |
</p> |
|
37 |
<p> |
|
38 |
<span class="portal-color uk-text-bold">UsageCounts is valuable for</span> various stakeholders that either |
|
39 |
provide or consume open science data metrics. |
|
40 |
The value for both user groups, briefly are; |
|
41 |
</p> |
|
42 |
</div> |
|
43 |
</div> |
|
44 |
<div [class.uk-padding]="!small" class="uk-grid uk-child-width-1-2@m uk-margin-top" uk-grid uk-height-match="target: li"> |
|
45 |
<div> |
|
46 |
<h4 class="uk-text-bold">Providers</h4> |
|
47 |
<ul class="light-blue-triangle uk-margin-top"> |
|
48 |
<li>Accurate and objective performance measures monitoring of repository content.</li> |
|
49 |
<li>Evidence based analytical metrics of views and downloads, aggregated from all over the world. |
|
50 |
</li> |
|
51 |
<li>Activity and trends of open science topics.</li> |
|
52 |
</ul> |
|
53 |
</div> |
|
54 |
<div> |
|
55 |
<h4 class="uk-text-bold">Consumers</h4> |
|
56 |
<ul class="light-blue-triangle uk-margin-top"> |
|
57 |
<li>Overview of research outcomes per country or domain.</li> |
|
58 |
<li>Trustable, accurate statistics of open science research.</li> |
|
59 |
<li>Evaluate the result of invested funds, policies, measures and view impact.</li> |
|
60 |
</ul> |
|
61 |
</div> |
|
62 |
</div> |
|
63 |
</div> |
|
64 |
</div> |
|
65 |
</ng-template> |
|
66 |
<ng-template #third> |
|
67 |
<div class="uk-container uk-container-large third"> |
|
68 |
<div class="uk-grid uk-child-width-1-3@m" uk-grid> |
|
69 |
<div class="uk-flex-last@m" > |
|
70 |
<div class="third-column"> |
|
71 |
<h2 class="portal-color uk-text-bold">Who and why is it for?</h2> |
|
72 |
<div> |
|
73 |
UsageCounts <span class="portal-color uk-text-bold">offers</span> standardized and comparable reports that measure the uptake of research outcomes. |
|
74 |
</div> |
|
75 |
</div> |
|
76 |
</div> |
|
77 |
<div> |
|
78 |
<div class="first-column"> |
|
79 |
<h5 class="uk-text-primary">For Open Science repository managers and Publishers</h5> |
|
80 |
<div class="uk-margin-top"> |
|
81 |
Perform the prerequisites - register your content in OpenAIRE |
|
82 |
<a href="http://provide.openaire.eu" target="_blank">PROVIDE</a>, |
|
83 |
then share usage activity from your repository - and receive standardized statistics from aggregated usage |
|
84 |
data from sources around the world. |
|
85 |
</div> |
|
86 |
<div class="uk-margin-medium-top uk-text-center learn-more"> |
|
87 |
<a class="uk-button uk-button-primary" routerLink="/resources">Learn More</a> |
|
88 |
</div> |
|
89 |
</div> |
|
90 |
</div> |
|
91 |
<div> |
|
92 |
<div class="second-column"> |
|
93 |
<h5 class="uk-text-primary">For Research performing & funding organizations, research infrastructures and |
|
94 |
policy makers</h5> |
|
95 |
<div class="uk-margin-top"> |
|
96 |
Retrieve easily, fast and dynamically view research uptake, identify science trends based on user activity, |
|
97 |
examine the engagement, and evolution or research popularity. |
|
98 |
</div> |
|
99 |
<div class="uk-margin-medium-top uk-text-center"> |
|
100 |
<a class="uk-button uk-button-primary" routerLink="/resources" fragment="apis">Learn More</a> |
|
101 |
</div> |
|
102 |
</div> |
|
103 |
</div> |
|
104 |
</div> |
|
105 |
</div> |
|
106 |
</ng-template> |
|
107 |
<ng-template #fourth> |
|
108 |
<div class="uk-container"> |
|
109 |
<div class="uk-grid uk-grid-large uk-flex uk-flex-middle uk-flex-center" uk-grid> |
|
110 |
<div class="uk-width-expand@m uk-flex uk-flex-right uk-flex-last@m"> |
|
111 |
<div class="features uk-width-4-5 uk-margin-auto"> |
|
112 |
<h1 class="uk-text-bold portal-color">Features</h1> |
|
113 |
</div> |
|
114 |
</div> |
|
115 |
<div class="uk-width-2-3@m"> |
|
116 |
<ul class="light-blue-circle large"> |
|
117 |
<li>Provides standards for usage data exchange |
|
118 |
(<a href="https://openaire.github.io/usage-statistics-guidelines/" target="_blank">OpenAIRE Usage Statistics Guidelines |
|
119 |
<span class="custom-icon custom-external"></span></a>) |
|
120 |
</li> |
|
121 |
<li>Complies to <a href="https://www.projectcounter.org/" target="_blank">COUNTER <span |
|
122 |
class="custom-icon custom-external"></span></a> Code of Practice for reliable and comparable reports |
|
123 |
</li> |
|
124 |
<li>Follows GDPR guidelines</li> |
|
125 |
<li>Offers global coverage</li> |
|
126 |
<li>Supports analysis via advanced visualizations</li> |
|
127 |
<li>Exports different types of reports via standard <a routerLink="/resources" fragment="apis">APIs</a></li> |
|
128 |
</ul> |
|
129 |
</div> |
|
130 |
</div> |
|
131 |
</div> |
|
132 |
</ng-template> |
|
133 |
<fp-slider #slider class="uk-visible@l" [hasFooter]="true" [initSlide]="initSlide" |
|
134 |
footerClass="footer" topBar="top-bar-background" logoURL="/assets/common-assets/logo-small-usage-counts.png"> |
|
135 |
<slide> |
|
136 |
<ng-container *ngTemplateOutlet="first; context: {small: false}"></ng-container> |
|
137 |
</slide> |
|
138 |
<slide> |
|
139 |
<ng-container *ngTemplateOutlet="second"></ng-container> |
|
140 |
</slide> |
|
141 |
<slide> |
|
142 |
<ng-container *ngTemplateOutlet="third"></ng-container> |
|
143 |
</slide> |
|
144 |
<slide> |
|
145 |
<ng-container *ngTemplateOutlet="fourth"></ng-container> |
|
146 |
</slide> |
|
147 |
</fp-slider> |
|
148 |
<div class="uk-hidden@l"> |
|
149 |
<div class="uk-section uk-margin-left uk-margin-right"> |
|
150 |
<ng-container *ngTemplateOutlet="first; context: {small: true}"></ng-container> |
|
151 |
</div> |
|
152 |
<hr> |
|
153 |
<div class="uk-section uk-margin-left uk-margin-right"> |
|
154 |
<ng-container *ngTemplateOutlet="second; context: {small: true}"></ng-container> |
|
155 |
</div> |
|
156 |
<hr> |
|
157 |
<div class="uk-section"> |
|
158 |
<ng-container *ngTemplateOutlet="third"></ng-container> |
|
159 |
</div> |
|
160 |
<hr> |
|
161 |
<div class="uk-section uk-margin-left uk-margin-right"> |
|
162 |
<ng-container *ngTemplateOutlet="fourth"></ng-container> |
|
163 |
</div> |
|
164 |
</div> |
modules/uoa-usage-statistics/branches/angular-11/src/app/home/home.component.ts | ||
---|---|---|
1 |
import {Component, OnDestroy, OnInit, ViewChild} from '@angular/core'; |
|
2 |
import {ActivatedRoute, Router} from '@angular/router'; |
|
3 |
import {Meta, Title} from '@angular/platform-browser'; |
|
4 |
import {FullPageSliderComponent} from '../openaireLibrary/utils/full-page-slider/full-page-slider.component'; |
|
5 |
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties'; |
|
6 |
import {Subscriber, Subscription} from 'rxjs'; |
|
7 |
import {properties} from '../../environments/environment'; |
|
8 |
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service'; |
|
9 |
import {SEOService} from '../openaireLibrary/sharedComponents/SEO/SEO.service'; |
|
10 |
|
|
11 |
@Component({ |
|
12 |
selector: 'home', |
Also available in: Unified diff
Delete angular 11 branch