Compare commits

...

60 Commits

Author SHA1 Message Date
Konstantinos Spyrou 8638caf9b1 Fix: case insensitive match for validation types 2024-09-06 16:12:09 +03:00
Andreas Mantas 93f22de4ec Merge pull request 'develop' (#2) from develop into master
Reviewed-on: #2
2024-04-04 15:10:25 +02:00
Andreas Mantas e5f25cbab1 update aggregation history displayed fields 2024-03-22 17:44:05 +02:00
Andreas Mantas 131081f5e8 rename sidemenu REPOSITORIES to DATASOURCES 2024-03-13 12:49:23 +02:00
John Balasis 0c59e9a39c fix for redirect url 2023-12-21 14:40:07 +02:00
Antonis Lempesis d57ce31b52 Update 'README.md' 2023-11-15 12:01:34 +01:00
Antonis Lempesis e9763e2f07 Update 'README.md' 2023-11-15 12:00:59 +01:00
Lampros Smyrnaios a13fb2eb40 Add some information in README, about the "Building", "Deployment" and "Installation" of the project. 2023-11-15 12:40:45 +02:00
John Balasis 62e8959029 Merge pull request 'develop' (#1) from develop into master
Reviewed-on: #1
2023-11-02 12:53:18 +01:00
jbalasis a1e8dcd5a0 minor dashboard agregation history fix 2023-11-02 12:20:21 +02:00
jbalasis 0680cf8c55 minor fixes for count r5 reports 2023-11-02 11:34:46 +02:00
John Balasis 039dea5424 removed data print from metrics-usagestats-report-results page 2023-11-01 14:58:25 +02:00
TheQuaker eed8f595cd fixes for dsr report type 2023-09-29 17:03:57 +03:00
jbalasis b39bcccbd7 fix pr_p1 report name, working on dsr table display 2023-09-28 20:13:41 +03:00
jbalasis ae3b932a9f creating tables for counter R5 repots 2023-09-28 16:16:59 +03:00
jbalasis e8f69c38bb changes for metrics query params 2023-09-27 10:16:53 +03:00
jbalasis aeb81dde96 package upgrades 2023-09-26 17:18:44 +03:00
Konstantinos Spyrou 3d58cd5ea0 Merge remote-tracking branch 'origin/campaign-banner' into develop 2023-06-06 16:11:08 +03:00
Stefania Martziou b9a26ad8c1 Added a new section in the home page (update guidelines campaign) 2023-06-06 15:42:36 +03:00
jbalasis 10a0e7e9f1 added sushilite responce classes 2023-03-31 17:06:47 +03:00
TheQuaker f13dddf8b5 stop wizard tabs from redirecting to home 2023-03-22 17:48:36 +02:00
TheQuaker 2259b7b701 Added R5 report titles 2023-03-22 15:30:25 +02:00
jbalasis 3f5919b2df added new querry params for release 5 reports 2023-03-21 17:01:45 +02:00
TheQuaker 1d1963aeb6 added new R5 reports, added checboxes for new R5 metrics 2023-03-20 16:53:52 +02:00
Konstantinos Spyrou 1329590012 fixed aai logout link 2023-02-24 16:54:51 +02:00
Lampros Smyrnaios 7dfbe3a51c Fix malformed url, when requesting data from the "getJobsOfUser" endpoint.
Previously, the url had its parameters starting with "&", instead of "?". The "offset"-param which was prepended with "?" was not the first param of the url!
2023-02-20 19:06:43 +02:00
TheQuaker 94b99f8e51 Fixes for modal error messages when adding/removing repository admins 2023-02-17 17:36:14 +02:00
Antonis Lempesis e452c5205b Add 'LICENSE.txt' 2023-02-14 20:40:47 +01:00
jbalasis 1a790aa7ad updated helpdesk url 2023-02-06 11:52:50 +02:00
John Balasis cd6bbdeee7 ui changes at interface form 2023-01-27 10:35:29 +00:00
John Balasis 5e94e0c59e updated compatibility labels 2023-01-25 15:31:30 +00:00
John Balasis 951ada0cb0 finaly after so much rage it works probaply... 2023-01-23 16:38:09 +00:00
John Balasis b044244685 add and update interface hopefully works now 2023-01-20 16:31:18 +00:00
John Balasis 52d3c2edc0 ooops 2023-01-18 16:21:26 +00:00
John Balasis a4c0f7f32f removed probably unnecessary subscription 2023-01-18 16:19:06 +00:00
John Balasis af8437ef2f removed some logs 2023-01-18 14:58:51 +00:00
John Balasis c3b14054b7 finalizing update interfaces 2023-01-17 15:30:31 +00:00
John Balasis 6621357091 added desired compatibility level plus minor fixes 2023-01-16 15:15:06 +00:00
John Balasis fb452386a1 changes for interface update form and functionality 2023-01-13 16:12:16 +00:00
Konstantinos Spyrou 4c08464797 fixed jasmine-core dependency version 2022-10-26 09:04:28 +00:00
John Balasis f12a808386 updated typologies 2022-10-10 10:46:30 +00:00
John Balasis 738fc69a79 Minor text fixes for repository and registration finish 2022-10-05 13:42:45 +00:00
andreas.mantas 4b00a98db2 fix emailing interface comments and cleanup 2022-09-09 09:11:42 +00:00
John Balasis c3d3dceb35 longtitude and latitude are no longer mandatory 2022-09-06 13:43:41 +00:00
andreas.mantas 2580dc6cf8 cleanup 2022-08-05 09:06:29 +00:00
andreas.mantas b9d7fb8732 svn merge -r 62321:HEAD http://svn.driver.research-infrastructures.eu/driver/dnet45/modules/uoa-repository-dashboard-gui/branches/new-datasource-mode 2022-08-05 08:45:51 +00:00
John Balasis 2b212979dd removed some console logs 2022-06-15 09:52:10 +00:00
John Balasis 4c0d2e560d fix for repository update page mode type 2022-06-15 09:41:37 +00:00
John Balasis 1c756566b0 To be fixed 2022-05-24 12:55:49 +00:00
John Balasis f76d88979e Added registration date at datasource update terms form 2022-05-24 12:45:11 +00:00
John Balasis 13366df06d Added lastConsentTermsOfUseDate to Repository class 2022-05-23 13:16:06 +00:00
John Balasis dd3524bc47 removed some console logs 2022-05-09 14:53:38 +00:00
John Balasis 34d85bdbb8 Fixes for cris validation 2022-05-06 15:51:43 +00:00
andreas.mantas 7f0ea0db17 move 'CRIS systems' to coming soon area 2022-05-04 11:09:24 +00:00
andreas.mantas 7250c469c6 show 'Date of Acceptance of the Terms of Use' under Update ToU tab 2022-05-04 10:14:05 +00:00
Antonis Lempesis c6ec50f0b0 merged branch cris-registration (r62082:HEAD) 2022-04-20 21:23:34 +00:00
stefania.martziou 3c74f2a381 Merging terms of use branch 2022-04-06 10:10:42 +00:00
Konstantinos Spyrou c7e7a28408 created script for beta and production builds 2021-07-22 10:07:42 +00:00
Konstantinos Spyrou 17a888cff2 fixed logout 2021-07-22 08:36:29 +00:00
Konstantinos Spyrou cbff7a55ee removed openAIREUser cookie usage 2021-07-19 11:40:18 +00:00
78 changed files with 12045 additions and 9755 deletions

176
LICENSE.txt Normal file
View File

@ -0,0 +1,176 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS

108
README.md
View File

@ -1,32 +1,110 @@
# UOA Repository Manager UI
## Introduction
## Architecture
## Building
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 6.0.8 (Angular version 6.1.10).
## Minimum requirements for installing and building the project
#### Minimum requirements for installing and building the project
[Node.js](https://nodejs.org/en/) version 8.x or 10.x.<br>
[npm client](https://docs.npmjs.com/cli/install) command line interface (it is installed with Node.js by default).
- [Node.js version 16](https://nodejs.org/en/blog/release/v16.16.0)
## Installing the project
###### Build Instructions:
Follow the instructions below to download the source code and build the application.
For more information about building an Angular app you can refer to the official documentation: [Building and serving Angular apps](https://angular.io/guide/build#building-and-serving-angular-apps).
After checking out (or updating) the repository enter the created folder and run `npm ci`.
This will install the exact versions of the dependencies as mentioned in the `package-lock.json` file (inside the root folder).
1. Clone the repository and move inside the directory
<br> `git clone https://code-repo.d4science.org/MaDgIK/uoa-repository-manager-ui.git && cd uoa-repository-manager-ui`
2. Install Angular dependencies
<br> `npm install`
3. Build Angular app
<br> `ng build --configuration production`
<br> Produces the directory "dist/**uoa-repository-manager-ui**" which contains the compiled files.
<br>
<br>
## Build for production
## Deployment
Run `npm run build` (equivalent of `ng build --prod`) to build the project. The build artifacts will be stored in the `dist/uoa-repository-manager-ui` directory.
### Prerequisites
- Nginx
## Deploy project to nginx server
### Instructions
To deploy the Frontend app:
1. Make sure that you have successfully built and installed the application on Nginx (or another Web Server).
2. _Start_ or _reload_ the Web Server service.
<br>e.g. `systemctl start nginx` or `systemctl reload nginx`
Run `tar -czvf dist.tar.gz dist/` to generate a compressed `.gz` file containing the built angular folder<br>
Run `scp dist.tar.gz path/to/server/` to copy the compressed file to the server.<br>
Connect to server (`ssh user@server.ip.address`).<br>
Uncompress `dist.tar.gz` file.<br>
Navigate to the root folder of the server.
Copy the contents of the uncompressed dist/uoa-repository-manager-ui folder
into the `uoa-repository-manager-dashboard` folder (superuser privileges are normally required for this action).<br>
## Installation
## Other topics
### Prerequisites
- [Nginx](https://www.nginx.com/) (or another Web Server like [Apache HTTP Server](https://httpd.apache.org/))
<br>
<br>
### Installation
#### Nginx Configuration
You have to create a [Server Block configuration](https://www.nginx.com/resources/wiki/start/topics/examples/server_blocks/) that will point to the directory "dist/**uoa-repository-manager-ui**" created by [building manually](./building.md#manual-build) the webapp.
It must also be configured as a reverse proxy for the Backend Application (to serve it under the path '/api') and for the list of [Dependencies](#dependencies) of the project.
See the example below:
```nginx
server {
server_name ...
access_log ...
root /path/to/uoa-repository-manager-ui; # the directory of the application
location / {
try_files $uri$args $uri$args/ /index.html /index.php;
}
location ~* \.(eot|ttf|woff)$ {
add_header Access-Control-Allow-Origin *;
}
# reverse proxy configuration for the backend application
location /api {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass <?>;
proxy_read_timeout 3600;
proxy_send_timeout 3600;
}
[...]
}
```
Lastly, we would advice to validate the configuration of the Nginx to make sure it does not contain errors.
<br>Execute `nginx -t` with elevated permissions to perform a validation. If the test is successful you can move on to [deploying](./deployment.md#frontend) the application.
<br>
<br>
## Configuration
## Security
## Maintenance
## Recovery
## References
## Other topics
### Development server
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.<br>

17321
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -5,21 +5,23 @@
"ng": "ng",
"start": "ng serve --proxy-config proxy.conf.json",
"start:proxy": "ng serve --proxy-config proxy.conf.json",
"build": "rm -rf dist; ng build --configuration production",
"build": "ng build --output-hashing=all",
"build:beta": "ng build --configuration beta --output-hashing=all",
"build:prod": "ng build --configuration production --output-hashing=all",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "12.1.2",
"@angular/common": "12.1.2",
"@angular/compiler": "12.1.2",
"@angular/core": "12.1.2",
"@angular/forms": "12.1.2",
"@angular/platform-browser": "12.1.2",
"@angular/platform-browser-dynamic": "^12.1.2",
"@angular/router": "12.1.2",
"@angular/animations": "12.2.17",
"@angular/common": "12.2.17",
"@angular/compiler": "12.2.17",
"@angular/core": "12.2.17",
"@angular/forms": "12.2.17",
"@angular/platform-browser": "12.2.17",
"@angular/platform-browser-dynamic": "^12.2.17",
"@angular/router": "12.2.17",
"altair": "^1.0.0",
"bootstrap": "^4.1.3",
"core-js": "^2.5.4",
@ -35,15 +37,15 @@
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "~12.1.2",
"@angular/cli": "~12.1.2",
"@angular/compiler-cli": "^12.1.2",
"@angular/language-service": "^12.1.2",
"@angular-devkit/build-angular": "~12.2.18",
"@angular/cli": "~12.2.18",
"@angular/compiler-cli": "^12.2.17",
"@angular/language-service": "^12.2.17",
"@types/jasmine": "~3.6.0",
"@types/jasminewd2": "~2.0.3",
"@types/node": "^12.11.1",
"codelyzer": "^6.0.0",
"jasmine-core": "~3.6.0",
"jasmine-core": "~3.8.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~6.3.4",
"karma-chrome-launcher": "~3.1.0",

View File

@ -3,9 +3,9 @@ import { NgModule } from '@angular/core';
import { HomeComponent } from './pages/landing/home/home.component';
import { AuthGuardService } from './services/auth-guard.service';
import { ForbiddenPageComponent } from './shared/reusablecomponents/403-forbidden-page.component';
import { EmptyPageComponent } from "./pages/emptypage/empty-page.component";
import { JoinComponent } from "./pages/join/join.component";
import { AboutComponent } from "./pages/landing/about/about.component";
import { EmptyPageComponent } from './pages/emptypage/empty-page.component';
import { JoinComponent } from './pages/join/join.component';
import { AboutComponent } from './pages/landing/about/about.component';
const appRoutes: Routes = [
{
@ -34,22 +34,13 @@ const appRoutes: Routes = [
{
path: 'repository',
loadChildren: () => import('./pages/repository/repository.module').then(m => m.RepositoryModule),
// loadChildren: () => import('./pages/repository/repository.module').then(m => m.RepositoryModule),
canActivate: [AuthGuardService]
},
{
path: 'repositoryAdmin',
loadChildren: () => import('./pages/repository/repository.module').then(m => m.RepositoryModule),
// loadChildren: () => import('./pages/repository/repository.module').then(m => m.RepositoryModule),
canActivate: [AuthGuardService]
},
// {
// path: 'dashboard',
// component: DashboardComponent,
// canActivate: [AuthGuardService]
// },
{
path: 'sources',
loadChildren: () => import('./pages/sources/sources.module').then(m => m.SourcesModule),
@ -64,11 +55,6 @@ const appRoutes: Routes = [
loadChildren: () => import('./pages/content/content.module').then(m => m.ContentModule),
canActivate: [AuthGuardService]
},
// {
// path: 'getImpact',
// loadChildren: './pages/metrics/metrics.module#MetricsModule',
// canActivate: [AuthGuardService]
// },
{
path: 'admin',
loadChildren: () => import('./pages/adminPg/adminPg.module').then(m => m.AdminPgModule),
@ -77,13 +63,8 @@ const appRoutes: Routes = [
path: '403-forbidden',
component: ForbiddenPageComponent
},
// {
// path: '',
// redirectTo: '/home',
// pathMatch: 'full'
// },
{
//fixme redirect to 404
// fixme redirect to 404
path: '**',
redirectTo: '/403-forbidden',
// component: ForbiddenPageComponent

View File

@ -50,26 +50,39 @@
<!-- End Matomo Code -->
<!--&lt;!&ndash; Terms of Use (modal) &ndash;&gt;-->
<!--<confirmation-dialog #subscribeToTermsModal [title]=modalTitle [isModalShown]=isModalShown-->
<!-- [confirmActionButton]=modalButton (emitObject)="updateTerms()">-->
<!-- <form class="" [formGroup]="agreementForm">-->
<!-- <div formArrayName="terms">-->
<!-- <table class="table">-->
<!-- <tr class="uk-text-nowrap">Do you agree with the <a href="https://zenodo.org/record/1446384#.XiGIAdmxU5n" target="_blank">terms of use</a>?</tr>-->
<!-- <tbody>-->
<!-- <tr class="el-item" *ngFor="let term of terms.controls; let i=index">-->
<!--&lt;!&ndash; {{term.get('accept').value}}&ndash;&gt;-->
<!-- <br> {{term.get('name').value}} <br>-->
<!-- <div [formGroupName]="i">-->
<!-- <label>-->
<!-- <input id="i" type="checkbox" formControlName="accept"> Yes, I agree to the terms of use.-->
<!-- </label>-->
<!-- </div>-->
<!-- </tr>-->
<!-- </tbody>-->
<!-- </table>-->
<!-- </div>-->
<!-- </form>-->
<!-- &lt;!&ndash; <pre>{{this.agreementForm.value | json}}</pre>&ndash;&gt;-->
<!--</confirmation-dialog>-->
<!-- Terms of Use (modal) -->
<confirmation-dialog #subscribeToTermsModal [title]=modalTitle [isModalShown]=isModalShown
[confirmActionButton]=modalButton (emitObject)="updateTerms()">
<form class="" [formGroup]="agreementForm">
<div formArrayName="terms">
<table class="table">
<tr>Thanks for being part of OpenAIRE. Please confirm the acceptance of our datasources policy.</tr>
<br>
<tr>Being registered in OpenAIRE, you are giving consent to OpenAIRE to download, transform and enrich the
metadata records, publishing them in the OpenAIRE Research Graph.
</tr>
<tbody>
<tr class="el-item" *ngFor="let term of terms.controls; let i=index">
<br> {{term.get('name').value}} <br>
<div [formGroupName]="i">
<label>
<input id="consentTerms" type="checkbox" formControlName="consentTermsOfUse">
Accept the <a href="https://www.openaire.eu/terms-of-use-for-content-providers" target="_blank">Terms of Use</a>
</label>
<br>
<label>
<input id="consentText" type="checkbox" formControlName="fullTextDownload">Agree to the
<a href="https://www.openaire.eu/terms-of-use-for-content-providers#consent" target="_blank">
re-use of full texts</a>
</label>
</div>
</tr>
</tbody>
<p class="uk-text-meta">Note: OpenAIRE will not provide the full text files for public distribution,
the users will access from the original datasource.
</p>
</table>
</div>
</form>
<!-- <pre>{{this.agreementForm.value | json}}</pre>-->
</confirmation-dialog>

View File

@ -1,14 +1,12 @@
import {Component, OnInit, ViewChild} from '@angular/core';
import { NavigationEnd, Router, RoutesRecognized } from '@angular/router';
import { AuthenticationService } from './services/authentication.service';
import { environment } from '../environments/environment';
import { MatomoTracker } from 'ngx-matomo';
import { ConfirmationDialogComponent } from './shared/reusablecomponents/confirmation-dialog.component';
import { RepositoryService } from './services/repository.service';
import { RepositorySnippet } from './domain/typeScriptClasses';
import {FormBuilder, FormGroup, FormControl, FormArray} from '@angular/forms';
import {element} from 'protractor';
import {timestamp} from 'rxjs/operators';
import {NavigationEnd, Router} from '@angular/router';
import {AuthenticationService} from './services/authentication.service';
import {environment} from '../environments/environment';
import {MatomoTracker} from 'ngx-matomo';
import {ConfirmationDialogComponent} from './shared/reusablecomponents/confirmation-dialog.component';
import {RepositoryService} from './services/repository.service';
import {RepositorySnippet} from './domain/typeScriptClasses';
import {FormBuilder, FormGroup, FormArray} from '@angular/forms';
@Component({
selector: 'oa-repo-manager',
@ -32,13 +30,10 @@ export class AppComponent implements OnInit {
open: boolean = true;
constructor(private router: Router,
private authService: AuthenticationService,
private matomoTracker: MatomoTracker,
private repositoryService: RepositoryService,
private fb: FormBuilder) {
constructor(private router: Router, private authService: AuthenticationService, private matomoTracker: MatomoTracker,
private repositoryService: RepositoryService, private fb: FormBuilder) {
console.log('21-06-2019. Fixed matomo to log userIds?');
// console.log('21-06-2019. Fixed matomo to log userIds?');
/*disabling console.log in production*/
if ( environment.production === true ) {
@ -56,63 +51,64 @@ export class AppComponent implements OnInit {
this.authService.tryLogin();
}
getReposOfUser(): void {
this.repositoryService.getRepositoriesSnippetsOfUser()
.subscribe(
repos => { this.reposOfUser = repos; },
error => { console.log(error); },
() => {
console.log(this.reposOfUser);
this.reposOfUser.forEach( repo => {
// TODO: change !repo.consentTermsOfUse check when it gets a non-null value
if (this.authService.isLoggedIn && !repo.consentTermsOfUse) {
this.addTerm(repo.officialname, repo.id, repo.consentTermsOfUse);
this.isModalShown = true;
}
});
}
);
}
updateTerms() {
/* update consentTermsOfUse, consentTermsOfUseDate(?)
depending on what value will consentTermsOfUse hold
Also what type of consentTermsOfUse will be? boolean or string */
for (let i = 0; i < this.terms.length; i++) {
const id = this.terms.controls[i].get('id').value;
if (this.terms.controls[i].get('accept').value === true) {
console.log(`Agreed to the Terms of Use for: `, id);
}
}
this.consentTermsOfUseDate = new Date(Date.now());
console.log(this.consentTermsOfUseDate);
console.log('will POST when backend is ready');
}
ngOnInit() {
this.router.events.subscribe((evt) => {
if (!(evt instanceof NavigationEnd)) {
return;
}
if (this.authService.isLoggedIn) {
if (this.authService.isLoggedIn_) {
this.matomoTracker.setUserId(this.authService.getUserEmail());
}
window.scrollTo(0, 0);
});
// this.getReposOfUser();
this.authService.isLoggedIn.subscribe(
logged => {if (logged) {this.getReposOfUser(); }},
error => {console.log(error); }
);
}
addTerm(name: string, id: string, consent: string) {
getReposOfUser(): void {
this.repositoryService.getRepositoriesSnippetsOfUser().subscribe(
repos => {
this.reposOfUser = repos;
},
error => {
console.log(error);
},
() => {
// console.log(this.reposOfUser);
if (this.agreementForm.get('terms').value.length === 0) {
this.reposOfUser.forEach(repo => {
if (repo.consentTermsOfUse === null || repo.fullTextDownload === null) {
this.addTerm(repo.officialname, repo.id, repo.consentTermsOfUse);
this.isModalShown = true;
}
});
}
}
);
}
updateTerms() {
this.repositoryService.updateRepositoriesTerms(this.agreementForm.value.terms).subscribe(
res => {},
err => {console.log(err); }
);
}
addTerm(name: string, id: string, consent: boolean) {
this.terms.push(this.newTerm(name, id, consent));
}
newTerm(name: string, id: string, consent: string): FormGroup {
newTerm(name: string, id: string, consent: boolean): FormGroup {
return this.fb.group({
id: [id],
name: [name],
accept: [(consent ? consent : true)]
// accept: [(consent ? consent : true)]
consentTermsOfUse: false,
fullTextDownload: false
});
}

View File

@ -26,7 +26,7 @@ export const interfaceFormDesc = {
/* Desription of the Datasource Info Forms Fields */
export const softwarePlatformDesc = {
desc: 'The typology used by your repository/journal.\nIf you use a typology not found in the drop-down list,\nyou can enter a custom name in the field below.',
label: 'Software Platform (*)',
label: 'Software Platform',
mandatory: true,
recommended: false
};
@ -40,14 +40,14 @@ export const platformNameDesc = {
export const officialNameDesc = {
desc: 'Your repository\'s/journal\'s official name.',
label: 'Official Name (*)',
label: 'Official Name',
mandatory: true,
recommended: false
};
export const issnDesc = {
desc: 'Input your journal\'s issn (www.issn.org)',
label: 'ISSN (*)',
label: 'ISSN',
mandatory: true,
recommended: false
};
@ -68,49 +68,49 @@ export const lissnDesc = {
export const repoDescriptionDesc = {
desc: 'A description of your repository/journal',
label: 'Description (*)',
label: 'Description',
mandatory: true,
recommended: false
};
export const countryDesc = {
desc: 'The country where your repository/journal is located',
label: 'Country (*)',
label: 'Country',
mandatory: true,
recommended: false
};
export const longtitudeDesc = {
desc: 'The (approximate) longtitude of your repository/journal\'s location',
label: 'Longtitude (*)',
mandatory: true,
label: 'Longtitude',
mandatory: false,
recommended: false
};
export const latitudeDesc = {
desc: 'The (approximate) latitude of your repository/journal\'s location',
label: 'Latitude (*)',
mandatory: true,
label: 'Latitude',
mandatory: false,
recommended: false
};
export const websiteUrlDesc = {
desc: 'The main page of your repository/journal\'s website',
label: 'Entry URL (*)',
label: 'Entry URL',
mandatory: true,
recommended: false
};
export const institutionNameDesc = {
desc: 'The institution that your repository belongs to',
label: 'Institution (*)',
label: 'Institution',
mandatory: true,
recommended: false
};
export const englishNameDesc = {
desc: 'Your repository/journal\'s name in english',
label: 'English Name (*)',
label: 'English Name',
mandatory: true,
recommended: false
};
@ -124,35 +124,35 @@ export const logoUrlDesc = {
export const timezoneDesc = {
desc: 'The timezone of the area where your repository/ journal is located',
label: 'Timezone (*)',
label: 'Timezone',
mandatory: true,
recommended: false
};
export const datasourceTypeDesc = {
desc: 'The type of your repository',
label: 'Repository Type (*)',
label: 'Data source type',
mandatory: true,
recommended: false
};
export const journalTypeDesc = {
desc: 'The type of your journal',
label: 'Journal Type (*)',
label: 'Journal Type',
mandatory: true,
recommended: false
};
export const aggregatorTypeDesc = {
desc: 'The type of your aggregator',
label: 'Aggregator Type (*)',
label: 'Aggregator Type',
mandatory: true,
recommended: false
};
export const adminEmailDesc = {
desc: 'The email address of the repository/journal\'s administrator',
label: 'Admin Email (*)',
label: 'Admin Email',
mandatory: true,
recommended: false
};

257
src/app/domain/sushilite.ts Normal file
View File

@ -0,0 +1,257 @@
/* tslint:disable */
/* eslint-disable */
// Generated using typescript-generator version 2.16.538 on 2023-03-29 16:52:47.
export class Alert {
Date_Time: string;
Alert: string;
}
export class COUNTER_Dataset_Attributes {
Type: string;
Value: string;
}
export class COUNTER_Dataset_Contributors {
Type: string;
Name: string;
Identifier: string;
}
export class COUNTER_Dataset_Dates {
Type: string;
Value: string;
}
export class COUNTER_Dataset_Identifiers {
Type: string;
Value: string;
}
export class COUNTER_Dataset_Performance {
Period: Period;
Instance: Instance[];
}
export class COUNTER_Dataset_Report {
Report_Header: SUSHI_Report_Header_DSR;
Report_Datasets: COUNTER_Dataset_Usage[];
}
export class COUNTER_Dataset_Usage {
Dataset_Title: string;
Publisher: string;
YOP: string;
Access_Method: string;
Performance: COUNTER_Dataset_Performance[];
Dataset_ID: COUNTER_Dataset_Identifiers[];
Dataset_Contributors: COUNTER_Dataset_Contributors[];
Dataset_Dates: COUNTER_Dataset_Dates[];
Dataset_Attributes: COUNTER_Dataset_Attributes[];
Publisher_ID: COUNTER_Publisher_Identifiers[];
Item_Parent: COUNTER_Item_Parent;
Item_Component: COUNTER_Item_Component[];
Data_Type: string;
Platform: string;
}
export class COUNTER_Item_Attributes {
Type: string;
Value: string;
}
export class COUNTER_Item_Component {
Data_Type: string;
}
export class COUNTER_Item_Contributors {
Type: string;
Name: string;
Identifier: string;
}
export class COUNTER_Item_Dates {
Type: string;
Value: string;
}
export class COUNTER_Item_Identifiers {
Type: string;
Value: string;
}
export class COUNTER_Item_Parent {
Data_Type: string;
}
export class COUNTER_Item_Performance {
Period: Period;
Instance: Instance[];
}
export class COUNTER_Item_Report {
Report_Header: SUSHI_Report_Header;
Report_Items: COUNTER_Item_Usage[];
}
export class COUNTER_Item_Usage {
Platform: string;
Data_Type: string;
Access_Method: string;
Performance: COUNTER_Item_Performance[];
Item: string;
Item_ID: COUNTER_Item_Identifiers[];
Item_Contributors: COUNTER_Item_Contributors[];
Item_Dates: COUNTER_Item_Dates[];
Item_Attributes: COUNTER_Item_Attributes[];
Publisher_ID: COUNTER_Publisher_Identifiers[];
Item_Parent: COUNTER_Item_Parent;
Item_Component: COUNTER_Item_Component[];
YOP: string;
Access_Type: string;
Publisher: string;
}
export class COUNTER_Platform_Report {
Report_Header: SUSHI_Report_Header;
Report_Items: COUNTER_Platform_Usage[];
}
export class COUNTER_Platform_Usage {
Platform: string;
Data_Type: string;
Access_Method: string;
Performance: COUNTER_Item_Performance[];
}
export class COUNTER_Publisher_Identifiers {
Type: string;
Value: string;
}
export class COUNTER_Title_Report {
Report_Header: SUSHI_Report_Header;
Report_Items: COUNTER_Platform_Usage[];
}
export class COUNTER_Title_Usage {
Title: string;
Item_ID: COUNTER_Item_Identifiers[];
Platform: string;
Publisher: string;
Data_Type: string;
Section_Type: string;
YOP: string;
Access_Type: string;
Access_Method: string;
Performance: COUNTER_Item_Performance[];
}
export class Filter {
Name: string;
Value: string;
}
export class Filters {
UsageDateRange: UsageDateRange;
Filter: Filter[];
ReportAttribute: Filter[];
}
export class Instance {
MetricType: string;
Count: string;
}
export class Period {
Begin_Date: string;
End_Date: string;
}
export class ReportAttribute {
Name: string;
Value: string;
}
export class ReportDefinition {
"@Name": string;
"@Release": string;
Filters: Filters;
}
export class ReportSupported {
Report_Name: string;
Report_ID: string;
Release: string;
Report_Description: string;
Path: string;
}
export class Requestor {
ID: string;
}
export class SUSHI_Consortium_Member_List {
Customer_ID: string;
Requestor_ID: string;
Name: string;
Notes: string;
Institution_ID: SUSHI_Org_Identifiers[];
}
export class SUSHI_Error_Model {
Code: string;
Severity: string;
Message: string;
Help_URL: string;
Data: string;
}
export class SUSHI_Org_Identifiers {
Type: string;
Value: string;
}
export class SUSHI_Report_Header {
Created: string;
Created_By: string;
Customer_ID: string;
Report_ID: string;
Report_Name: string;
Institution_Name: string;
Institution_ID: SUSHI_Org_Identifiers[];
Report_Filters: Filter[];
Report_Attributes: ReportAttribute[];
Exceptions: SUSHI_Error_Model[];
}
export class SUSHI_Report_Header_DSR {
Report_Name: string;
Report_ID: string;
Created: string;
Created_By: string;
Customer_ID: string;
Report_Filters: Filter[];
Report_Attributes: ReportAttribute[];
Exceptions: SUSHI_Error_Model[];
}
export class SUSHI_Report_List {
Report_Name: string;
Report_ID: string;
Report_Description: string;
Path: string;
}
export class SUSHI_Service_Status {
Description: string;
Service_Active: boolean;
Registry_URL: string;
Note: string;
Alerts: Alert[];
}
export class UsageDateRange {
Begin: string;
End: string;
}

File diff suppressed because it is too large Load Diff

View File

@ -1,41 +1,234 @@
export const typologies = [
{ value: '', name: '[Other] (enter name below)' },
{ value: 'CONTENTdm', name: 'CONTENTdm' },
{ value: 'Digibib', name: 'Digibib' },
{ value: 'Digital Commons', name: 'Digital Commons' },
{ value: 'DigiTool', name: 'DigiTool' },
{ value: 'DIVA', name: 'DIVA' },
{ value: 'Diva-Portal', name: 'Diva-Portal' },
{ value: 'dLibra', name: 'dLibra' },
{ value: 'Doks', name: 'Doks' },
{ value: 'Drupal', name: 'Drupal' },
{ value: 'DSpace', name: 'DSpace' },
{ value: 'Earmas', name: 'Earmas' },
{ value: 'EPrints', name: 'EPrints' },
{ value: 'ETD', name: 'ETD' },
{ value: 'ETD - db', name: 'ETD - db' },
{ value: 'Fedora', name: 'Fedora' },
{ value: 'Fez', name: 'Fez' },
{ value: 'Greenstone', name: 'Greenstone' },
{ value: 'HAL', name: 'HAL' },
{ value: 'invenio', name: 'invenio' },
{ value: 'MyCoRe', name: 'MyCoRe' },
{ value: 'Open Repository', name: 'Open Repository' },
{ value: 'OPUS', name: 'OPUS' },
{ value: 'Pica - Verbundkatalog', name: 'Pica - Verbundkatalog' },
{ value: 'Proprietary Software', name: 'Proprietary Software' },
{ value: 'PUMA', name: 'PUMA' },
{ value: 'PURE', name: 'PURE' },
{ value: 'SciELO', name: 'SciELO' },
{ value: 'SFIX', name: 'SFIX' },
{ value: 'VITAL', name: 'VITAL' },
{ value: 'VTOAI', name: 'VTOAI' },
{ value: 'WEKO', name: 'WEKO' },
{ value: 'XooNIps', name: 'XooNIps' },
{ value: 'OJS', name: 'OJS' },
{ value: 'HyperJournal', name: 'HyperJournal' },
{ value: 'ePubTk', name: 'ePubTk' },
{ value: 'GAPworks', name: 'GAPworks' },
{ value: 'DPubS', name: 'DPubS' },
{ value: 'E - Journal', name: 'E - Journal' },
{
value: '',
name: '[Other] (enter name below)'
},
{
value: 'Avesis',
name: 'Avesis'
},
{
value: 'CKAN',
name: 'CKAN'
},
{
value: 'CONTENTdm',
name: 'CONTENTdm'
},
{
value: 'Converis',
name: 'Converis'
},
{
value: 'CRIStin',
name: 'CRIStin'
},
{
value: 'DataVerse',
name: 'DataVerse'
},
{
value: 'Dialnet',
name: 'Dialnet CRIS'
},
{
value: 'Digibib',
name: 'Digibib'
},
{
value: 'Digital Commons',
name: 'Digital Commons'
},
{
value: 'DigiTool',
name: 'DigiTool'
},
{
value: 'DIVA',
name: 'DIVA'
},
{
value: 'Diva-Portal',
name: 'Diva-Portal'
},
{
value: 'dLibra',
name: 'dLibra'
},
{
value: 'Doks',
name: 'Doks'
},
{
value: 'DPubS',
name: 'DPubS'
},
{
value: 'Drupal',
name: 'Drupal'
},
{
value: 'DSpace',
name: 'DSpace'
},
{
value: 'DSpace-CRIS',
name: 'DSpace-CRIS'
},
{
value: 'E - Journal',
name: 'E - Journal'
},
{
value: 'Earmas',
name: 'Earmas'
},
{
value: 'EPrints',
name: 'EPrints'
},
{
value: 'ePubTk',
name: 'ePubTk'
},
{
value: 'eSciDoc',
name: 'eSciDoc'
},
{
value: 'ETD',
name: 'ETD'
},
{
value: 'ETD - db',
name: 'ETD - db'
},
{
value: 'Fedora',
name: 'Fedora'
},
{
value: 'Fez',
name: 'Fez'
},
{
value: 'GAPworks',
name: 'GAPworks'
},
{
value: 'Greenstone',
name: 'Greenstone'
},
{
value: 'HAL',
name: 'HAL'
},
{
value: 'Haplo',
name: 'Haplo'
},
{
value: 'HyperJournal',
name: 'HyperJournal'
},
{
value: 'invenio',
name: 'invenio'
},
{
value: 'IRIS',
name: 'IRIS'
},
{
value: 'Metis',
name: 'Metis'
},
{
value: 'MyCoRe',
name: 'MyCoRe'
},
{
value: 'MySQL',
name: 'MySQL'
},
{
value: 'Nesstar',
name: 'Nesstar'
},
{
value: 'OJS',
name: 'OJS'
},
{
value: 'Omega',
name: 'Omega-PSIR'
},
{
value: 'Open Repository',
name: 'Open Repository'
},
{
value: 'OPUS',
name: 'OPUS'
},
{
value: 'Pica - Verbundkatalog',
name: 'Pica - Verbundkatalog'
},
{
value: 'Proprietary Software',
name: 'Proprietary Software'
},
{
value: 'PUMA',
name: 'PUMA'
},
{
value: 'PURE',
name: 'PURE'
},
{
value: 'SciELO',
name: 'SciELO'
},
{
value: 'SFIX',
name: 'SFIX'
},
{
value: 'SIGMA',
name: 'SIGMA Research'
},
{
value: 'SoleCRIS',
name: 'SoleCRIS'
},
{
value: 'Symplectic',
name: 'Symplectic Elements'
},
{
value: 'VITAL',
name: 'VITAL'
},
{
value: 'VIVO',
name: 'VIVO'
},
{
value: 'VTOAI',
name: 'VTOAI'
},
{
value: 'WEKO',
name: 'WEKO'
},
{
value: 'Worktribe',
name: 'Worktribe'
},
{
value: 'XooNIps',
name: 'XooNIps'
},
];

View File

@ -74,7 +74,7 @@ export class ReportItem {
}
export class ReportResponse {
"@Created": string;
'@Created': string;
Exception: ReportException[];
Requestor: Requestor;
ReportDefinition: ReportDefinition;

View File

@ -121,7 +121,7 @@
<!-- REPOSITORY CARD -->
<div *ngFor="let res of repositorySnippet" class="md-card repositoryCard">
<div class="md-card-content large-padding">
<div class="uk-text-meta">{{res.typology.split('::')[0]}} {{res.typology.split('::')[1]}} {{res.typology.split('::')[2]}}</div>
<div class="uk-text-meta">{{res.eoscDatasourceType.split('::')[0]}} {{res.eoscDatasourceType.split('::')[1]}} {{res.eoscDatasourceType.split('::')[2]}}</div>
<div class="repositoryCardHeader uk-margin-bottom uk-margin-small-top"><a [routerLink]="['/repositoryAdmin/' + res.id]">{{res.officialname}}</a></div>
<div class="uk-margin-small-bottom"><span class="uk-badge uk-badge-primary uk-badge-notification uk-margin-small-right">ID</span>{{res.id}}</div>
<div class="uk-margin-small-bottom"><span class="uk-badge uk-badge-primary uk-badge-notification uk-margin-small-right">RM</span>{{res.registeredby}}</div>

View File

@ -25,26 +25,26 @@
<div class="steps clearfix">
<ul role="tablist">
<li role="tab" class="first {{ (currentStep == 0) ? 'current' : '' }}" aria-disabled="false" aria-selected="true">
<a id="wizard_advanced-t-0" href="#wizard_advanced-h-0" aria-controls="wizard_advanced-p-0">
<a id="wizard_advanced-t-0" aria-controls="wizard_advanced-p-0" style="cursor: default">
<!--<span class="current-info audible">current step: </span>-->
<span class="number">1</span>
<span class="title">Select datasource</span>
</a>
</li>
<li role="tab" class="{{ (currentStep < 1) ? 'disabled' : '' }} {{ (currentStep == 1) ? 'current' : '' }}" aria-disabled="true">
<a id="wizard_advanced-t-1" href="#wizard_advanced-h-1" aria-controls="wizard_advanced-p-1">
<a id="wizard_advanced-t-1" aria-controls="wizard_advanced-p-1" style="cursor: default">
<span class="number">2</span>
<span class="title">{{ (type === 'cris') ? 'Finish' : 'Select guidelines' }}</span>
</a>
</li>
<li *ngIf="(type !== 'cris')" role="tab" class=" {{ (currentStep < 2) ? 'disabled' : '' }} {{ (currentStep == 2) ? 'current' : '' }}" aria-disabled="true">
<a id="wizard_advanced-t-2" href="#wizard_advanced-h-2" aria-controls="wizard_advanced-p-2">
<a id="wizard_advanced-t-2" aria-controls="wizard_advanced-p-2" style="cursor: default">
<span class="number">3</span>
<span class="title">Select parameters</span>
</a>
</li>
<li *ngIf="(type !== 'cris')" role="tab" class="last {{ (currentStep < 3) ? 'disabled' : '' }} {{ (currentStep == 3) ? 'current' : '' }}" aria-disabled="true">
<a id="wizard_advanced-t-3" href="#wizard_advanced-h-3" aria-controls="wizard_advanced-p-3">
<a id="wizard_advanced-t-3" aria-controls="wizard_advanced-p-3" style="cursor: default">
<span class="number">4</span>
<span class="title">Finish</span>
</a>

View File

@ -72,11 +72,11 @@ export class CompatibilityValidationResultsComponent implements OnInit {
if (this.jobSummary.resultEntries && this.jobSummary.resultEntries.length) {
this.jobSummary.resultEntries.forEach(
entry => {
if (entry.type === 'content') {
if (entry.type.toLowerCase() === 'content') {
this.contentResults.push(entry);
this.ruleNameForContent.push(entry.name);
this.unprocessedDataForContent.push(entry.successes.split('/')[0]);
} else if (entry.type === 'usage') {
} else if (entry.type.toLowerCase() === 'usage') {
this.usageResults.push(entry);
this.ruleNameForUsage.push(entry.name);
this.unprocessedDataForUsage.push(entry.successes.split('/')[0]);
@ -86,7 +86,7 @@ export class CompatibilityValidationResultsComponent implements OnInit {
}
},
error => {
console.log(error);
console.error(error);
this.errorMessage = loadingJobSummaryError;
this.loadingMessage = '';
},

View File

@ -51,6 +51,90 @@
</div>
</div>
<!-- campaing banner-->
<div class="uk-section-muted uk-section uk-section-large uk-section-overlap uk-position-relative">
<h2 class="uk-text-center">Update your repository with latest OpenAIRE Interoperability Guidelines</h2>
<div class="uk-margin-medium-left uk-margin-medium-right uk-text-center text-muted">Become compatible to get onboard the EOSC catalogue</div>
<div class="uk-container uk-container-large uk-margin-medium-top">
<div class="slider-mobile-card">
<div class="uk-slider" tabindex="-1" uk-slider="velocity: 0;autoplay: true;autoplay-interval: 5000;pause-on-hover: false;center: true">
<div class="uk-position-relative">
<div class="uk-slider-container">
<ul class="uk-slider-items uk-child-width-1-1" style="transform: translateX(-1300px);">
<li class="ng-star-inserted uk-active" tabindex="-1" style="order: 1;">
<div class="uk-flex uk-padding uk-child-width-1-2@m uk-child-width-1-1@s uk-grid" uk-grid="">
<div class="uk-first-column">
<img class="uk-box-shadow-large uk-border-rounded" src="../../../../assets/imgs/landing/campaign-banner/1.jpg">
</div>
<div class="uk-margin-top">
<div>
<div class="uk-text-bold uk-h4">OpenAIRE Guidelines</div>
<div class="uk-margin-medium">
by adopting the Guidelines you ensure that your research products are more interconnected and more interoperable?
</div>
<div class="uk-inline">
<a class="uk-button uk-button-primary uk-text-uppercase" href="https://www.openaire.eu/openaire-guidelines-for-literature-institutional-and-thematic-repositories" target="_blank">learn more</a>
</div>
</div>
</div>
</div>
</li>
<li tabindex="-1" style="order: 1;">
<div class="uk-flex uk-padding uk-child-width-1-2@m uk-child-width-1-1@s uk-grid" uk-grid="">
<div class="uk-first-column">
<img class="uk-box-shadow-large uk-border-rounded" src="../../../../assets/imgs/landing/campaign-banner/2.jpg">
</div>
<div class="uk-margin-top">
<div>
<div class="uk-text-bold uk-h4">FAIR principles</div>
<div class="uk-margin-medium">
if you are compliant with the latest versions of the OpenAIRE Guidelines, you are also FAIR enough?
</div>
<div class="uk-inline">
<a class="uk-button uk-button-primary uk-text-uppercase" href="https://www.openaire.eu/openaire-guidelines-for-literature-institutional-and-thematic-repositories" target="_blank">learn more</a>
</div>
</div>
</div>
</div>
</li>
<li tabindex="-1" style="order: 1;">
<div class="uk-flex uk-padding uk-child-width-1-2@m uk-child-width-1-1@s uk-grid" uk-grid="">
<div class="uk-first-column">
<img class="uk-box-shadow-large uk-border-rounded" src="../../../../assets/imgs/landing/campaign-banner/3.jpg">
</div>
<div class="uk-margin-top">
<div>
<div class="uk-text-bold uk-h4">Provide dashboard</div>
<div class="uk-margin-medium">
our one-stop-shop web service, not only helps you connect your content within OpenAIRE, but also facilitates your onboarding into the EOSC Portal Catalogue and Marketplace?
</div>
<div class="uk-inline">
<a class="uk-button uk-button-primary uk-text-uppercase" href="https://www.openaire.eu/openaire-guidelines-for-literature-institutional-and-thematic-repositories" target="_blank">learn more</a>
</div>
</div>
</div>
</div>
</li>
</ul>
</div>
</div>
<ul class="uk-position-relative uk-slider-nav uk-dotnav uk-flex-center uk-margin">
<li uk-slider-item="0" class="uk-active"><a href="#"></a></li>
<li uk-slider-item="1" class=""><a href="#"></a></li>
<li uk-slider-item="2" class=""><a href="#"></a></li>
</ul>
</div>
</div>
</div>
</div>
<!-- campaing banner end-->
<div class="uk-section-muted uk-section uk-section-large uk-section-overlap uk-position-relative">
<h2 class="uk-text-center">PROVIDE Dashboard brings all your data together</h2>
@ -321,7 +405,7 @@
<div style="display: block; text-align: center">
<img width="55" src="../../../../assets/imgs/landing/Agreement%20color.svg">
</div>
<div class="uk-margin-bottom uk-margin-top" style="font-weight: 600">Terms of Agreement for Content Providers</div>
<div class="uk-margin-bottom uk-margin-top" style="font-weight: 600">Terms of Use for Content Providers</div>
<p>Learn more: <a href="https://www.openaire.eu/terms-of-use-for-content-providers" target="_blank">https://www.openaire.eu/terms-of-use-for-content-providers</a></p>
</div>
@ -334,7 +418,7 @@
</div>
<div class="uk-margin-bottom uk-margin-top" style="font-weight: 600">Support</div>
<p>Read <strong>how to use OpenAIRE</strong> to best serve your needs. <br>Learn more: <a href="https://www.openaire.eu/guides" target="_blank">https://www.openaire.eu/guides</a></p>
<p>Ask a question. Contact us via our <strong>ticketing system.</strong> <br>Learn more: <a href="https://www.openaire.eu/support/helpdesk" target="_blank">https://www.openaire.eu/support/helpdesk</a></p>
<p>Ask a question. Contact us via our <strong>ticketing system.</strong> <br>Learn more: <a href="https://www.openaire.eu/helpdesk" target="_blank">https://www.openaire.eu/helpdesk</a></p>
</div>
</div>
@ -487,6 +571,88 @@
</div>
</div>
<!-- Campaign banner-->
<div class="uk-section-muted uk-section uk-section-large uk-section-overlap uk-position-relative uk-padding-remove-bottom">
<h2 class="uk-text-center">Update your repository with latest OpenAIRE Interoperability Guidelines</h2>
<div class="uk-margin-medium-left uk-margin-medium-right uk-text-center text-muted">Become compatible to get onboard the EOSC catalogue</div>
<div class="uk-container uk-container-large uk-margin-medium-top">
<div class="uk-slider" tabindex="-1" uk-slider="velocity: 0;autoplay: true;autoplay-interval: 5000;pause-on-hover: false;center: true">
<div class="uk-position-relative">
<div class="uk-slider-container">
<ul class="uk-slider-items uk-child-width-1-1" style="transform: translateX(-1300px);">
<li class="ng-star-inserted uk-active" tabindex="-1" style="order: 1;">
<div class="uk-flex uk-padding uk-child-width-1-2@m uk-child-width-1-1@s uk-grid" uk-grid="">
<div class="uk-first-column">
<img class="uk-box-shadow-large uk-border-rounded" src="../../../../assets/imgs/landing/campaign-banner/1.jpg">
</div>
<div class="uk-margin-top">
<div>
<div class="uk-text-bold uk-h4">OpenAIRE Guidelines</div>
<div class="uk-margin-medium">
by adopting the Guidelines you ensure that your research products are more interconnected and more interoperable?
</div>
<div class="uk-inline">
<a class="uk-button uk-button-primary uk-text-uppercase" href="https://www.openaire.eu/openaire-guidelines-for-literature-institutional-and-thematic-repositories" target="_blank">learn more</a>
</div>
</div>
</div>
</div>
</li>
<li tabindex="-1" style="order: 1;">
<div class="uk-flex uk-padding uk-child-width-1-2@m uk-child-width-1-1@s uk-grid" uk-grid="">
<div class="uk-first-column">
<img class="uk-box-shadow-large uk-border-rounded" src="../../../../assets/imgs/landing/campaign-banner/2.jpg">
</div>
<div class="uk-margin-top">
<div>
<div class="uk-text-bold uk-h4">FAIR principles</div>
<div class="uk-margin-medium">
if you are compliant with the latest versions of the OpenAIRE Guidelines, you are also FAIR enough?
</div>
<div class="uk-inline">
<a class="uk-button uk-button-primary uk-text-uppercase" href="https://www.openaire.eu/openaire-guidelines-for-literature-institutional-and-thematic-repositories" target="_blank">learn more</a>
</div>
</div>
</div>
</div>
</li>
<li tabindex="-1" style="order: 1;">
<div class="uk-flex uk-padding uk-child-width-1-2@m uk-child-width-1-1@s uk-grid" uk-grid="">
<div class="uk-first-column">
<img class="uk-box-shadow-large uk-border-rounded" src="../../../../assets/imgs/landing/campaign-banner/3.jpg">
</div>
<div class="uk-margin-top">
<div>
<div class="uk-text-bold uk-h4">Provide dashboard</div>
<div class="uk-margin-medium">
our one-stop-shop web service, not only helps you connect your content within OpenAIRE, but also facilitates your onboarding into the EOSC Portal Catalogue and Marketplace?
</div>
<div class="uk-inline">
<a class="uk-button uk-button-primary uk-text-uppercase" href="https://www.openaire.eu/openaire-guidelines-for-literature-institutional-and-thematic-repositories" target="_blank">learn more</a>
</div>
</div>
</div>
</div>
</li>
</ul>
</div>
</div>
<ul class="uk-position-relative uk-slider-nav uk-dotnav uk-flex-center uk-margin">
<li uk-slider-item="0" class="uk-active"><a href="#"></a></li>
<li uk-slider-item="1" class=""><a href="#"></a></li>
<li uk-slider-item="2" class=""><a href="#"></a></li>
</ul>
</div>
</div>
</div>
<!-- end of campaing banner-->
<div class="uk-section-muted uk-section uk-section-large uk-section-overlap uk-position-relative">
<h2 class="uk-text-center">PROVIDE Dashboard brings all your data together</h2>
@ -752,7 +918,7 @@
<div class="uk-first-column">
<div class="uk-margin-medium-left uk-margin-medium-top uk-margin-medium-bottom">
<img width="55" src="../../../../assets/imgs/landing/Agreement%20color.svg">
<div class="uk-margin-bottom uk-margin-top" style="font-weight: 600">Terms of Agreement for Content Providers</div>
<div class="uk-margin-bottom uk-margin-top" style="font-weight: 600">Terms of Use for Content Providers</div>
<p>Learn more: <a href="https://www.openaire.eu/terms-of-use-for-content-providers" target="_blank">https://www.openaire.eu/terms-of-use-for-content-providers</a></p>
</div>
@ -763,7 +929,7 @@
<img width="38" src="../../../../assets/imgs/landing/Support%20color.svg">
<div class="uk-margin-bottom uk-margin-top" style="font-weight: 600">Support</div>
<p>Read <strong>how to use OpenAIRE</strong> to best serve your needs. <br>Learn more: <a href="https://www.openaire.eu/guides" target="_blank">https://www.openaire.eu/guides</a></p>
<p>Ask a question. Contact us via our <strong>ticketing system.</strong> <br>Learn more: <a href="https://www.openaire.eu/support/helpdesk" target="_blank">https://www.openaire.eu/support/helpdesk</a></p>
<p>Ask a question. Contact us via our <strong>ticketing system.</strong> <br>Learn more: <a href="https://www.openaire.eu/helpdesk" target="_blank">https://www.openaire.eu/helpdesk</a></p>
</div>
</div>
@ -820,7 +986,7 @@
<div class="uk-first-column">
<div class="uk-margin-medium-left uk-margin-medium-top uk-margin-medium-bottom">
<img width="55" src="../../../../assets/imgs/landing/Agreement%20color.svg">
<div class="uk-margin-bottom uk-margin-top" style="font-weight: 600">Terms of Agreement for Content Providers</div>
<div class="uk-margin-bottom uk-margin-top" style="font-weight: 600">Terms of Use for Content Providers</div>
<p>Learn more: <a href="https://www.openaire.eu/terms-of-use-for-content-providers" target="_blank">https://www.openaire.eu/terms-of-use-for-content-providers</a></p>
</div>
@ -831,7 +997,7 @@
<img width="38" src="../../../../assets/imgs/landing/Support%20color.svg">
<div class="uk-margin-bottom uk-margin-top" style="font-weight: 600">Support</div>
<p>Read <strong>how to use OpenAIRE</strong> to best serve your needs. <br>Learn more: <a href="https://www.openaire.eu/guides" target="_blank">https://www.openaire.eu/guides</a></p>
<p>Ask a question. Contact us via our <strong>ticketing system.</strong> <br>Learn more: <a href="https://www.openaire.eu/support/helpdesk" target="_blank">https://www.openaire.eu/support/helpdesk</a></p>
<p>Ask a question. Contact us via our <strong>ticketing system.</strong> <br>Learn more: <a href="https://www.openaire.eu/helpdesk" target="_blank">https://www.openaire.eu/helpdesk</a></p>
</div>
</div>

View File

@ -7,7 +7,7 @@ import { Router } from '@angular/router';
@Component ({
selector: 'app-landing',
templateUrl: './home.component.html',
styleUrls: ['../../../../assets/css/landingpage/theme.css','../../../../assets/css/landingpage/custom.css','../../../../assets/css/landingpage/custom-provide.css'],
styleUrls: ['../../../../assets/css/landingpage/theme.css', '../../../../assets/css/landingpage/custom.css', '../../../../assets/css/landingpage/custom-provide.css'],
})
export class HomeComponent implements OnInit {
@ -26,9 +26,9 @@ export class HomeComponent implements OnInit {
const baseUrl = window.location.origin;
this.inBeta = ( baseUrl.includes('beta') || baseUrl.includes('athenarc') );
let body = document.getElementsByTagName('body')[0];
body.classList.remove("dashboard");
body.classList.add("landing");
const body = document.getElementsByTagName('body')[0];
body.classList.remove('dashboard');
body.classList.add('landing');
}
@ -44,7 +44,7 @@ export class HomeComponent implements OnInit {
},
error => console.log(error),
() => {
console.log('statisticsNumbers is', JSON.stringify(this.statisticsNumbers));
// console.log('statisticsNumbers is', JSON.stringify(this.statisticsNumbers));
}
);
}
@ -53,7 +53,7 @@ export class HomeComponent implements OnInit {
if (this.authService.getIsUserLoggedIn()) {
this.router.navigate([pageUrl]);
} else {
this.authService.redirectUrl = pageUrl;
// this.authService.redirectUrl = pageUrl;
this.login();
}
}

View File

@ -51,8 +51,8 @@
<!--<td class="uk-text-center"><img class="md-user-image dense-image dense-ready" src="assets/img/avatars/avatar_01_tn@2x.png" alt="" data-dense-cap="2"></td>-->
<td><span *ngIf="aggr.date">{{ aggr.date | date : "yyyy-MM-dd" }}</span></td>
<td class=""><span *ngIf="aggr.aggregationStage">{{ aggr.aggregationStage }}</span></td>
<td class=""><span *ngIf="aggr.collectionMode">{{ aggr.collectionMode }}</span></td>
<td class="uk-text-center"><span *ngIf="aggr.numberOfRecords">{{ aggr.numberOfRecords }}</span></td>
<td class=""><span>{{ aggr.collectionMode ? aggr.collectionMode : '-'}}</span></td>
<td class="uk-text-center"><span *ngIf="aggr.numberOfRecords !== null">{{ aggr.numberOfRecords }}</span></td>
<td class="uk-text-center"><span *ngIf="aggr.indexedVersion !== null && (aggr.indexedVersion === true)" class="uk-badge">Indexed version</span></td>
</tr>
</tbody>

View File

@ -30,7 +30,7 @@ export class CompatibilityMonitorFullHistoryRepoComponent implements OnInit {
if(this.sharedService.getRepository()) {
this.repo = this.sharedService.getRepository();
this.repoName = this.repo.officialName;
this.repoName = this.repo.officialname;
this.getAllAggregationHistory();
}
@ -38,7 +38,7 @@ export class CompatibilityMonitorFullHistoryRepoComponent implements OnInit {
r => {
this.repo = r;
if (this.repo) {
this.repoName = this.repo.officialName;
this.repoName = this.repo.officialname;
this.getAllAggregationHistory();
}
}

View File

@ -74,7 +74,7 @@
<span class="uk-text-small uk-text-muted">{{ aggr.collectionMode }}</span>
</div>
</li>
<li *ngIf="aggr.numberOfRecords">
<li>
<!--<div class="md-list-addon-element">-->
<!--<span class="md-user-image md-list-addon-avatar dense-image dense-ready">-->
<!--<i class="material-icons">list</i>-->
@ -82,7 +82,13 @@
<!--</div>-->
<div class="md-list-content">
<span class="md-list-heading">Number of records</span>
<span class="uk-text-small uk-text-muted">{{ aggr.numberOfRecords }}</span>
<span class="uk-text-small uk-text-muted">{{ aggr?.numberOfRecords>=0 ? aggr.numberOfRecords : 'NA' }}</span>
</div>
</li>
<li>
<div class="md-list-content">
<span class="md-list-heading">Completed Successfully</span>
<span class="uk-text-small uk-text-muted">{{ aggr.completedSuccessfully }}</span>
</div>
</li>
</ul>

View File

@ -29,7 +29,7 @@ export class CompatibilityMonitorRepoComponent implements OnInit {
if(this.sharedService.getRepository()) {
this.repo = this.sharedService.getRepository();
this.repoName = this.repo.officialName;
this.repoName = this.repo.officialname;
this.getLatestAggregationHistory();
}
@ -37,7 +37,7 @@ export class CompatibilityMonitorRepoComponent implements OnInit {
r => {
this.repo = r;
if (this.repo) {
this.repoName = this.repo.officialName;
this.repoName = this.repo.officialname;
this.getLatestAggregationHistory();
}
}

View File

@ -144,7 +144,7 @@
</div>
</div>
<div *ngIf="aggr.numberOfRecords" class="uk-margin-small-bottom">
<div class="uk-margin-small-bottom">
<!--<div class="inline-block" style="vertical-align: top">-->
<!--<span class="md-user-image md-list-addon-avatar dense-image dense-ready">-->
<!--<i class="material-icons">list</i>-->
@ -153,7 +153,14 @@
<div class="">
<div class="md-list-heading">Number of records</div>
<div class="uk-text-small uk-text-muted">{{ aggr.numberOfRecords | number }}</div>
<div class="uk-text-small uk-text-muted">{{ aggr?.numberOfRecords>=0 ? aggr.numberOfRecords : 'NA' }}</div>
</div>
</div>
<div class="uk-margin-small-bottom">
<div class="">
<div class="md-list-heading">Completed Successfully</div>
<div class="uk-text-small uk-text-muted">{{ aggr.completedSuccessfully }}</div>
</div>
</div>
@ -373,7 +380,7 @@
<div *ngIf="!brokerSummary || !brokerSummary.userSubs">No notifications were found</div>
<div *ngIf="brokerSummary && brokerSummary.userSubs">
<ul class="md-list md-list-addon gmap_list">
<li *ngFor="let sub of brokerSummary.userSubs[repository.officialName]">
<li *ngFor="let sub of brokerSummary.userSubs[repository.officialname]">
<div class="md-list-addon-element">
<span>{{ sub.count | number }}</span>
<!--<img class="md-user-image md-list-addon-avatar" src="assets/img/avatars/avatar_01_tn.png" alt="">-->

View File

@ -1,4 +1,4 @@
import { Component, OnInit } from '@angular/core';
import {Component, OnDestroy, OnInit} from '@angular/core';
import { AuthenticationService } from '../../../services/authentication.service';
import { RepositoryService } from '../../../services/repository.service';
import {
@ -16,15 +16,15 @@ import {DashboardService} from '../../../services/dashboard.service';
import {DomSanitizer, SafeResourceUrl} from '@angular/platform-browser';
import {PiwikService} from '../../../services/piwik.service';
import {ValidatorService} from '../../../services/validator.service';
import {ActivatedRoute} from "@angular/router";
import {SharedService} from "../../../services/shared.service";
import {ActivatedRoute} from '@angular/router';
import {SharedService} from '../../../services/shared.service';
@Component ({
selector: 'app-dashboard',
templateUrl: 'dashboard.component.html'
})
export class DashboardComponent implements OnInit {
export class DashboardComponent implements OnInit, OnDestroy {
repository: Repository = null;
errorMessage: string;
@ -88,29 +88,25 @@ export class DashboardComponent implements OnInit {
ngOnInit() {
if(this.sharedService.getRepository()) {
if (this.sharedService.getRepository()) {
this.repository = this.sharedService.getRepository();
this.getSelectedRepositorySummaryInfo(this.repository);
}
this.sharedService.repository$.subscribe(
r => {
this.repository = r;
// console.log("RepositoryID: ", this.repository.id);
this.getSelectedRepositorySummaryInfo(this.repository);
}
);
let body = document.getElementsByTagName('body')[0];
body.classList.remove("top_bar_active");
body.classList.remove("page_heading_active");
body.classList.remove("landing");
body.classList.add("dashboard");
const body = document.getElementsByTagName('body')[0];
body.classList.remove('top_bar_active');
body.classList.remove('page_heading_active');
body.classList.remove('landing');
body.classList.add('dashboard');
const currentTime = new Date();
this.currentDate = currentTime.getFullYear() + '-' + (currentTime.getMonth() + 1);
}
ngOnDestroy() {
// this.sharedService.repository.unsubscribe();
}
getSelectedRepositorySummaryInfo(repository: Repository) {
// Aggregations
@ -187,7 +183,7 @@ export class DashboardComponent implements OnInit {
this.validatorService.getValidationSummary(repository.id).subscribe(
validationSummary => {
this.storedJob = validationSummary;
console.log(validationSummary);
// console.log(validationSummary);
},
error => {
this.errorValidationsMessage = loadingJobSummaryError;
@ -203,7 +199,7 @@ export class DashboardComponent implements OnInit {
getCollectionMonitorSummary(collectionMonitorSummary: CollectionMonitorSummary) {
this.latestAggregations = collectionMonitorSummary.aggregationDetails;
this.latestAggregations = collectionMonitorSummary.aggregationInfo;
this.lastIndexedVersion = collectionMonitorSummary.lastIndexedVersion;
if ( !this.latestAggregations || (this.latestAggregations.length === 0) ) {
@ -218,16 +214,16 @@ export class DashboardComponent implements OnInit {
this.brokerSummary = brokerSummary;
if(this.brokerSummary.userSubs==null)
if (this.brokerSummary.userSubs == null)
this.noSubscriptions = noTopicsFound;
if(this.brokerSummary.topicsForDatasource==null)
if (this.brokerSummary.topicsForDatasource == null)
this.noTopics = noSubscriptionsFound;
this.totalNumberOfEvents = 0;
this.totalMore = 0;
this.totalMissing = 0;
if(brokerSummary.topicsForDatasource) {
for (let browseEntry of brokerSummary.topicsForDatasource) {
if (brokerSummary.topicsForDatasource) {
for (const browseEntry of brokerSummary.topicsForDatasource) {
this.totalNumberOfEvents += browseEntry.size;
if (browseEntry.value.startsWith('ENRICH/MORE')) {
this.totalMore += browseEntry.size;
@ -272,18 +268,18 @@ export class DashboardComponent implements OnInit {
getViewsUrl () {
let encodedURL = encodeURIComponent('{"library":"HighCharts","chartDescription":{"queries":[{"name":"Monthly views","type":"line","query":{"name":"usagestats.views.monthly", "parameters":["' + this.piwik.openaireId + '"], "profile":"OpenAIRE All-inclusive" }}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":""},"subtitle":{},"yAxis":{"title":{"text":"Monthly views"}},"xAxis":{"title":{}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":false},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":true,"text":"Created by OpenAIRE via HighCharts"}}}');
const encodedURL = encodeURIComponent('{"library":"HighCharts","chartDescription":{"queries":[{"name":"Monthly views","type":"line","query":{"name":"usagestats.views.monthly", "parameters":["' + this.piwik.openaireId + '"], "profile":"OpenAIRE All-inclusive" }}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":""},"subtitle":{},"yAxis":{"title":{"text":"Monthly views"}},"xAxis":{"title":{}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":false},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":true,"text":"Created by OpenAIRE via HighCharts"}}}');
this.viewsUrl = this.sanitizer.bypassSecurityTrustResourceUrl(`${this.repoMetrics.diagramsBaseURL}chart?json=${encodedURL}`);
}
getDownloadsUrl () {
let encodedURL = encodeURIComponent('{"library":"HighCharts","chartDescription":{"queries":[{"name":"Monthly downloads","type":"line","query":{"name":"usagestats.downloads.monthly", "parameters":["' + this.piwik.openaireId + '"], "profile":"OpenAIRE All-inclusive" }}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":""},"subtitle":{},"yAxis":{"title":{"text":"Monthly downloads"}},"xAxis":{"title":{}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":false},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":true,"text":"Created by OpenAIRE via HighCharts"}}}');
const encodedURL = encodeURIComponent('{"library":"HighCharts","chartDescription":{"queries":[{"name":"Monthly downloads","type":"line","query":{"name":"usagestats.downloads.monthly", "parameters":["' + this.piwik.openaireId + '"], "profile":"OpenAIRE All-inclusive" }}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":""},"subtitle":{},"yAxis":{"title":{"text":"Monthly downloads"}},"xAxis":{"title":{}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":false},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":true,"text":"Created by OpenAIRE via HighCharts"}}}');
this.downloadsUrl = this.sanitizer.bypassSecurityTrustResourceUrl(`${this.repoMetrics.diagramsBaseURL}chart?json=${encodedURL}`);
}
getCorrectName() {
const temp = this.repository.officialName.split('|');
const temp = this.repository.officialname.split('|');
let correctName = temp[0];
let repoName = temp[0];
for (let i = 1; i < temp.length; i++) {

View File

@ -74,7 +74,7 @@ export class ContentEventsOfRepoEventslistComponent implements OnInit {
if(this.sharedService.getRepository()) {
this.repoName = this.sharedService.getRepository().officialName;
this.repoName = this.sharedService.getRepository().officialname;
this.initQuery();
this.initForm();
this.currentPage = 0; /* DELETE WHEN ADVANCED SHOW EVENTS IS FIXED AND SENDS CORRECT VALUE FOR CURRENT PAGE */
@ -84,7 +84,7 @@ export class ContentEventsOfRepoEventslistComponent implements OnInit {
this.sharedService.repository$.subscribe(
r => {
if (r) {
this.repoName = r.officialName;
this.repoName = r.officialname;
this.initQuery();
this.initForm();
this.currentPage = 0; /* DELETE WHEN ADVANCED SHOW EVENTS IS FIXED AND SENDS CORRECT VALUE FOR CURRENT PAGE */

View File

@ -34,7 +34,7 @@ export class ContentEventsOfRepositoryComponent implements OnInit {
ngOnInit() {
if(this.sharedService.getRepository()) {
this.repoName = this.sharedService.getRepository().officialName;
this.repoName = this.sharedService.getRepository().officialname;
this.getCorrectName();
this.getTopics();
}
@ -42,7 +42,7 @@ export class ContentEventsOfRepositoryComponent implements OnInit {
this.sharedService.repository$.subscribe(
r => {
if (r) {
this.repoName = r.officialName;
this.repoName = r.officialname;
this.getCorrectName();
this.getTopics();
}

View File

@ -1,6 +1,6 @@
<div id="page_content_inner">
<!--<h2 class="heading_b uk-margin-bottom">Metrics for repository....</h2>-->
<h2 *ngIf="repo" class="heading_b uk-margin-bottom">Metrics for {{repo.officialName}}</h2>
<h2 *ngIf="repo" class="heading_b uk-margin-bottom">Metrics for {{repo.officialname}}</h2>
<!-- TOP HELP CONTENT -->
<help-content #topHelperContent [position]="'top'"

View File

@ -3,9 +3,11 @@ import { ActivatedRoute, Router } from '@angular/router';
import { ConfirmationDialogComponent } from '../../../shared/reusablecomponents/confirmation-dialog.component';
import { PiwikService } from '../../../services/piwik.service';
import { RepositoryService } from '../../../services/repository.service';
import { PiwikInfo, Repository } from '../../../domain/typeScriptClasses';
import { enabledMetricsError, enabledMetricsSuccess, enablingMetrics,
loadingRepoError, loadingRepoMessage } from '../../../domain/shared-messages';
import {Country, PiwikInfo, Repository} from '../../../domain/typeScriptClasses';
import {
enabledMetricsError, enabledMetricsSuccess, enablingMetrics,
loadingRepoError, loadingRepoMessage, noServiceMessage
} from '../../../domain/shared-messages';
import { AuthenticationService } from '../../../services/authentication.service';
import { SharedService } from "../../../services/shared.service";
@ -25,6 +27,8 @@ export class MetricsEnableComponent implements OnInit {
repo: Repository;
oaId: string;
countries: Country[] = [];
modalTitle = 'Confirmation';
modalButton = 'Yes, enable it';
isModalShown: boolean;
@ -60,11 +64,13 @@ export class MetricsEnableComponent implements OnInit {
// this.getRepo();
this.isModalShown = false;
let body = document.getElementsByTagName('body')[0];
body.classList.remove("top_bar_active"); //remove the class
body.classList.remove("page_heading_active");
body.classList.remove("landing");
body.classList.add("dashboard");
const body = document.getElementsByTagName('body')[0];
body.classList.remove('top_bar_active'); // remove the class
body.classList.remove('page_heading_active');
body.classList.remove('landing');
body.classList.add('dashboard');
this.getCountries();
}
// getRepo(): void {
@ -109,8 +115,8 @@ export class MetricsEnableComponent implements OnInit {
const piwik: PiwikInfo = {
repositoryId: this.repo.id,
openaireId: this.oaId,
repositoryName: this.repo.officialName,
country: this.repo.countryName,
repositoryName: this.repo.officialname,
country: this.getCountryName(this.repo.organizations[0].country),
siteId: '',
authenticationToken: this.authenticationToken,
creationDate: null,
@ -121,13 +127,13 @@ export class MetricsEnableComponent implements OnInit {
comment: ''
};
this.piwikService.enableMetricsForRepository(this.repo.officialName, this.repo.websiteUrl, piwik).subscribe(
this.piwikService.enableMetricsForRepository(this.repo.officialname, this.repo.websiteurl, piwik).subscribe(
response => {
console.log(`enableMetrics answered: ${response}`);
this.successMessage = enabledMetricsSuccess;
this.loadingMessage = '';
//save piwik and update shareRepo
// save piwik and update shareRepo
this.repo.piwikInfo = piwik;
this.sharedService.setRepository(this.repo);
},
@ -143,4 +149,33 @@ export class MetricsEnableComponent implements OnInit {
);
}
}
getCountries() {
this.repoService.getCountries()
.subscribe(
countries => this.countries = countries.sort(function (a, b) {
if (a.name < b.name) {
return -1;
} else if (a.name > b.name) {
return 1;
} else {
return 0;
}
}),
error => {
this.loadingMessage = '';
this.errorMessage = noServiceMessage;
console.log(error);
}
);
}
getCountryName(countryCode): string {
for (const country of Object.values(this.countries)) {
if (country.code === countryCode) {
return country.name;
}
}
}
}

View File

@ -37,7 +37,7 @@ export class MetricsShowComponent implements OnInit {
ngOnInit() {
if(this.sharedService.getRepository()) {
if (this.sharedService.getRepository()) {
this.repoId = this.sharedService.getRepository().id;
this.piwik = this.sharedService.getRepository().piwikInfo;
this.getMetrics();
@ -51,11 +51,11 @@ export class MetricsShowComponent implements OnInit {
}
);
let body = document.getElementsByTagName('body')[0];
body.classList.remove("top_bar_active"); //remove the class
body.classList.remove("page_heading_active");
body.classList.remove("landing");
body.classList.add("dashboard");
const body = document.getElementsByTagName('body')[0];
body.classList.remove('top_bar_active'); // remove the class
body.classList.remove('page_heading_active');
body.classList.remove('landing');
body.classList.add('dashboard');
}
getMetrics() {
@ -90,7 +90,7 @@ export class MetricsShowComponent implements OnInit {
getViewsUrl () {
let encodedURL = encodeURIComponent('{"library":"HighCharts","chartDescription":{"queries":[{"name":"Monthly views","type":"line","query":{"name":"usagestats.views.monthly", "parameters":["' + this.piwik.openaireId + '"], "profile":"OpenAIRE All-inclusive" }}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":""},"subtitle":{},"yAxis":{"title":{"text":"Monthly views"}},"xAxis":{"title":{}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":false},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":true,"text":"Created by OpenAIRE via HighCharts"}}}');
const encodedURL = encodeURIComponent('{"library":"HighCharts","chartDescription":{"queries":[{"name":"Monthly views","type":"line","query":{"name":"usagestats.views.monthly", "parameters":["' + this.piwik.openaireId + '"], "profile":"OpenAIRE All-inclusive" }}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":""},"subtitle":{},"yAxis":{"title":{"text":"Monthly views"}},"xAxis":{"title":{}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":false},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":true,"text":"Created by OpenAIRE via HighCharts"}}}');
this.viewsUrl = this.sanitizer.bypassSecurityTrustResourceUrl(`${this.repoMetrics.diagramsBaseURL}chart?json=${encodedURL}`);
// this.viewsUrl = this.sanitizer.bypassSecurityTrustResourceUrl(
@ -112,7 +112,7 @@ export class MetricsShowComponent implements OnInit {
getDownloadsUrl () {
let encodedURL = encodeURIComponent('{"library":"HighCharts","chartDescription":{"queries":[{"name":"Monthly downloads","type":"line","query":{"name":"usagestats.downloads.monthly", "parameters":["' + this.piwik.openaireId + '"], "profile":"OpenAIRE All-inclusive" }}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":""},"subtitle":{},"yAxis":{"title":{"text":"Monthly downloads"}},"xAxis":{"title":{}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":false},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":true,"text":"Created by OpenAIRE via HighCharts"}}}');
const encodedURL = encodeURIComponent('{"library":"HighCharts","chartDescription":{"queries":[{"name":"Monthly downloads","type":"line","query":{"name":"usagestats.downloads.monthly", "parameters":["' + this.piwik.openaireId + '"], "profile":"OpenAIRE All-inclusive" }}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":""},"subtitle":{},"yAxis":{"title":{"text":"Monthly downloads"}},"xAxis":{"title":{}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":false},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":true,"text":"Created by OpenAIRE via HighCharts"}}}');
this.downloadsUrl = this.sanitizer.bypassSecurityTrustResourceUrl(`${this.repoMetrics.diagramsBaseURL}chart?json=${encodedURL}`);
// this.downloadsUrl = this.sanitizer.bypassSecurityTrustResourceUrl(

View File

@ -14,7 +14,176 @@
</aside-help-content>
<!-- MIDDLE -->
<div class=" uk-width-expand@m">
<div *ngIf="release === '5'; else elseBlock" class="uk-width-expand@m">
<div *ngIf="errorMessage" class="uk-alert uk-alert-warning">{{errorMessage}}</div>
<div *ngIf="loadingMessage" class="loading-big">
<div class="loader-big" style="text-align: center; padding-top: 170px; color: rgb(47, 64, 80); font-weight: bold;">
{{ loadingMessage }}
</div>
<div class="transparentFilm"></div>
</div>
<div *ngIf="compressed; else notCompressed" class="uk-margin-top">
<a [href]=r5report?.Data target="_blank" class="uk-button uk-button-primary">
<span class=""><i class="fas fa-download"></i></span> Download report
</a>
</div>
<ng-template #notCompressed>
<div *ngIf="r5report?.[reportItems]?.length === 0" class="uk-alert uk-alert-warning">
Service did not find any data
</div>
<div *ngIf="r5report?.[reportItems]?.length > 0" class="md-card">
<div class="md-card-content large-padding">
<div class="uk-margin-bottom" data-uk-margin="">
<div class="uk-grid">
<div class="uk-width-4-5@m">
<h3>{{ r5report?.Report_Header?.Report_Name }} Results</h3>
</div>
<!-- <div class="uk-width-1-5@m">-->
<!-- <div [formGroup]="pageSizeSelect" class="md-input-wrapper md-input-filled">-->
<!-- <label class="">Results per page</label>-->
<!-- <select class="md-input" formControlName="selectPageSize" (change)="getPageSize()">-->
<!-- <option value="10" selected>10</option>-->
<!-- <option value="25">25</option>-->
<!-- <option value="50">50</option>-->
<!-- <option value="100">100</option>-->
<!-- </select>-->
<!-- <span class="md-input-bar"></span>-->
<!-- </div>-->
<!-- </div>-->
</div>
</div>
<hr>
<div class="uk-grid uk-grid-divider" data-uk-grid-margin="">
<div class="uk-width-3-4@m uk-row-first">
<!-- RESULTS TABLE -->
<div class="uk-overflow-container">
<table class="uk-table table_check" style="overflow-wrap: anywhere;">
<thead>
<tr>
<ng-container *ngIf="chosenReport === 'DSR'; else notDSR">
<th>Dataset Title</th>
<th>Publisher</th>
<th>YOP</th>
<th>Access Method</th>
</ng-container>
<ng-template #notDSR>
<th>Platform</th>
<th *ngIf="chosenReport === 'PR'">Data type</th>
<th>Access method</th>
</ng-template>
<th *ngIf="granularity === 'Monthly'">Count</th>
<ng-container *ngIf="granularity === 'Totals'">
<th *ngFor="let Instance of r5report[reportItems][0].Performance[0].Instance">
{{Instance.MetricType}}
</th>
</ng-container>
</tr>
</thead>
<tbody>
<ng-container *ngFor="let item of r5report[reportItems]; let i=index">
<tr>
<ng-container *ngIf="chosenReport === 'DSR'; else notDsrRow">
<td class="uk-width-1-3">{{item.Dataset_Title}}</td>
<td>{{item.Publisher}}</td>
<td>{{item.YOP}}</td>
<td>{{item.Access_Method}}</td>
</ng-container>
<ng-template #notDsrRow>
<td>{{item.Platform}}</td>
<td *ngIf="chosenReport === 'PR'">{{item.Data_Type}}</td>
<td>{{item.Access_Method}}</td>
</ng-template>
<ng-container *ngIf="granularity === 'Totals'">
<td *ngFor="let instance of item.Performance[0].Instance">
{{instance.Count}}
</td>
</ng-container>
<td class="uk-text-center" *ngIf="granularity === 'Monthly'">
<a *ngIf="item?.Performance?.length > 0" (click)="displayItemPerformance(i)">
{{ (selectedItemIndex === i) ? 'Hide' : 'See' }} results
</a>
</td>
</tr>
<tr *ngIf="(selectedItemIndex === i)">
<td colspan="6">
<div class="uk-animation-slide-top-medium uk-margin-small-top">
<table class="uk-table uk-table-middle uk-table-striped innerTable uk-margin-small-top uk-margin-small-bottom">
<tr>
<th>Month</th>
<th *ngFor="let instance of item.Performance[0].Instance">{{instance.MetricType}}</th>
</tr>
<tr *ngFor="let month of item.Performance">
<td>{{ month.Period.Begin_Date | date: "MMM yyyy" }}</td>
<td *ngFor="let instance of month.Instance">{{ instance.Count }}</td>
</tr>
</table>
</div>
</td>
</tr>
</ng-container>
</tbody>
</table>
</div>
</div>
<div class="uk-width-1-4@m">
<div class="uk-margin-medium-bottom">
<!-- <p>-->
<!-- Number of results:-->
<!-- <span class="uk-badge uk-badge-success uk-text-upper uk-margin-small-left">{{ repoResponse.ReportDefinition.Filters.ReportAttribute[1].Value }}</span>-->
<!-- </p>-->
<p>
Filters:
<span *ngFor="let filter of r5report.Report_Header.Report_Filters; let i = index" class="uk-badge uk-badge-outline uk-text-upper uk-margin-small-left">
{{ filter.Name }}: {{ filter.Value }}
</span>
</p>
</div>
<h2 class="heading_c uk-margin-small-bottom">Details</h2>
<ul class="md-list md-list-addon">
<li>
<div class="md-list-addon-element">
<i class="md-list-addon-icon material-icons"></i>
</div>
<div class="md-list-content">
<span class="md-list-heading">{{ r5report.Report_Header.Created | date: "yyyy-MM-dd HH:mm:ss" }}</span>
<span class="uk-text-small uk-text-muted">Date run</span>
</div>
</li>
<!-- <li>-->
<!-- <div class="md-list-addon-element">-->
<!-- <i class="md-list-addon-icon material-icons"></i>-->
<!-- </div>-->
<!-- <div class="md-list-content">-->
<!-- <span class="md-list-heading">{{ coveredPeriod }}</span>-->
<!-- <span class="uk-text-small uk-text-muted">Period covered</span>-->
<!-- </div>-->
<!-- </li>-->
</ul>
</div>
</div>
</div>
</div>
</ng-template>
<!-- <pre>{{r5report | json}}</pre>-->
</div>
<ng-template #elseBlock>
<div class="uk-width-expand@m">
<div *ngIf="errorMessage" class="uk-alert uk-alert-warning">{{errorMessage}}</div>
<div *ngIf="loadingMessage" class="loading-big">
@ -33,10 +202,10 @@
<div class="uk-width-4-5@m">
<h3>{{ repoResponse.ReportDefinition['@Name'] }} Report Results
<!--<span *ngIf="repoResponse.Report &&-->
<!--repoResponse.Report.Report &&-->
<!--repoResponse.Report.Report.Customer &&-->
<!--repoResponse.Report.Report.Customer.ReportItems &&-->
<!--repoResponse.Report.Report.Customer.ReportItems.length > 0">for {{ repoResponse.Report.Report.Customer.ReportItems[0].ItemPlatform }}</span>-->
<!--repoResponse.Report.Report &&-->
<!--repoResponse.Report.Report.Customer &&-->
<!--repoResponse.Report.Report.Customer.ReportItems &&-->
<!--repoResponse.Report.Report.Customer.ReportItems.length > 0">for {{ repoResponse.Report.Report.Customer.ReportItems[0].ItemPlatform }}</span>-->
</h3>
</div>
<div class="uk-width-1-5@m">
@ -137,75 +306,6 @@
</table>
</div>
<!--<div>-->
<!--<div>-->
<!--<div class="uk-overflow-auto uk-scrollspy-inview uk-animation-slide-top-medium uk-margin-top uk-margin-bottom">-->
<!--<table class="uk-table uk-table-middle uk-table-striped" style="vertical-align: top !important;">-->
<!--<thead>-->
<!--<tr>-->
<!--<th *ngIf="chosenReport !== 'RR1'">Title</th>-->
<!--<th *ngIf="chosenReport !== 'RR1'">Publisher</th>-->
<!--<th *ngIf="chosenReport === 'RR1'">Platform name</th>-->
<!--<th>{{ (chosenReport !== 'RR1') ? 'Item Urls' : 'Url' }}</th>-->
<!--<th>Type</th>-->
<!--<th colspan="2">Downloads/Views</th>-->
<!--</tr>-->
<!--</thead>-->
<!--<td colspan="6" *ngIf="infoMessage">{{ infoMessage }}</td>-->
<!--<tbody *ngFor="let item of repoResponse.Report.Report.Customer.ReportItems; let item_i = index"-->
<!--style="border-bottom: 1px solid whitesmoke;">-->
<!--<tr>-->
<!--<td *ngIf="chosenReport !== 'RR1'">{{ item.ItemName }}</td>-->
<!--<td *ngIf="chosenReport !== 'RR1'">{{ item.ItemPublisher }}</td>-->
<!--<td *ngIf="chosenReport === 'RR1'">{{ item.ItemPlatform }}</td>-->
<!--<td style="min-width: 300px;">-->
<!--<span *ngFor="let url of transformItem(item.ItemIdentifier); let i = index">-->
<!--<br *ngIf="i>0">{{ url }}-->
<!--</span>-->
<!--</td>-->
<!--<td>{{ item.ItemDataType }}</td>-->
<!--<td class="uk-text-center"-->
<!--*ngIf="repoResponse.ReportDefinition.Filters.ReportAttribute[0].Value === 'Monthly'" colspan="2">-->
<!--<a *ngIf="item.ItemPerformance && (item.ItemPerformance.length > 0)"-->
<!--(click)="displayItemPerformance(item_i)">{{ (selectedItemIndex === item_i) ? 'Hide' : 'See' }} results</a>-->
<!--</td>-->
<!--<td class="uk-text-center"-->
<!--*ngIf="repoResponse.ReportDefinition.Filters.ReportAttribute[0].Value === 'Totals'">-->
<!--{{ item.ItemPerformance[0].Instance[0].Count }}-->
<!--</td>-->
<!--<td class="uk-text-center"-->
<!--*ngIf="repoResponse.ReportDefinition.Filters.ReportAttribute[0].Value === 'Totals'">-->
<!--{{ item.ItemPerformance[0].Instance[1].Count }}-->
<!--</td>-->
<!--</tr>-->
<!--<tr *ngIf="(selectedItemIndex === item_i)">-->
<!--<td colspan="6">-->
<!--<div class="uk-animation-slide-top-medium uk-margin-small-top">-->
<!--<table class="uk-table uk-table-middle uk-table-striped innerTable">-->
<!--<tr>-->
<!--<th>Month</th>-->
<!--<th>Downloads</th>-->
<!--<th>Views</th>-->
<!--</tr>-->
<!--<tr *ngFor="let month of item.ItemPerformance">-->
<!--<td>{{ month.Period.Begin | date: "MMM yyyy" }}</td>-->
<!--<td>{{ month.Instance[0].Count }}</td>-->
<!--<td>{{ month.Instance[1].Count }}</td>-->
<!--</tr>-->
<!--</table>-->
<!--</div>-->
<!--</td>-->
<!--</tr>-->
<!--</tbody>-->
<!--</table>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!-- BOTTOM PAGINATION LINKS -->
<ul class="uk-pagination uk-margin-medium-top">
<li class="uk-pagination-previous"><a (click)="goToPreviousPage()"><i class="uk-icon-angle-left"></i><span class="uk-margin-left">Previous</span></a></li>
@ -433,6 +533,7 @@
<!--</div>-->
</div>
</ng-template>
<!-- RIGHT HELP CONTENT -->
<aside-help-content #rightHelperContent [position]="'right'"

View File

@ -4,6 +4,7 @@ import { AuthenticationService } from '../../../services/authentication.service'
import { UsagestatsService } from '../../../services/usagestats.service';
import { ReportResponse } from '../../../domain/usageStatsClasses';
import { FormBuilder, FormGroup } from '@angular/forms';
import {COUNTER_Dataset_Report, COUNTER_Item_Report, SUSHI_Error_Model} from '../../../domain/sushilite';
@Component({
selector: 'metrics-usagestats-report-results',
@ -15,6 +16,11 @@ export class MetricsUsagestatsReportResultsComponent implements OnInit {
loadingMessage: string;
errorMessage: string;
infoMessage: string;
release: string;
granularity: string;
r5report: COUNTER_Dataset_Report | COUNTER_Item_Report | SUSHI_Error_Model = null;
reportItems: string;
compressed: boolean = null;
repoResponse: ReportResponse;
coveredPeriod: string;
@ -37,11 +43,11 @@ export class MetricsUsagestatsReportResultsComponent implements OnInit {
this.pageSize = 10;
this.readParams();
this.pageSizeSelect = this.fb.group({selectPageSize: ['']});
let body = document.getElementsByTagName('body')[0];
body.classList.remove("top_bar_active"); //remove the class
body.classList.remove("page_heading_active");
body.classList.remove("landing");
body.classList.add("dashboard");
const body = document.getElementsByTagName('body')[0];
body.classList.remove('top_bar_active'); // remove the class
body.classList.remove('page_heading_active');
body.classList.remove('landing');
body.classList.add('dashboard');
}
readParams() {
@ -49,14 +55,33 @@ export class MetricsUsagestatsReportResultsComponent implements OnInit {
this.route.queryParams.subscribe( qparams => {
this.params.append('Report', qparams['report']);
this.params.append('Release', '4');
this.params.append('Release', qparams['release']);
this.release = qparams['release'];
this.params.append('RequestorID', this.authService.getUserEmail());
this.params.append('BeginDate', qparams['beginDate']);
this.params.append('EndDate', qparams['endDate']);
if (qparams['beginDate'])
this.params.append('BeginDate', qparams['beginDate']);
if (qparams['endDate'])
this.params.append('EndDate', qparams['endDate']);
this.params.append('RepositoryIdentifier', qparams['repoId']);
this.params.append('ItemIdentifier', qparams['itemIdentifier']);
this.params.append('ItemDataType', qparams['itemIdentifier']);
if (qparams['itemIdentifier'])
this.params.append('ItemIdentifier', qparams['itemIdentifier']);
if (qparams['datasetIdentifier'])
this.params.append('DatasetIdentifier', qparams['datasetIdentifier']);
if (qparams['dataType'])
this.params.append('DataType', qparams['dataType']);
this.params.append('Granularity', qparams['granularity']);
this.granularity = qparams['granularity'];
// this.params.append('MetricType', qparams['metricTypes']);
if (qparams['report'] !== 'PR_P1') {
if (qparams['totalItemRequests'])
this.params.append('MetricType', qparams['totalItemRequests']);
if (qparams['totalItemInvestigations'])
this.params.append('MetricType', qparams['totalItemInvestigations']);
if (qparams['uniqueItemRequests'])
this.params.append('MetricType', qparams['uniqueItemRequests']);
if (qparams['uniqueItemInvestigations'])
this.params.append('MetricType', qparams['uniqueItemInvestigations']);
}
});
this.chosenReport = this.params.get('Report');
@ -70,48 +95,70 @@ export class MetricsUsagestatsReportResultsComponent implements OnInit {
this.selectedItemIndex = null;
this.repoResponse = null;
this.usageService.getReportResponse(this.page.toString(), this.pageSize.toString(), this.params).subscribe(
responseWrapper => {
this.repoResponse = responseWrapper.ReportResponse;
},
error => {
this.errorMessage = 'Failed to load the report results!';
this.loadingMessage = '';
},
() => {
this.errorMessage = '';
this.loadingMessage = '';
this.pageSizeSelect.get('selectPageSize').setValue(this.pageSize);
this.pageSizeSelect.get('selectPageSize').updateValueAndValidity();
this.totalPages = Math.ceil(
+this.repoResponse.ReportDefinition.Filters
.ReportAttribute.filter(x => x['Name'] === 'ReportItemCount')[0].Value / this.pageSize);
if ( this.totalPages === 0 ) {
this.infoMessage = 'No results were found';
if (this.release === '5') {
this.usageService.getR5Response(this.params).subscribe(
res => {
this.r5report = res;
this.reportItems = 'Report_Items';
if (this.chosenReport === 'DSR') {
this.reportItems = 'Report_Datasets';
}
if (this.r5report?.['Code'] === '100000') {
this.compressed = true;
}
}, error => {
this.errorMessage = 'Failed to load the report results!';
this.loadingMessage = '';
},
() => {
this.errorMessage = '';
this.loadingMessage = '';
}
);
} else {
this.usageService.getReportResponse(this.page.toString(), this.pageSize.toString(), this.params).subscribe(
responseWrapper => {
this.repoResponse = responseWrapper.ReportResponse;
},
error => {
this.errorMessage = 'Failed to load the report results!';
this.loadingMessage = '';
},
() => {
this.errorMessage = '';
this.loadingMessage = '';
if (this.repoResponse.ReportDefinition && this.repoResponse.ReportDefinition.Filters &&
this.repoResponse.ReportDefinition.Filters.ReportAttribute) {
this.pageSizeSelect.get('selectPageSize').setValue(this.pageSize);
this.pageSizeSelect.get('selectPageSize').updateValueAndValidity();
if (this.repoResponse.Report && this.repoResponse.ReportDefinition.Filters.UsageDateRange &&
this.repoResponse.ReportDefinition.Filters.UsageDateRange.Begin &&
this.repoResponse.ReportDefinition.Filters.UsageDateRange.End) {
this.coveredPeriod = this.repoResponse.ReportDefinition.Filters.UsageDateRange.Begin + ' to ';
this.coveredPeriod = this.coveredPeriod + this.repoResponse.ReportDefinition.Filters.UsageDateRange.End;
} else {
const defaultDatePeriod = this.repoResponse.Exception.filter(x => x['Message'] === 'Unspecified Date Arguments');
this.coveredPeriod = defaultDatePeriod[0].Data.split(':')[1].trim() + ' to ';
this.coveredPeriod = this.coveredPeriod + defaultDatePeriod[1].Data.split(':')[1].trim() + ' (default)';
this.totalPages = Math.ceil(
+this.repoResponse.ReportDefinition.Filters
.ReportAttribute.filter(x => x['Name'] === 'ReportItemCount')[0].Value / this.pageSize);
if ( this.totalPages === 0 ) {
this.infoMessage = 'No results were found';
}
} else {
this.repoResponse = null;
if (this.repoResponse.ReportDefinition && this.repoResponse.ReportDefinition.Filters &&
this.repoResponse.ReportDefinition.Filters.ReportAttribute) {
if (this.repoResponse.Report && this.repoResponse.ReportDefinition.Filters.UsageDateRange &&
this.repoResponse.ReportDefinition.Filters.UsageDateRange.Begin &&
this.repoResponse.ReportDefinition.Filters.UsageDateRange.End) {
this.coveredPeriod = this.repoResponse.ReportDefinition.Filters.UsageDateRange.Begin + ' to ';
this.coveredPeriod = this.coveredPeriod + this.repoResponse.ReportDefinition.Filters.UsageDateRange.End;
} else {
const defaultDatePeriod = this.repoResponse.Exception.filter(x => x['Message'] === 'Unspecified Date Arguments');
this.coveredPeriod = defaultDatePeriod[0].Data.split(':')[1].trim() + ' to ';
this.coveredPeriod = this.coveredPeriod + defaultDatePeriod[1].Data.split(':')[1].trim() + ' (default)';
}
} else {
this.repoResponse = null;
}
}
}
);
);
}
}

View File

@ -42,7 +42,7 @@
<div class="md-input-wrapper md-input-filled uk-margin-bottom">
<label>Release</label>
<input class="md-input label-fixed" type="text" value="4" disabled>
<input class="md-input label-fixed" type="text" value="{{release}}" disabled>
<span class="md-input-bar "></span>
</div>
@ -112,17 +112,77 @@
</div>
<div *ngIf="chosen_report != 'JR1' && chosen_report != 'RR1'" class="">
<div *ngIf="chosen_report != 'JR1' && chosen_report != 'RR1' && chosen_report != 'PR'
&& chosen_report != 'PR_P1' && chosen_report != 'DSR'">
<div class="md-input-wrapper md-input-filled uk-margin-bottom">
<label>Item Identifier</label>
<input class="md-input label-fixed" name="ItemIdentifier" placeholder="e.g. openaire:od_________::fb90de6f20d79783d05749d8f60417d5"
<input class="md-input label-fixed" name="ItemIdentifier" placeholder="e.g. doi:10.xyz/12345"
type="text" (blur)="updateItemIdentifier($event)">
<span class="md-input-bar "></span>
</div>
</div>
<div *ngIf="chosen_report == 'IR1' || chosen_report == 'RR1' || chosen_report == 'JR1'">
<div *ngIf="chosen_report == 'DSR'">
<div class="md-input-wrapper md-input-filled uk-margin-bottom">
<label>Dataset Identifier</label>
<input class="md-input label-fixed" name="DatasetIdentifier" placeholder="e.g. doi:10.xyz/12345"
type="text" (blur)="updateDatasetIdentifier($event)">
<span class="md-input-bar "></span>
</div>
</div>
<div *ngIf="chosen_report == 'PR' || chosen_report == 'IR'">
<h5>Metric Type</h5>
<div>
<label>
<input type="checkbox" class="uk-checkbox" value="Total_Item_Requests" checked (change)="updateTotalItemRequests($event)"> Total Item Requests
</label>
</div>
<div>
<label>
<input type="checkbox" class="uk-checkbox" value="Total_Item_Investigations" checked (change)="updateTotalItemInvestigations($event)"> Total Item Investigations
</label>
</div>
<div>
<label>
<input type="checkbox" class="uk-checkbox" value="Unique_Item_Requests" checked (change)="updateUniqueItemRequests($event)"> Unique Item Requests
</label>
</div>
<div>
<label>
<input type="checkbox" class="uk-checkbox" value="Unique_Item_Investigations" checked (change)="updateUniqueItemInvestigations($event)"> Unique Item Investigations
</label>
</div>
</div>
<div *ngIf="chosen_report == 'DSR'">
<h5>Metric Type</h5>
<div>
<label>
<input type="checkbox" class="uk-checkbox" value="Total_Dataset_Requests" checked (change)="updateTotalItemRequests($event)"> Total Dataset Requests
</label>
</div>
<div>
<label>
<input type="checkbox" class="uk-checkbox" value="Total_Dataset_Investigations" checked (change)="updateTotalItemInvestigations($event)"> Total Dataset Investigations
</label>
</div>
<div>
<label>
<input type="checkbox" class="uk-checkbox" value="Unique_Dataset_Requests" checked (change)="updateUniqueItemRequests($event)"> Unique Dataset Requests
</label>
</div>
<div>
<label>
<input type="checkbox" class="uk-checkbox" value="Unique_Dataset_Investigations" checked (change)="updateUniqueItemInvestigations($event)"> Unique Dataset Investigations
</label>
</div>
</div>
<div *ngIf="chosen_report == 'IR1' || chosen_report == 'RR1' || chosen_report == 'JR1'
|| chosen_report == 'PR' || chosen_report == 'IR'">
<div class="uk-text-italic uk-margin-top uk-margin-bottom">
<p>Optional filter to only show results for a single item type, e.g. article, book, etc.</p>
@ -130,7 +190,7 @@
<div class="md-input-wrapper md-input-filled">
<label class="">Item Data Type</label>
<select class="md-input" name="ItemDataType" (change)="updateItemDataType($event)">
<select class="md-input label-fixed" name="ItemDataType" (change)="updateItemDataType($event)">
<!-- TODO: get the list from api if it becomes available -->
<option value="">--- Select Item Data Type ---</option>
<option value="Annotation">Annotation</option>

View File

@ -4,7 +4,7 @@ import { ActivatedRoute, Router } from '@angular/router';
import { RepositoryService } from '../../../services/repository.service';
import { AuthenticationService } from '../../../services/authentication.service';
import { loadingRepoMessage } from '../../../domain/shared-messages';
import { SharedService } from "../../../services/shared.service";
import { SharedService } from '../../../services/shared.service';
@Component({
selector: 'metrics-usagestats-report',
@ -26,10 +26,16 @@ export class MetricsUsagestatsReportComponent implements OnInit {
chosen_report: string;
userEmail: string;
release: string;
beginDate = '';
endDate = '';
itemIdentifier = '';
itemDataType = '';
datasetIdentifier = '';
totalItemRequests = '';
totalItemInvestigations = '';
uniqueItemRequests = '';
uniqueItemInvestigations = '';
dataType = '';
granularity = 'Monthly';
constructor(private repoService: RepositoryService,
@ -40,7 +46,7 @@ export class MetricsUsagestatsReportComponent implements OnInit {
ngOnInit() {
if(this.sharedService.getRepository()) {
if (this.sharedService.getRepository()) {
this.repo = this.sharedService.getRepository();
this.getInfo();
}
@ -52,11 +58,11 @@ export class MetricsUsagestatsReportComponent implements OnInit {
}
);
let body = document.getElementsByTagName('body')[0];
body.classList.remove("top_bar_active"); //remove the class
body.classList.remove("page_heading_active");
body.classList.remove("landing");
body.classList.add("dashboard");
const body = document.getElementsByTagName('body')[0];
body.classList.remove('top_bar_active'); // remove the class
body.classList.remove('page_heading_active');
body.classList.remove('landing');
body.classList.add('dashboard');
}
getInfo() {
@ -68,12 +74,26 @@ export class MetricsUsagestatsReportComponent implements OnInit {
if (this.repo.issn && this.repo.issn !== 'null') {
this.shownRepoId = this.repo.issn.slice(0, 4) + '-' + this.repo.issn.toString().slice(4);
}
this.title = `${this.chosen_report} report for ${this.repo.officialName}`;
this.title = `${this.chosen_report} report for ${this.repo.officialname}`;
}
getParams() {
// this.repoId = this.route.snapshot.paramMap.get('id');
this.release = this.route.snapshot.paramMap.get('reportType').slice(1, 2);
this.chosen_report = this.route.snapshot.paramMap.get('reportID');
if (this.release === '5') {
if (this.chosen_report === 'DSR') {
this.totalItemRequests = 'Total_Dataset_Requests';
this.totalItemInvestigations = 'Total_Dataset_Investigations';
this.uniqueItemRequests = 'Unique_Dataset_Requests';
this.uniqueItemInvestigations = 'Unique_Dataset_Investigations';
} else {
this.totalItemRequests = 'Total_Item_Requests';
this.totalItemInvestigations = 'Total_Item_Investigations';
this.uniqueItemRequests = 'Unique_Item_Requests';
this.uniqueItemInvestigations = 'Unique_Item_Investigations';
}
}
this.shownRepoId = this.convertToDisplayedFormat(this.repo.id);
console.log(`shownRepoId is ${this.repo.id}`);
this.title = `${this.chosen_report} report`;
@ -122,13 +142,17 @@ export class MetricsUsagestatsReportComponent implements OnInit {
}
updateItemDataType(event: any) {
this.itemDataType = event.target.value;
this.dataType = event.target.value;
}
updateItemIdentifier(event: any) {
this.itemIdentifier = event.target.value;
}
updateDatasetIdentifier(event: any) {
this.datasetIdentifier = event.target.value;
}
updateGranularity(event: any) {
this.granularity = event.target.value;
}
@ -137,18 +161,70 @@ export class MetricsUsagestatsReportComponent implements OnInit {
this.useCurrentRepo = event.target.value;
}
updateTotalItemRequests(event: any) {
if (event.target.checked) {
this.totalItemRequests = event.target.value;
} else {
this.totalItemRequests = null;
}
}
updateUniqueItemRequests(event: any) {
if (event.target.checked) {
this.uniqueItemRequests = event.target.value;
} else {
this.uniqueItemRequests = null;
}
}
updateTotalItemInvestigations(event: any) {
if (event.target.checked) {
this.totalItemInvestigations = event.target.value;
} else {
this.totalItemInvestigations = null;
}
}
updateUniqueItemInvestigations(event: any) {
if (event.target.checked) {
this.uniqueItemInvestigations = event.target.value;
} else {
this.uniqueItemInvestigations = null;
}
}
goToReport() {
if (!this.useCurrentRepo) { this.shownRepoId = ''; }
const metricTypes: string[] = [];
if (this.totalItemRequests !== null) {
metricTypes.push(this.totalItemRequests);
}
if (this.totalItemInvestigations !== null) {
metricTypes.push(this.totalItemRequests);
}
if (this.uniqueItemRequests !== null) {
metricTypes.push(this.uniqueItemRequests);
}
if (this.uniqueItemInvestigations !== null) {
metricTypes.push(this.uniqueItemInvestigations);
}
this.router.navigate(['usagestats-report-results'], {
relativeTo: this.route.parent,
queryParams: {
report: this.chosen_report,
release: this.release,
beginDate: this.beginDate,
endDate: this.endDate,
repoId: this.shownRepoId,
itemDataType: this.itemDataType,
dataType: this.dataType,
itemIdentifier: this.itemIdentifier,
granularity: this.granularity
datasetIdentifier: this.datasetIdentifier,
granularity: this.granularity,
// metricTypes: metricTypes,
totalItemRequests: this.totalItemRequests,
totalItemInvestigations: this.totalItemInvestigations,
uniqueItemRequests: this.uniqueItemRequests,
uniqueItemInvestigations: this.uniqueItemInvestigations
}
});

View File

@ -21,10 +21,73 @@
<h3>Supported Reports</h3>
<h2>R5 Reports</h2>
<div class="uk-grid-match" uk-grid>
<div class="uk-width-1-3">
<div class="uk-text-center md-card md-card-hover">
<a [routerLink]="['R5','PR']" class="uk-position-cover"></a>
<div class="uk-card-media-top " style="background-color: #001a6e">
<h1 class="uk-padding-large font-weight-bolder md-color-white">PR</h1>
</div>
<div class="uk-card-body uk-padding-small">
<h3 class="uk-card-title uk-margin-small-bottom">
A report summarizing usage activity for the repository by month, metric type and item type
</h3>
</div>
</div>
</div>
<div class="uk-width-1-3">
<div class="uk-text-center md-card md-card-hover">
<a [routerLink]="['R5','PR_P1']" class="uk-position-cover"></a>
<div class="uk-card-media-top " style="background-color: #001a6e">
<h1 class="uk-padding-large font-weight-bolder md-color-white">PR_P1</h1>
</div>
<div class="uk-card-body uk-padding-small">
<h3 class="uk-card-title uk-margin-small-bottom">
A report summarizing usage activity for the repository by month, broken down by metric type
</h3>
</div>
</div>
</div>
<div class="uk-width-1-3">
<div class="uk-text-center md-card md-card-hover">
<a [routerLink]="['R5','IR']" class="uk-position-cover"></a>
<div class="uk-card-media-top " style="background-color: #001a6e">
<h1 class="uk-padding-large font-weight-bolder md-color-white">IR</h1>
</div>
<div class="uk-card-body uk-padding-small">
<h3 class="uk-card-title uk-margin-small-bottom">
A report for items requests by month metric_type, item type and repository
</h3>
</div>
</div>
</div>
</div>
<div class="uk-grid-match" uk-grid>
<div class="uk-width-1-3">
<div class="uk-text-center md-card md-card-hover">
<a [routerLink]="['R5','DSR']" class="uk-position-cover"></a>
<div class="uk-card-media-top " style="background-color: #001a6e">
<h1 class="uk-padding-large font-weight-bolder md-color-white">DSR</h1>
</div>
<div class="uk-card-body uk-padding-small">
<h3 class="uk-card-title uk-margin-small-bottom">
A report for datasets requests by month metric type and repository
</h3>
</div>
</div>
</div>
</div>
<hr>
<h2>R4 Reports</h2>
<div class="uk-grid uk-grid-match repositoryTypeSelection" data-uk-grid-margin="">
<div class="uk-width-1-3@m uk-row-first">
<div class="uk-text-center md-card md-card-default md-card-hover uk-scrollspy-inview uk-animation-slide-top-medium" uk-scrollspy-class="">
<a [routerLink]="['AR1']" class="el-link uk-position-cover uk-margin-remove-adjacent"></a>
<a [routerLink]="['R4','AR1']" class="el-link uk-position-cover uk-margin-remove-adjacent"></a>
<div class="uk-card-media-top">
<img class="el-image" src="../../../../assets/imgs/Icons_Reports_wide_AR1.png" alt="" style="width: 100%;">
</div>
@ -37,7 +100,7 @@
</div>
<div class="uk-width-1-3@m">
<div class="uk-margin uk-text-center md-card md-card-default md-card-hover uk-scrollspy-inview uk-animation-slide-top-medium" uk-scrollspy-class="" data-id="" style="">
<a [routerLink]="['IR1']" class="el-link uk-position-cover uk-margin-remove-adjacent" href=""></a>
<a [routerLink]="['R4','IR1']" class="el-link uk-position-cover uk-margin-remove-adjacent" href=""></a>
<div class="uk-card-media-top">
<img class="el-image" src="../../../../assets/imgs/Icons_Reports_wide_IR1.png" alt="" style="width:100%;">
</div>
@ -50,7 +113,7 @@
</div>
<div class="uk-width-1-3@m">
<div class="uk-margin uk-text-center md-card md-card-default md-card-hover uk-scrollspy-inview uk-animation-slide-top-medium" uk-scrollspy-class="" data-id="" style="">
<a [routerLink]="['RR1']" class="el-link uk-position-cover uk-margin-remove-adjacent"></a>
<a [routerLink]="['R4','RR1']" class="el-link uk-position-cover uk-margin-remove-adjacent"></a>
<div class="uk-card-media-top">
<img class="el-image" src="../../../../assets/imgs/Icons_Reports_wide_RR1.png" alt="" style="width:100%;">
</div>
@ -62,10 +125,11 @@
</div>
</div>
</div>
<div class="uk-grid uk-grid-match repositoryTypeSelection" data-uk-grid-margin="">
<div class="uk-width-1-3@m uk-row-first">
<div class="uk-text-center md-card md-card-default md-card-hover uk-scrollspy-inview uk-animation-slide-top-medium" uk-scrollspy-class="">
<a [routerLink]="['BR1']" class="el-link uk-position-cover uk-margin-remove-adjacent"></a>
<a [routerLink]="['R4','BR1']" class="el-link uk-position-cover uk-margin-remove-adjacent"></a>
<div class="uk-card-media-top">
<img class="el-image" src="../../../../assets/imgs/Icons_Reports_wide_BR1.png" alt="" style="width: 100%;">
</div>
@ -78,7 +142,7 @@
</div>
<div class="uk-width-1-3@m">
<div class="uk-margin uk-text-center md-card md-card-default md-card-hover uk-scrollspy-inview uk-animation-slide-top-medium" uk-scrollspy-class="" data-id="" style="">
<a [routerLink]="['BR2']" class="el-link uk-position-cover uk-margin-remove-adjacent" href=""></a>
<a [routerLink]="['R4','BR2']" class="el-link uk-position-cover uk-margin-remove-adjacent" href=""></a>
<div class="uk-card-media-top">
<img class="el-image" src="../../../../assets/imgs/Icons_Reports_wide_BR2.png" alt="" style="width:100%;">
</div>
@ -89,9 +153,9 @@
</div>
</div>
</div>
<div *ngIf="repo.datasourceType === 'journal'" class="uk-width-1-3@m">
<div *ngIf="repo.eoscDatasourceType === 'journal'" class="uk-width-1-3@m">
<div class="uk-margin uk-text-center md-card md-card-default md-card-hover uk-scrollspy-inview uk-animation-slide-top-medium" uk-scrollspy-class="" data-id="" style="">
<a [routerLink]="['JR1']" class="el-link uk-position-cover uk-margin-remove-adjacent"></a>
<a [routerLink]="['R4','JR1']" class="el-link uk-position-cover uk-margin-remove-adjacent"></a>
<div class="uk-card-media-top">
<img class="el-image" src="../../../../assets/imgs/Icons_Reports_wide_JR1.png" alt="" style="width:100%;">
</div>

View File

@ -3,7 +3,7 @@ import { Repository } from '../../../domain/typeScriptClasses';
import { RepositoryService } from '../../../services/repository.service';
import { AuthenticationService } from '../../../services/authentication.service';
import { ActivatedRoute, Router } from '@angular/router';
import { SharedService } from "../../../services/shared.service";
import { SharedService } from '../../../services/shared.service';
@Component({
selector: 'metrics-usagestats',
@ -27,13 +27,13 @@ export class MetricsUsagestatsComponent implements OnInit {
if(this.sharedService.getRepository()) {
this.repo = this.sharedService.getRepository();
this.title = this.title + ' for ' + this.repo.officialName;
this.title = this.title + ' for ' + this.repo.officialname;
}
this.sharedService.repository$.subscribe(
r => {
this.repo = r;
this.title = this.title + ' for ' + this.repo.officialName;
this.title = this.title + ' for ' + this.repo.officialname;
}
);

View File

@ -36,7 +36,7 @@ const metricsRoutes: Routes = [
component: MetricsUsagestatsComponent
},
{
path: 'usagestats/:reportID',
path: 'usagestats/:reportType/:reportID',
component: MetricsUsagestatsReportComponent
},
{

View File

@ -15,9 +15,9 @@
<div class="uk-margin-medium-left uk-margin-medium-right">
<div class="uk-padding-small">
<h3 *ngIf="repository" class="heading_b">
<img *ngIf="!repository.logoUrl" src="../../../assets/imgs/yourLogoHere.jpg" style="margin-right: 15px; margin-top:-8px" width="60">
<img *ngIf="repository.logoUrl" src="{{ repository.logoUrl }}" style="margin-right: 15px; margin-top:-8px" width="60">
{{ repository.officialName }}
<img *ngIf="!repository.logourl" src="../../../assets/imgs/yourLogoHere.jpg" style="margin-right: 15px; margin-top:-8px" width="60">
<img *ngIf="repository.logourl" src="{{ repository.logourl }}" style="margin-right: 15px; margin-top:-8px" width="60">
{{ repository.officialname }}
</h3>
</div>

View File

@ -44,7 +44,7 @@ export class RepositoryComponent implements OnInit {
this.loadingMessage = 'Retrieving datasource info';
this.repoService.getRepositoryById(this.repositoryId).subscribe(
repository => {
console.log("Repository component - Repository id: " + repository.id);
console.log('Repository component - Repository id: ' + repository.id);
this.sharedService.setRepository(repository);
this.loadingMessage = '';
},

View File

@ -43,22 +43,23 @@
<li class="uk-active" aria-expanded="true"><a href="#">Update Information</a></li>
<li aria-expanded="false" class=""><a href="#">Update Interfaces</a></li>
<li aria-expanded="false" class=""><a href="#">Update Admins</a></li>
<!-- <li aria-expanded="false" class=""><a href="#">Update Terms of Agreement</a></li>-->
<li aria-expanded="false" class=""><a href="#">Update Terms of Use</a></li>
</ul>
<ul id="tabs_anim4" class="uk-switcher uk-margin">
<li aria-hidden="false" class="uk-active" style="animation-duration: 200ms;">
<datasource-update-form #datasourceUpdateForm
[selectedRepo]="repo"
[mode]="this.mode"
[showButton]=true
(emittedUrl)="getNewLogoUrl($event)"></datasource-update-form>
(emittedUrl)="getNewLogoUrl($event)">
</datasource-update-form>
</li>
<li aria-hidden="true" style="animation-duration: 200ms;" class="">
<div *ngIf="repo && repoInterfaces && !loadingMessage" class="uk-grid uk-grid-match uk-margin-top" style="padding: 0px 3px 0px 3px;">
<div *ngFor="let inter of dataForInterfaceComp" class="uk-width-1-2@m uk-margin-bottom">
<div>
<div class="md-card" style="height: 100%">
<app-repository-interface-form #interfacesArray
[data]="inter"
<app-repository-interface-form #interfacesArray [data]="inter"
(emitDeleteInterface)="removeInterfaceFromList($event)">
</app-repository-interface-form>
</div>

View File

@ -22,6 +22,7 @@ export class SourcesUpdateRepoComponent implements OnInit {
// repoId: string;
logoURL: string;
repo: Repository;
mode: string = null;
repoInterfaces: RepositoryInterface[] = [];
@ViewChild('datasourceUpdateForm') datasourceUpdateForm: DatasourceUpdateFormComponent;
@ -49,7 +50,18 @@ export class SourcesUpdateRepoComponent implements OnInit {
if (this.sharedService.getRepository()) {
this.repo = this.sharedService.getRepository();
this.logoURL = this.repo.logoUrl;
if (this.repo.id.includes('eurocrisdris')) {
this.mode = 'cris';
} else if (this.repo.id.includes('opendoar')) {
this.mode = 'opendoar';
} else if (this.repo.id.includes('re3data')) {
this.mode = 're3data';
} else if (this.repo.id.includes('journal')) {
this.mode = 'journal';
} else if (this.repo.id.includes('aggregator')) {
this.mode = 'aggregator';
}
this.logoURL = this.repo.logourl;
this.getRepoInterfaces();
}
@ -57,7 +69,7 @@ export class SourcesUpdateRepoComponent implements OnInit {
r => {
this.repo = r;
if (this.repo) {
this.logoURL = this.repo.logoUrl;
this.logoURL = this.repo.logourl;
this.getRepoInterfaces();
}
}
@ -133,9 +145,9 @@ export class SourcesUpdateRepoComponent implements OnInit {
false, i,
{
id: this.repo.id,
datasourceType: this.repo.datasourceType,
datasourceClass: this.repo.datasourceClass,
registeredBy: this.repo.registeredBy
datasourceType: this.repo.eoscDatasourceType,
datasourceClass: this.repo.eoscDatasourceType,
registeredBy: this.repo.registeredby
},
this.repoInterfaces[i]
]);
@ -145,9 +157,9 @@ export class SourcesUpdateRepoComponent implements OnInit {
false, 0,
{
id: this.repo.id,
datasourceType: this.repo.datasourceType,
datasourceClass: this.repo.datasourceClass,
registeredBy: this.repo.registeredBy
datasourceType: this.repo.eoscDatasourceType,
datasourceClass: this.repo.eoscDatasourceType,
registeredBy: this.repo.registeredby
}
]);
}
@ -156,8 +168,8 @@ export class SourcesUpdateRepoComponent implements OnInit {
addInterfaceToList(intrf?: RepositoryInterface) {
const curIndex = this.dataForInterfaceComp.length;
const curRepoInfo = {
id: this.repo.id, datasourceType: this.repo.datasourceType,
datasourceClass: this.repo.datasourceClass, registeredBy: this.repo.registeredBy
id: this.repo.id, datasourceType: this.repo.eoscDatasourceType,
datasourceClass: this.repo.eoscDatasourceType, registeredBy: this.repo.registeredby
};
if (intrf) {
this.dataForInterfaceComp.push([false, curIndex, curRepoInfo, intrf]);
@ -192,7 +204,7 @@ export class SourcesUpdateRepoComponent implements OnInit {
}
updatedLogoUrl(event: any) {
this.repo.logoUrl = this.logoURL;
this.repo.logourl = this.logoURL;
this.datasourceUpdateForm.updateGroup.get('logoUrl').setValue(this.logoURL);
this.datasourceUpdateForm.updateRepo();

View File

@ -44,7 +44,7 @@
</div>
<confirmation-dialog #deleteRepositoryAdminModal [title]="'Remove datasource admin'" [isModalShown]="isDeleteModalShown"
[confirmButNotCloseButton]="'Remove'" (emitObject)="deleteRepoAdmin($event)">
[confirmButNotCloseButton]="'Remove'" (emitObject)="deleteRepoAdmin($event)" (clearAll)="clearModal()">
<div *ngIf="modalErrorMessage" class="uk-alert uk-alert-danger">{{modalErrorMessage}}</div>
@ -54,13 +54,6 @@
</div>
<div class="whiteFilm"></div>
</div>
<!--<div *ngIf="!modalLoadingMessage && !modalErrorMessage">-->
<!--<div *ngIf="selectedAdminForDelete">-->
<!--<h6>Are you sure you want to delete {{ selectedAdminForDelete.email }} from the list of repository admins?</h6>-->
<!--</div>-->
<!--</div>-->
<div *ngIf="selectedAdminForDelete">
<h6>Are you sure you want to remove this user admin?</h6>
<pre>
@ -75,7 +68,7 @@
<confirmation-dialog #addRepositoryAdminModal [title]="'Add new datasource admin'" [isModalShown]="isAddModalShown"
[confirmButNotCloseButton]="'Submit'" (emitObject)="addRepositoryAdmin()">
[confirmButNotCloseButton]="'Submit'" (emitObject)="addRepositoryAdmin()" (clearAll)="clearModal()">
<div *ngIf="modalErrorMessage" class="uk-alert uk-alert-danger">{{modalErrorMessage}}</div>

View File

@ -73,10 +73,9 @@ export class UpdateRepoAdminsComponent implements OnChanges {
}
}
closeDeletionModal() {
clearModal() {
this.selectedAdminForDelete = null;
this.deleteRepositoryAdminModal.hideModal();
// UIkit.modal('#deletionModal').hide();
this.modalErrorMessage = null;
}
deleteRepoAdmin(event: any) {
@ -128,11 +127,11 @@ export class UpdateRepoAdminsComponent implements OnChanges {
}, error => {
console.log('Error adding repository admin', error);
this.modalLoadingMessage = '';
if(error.status === 404) {
if (error.status === 404) {
this.modalErrorMessage = 'This email address is not associated with an OpenAIRE user account.\n' +
'Please make sure the user has an OpenAIRE account and then try again.';
} else {
this.modalErrorMessage = 'Error deleting the user admin, please try again. If the error persists, ' +
this.modalErrorMessage = 'Error adding the new admin, please try again. If the error persists, ' +
'please contact helpdesk@openaire.eu';
}
},

View File

@ -22,45 +22,21 @@
<div class="uk-row-first">
<div class="uk-text-center md-card md-card-default md-card-hover uk-scrollspy-inview uk-animation-slide-top-medium
datasourceTypeCard uk-inline-clip uk-transition-toggle" uk-scrollspy-class="" tabindex="0">
<a [routerLink]="['literature']" [queryParams]="{ step: 'selectDatasource' }" class="el-link uk-position-cover uk-margin-remove-adjacent"></a>
<a [routerLink]="['repository']" [queryParams]="{ step: 'selectDatasource' }" class="el-link uk-position-cover uk-margin-remove-adjacent"></a>
<div class="md-card-content large-padding uk-margin-medium-top uk-margin-bottom">
<div class="">
<img class="el-image" src="../../../assets/imgs/datasourcetypes/Literature%20repository.svg" alt="" width="51">
</div>
<h3>Literature repository</h3>
<!--<a [routerLink]="['literature']" [queryParams]="{ step: 'selectDatasource' }" class="el-link uk-position-cover uk-margin-remove-adjacent"></a>-->
<div class="uk-transition-slide-bottom uk-position-bottom uk-overlay uk-overlay-primary" (click)="goTo('literature')" style="cursor: pointer">
<p class="uk-margin-remove">Make sure your repository is already registered in OpenDOAR, the authoritative
directory of institutional and thematic OA repositories, and is compatible with the OpenAIRE Guidelines for Literature Repositories.</p>
<a href="http://v2.sherpa.ac.uk/opendoar/" target="_blank">
List provided by
<br>
OpenDOAR<i class="fas fa-external-link-alt" style="margin-left: 3px !important;"></i>
</a>
</div>
</div>
</div>
</div>
<div class="">
<div class="uk-text-center md-card md-card-default md-card-hover uk-scrollspy-inview uk-animation-slide-top-medium
datasourceTypeCard uk-inline-clip uk-transition-toggle" uk-scrollspy-class="" tabindex="0">
<a [routerLink]="['data']" [queryParams]="{ step: 'selectDatasource' }" class="el-link uk-position-cover uk-margin-remove-adjacent"></a>
<div class="md-card-content large-padding uk-margin-medium-top uk-margin-bottom">
<div class="">
<img class="el-image" src="../../../assets/imgs/datasourcetypes/Data%20repository.svg" alt="" width="51">
</div>
<h3>Data repository</h3>
<!--<a [routerLink]="['data']" [queryParams]="{ step: 'selectDatasource' }" class="el-link uk-position-cover uk-margin-remove-adjacent"></a>-->
<div class="uk-transition-slide-bottom uk-position-bottom uk-overlay uk-overlay-primary" (click)="goTo('data')" style="cursor: pointer">
<p class="uk-margin-remove">Make sure your data repository is registered in Re3Data, the global registry
of research data repositories from different academic disciplines, and is compatible with the OpenAIRE Guidelines for Data Archives.</p>
<a href="http://www.re3data.org" target="_blank">
List provided by
<br>
Re3data<i class="fas fa-external-link-alt" style="margin-left: 3px !important;"></i>
</a>
<h3>Repository</h3>
<div class="uk-transition-slide-bottom uk-position-bottom uk-overlay uk-overlay-primary" (click)="goTo('repository')" style="cursor: pointer">
<p class="uk-margin-remove">Make sure your repository is already registered in one of the following global registries -
<a href="https://v2.sherpa.ac.uk/opendoar/">OpenDOAR<i class="fas fa-external-link-alt" style="margin-left: 3px !important;"></i></a>,
<a href="http://www.re3data.org/">Re3data<i class="fas fa-external-link-alt" style="margin-left: 3px !important;"></i></a> or
<a href="https://fairsharing.org/search?fairsharingRegistry=Database">FAIRsharing<i class="fas fa-external-link-alt" style="margin-left: 3px !important;"></i></a>
and is compatible with the
<a href="https://guidelines.openaire.eu/en/latest/">OpenAIRE Guidelines<i class="fas fa-external-link-alt" style="margin-left: 3px !important;"></i></a>.
<br>For any questions please contact the <a href="mailto:helpdesk@openaire.eu" target="_blank">OpenAIRE helpdesk.<i class="fas fa-external-link-alt" style="margin-left: 3px !important;"></i></a>
</p>
</div>
</div>
</div>
@ -85,10 +61,6 @@
</div>
</div>
</div>
<div class="uk-margin uk-grid uk-grid-match uk-grid-medium repositoryTypeSelection uk-child-width-1-3@l uk-child-widht-1-3@m" uk-grid="">
<div class="uk-row-first">
<div class="uk-text-center md-card md-card-default md-card-hover uk-scrollspy-inview uk-animation-slide-top-medium
datasourceTypeCard uk-inline-clip uk-transition-toggle" uk-scrollspy-class="" tabindex="0">
@ -110,6 +82,31 @@
</div>
<div class="uk-margin uk-grid uk-grid-match uk-grid-medium repositoryTypeSelection uk-child-width-1-3@l uk-child-widht-1-3@m" uk-grid="">
<div class="">
<div class="uk-text-center md-card md-card-default md-card-hover uk-scrollspy-inview uk-animation-slide-top-medium
datasourceTypeCard uk-inline-clip uk-transition-toggle" uk-scrollspy-class="" tabindex="0">
<a [routerLink]="['cris']" [queryParams]="{ step: 'selectDatasource' }" class="el-link uk-position-cover uk-margin-remove-adjacent"></a>
<div class="md-card-content large-padding uk-margin-medium-top uk-margin-bottom">
<div class="">
<img class="el-image" src="../../../assets/imgs/datasourcetypes/Cris.svg" alt="" width="50">
</div>
<h3>CRIS systems</h3>
<div class="uk-transition-slide-bottom uk-position-bottom uk-overlay uk-overlay-primary" (click)="goTo('cris')" style="cursor: pointer">
<p class="uk-margin-remove">Please make sure your CRIS is registered in DRIS the Directory of Research
Information Systems, and is compatible with the OpenAIRE Guidelines for CRIS Managers.
<a href="https://dspacecris.eurocris.org/cris/explore/dris" target="_blank">
List provided by DRIS.<i class="fas fa-external-link-alt" style="margin-left: 3px !important;"></i>
</a>
</p>
</div>
</div>
</div>
</div>
</div>
<hr style="border-top: 1px solid #dedede; margin-top: 40px; margin-bottom: 30px;">
<h2 class="heading_b uk-margin-bottom">Coming soon</h2>
@ -117,23 +114,6 @@
<div class="uk-margin uk-grid uk-grid-match uk-grid-medium repositoryTypeSelection uk-child-width-1-3@l uk-child-widht-1-3@m" uk-grid="">
<div class="uk-row-first">
<div class="uk-text-center md-card md-card-default md-card-hover uk-scrollspy-inview uk-animation-slide-top-medium
datasourceTypeCard uk-inline-clip uk-transition-toggle" uk-scrollspy-class="" tabindex="0">
<a class="el-link uk-position-cover uk-margin-remove-adjacent uk-disabled"></a>
<div class="md-card-content large-padding uk-margin-medium-top uk-margin-bottom">
<div class="">
<img class="el-image" src="../../../assets/imgs/datasourcetypes/Cris.svg" alt="" width="50">
</div>
<h3>CRIS systems</h3>
<div class="uk-transition-slide-bottom uk-position-bottom uk-overlay uk-overlay-primary">
<p class="uk-margin-remove">Stay tuned.</p>
</div>
</div>
<div class="whiteFilm"></div>
</div>
</div>
<div class="">
<div class="uk-text-center md-card md-card-default md-card-hover uk-scrollspy-inview uk-animation-slide-top-medium
datasourceTypeCard uk-inline-clip uk-transition-toggle" uk-scrollspy-class="" tabindex="0">
<a class="el-link uk-position-cover uk-margin-remove-adjacent uk-disabled"></a>
@ -167,11 +147,7 @@
</div>
</div>
</div>
<div class="uk-margin uk-grid uk-grid-match uk-grid-medium repositoryTypeSelection uk-child-width-1-3@l uk-child-widht-1-3@m" uk-grid="">
<div class="uk-row-first">
<div class="">
<div class="uk-text-center md-card md-card-default md-card-hover uk-scrollspy-inview uk-animation-slide-top-medium
datasourceTypeCard uk-inline-clip uk-transition-toggle" uk-scrollspy-class="" tabindex="0">
<a class="el-link uk-position-cover uk-margin-remove-adjacent uk-disabled"></a>
@ -190,6 +166,12 @@
</div>
<div class="uk-margin uk-grid uk-grid-match uk-grid-medium repositoryTypeSelection uk-child-width-1-3@l uk-child-widht-1-3@m" uk-grid="">
</div>
</div>
<!-- RIGHT HELP CONTENT -->

View File

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core';
import { Router } from "@angular/router";
import {Component, OnInit} from '@angular/core';
import {Router} from '@angular/router';
@Component({
selector: 'app-sources-register',
@ -8,27 +8,28 @@ import { Router } from "@angular/router";
export class SourcesRegisterComponent implements OnInit {
constructor(private router: Router) {
}
constructor(private router: Router) {}
ngOnInit() {
let body = document.getElementsByTagName('body')[0];
body.classList.remove("top_bar_active"); //remove the class
body.classList.remove("page_heading_active");
body.classList.remove("landing");
body.classList.add("dashboard");
const body = document.getElementsByTagName('body')[0];
body.classList.remove('top_bar_active'); // remove the class
body.classList.remove('page_heading_active');
body.classList.remove('landing');
body.classList.add('dashboard');
}
// fixme still when I click the link inside the text in overlay, this event happens as well (I go to the first step of the wizard)
goTo(datasourceType: string) {
if(datasourceType==='literature') {
if (datasourceType === 'repository') {
this.router.navigateByUrl(`/sources/register/${datasourceType}?step=selectDatasource`);
} else if(datasourceType==='data') {
} else if (datasourceType === 'data') {
this.router.navigateByUrl(`/sources/register/${datasourceType}?step=selectDatasource`);
} else if(datasourceType==='journal') {
} else if (datasourceType === 'journal') {
this.router.navigateByUrl(`/sources/register/${datasourceType}?step=basicInformation`);
} else if(datasourceType==='aggregator') {
} else if (datasourceType === 'aggregator') {
this.router.navigateByUrl(`/sources/register/${datasourceType}?step=basicInformation`);
} else if (datasourceType === 'cris') {
this.router.navigateByUrl(`/sources/register/${datasourceType}?step=selectDatasource`);
}
}
}

View File

@ -5,20 +5,45 @@
{{ alertMessage }}
</div>
<div class="uk-alert uk-alert-info">
Please make sure your repository is registered in
<a target="_blank" href="{{ sourceUrl }}">
<i class="fas fa-external-link-alt" style="margin-right:3px;"></i>{{ sourceTitle }}
</a>
. <br>
<span *ngIf="latestUpdate && (latestUpdate !== 'null')">
<b>Last Updated: </b>{{ latestUpdate }}
</span>
<ng-container *ngIf="mode === 'repository'">
Please make sure your repository is registered in <a href="https://v2.sherpa.ac.uk/opendoar/" target="_blank">OpenDOAR</a>,
<a href="http://www.re3data.org/" target="_blank">Re3data</a> or <a href="https://fairsharing.org/search?fairsharingRegistry=Database" target="_blank">FAIRsharing</a>.
<span *ngIf="opendoarlatestUpdate && (opendoarlatestUpdate !== 'null')">
<br><b>Last Updated (OpenDOAR): </b>{{ opendoarlatestUpdate }}
</span>
<span *ngIf="re3datalatestUpdate && (re3datalatestUpdate !== 'null')">
<br><b>Last Updated (Re3data): </b>{{ re3datalatestUpdate }}
</span>
<span *ngIf="fairsharinglatestUpdate && (fairsharinglatestUpdate !== 'null')">
<br><b>Last Updated (FAIRsharing): </b>{{ fairsharinglatestUpdate }}
</span>
</ng-container>
<ng-container *ngIf="mode === 'cris'">
Please make sure your Research Information System is registered in <a href="https://eurocris.org" target="_blank">euroCRIS</a>.
<a href="https://eurocris.org/dris/dris-form" target="_blank"><br><i class="fas fa-external-link-alt" style="margin-right:3px;"></i>euroCRIS DRIS</a>
<span *ngIf="latestUpdate && (latestUpdate !== 'null')">
<br><b>Last Updated: </b>{{ latestUpdate }}
</span>
</ng-container>
<!-- <span *ngIf="latestUpdate && (latestUpdate !== 'null')">-->
<!-- <ng-container *ngIf="mode==='repository'">-->
<!-- <b>Last Updated (OpenDOAR): </b>{{ latestUpdate }}-->
<!-- <b>Last Updated (Re3data): </b>{{ latestUpdate }}-->
<!-- <b>Last Updated (FAIRsharing): </b>{{ latestUpdate }}-->
<!-- </ng-container>-->
<!-- <ng-container *ngIf="mode==='cris'">-->
<!-- -->
<!-- </ng-container>-->
<!-- </span>-->
</div>
<div class="uk-margin-medium-top">
<div class="md-input-wrapper md-input-filled">
<label style="top: -16px;" class="">Select country</label>
<select class="md-input" (change)="getReposInCountry($event.target.value)">
<option value="" disabled>-- none selected --</option>
<option value="" disabled selected>-- none selected --</option>
<option *ngFor="let country of countries; let i = index" value="{{ i }}">{{ country.name ? country.name :
country.code }}
</option>
@ -29,12 +54,12 @@
</div>
<div *ngIf="selectedCountry">
<div>
<h2 class="heading_b uk-margin-bottom uk-margin-medium-top">{{ sourceTitle }} Repositories in {{
selectedCountry.name ? selectedCountry.name : selectedCountry.code }}</h2>
<h2 class="heading_b uk-margin-bottom uk-margin-medium-top">{{ sourceTitle }}
{{mode === 'cris' ? '- Research Information Systems' : 'Repositories'}} in
{{selectedCountry.name ? selectedCountry.name : selectedCountry.code }}</h2>
</div>
<div *ngIf="loadingMessage" class="loading-big">
<div class="loader-big"
style="text-align: center; padding-top: 170px; color: rgb(47, 64, 80); font-weight: bold;">
<div class="loader-big" style="text-align: center; padding-top: 170px; color: rgb(47, 64, 80); font-weight: bold;">
{{ loadingMessage }}
</div>
<div class="whiteFilm"></div>
@ -51,21 +76,17 @@
</div>
<div class="form-group"
*ngFor="let repo of countryRepos | repoFilter: searchBox">
<label for="{{ repo.id }}"
class="uk-button uk-link-muted visible_uk_links"
style="display: block; text-align: left;">
<div class="form-group" *ngFor="let repo of countryRepos | repoFilter: searchBox">
<label for="{{ repo.id }}" class="uk-button uk-link-muted visible_uk_links" style="display: block; text-align: left;">
<input type="radio" value="{{ repo.id }}" id="{{ repo.id }}" name="repositories"
(change)="onChooseRepository(repo.id)" [disabled]="repo.registeredby !== null">
<span>
{{(repo.officialname !== null) ? repo.officialname : repo.englishname }}
<span *ngIf="repo.registeredby !== null"
class="uk-badge uk-badge-warning uk-margin-small-right uk-margin-small-left">Registered</span>
<a target="_blank" href="{{ (repo.websiteurl !== null) ? repo.websiteurl : '' }}" [ngStyle]="">
<i class="fas fa-external-link-alt externalLink"></i>
</a>
</span>
<span>{{(repo.officialname !== null) ? repo.officialname : repo.englishname }}
<span *ngIf="repo.registeredby !== null"
class="uk-badge uk-badge-warning uk-margin-small-right uk-margin-small-left">Registered</span>
<a target="_blank" href="{{ (repo.websiteurl !== null) ? repo.websiteurl : '' }}" [ngStyle]="">
<i class="fas fa-external-link-alt externalLink"></i>
</a>
</span>
<!--TODO uncomment if we still need the next button everywhere-->
<!--<div *ngIf="repoId == repo.id" class="uk-float-right">-->
<!--<a class="uk-button uk-button-primary uk-border-rounded uk-vertical-align-middle"-->

View File

@ -28,6 +28,9 @@ export class RegisterDatasourceSelectExistingComponent implements OnInit {
sourceUrl: string;
sourceTitle: string;
latestUpdate: string;
opendoarlatestUpdate: string;
re3datalatestUpdate: string;
fairsharinglatestUpdate: string;
@Input() mode: string;
@ -44,51 +47,53 @@ export class RegisterDatasourceSelectExistingComponent implements OnInit {
this.hasSelectedCountry = false;
}
setUpSourceInfo() {
setUpSourceInfo() { // deprecated?
if (this.mode === 'opendoar') {
this.sourceUrl = 'http://v2.sherpa.ac.uk/opendoar/';
this.sourceTitle = 'OpenDOAR';
} else if (this.mode === 're3data') {
this.sourceUrl = 'https://www.re3data.org/';
this.sourceTitle = 'Re3data';
} else if (this.mode === 'cris') {
this.sourceUrl = 'https://eurocris.org';
this.sourceTitle = 'euroCRIS';
}
this.getLatestUpdate();
}
getCountries() {
this.repoService.getCountries()
.subscribe(
countries => {
// TODO: check again getCountries null return values
/*/!* check for null values *!/
let nullVals = countries.filter(el => el.name === null);
/!* remove null values from array *!/
for (let nullVal of nullVals) {
let i = countries.findIndex(el => el === nullVal);
/!* remove null value from array *!/
if (i !== -1) { countries.splice(i, 1); }
}*/
this.repoService.getCountries().subscribe(
countries => {
// TODO: check again getCountries null return values
/*/!* check for null values *!/
let nullVals = countries.filter(el => el.name === null);
/!* remove null values from array *!/
for (let nullVal of nullVals) {
let i = countries.findIndex(el => el === nullVal);
/!* remove null value from array *!/
if (i !== -1) { countries.splice(i, 1); }
}*/
/* sort countries array */
this.countries = countries.sort( function(a, b) {
if (a.name < b.name) {
return -1;
} else if (a.name > b.name) {
return 1;
} else {
return 0;
}
} );
},
error => {
this.alertMessage = noServiceMessage;
console.log(error);
});
/* sort countries array */
this.countries = countries.sort( function(a, b) {
if (a.name < b.name) {
return -1;
} else if (a.name > b.name) {
return 1;
} else {
return 0;
}
} );
},
error => {
this.alertMessage = noServiceMessage;
console.log(error);
});
}
getReposInCountry(i: number) {
const country = this.countries[i];
console.log(`I got ${country} and ${this.mode}`);
// console.log(`I got ${country} and ${this.mode}`);
this.countryRepos = [];
this.selectedCountry = country;
this.hasSelectedCountry = false;
@ -118,14 +123,21 @@ export class RegisterDatasourceSelectExistingComponent implements OnInit {
}
this.loadingMessage = '';
this.alertMessage = '';
console.log('this.selectedCountry became', JSON.stringify(this.selectedCountry));
// console.log('this.selectedCountry became', JSON.stringify(this.selectedCountry));
}
);
}
getLatestUpdate() {
return this.repoService.getListLatestUpdate(this.mode).subscribe (
responseDate => this.latestUpdate = responseDate['lastCollectionDate'],
return this.repoService.getListLatestUpdate(this.mode).subscribe(
responseDate => {
if (this.mode === 'cris') { this.latestUpdate = responseDate['lastCollectionDate']; }
if (this.mode === 'repository') {
this.opendoarlatestUpdate = responseDate['opendoar'];
this.re3datalatestUpdate = responseDate['re3data'];
this.fairsharinglatestUpdate = responseDate['fairsharing'];
}
},
error => console.log(error)
);
}

View File

@ -23,36 +23,34 @@
<div class="steps clearfix">
<ul role="tablist">
<li role="tab" class="first {{ (currentStep == 0) ? 'current' : '' }}" aria-disabled="false" aria-selected="true">
<a id="wizard_advanced-t-0" href="#wizard_advanced-h-0" aria-controls="wizard_advanced-p-0">
<!-- <a id="wizard_advanced-t-0" href="#wizard_advanced-h-0" aria-controls="wizard_advanced-p-0">-->
<a id="wizard_advanced-t-0" aria-controls="wizard_advanced-p-0" style="cursor: default">
<!--<span class="current-info audible">current step: </span>-->
<span class="number">1</span>
<span class="title">Select Repository</span>
<span class="title">Select {{currentMode === 'cris' ? 'Datasource' : 'Repository'}}</span>
</a>
</li>
<li role="tab" class="{{ (currentStep < 1) ? 'disabled' : '' }} {{ (currentStep == 1) ? 'current' : '' }}" aria-disabled="true">
<a id="wizard_advanced-t-1" href="#wizard_advanced-h-1" aria-controls="wizard_advanced-p-1">
<a id="wizard_advanced-t-1" aria-controls="wizard_advanced-p-1" style="cursor: default">
<span class="number">2</span>
<span class="title">Register data source</span>
</a>
</li>
<li role="tab" class=" {{ (currentStep < 2) ? 'disabled' : '' }} {{ (currentStep == 2) ? 'current' : '' }}" aria-disabled="true">
<a id="wizard_advanced-t-2" href="#wizard_advanced-h-2" aria-controls="wizard_advanced-p-2">
<a id="wizard_advanced-t-2" aria-controls="wizard_advanced-p-2" style="cursor: default">
<span class="number">3</span>
<span class="title">Register interface</span>
</a>
</li>
<li role="tab" class="last {{ (currentStep < 3) ? 'disabled' : '' }} {{ (currentStep == 3) ? 'current' : '' }}" aria-disabled="true">
<!-- ToU: replace above line with below line -->
<!--<li role="tab" class=" {{ (currentStep < 3) ? 'disabled' : '' }} {{ (currentStep == 3) ? 'current' : '' }}" aria-disabled="true">-->
<a id="wizard_advanced-t-3" href="#wizard_advanced-h-3" aria-controls="wizard_advanced-p-3">
<li role="tab" class=" {{ (currentStep < 3) ? 'disabled' : '' }} {{ (currentStep == 3) ? 'current' : '' }}" aria-disabled="true">
<a id="wizard_advanced-t-3" aria-controls="wizard_advanced-p-3" style="cursor: default">
<span class="number">4</span>
<!-- ToU: uncomment this section -->
<!--<span class="title">Terms of Use</span>
<span class="title">Terms of Use</span>
</a>
</li>
<li role="tab" class="last {{ (currentStep < 4) ? 'disabled' : '' }} {{ (currentStep == 4) ? 'current' : '' }}" aria-disabled="true">
<a id="wizard_advanced-t-4" href="#wizard_advanced-h-4" aria-controls="wizard_advanced-p-4">
<span class="number">5</span>-->
<a id="wizard_advanced-t-4" aria-controls="wizard_advanced-p-4" style="cursor: default">
<span class="number">5</span>
<span class="title">Finish</span>
</a>
</li>
@ -73,11 +71,13 @@
<section id="wizard_advanced-p-0" role="tabpanel" aria-labelledby="wizard_advanced-h-0"
class="body step-0 {{ (currentStep == 0) ? 'current' : '' }}" data-step="0" aria-hidden="false">
<app-select-existing-datasource *ngIf="(currentStep === 0) && (currentMode !== null) && !loadingMessage"
#datasourcesByCountry
[mode]="currentMode"
(emitRepoId)="getRepoId($event)"
(promptNext)="goToStep2($event)"></app-select-existing-datasource>
<app-select-existing-datasource
*ngIf="(currentStep === 0) && (currentMode !== null) && !loadingMessage"
#datasourcesByCountry
[mode]="currentMode"
(emitRepoId)="getRepoId($event)"
(promptNext)="goToStep2($event)">
</app-select-existing-datasource>
</section>
<!-- second section -->
@ -86,9 +86,9 @@
class="body step-1 {{ (currentStep == 1) ? 'current' : '' }}" data-step="1" aria-hidden="true">
<datasource-update-form *ngIf="(currentStep === 1) && (repo !== null) && !loadingMessage"
#registerDatasource
[selectedRepo]="repo"
(emittedInfo)="getUpdatedRepo($event)"></datasource-update-form>
#registerDatasource [selectedRepo]="repo" [mode]="currentMode"
(emittedInfo)="getUpdatedRepo($event)">
</datasource-update-form>
</section>
<!-- third section -->
@ -102,7 +102,7 @@
<div>
<div class="md-card" style="height: 100%">
<app-repository-interface-form #interfacesArray
[data]="inter"
[data]="inter" [mode]="currentMode"
(emitDeleteInterface)="removeInterfaceFromList($event)">
</app-repository-interface-form>
</div>
@ -131,28 +131,24 @@
</section>
<!-- fourth section -->
<h3 id="wizard_advanced-h-3" tabindex="-1" class="title {{ (currentStep == 3) ? 'current' : '' }}">Finish</h3>
<!-- ToU: replace line above with line below -->
<!--<h3 id="wizard_advanced-h-3" tabindex="-1" class="title {{ (currentStep == 3) ? 'current' : '' }}">Terms of Use</h3>-->
<h3 id="wizard_advanced-h-3" tabindex="-1" class="title {{ (currentStep == 3) ? 'current' : '' }}">Terms of Use</h3>
<section id="wizard_advanced-p-3" role="tabpanel" aria-labelledby="wizard_advanced-h-3"
class="body step-3 {{ (currentStep == 3) ? 'current' : '' }}" data-step="2" aria-hidden="true">
<div *ngIf="(currentStep === 3) && !loadingMessage" class="row openAIRECompliantLogoDownload">
<!-- ToU: replace above 3 lines (starting at class="body step-3) with commented section below -->
<!--class="body step-3 {{ (currentStep == 3) ? 'current' : '' }}" data-step="3" aria-hidden="true">
class="body step-3 {{ (currentStep == 3) ? 'current' : '' }}" data-step="3" aria-hidden="true">
<div *ngIf="(currentStep === 3) && !loadingMessage" class="uk-grid uk-grid-match">
<datasource-update-terms-form #updateTermsForm
[selectedRepo]="repo"
[showButton]=false></datasource-update-terms-form>
[showButton]=false
(emittedInfo)="getTerms($event)">
</datasource-update-terms-form>
</div>
</section>
&lt;!&ndash; fifth section &ndash;&gt;
<!-- fifth section -->
<h3 id="wizard_advanced-h-4" tabindex="-1" class="title {{ (currentStep == 4) ? 'current' : '' }}">Finish</h3>
<section id="wizard_advanced-p-4" role="tabpanel" aria-labelledby="wizard_advanced-h-4"
class="body step-4 {{ (currentStep == 4) ? 'current' : '' }}" data-step="3" aria-hidden="true">
<div *ngIf="(currentStep === 4) && !loadingMessage" class="row openAIRECompliantLogoDownload">-->
<div *ngIf="(currentStep === 4) && !loadingMessage" class="row openAIRECompliantLogoDownload">
<div class="col-lg-12">
<div class="col-md-12">
<div>
@ -160,8 +156,9 @@
<h2 class="openAIRECompliantLogoMessage">
We successfully received the request to register/update your repository with/on OpenAIRE.
It usually takes about 6 weeks to check your metadata and index it.
For questions, please create a <a href="https://www.openaire.eu/support/helpdesk" target="_blank">helpdesk ticket</a>
or write to <a href="mailto:helpdesk@openaire.eu">helpdesk@openaire.eu</a>.
For questions, please create a ticket
<!-- <a href="https://www.openaire.eu/support/helpdesk" target="_blank">helpdesk ticket</a>-->
writing to <a href="mailto:helpdesk@openaire.eu">helpdesk@openaire.eu</a>.
</h2>
</div>
</div>
@ -172,21 +169,8 @@
</section>
</div>
<div *ngIf="currentStep != 3" class="actions clearfix">
<ul role="menu" aria-label="Pagination">
<li class="button_previous {{ (currentStep < 1) ? 'disabled' : '' }}" aria-disabled="true">
<a (click)="moveBackAStep()" role="menuitem"><i class="material-icons"></i> Previous</a>
</li>
<li *ngIf="currentStep < 2" class="button_next" aria-hidden="false" aria-disabled="false">
<a (click)="moveAStep()" role="menuitem">Next<i class="material-icons"></i></a>
</li>
<li *ngIf="currentStep == 2" class="button_finish" aria-hidden="true">
<a (click)="moveAStep()" role="menuitem">Finish</a>
</li>
</ul>
</div>
<!-- ToU: replace above <div> with commented section below -->
<!--<div *ngIf="currentStep != 4" class="actions clearfix">
<div *ngIf="currentStep != 4" class="actions clearfix">
<ul role="menu" aria-label="Pagination">
<li class="button_previous {{ (currentStep < 1) ? 'disabled' : '' }}" aria-disabled="true">
<a (click)="moveBackAStep()" role="menuitem"><i class="material-icons"></i> Previous</a>
@ -198,7 +182,7 @@
<a (click)="moveAStep()" role="menuitem">Finish</a>
</li>
</ul>
</div>-->
</div>
</div>
</form>
</div>
@ -219,4 +203,3 @@
</div>
</div>

View File

@ -19,6 +19,7 @@ import {
} from '../../../domain/shared-messages';
import { DatasourceUpdateFormComponent } from '../../../shared/reusablecomponents/sources-forms/datasource-update-form.component';
import { RegisterDatasourceSelectExistingComponent } from './register-datasource-select-existing.component';
import {DatasourceUpdateTermsFormComponent} from '../../../shared/reusablecomponents/sources-forms/datasource-update-terms-form.component';
@Component({
selector: 'app-register-existing-datasource',
@ -63,13 +64,14 @@ export class RegisterExistingDatasourceComponent implements OnInit {
@ViewChildren('interfacesArray') interfacesArray: QueryList<DatasourceNewInterfaceFormComponent>;
dataForInterfaceComp: any[] = [];
@ViewChild('updateTermsForm')
updateTermsForm: DatasourceUpdateTermsFormComponent;
constructor(private fb: FormBuilder,
private route: ActivatedRoute,
private router: Router,
private repoService: RepositoryService) {}
// @ViewChild('updateTermsForm')
ngOnInit() {
if (this.datasourceType && this.currentMode) {
// will execute getStep() every time there is a change in query params
@ -98,17 +100,14 @@ export class RegisterExistingDatasourceComponent implements OnInit {
} else {
this.currentStep = 2;
}
} else if (stepName === 'finish') {
this.currentStep = 3;
// ToU: to enable ToU delete the 2 lines above and uncomment the section below
/*} else if (stepName === 'termsOfUse') {
} else if (stepName === 'termsOfUse') {
if (!this.interfacesArray) {
this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=selectDatasource`);
} else {
this.currentStep = 3;
}
} else if (stepName === 'finish') {
this.currentStep = 4;*/
this.currentStep = 4;
}
}
this.rightHelperContent.ngOnInit();
@ -135,9 +134,7 @@ export class RegisterExistingDatasourceComponent implements OnInit {
window.scrollTo(1, 1);
} else {
if (this.repoInterfaces.length > 0) {
this.registerRepository();
// ToU: replace above line with the comment below
// this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=termsOfUse`);
this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=termsOfUse`);
} else {
this.errorMessage = noInterfacesSaved;
window.scrollTo(1, 1);
@ -145,9 +142,8 @@ export class RegisterExistingDatasourceComponent implements OnInit {
}
}
);
// ToU: uncomment these lines
// } else if (this.currentStep === 3) {
// this.registerRepository();
} else if (this.currentStep === 3) {
this.registerRepository();
}
}
@ -162,19 +158,15 @@ export class RegisterExistingDatasourceComponent implements OnInit {
of(this.getInterfaces()).subscribe(
() => this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=basicInformation`)
);
// ToU: uncomment these lines
// } else if (this.currentStep === 3) {
// this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=interfaces`);
} else if (this.currentStep === 3) {
this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=interfaces`);
}
}
addInterfaceToList(intrf?: RepositoryInterface) {
console.log('clicked add interface to list');
const curIndex = this.dataForInterfaceComp.length;
const curRepoInfo = { id: this.repo.id, datasourceType: this.repo.datasourceType,
datasourceClass: this.repo.datasourceClass, registeredBy: this.repo.registeredBy };
const curRepoInfo = { id: this.repo.id, datasourceType: this.repo.eoscDatasourceType,
datasourceClass: this.repo.eoscDatasourceType, registeredBy: this.repo.registeredby };
if (intrf) {
this.dataForInterfaceComp.push([true, curIndex, curRepoInfo, intrf]);
} else {
@ -190,7 +182,7 @@ export class RegisterExistingDatasourceComponent implements OnInit {
}
tempArray.splice(i, 1);
this.dataForInterfaceComp = tempArray;
console.log(JSON.stringify(this.dataForInterfaceComp));
// console.log(JSON.stringify(this.dataForInterfaceComp));
}
getInterfaces() {
@ -215,10 +207,10 @@ export class RegisterExistingDatasourceComponent implements OnInit {
} else {
this.repoInterfaces.push(repo_interface);
}
console.log(JSON.stringify(repo_interface));
// console.log(JSON.stringify(repo_interface));
}
}
console.log('new interfaces is ', this.repoInterfaces);
// console.log('new interfaces is ', this.repoInterfaces);
return invalidFormsCount;
}
@ -229,9 +221,9 @@ export class RegisterExistingDatasourceComponent implements OnInit {
this.dataForInterfaceComp.push([
true, i,
{ id: this.repo.id,
datasourceType: this.repo.datasourceType,
datasourceClass: this.repo.datasourceClass,
registeredBy: this.repo.registeredBy
datasourceType: this.repo.eoscDatasourceType,
datasourceClass: this.repo.eoscDatasourceType,
registeredBy: this.repo.registeredby
},
this.repoInterfaces[i]
]);
@ -240,9 +232,9 @@ export class RegisterExistingDatasourceComponent implements OnInit {
this.dataForInterfaceComp.push([
true, 0,
{ id: this.repo.id,
datasourceType: this.repo.datasourceType,
datasourceClass: this.repo.datasourceClass,
registeredBy: this.repo.registeredBy
datasourceType: this.repo.eoscDatasourceType,
datasourceClass: this.repo.eoscDatasourceType,
registeredBy: this.repo.registeredby
}
]);
}
@ -279,6 +271,7 @@ export class RegisterExistingDatasourceComponent implements OnInit {
}
getUpdatedRepo(repo: Repository) {
console.log('getUpdatedRepo(repo: Repository)');
this.repo = repo;
if (this.repoInterfaces.length === 0) {
this.getRepoInterfaces();
@ -303,7 +296,7 @@ export class RegisterExistingDatasourceComponent implements OnInit {
return 0;
}
});
console.log(`the number of interfaces is ${this.repoInterfaces.length}`);
// console.log(`the number of interfaces is ${this.repoInterfaces.length}`);
},
error => {
console.log(error);
@ -320,17 +313,24 @@ export class RegisterExistingDatasourceComponent implements OnInit {
);
}
// recheck if needed
getTerms(repo: Repository) {
this.repo = repo;
}
downloadLogo() {
window.open('../../../../assets/imgs/3_0ValidatedLogo.png', '_blank', 'enabledstatus=0,toolbar=0,menubar=0,location=0');
}
registerRepository() {
console.log('in registerRepository, step ===', this.currentStep);
if (this.repo) {
this.loadingMessage = 'Saving changes';
this.errorMessage = '';
this.repoService.addRepository( this.repo.datasourceType, this.repo).subscribe(
console.log('reg this.repo', this.repo);
this.repoService.addRepository( this.repo.eoscDatasourceType, this.repo).subscribe( // this.repo.collectedfrom
response => {
console.log(`addRepository responded: ${response.id}, ${response.registeredBy}`);
console.log(`addRepository responded: ${response.id}, ${response.registeredby}`);
this.repo = response;
},
error => {
@ -341,7 +341,6 @@ export class RegisterExistingDatasourceComponent implements OnInit {
},
() => {
this.saveNewInterfaces();
// TODO: update terms when backend is ready, maybe POST with updateRepository
}
);
}
@ -354,15 +353,17 @@ export class RegisterExistingDatasourceComponent implements OnInit {
if (intrf.id) {
let req;
if (this.interfacesToDelete.some(id => id === intrf.id)) {
req = this.repoService.deleteInterface(intrf.id, this.repo.registeredBy);
req = this.repoService.deleteInterface(intrf.id, this.repo.registeredby);
} else {
// console.log('comments', intrf.comments);
req = this.repoService.updateInterface(this.repo.id, this.repo.registeredBy, intrf.comments, intrf);
req = this.repoService.updateInterface(this.repo.id, this.repo.registeredby,
intrf.comments, intrf, intrf.desiredCompatibilityLevel);
}
return req;
} else {
// console.log('comments', intrf.comments);
return this.repoService.addInterface(this.repo.datasourceType, this.repo.id, this.repo.registeredBy, intrf.comments, intrf);
return this.repoService.addInterface(this.repo.eoscDatasourceType, this.repo.id, this.repo.registeredby,
intrf.comments, intrf, intrf.desiredCompatibilityLevel);
}
})
).subscribe(

View File

@ -23,28 +23,27 @@
<div class="steps clearfix">
<ul role="tablist">
<li role="tab" class="first {{ (currentStep == 1) ? 'current' : '' }}" aria-disabled="false" aria-selected="true">
<a id="wizard_advanced-t-0" href="#wizard_advanced-h-0" aria-controls="wizard_advanced-p-0">
<a id="wizard_advanced-t-0" aria-controls="wizard_advanced-p-0" style="cursor: default">
<!--<span class="current-info audible">current step: </span>-->
<span class="number">1</span>
<span class="title">Register data source</span>
</a>
</li>
<li role="tab" class="{{ (currentStep < 2) ? 'disabled' : '' }} {{ (currentStep == 2) ? 'current' : '' }}" aria-disabled="true">
<a id="wizard_advanced-t-1" href="#wizard_advanced-h-1" aria-controls="wizard_advanced-p-1">
<a id="wizard_advanced-t-1" aria-controls="wizard_advanced-p-1" style="cursor: default">
<span class="number">2</span>
<span class="title">Register interface</span>
</a>
</li>
<li role="tab" class=" {{ (currentStep < 3) ? 'disabled' : '' }} {{ (currentStep == 3) ? 'current' : '' }}" aria-disabled="true">
<a id="wizard_advanced-t-2" href="#wizard_advanced-h-2" aria-controls="wizard_advanced-p-2">
<a id="wizard_advanced-t-2" aria-controls="wizard_advanced-p-2" style="cursor: default">
<span class="number">3</span>
<!-- ToU: uncomment this section -->
<!--<span class="title">Terms of Use</span>
<span class="title">Terms of Use</span>
</a>
</li>
<li role="tab" class=" {{ (currentStep < 4) ? 'disabled' : '' }} {{ (currentStep == 4) ? 'current' : '' }}" aria-disabled="true">
<a id="wizard_advanced-t-3" href="#wizard_advanced-h-3" aria-controls="wizard_advanced-p-2">
<span class="number">4</span>-->
<a id="wizard_advanced-t-3" aria-controls="wizard_advanced-p-2" style="cursor: default">
<span class="number">4</span>
<span class="title">Finish</span>
</a>
</li>
@ -92,7 +91,7 @@
<div>
<div class="md-card" style="height: 100%">
<app-repository-interface-form #interfacesArray
[data]="inter"
[data]="inter" [mode]=""
(emitDeleteInterface)="removeInterfaceFromList($event)">
</app-repository-interface-form>
</div>
@ -122,34 +121,32 @@
</section>
<!-- third section -->
<h3 id="wizard_advanced-h-2" tabindex="-1" class="title {{ (currentStep == 3) ? 'current' : '' }}">Finish</h3>
<!-- ToU: replace line above with line below -->
<!-- <h3 id="wizard_advanced-h-2" tabindex="-1" class="title {{ (currentStep == 3) ? 'current' : '' }}">Terms of Use</h3>-->
<h3 id="wizard_advanced-h-2" tabindex="-1" class="title {{ (currentStep == 3) ? 'current' : '' }}">Terms of Use</h3>
<section id="wizard_advanced-p-2" role="tabpanel" aria-labelledby="wizard_advanced-h-2"
class="body step-2 {{ (currentStep == 3) ? 'current' : '' }}" data-step="2" aria-hidden="true">
<div *ngIf="(currentStep === 3) && !loadingMessage" class="row openAIRECompliantLogoDownload">
<!-- ToU: delete line above and uncomment section below -->
<!--<div *ngIf="(currentStep === 3) && !loadingMessage" class="uk-grid">
<div *ngIf="(currentStep === 3) && !loadingMessage" class="uk-grid">
<datasource-update-terms-form #updateTermsForm
[selectedRepo]="repo"
[showButton]=false></datasource-update-terms-form>
[showButton]=false
(emittedInfo)="getTerms($event)"></datasource-update-terms-form>
</div>
</section>
&lt;!&ndash; fourth section &ndash;&gt;
<!-- fourth section -->
<h3 id="wizard_advanced-h-3" tabindex="-1" class="title {{ (currentStep == 4) ? 'current' : '' }}">Finish</h3>
<section id="wizard_advanced-p-3" role="tabpanel" aria-labelledby="wizard_advanced-h-3"
class="body step-3 {{ (currentStep == 4) ? 'current' : '' }}" data-step="3" aria-hidden="true">
<div *ngIf="(currentStep === 4) && !loadingMessage" class="row openAIRECompliantLogoDownload">-->
<div *ngIf="(currentStep === 4) && !loadingMessage" class="row openAIRECompliantLogoDownload">
<div class="col-lg-12">
<div class="col-md-12">
<div>
<div class="openAIRECompliantLogo">
<h2 class="openAIRECompliantLogoMessage">
We successfully received the request to register/update your repository with/on OpenAIRE.
We successfully received the request to register/update your data source with/on OpenAIRE.
It usually takes about 6 weeks to check your metadata and index it.
For questions, please create a <a href="https://www.openaire.eu/support/helpdesk" target="_blank">helpdesk ticket</a>
or write to <a href="mailto:helpdesk@openaire.eu">helpdesk@openaire.eu</a>.
For questions, please create a ticket
<!-- <a href="https://www.openaire.eu/support/helpdesk" target="_blank">helpdesk ticket</a>-->
writing to <a href="mailto:helpdesk@openaire.eu">helpdesk@openaire.eu</a>.
<!--Congratulations! Your repository was successfully registered in OpenAIRE. You can download this logo to use in your site.-->
</h2>
<!--<img src="../../../../assets/imgs/3_0ValidatedLogo.png" alt="OpenAireCompliant">-->
@ -165,21 +162,8 @@
</section>
</div>
<div *ngIf="currentStep != 3" class="actions clearfix">
<ul role="menu" aria-label="Pagination">
<li class="button_previous {{ (currentStep < 1) ? 'disabled' : '' }}" aria-disabled="true">
<a (click)="moveBackAStep()" role="menuitem"><i class="material-icons"></i> Previous</a>
</li>
<li *ngIf="currentStep < 2" class="button_next" aria-hidden="false" aria-disabled="false">
<a (click)="moveAStep()" role="menuitem">Next<i class="material-icons"></i></a>
</li>
<li *ngIf="currentStep == 2" class="button_finish" aria-hidden="true">
<a (click)="moveAStep()" role="menuitem">Finish</a>
</li>
</ul>
</div>
<!-- ToU: replace above <div> with commented section below -->
<!--<div *ngIf="currentStep != 4" class="actions clearfix">
<div *ngIf="currentStep != 4" class="actions clearfix">
<ul role="menu" aria-label="Pagination">
<li class="button_previous {{ (currentStep <= 1) ? 'disabled' : '' }}" aria-disabled="true">
<a (click)="moveBackAStep()" role="menuitem"><i class="material-icons"></i> Previous</a>
@ -191,7 +175,7 @@
<a (click)="moveAStep()" role="menuitem">Finish</a>
</li>
</ul>
</div>-->
</div>
</div>
</form>
</div>

View File

@ -9,11 +9,13 @@ import { DatasourceNewInterfaceFormComponent } from '../../../shared/reusablecom
import { from, of } from 'rxjs';
import { concatMap } from 'rxjs/operators';
import { errorsInInterfaces, formErrorRegisterRepo, noInterfacesSaved } from '../../../domain/shared-messages';
import {DatasourceUpdateTermsFormComponent} from '../../../shared/reusablecomponents/sources-forms/datasource-update-terms-form.component';
@Component({
selector: 'app-register-new-datasource',
templateUrl: './register-new-datasource.component.html'
})
export class RegisterNewDatasourceComponent implements OnInit {
loadingMessage: string;
errorMessage: string;
@ -48,13 +50,14 @@ export class RegisterNewDatasourceComponent implements OnInit {
@ViewChildren('interfacesArray') interfacesArray: QueryList<DatasourceNewInterfaceFormComponent>;
dataForInterfaceComp: any[] = [];
@ViewChild('updateTermsForm')
updateTermsForm: DatasourceUpdateTermsFormComponent;
constructor(private fb: FormBuilder,
private route: ActivatedRoute,
private router: Router,
private repoService: RepositoryService) {}
// @ViewChild('updateTermsForm')
ngOnInit() {
if (this.datasourceType) {
@ -80,17 +83,14 @@ export class RegisterNewDatasourceComponent implements OnInit {
} else {
this.currentStep = 2;
}
} else if (stepName === 'finish') {
this.currentStep = 3;
// ToU: to enable ToU delete the 2 lines above and uncomment the section below
/*} else if (stepName === 'termsOfUse') {
} else if (stepName === 'termsOfUse') {
if (this.interfacesArray && this.interfacesArray.length === 0) {
this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=basicInformation`);
} else {
this.currentStep = 3;
}
} else if (stepName === 'finish') {
this.currentStep = 4;*/
this.currentStep = 4;
}
}
this.rightHelperContent.ngOnInit();
@ -111,9 +111,7 @@ export class RegisterNewDatasourceComponent implements OnInit {
window.scrollTo(1, 1);
} else {
if (this.repoInterfaces.length > 0) {
this.addRepository();
// ToU: replace above line with the comment below
// this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=termsOfUse`);
this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=termsOfUse`);
} else {
this.errorMessage = noInterfacesSaved;
window.scrollTo(1, 1);
@ -121,9 +119,8 @@ export class RegisterNewDatasourceComponent implements OnInit {
}
}
);
// ToU: uncomment these lines
// } else if ( this.currentStep === 3 ) {
// this.addRepository();
} else if ( this.currentStep === 3 ) {
this.addRepository();
}
}
@ -133,16 +130,15 @@ export class RegisterNewDatasourceComponent implements OnInit {
of(this.getInterfaces()).subscribe(
() => this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=basicInformation`)
);
// ToU: uncomment these lines
// } else if (this.currentStep === 3) {
// this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=interfaces`);
} else if (this.currentStep === 3) {
this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=interfaces`);
}
}
addInterfaceToList(intrf?: RepositoryInterface) {
const curIndex = this.dataForInterfaceComp.length;
const curRepoInfo = { id: this.repo.id, datasourceType: this.repo.datasourceType,
datasourceClass: this.repo.datasourceClass, registeredBy: this.repo.registeredBy };
const curRepoInfo = { id: this.repo.id, datasourceType: this.repo.eoscDatasourceType,
datasourceClass: this.repo.eoscDatasourceType, registeredBy: this.repo.registeredby };
if (intrf) {
this.dataForInterfaceComp.push([true, curIndex, curRepoInfo, intrf]);
} else {
@ -184,9 +180,9 @@ export class RegisterNewDatasourceComponent implements OnInit {
this.dataForInterfaceComp.push([
true, i,
{ id: this.repo.id,
datasourceType: this.repo.datasourceType,
datasourceClass: this.repo.datasourceClass,
registeredBy: this.repo.registeredBy
datasourceType: this.repo.eoscDatasourceType,
datasourceClass: this.repo.eoscDatasourceType,
registeredBy: this.repo.registeredby
},
this.repoInterfaces[i]
]);
@ -195,9 +191,9 @@ export class RegisterNewDatasourceComponent implements OnInit {
this.dataForInterfaceComp.push([
true, 0,
{ id: this.repo.id,
datasourceType: this.repo.datasourceType,
datasourceClass: this.repo.datasourceClass,
registeredBy: this.repo.registeredBy
datasourceType: this.repo.eoscDatasourceType,
datasourceClass: this.repo.eoscDatasourceType,
registeredBy: this.repo.registeredby
}
]);
}
@ -210,17 +206,26 @@ export class RegisterNewDatasourceComponent implements OnInit {
);
}
// recheck if needed
getTerms(repo: Repository) {
console.log('this.repo', this.repo.consentTermsOfUse, this.repo.fullTextDownload);
console.log('repo', repo.consentTermsOfUse, repo.fullTextDownload);
this.repo = repo;
}
downloadLogo() {
window.open('../../../../assets/imgs/3_0ValidatedLogo.png', '_blank', 'enabledstatus=0,toolbar=0,menubar=0,location=0');
}
addRepository() {
console.log('in addRepository, step ===', this.currentStep);
if (this.repo) {
this.loadingMessage = 'Saving changes';
this.errorMessage = '';
this.repoService.addRepository(this.repo.datasourceType, this.repo).subscribe(
console.log('add this.repo', this.repo);
this.repoService.addRepository(this.repo.eoscDatasourceType, this.repo).subscribe(
response => {
console.log(`addRepository responded: ${response.id}, ${response.registeredBy}`);
console.log(`addRepository responded: ${response.id}, ${response.registeredby}`);
this.repo = response;
},
error => {
@ -230,7 +235,6 @@ export class RegisterNewDatasourceComponent implements OnInit {
},
() => {
this.saveNewInterfaces();
// TODO: update terms when backend is ready, maybe POST with updateRepository
}
);
}
@ -242,10 +246,12 @@ export class RegisterNewDatasourceComponent implements OnInit {
concatMap(intrf => {
if (intrf.id) {
// console.log('comments', intrf.comments);
return this.repoService.updateInterface(this.repo.id, this.repo.registeredBy, intrf.comments, intrf);
return this.repoService.updateInterface(this.repo.id, this.repo.registeredby, intrf.comments, intrf,
intrf.desiredCompatibilityLevel);
} else {
// console.log('comments', intrf.comments);
return this.repoService.addInterface(this.repo.datasourceType, this.repo.id, this.repo.registeredBy, intrf.comments, intrf);
return this.repoService.addInterface(this.repo.eoscDatasourceType, this.repo.id, this.repo.registeredby,
intrf.comments, intrf, intrf.desiredCompatibilityLevel);
}
})
).subscribe(

View File

@ -1,20 +1,19 @@
/*
* created by myrto on 12/12/2017
* updated by myrto on 19/12/2018
*/
import { Component, OnInit } from '@angular/core';
import { RegisterExistingDatasourceComponent } from './register-existing-datasource.component';
@Component ({
selector: 'app-sr-data',
selector: 'app-sr-cris',
templateUrl: './register-existing-datasource.component.html'
})
export class SrDataComponent extends RegisterExistingDatasourceComponent implements OnInit {
export class SrCrisComponent extends RegisterExistingDatasourceComponent implements OnInit {
ngOnInit() {
this.datasourceType = 'data';
this.currentMode = 're3data';
this.datasourceType = 'cris';
this.currentMode = 'cris';
super.ngOnInit();
}

View File

@ -1,19 +1,19 @@
/*
* updated by myrto on 19/12/2018
* created by andreas on 4/7/2022
*/
import { Component, OnInit } from '@angular/core';
import { RegisterExistingDatasourceComponent } from './register-existing-datasource.component';
@Component ({
selector: 'app-sr-literature',
selector: 'app-sr-repository',
templateUrl: './register-existing-datasource.component.html'
})
export class SrLiteratureComponent extends RegisterExistingDatasourceComponent implements OnInit {
export class SrRepositoryComponent extends RegisterExistingDatasourceComponent implements OnInit {
ngOnInit() {
this.datasourceType = 'literature';
this.currentMode = 'opendoar';
this.datasourceType = 'repository';
this.currentMode = 'repository';
super.ngOnInit();
}

View File

@ -4,17 +4,17 @@ import { SourcesComponent } from './sources.component';
import { SourcesRegisterComponent } from './sources-register.component';
import { CommonModule } from '@angular/common';
import { TabsModule } from 'ngx-bootstrap';
import { SrLiteratureComponent } from './sources-register/sr-literature.component';
import { ReusableComponentsModule } from '../../shared/reusablecomponents/reusable-components.module';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { RepoFilter } from './sourcesPipes';
import { SrDataComponent } from './sources-register/sr-data.component';
import { RegisterDatasourceSelectExistingComponent } from './sources-register/register-datasource-select-existing.component';
import { SrJournalComponent } from './sources-register/sr-journal.component';
import { SrAggregatorComponent } from './sources-register/sr-aggregator.component';
import { RegisterNewDatasourceComponent } from './sources-register/register-new-datasource.component';
import { RegisterExistingDatasourceComponent } from './sources-register/register-existing-datasource.component';
import { DatasourceUpdateTermsFormComponent } from '../../shared/reusablecomponents/sources-forms/datasource-update-terms-form.component';
import {SrCrisComponent} from './sources-register/sr-cris.component';
import {SrRepositoryComponent} from './sources-register/sr-repository.component';
@NgModule ({
imports: [
@ -33,10 +33,10 @@ import { DatasourceUpdateTermsFormComponent } from '../../shared/reusablecompone
SourcesRegisterComponent,
RegisterNewDatasourceComponent,
RegisterExistingDatasourceComponent,
SrLiteratureComponent,
SrDataComponent,
SrRepositoryComponent,
SrJournalComponent,
SrAggregatorComponent,
SrCrisComponent,
RegisterDatasourceSelectExistingComponent,
DatasourceUpdateTermsFormComponent,
RepoFilter // a pipe that searches for string in repository name

View File

@ -1,10 +1,10 @@
import { RouterModule, Routes } from '@angular/router';
import { NgModule } from '@angular/core';
import { SourcesRegisterComponent } from './sources-register.component';
import { SrLiteratureComponent } from './sources-register/sr-literature.component';
import { SrDataComponent } from './sources-register/sr-data.component';
import { SrJournalComponent } from './sources-register/sr-journal.component';
import { SrAggregatorComponent } from './sources-register/sr-aggregator.component';
import {SrCrisComponent} from './sources-register/sr-cris.component';
import {SrRepositoryComponent} from './sources-register/sr-repository.component';
const sourcesRoutes: Routes = [
{
@ -19,12 +19,8 @@ const sourcesRoutes: Routes = [
component: SourcesRegisterComponent
},
{
path: 'literature',
component: SrLiteratureComponent
},
{
path: 'data',
component: SrDataComponent
path: 'repository',
component: SrRepositoryComponent
},
{
path: 'journal',
@ -33,30 +29,14 @@ const sourcesRoutes: Routes = [
{
path: 'aggregator',
component: SrAggregatorComponent
},
{
path: 'cris',
component: SrCrisComponent
}
]
},
]
// path: '',
// component: SourcesRegisterComponent,
// children: [
// {
// path: 'literature',
// component: SrLiteratureComponent
// },
// {
// path: 'data',
// component: SrDataComponent
// },
// {
// path: 'journal',
// component: SrJournalComponent
// },
// {
// path: 'aggregator',
// component: SrAggregatorComponent
// }
// ]
}
];

View File

@ -10,19 +10,19 @@ export class AuthGuardService implements CanActivate, CanLoad {
constructor (private authenticationService: AuthenticationService, private router: Router) {}
canActivate (route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
if ( this.authenticationService.getIsUserLoggedIn() ) { return true; }
if ( (getCookie('openAIREUser') !== null) &&
(getCookie('openAIREUser') !== '') &&
this.authenticationService.getIsUserLoggedIn() ) { return true; }
if ( (getCookie('openAIREUser') !== null) && (getCookie('openAIREUser') !== '') ) { return true; }
/* If no cookie was found, clear the app's session.
The user may have logged out using another OpenAIRE portal */
sessionStorage.clear();
// Store the attempted URL for redirecting
sessionStorage.setItem('state.location', state.url);
if (state.url !== '/join') {
/* If no cookie was found, clear the app's session.
The user may have logged out using another OpenAIRE portal */
sessionStorage.clear();
this.authenticationService.redirectUrl = state.url;
sessionStorage.setItem('state.location', state.url);
}
console.log('redirect state: ' + sessionStorage.getItem('state.location'));
// If we decide that in this case we will send the user back to the aai
// this.authenticationService.redirectUrl = state.url;

View File

@ -1,14 +1,14 @@
import { Injectable } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Router } from '@angular/router';
import { HttpClient } from '@angular/common/http';
import { environment } from '../../environments/environment';
import { deleteCookie, getCookie } from '../domain/utils';
import { BehaviorSubject } from 'rxjs';
@Injectable()
export class AuthenticationService {
constructor(private route: ActivatedRoute,
private router: Router,
constructor(private router: Router,
private http: HttpClient) {}
private apiUrl: string = environment.API_ENDPOINT;
@ -17,16 +17,19 @@ export class AuthenticationService {
// store the URL so we can redirect after logging in
public redirectUrl: string;
private _storage: Storage = sessionStorage;
private cookie: string = null;
isLoggedIn: boolean = false;
public isLoggedIn_ = new BehaviorSubject(false);
public get isLoggedIn() {
return this.isLoggedIn_;
}
public loginWithState() {
console.log(`logging in with state. Current url is: ${this.router.url}`);
if (this.redirectUrl) {
const url = this.redirectUrl;
this.redirectUrl = null;
console.log('stored location', url);
sessionStorage.setItem('state.location', url);
} else {
/*sessionStorage.setItem("state.location", this.router.url);*/
@ -37,35 +40,35 @@ export class AuthenticationService {
}
public logout() {
deleteCookie('openAIREUser');
deleteCookie('AccessToken');
sessionStorage.clear();
this.isLoggedIn = false;
this.isLoggedIn_.next(false);
console.log('logging out, calling:');
console.log(`${this.apiUrl}/openid_logout`);
/*window.location.href = `${this.apiUrl}/openid_logout`;*/
window.location.href = `https://aai.openaire.eu/proxy/saml2/idp/SingleLogoutService.php?ReturnTo=${this.apiUrl}/openid_logout`;
window.location.href = `${environment.AAI_LOGOUT + window.location.origin + this.apiUrl}/openid_logout`;
}
public tryLogin() {
if ( getCookie('openAIREUser') && (getCookie('openAIREUser') !== '') ) {
console.log(`I got the cookie!`);
console.log(`in tryLogin -> document.cookie is: ${document.cookie.toString()}`);
this.cookie = getCookie('AccessToken');
if (this.cookie && this.cookie !== '') {
// console.log(`I got the cookie!`);
// console.log(`in tryLogin -> document.cookie is: ${document.cookie.toString()}`);
/* SETTING INTERVAL TO REFRESH SESSION TIMEOUT COUNTDOWN */
setInterval(() => {
this.http.get(this.apiUrl + '/user/login', { withCredentials: true }).subscribe(
userInfo => {
console.log('User is still logged in');
console.log(userInfo);
this.isLoggedIn = true;
// console.log('User is still logged in');
// console.log(userInfo);
this.isLoggedIn_.next(true);
},
() => {
this.logout();
},
() => {
if ( !getCookie('openAIREUser') || (getCookie('openAIREUser') === '') ) {
this.cookie = getCookie('AccessToken');
if ( !this.cookie || this.cookie === '') {
this.logout();
}
}
@ -75,24 +78,24 @@ export class AuthenticationService {
}, 1000 * 60 * 5);
if (!this.getIsUserLoggedIn()) {
console.log(`session.name wasn't found --> logging in via repo-service!`);
// console.log(`session.name wasn't found --> logging in via repo-service!`);
this.http.get(this.apiUrl + '/user/login', { withCredentials: true }).subscribe(
userInfo => {
console.log(userInfo);
// console.log(userInfo);
sessionStorage.setItem('name', userInfo['name']);
sessionStorage.setItem('email', userInfo['email'].trim());
sessionStorage.setItem('role', userInfo['role']);
this.isLoggedIn = true;
console.log(`the current user is: ${sessionStorage.getItem('name')},
${sessionStorage.getItem('email')}, ${sessionStorage.getItem('role')}`);
this.isLoggedIn_.next(true);
// console.log(`the current user is: ${sessionStorage.getItem('name')},
// ${sessionStorage.getItem('email')}, ${sessionStorage.getItem('role')}`);
},
error => {
sessionStorage.clear();
console.log('Error!');
console.log(error);
deleteCookie('openAIREUser');
deleteCookie('AccessToken');
this.isLoggedIn = false;
deleteCookie('AccessToken');
this.isLoggedIn_.next(false);
this.router.navigate(['/home']);
},
() => {
@ -101,7 +104,7 @@ export class AuthenticationService {
sessionStorage.removeItem('state.location');
console.log(`tried to login - returning to state: ${state}`);
if ( !this.getIsUserLoggedIn() ) {
console.log('user hasn\'t logged in yet -- going to home');
// console.log('user hasn't logged in yet -- redirecting to home');
this.router.navigate(['/home']);
} else {
this.router.navigate([state]);
@ -110,26 +113,26 @@ export class AuthenticationService {
}
);
} else {
this.isLoggedIn = true;
console.log(`the current user is: ${sessionStorage.getItem('name')},
${sessionStorage.getItem('email')}, ${sessionStorage.getItem('role')}`);
this.isLoggedIn_.next(true);
// console.log(`the current user is: ${sessionStorage.getItem('name')},
// ${sessionStorage.getItem('email')}, ${sessionStorage.getItem('role')}`);
if (this.redirectUrl) {
const url = this.redirectUrl;
this.redirectUrl = null;
this.router.navigate([url]);
console.log('route is', url);
// console.log('route is', url);
}
}
}
}
public getIsUserLoggedIn() {
this.isLoggedIn = (getCookie('openAIREUser') && (getCookie('openAIREUser') !== '') && (sessionStorage.getItem('email') !== null ) );
return this.isLoggedIn;
// todo: probably not all of them are needed
return this.isLoggedIn_.value && this.cookie && this.cookie !== '' && sessionStorage.getItem('email') !== null;
}
public getUserName() {
if (this.isLoggedIn) {
if (this.isLoggedIn_.value) {
return sessionStorage.getItem('name');
} else {
return '';
@ -145,7 +148,7 @@ export class AuthenticationService {
}
public getUserRole() {
if (this.isLoggedIn) {
if (this.isLoggedIn_.value) {
return sessionStorage.getItem('role');
} else {
return '';

View File

@ -30,11 +30,10 @@ export class MonitorService {
getJobsOfUser(params: URLParameter[]): Observable<JobsOfUser> {
let url = `${this.apiUrl}getJobsOfUser`;
for (const param of params) {
if (param.key === 'offset') {
url += `?${param.key}=${param.value[0]}`;
} else {
url += `&${param.key}=${param.value[0]}`;
if ( params.length > 0 ) {
url += `?`
for (const param of params) {
url += `${param.key}=${param.value[0]}&`; // An ending "&" in the url does no cause any issues.
}
}
console.log(`knocking on: ${url}`);

View File

@ -10,7 +10,7 @@ import {
Country, MetricsInfo,
Repository,
RepositoryInterface,
RepositorySnippet, RepositorySummaryInfo,
RepositorySnippet, RepositorySummaryInfo, TermsOfUse,
Timezone,
Typology, User
} from '../domain/typeScriptClasses';
@ -33,24 +33,28 @@ export class RepositoryService {
constructor(private httpClient: HttpClient) { }
addInterface(datatype: string, repoId: string, registeredBy: string, comment: string, newInterface: RepositoryInterface): Observable<RepositoryInterface> {
addInterface(datatype: string, repoId: string, registeredBy: string, comment: string,
newInterface: RepositoryInterface, desiredCompatibilityLevel: string): Observable<RepositoryInterface> {
let url;
comment = newInterface.comments; // temp fix for emailing comment
if (comment == null || comment === '') {
url = `${this.apiUrl}addInterface?datatype=${datatype}&repoId=${repoId}&registeredBy=${registeredBy}`;
url = `${this.apiUrl}addInterface?datatype=${datatype}&repoId=${repoId}&registeredBy=${registeredBy}&desiredCompatibilityLevel=${desiredCompatibilityLevel}`;
} else {
url = `${this.apiUrl}addInterface?datatype=${datatype}&repoId=${repoId}&registeredBy=${registeredBy}&comment=${comment}`;
url = `${this.apiUrl}addInterface?datatype=${datatype}&repoId=${repoId}&registeredBy=${registeredBy}&comment=${comment}&desiredCompatibilityLevel=${desiredCompatibilityLevel}`;
}
console.log(`knocking on: ${url}`);
console.log(`sending ${JSON.stringify(newInterface)}`);
return this.httpClient.post<RepositoryInterface>(url, newInterface, headerOptions);
}
updateInterface(repoId: string, registeredBy: string, comment: string, interfaceInfo: RepositoryInterface): Observable<RepositoryInterface> {
updateInterface(repoId: string, registeredBy: string, comment: string, interfaceInfo: RepositoryInterface,
desiredCompatibilityLevel?: string): Observable<RepositoryInterface> {
let url;
comment = interfaceInfo.comments; // temp fix for emailing comment
if (comment == null || comment === '') {
url = `${this.apiUrl}updateRepositoryInterface?repoId=${repoId}&registeredBy=${registeredBy}`;
url = `${this.apiUrl}updateRepositoryInterface?repoId=${repoId}&registeredBy=${registeredBy}&desiredCompatibilityLevel=${desiredCompatibilityLevel}`;
} else {
url = `${this.apiUrl}updateRepositoryInterface?repoId=${repoId}&registeredBy=${registeredBy}&comment=${comment}`;
url = `${this.apiUrl}updateRepositoryInterface?repoId=${repoId}&registeredBy=${registeredBy}&comment=${comment}&desiredCompatibilityLevel=${desiredCompatibilityLevel}`;
}
console.log(`knocking on: ${url}`);
console.log(`sending ${JSON.stringify(interfaceInfo)}`);
@ -64,6 +68,10 @@ export class RepositoryService {
return this.httpClient.delete(url, {withCredentials: true, responseType: 'text'});
}
getInterfaceDesiredCompatibilityLevel(repoId: string, interfaceId: string) {
return this.httpClient.get(environment.API_ENDPOINT + `/compliance/${repoId}/${interfaceId}`);
}
addRepository(datatype: string, newRepository: Repository): Observable<Repository> {
const url = `${this.apiUrl}addRepository?datatype=${datatype}`;
console.log(`knocking on: ${url}`);
@ -85,6 +93,13 @@ export class RepositoryService {
return this.httpClient.post<Repository>(url, repoInfo, headerOptions);
}
updateRepositoriesTerms(termsList: any): Observable<TermsOfUse> {
const url = `${this.apiUrl}terms`;
console.log(`knocking on: ${url}`);
console.log(`sending ${JSON.stringify(termsList)}`);
return this.httpClient.post<TermsOfUse>(url, termsList, headerOptions);
}
getRepositoriesOfCountry(country: string, mode: string): Observable<RepositorySnippet[]> {
const url = `${this.apiUrl}getRepositoriesByCountry/${country}/${mode}`;
console.log(`knocking on: ${url}`);
@ -97,7 +112,6 @@ export class RepositoryService {
return this.httpClient.get<RepositorySnippet[]>(url, headerOptions);
}
getRepositoryById(id: string): Observable<Repository> {
const url = `${this.apiUrl}getRepositoryById/${id}`;
console.log(`knocking on: ${url}`);
@ -110,7 +124,6 @@ export class RepositoryService {
return this.httpClient.get<RepositoryInterface[]>(url, headerOptions);
}
getUrlsOfUserRepos(): Observable<string[]> {
const url = `${this.apiUrl}getUrlsOfUserRepos/0/100/`;
console.log(`knocking on: ${url}`);
@ -156,7 +169,7 @@ export class RepositoryService {
return this.httpClient.get<Map<string, string>>(url, headerOptions);
}
getDatasourceClasses(mode: string): Observable<Map<string, string>> {
getDatasourceClasses(mode: string): Observable<Object> {
const url = `${this.apiUrl}getDatasourceClasses/${mode}`;
console.log(`knocking on: ${url}`);
return this.httpClient.get<Map<string, string>>(url, headerOptions);

View File

@ -6,6 +6,7 @@ import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { ReportResponseWrapper } from '../domain/usageStatsClasses';
import { environment } from '../../environments/environment';
import {COUNTER_Dataset_Report, COUNTER_Item_Report} from '../domain/sushilite';
const headerOptions = {
headers : new HttpHeaders().set('Content-Type', 'application/json')
@ -15,17 +16,24 @@ const headerOptions = {
@Injectable ()
export class UsagestatsService {
private apiUrl = environment.API_ENDPOINT + '/sushilite/';
private apiUrl = environment.API_ENDPOINT + '';
constructor(private httpClient: HttpClient) { }
getReportResponse(page: String, pageSize: String, params: URLSearchParams): Observable<ReportResponseWrapper> {
const url = `${this.apiUrl}getReportResults/${page}/${pageSize}?${params}`;
console.log(`knocking on: ${url}`);
const url = `${this.apiUrl}/sushilite/getReportResults/${page}/${pageSize}?${params}`;
// console.log(`knocking on: ${url}`);
return this.httpClient.get<ReportResponseWrapper>(url, headerOptions);
}
getR5Response(params: URLSearchParams) {
const url = `${this.apiUrl}/sushiliteR5/getReportResults/?${params}`;
console.log(`knocking on: ${url}`);
return this.httpClient.get<COUNTER_Dataset_Report | COUNTER_Item_Report>(url, headerOptions);
}
}

View File

@ -24,6 +24,7 @@ export class ConfirmationDialogComponent {
@Input() public hideModalButton: string = 'Cancel';
@Output() emitObject: EventEmitter<any> = new EventEmitter();
@Output() clearAll: EventEmitter<any> = new EventEmitter();
private _ids: string[] = [];
@ -37,6 +38,7 @@ export class ConfirmationDialogComponent {
public hideModal(): void {
this.isModalShown = false;
this.clearAll.emit();
// this.autoShownModal.hide();
}

View File

@ -122,14 +122,14 @@ export class MyGroup implements OnInit, AfterContentInit {
<div class="">
<label class="" *ngIf="description?.label !== null && description?.label !== ''"
[ngClass]="{'required' : description.mandatory==true}" title="{{ description.desc }}">
{{ description.label }}
{{ description.label + (description.mandatory ? ' (*)' : '') }}
</label>
<ng-content></ng-content>
<span class="md-input-bar"></span>
</div>
`
})
export class InlineFormWrapper implements OnChanges {
@Input() public description: Description = null;

View File

@ -57,7 +57,7 @@
<form-inline [description]="issnDesc" [valid]="group.get('issn').valid">
<span *ngIf="group.get('issn').invalid && group.get('issn').touched && group.get('issn').dirty"
class="help-block inline uk-text-danger"
style="margin-top: 0px; margin-bottom: 0px; padding-left: 10px;">Issn needs to be of the form: "1111-1111" or "1111-111X"</span>
style="margin-top: 0px; margin-bottom: 0px; padding-left: 10px;">Issn needs to be of the form: "1111-1111" or "1111-111X" or "11111111" or "1111111X"</span>
<input formControlName="issn" class="md-input" type="text"
(focus)="group.get('issn').markAsUntouched()" (blur)="group.get('issn').updateValueAndValidity()">
</form-inline>
@ -71,7 +71,7 @@
<form-inline [description]="eissnDesc" [valid]="group.get('eissn').valid">
<span *ngIf="group.get('eissn').invalid && group.get('eissn').touched && group.get('eissn').dirty"
class="help-block inline uk-text-danger"
style="margin-top: 0px; margin-bottom: 0px; padding-left: 10px;">Eissn needs to be of the form: "1111-1111" or "1111-111X"</span>
style="margin-top: 0px; margin-bottom: 0px; padding-left: 10px;">Eissn needs to be of the form: "1111-1111" or "1111-111X" or "11111111" or "1111111X"</span>
<input formControlName="eissn" class="md-input" type="text"
(focus)="group.get('eissn').markAsUntouched()" (blur)="group.get('eissn').updateValueAndValidity()">
</form-inline>
@ -85,7 +85,7 @@
<form-inline [description]="lissnDesc" [valid]="group.get('lissn').valid">
<span *ngIf="group.get('lissn').invalid && group.get('lissn').touched && group.get('lissn').dirty"
class="help-block inline uk-text-danger"
style="margin-top: 0px; margin-bottom: 0px; padding-left: 10px;">Lissn needs to be of the form: "1111-1111" or "1111-111X"</span>
style="margin-top: 0px; margin-bottom: 0px; padding-left: 10px;">Lissn needs to be of the form: "1111-1111" or "1111-111X" or "11111111" or "1111111X"</span>
<input formControlName="lissn" class="md-input" type="text"
(focus)="group.get('lissn').markAsUntouched()" (blur)="group.get('lissn').updateValueAndValidity()">
</form-inline>
@ -111,7 +111,7 @@
<form-inline [description]="countryDesc" [valid]="group.get('country')">
<select formControlName="country" class="md-input">
<option value="">-- none selected --</option>
<option *ngFor="let country of countries" value="{{country.code}}" title="{{country.name}}">{{ country.name }}</option>
<option *ngFor="let country of countries" value="{{country.code}}">{{ country.name }}</option>
</select>
</form-inline>
</div>
@ -277,7 +277,7 @@
<form-inline [description]="datasourceTypeDesc" [valid]="group.get('datasourceType').valid">
<select formControlName="datasourceType" class="md-input">
<option value="">-- none selected --</option>
<option *ngFor="let key of classCodes" value="{{key}}">{{ datasourceClasses[key] }}</option>
<option *ngFor="let key of classCodes" value="{{key}}">{{ datasourceClasses.get(key) }}</option>
</select>
</form-inline>
</div>

View File

@ -51,19 +51,17 @@ export class DatasourceCreateFormComponent implements OnInit {
formSubmitted = false;
group: FormGroup;
// old issn regex
// issn : ['', [Validators.pattern('^\\d\\d\\d\\d[-]\\d\\d\\d\\d$')] ],
readonly groupDefinition = {
softwarePlatform : ['', Validators.required],
platformName : '',
officialName : ['', Validators.required],
issn : ['', [Validators.pattern('^\\d{4}-\\d{3}[\\dxX]$')] ],
eissn : ['', Validators.pattern('^\\d{4}-\\d{3}[\\dxX]$') ],
lissn : ['', Validators.pattern('^\\d{4}-\\d{3}[\\dxX]$') ],
issn : ['', [Validators.pattern('^(\\d{4}-?\\d{3}[\\dxX])$')] ],
eissn : ['', Validators.pattern('^(\\d{4}-?\\d{3}[\\dxX])$') ],
lissn : ['', Validators.pattern('^(\\d{4}-?\\d{3}[\\dxX])$') ],
repoDescription : ['', Validators.required],
country : ['', Validators.required],
longtitude : ['', [Validators.required, Validators.min(-180), Validators.max(180)] ],
latitude : ['', [Validators.required, Validators.min(-90), Validators.max(90)] ],
longtitude : ['', [Validators.min(-180), Validators.max(180)] ],
latitude : ['', [Validators.min(-90), Validators.max(90)] ],
websiteUrl : ['', [Validators.required, Validators.pattern('^(http:\\/\\/www\\.|https:\\/\\/www\\.|http:\\/\\/|https:\\/\\/)?[a-z0-9]+([\\-\\.]{1}[a-z0-9]+)*\\.[a-z]{2,5}(:[0-9]{1,5})?(\\/.*)?$')] ],
institutionName : ['', Validators.required],
englishName: ['', Validators.required],
@ -110,7 +108,7 @@ export class DatasourceCreateFormComponent implements OnInit {
this.group = this.fb.group(this.groupDefinition);
if (this.mode === 'journal') {
this.group.get('issn').clearValidators();
this.group.get('issn').setValidators([Validators.required, Validators.pattern('^\\d{4}-\\d{3}[\\dxX]$')]);
this.group.get('issn').setValidators([Validators.required, Validators.pattern('^(\\d{4}-?\\d{3}[\\dxX])$')]);
}
this.getTypologies();
this.getTimezones();
@ -124,29 +122,29 @@ export class DatasourceCreateFormComponent implements OnInit {
setupForm() {
if (this.selectedRepo) {
console.log(`my datasource type is: ${this.selectedRepo.datasourceType}`);
console.log(`my datasource type is: ${this?.selectedRepo?.eoscDatasourceType}`);
this.group.setValue({
softwarePlatform: this.selectedRepo.typology,
softwarePlatform: this.selectedRepo.platform,
platformName: '',
officialName: this.selectedRepo.officialName,
officialName: this.selectedRepo.officialname,
issn: '',
eissn: '',
lissn: '',
repoDescription: this.selectedRepo.description,
country: this.selectedRepo.countryCode,
country: this.selectedRepo.organizations[0].country, // countryCode
longtitude: this.selectedRepo.longitude,
latitude: this.selectedRepo.latitude,
websiteUrl: this.selectedRepo.websiteUrl,
institutionName: this.selectedRepo.organization,
englishName: this.selectedRepo.englishName,
logoUrl: this.selectedRepo.logoUrl,
websiteUrl: this.selectedRepo.websiteurl,
institutionName: this.selectedRepo.organizations[0].legalname,
englishName: this.selectedRepo.englishname,
logoUrl: this.selectedRepo.logourl,
timezone: this.selectedRepo.timezone,
datasourceType: this.selectedRepo.datasourceClass,
adminEmail: this.selectedRepo.contactEmail
datasourceType: this.selectedRepo.eoscDatasourceType, // TODO: still needed? should it be typology? typology exists on that stage?
adminEmail: this.selectedRepo.contactemail
});
if (this.selectedRepo.datasourceType === 'journal') {
if (this.selectedRepo.eoscDatasourceType === 'Journal archive') {
let ssnToShow = this.selectedRepo.issn.slice(0, 4) + '-' + this.selectedRepo.issn.toString().slice(4);
this.group.get('issn').setValue(ssnToShow);
@ -185,15 +183,17 @@ export class DatasourceCreateFormComponent implements OnInit {
getDatasourceClasses() {
this.repoService.getDatasourceClasses(this.mode).subscribe(
classes => this.datasourceClasses = classes,
classes => {
for (const [key, value] of Object.entries(classes)) {
this.datasourceClasses.set(key, value);
}
},
error => {
this.errorMessage = noServiceMessage;
console.log(error);
},
() => {
for (const key of Object.keys(this.datasourceClasses)) {
this.classCodes.push(key);
}
this.classCodes = Array.from(this.datasourceClasses.keys());
}
);
}
@ -227,25 +227,28 @@ export class DatasourceCreateFormComponent implements OnInit {
}
createNewRepository(): Repository {
const newRepo: Repository = new Repository();
newRepo.officialName = this.group.get('officialName').value.toString();
newRepo.englishName = this.group.get('englishName').value.toString();
newRepo.websiteUrl = this.group.get('websiteUrl').value;
newRepo.logoUrl = this.group.get('logoUrl').value;
newRepo.contactEmail = this.group.get('adminEmail').value;
newRepo.countryName = this.countries.filter(x => x.code === this.group.get('country').value)[0].name;
newRepo.countryCode = this.group.get('country').value;
newRepo.organization = this.group.get('institutionName').value.toString();
const newRepo = new Repository();
newRepo.officialname = this.group.get('officialName').value.toString();
newRepo.englishname = this.group.get('englishName').value.toString();
newRepo.websiteurl = this.group.get('websiteUrl').value;
newRepo.logourl = this.group.get('logoUrl').value;
newRepo.contactemail = this.group.get('adminEmail').value;
newRepo.organizations.push({
legalshortname: null,
legalname: this.group.get('institutionName').value.toString(),
websiteurl: null,
logourl: null,
country: this.group.get('country').value
});
newRepo.latitude = this.group.get('latitude').value;
newRepo.longitude = this.group.get('longtitude').value;
newRepo.timezone = this.group.get('timezone').value;
newRepo.datasourceClass = this.group.get('datasourceType').value;
if (this.group.get('softwarePlatform').value ) {
newRepo.typology = this.group.get('softwarePlatform').value;
if (this.group.get('softwarePlatform').value !== '') {
newRepo.platform = this.group.get('softwarePlatform').value;
} else if (this.group.get('platformName').value) {
newRepo.typology = this.group.get('platformName').value;
newRepo.platform = this.group.get('platformName').value;
}
// newRepo.typology = this.group.get('softwarePlatform').value;
newRepo.typology = this.group.get('datasourceType').value;
newRepo.description = this.group.get('repoDescription').value.toString();
newRepo.issn = '';
newRepo.eissn = '';
@ -267,14 +270,15 @@ export class DatasourceCreateFormComponent implements OnInit {
}
}
newRepo.registeredBy = this.authService.getUserEmail();
newRepo.registeredby = this.authService.getUserEmail();
/* THE BELOW FIELDS ARE NOT SET IN GWT CODE*/
newRepo.datasourceType = this.mode;
newRepo.dateOfCreation = new Date(Date.now()); // NOT NEEDED ??
newRepo.registered = true;
newRepo.registrationDate = new Date(Date.now()); // NOT NEEDED ??
newRepo.eoscDatasourceType = this.mode; // keep this
newRepo.managed = true;
const now = new Date(Date.now());
newRepo.consentTermsOfUseDate = now;
newRepo.lastConsentTermsOfUseDate = now;
newRepo.registrationdate = now;
return newRepo;
}

View File

@ -14,136 +14,87 @@
<div class="md-card-toolbar">
<div class="md-card-toolbar-actions">
<a *ngIf="!inRegister" (click)="saveInterface()" class="uk-margin-small-right"><i class="md-icon material-icons">save</i></a>
<a (click)="removeInterface()" class="uk-margin-small-left"><i class="md-icon material-icons">clear</i></a>
<a *ngIf="canEdit" (click)="removeInterface()" class="uk-margin-small-left"><i class="md-icon material-icons">clear</i></a>
</div>
<!--<h3 class="md-card-toolbar-heading-text"> Card Heading </h3>-->
</div>
<!--<div class="md-card-toolbar interfaceActionsPanel">-->
<!--<a *ngIf="!inRegister" (click)="saveInterface()" class="uk-margin-small-right"><i class="far fa-save fa-lg"></i></a>-->
<!--<a (click)="removeInterface()" class="uk-margin-small-left"><i class="fas fa-times fa-lg"></i></a>-->
<!--</div>-->
<div class="md-card-content">
<div *ngIf="successMessage" class="uk-alert uk-alert-success" style="clear: both">{{ successMessage }}</div>
<div *ngIf="errorMessage" class="uk-alert" [ngClass]="{'uk-alert-warning': errorMessage == invalidCustomBaseUrl,
'uk-alert-danger': errorMessage != invalidCustomBaseUrl}" style="clear: both">{{ errorMessage }}</div>
'uk-alert-danger': errorMessage != invalidCustomBaseUrl}" style="clear: both">{{ errorMessage }}
</div>
<div class="md-input-wrapper uk-margin-medium-top {{ (repoInterfaceForm.get('baseUrl') != null) ? 'md-input-filled' : '' }}">
<label class="" for="baseUrl" title="{{ baseUrlDesc.desc }}">Base OAI-PMH URL (*)</label>
<span *ngIf="showIdentifiedBaseUrl" class="help-block inline" style="margin-top: 8px; margin-bottom: 0px; padding-left: 10px; display: block;">
<div class="md-input-wrapper uk-margin-top {{ (repoInterfaceForm.get('baseurl') != null) ? 'md-input-filled' : '' }}">
<div>
<label class="uk-text-bold" for="baseurl" title="{{ baseUrlDesc.desc }}">Base OAI-PMH URL (*)</label>
</div>
<span *ngIf="showIdentifiedBaseUrl" class="help-block inline uk-text-success" style="margin-top: 8px; margin-bottom: 0px; padding-left: 10px; display: block;">
Identified
</span>
<input id="baseUrl" type="text" class="md-input" formControlName="baseUrl" (blur)="getInterfaceInfo()">
<span *ngIf="errorMessage == invalidCustomBaseUrl" class="help-block inline uk-text-warning" style="margin-top: 8px; margin-bottom: 0px; padding-left: 10px; display: block;">
Not identified
</span>
<input id="baseurl" type="text" class="md-input" [ngClass]="{'uk-disabled': !canEdit}"
formControlName="baseurl" (blur)="getInterfaceInfo()">
<span class="md-input-bar"></span>
</div>
<!--<div class="form-group has-success">-->
<!--<label class="control-label" for="baseUrl" title="{{ baseUrlDesc.desc }}">Base OAI-PMH URL (*)</label>-->
<!--<span *ngIf="identifiedBaseUrl" class="help-block inline" style="margin-top: 0px; margin-bottom: 0px; padding-left: 10px;">-->
<!--Identified-->
<!--</span>-->
<!--<input id="baseUrl" type="text" class="form-control" formControlName="baseUrl" (blur)="getInterfaceInfo()">-->
<!--</div>-->
<div class="radioButtonForm uk-margin-top">
<label class="control-label">Validation Set</label>
<div class="form-group">
<label for="selectRadio{{interfaceID}}" title="{{ existingValSetDesc.desc }}"
class="uk-button uk-link-muted visible_uk_links"
style="display: block; text-align: left;">
<input id="selectRadio{{interfaceID}}" value="select" name="validationSet{{interfaceID}}" type="radio"
(change)="chooseValSet(true)" checked >
<span class="uk-margin-small-left">Choose existing</span>
</label>
</div>
<label for="selectValidationSet{{interfaceID}}" class="control-label uk-text-bold">Set</label>
<div class="md-input-wrapper">
<!--<label class="">Select repository's country</label>-->
<select class="md-input" id="selectValidationSet{{interfaceID}}" formControlName="selectValidationSet" (change)="checkIfValid()">
<option value="" selected>-- none selected --</option>
<option *ngFor="let set of valsetList" value="{{set}}">{{set}}</option>
</select>
<span class="md-input-bar"></span>
</div>
<div class="form-group">
<label for="customRadio{{interfaceID}}" title="{{ customValSetDesc.desc }}"
class="uk-button uk-link-muted visible_uk_links"
style="display: block; text-align: left;">
<input id="customRadio{{interfaceID}}" value="custom" name="validationSet{{interfaceID}}" type="radio"
(change)="chooseValSet(false)">
<span class="uk-margin-small-left">or a custom one</span>
</label>
</div>
<div class="md-input-wrapper">
<input id="customValidationSet{{interfaceID}}" formControlName="customValidationSet"
class="md-input" type="text" (keyup)="checkIfValid()">
<span class="md-input-bar"></span>
</div>
</div>
<!--<div class="form-group">-->
<!--<label class="control-label">Validation Set</label>-->
<!--<div>-->
<!--<label class="uk-button validationSetRadio" for="selectRadio{{interfaceID}}" title="{{ existingValSetDesc.desc }}">-->
<!--<input id="selectRadio{{interfaceID}}" value="select" name="validationSet{{interfaceID}}" type="radio"-->
<!--(change)="chooseValSet(true)" checked >-->
<!--<span class="uk-margin-small-left">Choose existing</span>-->
<!--</label>-->
<!--</div>-->
<!--<select id="selectValidationSet{{interfaceID}}" formControlName="selectValidationSet"-->
<!--class="form-control" (change)="checkIfValid()">-->
<!--<option value="" selected>&#45;&#45; none selected &#45;&#45;</option>-->
<!--<option *ngFor="let set of valsetList" value="{{set}}">{{set}}</option>-->
<!--</select>-->
<!--<div>-->
<!--<label class="uk-button validationSetRadio" for="customRadio{{interfaceID}}" title="{{ customValSetDesc.desc }}">-->
<!--<input id="customRadio{{interfaceID}}" value="custom" name="validationSet{{interfaceID}}" type="radio"-->
<!--(change)="chooseValSet(false)">-->
<!--<span class="uk-margin-small-left">or a custom one</span>-->
<!--</label>-->
<!--</div>-->
<!--<input id="customValidationSet{{interfaceID}}" formControlName="customValidationSet"-->
<!--class="form-control" type="text" (keyup)="checkIfValid()">-->
<!--</div>-->
<div class="md-input-wrapper md-input-filled uk-margin-medium-top">
<label style="top: -16px" class="" for="compLvl" title="{{ compatibilityLevelDesc.desc }}">Desired Compatibility Level (*)</label>
<select class="md-input" id="compLvl" formControlName="compatibilityLevel" (change)="checkIfValid()">
<div>
<label class="uk-text-bold" for="compLvl" title="{{ compatibilityLevelDesc.desc }}">
Desired compatibility level (*)
</label>
<div class="uk-comment-meta uk-text-italic uk-margin-small-top uk-margin-small-bottom">
Select the Guidelines with which your data source is compatible.
Please note that the Aggregation Team will evaluate the compatibility, so the actual compliance level may be different from which you chose.
</div>
</div>
<select class="md-input" id="compLvl" formControlName="desiredCompatibilityLevel" (change)="checkIfValid()">
<option value="">-- none selected --</option>
<option *ngFor="let key of classCodes" value="{{key}}">{{compClasses[key]}}</option>
</select>
<span class="md-input-bar"></span>
</div>
<!--<div class="form-group">-->
<!--<label class="control-label" for="compLvl" title="{{ compatibilityLevelDesc.desc }}">Desired Compatibility Level (*)</label>-->
<!--<select class="form-control" id="compLvl" formControlName="compatibilityLevel" (change)="checkIfValid()">-->
<!--<option value="">&#45;&#45; none selected &#45;&#45;</option>-->
<!--<option *ngFor="let key of classCodes" value="{{key}}">{{compClasses[key]}}</option>-->
<!--</select>-->
<!--</div>-->
<div class="">
<label class="">Current Compatibility Level</label>
<div *ngIf="existingCompLevel">{{ existingCompLevel ? existingCompLevel : 'not available' }}</div>
<div class="uk-margin-medium-top">
<label class="uk-text-bold">Current compatibility level</label>
<div class="uk-comment-meta uk-text-italic uk-margin-small-top uk-margin-small-bottom">
Compatible level returned by the Validator tool after your request to register the interface.
</div>
<div class="uk-margin-small-top">{{(repoInterfaceForm.get('compatibilityLevel').value && repoInterfaceForm.get('compatibilityLevel').value !== 'UNKNOWN')
? this.compClasses[repoInterfaceForm.get('compatibilityLevel').value] : 'not available' }}</div>
</div>
<!--<div>-->
<!--<label class="uk-form-controls-text control-label">Current Compatibility Level</label>-->
<!--<div *ngIf="existingCompLevel">{{ existingCompLevel ? existingCompLevel : 'not available' }}</div>-->
<!--</div>-->
<div class="uk-margin-medium-top">
<label class="" for="comment" title="{{ commentDesc.desc }}">Comments (What else do we need to know?)</label>
<label class="uk-text-bold">Compatibility override</label>
<div class="uk-comment-meta uk-text-italic uk-margin-small-top uk-margin-small-bottom">
Actual compatibility level of your data source, according to the validation process by the Aggregation Team. This is the compatibility level displayed on the data source public page in EXPLORE
</div>
<div class="uk-margin-small-top">{{repoInterfaceForm.get('compatibilityLevelOverride').value ? this.compClasses[repoInterfaceForm.get('compatibilityLevelOverride').value] : 'not available' }}</div>
</div>
<div class="uk-margin-medium-top uk-margin-bottom">
<label class="uk-text-bold" for="comment" title="{{ commentDesc.desc }}">Comments (What else do we need to know?)</label>
<textarea id="comment" class="uk-textarea" rows="3" formControlName="comment" (blur)="checkIfValid()"></textarea>
</div>
</div>
<!-- <pre>{{repoInterfaceForm.value | json}}</pre>-->
<!-- <pre>{{interfaceToExport | json}}</pre>-->
</div>
</div>

View File

@ -1,7 +1,7 @@
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { baseUrlDesc, compatibilityLevelDesc, customValSetDesc, Description, existingValSetDesc, commentDesc } from '../../../domain/oa-description';
import { InterfaceInformation, RepositoryInterface } from '../../../domain/typeScriptClasses';
import {ApiParamDetails, InterfaceInformation, RepositoryInterface} from '../../../domain/typeScriptClasses';
import { ValidatorService } from '../../../services/validator.service';
import { RepositoryService } from '../../../services/repository.service';
import { formErrorWasntSaved, formInfoLoading, formSubmitting, formSuccessAddedInterface, formSuccessUpdatedInterface, invalidCustomBaseUrl,
@ -26,6 +26,7 @@ export class DatasourceNewInterfaceFormComponent implements OnInit {
invalidCustomBaseUrl = invalidCustomBaseUrl;
@Input() data: any[] = []; // expects an array containing at least 3 of the 4 below fields in this order
@Input() mode: string = null;
inRegister: boolean;
interfaceID: number; // holds the interface index in the interfaces array as displayed
currentRepo: RepoFields; // a fraction of the Repository class
@ -36,10 +37,11 @@ export class DatasourceNewInterfaceFormComponent implements OnInit {
repoInterfaceForm: FormGroup;
readonly repoInterfaceFormDef = {
baseUrl: ['', Validators.required],
baseurl: ['', Validators.required],
selectValidationSet: [''],
customValidationSet: [''],
compatibilityLevel: [''],
compatibilityLevel: null,
desiredCompatibilityLevel: null,
compatibilityLevelOverride: null,
comment: ['']
};
baseUrlDesc: Description = baseUrlDesc;
@ -49,12 +51,12 @@ export class DatasourceNewInterfaceFormComponent implements OnInit {
commentDesc: Description = commentDesc;
identifiedBaseUrl: boolean;
showIdentifiedBaseUrl: boolean;
canEdit = true;
showIdentifiedBaseUrl: boolean = null;
valsetList: string[] = [];
existingCompLevel: string;
classCodes: string[] = [];
compClasses: Map<string, string> = new Map<string, string>();
existingValSet: boolean;
interfaceInfo: InterfaceInformation;
constructor(private fb: FormBuilder,
@ -67,11 +69,22 @@ export class DatasourceNewInterfaceFormComponent implements OnInit {
this.interfaceID = this.data[1];
this.currentRepo = this.data[2];
this.repoInterfaceForm = this.fb.group(this.repoInterfaceFormDef);
this.chooseValSet(true);
// this.chooseValSet(true);
if (this.data[3]) {
this.currentInterface = this.data[3];
this.repoInterfaceForm.get('baseUrl').setValue(this.currentInterface.baseUrl);
this.repoInterfaceForm.get('compatibilityLevel').setValue(this.currentInterface.desiredCompatibilityLevel);
if (this.currentInterface.baseurl !== null && this.currentInterface.baseurl !== '') {
this.canEdit = false;
this.repoInterfaceForm.get('baseurl').setValue(this.currentInterface.baseurl);
}
this.repoInterfaceForm.get('compatibilityLevel').setValue(this.currentInterface.compatibility);
this.repoInterfaceForm.get('compatibilityLevelOverride').setValue(this.currentInterface.compatibilityOverride);
this.repoService.getInterfaceDesiredCompatibilityLevel(this.currentInterface.datasource, this.currentInterface.id).subscribe(
res => {
if (res !== null) {
this.repoInterfaceForm.get('desiredCompatibilityLevel').setValue(res['desiredCompatibilityLevel']);
}
}
);
}
this.getInterfaceInfo();
this.getCompatibilityClasses();
@ -83,10 +96,10 @@ export class DatasourceNewInterfaceFormComponent implements OnInit {
this.successMessage = '';
this.errorMessage = '';
const baseUrl = this.repoInterfaceForm.get('baseUrl').value;
if (baseUrl) {
const baseurl = this.repoInterfaceForm.get('baseurl').value;
if (baseurl) {
this.loadingMessage = formInfoLoading;
this.valService.getInterfaceInformation(baseUrl).subscribe(
this.valService.getInterfaceInformation(baseurl).subscribe(
info => {
this.interfaceInfo = info;
if (this.interfaceInfo.identified) {
@ -94,12 +107,12 @@ export class DatasourceNewInterfaceFormComponent implements OnInit {
this.showIdentifiedBaseUrl = true;
} else {
this.errorMessage = invalidCustomBaseUrl;
this.identifiedBaseUrl = true; // pass interface without baseUrl identification
this.identifiedBaseUrl = true; // pass interface without baseurl identification
this.showIdentifiedBaseUrl = false;
}
if (this.interfaceInfo.sets) {
this.valsetList = this.interfaceInfo.sets;
console.log(this.valsetList);
// console.log(this.valsetList);
}
},
error => {
@ -109,23 +122,24 @@ export class DatasourceNewInterfaceFormComponent implements OnInit {
this.errorMessage = noServiceMessage;
},
() => {
if ( this.currentInterface && this.currentInterface.accessParams && this.currentInterface.accessParams['set'] ) {
if ( this.valsetList.some( x => x === this.currentInterface.accessParams['set']) ) {
this.repoInterfaceForm.get('selectValidationSet').setValue(this.currentInterface.accessParams['set']);
} else {
this.repoInterfaceForm.get('customValidationSet').setValue(this.currentInterface.accessParams['set']);
}
if (this.currentInterface?.apiParams?.find(entry => entry.param === 'set')) {
this.repoInterfaceForm.get('selectValidationSet').setValue(this.currentInterface.apiParams
.find(entry => entry.param === 'set').value);
this.repoInterfaceForm.updateValueAndValidity();
this.checkIfValid();
}
this.loadingMessage = '';
this.repoInterfaceForm.updateValueAndValidity();
this.checkIfValid();
}
);
}
}
getCompatibilityClasses() {
this.repoService.getCompatibilityClasses(this.currentRepo.datasourceType).subscribe(
// FIXME: Use eoscDatasourceType when we support the new model
if (this.mode === null) {
this.mode = this.currentRepo.datasourceType;
}
this.repoService.getCompatibilityClasses(this.mode).subscribe(
classes => {
this.compClasses = classes;
this.classCodes = Object.keys(this.compClasses);
@ -143,37 +157,23 @@ export class DatasourceNewInterfaceFormComponent implements OnInit {
getExistingCompatibilityLevel() {
if (this.currentInterface) {
if (this.currentInterface.desiredCompatibilityLevel &&
this.classCodes.some( x => x === this.currentInterface.desiredCompatibilityLevel ) ) {
this.existingCompLevel = this.compClasses[this.currentInterface.desiredCompatibilityLevel];
if (this.currentInterface.compatibility
&& this.classCodes.some( x => x === this.currentInterface.compatibilityOverride)) {
this.existingCompLevel = this.compClasses[this.currentInterface.compatibility];
} else {
this.repoInterfaceForm.get('compatibilityLevel').setValue('');
this.existingCompLevel = this.currentInterface.desiredCompatibilityLevel;
// this.repoInterfaceForm.get('compatibilityLevel').setValue('');
this.existingCompLevel = this.currentInterface.compatibility;
}
}
}
chooseValSet(fromList: boolean) {
this.existingValSet = fromList;
if (this.existingValSet) {
this.repoInterfaceForm.get('selectValidationSet').enable();
this.repoInterfaceForm.get('customValidationSet').disable();
} else {
this.repoInterfaceForm.get('selectValidationSet').disable();
this.repoInterfaceForm.get('customValidationSet').enable();
}
this.checkIfValid();
}
checkIfCompatibilityLevelWasChosen() {
return ( (this.repoInterfaceForm.get('compatibilityLevel').value !== '') ||
(this.existingCompLevel && (this.existingCompLevel !== '')) );
}
formIsValid() {
return (this.repoInterfaceForm.valid &&
this.identifiedBaseUrl &&
this.checkIfCompatibilityLevelWasChosen());
return (this.repoInterfaceForm.valid && this.identifiedBaseUrl && this.checkIfCompatibilityLevelWasChosen());
}
checkIfValid() {
@ -185,7 +185,7 @@ export class DatasourceNewInterfaceFormComponent implements OnInit {
}
} else {
this.successMessage = '';
this.interfaceToExport = null;
// this.interfaceToExport = null;
}
}
@ -194,88 +194,81 @@ export class DatasourceNewInterfaceFormComponent implements OnInit {
this.errorMessage = '';
this.successMessage = '';
if (this.formIsValid()) {
const baseUrl = this.repoInterfaceForm.get('baseUrl').value;
let valset = '';
if (this.existingValSet) {
valset = this.repoInterfaceForm.get('selectValidationSet').value;
} else {
valset = this.repoInterfaceForm.get('customValidationSet').value;
}
let compLvl = '';
if (this.repoInterfaceForm.get('compatibilityLevel').value) {
this.existingCompLevel = this.compClasses[this.repoInterfaceForm.get('compatibilityLevel').value];
console.log('this.existingCompLevel is', this.existingCompLevel);
compLvl = this.repoInterfaceForm.get('compatibilityLevel').value;
} else {
compLvl = this.existingCompLevel;
}
const baseurl = this.repoInterfaceForm.get('baseurl').value;
const valset = this.repoInterfaceForm.get('selectValidationSet').value;
const desiredCompLvl = this.repoInterfaceForm.get('desiredCompatibilityLevel').value;
const compLvl = this.existingCompLevel;
let comment = '';
if (this.repoInterfaceForm.get('comment').value) {
comment = this.repoInterfaceForm.get('comment').value;
}
if (this.currentInterface) {
this.updateCurrent(baseUrl, valset, compLvl, comment);
this.updateCurrent(baseurl, valset, desiredCompLvl, compLvl, comment);
} else {
this.addCurrent(baseUrl, valset, compLvl, comment);
this.addCurrent(baseurl, valset, desiredCompLvl, compLvl, comment);
}
} else {
this.interfaceToExport = null;
// this.interfaceToExport = null;
this.errorMessage = 'Please make sure all required fields are filled with acceptable values.';
}
}
getCurrentValues() {
console.log('getcurrentvalues');
let intrf = this.currentInterface;
if (intrf == null) {
intrf = new RepositoryInterface();
}
intrf.baseUrl = this.repoInterfaceForm.get('baseUrl').value;
if (this.existingValSet) {
intrf.accessSet = this.repoInterfaceForm.get('selectValidationSet').value;
intrf.accessParams = {'set': this.repoInterfaceForm.get('selectValidationSet').value};
} else {
intrf.accessSet = this.repoInterfaceForm.get('customValidationSet').value;
intrf.accessParams = {'set': this.repoInterfaceForm.get('customValidationSet').value};
}
intrf.baseurl = this.repoInterfaceForm.get('baseurl').value;
this.updateValidationSet(intrf, this.repoInterfaceForm.get('selectValidationSet').value);
console.log(intrf);
if (this.repoInterfaceForm.get('compatibilityLevel').value) {
intrf.desiredCompatibilityLevel = this.repoInterfaceForm.get('compatibilityLevel').value;
intrf.compliance = this.repoInterfaceForm.get('compatibilityLevel').value;
intrf.compatibilityOverride = this.repoInterfaceForm.get('compatibilityLevel').value;
intrf.compatibility = this.repoInterfaceForm.get('compatibilityLevel').value;
} else {
intrf.desiredCompatibilityLevel = this.existingCompLevel;
intrf.compliance = this.existingCompLevel;
intrf.compatibilityOverride = this.existingCompLevel;
intrf.compatibility = this.existingCompLevel;
}
intrf.typology = this.currentRepo.datasourceClass;
return intrf;
}
addCurrent (baseUrl: string, valset: string, compLvl: string, comment: string) {
const currentInterface = new RepositoryInterface();
currentInterface.baseUrl = baseUrl;
currentInterface.accessSet = valset;
currentInterface.accessParams = {'set': valset};
currentInterface.desiredCompatibilityLevel = compLvl;
currentInterface.compliance = compLvl;
currentInterface.typology = this.currentRepo.datasourceClass;
currentInterface.comments = comment;
if (!this.inRegister) {
this.addInterface(currentInterface);
updateValidationSet(intrf: RepositoryInterface, value: string) {
let validationSet = intrf.apiParams.find(element => element.param === 'set');
if (!validationSet) {
validationSet = new ApiParamDetails('set', value);
intrf.apiParams.push(validationSet);
} else {
this.successMessage = 'The harvesting settings are valid!';
console.log('SAVED !');
this.interfaceToExport = currentInterface;
validationSet.value = this.repoInterfaceForm.get('selectValidationSet').value;
}
}
addInterface(newInterface: RepositoryInterface) {
addCurrent (baseurl: string, valset: string, desiredCompLvl: string, compLvl: string, comment: string) {
console.log('add current');
this.currentInterface = new RepositoryInterface();
this.updateValidationSet(this.currentInterface, valset);
this.currentInterface.baseurl = baseurl;
this.currentInterface.desiredCompatibilityLevel = desiredCompLvl;
this.currentInterface.compatibility = compLvl;
this.currentInterface.typology = this.currentRepo.datasourceClass;
this.currentInterface.comments = comment;
if (!this.inRegister) {
this.addInterface();
} else {
this.successMessage = 'The harvesting settings are valid!';
console.log('SAVED !');
this.interfaceToExport = this.currentInterface;
}
}
addInterface() {
this.loadingMessage = formSubmitting;
this.repoService.addInterface(this.currentRepo.datasourceType,
this.currentRepo.id,
this.currentRepo.registeredBy,
this.currentRepo.comments,
newInterface).subscribe(
this.repoService.addInterface(this.currentRepo.datasourceType, this.currentRepo.id,
this.currentRepo.registeredBy, this.currentRepo.comments, this.currentInterface,
this.repoInterfaceForm.get('desiredCompatibilityLevel').value).subscribe(
addedInterface => {
console.log(`addInterface responded ${JSON.stringify(addedInterface)}`);
this.currentInterface = addedInterface;
@ -299,13 +292,13 @@ export class DatasourceNewInterfaceFormComponent implements OnInit {
}
updateCurrent (baseUrl: string, valset: string, compLvl: string, comment: string) {
this.currentInterface.baseUrl = baseUrl;
this.currentInterface.accessSet = valset;
this.currentInterface.accessParams['set'] = valset;
this.currentInterface.desiredCompatibilityLevel = compLvl;
this.currentInterface.compliance = compLvl;
updateCurrent (baseurl: string, valset: string, desiredCompLvl: string, compLvl: string, comment: string) {
console.log('update current');
this.updateValidationSet(this.currentInterface, valset);
this.currentInterface.baseurl = baseurl;
this.currentInterface.desiredCompatibilityLevel = desiredCompLvl;
console.log(this.currentInterface.desiredCompatibilityLevel);
this.currentInterface.compatibility = compLvl;
this.currentInterface.typology = this.currentRepo.datasourceClass;
this.currentInterface.comments = comment;
@ -320,10 +313,8 @@ export class DatasourceNewInterfaceFormComponent implements OnInit {
updateInterface() {
this.loadingMessage = formSubmitting;
this.repoService.updateInterface(this.currentRepo.id,
this.currentRepo.registeredBy,
this.currentRepo.comments,
this.currentInterface).subscribe(
this.repoService.updateInterface(this.currentRepo.id, this.currentRepo.registeredBy, this.currentRepo.comments,
this.currentInterface, this.repoInterfaceForm.get('desiredCompatibilityLevel').value).subscribe(
response => {
console.log(`updateRepository responded ${JSON.stringify(response)}`);
if (response) {

View File

@ -12,15 +12,20 @@
Basic information
</h4>
</div>
<div *ngIf="selectedRepo.datasourceType === 'opendoar'" class="uk-alert uk-alert-info">
<div *ngIf="selectedRepo.collectedfrom.split('openaire____::')[1] === 'opendoar'" class="uk-alert uk-alert-info">
The following fields are completed by OpenDOAR.<br>
If you want to edit them, you can do it by using this
<a target="_blank" href="{{ 'http://v2.sherpa.ac.uk/id/repository/' + repoId }}">OpenDOAR link</a>
<a target="_blank" href="{{ 'http://v2.sherpa.ac.uk/id/repository/' + repoId }}">OpenDOAR link</a>.
</div>
<div *ngIf="selectedRepo.datasourceType === 're3data'" class="uk-alert uk-alert-info">
<div *ngIf="selectedRepo.collectedfrom.split('openaire____::')[1] === 're3data'" class="uk-alert uk-alert-info">
The following fields are completed by Re3data.<br>
If you want to edit them, you can do it by using this
<a target="_blank" href="{{ 'http://service.re3data.org/repository/' + repoId }}">Re3data link</a>
<a target="_blank" href="{{ 'http://service.re3data.org/repository/' + repoId }}">Re3data link</a>.
</div>
<div *ngIf="selectedRepo.collectedfrom.split('openaire____::')[1] === 'fairsharing'" class="uk-alert uk-alert-info">
The following fields are completed by FAIRsharing.<br>
If you want to edit them, you can do it by using this
<a target="_blank" href="{{ 'https://fairsharing.org/search?q=' + selectedRepo.officialname }}">FAIRsharing link</a>.
</div>
<div data-dynamic-fields="d_field_wizard" class="uk-grid" data-uk-grid-margin="" dynamic-fields-counter="0">
@ -59,14 +64,14 @@
</div>
</div>
<div *ngIf="selectedRepo.datasourceType == 'journal'">
<div *ngIf="selectedRepo.eoscDatasourceType == 'Journal archive'">
<div data-dynamic-fields="d_field_wizard" class="uk-grid" data-uk-grid-margin="" dynamic-fields-counter="0">
<div class="uk-width-medium-1-1 parsley-row form_section uk-row-first">
<div class="md-input-wrapper {{ (updateGroup.get('issn') != null) ? 'md-input-filled' : '' }}">
<div class="md-input-wrapper {{ (updateGroup.get('issn') != null) ? 'md-input-filled' : '1234-5678' }}">
<form-inline [description]="issnDesc" [valid]="updateGroup.get('issn').valid">
<span *ngIf="updateGroup.get('issn').invalid && updateGroup.get('issn').touched && updateGroup.get('issn').dirty"
class="help-block inline uk-text-danger"
style="margin-top: 0px; margin-bottom: 0px; padding-left: 10px;">Issn needs to be of the form: "1111-1111" or "1111-111X"</span>
style="margin-top: 0px; margin-bottom: 0px; padding-left: 10px;">Issn needs to be of the form: "1111-1111" or "1111-111X" or "11111111" or "1111111X"</span>
<input formControlName="issn" class="md-input" type="text"
(focus)="updateGroup.get('issn').markAsUntouched()" (blur)="updateGroup.get('issn').updateValueAndValidity()">
</form-inline>
@ -80,7 +85,7 @@
<form-inline [description]="eissnDesc" [valid]="updateGroup.get('eissn').valid">
<span *ngIf="updateGroup.get('eissn').invalid && updateGroup.get('eissn').touched && updateGroup.get('eissn').dirty"
class="help-block inline uk-text-danger"
style="margin-top: 0px; margin-bottom: 0px; padding-left: 10px;">Eissn needs to be of the form: "1111-1111" or "1111-111X"</span>
style="margin-top: 0px; margin-bottom: 0px; padding-left: 10px;">Eissn needs to be of the form: "1111-1111" or "1111-111X" or "11111111" or "1111111X"</span>
<input formControlName="eissn" class="md-input" type="text"
(focus)="updateGroup.get('eissn').markAsUntouched()" (blur)="updateGroup.get('eissn').updateValueAndValidity()">
</form-inline>
@ -94,7 +99,7 @@
<form-inline [description]="lissnDesc" [valid]="updateGroup.get('lissn').valid">
<span *ngIf="updateGroup.get('lissn').invalid && updateGroup.get('lissn').touched && updateGroup.get('lissn').dirty"
class="help-block inline uk-text-danger"
style="margin-top: 0px; margin-bottom: 0px; padding-left: 10px;">Lissn needs to be of the form: "1111-1111" or "1111-111X"</span>
style="margin-top: 0px; margin-bottom: 0px; padding-left: 10px;">Lissn needs to be of the form: "1111-1111" or "1111-111X" or "11111111" or "1111111X"</span>
<input formControlName="lissn" class="md-input" type="text"
(focus)="updateGroup.get('lissn').markAsUntouched()" (blur)="updateGroup.get('lissn').updateValueAndValidity()">
</form-inline>
@ -120,7 +125,7 @@
<form-inline [description]="countryDesc" [valid]="updateGroup.get('country')">
<select formControlName="country" class="md-input">
<option value="">-- none selected --</option>
<option *ngFor="let country of countries" value="{{country.code}}" title="{{country.name}}">{{ country.name }}</option>
<option *ngFor="let country of countries" value="{{country.code}}">{{ country.name }}</option>
</select>
</form-inline>
</div>
@ -217,7 +222,7 @@
<form-inline [description]="datasourceTypeDesc" [valid]="updateGroup.get('datasourceType').valid">
<select formControlName="datasourceType" class="md-input">
<option value="">-- none selected --</option>
<option *ngFor="let key of classCodes" value="{{key}}">{{ datasourceClasses[key] }}</option>
<option *ngFor="let key of classCodes" value="{{key}}">{{ datasourceClasses.get(key) }}</option>
</select>
</form-inline>
</div>
@ -244,4 +249,3 @@
<button class="uk-button uk-button-primary updateRepoInfoButton" type="button" (click)="updateRepo()">Update Information</button>
</div>
</form>

View File

@ -8,7 +8,7 @@ import { Description, softwarePlatformDesc, platformNameDesc, officialNameDesc,
longtitudeDesc, latitudeDesc, websiteUrlDesc, institutionNameDesc, englishNameDesc, logoUrlDesc, timezoneDesc,
datasourceTypeDesc, adminEmailDesc, lissnDesc, eissnDesc, issnDesc } from '../../../domain/oa-description';
import { AuthenticationService } from '../../../services/authentication.service';
import {SharedService} from "../../../services/shared.service";
import {SharedService} from '../../../services/shared.service';
@Component ({
selector: 'datasource-update-form',
@ -32,6 +32,8 @@ export class DatasourceUpdateFormComponent implements OnInit {
@Input() selectedRepo: Repository;
@Input() mode: string;
@Input() showButton: boolean;
repoId: string;
@ -41,9 +43,9 @@ export class DatasourceUpdateFormComponent implements OnInit {
softwarePlatform : '',
platformName : '',
officialName : ['', Validators.required],
issn : ['', [Validators.pattern('^\\d{4}-\\d{3}[\\dxX]$')] ],
eissn : ['', Validators.pattern('^\\d{4}-\\d{3}[\\dxX]$') ],
lissn : ['', Validators.pattern('^\\d{4}-\\d{3}[\\dxX]$') ],
issn : ['', [Validators.pattern('^(\\d{4}-?\\d{3}[\\dxX])$')] ],
eissn : ['', Validators.pattern('^(\\d{4}-?\\d{3}[\\dxX])$') ],
lissn : ['', Validators.pattern('^(\\d{4}-?\\d{3}[\\dxX])$') ],
repoDescription : ['', Validators.required],
country : '',
longtitude : '',
@ -84,6 +86,7 @@ export class DatasourceUpdateFormComponent implements OnInit {
ngOnInit() {
this.loadForm();
console.log('mode: ', this.mode);
}
loadForm() {
@ -99,51 +102,64 @@ export class DatasourceUpdateFormComponent implements OnInit {
setupUpdateForm() {
if (this.selectedRepo) {
console.log(`my datasource type is: ${this.selectedRepo.datasourceType}`);
this.updateGroup.setValue({
softwarePlatform: this.selectedRepo.typology,
softwarePlatform: this.selectedRepo.platform,
platformName: '',
officialName: this.selectedRepo.officialName,
officialName: this.selectedRepo.officialname,
issn: '',
eissn: '',
lissn: '',
repoDescription: this.selectedRepo.description,
country: this.selectedRepo.countryCode,
country: this.selectedRepo.organizations[0].country, // countryCode
longtitude: this.selectedRepo.longitude,
latitude: this.selectedRepo.latitude,
websiteUrl: this.selectedRepo.websiteUrl,
institutionName: this.selectedRepo.organization,
englishName: this.selectedRepo.englishName,
logoUrl: this.selectedRepo.logoUrl,
websiteUrl: this.selectedRepo.websiteurl,
institutionName: this.selectedRepo.organizations[0].legalname,
englishName: this.selectedRepo.englishname,
logoUrl: this.selectedRepo.logourl,
timezone: this.selectedRepo.timezone,
datasourceType: this.selectedRepo.datasourceClass,
adminEmail: this.selectedRepo.contactEmail
datasourceType: this.selectedRepo.typology, // TODO: rename to typology?
adminEmail: this.selectedRepo.contactemail
});
if ( this.selectedRepo.typology === '' || !this.typologies.some(x => x.value === this.selectedRepo.typology) ) {
if ( this.selectedRepo.platform === '' || !this.typologies.some(x => x.value === this.selectedRepo.platform) ) {
this.updateGroup.get('softwarePlatform').setValue('');
this.updateGroup.get('platformName').setValue(this.selectedRepo.typology);
this.updateGroup.get('platformName').setValue(this.selectedRepo.platform);
}
if ((this.selectedRepo.datasourceType === 'opendoar') ||
(this.selectedRepo.datasourceType === 're3data')) {
if (this.selectedRepo.eoscDatasourceType === 'Journal archive') {
console.log('inside journal');
this.updateGroup.get('issn').setValue(this.selectedRepo.issn);
this.updateGroup.get('eissn').setValue(this.selectedRepo.eissn);
this.updateGroup.get('lissn').setValue(this.selectedRepo.lissn);
}
// FIXME: Use eoscDatasourceType when we support the new model
if ((this.mode === 'opendoar') || (this.mode === 're3data')) {
// this.updateGroup.get('officialName').disable();
this.updateGroup.get('country').disable();
// this.updateGroup.get('longtitude').disable();
// this.updateGroup.get('latitude').disable();
// this.updateGroup.get('websiteUrl').disable();
// this.updateGroup.get('institutionName').disable();
}
if (this.selectedRepo.datasourceType === 'journal') {
// FIXME: Use eoscDatasourceType when we support the new model
if (this.mode === 'cris') {
// this.longtitudeDesc.mandatory = false;
// this.latitudeDesc.mandatory = false;
this.datasourceTypeDesc.label = 'CRIS scope/type';
} else {
// this.longtitudeDesc.mandatory = true;
// this.latitudeDesc.mandatory = true;
this.datasourceTypeDesc.label = 'Data source type';
}
// FIXME: Use eoscDatasourceType when we support the new model
if (this.mode === 'journal') {
console.log(this.mode);
let ssnToShow = this.selectedRepo.issn.slice(0, 4) + '-' + this.selectedRepo.issn.toString().slice(4);
this.updateGroup.get('issn').setValue(ssnToShow);
this.updateGroup.get('issn').clearValidators();
this.updateGroup.get('issn').setValidators([Validators.required, Validators.pattern('^\\d{4}-\\d{3}[\\dxX]$')]);
this.updateGroup.get('issn').setValidators([Validators.required, Validators.pattern('^(\\d{4}-?\\d{3}[\\dxX])$')]);
if (this.selectedRepo.eissn.trim().length) {
ssnToShow = this.selectedRepo.eissn.slice(0, 4) + '-' + this.selectedRepo.eissn.toString().slice(4);
@ -160,30 +176,36 @@ export class DatasourceUpdateFormComponent implements OnInit {
this.updateGroup.get('eissn').disable();
this.updateGroup.get('lissn').disable();*/
}
/*this.getDatasourceClasses();*/
}
}
getDatasourceClasses() {
this.repoService.getDatasourceClasses(this.selectedRepo.datasourceType).subscribe(
classes => this.datasourceClasses = classes,
// FIXME: Use eoscDatasourceType when we support the new model
let param = this.selectedRepo.collectedfrom.split('::')[1];
if (this.selectedRepo.eoscDatasourceType === 'Journal archive') { param = 'journal'; }
if (this.selectedRepo.eoscDatasourceType === 'Aggregator') { param = 'aggregator'; }
this.repoService.getDatasourceClasses(param).subscribe(
classes => {
for (const [key, value] of Object.entries(classes)) {
this.datasourceClasses.set(key, value);
}},
error => {
this.loadingMessage = '';
this.errorMessage = noServiceMessage;
console.log(error);
},
() => {
for (const key of Object.keys(this.datasourceClasses)) {
this.classCodes.push(key);
}
console.log('gotDatasourceClasses');
this.classCodes = Array.from(this.datasourceClasses.keys());
this.getCountries();
}
);
}
getCountries() {
this.repoService.getCountries()
.subscribe(
this.repoService.getCountries().subscribe(
countries => this.countries = countries.sort( function(a, b) {
if (a.name < b.name) {
return -1;
@ -236,7 +258,7 @@ export class DatasourceUpdateFormComponent implements OnInit {
window.scroll(1, 1);
if (this.updateGroup.valid) {
if ( this.selectedRepo.datasourceType !== 'journal' || this.updateGroup.get('issn').value ) {
if ( this.selectedRepo.eoscDatasourceType !== 'journal' || this.updateGroup.get('issn').value ) {
this.refreshSelectedRepo();
/*
@ -266,7 +288,7 @@ export class DatasourceUpdateFormComponent implements OnInit {
} else {
this.successMessage = formSuccessUpdatedRepo;
}
//fixme is this the place to update the subject??
// fixme is this the place to update the subject??
this.sharedService.setRepository(this.selectedRepo);
}
);
@ -281,24 +303,26 @@ export class DatasourceUpdateFormComponent implements OnInit {
refreshSelectedRepo() {
if (this.updateGroup.get('softwarePlatform').value ) {
this.selectedRepo.typology = this.updateGroup.get('softwarePlatform').value;
this.selectedRepo.platform = this.updateGroup.get('softwarePlatform').value;
} else if (this.updateGroup.get('platformName').value) {
this.selectedRepo.typology = this.updateGroup.get('platformName').value;
this.selectedRepo.platform = this.updateGroup.get('platformName').value;
}
this.selectedRepo.officialName = this.updateGroup.get('officialName').value.toString();
this.selectedRepo.typology = this.updateGroup.get('datasourceType').value;
console.log('typology ', this.selectedRepo.typology);
console.log(this.datasourceClasses);
console.log(this.updateGroup.get('datasourceType').value);
this.selectedRepo.officialname = this.updateGroup.get('officialName').value.toString();
this.selectedRepo.description = this.updateGroup.get('repoDescription').value.toString();
this.selectedRepo.countryCode = this.updateGroup.get('country').value;
this.selectedRepo.countryName = this.countries.filter(x => x.code === this.updateGroup.get('country').value)[0].name;
this.selectedRepo.organizations[0].country = this.updateGroup.get('country').value; // countryCode
this.selectedRepo.longitude = this.updateGroup.get('longtitude').value;
this.selectedRepo.latitude = this.updateGroup.get('latitude').value;
this.selectedRepo.websiteUrl = this.updateGroup.get('websiteUrl').value;
this.selectedRepo.organization = this.updateGroup.get('institutionName').value.toString();
this.selectedRepo.englishName = this.updateGroup.get('englishName').value.toString();
this.selectedRepo.logoUrl = this.updateGroup.get('logoUrl').value;
this.selectedRepo.websiteurl = this.updateGroup.get('websiteUrl').value;
this.selectedRepo.organizations[0].legalname = this.updateGroup.get('institutionName').value.toString();
this.selectedRepo.englishname = this.updateGroup.get('englishName').value.toString();
this.selectedRepo.logourl = this.updateGroup.get('logoUrl').value;
this.selectedRepo.timezone = this.updateGroup.get('timezone').value;
this.selectedRepo.datasourceClass = this.updateGroup.get('datasourceType').value;
this.selectedRepo.contactEmail = this.updateGroup.get('adminEmail').value;
if (this.selectedRepo.datasourceType === 'journal') {
this.selectedRepo.contactemail = this.updateGroup.get('adminEmail').value;
if (this.selectedRepo.eoscDatasourceType === 'journal') {
let ssnParts = this.updateGroup.get('issn').value.split('-');
let correctSSN = ssnParts[0] + ssnParts[1];
this.selectedRepo.issn = correctSSN;
@ -313,10 +337,13 @@ export class DatasourceUpdateFormComponent implements OnInit {
this.selectedRepo.lissn = correctSSN;
}
}
if (!this.showButton) {
this.selectedRepo.registeredBy = this.authService.getUserEmail();
this.selectedRepo.registered = true;
this.selectedRepo.registrationDate = new Date(Date.now()); // NOT NEEDED ??
if (!this.showButton) { // on register
this.selectedRepo.registeredby = this.authService.getUserEmail();
this.selectedRepo.managed = true;
const now = new Date(Date.now());
this.selectedRepo.consentTermsOfUseDate = now;
this.selectedRepo.lastConsentTermsOfUseDate = now;
this.selectedRepo.registrationdate = now;
this.emittedInfo.emit(this.selectedRepo);
}
}

View File

@ -8,18 +8,35 @@
<div *ngIf="successMessage" class="uk-alert uk-alert-success">{{ successMessage }}</div>
<form *ngIf="selectedRepo && !loadingMessage" [formGroup]="agreementForm">
<br>
<!-- {{agreementForm.get('acceptTerms').value}}-->
<div *ngIf="showButton" class="uk-margin-small"> <!-- Update -->
<span>Being registered in OpenAIRE, you are giving consent to OpenAIRE to download, transform and enrich the metadata records, publishing them in the OpenAIRE Research Graph.</span>
</div>
<div *ngIf="!showButton" class="uk-margin-medium"> <!-- Register -->
<span>By registering your data source, you are giving your consent to OpenAIRE to download, transform and enrich the metadata records, publishing them in the OpenAIRE Research Graph.</span>
</div>
<form-inline>
<label><input formControlName="acceptTerms" class="uk-checkbox" type="checkbox" checked> I Agree with the </label>
<a href="https://zenodo.org/record/1446384#.XiGIAdmxU5n" target="_blank">OpenAIRE's Terms of Agreement for Content Providers</a>
<label><input formControlName="acceptTerms" class="uk-checkbox" type="checkbox" checked
[checked]="this.agreementForm.get('acceptTerms').value === true"
(change)="emitRepo()">
Accept the
</label>
<a href="https://www.openaire.eu/terms-of-use-for-content-providers" target="_blank">Terms of Use</a>
</form-inline>
<!-- {{agreementForm.get('optOut').value}}-->
<form-inline>
<label><input formControlName="optOut" class="uk-checkbox" type="checkbox"> I would like to opt out from "data mining of Open Access publications in my repository"</label>
<label><input formControlName="textMining" class="uk-checkbox" type="checkbox"
[checked]="this.agreementForm.get('textMining').value === true"
(change)="emitRepo()">
Agree to the <a href="https://www.openaire.eu/terms-of-use-for-content-providers#consent" target="_blank">re-use of full texts</a>
</label>
</form-inline>
<br>
<ng-container *ngIf="showButton">
<div class="uk-margin-top" *ngIf="selectedRepo.registrationdate">Data source registration date: {{selectedRepo.registrationdate | date}}</div>
<div class="uk-margin-small-top">Last date of acceptance of the Terms of Use: {{selectedRepo.lastConsentTermsOfUseDate ? (selectedRepo.lastConsentTermsOfUseDate | date) : '-'}}</div>
</ng-container>
<p class="uk-text-meta">Note: OpenAIRE will not provide the full text files for public distribution, the users will access from the original datasource.</p>
<div *ngIf="showButton" class="form-group">
<button class="uk-button uk-button-primary updateRepoInfoButton" type="button" (click)="updateRepo()">Update Information</button>
</div>
</form>
<!--<pre>{{agreementForm.value|json}}</pre>-->

View File

@ -19,7 +19,7 @@ export class DatasourceUpdateTermsFormComponent implements OnInit {
agreementForm = this.fb.group({
acceptTerms: '',
optOut: ''
textMining: ''
});
consentTermsOfUseDate: Date;
@ -38,8 +38,6 @@ export class DatasourceUpdateTermsFormComponent implements OnInit {
repoId: string;
formSubmitted = false;
// updateGroup: FormGroup;
termsTick: boolean;
dataMiningTick: boolean;
readonly updateGroupDefinition = {
softwarePlatform : ''
};
@ -52,20 +50,24 @@ export class DatasourceUpdateTermsFormComponent implements OnInit {
) {}
ngOnInit() {
console.log(this.selectedRepo);
// this.dataMiningTick = false; // until we have an actual value
if (this.router.url.indexOf('/sources/update') > -1) {
console.log('up');
this.termsTick = (this.selectedRepo.consentTermsOfUse ? (this.selectedRepo.consentTermsOfUse === 'true') : true);
// this.addTerm(this.selectedRepo.consentTermsOfUse, this.dataMiningTick);
} else if (this.router.url.indexOf('/sources/register') > -1) {
console.log('reg');
this.termsTick = true;
this.agreementForm.get('acceptTerms').setValue(this.selectedRepo.consentTermsOfUse ? this.selectedRepo.consentTermsOfUse : false);
this.agreementForm.get('textMining').setValue(this.selectedRepo.fullTextDownload ? this.selectedRepo.fullTextDownload : false);
this.selectedRepo.consentTermsOfUse = this.agreementForm.value.acceptTerms;
this.selectedRepo.fullTextDownload = this.agreementForm.value.textMining;
// if (this.router.url.indexOf('/sources/update') > -1) {
// console.log('update');
// } else
if (this.router.url.indexOf('/sources/register') > -1) {
this.emitRepo();
}
}
// TODO: review updateRepo when backend is ready to POST terms
emitRepo() {
this.selectedRepo.consentTermsOfUse = this.agreementForm.value.acceptTerms;
this.selectedRepo.fullTextDownload = this.agreementForm.value.textMining;
this.emittedInfo.emit(this.selectedRepo);
}
updateRepo() {
this.formSubmitted = true;
this.errorMessage = '';
@ -76,6 +78,12 @@ export class DatasourceUpdateTermsFormComponent implements OnInit {
if (this.showButton) {
this.loadingMessage = formSubmitting;
this.errorMessage = '';
this.selectedRepo.consentTermsOfUse = this.agreementForm.value.acceptTerms;
this.selectedRepo.fullTextDownload = this.agreementForm.value.textMining;
if (!this.selectedRepo.consentTermsOfUseDate) {
this.selectedRepo.consentTermsOfUseDate = new Date(Date.now());
}
this.selectedRepo.lastConsentTermsOfUseDate = new Date(Date.now());
this.repoService.updateRepository(this.selectedRepo).subscribe(
response => {
if (response) {

View File

@ -61,7 +61,7 @@
</div>
<div *ngIf="reposOfUser && reposOfUser.length>0" class="menu_section border_top">
<div class="sidebar_heading">REPOSITORIES</div>
<div class="sidebar_heading">DATASOURCES</div>
<ul>
<li *ngFor="let repo of visibleReposOfUser" [routerLinkActive]="['current_section']" class="">
@ -113,8 +113,8 @@
</a>
<ul [ngClass]="{'uk-display-block': visibleAdminRepo}">
<li class="act_item">
<a *ngIf="adminRepository?.officialName && adminRepository.officialName.length>30" [routerLink]="['/repositoryAdmin/' + adminRepository.id]">{{adminRepository.officialName.substr(0,30)}}...</a>
<a *ngIf="adminRepository?.officialName && adminRepository.officialName.length<=30" [routerLink]="['/repositoryAdmin/' + adminRepository.id]">{{adminRepository.officialName}}</a>
<a *ngIf="adminRepository?.officialname && adminRepository.officialname.length>30" [routerLink]="['/repositoryAdmin/' + adminRepository.id]">{{adminRepository.officialname.substr(0,30)}}...</a>
<a *ngIf="adminRepository?.officialname && adminRepository.officialname.length<=30" [routerLink]="['/repositoryAdmin/' + adminRepository.id]">{{adminRepository.officialname}}</a>
</li>
</ul>
</li>

View File

@ -36,37 +36,6 @@
<a class="uk-search-input" [routerLink]="['emptyPage']" [routerLinkActive]="['uk-active']">Dashboard</a>
</li>
<!--Sources-->
<!--<ul>-->
<!--<li><a [routerLink]="['sources', 'register']" [routerLinkActive]="['uk-active']">Register</a></li>-->
<!--<li><a [routerLink]="['sources', 'update']" [routerLinkActive]="['uk-active']">Update</a></li>-->
<!--</ul>-->
<!--</li>-->
<!--<li>-->
<!--Compatibility-->
<!--<ul>-->
<!--<li><a [routerLink]="['compatibility', 'validate']" [routerLinkActive]="['uk-active']">Validate</a></li>-->
<!--<li><a [routerLink]="['compatibility', 'browseHistory']" [routerLinkActive]="['uk-active']">Validation History</a></li>-->
<!--<li><a [routerLink]="['compatibility', 'monitor']" [routerLinkActive]="['uk-active']">Collection Monitor</a></li>-->
<!--</ul>-->
<!--</li>-->
<!--<li>-->
<!--Content-->
<!--<ul>-->
<!--<li><a [routerLink]="['content', 'events']" [routerLinkActive]="['uk-active']">Events</a></li>-->
<!--<li><a [routerLink]="['content', 'notifications']" [routerLinkActive]="['uk-active']">Notifications</a></li>-->
<!--</ul>-->
<!--</li>-->
<!--<li>-->
<!--<a class="uk-search-input" [routerLink]="['getImpact']" [routerLinkActive]="['uk-active']">Metrics</a>-->
<!--</li>-->
<!--<li *ngIf="getIsUserAdmin()">-->
<!--Admin-->
<!--<ul>-->
<!--<li><a href="{{adminHomePage}}" target="_blank">Help Texts</a></li>-->
<!--<li><a [routerLink]="['admin', 'metrics']" [routerLinkActive]="['uk-active']">Validate</a></li>s-->
<!--</ul>-->
<!--</li>-->
<li><a (click)="logout()">Logout</a></li>
</ul>
</div>
@ -118,7 +87,7 @@
<div class="uk-container uk-container-expand">
<nav class="uk-navbar" uk-navbar="{&quot;align&quot;:&quot;left&quot;}">
<div class="uk-navbar-left">
<a [routerLink]="['landing']" class="uk-logo uk-navbar-item">
<a [routerLink]="['join']" class="uk-logo uk-navbar-item">
<img src="../../../assets/imgs/OA_PROVIDE_B.png" alt="OpenAIRE" class="uk-responsive-height">
</a>
</div>
@ -127,19 +96,13 @@
<ul class="uk-navbar-nav" >
<li class="uk-parent" [routerLinkActive]="['uk-active']">
<a [routerLink]="['home']" [routerLinkActive]="['uk-active']">
Home
</a>
<a [routerLink]="['home']" [routerLinkActive]="['uk-active']">Home</a>
</li>
<li class="uk-parent" [routerLinkActive]="['uk-active']">
<a [routerLink]="['about']" [routerLinkActive]="['uk-active']">
About
</a>
<a [routerLink]="['about']" [routerLinkActive]="['uk-active']">About</a>
</li>
<li *ngIf="getIsUserLoggedIn()" class="uk-parent" [routerLinkActive]="['uk-active']">
<a [routerLink]="['join']" [routerLinkActive]="['uk-active']">
Dashboard
</a>
<a [routerLink]="['join']" [routerLinkActive]="['uk-active']">Dashboard</a>
</li>
<li *ngIf="!getIsUserLoggedIn()" class="uk-parent">
@ -183,55 +146,6 @@
</ul>
<!--<div class="uk-navbar-item">-->
<!--<ul *ngIf="!getIsUserLoggedIn()" class="uk-navbar-nav">-->
<!--<li class="uk-parent">-->
<!--<a class="" (click)="login()">-->
<!--Sign in-->
<!--<span class="uk-margin-small-left uk-icon">-->
<!--<svg height="20" ratio="1" viewBox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg">-->
<!--<circle cx="9.9" cy="6.4" fill="none" r="4.4" stroke="#000" stroke-width="1.1"></circle>-->
<!--<path d="M1.5,19 C2.3,14.5 5.8,11.2 10,11.2 C14.2,11.2 17.7,14.6 18.5,19.2" fill="none" stroke="#000" stroke-width="1.1"></path>-->
<!--</svg>-->
<!--</span>-->
<!--</a>-->
<!--</li>-->
<!--</ul>-->
<!--<ul *ngIf="getIsUserLoggedIn()" class="uk-navbar-nav">-->
<!--<li class="uk-parent">-->
<!--<a class="" aria-expanded="false">-->
<!--{{ getUserName() }}-->
<!--<span class="uk-margin-small-left uk-icon">-->
<!--<svg height="20" ratio="1" viewBox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg">-->
<!--<circle cx="9.9" cy="6.4" fill="none" r="4.4" stroke="#000" stroke-width="1.1"></circle>-->
<!--<path d="M1.5,19 C2.3,14.5 5.8,11.2 10,11.2 C14.2,11.2 17.7,14.6 18.5,19.2" fill="none" stroke="#000" stroke-width="1.1"></path>-->
<!--</svg>-->
<!--</span>-->
<!--</a>-->
<!--<div class="uk-navbar-dropdown uk-navbar-dropdown-bottom-left" style="top: 80px; left: 106.55px;"-->
<!--id="userMenu" (click)="onClick('userMenu')">-->
<!--<div class="uk-navbar-dropdown-grid uk-child-width-1-1 uk-grid uk-grid-stack" uk-grid="">-->
<!--<div class="uk-first-column">-->
<!--<ul class="uk-nav uk-navbar-dropdown-nav">-->
<!--&lt;!&ndash;<ul *ngIf="getIsUserAdmin()" class="uk-nav uk-navbar-dropdown-nav">&ndash;&gt;-->
<!--&lt;!&ndash;<li class="uk-nav-header" style="display: block;">Admin</li>&ndash;&gt;-->
<!--&lt;!&ndash;<li style="display: block"><a href="{{adminHomePage}}" target="_blank">Help Texts</a></li>&ndash;&gt;-->
<!--&lt;!&ndash;<li style="display: block"><a [routerLink]="['/admin/metrics']">Metrics</a></li>&ndash;&gt;-->
<!--&lt;!&ndash;<li style="display: block" class="uk-margin-small-bottom"><a [routerLink]="['/admin/registrations']">Registrations</a></li>&ndash;&gt;-->
<!--&lt;!&ndash;</ul>&ndash;&gt;-->
<!--<li><a class="" (click)="logout()">Log out</a></li>-->
<!--</ul>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</li>-->
<!--</ul>-->
<!--</div>-->
</div>
</nav>

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 476 KiB

View File

@ -9722,7 +9722,7 @@ div.ganttview .ui-resizable-w {
@media only screen and (min-width: 960px) {
.wizard > .steps > ul > li {
float: left;
width: 25%;
width: 20%;
}
}
.wizard > .steps > ul > li + li a {

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,6 @@
export const environment = {
production: true,
AAI_LOGOUT: 'https://aai.openaire.eu/proxy/saml2/idp/SingleLogoutService.php?ReturnTo=',
MATOMO_URL: 'https://analytics.openaire.eu/',
MATOMO_SITE: 92,
API_ENDPOINT: '/api',

View File

@ -1,5 +1,6 @@
export const environment = {
production: true,
AAI_LOGOUT: 'https://aai.openaire.eu/proxy/saml2/idp/SingleLogoutService.php?ReturnTo=',
MATOMO_URL: 'https://analytics.openaire.eu/',
MATOMO_SITE: 111,
API_ENDPOINT: '/api',

View File

@ -4,6 +4,7 @@
export const environment = {
production: false,
AAI_LOGOUT: 'https://aai.openaire.eu/proxy/saml2/idp/SingleLogoutService.php?ReturnTo=',
API_ENDPOINT: '/uoa-repository-manager-service',
MATOMO_URL: 'https://analytics.openaire.eu/',
MATOMO_SITE: 9222222,