Compare commits
60 Commits
Author | SHA1 | Date |
---|---|---|
Konstantinos Spyrou | 8638caf9b1 | |
Andreas Mantas | 93f22de4ec | |
Andreas Mantas | e5f25cbab1 | |
Andreas Mantas | 131081f5e8 | |
John Balasis | 0c59e9a39c | |
Antonis Lempesis | d57ce31b52 | |
Antonis Lempesis | e9763e2f07 | |
Lampros Smyrnaios | a13fb2eb40 | |
John Balasis | 62e8959029 | |
jbalasis | a1e8dcd5a0 | |
jbalasis | 0680cf8c55 | |
John Balasis | 039dea5424 | |
TheQuaker | eed8f595cd | |
jbalasis | b39bcccbd7 | |
jbalasis | ae3b932a9f | |
jbalasis | e8f69c38bb | |
jbalasis | aeb81dde96 | |
Konstantinos Spyrou | 3d58cd5ea0 | |
Stefania Martziou | b9a26ad8c1 | |
jbalasis | 10a0e7e9f1 | |
TheQuaker | f13dddf8b5 | |
TheQuaker | 2259b7b701 | |
jbalasis | 3f5919b2df | |
TheQuaker | 1d1963aeb6 | |
Konstantinos Spyrou | 1329590012 | |
Lampros Smyrnaios | 7dfbe3a51c | |
TheQuaker | 94b99f8e51 | |
Antonis Lempesis | e452c5205b | |
jbalasis | 1a790aa7ad | |
John Balasis | cd6bbdeee7 | |
John Balasis | 5e94e0c59e | |
John Balasis | 951ada0cb0 | |
John Balasis | b044244685 | |
John Balasis | 52d3c2edc0 | |
John Balasis | a4c0f7f32f | |
John Balasis | af8437ef2f | |
John Balasis | c3b14054b7 | |
John Balasis | 6621357091 | |
John Balasis | fb452386a1 | |
Konstantinos Spyrou | 4c08464797 | |
John Balasis | f12a808386 | |
John Balasis | 738fc69a79 | |
andreas.mantas | 4b00a98db2 | |
John Balasis | c3d3dceb35 | |
andreas.mantas | 2580dc6cf8 | |
andreas.mantas | b9d7fb8732 | |
John Balasis | 2b212979dd | |
John Balasis | 4c0d2e560d | |
John Balasis | 1c756566b0 | |
John Balasis | f76d88979e | |
John Balasis | 13366df06d | |
John Balasis | dd3524bc47 | |
John Balasis | 34d85bdbb8 | |
andreas.mantas | 7f0ea0db17 | |
andreas.mantas | 7250c469c6 | |
Antonis Lempesis | c6ec50f0b0 | |
stefania.martziou | 3c74f2a381 | |
Konstantinos Spyrou | c7e7a28408 | |
Konstantinos Spyrou | 17a888cff2 | |
Konstantinos Spyrou | cbff7a55ee |
|
@ -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
|
106
README.md
106
README.md
|
@ -1,30 +1,108 @@
|
||||||
# UOA Repository Manager UI
|
# 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).
|
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>
|
[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).
|
[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`.
|
1. Clone the repository and move inside the directory
|
||||||
This will install the exact versions of the dependencies as mentioned in the `package-lock.json` file (inside the root folder).
|
<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`
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
### 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
|
||||||
|
|
||||||
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>
|
|
||||||
|
|
||||||
## Other topics
|
## Other topics
|
||||||
### Development server
|
### Development server
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
30
package.json
30
package.json
|
@ -5,21 +5,23 @@
|
||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "ng serve --proxy-config proxy.conf.json",
|
"start": "ng serve --proxy-config proxy.conf.json",
|
||||||
"start:proxy": "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",
|
"test": "ng test",
|
||||||
"lint": "ng lint",
|
"lint": "ng lint",
|
||||||
"e2e": "ng e2e"
|
"e2e": "ng e2e"
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/animations": "12.1.2",
|
"@angular/animations": "12.2.17",
|
||||||
"@angular/common": "12.1.2",
|
"@angular/common": "12.2.17",
|
||||||
"@angular/compiler": "12.1.2",
|
"@angular/compiler": "12.2.17",
|
||||||
"@angular/core": "12.1.2",
|
"@angular/core": "12.2.17",
|
||||||
"@angular/forms": "12.1.2",
|
"@angular/forms": "12.2.17",
|
||||||
"@angular/platform-browser": "12.1.2",
|
"@angular/platform-browser": "12.2.17",
|
||||||
"@angular/platform-browser-dynamic": "^12.1.2",
|
"@angular/platform-browser-dynamic": "^12.2.17",
|
||||||
"@angular/router": "12.1.2",
|
"@angular/router": "12.2.17",
|
||||||
"altair": "^1.0.0",
|
"altair": "^1.0.0",
|
||||||
"bootstrap": "^4.1.3",
|
"bootstrap": "^4.1.3",
|
||||||
"core-js": "^2.5.4",
|
"core-js": "^2.5.4",
|
||||||
|
@ -35,15 +37,15 @@
|
||||||
"zone.js": "~0.11.4"
|
"zone.js": "~0.11.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular-devkit/build-angular": "~12.1.2",
|
"@angular-devkit/build-angular": "~12.2.18",
|
||||||
"@angular/cli": "~12.1.2",
|
"@angular/cli": "~12.2.18",
|
||||||
"@angular/compiler-cli": "^12.1.2",
|
"@angular/compiler-cli": "^12.2.17",
|
||||||
"@angular/language-service": "^12.1.2",
|
"@angular/language-service": "^12.2.17",
|
||||||
"@types/jasmine": "~3.6.0",
|
"@types/jasmine": "~3.6.0",
|
||||||
"@types/jasminewd2": "~2.0.3",
|
"@types/jasminewd2": "~2.0.3",
|
||||||
"@types/node": "^12.11.1",
|
"@types/node": "^12.11.1",
|
||||||
"codelyzer": "^6.0.0",
|
"codelyzer": "^6.0.0",
|
||||||
"jasmine-core": "~3.6.0",
|
"jasmine-core": "~3.8.0",
|
||||||
"jasmine-spec-reporter": "~5.0.0",
|
"jasmine-spec-reporter": "~5.0.0",
|
||||||
"karma": "~6.3.4",
|
"karma": "~6.3.4",
|
||||||
"karma-chrome-launcher": "~3.1.0",
|
"karma-chrome-launcher": "~3.1.0",
|
||||||
|
|
|
@ -3,9 +3,9 @@ import { NgModule } from '@angular/core';
|
||||||
import { HomeComponent } from './pages/landing/home/home.component';
|
import { HomeComponent } from './pages/landing/home/home.component';
|
||||||
import { AuthGuardService } from './services/auth-guard.service';
|
import { AuthGuardService } from './services/auth-guard.service';
|
||||||
import { ForbiddenPageComponent } from './shared/reusablecomponents/403-forbidden-page.component';
|
import { ForbiddenPageComponent } from './shared/reusablecomponents/403-forbidden-page.component';
|
||||||
import { EmptyPageComponent } from "./pages/emptypage/empty-page.component";
|
import { EmptyPageComponent } from './pages/emptypage/empty-page.component';
|
||||||
import { JoinComponent } from "./pages/join/join.component";
|
import { JoinComponent } from './pages/join/join.component';
|
||||||
import { AboutComponent } from "./pages/landing/about/about.component";
|
import { AboutComponent } from './pages/landing/about/about.component';
|
||||||
|
|
||||||
const appRoutes: Routes = [
|
const appRoutes: Routes = [
|
||||||
{
|
{
|
||||||
|
@ -34,22 +34,13 @@ const appRoutes: Routes = [
|
||||||
{
|
{
|
||||||
path: 'repository',
|
path: 'repository',
|
||||||
loadChildren: () => import('./pages/repository/repository.module').then(m => m.RepositoryModule),
|
loadChildren: () => import('./pages/repository/repository.module').then(m => m.RepositoryModule),
|
||||||
// loadChildren: () => import('./pages/repository/repository.module').then(m => m.RepositoryModule),
|
|
||||||
canActivate: [AuthGuardService]
|
canActivate: [AuthGuardService]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'repositoryAdmin',
|
path: 'repositoryAdmin',
|
||||||
loadChildren: () => import('./pages/repository/repository.module').then(m => m.RepositoryModule),
|
loadChildren: () => import('./pages/repository/repository.module').then(m => m.RepositoryModule),
|
||||||
// loadChildren: () => import('./pages/repository/repository.module').then(m => m.RepositoryModule),
|
|
||||||
canActivate: [AuthGuardService]
|
canActivate: [AuthGuardService]
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
// {
|
|
||||||
// path: 'dashboard',
|
|
||||||
// component: DashboardComponent,
|
|
||||||
// canActivate: [AuthGuardService]
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
path: 'sources',
|
path: 'sources',
|
||||||
loadChildren: () => import('./pages/sources/sources.module').then(m => m.SourcesModule),
|
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),
|
loadChildren: () => import('./pages/content/content.module').then(m => m.ContentModule),
|
||||||
canActivate: [AuthGuardService]
|
canActivate: [AuthGuardService]
|
||||||
},
|
},
|
||||||
// {
|
|
||||||
// path: 'getImpact',
|
|
||||||
// loadChildren: './pages/metrics/metrics.module#MetricsModule',
|
|
||||||
// canActivate: [AuthGuardService]
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
path: 'admin',
|
path: 'admin',
|
||||||
loadChildren: () => import('./pages/adminPg/adminPg.module').then(m => m.AdminPgModule),
|
loadChildren: () => import('./pages/adminPg/adminPg.module').then(m => m.AdminPgModule),
|
||||||
|
@ -77,11 +63,6 @@ const appRoutes: Routes = [
|
||||||
path: '403-forbidden',
|
path: '403-forbidden',
|
||||||
component: ForbiddenPageComponent
|
component: ForbiddenPageComponent
|
||||||
},
|
},
|
||||||
// {
|
|
||||||
// path: '',
|
|
||||||
// redirectTo: '/home',
|
|
||||||
// pathMatch: 'full'
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
// fixme redirect to 404
|
// fixme redirect to 404
|
||||||
path: '**',
|
path: '**',
|
||||||
|
|
|
@ -50,26 +50,39 @@
|
||||||
<!-- End Matomo Code -->
|
<!-- End Matomo Code -->
|
||||||
|
|
||||||
|
|
||||||
<!--<!– Terms of Use (modal) –>-->
|
<!-- Terms of Use (modal) -->
|
||||||
<!--<confirmation-dialog #subscribeToTermsModal [title]=modalTitle [isModalShown]=isModalShown-->
|
<confirmation-dialog #subscribeToTermsModal [title]=modalTitle [isModalShown]=isModalShown
|
||||||
<!-- [confirmActionButton]=modalButton (emitObject)="updateTerms()">-->
|
[confirmActionButton]=modalButton (emitObject)="updateTerms()">
|
||||||
<!-- <form class="" [formGroup]="agreementForm">-->
|
<form class="" [formGroup]="agreementForm">
|
||||||
<!-- <div formArrayName="terms">-->
|
<div formArrayName="terms">
|
||||||
<!-- <table class="table">-->
|
<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>-->
|
<tr>Thanks for being part of OpenAIRE. Please confirm the acceptance of our datasources policy.</tr>
|
||||||
<!-- <tbody>-->
|
<br>
|
||||||
<!-- <tr class="el-item" *ngFor="let term of terms.controls; let i=index">-->
|
<tr>Being registered in OpenAIRE, you are giving consent to OpenAIRE to download, transform and enrich the
|
||||||
<!--<!– {{term.get('accept').value}}–>-->
|
metadata records, publishing them in the OpenAIRE Research Graph.
|
||||||
<!-- <br> {{term.get('name').value}} <br>-->
|
</tr>
|
||||||
<!-- <div [formGroupName]="i">-->
|
<tbody>
|
||||||
<!-- <label>-->
|
<tr class="el-item" *ngFor="let term of terms.controls; let i=index">
|
||||||
<!-- <input id="i" type="checkbox" formControlName="accept"> Yes, I agree to the terms of use.-->
|
<br> {{term.get('name').value}} <br>
|
||||||
<!-- </label>-->
|
<div [formGroupName]="i">
|
||||||
<!-- </div>-->
|
<label>
|
||||||
<!-- </tr>-->
|
<input id="consentTerms" type="checkbox" formControlName="consentTermsOfUse">
|
||||||
<!-- </tbody>-->
|
Accept the <a href="https://www.openaire.eu/terms-of-use-for-content-providers" target="_blank">Terms of Use</a>
|
||||||
<!-- </table>-->
|
</label>
|
||||||
<!-- </div>-->
|
<br>
|
||||||
<!-- </form>-->
|
<label>
|
||||||
<!-- <!– <pre>{{this.agreementForm.value | json}}</pre>–>-->
|
<input id="consentText" type="checkbox" formControlName="fullTextDownload">Agree to the
|
||||||
<!--</confirmation-dialog>-->
|
<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>
|
||||||
|
|
|
@ -1,14 +1,12 @@
|
||||||
import {Component, OnInit, ViewChild} from '@angular/core';
|
import {Component, OnInit, ViewChild} from '@angular/core';
|
||||||
import { NavigationEnd, Router, RoutesRecognized } from '@angular/router';
|
import {NavigationEnd, Router} from '@angular/router';
|
||||||
import {AuthenticationService} from './services/authentication.service';
|
import {AuthenticationService} from './services/authentication.service';
|
||||||
import {environment} from '../environments/environment';
|
import {environment} from '../environments/environment';
|
||||||
import {MatomoTracker} from 'ngx-matomo';
|
import {MatomoTracker} from 'ngx-matomo';
|
||||||
import {ConfirmationDialogComponent} from './shared/reusablecomponents/confirmation-dialog.component';
|
import {ConfirmationDialogComponent} from './shared/reusablecomponents/confirmation-dialog.component';
|
||||||
import {RepositoryService} from './services/repository.service';
|
import {RepositoryService} from './services/repository.service';
|
||||||
import {RepositorySnippet} from './domain/typeScriptClasses';
|
import {RepositorySnippet} from './domain/typeScriptClasses';
|
||||||
import {FormBuilder, FormGroup, FormControl, FormArray} from '@angular/forms';
|
import {FormBuilder, FormGroup, FormArray} from '@angular/forms';
|
||||||
import {element} from 'protractor';
|
|
||||||
import {timestamp} from 'rxjs/operators';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'oa-repo-manager',
|
selector: 'oa-repo-manager',
|
||||||
|
@ -32,13 +30,10 @@ export class AppComponent implements OnInit {
|
||||||
|
|
||||||
open: boolean = true;
|
open: boolean = true;
|
||||||
|
|
||||||
constructor(private router: Router,
|
constructor(private router: Router, private authService: AuthenticationService, private matomoTracker: MatomoTracker,
|
||||||
private authService: AuthenticationService,
|
private repositoryService: RepositoryService, private fb: FormBuilder) {
|
||||||
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*/
|
/*disabling console.log in production*/
|
||||||
if ( environment.production === true ) {
|
if ( environment.production === true ) {
|
||||||
|
@ -56,63 +51,64 @@ export class AppComponent implements OnInit {
|
||||||
this.authService.tryLogin();
|
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() {
|
ngOnInit() {
|
||||||
this.router.events.subscribe((evt) => {
|
this.router.events.subscribe((evt) => {
|
||||||
if (!(evt instanceof NavigationEnd)) {
|
if (!(evt instanceof NavigationEnd)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.authService.isLoggedIn) {
|
if (this.authService.isLoggedIn_) {
|
||||||
this.matomoTracker.setUserId(this.authService.getUserEmail());
|
this.matomoTracker.setUserId(this.authService.getUserEmail());
|
||||||
}
|
}
|
||||||
window.scrollTo(0, 0);
|
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));
|
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({
|
return this.fb.group({
|
||||||
id: [id],
|
id: [id],
|
||||||
name: [name],
|
name: [name],
|
||||||
accept: [(consent ? consent : true)]
|
// accept: [(consent ? consent : true)]
|
||||||
|
consentTermsOfUse: false,
|
||||||
|
fullTextDownload: false
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ export const interfaceFormDesc = {
|
||||||
/* Desription of the Datasource Info Forms Fields */
|
/* Desription of the Datasource Info Forms Fields */
|
||||||
export const softwarePlatformDesc = {
|
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.',
|
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,
|
mandatory: true,
|
||||||
recommended: false
|
recommended: false
|
||||||
};
|
};
|
||||||
|
@ -40,14 +40,14 @@ export const platformNameDesc = {
|
||||||
|
|
||||||
export const officialNameDesc = {
|
export const officialNameDesc = {
|
||||||
desc: 'Your repository\'s/journal\'s official name.',
|
desc: 'Your repository\'s/journal\'s official name.',
|
||||||
label: 'Official Name (*)',
|
label: 'Official Name',
|
||||||
mandatory: true,
|
mandatory: true,
|
||||||
recommended: false
|
recommended: false
|
||||||
};
|
};
|
||||||
|
|
||||||
export const issnDesc = {
|
export const issnDesc = {
|
||||||
desc: 'Input your journal\'s issn (www.issn.org)',
|
desc: 'Input your journal\'s issn (www.issn.org)',
|
||||||
label: 'ISSN (*)',
|
label: 'ISSN',
|
||||||
mandatory: true,
|
mandatory: true,
|
||||||
recommended: false
|
recommended: false
|
||||||
};
|
};
|
||||||
|
@ -68,49 +68,49 @@ export const lissnDesc = {
|
||||||
|
|
||||||
export const repoDescriptionDesc = {
|
export const repoDescriptionDesc = {
|
||||||
desc: 'A description of your repository/journal',
|
desc: 'A description of your repository/journal',
|
||||||
label: 'Description (*)',
|
label: 'Description',
|
||||||
mandatory: true,
|
mandatory: true,
|
||||||
recommended: false
|
recommended: false
|
||||||
};
|
};
|
||||||
|
|
||||||
export const countryDesc = {
|
export const countryDesc = {
|
||||||
desc: 'The country where your repository/journal is located',
|
desc: 'The country where your repository/journal is located',
|
||||||
label: 'Country (*)',
|
label: 'Country',
|
||||||
mandatory: true,
|
mandatory: true,
|
||||||
recommended: false
|
recommended: false
|
||||||
};
|
};
|
||||||
|
|
||||||
export const longtitudeDesc = {
|
export const longtitudeDesc = {
|
||||||
desc: 'The (approximate) longtitude of your repository/journal\'s location',
|
desc: 'The (approximate) longtitude of your repository/journal\'s location',
|
||||||
label: 'Longtitude (*)',
|
label: 'Longtitude',
|
||||||
mandatory: true,
|
mandatory: false,
|
||||||
recommended: false
|
recommended: false
|
||||||
};
|
};
|
||||||
|
|
||||||
export const latitudeDesc = {
|
export const latitudeDesc = {
|
||||||
desc: 'The (approximate) latitude of your repository/journal\'s location',
|
desc: 'The (approximate) latitude of your repository/journal\'s location',
|
||||||
label: 'Latitude (*)',
|
label: 'Latitude',
|
||||||
mandatory: true,
|
mandatory: false,
|
||||||
recommended: false
|
recommended: false
|
||||||
};
|
};
|
||||||
|
|
||||||
export const websiteUrlDesc = {
|
export const websiteUrlDesc = {
|
||||||
desc: 'The main page of your repository/journal\'s website',
|
desc: 'The main page of your repository/journal\'s website',
|
||||||
label: 'Entry URL (*)',
|
label: 'Entry URL',
|
||||||
mandatory: true,
|
mandatory: true,
|
||||||
recommended: false
|
recommended: false
|
||||||
};
|
};
|
||||||
|
|
||||||
export const institutionNameDesc = {
|
export const institutionNameDesc = {
|
||||||
desc: 'The institution that your repository belongs to',
|
desc: 'The institution that your repository belongs to',
|
||||||
label: 'Institution (*)',
|
label: 'Institution',
|
||||||
mandatory: true,
|
mandatory: true,
|
||||||
recommended: false
|
recommended: false
|
||||||
};
|
};
|
||||||
|
|
||||||
export const englishNameDesc = {
|
export const englishNameDesc = {
|
||||||
desc: 'Your repository/journal\'s name in english',
|
desc: 'Your repository/journal\'s name in english',
|
||||||
label: 'English Name (*)',
|
label: 'English Name',
|
||||||
mandatory: true,
|
mandatory: true,
|
||||||
recommended: false
|
recommended: false
|
||||||
};
|
};
|
||||||
|
@ -124,35 +124,35 @@ export const logoUrlDesc = {
|
||||||
|
|
||||||
export const timezoneDesc = {
|
export const timezoneDesc = {
|
||||||
desc: 'The timezone of the area where your repository/ journal is located',
|
desc: 'The timezone of the area where your repository/ journal is located',
|
||||||
label: 'Timezone (*)',
|
label: 'Timezone',
|
||||||
mandatory: true,
|
mandatory: true,
|
||||||
recommended: false
|
recommended: false
|
||||||
};
|
};
|
||||||
|
|
||||||
export const datasourceTypeDesc = {
|
export const datasourceTypeDesc = {
|
||||||
desc: 'The type of your repository',
|
desc: 'The type of your repository',
|
||||||
label: 'Repository Type (*)',
|
label: 'Data source type',
|
||||||
mandatory: true,
|
mandatory: true,
|
||||||
recommended: false
|
recommended: false
|
||||||
};
|
};
|
||||||
|
|
||||||
export const journalTypeDesc = {
|
export const journalTypeDesc = {
|
||||||
desc: 'The type of your journal',
|
desc: 'The type of your journal',
|
||||||
label: 'Journal Type (*)',
|
label: 'Journal Type',
|
||||||
mandatory: true,
|
mandatory: true,
|
||||||
recommended: false
|
recommended: false
|
||||||
};
|
};
|
||||||
|
|
||||||
export const aggregatorTypeDesc = {
|
export const aggregatorTypeDesc = {
|
||||||
desc: 'The type of your aggregator',
|
desc: 'The type of your aggregator',
|
||||||
label: 'Aggregator Type (*)',
|
label: 'Aggregator Type',
|
||||||
mandatory: true,
|
mandatory: true,
|
||||||
recommended: false
|
recommended: false
|
||||||
};
|
};
|
||||||
|
|
||||||
export const adminEmailDesc = {
|
export const adminEmailDesc = {
|
||||||
desc: 'The email address of the repository/journal\'s administrator',
|
desc: 'The email address of the repository/journal\'s administrator',
|
||||||
label: 'Admin Email (*)',
|
label: 'Admin Email',
|
||||||
mandatory: true,
|
mandatory: true,
|
||||||
recommended: false
|
recommended: false
|
||||||
};
|
};
|
||||||
|
|
|
@ -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;
|
||||||
|
}
|
|
@ -79,81 +79,52 @@ export class PiwikInfo implements IsSerializable {
|
||||||
comment: string;
|
comment: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Repository extends DriverResource implements IsSerializable {
|
export class DatasourceDetails {
|
||||||
id: string;
|
id: string;
|
||||||
officialName: string;
|
openaireId: string;
|
||||||
englishName: string;
|
officialname: string;
|
||||||
websiteUrl: string;
|
englishname: string;
|
||||||
logoUrl: string;
|
websiteurl: string;
|
||||||
contactEmail: string;
|
logourl: string;
|
||||||
countryName: string;
|
contactemail: string;
|
||||||
countryCode: string;
|
|
||||||
organization: string;
|
|
||||||
latitude: number;
|
latitude: number;
|
||||||
longitude: number;
|
longitude: number;
|
||||||
timezone: number;
|
namespaceprefix: string;
|
||||||
namespacePrefix: string;
|
languages: string;
|
||||||
odNumberOfItems: string;
|
dateofvalidation: Date;
|
||||||
odNumberOfItemsDate: string;
|
eoscDatasourceType: string;
|
||||||
odPolicies: string;
|
dateofcollection: Date;
|
||||||
odLanguages: string;
|
platform: string;
|
||||||
odContentTypes: string;
|
|
||||||
collectedFrom: string;
|
|
||||||
inferred: boolean;
|
|
||||||
deletedByInference: boolean;
|
|
||||||
trust: number;
|
|
||||||
inferenceProvenance: string;
|
|
||||||
dateOfValidation: Date;
|
|
||||||
datasourceClass: string;
|
|
||||||
provenanceActionClass: string;
|
|
||||||
dateOfCollection: Date;
|
|
||||||
typology: string;
|
|
||||||
activationId: string;
|
activationId: string;
|
||||||
mergehomonyms: boolean;
|
|
||||||
description: string;
|
description: string;
|
||||||
releaseStartDate: Date;
|
|
||||||
releaseEndDate: Date;
|
|
||||||
missionStatementUrl: string;
|
|
||||||
dataProvider: boolean;
|
|
||||||
serviceProvider: boolean;
|
|
||||||
databaseAccessType: string;
|
|
||||||
dataUploadType: string;
|
|
||||||
databaseAccessRestriction: string;
|
|
||||||
dataUploadRestriction: string;
|
|
||||||
versioning: boolean;
|
|
||||||
citationGuidelineUrl: string;
|
|
||||||
qualityManagementKind: string;
|
|
||||||
pidSystems: string;
|
|
||||||
certificates: string;
|
|
||||||
aggregator: string;
|
|
||||||
issn: string;
|
issn: string;
|
||||||
eissn: string;
|
eissn: string;
|
||||||
lissn: string;
|
lissn: string;
|
||||||
|
registeredby: string;
|
||||||
|
subjects: string;
|
||||||
|
aggregator: string;
|
||||||
|
collectedfrom: string;
|
||||||
|
managed: boolean;
|
||||||
|
registrationdate: Date;
|
||||||
|
consentTermsOfUseDate: Date;
|
||||||
|
lastConsentTermsOfUseDate: Date;
|
||||||
|
consentTermsOfUse: boolean;
|
||||||
|
fullTextDownload: boolean;
|
||||||
|
organizations: OrganizationDetails[] = new Array<OrganizationDetails>();
|
||||||
|
identities: IdentitiesDetails[];
|
||||||
|
status: string;
|
||||||
|
typology: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Repository extends DatasourceDetails implements IsSerializable {
|
||||||
|
timezone: number;
|
||||||
interfaces: RepositoryInterface[];
|
interfaces: RepositoryInterface[];
|
||||||
availableDiskSpace: string;
|
|
||||||
securityParameters: string;
|
|
||||||
protocol: string;
|
|
||||||
registeredBy: string;
|
|
||||||
datasourceType: string;
|
|
||||||
datasourceAggregatorId: string;
|
|
||||||
datasourceOriginalIdValue: string;
|
|
||||||
datasourceOriginalIdProvenance: string;
|
|
||||||
datasourceAggregated: boolean;
|
|
||||||
datasourceComplianceDegreeValue: string;
|
|
||||||
datasourceComplianceDegreeEncoding: string;
|
|
||||||
numberOfObjects: number;
|
|
||||||
maxSizeOfDatastructure: number;
|
|
||||||
maxNumberOfDataStructures: number;
|
|
||||||
registered: boolean;
|
|
||||||
extraFields: { [index: string]: string };
|
|
||||||
piwikInfo: PiwikInfo;
|
piwikInfo: PiwikInfo;
|
||||||
environments: string[];
|
environments: string[];
|
||||||
registrationDate: Date;
|
namespacePrefix: string;
|
||||||
verified: boolean;
|
dateOfValidation: Date;
|
||||||
|
dateOfCollection: Date;
|
||||||
dataCollectionTypes: DataCollectionType[];
|
dataCollectionTypes: DataCollectionType[];
|
||||||
consentTermsOfUse: string;
|
|
||||||
consentTermsOfUseDate: Date;
|
|
||||||
fullTextDownload: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export class RepositorySnippet {
|
export class RepositorySnippet {
|
||||||
|
@ -161,24 +132,26 @@ export class RepositorySnippet {
|
||||||
officialname: string;
|
officialname: string;
|
||||||
englishname: string;
|
englishname: string;
|
||||||
websiteurl: string;
|
websiteurl: string;
|
||||||
typology: string;
|
|
||||||
registeredby: string;
|
registeredby: string;
|
||||||
organizations: Organization[];
|
|
||||||
registrationdate: Date;
|
registrationdate: Date;
|
||||||
piwikInfo: PiwikInfo;
|
eoscDatasourceType: string;
|
||||||
logoUrl: string;
|
logoUrl: string;
|
||||||
description: string;
|
description: string;
|
||||||
consentTermsOfUse: string;
|
consentTermsOfUse: boolean;
|
||||||
consentTermsOfUseDate: Date;
|
consentTermsOfUseDate: Date;
|
||||||
fullTextDownload: string;
|
lastConsentTermsOfUseDate: Date;
|
||||||
|
fullTextDownload: boolean;
|
||||||
|
organizations: OrganizationDetails[];
|
||||||
|
typology: string;
|
||||||
|
piwikInfo: PiwikInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Organization {
|
export class TermsOfUse {
|
||||||
country: string;
|
id: string;
|
||||||
legalname: string;
|
name: string;
|
||||||
websiteurl: string;
|
consentTermsOfUse: boolean;
|
||||||
legalshortname: string;
|
fullTextDownload: boolean;
|
||||||
logourl: string;
|
consentTermsOfUseDate: Date;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class RepositoryAccessProtocol {
|
export class RepositoryAccessProtocol {
|
||||||
|
@ -204,31 +177,68 @@ export class RepositoryBlackboardMessage {
|
||||||
export class RepositoryComparator implements Comparator<Repository> {
|
export class RepositoryComparator implements Comparator<Repository> {
|
||||||
}
|
}
|
||||||
|
|
||||||
export class RepositoryInterface implements Serializable, IsSerializable {
|
// export class RepositoryInterface implements Serializable, IsSerializable {
|
||||||
desiredCompatibilityLevel: string;
|
// desiredCompatibilityLevel: string;
|
||||||
complianceName: string;
|
// complianceName: string;
|
||||||
upgradeToV3: string;
|
// upgradeToV3: string;
|
||||||
deleteApi: boolean;
|
// deleteApi: boolean;
|
||||||
accessSet: string;
|
// accessSet: string;
|
||||||
accessFormat: string;
|
// accessFormat: string;
|
||||||
metadataIdentifierPath: string;
|
// metadataIdentifierPath: string;
|
||||||
lastCollectionDate: string;
|
// lastCollectionDate: string;
|
||||||
nextScheduledExecution: string;
|
// nextScheduledExecution: string;
|
||||||
status: string;
|
// status: string;
|
||||||
collectedFrom: string;
|
// collectedFrom: string;
|
||||||
|
// id: string;
|
||||||
|
// typology: string;
|
||||||
|
// compatibility: string;
|
||||||
|
// contentdescription: string;
|
||||||
|
// protocol: string;
|
||||||
|
// baseurl: string;
|
||||||
|
// active: boolean;
|
||||||
|
// removable: boolean;
|
||||||
|
// apiParams: { [index: string]: string };
|
||||||
|
// extraFields: { [index: string]: string };
|
||||||
|
// comments: string;
|
||||||
|
// }
|
||||||
|
|
||||||
|
export class ApiDetails {
|
||||||
id: string;
|
id: string;
|
||||||
typology: string;
|
protocol: string;
|
||||||
compliance: string;
|
datasource: string;
|
||||||
contentDescription: string;
|
contentdescription: string;
|
||||||
accessProtocol: string;
|
eoscDatasourceType: string;
|
||||||
baseUrl: string;
|
compatibility: string;
|
||||||
active: boolean;
|
compatibilityOverride: string;
|
||||||
|
lastCollectionTotal: number;
|
||||||
|
lastCollectionDate: Date;
|
||||||
|
lastAggregationTotal: number;
|
||||||
|
lastAggregationDate: Date;
|
||||||
|
lastDownloadTotal: number;
|
||||||
|
lastDownloadDate: Date;
|
||||||
|
baseurl: string;
|
||||||
removable: boolean;
|
removable: boolean;
|
||||||
accessParams: { [index: string]: string };
|
apiParams: ApiParamDetails[] = new Array<ApiParamDetails>();
|
||||||
extraFields: { [index: string]: string };
|
metadataIdentifierPath: string;
|
||||||
|
typology: string;
|
||||||
comments: string;
|
comments: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class RepositoryInterface extends ApiDetails {
|
||||||
|
desiredCompatibilityLevel: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class ApiParamDetails {
|
||||||
|
param: string;
|
||||||
|
value: string;
|
||||||
|
|
||||||
|
constructor(param, value) {
|
||||||
|
this.param = param;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
export class SearchCriteriaImpl implements SearchCriteria {
|
export class SearchCriteriaImpl implements SearchCriteria {
|
||||||
startsWith: string;
|
startsWith: string;
|
||||||
endsWith: string;
|
endsWith: string;
|
||||||
|
@ -591,18 +601,27 @@ export interface Comparator<T> {
|
||||||
export interface Comparable<T> {
|
export interface Comparable<T> {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ConditionOperator = "EXACT" | "MATCH_ANY" | "MATCH_ALL" | "RANGE";
|
export type ConditionOperator = 'EXACT' | 'MATCH_ANY' | 'MATCH_ALL' | 'RANGE';
|
||||||
|
|
||||||
export type MapValueType = "STRING" | "INTEGER" | "FLOAT" | "DATE" | "BOOLEAN" | "LIST_STRING" | "LIST_INTEGER" | "LIST_FLOAT" | "LIST_DATE" | "LIST_BOOLEAN";
|
export type MapValueType =
|
||||||
|
'STRING'
|
||||||
|
| 'INTEGER'
|
||||||
|
| 'FLOAT'
|
||||||
|
| 'DATE'
|
||||||
|
| 'BOOLEAN'
|
||||||
|
| 'LIST_STRING'
|
||||||
|
| 'LIST_INTEGER'
|
||||||
|
| 'LIST_FLOAT'
|
||||||
|
| 'LIST_DATE'
|
||||||
|
| 'LIST_BOOLEAN';
|
||||||
|
|
||||||
export type NotificationFrequency = "never" | "realtime" | "daily" | "weekly" | "monthly";
|
export type NotificationFrequency = 'never' | 'realtime' | 'daily' | 'weekly' | 'monthly';
|
||||||
|
|
||||||
export type NotificationMode = "MOCK" | "EMAIL";
|
export type NotificationMode = 'MOCK' | 'EMAIL';
|
||||||
|
|
||||||
export type Action = "CREATE" | "DELETE" | "UPDATE" | "MANAGE" | "RELEASE" | "CANCEL";
|
export type Action = 'CREATE' | 'DELETE' | 'UPDATE' | 'MANAGE' | 'RELEASE' | 'CANCEL';
|
||||||
|
|
||||||
export type ActionStatus = "DONE" | "ONGOING" | "FAILED" | "WAITING" | "ASSIGNED";
|
|
||||||
|
|
||||||
|
export type ActionStatus = 'DONE' | 'ONGOING' | 'FAILED' | 'WAITING' | 'ASSIGNED';
|
||||||
|
|
||||||
|
|
||||||
export class Country {
|
export class Country {
|
||||||
|
@ -659,11 +678,12 @@ export class Typology {
|
||||||
}
|
}
|
||||||
|
|
||||||
export class AggregationDetails implements IsSerializable {
|
export class AggregationDetails implements IsSerializable {
|
||||||
aggregationStage: string;
|
|
||||||
date: Date;
|
date: Date;
|
||||||
numberOfRecords: number;
|
aggregationStage: string; // is present when aggregationStage==='COLLECT'
|
||||||
collectionMode: string;
|
collectionMode: string;
|
||||||
|
numberOfRecords: number;
|
||||||
indexedVersion: boolean;
|
indexedVersion: boolean;
|
||||||
|
completedSuccessfully: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Aggregations implements IsSerializable {
|
export class Aggregations implements IsSerializable {
|
||||||
|
@ -713,7 +733,7 @@ export class BrokerSummary {
|
||||||
}
|
}
|
||||||
|
|
||||||
export class CollectionMonitorSummary {
|
export class CollectionMonitorSummary {
|
||||||
aggregationDetails: AggregationDetails[];
|
aggregationInfo: AggregationDetails[];
|
||||||
lastIndexedVersion: AggregationDetails;
|
lastIndexedVersion: AggregationDetails;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -723,3 +743,16 @@ export class User {
|
||||||
lastName: string;
|
lastName: string;
|
||||||
email: string;
|
email: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class OrganizationDetails {
|
||||||
|
legalshortname: string;
|
||||||
|
legalname: string;
|
||||||
|
websiteurl: string;
|
||||||
|
logourl: string;
|
||||||
|
country: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class IdentitiesDetails {
|
||||||
|
pid: string;
|
||||||
|
issuertype: string;
|
||||||
|
}
|
||||||
|
|
|
@ -1,41 +1,234 @@
|
||||||
export const typologies = [
|
export const typologies = [
|
||||||
{ value: '', name: '[Other] (enter name below)' },
|
{
|
||||||
{ value: 'CONTENTdm', name: 'CONTENTdm' },
|
value: '',
|
||||||
{ value: 'Digibib', name: 'Digibib' },
|
name: '[Other] (enter name below)'
|
||||||
{ value: 'Digital Commons', name: 'Digital Commons' },
|
},
|
||||||
{ value: 'DigiTool', name: 'DigiTool' },
|
{
|
||||||
{ value: 'DIVA', name: 'DIVA' },
|
value: 'Avesis',
|
||||||
{ value: 'Diva-Portal', name: 'Diva-Portal' },
|
name: 'Avesis'
|
||||||
{ value: 'dLibra', name: 'dLibra' },
|
},
|
||||||
{ value: 'Doks', name: 'Doks' },
|
{
|
||||||
{ value: 'Drupal', name: 'Drupal' },
|
value: 'CKAN',
|
||||||
{ value: 'DSpace', name: 'DSpace' },
|
name: 'CKAN'
|
||||||
{ value: 'Earmas', name: 'Earmas' },
|
},
|
||||||
{ value: 'EPrints', name: 'EPrints' },
|
{
|
||||||
{ value: 'ETD', name: 'ETD' },
|
value: 'CONTENTdm',
|
||||||
{ value: 'ETD - db', name: 'ETD - db' },
|
name: 'CONTENTdm'
|
||||||
{ value: 'Fedora', name: 'Fedora' },
|
},
|
||||||
{ value: 'Fez', name: 'Fez' },
|
{
|
||||||
{ value: 'Greenstone', name: 'Greenstone' },
|
value: 'Converis',
|
||||||
{ value: 'HAL', name: 'HAL' },
|
name: 'Converis'
|
||||||
{ value: 'invenio', name: 'invenio' },
|
},
|
||||||
{ value: 'MyCoRe', name: 'MyCoRe' },
|
{
|
||||||
{ value: 'Open Repository', name: 'Open Repository' },
|
value: 'CRIStin',
|
||||||
{ value: 'OPUS', name: 'OPUS' },
|
name: 'CRIStin'
|
||||||
{ value: 'Pica - Verbundkatalog', name: 'Pica - Verbundkatalog' },
|
},
|
||||||
{ value: 'Proprietary Software', name: 'Proprietary Software' },
|
{
|
||||||
{ value: 'PUMA', name: 'PUMA' },
|
value: 'DataVerse',
|
||||||
{ value: 'PURE', name: 'PURE' },
|
name: 'DataVerse'
|
||||||
{ value: 'SciELO', name: 'SciELO' },
|
},
|
||||||
{ value: 'SFIX', name: 'SFIX' },
|
{
|
||||||
{ value: 'VITAL', name: 'VITAL' },
|
value: 'Dialnet',
|
||||||
{ value: 'VTOAI', name: 'VTOAI' },
|
name: 'Dialnet CRIS'
|
||||||
{ value: 'WEKO', name: 'WEKO' },
|
},
|
||||||
{ value: 'XooNIps', name: 'XooNIps' },
|
{
|
||||||
{ value: 'OJS', name: 'OJS' },
|
value: 'Digibib',
|
||||||
{ value: 'HyperJournal', name: 'HyperJournal' },
|
name: 'Digibib'
|
||||||
{ value: 'ePubTk', name: 'ePubTk' },
|
},
|
||||||
{ value: 'GAPworks', name: 'GAPworks' },
|
{
|
||||||
{ value: 'DPubS', name: 'DPubS' },
|
value: 'Digital Commons',
|
||||||
{ value: 'E - Journal', name: 'E - Journal' },
|
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'
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
|
@ -74,7 +74,7 @@ export class ReportItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
export class ReportResponse {
|
export class ReportResponse {
|
||||||
"@Created": string;
|
'@Created': string;
|
||||||
Exception: ReportException[];
|
Exception: ReportException[];
|
||||||
Requestor: Requestor;
|
Requestor: Requestor;
|
||||||
ReportDefinition: ReportDefinition;
|
ReportDefinition: ReportDefinition;
|
||||||
|
|
|
@ -121,7 +121,7 @@
|
||||||
<!-- REPOSITORY CARD -->
|
<!-- REPOSITORY CARD -->
|
||||||
<div *ngFor="let res of repositorySnippet" class="md-card repositoryCard">
|
<div *ngFor="let res of repositorySnippet" class="md-card repositoryCard">
|
||||||
<div class="md-card-content large-padding">
|
<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="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">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>
|
<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>
|
||||||
|
|
|
@ -25,26 +25,26 @@
|
||||||
<div class="steps clearfix">
|
<div class="steps clearfix">
|
||||||
<ul role="tablist">
|
<ul role="tablist">
|
||||||
<li role="tab" class="first {{ (currentStep == 0) ? 'current' : '' }}" aria-disabled="false" aria-selected="true">
|
<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="current-info audible">current step: </span>-->
|
||||||
<span class="number">1</span>
|
<span class="number">1</span>
|
||||||
<span class="title">Select datasource</span>
|
<span class="title">Select datasource</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li role="tab" class="{{ (currentStep < 1) ? 'disabled' : '' }} {{ (currentStep == 1) ? 'current' : '' }}" aria-disabled="true">
|
<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="number">2</span>
|
||||||
<span class="title">{{ (type === 'cris') ? 'Finish' : 'Select guidelines' }}</span>
|
<span class="title">{{ (type === 'cris') ? 'Finish' : 'Select guidelines' }}</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li *ngIf="(type !== 'cris')" role="tab" class=" {{ (currentStep < 2) ? 'disabled' : '' }} {{ (currentStep == 2) ? 'current' : '' }}" aria-disabled="true">
|
<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="number">3</span>
|
||||||
<span class="title">Select parameters</span>
|
<span class="title">Select parameters</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li *ngIf="(type !== 'cris')" role="tab" class="last {{ (currentStep < 3) ? 'disabled' : '' }} {{ (currentStep == 3) ? 'current' : '' }}" aria-disabled="true">
|
<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="number">4</span>
|
||||||
<span class="title">Finish</span>
|
<span class="title">Finish</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -72,11 +72,11 @@ export class CompatibilityValidationResultsComponent implements OnInit {
|
||||||
if (this.jobSummary.resultEntries && this.jobSummary.resultEntries.length) {
|
if (this.jobSummary.resultEntries && this.jobSummary.resultEntries.length) {
|
||||||
this.jobSummary.resultEntries.forEach(
|
this.jobSummary.resultEntries.forEach(
|
||||||
entry => {
|
entry => {
|
||||||
if (entry.type === 'content') {
|
if (entry.type.toLowerCase() === 'content') {
|
||||||
this.contentResults.push(entry);
|
this.contentResults.push(entry);
|
||||||
this.ruleNameForContent.push(entry.name);
|
this.ruleNameForContent.push(entry.name);
|
||||||
this.unprocessedDataForContent.push(entry.successes.split('/')[0]);
|
this.unprocessedDataForContent.push(entry.successes.split('/')[0]);
|
||||||
} else if (entry.type === 'usage') {
|
} else if (entry.type.toLowerCase() === 'usage') {
|
||||||
this.usageResults.push(entry);
|
this.usageResults.push(entry);
|
||||||
this.ruleNameForUsage.push(entry.name);
|
this.ruleNameForUsage.push(entry.name);
|
||||||
this.unprocessedDataForUsage.push(entry.successes.split('/')[0]);
|
this.unprocessedDataForUsage.push(entry.successes.split('/')[0]);
|
||||||
|
@ -86,7 +86,7 @@ export class CompatibilityValidationResultsComponent implements OnInit {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
console.log(error);
|
console.error(error);
|
||||||
this.errorMessage = loadingJobSummaryError;
|
this.errorMessage = loadingJobSummaryError;
|
||||||
this.loadingMessage = '';
|
this.loadingMessage = '';
|
||||||
},
|
},
|
||||||
|
|
|
@ -51,6 +51,90 @@
|
||||||
</div>
|
</div>
|
||||||
</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">
|
<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>
|
<h2 class="uk-text-center">PROVIDE Dashboard brings all your data together</h2>
|
||||||
|
@ -321,7 +405,7 @@
|
||||||
<div style="display: block; text-align: center">
|
<div style="display: block; text-align: center">
|
||||||
<img width="55" src="../../../../assets/imgs/landing/Agreement%20color.svg">
|
<img width="55" src="../../../../assets/imgs/landing/Agreement%20color.svg">
|
||||||
</div>
|
</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>
|
<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>
|
</div>
|
||||||
|
|
||||||
|
@ -334,7 +418,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-margin-bottom uk-margin-top" style="font-weight: 600">Support</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>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>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -487,6 +571,88 @@
|
||||||
</div>
|
</div>
|
||||||
</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">
|
<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>
|
<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-first-column">
|
||||||
<div class="uk-margin-medium-left uk-margin-medium-top uk-margin-medium-bottom">
|
<div class="uk-margin-medium-left uk-margin-medium-top uk-margin-medium-bottom">
|
||||||
<img width="55" src="../../../../assets/imgs/landing/Agreement%20color.svg">
|
<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>
|
<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>
|
</div>
|
||||||
|
|
||||||
|
@ -763,7 +929,7 @@
|
||||||
<img width="38" src="../../../../assets/imgs/landing/Support%20color.svg">
|
<img width="38" src="../../../../assets/imgs/landing/Support%20color.svg">
|
||||||
<div class="uk-margin-bottom uk-margin-top" style="font-weight: 600">Support</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>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>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -820,7 +986,7 @@
|
||||||
<div class="uk-first-column">
|
<div class="uk-first-column">
|
||||||
<div class="uk-margin-medium-left uk-margin-medium-top uk-margin-medium-bottom">
|
<div class="uk-margin-medium-left uk-margin-medium-top uk-margin-medium-bottom">
|
||||||
<img width="55" src="../../../../assets/imgs/landing/Agreement%20color.svg">
|
<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>
|
<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>
|
</div>
|
||||||
|
|
||||||
|
@ -831,7 +997,7 @@
|
||||||
<img width="38" src="../../../../assets/imgs/landing/Support%20color.svg">
|
<img width="38" src="../../../../assets/imgs/landing/Support%20color.svg">
|
||||||
<div class="uk-margin-bottom uk-margin-top" style="font-weight: 600">Support</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>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>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -26,9 +26,9 @@ export class HomeComponent implements OnInit {
|
||||||
const baseUrl = window.location.origin;
|
const baseUrl = window.location.origin;
|
||||||
this.inBeta = ( baseUrl.includes('beta') || baseUrl.includes('athenarc') );
|
this.inBeta = ( baseUrl.includes('beta') || baseUrl.includes('athenarc') );
|
||||||
|
|
||||||
let body = document.getElementsByTagName('body')[0];
|
const body = document.getElementsByTagName('body')[0];
|
||||||
body.classList.remove("dashboard");
|
body.classList.remove('dashboard');
|
||||||
body.classList.add("landing");
|
body.classList.add('landing');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ export class HomeComponent implements OnInit {
|
||||||
},
|
},
|
||||||
error => console.log(error),
|
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()) {
|
if (this.authService.getIsUserLoggedIn()) {
|
||||||
this.router.navigate([pageUrl]);
|
this.router.navigate([pageUrl]);
|
||||||
} else {
|
} else {
|
||||||
this.authService.redirectUrl = pageUrl;
|
// this.authService.redirectUrl = pageUrl;
|
||||||
this.login();
|
this.login();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 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><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.aggregationStage">{{ aggr.aggregationStage }}</span></td>
|
||||||
<td class=""><span *ngIf="aggr.collectionMode">{{ aggr.collectionMode }}</span></td>
|
<td class=""><span>{{ aggr.collectionMode ? aggr.collectionMode : '-'}}</span></td>
|
||||||
<td class="uk-text-center"><span *ngIf="aggr.numberOfRecords">{{ aggr.numberOfRecords }}</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>
|
<td class="uk-text-center"><span *ngIf="aggr.indexedVersion !== null && (aggr.indexedVersion === true)" class="uk-badge">Indexed version</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
@ -30,7 +30,7 @@ export class CompatibilityMonitorFullHistoryRepoComponent implements OnInit {
|
||||||
|
|
||||||
if(this.sharedService.getRepository()) {
|
if(this.sharedService.getRepository()) {
|
||||||
this.repo = this.sharedService.getRepository();
|
this.repo = this.sharedService.getRepository();
|
||||||
this.repoName = this.repo.officialName;
|
this.repoName = this.repo.officialname;
|
||||||
this.getAllAggregationHistory();
|
this.getAllAggregationHistory();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ export class CompatibilityMonitorFullHistoryRepoComponent implements OnInit {
|
||||||
r => {
|
r => {
|
||||||
this.repo = r;
|
this.repo = r;
|
||||||
if (this.repo) {
|
if (this.repo) {
|
||||||
this.repoName = this.repo.officialName;
|
this.repoName = this.repo.officialname;
|
||||||
this.getAllAggregationHistory();
|
this.getAllAggregationHistory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,7 +74,7 @@
|
||||||
<span class="uk-text-small uk-text-muted">{{ aggr.collectionMode }}</span>
|
<span class="uk-text-small uk-text-muted">{{ aggr.collectionMode }}</span>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li *ngIf="aggr.numberOfRecords">
|
<li>
|
||||||
<!--<div class="md-list-addon-element">-->
|
<!--<div class="md-list-addon-element">-->
|
||||||
<!--<span class="md-user-image md-list-addon-avatar dense-image dense-ready">-->
|
<!--<span class="md-user-image md-list-addon-avatar dense-image dense-ready">-->
|
||||||
<!--<i class="material-icons">list</i>-->
|
<!--<i class="material-icons">list</i>-->
|
||||||
|
@ -82,7 +82,13 @@
|
||||||
<!--</div>-->
|
<!--</div>-->
|
||||||
<div class="md-list-content">
|
<div class="md-list-content">
|
||||||
<span class="md-list-heading">Number of records</span>
|
<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>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -29,7 +29,7 @@ export class CompatibilityMonitorRepoComponent implements OnInit {
|
||||||
|
|
||||||
if(this.sharedService.getRepository()) {
|
if(this.sharedService.getRepository()) {
|
||||||
this.repo = this.sharedService.getRepository();
|
this.repo = this.sharedService.getRepository();
|
||||||
this.repoName = this.repo.officialName;
|
this.repoName = this.repo.officialname;
|
||||||
this.getLatestAggregationHistory();
|
this.getLatestAggregationHistory();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ export class CompatibilityMonitorRepoComponent implements OnInit {
|
||||||
r => {
|
r => {
|
||||||
this.repo = r;
|
this.repo = r;
|
||||||
if (this.repo) {
|
if (this.repo) {
|
||||||
this.repoName = this.repo.officialName;
|
this.repoName = this.repo.officialname;
|
||||||
this.getLatestAggregationHistory();
|
this.getLatestAggregationHistory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -144,7 +144,7 @@
|
||||||
</div>
|
</div>
|
||||||
</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">-->
|
<!--<div class="inline-block" style="vertical-align: top">-->
|
||||||
<!--<span class="md-user-image md-list-addon-avatar dense-image dense-ready">-->
|
<!--<span class="md-user-image md-list-addon-avatar dense-image dense-ready">-->
|
||||||
<!--<i class="material-icons">list</i>-->
|
<!--<i class="material-icons">list</i>-->
|
||||||
|
@ -153,7 +153,14 @@
|
||||||
|
|
||||||
<div class="">
|
<div class="">
|
||||||
<div class="md-list-heading">Number of records</div>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -373,7 +380,7 @@
|
||||||
<div *ngIf="!brokerSummary || !brokerSummary.userSubs">No notifications were found</div>
|
<div *ngIf="!brokerSummary || !brokerSummary.userSubs">No notifications were found</div>
|
||||||
<div *ngIf="brokerSummary && brokerSummary.userSubs">
|
<div *ngIf="brokerSummary && brokerSummary.userSubs">
|
||||||
<ul class="md-list md-list-addon gmap_list">
|
<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">
|
<div class="md-list-addon-element">
|
||||||
<span>{{ sub.count | number }}</span>
|
<span>{{ sub.count | number }}</span>
|
||||||
<!--<img class="md-user-image md-list-addon-avatar" src="assets/img/avatars/avatar_01_tn.png" alt="">-->
|
<!--<img class="md-user-image md-list-addon-avatar" src="assets/img/avatars/avatar_01_tn.png" alt="">-->
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Component, OnInit } from '@angular/core';
|
import {Component, OnDestroy, OnInit} from '@angular/core';
|
||||||
import { AuthenticationService } from '../../../services/authentication.service';
|
import { AuthenticationService } from '../../../services/authentication.service';
|
||||||
import { RepositoryService } from '../../../services/repository.service';
|
import { RepositoryService } from '../../../services/repository.service';
|
||||||
import {
|
import {
|
||||||
|
@ -16,15 +16,15 @@ import {DashboardService} from '../../../services/dashboard.service';
|
||||||
import {DomSanitizer, SafeResourceUrl} from '@angular/platform-browser';
|
import {DomSanitizer, SafeResourceUrl} from '@angular/platform-browser';
|
||||||
import {PiwikService} from '../../../services/piwik.service';
|
import {PiwikService} from '../../../services/piwik.service';
|
||||||
import {ValidatorService} from '../../../services/validator.service';
|
import {ValidatorService} from '../../../services/validator.service';
|
||||||
import {ActivatedRoute} from "@angular/router";
|
import {ActivatedRoute} from '@angular/router';
|
||||||
import {SharedService} from "../../../services/shared.service";
|
import {SharedService} from '../../../services/shared.service';
|
||||||
|
|
||||||
@Component ({
|
@Component ({
|
||||||
selector: 'app-dashboard',
|
selector: 'app-dashboard',
|
||||||
templateUrl: 'dashboard.component.html'
|
templateUrl: 'dashboard.component.html'
|
||||||
})
|
})
|
||||||
|
|
||||||
export class DashboardComponent implements OnInit {
|
export class DashboardComponent implements OnInit, OnDestroy {
|
||||||
|
|
||||||
repository: Repository = null;
|
repository: Repository = null;
|
||||||
errorMessage: string;
|
errorMessage: string;
|
||||||
|
@ -93,24 +93,20 @@ export class DashboardComponent implements OnInit {
|
||||||
this.getSelectedRepositorySummaryInfo(this.repository);
|
this.getSelectedRepositorySummaryInfo(this.repository);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.sharedService.repository$.subscribe(
|
const body = document.getElementsByTagName('body')[0];
|
||||||
r => {
|
body.classList.remove('top_bar_active');
|
||||||
this.repository = r;
|
body.classList.remove('page_heading_active');
|
||||||
// console.log("RepositoryID: ", this.repository.id);
|
body.classList.remove('landing');
|
||||||
this.getSelectedRepositorySummaryInfo(this.repository);
|
body.classList.add('dashboard');
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
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 currentTime = new Date();
|
const currentTime = new Date();
|
||||||
this.currentDate = currentTime.getFullYear() + '-' + (currentTime.getMonth() + 1);
|
this.currentDate = currentTime.getFullYear() + '-' + (currentTime.getMonth() + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ngOnDestroy() {
|
||||||
|
// this.sharedService.repository.unsubscribe();
|
||||||
|
}
|
||||||
|
|
||||||
getSelectedRepositorySummaryInfo(repository: Repository) {
|
getSelectedRepositorySummaryInfo(repository: Repository) {
|
||||||
|
|
||||||
// Aggregations
|
// Aggregations
|
||||||
|
@ -187,7 +183,7 @@ export class DashboardComponent implements OnInit {
|
||||||
this.validatorService.getValidationSummary(repository.id).subscribe(
|
this.validatorService.getValidationSummary(repository.id).subscribe(
|
||||||
validationSummary => {
|
validationSummary => {
|
||||||
this.storedJob = validationSummary;
|
this.storedJob = validationSummary;
|
||||||
console.log(validationSummary);
|
// console.log(validationSummary);
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
this.errorValidationsMessage = loadingJobSummaryError;
|
this.errorValidationsMessage = loadingJobSummaryError;
|
||||||
|
@ -203,7 +199,7 @@ export class DashboardComponent implements OnInit {
|
||||||
|
|
||||||
getCollectionMonitorSummary(collectionMonitorSummary: CollectionMonitorSummary) {
|
getCollectionMonitorSummary(collectionMonitorSummary: CollectionMonitorSummary) {
|
||||||
|
|
||||||
this.latestAggregations = collectionMonitorSummary.aggregationDetails;
|
this.latestAggregations = collectionMonitorSummary.aggregationInfo;
|
||||||
this.lastIndexedVersion = collectionMonitorSummary.lastIndexedVersion;
|
this.lastIndexedVersion = collectionMonitorSummary.lastIndexedVersion;
|
||||||
|
|
||||||
if ( !this.latestAggregations || (this.latestAggregations.length === 0) ) {
|
if ( !this.latestAggregations || (this.latestAggregations.length === 0) ) {
|
||||||
|
@ -227,7 +223,7 @@ export class DashboardComponent implements OnInit {
|
||||||
this.totalMore = 0;
|
this.totalMore = 0;
|
||||||
this.totalMissing = 0;
|
this.totalMissing = 0;
|
||||||
if (brokerSummary.topicsForDatasource) {
|
if (brokerSummary.topicsForDatasource) {
|
||||||
for (let browseEntry of brokerSummary.topicsForDatasource) {
|
for (const browseEntry of brokerSummary.topicsForDatasource) {
|
||||||
this.totalNumberOfEvents += browseEntry.size;
|
this.totalNumberOfEvents += browseEntry.size;
|
||||||
if (browseEntry.value.startsWith('ENRICH/MORE')) {
|
if (browseEntry.value.startsWith('ENRICH/MORE')) {
|
||||||
this.totalMore += browseEntry.size;
|
this.totalMore += browseEntry.size;
|
||||||
|
@ -272,18 +268,18 @@ export class DashboardComponent implements OnInit {
|
||||||
|
|
||||||
getViewsUrl () {
|
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(`${this.repoMetrics.diagramsBaseURL}chart?json=${encodedURL}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
getDownloadsUrl () {
|
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(`${this.repoMetrics.diagramsBaseURL}chart?json=${encodedURL}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
getCorrectName() {
|
getCorrectName() {
|
||||||
const temp = this.repository.officialName.split('|');
|
const temp = this.repository.officialname.split('|');
|
||||||
let correctName = temp[0];
|
let correctName = temp[0];
|
||||||
let repoName = temp[0];
|
let repoName = temp[0];
|
||||||
for (let i = 1; i < temp.length; i++) {
|
for (let i = 1; i < temp.length; i++) {
|
||||||
|
|
|
@ -74,7 +74,7 @@ export class ContentEventsOfRepoEventslistComponent implements OnInit {
|
||||||
|
|
||||||
|
|
||||||
if(this.sharedService.getRepository()) {
|
if(this.sharedService.getRepository()) {
|
||||||
this.repoName = this.sharedService.getRepository().officialName;
|
this.repoName = this.sharedService.getRepository().officialname;
|
||||||
this.initQuery();
|
this.initQuery();
|
||||||
this.initForm();
|
this.initForm();
|
||||||
this.currentPage = 0; /* DELETE WHEN ADVANCED SHOW EVENTS IS FIXED AND SENDS CORRECT VALUE FOR CURRENT PAGE */
|
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(
|
this.sharedService.repository$.subscribe(
|
||||||
r => {
|
r => {
|
||||||
if (r) {
|
if (r) {
|
||||||
this.repoName = r.officialName;
|
this.repoName = r.officialname;
|
||||||
this.initQuery();
|
this.initQuery();
|
||||||
this.initForm();
|
this.initForm();
|
||||||
this.currentPage = 0; /* DELETE WHEN ADVANCED SHOW EVENTS IS FIXED AND SENDS CORRECT VALUE FOR CURRENT PAGE */
|
this.currentPage = 0; /* DELETE WHEN ADVANCED SHOW EVENTS IS FIXED AND SENDS CORRECT VALUE FOR CURRENT PAGE */
|
||||||
|
|
|
@ -34,7 +34,7 @@ export class ContentEventsOfRepositoryComponent implements OnInit {
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
if(this.sharedService.getRepository()) {
|
if(this.sharedService.getRepository()) {
|
||||||
this.repoName = this.sharedService.getRepository().officialName;
|
this.repoName = this.sharedService.getRepository().officialname;
|
||||||
this.getCorrectName();
|
this.getCorrectName();
|
||||||
this.getTopics();
|
this.getTopics();
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ export class ContentEventsOfRepositoryComponent implements OnInit {
|
||||||
this.sharedService.repository$.subscribe(
|
this.sharedService.repository$.subscribe(
|
||||||
r => {
|
r => {
|
||||||
if (r) {
|
if (r) {
|
||||||
this.repoName = r.officialName;
|
this.repoName = r.officialname;
|
||||||
this.getCorrectName();
|
this.getCorrectName();
|
||||||
this.getTopics();
|
this.getTopics();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div id="page_content_inner">
|
<div id="page_content_inner">
|
||||||
<!--<h2 class="heading_b uk-margin-bottom">Metrics for repository....</h2>-->
|
<!--<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 -->
|
<!-- TOP HELP CONTENT -->
|
||||||
<help-content #topHelperContent [position]="'top'"
|
<help-content #topHelperContent [position]="'top'"
|
||||||
|
|
|
@ -3,9 +3,11 @@ import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { ConfirmationDialogComponent } from '../../../shared/reusablecomponents/confirmation-dialog.component';
|
import { ConfirmationDialogComponent } from '../../../shared/reusablecomponents/confirmation-dialog.component';
|
||||||
import { PiwikService } from '../../../services/piwik.service';
|
import { PiwikService } from '../../../services/piwik.service';
|
||||||
import { RepositoryService } from '../../../services/repository.service';
|
import { RepositoryService } from '../../../services/repository.service';
|
||||||
import { PiwikInfo, Repository } from '../../../domain/typeScriptClasses';
|
import {Country, PiwikInfo, Repository} from '../../../domain/typeScriptClasses';
|
||||||
import { enabledMetricsError, enabledMetricsSuccess, enablingMetrics,
|
import {
|
||||||
loadingRepoError, loadingRepoMessage } from '../../../domain/shared-messages';
|
enabledMetricsError, enabledMetricsSuccess, enablingMetrics,
|
||||||
|
loadingRepoError, loadingRepoMessage, noServiceMessage
|
||||||
|
} from '../../../domain/shared-messages';
|
||||||
import { AuthenticationService } from '../../../services/authentication.service';
|
import { AuthenticationService } from '../../../services/authentication.service';
|
||||||
import { SharedService } from "../../../services/shared.service";
|
import { SharedService } from "../../../services/shared.service";
|
||||||
|
|
||||||
|
@ -25,6 +27,8 @@ export class MetricsEnableComponent implements OnInit {
|
||||||
repo: Repository;
|
repo: Repository;
|
||||||
oaId: string;
|
oaId: string;
|
||||||
|
|
||||||
|
countries: Country[] = [];
|
||||||
|
|
||||||
modalTitle = 'Confirmation';
|
modalTitle = 'Confirmation';
|
||||||
modalButton = 'Yes, enable it';
|
modalButton = 'Yes, enable it';
|
||||||
isModalShown: boolean;
|
isModalShown: boolean;
|
||||||
|
@ -60,11 +64,13 @@ export class MetricsEnableComponent implements OnInit {
|
||||||
|
|
||||||
// this.getRepo();
|
// this.getRepo();
|
||||||
this.isModalShown = false;
|
this.isModalShown = false;
|
||||||
let body = document.getElementsByTagName('body')[0];
|
const body = document.getElementsByTagName('body')[0];
|
||||||
body.classList.remove("top_bar_active"); //remove the class
|
body.classList.remove('top_bar_active'); // remove the class
|
||||||
body.classList.remove("page_heading_active");
|
body.classList.remove('page_heading_active');
|
||||||
body.classList.remove("landing");
|
body.classList.remove('landing');
|
||||||
body.classList.add("dashboard");
|
body.classList.add('dashboard');
|
||||||
|
|
||||||
|
this.getCountries();
|
||||||
}
|
}
|
||||||
|
|
||||||
// getRepo(): void {
|
// getRepo(): void {
|
||||||
|
@ -109,8 +115,8 @@ export class MetricsEnableComponent implements OnInit {
|
||||||
const piwik: PiwikInfo = {
|
const piwik: PiwikInfo = {
|
||||||
repositoryId: this.repo.id,
|
repositoryId: this.repo.id,
|
||||||
openaireId: this.oaId,
|
openaireId: this.oaId,
|
||||||
repositoryName: this.repo.officialName,
|
repositoryName: this.repo.officialname,
|
||||||
country: this.repo.countryName,
|
country: this.getCountryName(this.repo.organizations[0].country),
|
||||||
siteId: '',
|
siteId: '',
|
||||||
authenticationToken: this.authenticationToken,
|
authenticationToken: this.authenticationToken,
|
||||||
creationDate: null,
|
creationDate: null,
|
||||||
|
@ -121,7 +127,7 @@ export class MetricsEnableComponent implements OnInit {
|
||||||
comment: ''
|
comment: ''
|
||||||
};
|
};
|
||||||
|
|
||||||
this.piwikService.enableMetricsForRepository(this.repo.officialName, this.repo.websiteUrl, piwik).subscribe(
|
this.piwikService.enableMetricsForRepository(this.repo.officialname, this.repo.websiteurl, piwik).subscribe(
|
||||||
response => {
|
response => {
|
||||||
console.log(`enableMetrics answered: ${response}`);
|
console.log(`enableMetrics answered: ${response}`);
|
||||||
this.successMessage = enabledMetricsSuccess;
|
this.successMessage = enabledMetricsSuccess;
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,11 +51,11 @@ export class MetricsShowComponent implements OnInit {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
let body = document.getElementsByTagName('body')[0];
|
const body = document.getElementsByTagName('body')[0];
|
||||||
body.classList.remove("top_bar_active"); //remove the class
|
body.classList.remove('top_bar_active'); // remove the class
|
||||||
body.classList.remove("page_heading_active");
|
body.classList.remove('page_heading_active');
|
||||||
body.classList.remove("landing");
|
body.classList.remove('landing');
|
||||||
body.classList.add("dashboard");
|
body.classList.add('dashboard');
|
||||||
}
|
}
|
||||||
|
|
||||||
getMetrics() {
|
getMetrics() {
|
||||||
|
@ -90,7 +90,7 @@ export class MetricsShowComponent implements OnInit {
|
||||||
|
|
||||||
getViewsUrl () {
|
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(`${this.repoMetrics.diagramsBaseURL}chart?json=${encodedURL}`);
|
||||||
|
|
||||||
// this.viewsUrl = this.sanitizer.bypassSecurityTrustResourceUrl(
|
// this.viewsUrl = this.sanitizer.bypassSecurityTrustResourceUrl(
|
||||||
|
@ -112,7 +112,7 @@ export class MetricsShowComponent implements OnInit {
|
||||||
|
|
||||||
getDownloadsUrl () {
|
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(`${this.repoMetrics.diagramsBaseURL}chart?json=${encodedURL}`);
|
||||||
|
|
||||||
// this.downloadsUrl = this.sanitizer.bypassSecurityTrustResourceUrl(
|
// this.downloadsUrl = this.sanitizer.bypassSecurityTrustResourceUrl(
|
||||||
|
|
|
@ -14,6 +14,175 @@
|
||||||
</aside-help-content>
|
</aside-help-content>
|
||||||
|
|
||||||
<!-- MIDDLE -->
|
<!-- MIDDLE -->
|
||||||
|
<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 class="uk-width-expand@m">
|
||||||
|
|
||||||
<div *ngIf="errorMessage" class="uk-alert uk-alert-warning">{{errorMessage}}</div>
|
<div *ngIf="errorMessage" class="uk-alert uk-alert-warning">{{errorMessage}}</div>
|
||||||
|
@ -137,75 +306,6 @@
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</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 -->
|
<!-- BOTTOM PAGINATION LINKS -->
|
||||||
<ul class="uk-pagination uk-margin-medium-top">
|
<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>
|
<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>-->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
</ng-template>
|
||||||
|
|
||||||
<!-- RIGHT HELP CONTENT -->
|
<!-- RIGHT HELP CONTENT -->
|
||||||
<aside-help-content #rightHelperContent [position]="'right'"
|
<aside-help-content #rightHelperContent [position]="'right'"
|
||||||
|
|
|
@ -4,6 +4,7 @@ import { AuthenticationService } from '../../../services/authentication.service'
|
||||||
import { UsagestatsService } from '../../../services/usagestats.service';
|
import { UsagestatsService } from '../../../services/usagestats.service';
|
||||||
import { ReportResponse } from '../../../domain/usageStatsClasses';
|
import { ReportResponse } from '../../../domain/usageStatsClasses';
|
||||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||||
|
import {COUNTER_Dataset_Report, COUNTER_Item_Report, SUSHI_Error_Model} from '../../../domain/sushilite';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'metrics-usagestats-report-results',
|
selector: 'metrics-usagestats-report-results',
|
||||||
|
@ -15,6 +16,11 @@ export class MetricsUsagestatsReportResultsComponent implements OnInit {
|
||||||
loadingMessage: string;
|
loadingMessage: string;
|
||||||
errorMessage: string;
|
errorMessage: string;
|
||||||
infoMessage: 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;
|
repoResponse: ReportResponse;
|
||||||
coveredPeriod: string;
|
coveredPeriod: string;
|
||||||
|
@ -37,11 +43,11 @@ export class MetricsUsagestatsReportResultsComponent implements OnInit {
|
||||||
this.pageSize = 10;
|
this.pageSize = 10;
|
||||||
this.readParams();
|
this.readParams();
|
||||||
this.pageSizeSelect = this.fb.group({selectPageSize: ['']});
|
this.pageSizeSelect = this.fb.group({selectPageSize: ['']});
|
||||||
let body = document.getElementsByTagName('body')[0];
|
const body = document.getElementsByTagName('body')[0];
|
||||||
body.classList.remove("top_bar_active"); //remove the class
|
body.classList.remove('top_bar_active'); // remove the class
|
||||||
body.classList.remove("page_heading_active");
|
body.classList.remove('page_heading_active');
|
||||||
body.classList.remove("landing");
|
body.classList.remove('landing');
|
||||||
body.classList.add("dashboard");
|
body.classList.add('dashboard');
|
||||||
}
|
}
|
||||||
|
|
||||||
readParams() {
|
readParams() {
|
||||||
|
@ -49,14 +55,33 @@ export class MetricsUsagestatsReportResultsComponent implements OnInit {
|
||||||
|
|
||||||
this.route.queryParams.subscribe( qparams => {
|
this.route.queryParams.subscribe( qparams => {
|
||||||
this.params.append('Report', qparams['report']);
|
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('RequestorID', this.authService.getUserEmail());
|
||||||
|
if (qparams['beginDate'])
|
||||||
this.params.append('BeginDate', qparams['beginDate']);
|
this.params.append('BeginDate', qparams['beginDate']);
|
||||||
|
if (qparams['endDate'])
|
||||||
this.params.append('EndDate', qparams['endDate']);
|
this.params.append('EndDate', qparams['endDate']);
|
||||||
this.params.append('RepositoryIdentifier', qparams['repoId']);
|
this.params.append('RepositoryIdentifier', qparams['repoId']);
|
||||||
|
if (qparams['itemIdentifier'])
|
||||||
this.params.append('ItemIdentifier', qparams['itemIdentifier']);
|
this.params.append('ItemIdentifier', qparams['itemIdentifier']);
|
||||||
this.params.append('ItemDataType', 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.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');
|
this.chosenReport = this.params.get('Report');
|
||||||
|
@ -70,6 +95,27 @@ export class MetricsUsagestatsReportResultsComponent implements OnInit {
|
||||||
this.selectedItemIndex = null;
|
this.selectedItemIndex = null;
|
||||||
this.repoResponse = null;
|
this.repoResponse = null;
|
||||||
|
|
||||||
|
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(
|
this.usageService.getReportResponse(this.page.toString(), this.pageSize.toString(), this.params).subscribe(
|
||||||
responseWrapper => {
|
responseWrapper => {
|
||||||
this.repoResponse = responseWrapper.ReportResponse;
|
this.repoResponse = responseWrapper.ReportResponse;
|
||||||
|
@ -112,6 +158,7 @@ export class MetricsUsagestatsReportResultsComponent implements OnInit {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
|
|
||||||
<div class="md-input-wrapper md-input-filled uk-margin-bottom">
|
<div class="md-input-wrapper md-input-filled uk-margin-bottom">
|
||||||
<label>Release</label>
|
<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>
|
<span class="md-input-bar "></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -112,17 +112,77 @@
|
||||||
</div>
|
</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">
|
<div class="md-input-wrapper md-input-filled uk-margin-bottom">
|
||||||
<label>Item Identifier</label>
|
<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)">
|
type="text" (blur)="updateItemIdentifier($event)">
|
||||||
<span class="md-input-bar "></span>
|
<span class="md-input-bar "></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</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">
|
<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>
|
<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">
|
<div class="md-input-wrapper md-input-filled">
|
||||||
<label class="">Item Data Type</label>
|
<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 -->
|
<!-- TODO: get the list from api if it becomes available -->
|
||||||
<option value="">--- Select Item Data Type ---</option>
|
<option value="">--- Select Item Data Type ---</option>
|
||||||
<option value="Annotation">Annotation</option>
|
<option value="Annotation">Annotation</option>
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { RepositoryService } from '../../../services/repository.service';
|
import { RepositoryService } from '../../../services/repository.service';
|
||||||
import { AuthenticationService } from '../../../services/authentication.service';
|
import { AuthenticationService } from '../../../services/authentication.service';
|
||||||
import { loadingRepoMessage } from '../../../domain/shared-messages';
|
import { loadingRepoMessage } from '../../../domain/shared-messages';
|
||||||
import { SharedService } from "../../../services/shared.service";
|
import { SharedService } from '../../../services/shared.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'metrics-usagestats-report',
|
selector: 'metrics-usagestats-report',
|
||||||
|
@ -26,10 +26,16 @@ export class MetricsUsagestatsReportComponent implements OnInit {
|
||||||
chosen_report: string;
|
chosen_report: string;
|
||||||
|
|
||||||
userEmail: string;
|
userEmail: string;
|
||||||
|
release: string;
|
||||||
beginDate = '';
|
beginDate = '';
|
||||||
endDate = '';
|
endDate = '';
|
||||||
itemIdentifier = '';
|
itemIdentifier = '';
|
||||||
itemDataType = '';
|
datasetIdentifier = '';
|
||||||
|
totalItemRequests = '';
|
||||||
|
totalItemInvestigations = '';
|
||||||
|
uniqueItemRequests = '';
|
||||||
|
uniqueItemInvestigations = '';
|
||||||
|
dataType = '';
|
||||||
granularity = 'Monthly';
|
granularity = 'Monthly';
|
||||||
|
|
||||||
constructor(private repoService: RepositoryService,
|
constructor(private repoService: RepositoryService,
|
||||||
|
@ -52,11 +58,11 @@ export class MetricsUsagestatsReportComponent implements OnInit {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
let body = document.getElementsByTagName('body')[0];
|
const body = document.getElementsByTagName('body')[0];
|
||||||
body.classList.remove("top_bar_active"); //remove the class
|
body.classList.remove('top_bar_active'); // remove the class
|
||||||
body.classList.remove("page_heading_active");
|
body.classList.remove('page_heading_active');
|
||||||
body.classList.remove("landing");
|
body.classList.remove('landing');
|
||||||
body.classList.add("dashboard");
|
body.classList.add('dashboard');
|
||||||
}
|
}
|
||||||
|
|
||||||
getInfo() {
|
getInfo() {
|
||||||
|
@ -68,12 +74,26 @@ export class MetricsUsagestatsReportComponent implements OnInit {
|
||||||
if (this.repo.issn && this.repo.issn !== 'null') {
|
if (this.repo.issn && this.repo.issn !== 'null') {
|
||||||
this.shownRepoId = this.repo.issn.slice(0, 4) + '-' + this.repo.issn.toString().slice(4);
|
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() {
|
getParams() {
|
||||||
// this.repoId = this.route.snapshot.paramMap.get('id');
|
// 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');
|
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);
|
this.shownRepoId = this.convertToDisplayedFormat(this.repo.id);
|
||||||
console.log(`shownRepoId is ${this.repo.id}`);
|
console.log(`shownRepoId is ${this.repo.id}`);
|
||||||
this.title = `${this.chosen_report} report`;
|
this.title = `${this.chosen_report} report`;
|
||||||
|
@ -122,13 +142,17 @@ export class MetricsUsagestatsReportComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
updateItemDataType(event: any) {
|
updateItemDataType(event: any) {
|
||||||
this.itemDataType = event.target.value;
|
this.dataType = event.target.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
updateItemIdentifier(event: any) {
|
updateItemIdentifier(event: any) {
|
||||||
this.itemIdentifier = event.target.value;
|
this.itemIdentifier = event.target.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateDatasetIdentifier(event: any) {
|
||||||
|
this.datasetIdentifier = event.target.value;
|
||||||
|
}
|
||||||
|
|
||||||
updateGranularity(event: any) {
|
updateGranularity(event: any) {
|
||||||
this.granularity = event.target.value;
|
this.granularity = event.target.value;
|
||||||
}
|
}
|
||||||
|
@ -137,18 +161,70 @@ export class MetricsUsagestatsReportComponent implements OnInit {
|
||||||
this.useCurrentRepo = event.target.value;
|
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() {
|
goToReport() {
|
||||||
if (!this.useCurrentRepo) { this.shownRepoId = ''; }
|
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'], {
|
this.router.navigate(['usagestats-report-results'], {
|
||||||
relativeTo: this.route.parent,
|
relativeTo: this.route.parent,
|
||||||
queryParams: {
|
queryParams: {
|
||||||
report: this.chosen_report,
|
report: this.chosen_report,
|
||||||
|
release: this.release,
|
||||||
beginDate: this.beginDate,
|
beginDate: this.beginDate,
|
||||||
endDate: this.endDate,
|
endDate: this.endDate,
|
||||||
repoId: this.shownRepoId,
|
repoId: this.shownRepoId,
|
||||||
itemDataType: this.itemDataType,
|
dataType: this.dataType,
|
||||||
itemIdentifier: this.itemIdentifier,
|
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
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -21,10 +21,73 @@
|
||||||
|
|
||||||
<h3>Supported Reports</h3>
|
<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-grid uk-grid-match repositoryTypeSelection" data-uk-grid-margin="">
|
||||||
<div class="uk-width-1-3@m uk-row-first">
|
<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="">
|
<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">
|
<div class="uk-card-media-top">
|
||||||
<img class="el-image" src="../../../../assets/imgs/Icons_Reports_wide_AR1.png" alt="" style="width: 100%;">
|
<img class="el-image" src="../../../../assets/imgs/Icons_Reports_wide_AR1.png" alt="" style="width: 100%;">
|
||||||
</div>
|
</div>
|
||||||
|
@ -37,7 +100,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-width-1-3@m">
|
<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="">
|
<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">
|
<div class="uk-card-media-top">
|
||||||
<img class="el-image" src="../../../../assets/imgs/Icons_Reports_wide_IR1.png" alt="" style="width:100%;">
|
<img class="el-image" src="../../../../assets/imgs/Icons_Reports_wide_IR1.png" alt="" style="width:100%;">
|
||||||
</div>
|
</div>
|
||||||
|
@ -50,7 +113,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-width-1-3@m">
|
<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="">
|
<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">
|
<div class="uk-card-media-top">
|
||||||
<img class="el-image" src="../../../../assets/imgs/Icons_Reports_wide_RR1.png" alt="" style="width:100%;">
|
<img class="el-image" src="../../../../assets/imgs/Icons_Reports_wide_RR1.png" alt="" style="width:100%;">
|
||||||
</div>
|
</div>
|
||||||
|
@ -62,10 +125,11 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="uk-grid uk-grid-match repositoryTypeSelection" data-uk-grid-margin="">
|
<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-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="">
|
<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">
|
<div class="uk-card-media-top">
|
||||||
<img class="el-image" src="../../../../assets/imgs/Icons_Reports_wide_BR1.png" alt="" style="width: 100%;">
|
<img class="el-image" src="../../../../assets/imgs/Icons_Reports_wide_BR1.png" alt="" style="width: 100%;">
|
||||||
</div>
|
</div>
|
||||||
|
@ -78,7 +142,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-width-1-3@m">
|
<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="">
|
<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">
|
<div class="uk-card-media-top">
|
||||||
<img class="el-image" src="../../../../assets/imgs/Icons_Reports_wide_BR2.png" alt="" style="width:100%;">
|
<img class="el-image" src="../../../../assets/imgs/Icons_Reports_wide_BR2.png" alt="" style="width:100%;">
|
||||||
</div>
|
</div>
|
||||||
|
@ -89,9 +153,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</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="">
|
<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">
|
<div class="uk-card-media-top">
|
||||||
<img class="el-image" src="../../../../assets/imgs/Icons_Reports_wide_JR1.png" alt="" style="width:100%;">
|
<img class="el-image" src="../../../../assets/imgs/Icons_Reports_wide_JR1.png" alt="" style="width:100%;">
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { Repository } from '../../../domain/typeScriptClasses';
|
||||||
import { RepositoryService } from '../../../services/repository.service';
|
import { RepositoryService } from '../../../services/repository.service';
|
||||||
import { AuthenticationService } from '../../../services/authentication.service';
|
import { AuthenticationService } from '../../../services/authentication.service';
|
||||||
import { ActivatedRoute, Router } from '@angular/router';
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { SharedService } from "../../../services/shared.service";
|
import { SharedService } from '../../../services/shared.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'metrics-usagestats',
|
selector: 'metrics-usagestats',
|
||||||
|
@ -27,13 +27,13 @@ export class MetricsUsagestatsComponent implements OnInit {
|
||||||
|
|
||||||
if(this.sharedService.getRepository()) {
|
if(this.sharedService.getRepository()) {
|
||||||
this.repo = 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(
|
this.sharedService.repository$.subscribe(
|
||||||
r => {
|
r => {
|
||||||
this.repo = r;
|
this.repo = r;
|
||||||
this.title = this.title + ' for ' + this.repo.officialName;
|
this.title = this.title + ' for ' + this.repo.officialname;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ const metricsRoutes: Routes = [
|
||||||
component: MetricsUsagestatsComponent
|
component: MetricsUsagestatsComponent
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'usagestats/:reportID',
|
path: 'usagestats/:reportType/:reportID',
|
||||||
component: MetricsUsagestatsReportComponent
|
component: MetricsUsagestatsReportComponent
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
<div class="uk-margin-medium-left uk-margin-medium-right">
|
<div class="uk-margin-medium-left uk-margin-medium-right">
|
||||||
<div class="uk-padding-small">
|
<div class="uk-padding-small">
|
||||||
<h3 *ngIf="repository" class="heading_b">
|
<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="../../../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">
|
<img *ngIf="repository.logourl" src="{{ repository.logourl }}" style="margin-right: 15px; margin-top:-8px" width="60">
|
||||||
{{ repository.officialName }}
|
{{ repository.officialname }}
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ export class RepositoryComponent implements OnInit {
|
||||||
this.loadingMessage = 'Retrieving datasource info';
|
this.loadingMessage = 'Retrieving datasource info';
|
||||||
this.repoService.getRepositoryById(this.repositoryId).subscribe(
|
this.repoService.getRepositoryById(this.repositoryId).subscribe(
|
||||||
repository => {
|
repository => {
|
||||||
console.log("Repository component - Repository id: " + repository.id);
|
console.log('Repository component - Repository id: ' + repository.id);
|
||||||
this.sharedService.setRepository(repository);
|
this.sharedService.setRepository(repository);
|
||||||
this.loadingMessage = '';
|
this.loadingMessage = '';
|
||||||
},
|
},
|
||||||
|
|
|
@ -43,22 +43,23 @@
|
||||||
<li class="uk-active" aria-expanded="true"><a href="#">Update Information</a></li>
|
<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 Interfaces</a></li>
|
||||||
<li aria-expanded="false" class=""><a href="#">Update Admins</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>
|
||||||
<ul id="tabs_anim4" class="uk-switcher uk-margin">
|
<ul id="tabs_anim4" class="uk-switcher uk-margin">
|
||||||
<li aria-hidden="false" class="uk-active" style="animation-duration: 200ms;">
|
<li aria-hidden="false" class="uk-active" style="animation-duration: 200ms;">
|
||||||
<datasource-update-form #datasourceUpdateForm
|
<datasource-update-form #datasourceUpdateForm
|
||||||
[selectedRepo]="repo"
|
[selectedRepo]="repo"
|
||||||
|
[mode]="this.mode"
|
||||||
[showButton]=true
|
[showButton]=true
|
||||||
(emittedUrl)="getNewLogoUrl($event)"></datasource-update-form>
|
(emittedUrl)="getNewLogoUrl($event)">
|
||||||
|
</datasource-update-form>
|
||||||
</li>
|
</li>
|
||||||
<li aria-hidden="true" style="animation-duration: 200ms;" class="">
|
<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 *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 *ngFor="let inter of dataForInterfaceComp" class="uk-width-1-2@m uk-margin-bottom">
|
||||||
<div>
|
<div>
|
||||||
<div class="md-card" style="height: 100%">
|
<div class="md-card" style="height: 100%">
|
||||||
<app-repository-interface-form #interfacesArray
|
<app-repository-interface-form #interfacesArray [data]="inter"
|
||||||
[data]="inter"
|
|
||||||
(emitDeleteInterface)="removeInterfaceFromList($event)">
|
(emitDeleteInterface)="removeInterfaceFromList($event)">
|
||||||
</app-repository-interface-form>
|
</app-repository-interface-form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -22,6 +22,7 @@ export class SourcesUpdateRepoComponent implements OnInit {
|
||||||
// repoId: string;
|
// repoId: string;
|
||||||
logoURL: string;
|
logoURL: string;
|
||||||
repo: Repository;
|
repo: Repository;
|
||||||
|
mode: string = null;
|
||||||
repoInterfaces: RepositoryInterface[] = [];
|
repoInterfaces: RepositoryInterface[] = [];
|
||||||
|
|
||||||
@ViewChild('datasourceUpdateForm') datasourceUpdateForm: DatasourceUpdateFormComponent;
|
@ViewChild('datasourceUpdateForm') datasourceUpdateForm: DatasourceUpdateFormComponent;
|
||||||
|
@ -49,7 +50,18 @@ export class SourcesUpdateRepoComponent implements OnInit {
|
||||||
|
|
||||||
if (this.sharedService.getRepository()) {
|
if (this.sharedService.getRepository()) {
|
||||||
this.repo = 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();
|
this.getRepoInterfaces();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +69,7 @@ export class SourcesUpdateRepoComponent implements OnInit {
|
||||||
r => {
|
r => {
|
||||||
this.repo = r;
|
this.repo = r;
|
||||||
if (this.repo) {
|
if (this.repo) {
|
||||||
this.logoURL = this.repo.logoUrl;
|
this.logoURL = this.repo.logourl;
|
||||||
this.getRepoInterfaces();
|
this.getRepoInterfaces();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -133,9 +145,9 @@ export class SourcesUpdateRepoComponent implements OnInit {
|
||||||
false, i,
|
false, i,
|
||||||
{
|
{
|
||||||
id: this.repo.id,
|
id: this.repo.id,
|
||||||
datasourceType: this.repo.datasourceType,
|
datasourceType: this.repo.eoscDatasourceType,
|
||||||
datasourceClass: this.repo.datasourceClass,
|
datasourceClass: this.repo.eoscDatasourceType,
|
||||||
registeredBy: this.repo.registeredBy
|
registeredBy: this.repo.registeredby
|
||||||
},
|
},
|
||||||
this.repoInterfaces[i]
|
this.repoInterfaces[i]
|
||||||
]);
|
]);
|
||||||
|
@ -145,9 +157,9 @@ export class SourcesUpdateRepoComponent implements OnInit {
|
||||||
false, 0,
|
false, 0,
|
||||||
{
|
{
|
||||||
id: this.repo.id,
|
id: this.repo.id,
|
||||||
datasourceType: this.repo.datasourceType,
|
datasourceType: this.repo.eoscDatasourceType,
|
||||||
datasourceClass: this.repo.datasourceClass,
|
datasourceClass: this.repo.eoscDatasourceType,
|
||||||
registeredBy: this.repo.registeredBy
|
registeredBy: this.repo.registeredby
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@ -156,8 +168,8 @@ export class SourcesUpdateRepoComponent implements OnInit {
|
||||||
addInterfaceToList(intrf?: RepositoryInterface) {
|
addInterfaceToList(intrf?: RepositoryInterface) {
|
||||||
const curIndex = this.dataForInterfaceComp.length;
|
const curIndex = this.dataForInterfaceComp.length;
|
||||||
const curRepoInfo = {
|
const curRepoInfo = {
|
||||||
id: this.repo.id, datasourceType: this.repo.datasourceType,
|
id: this.repo.id, datasourceType: this.repo.eoscDatasourceType,
|
||||||
datasourceClass: this.repo.datasourceClass, registeredBy: this.repo.registeredBy
|
datasourceClass: this.repo.eoscDatasourceType, registeredBy: this.repo.registeredby
|
||||||
};
|
};
|
||||||
if (intrf) {
|
if (intrf) {
|
||||||
this.dataForInterfaceComp.push([false, curIndex, curRepoInfo, intrf]);
|
this.dataForInterfaceComp.push([false, curIndex, curRepoInfo, intrf]);
|
||||||
|
@ -192,7 +204,7 @@ export class SourcesUpdateRepoComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
updatedLogoUrl(event: any) {
|
updatedLogoUrl(event: any) {
|
||||||
this.repo.logoUrl = this.logoURL;
|
this.repo.logourl = this.logoURL;
|
||||||
this.datasourceUpdateForm.updateGroup.get('logoUrl').setValue(this.logoURL);
|
this.datasourceUpdateForm.updateGroup.get('logoUrl').setValue(this.logoURL);
|
||||||
this.datasourceUpdateForm.updateRepo();
|
this.datasourceUpdateForm.updateRepo();
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<confirmation-dialog #deleteRepositoryAdminModal [title]="'Remove datasource admin'" [isModalShown]="isDeleteModalShown"
|
<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>
|
<div *ngIf="modalErrorMessage" class="uk-alert uk-alert-danger">{{modalErrorMessage}}</div>
|
||||||
|
|
||||||
|
@ -54,13 +54,6 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="whiteFilm"></div>
|
<div class="whiteFilm"></div>
|
||||||
</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">
|
<div *ngIf="selectedAdminForDelete">
|
||||||
<h6>Are you sure you want to remove this user admin?</h6>
|
<h6>Are you sure you want to remove this user admin?</h6>
|
||||||
<pre>
|
<pre>
|
||||||
|
@ -75,7 +68,7 @@
|
||||||
|
|
||||||
|
|
||||||
<confirmation-dialog #addRepositoryAdminModal [title]="'Add new datasource admin'" [isModalShown]="isAddModalShown"
|
<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>
|
<div *ngIf="modalErrorMessage" class="uk-alert uk-alert-danger">{{modalErrorMessage}}</div>
|
||||||
|
|
||||||
|
|
|
@ -73,10 +73,9 @@ export class UpdateRepoAdminsComponent implements OnChanges {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
closeDeletionModal() {
|
clearModal() {
|
||||||
this.selectedAdminForDelete = null;
|
this.selectedAdminForDelete = null;
|
||||||
this.deleteRepositoryAdminModal.hideModal();
|
this.modalErrorMessage = null;
|
||||||
// UIkit.modal('#deletionModal').hide();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteRepoAdmin(event: any) {
|
deleteRepoAdmin(event: any) {
|
||||||
|
@ -132,7 +131,7 @@ export class UpdateRepoAdminsComponent implements OnChanges {
|
||||||
this.modalErrorMessage = 'This email address is not associated with an OpenAIRE user account.\n' +
|
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.';
|
'Please make sure the user has an OpenAIRE account and then try again.';
|
||||||
} else {
|
} 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';
|
'please contact helpdesk@openaire.eu';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -22,45 +22,21 @@
|
||||||
<div class="uk-row-first">
|
<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
|
<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">
|
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="md-card-content large-padding uk-margin-medium-top uk-margin-bottom">
|
||||||
<div class="">
|
<div class="">
|
||||||
<img class="el-image" src="../../../assets/imgs/datasourcetypes/Literature%20repository.svg" alt="" width="51">
|
<img class="el-image" src="../../../assets/imgs/datasourcetypes/Literature%20repository.svg" alt="" width="51">
|
||||||
</div>
|
</div>
|
||||||
<h3>Literature repository</h3>
|
<h3>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('repository')" style="cursor: pointer">
|
||||||
<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 one of the following global registries -
|
||||||
<p class="uk-margin-remove">Make sure your repository is already registered in OpenDOAR, the authoritative
|
<a href="https://v2.sherpa.ac.uk/opendoar/">OpenDOAR<i class="fas fa-external-link-alt" style="margin-left: 3px !important;"></i></a>,
|
||||||
directory of institutional and thematic OA repositories, and is compatible with the OpenAIRE Guidelines for Literature Repositories.</p>
|
<a href="http://www.re3data.org/">Re3data<i class="fas fa-external-link-alt" style="margin-left: 3px !important;"></i></a> or
|
||||||
<a href="http://v2.sherpa.ac.uk/opendoar/" target="_blank">
|
<a href="https://fairsharing.org/search?fairsharingRegistry=Database">FAIRsharing<i class="fas fa-external-link-alt" style="margin-left: 3px !important;"></i></a>
|
||||||
List provided by
|
and is compatible with the
|
||||||
<br>
|
<a href="https://guidelines.openaire.eu/en/latest/">OpenAIRE Guidelines<i class="fas fa-external-link-alt" style="margin-left: 3px !important;"></i></a>.
|
||||||
OpenDOAR<i class="fas fa-external-link-alt" style="margin-left: 3px !important;"></i>
|
<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>
|
||||||
</a>
|
</p>
|
||||||
</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>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -85,10 +61,6 @@
|
||||||
</div>
|
</div>
|
||||||
</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-row-first">
|
||||||
<div class="uk-text-center md-card md-card-default md-card-hover uk-scrollspy-inview uk-animation-slide-top-medium
|
<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">
|
datasourceTypeCard uk-inline-clip uk-transition-toggle" uk-scrollspy-class="" tabindex="0">
|
||||||
|
@ -110,6 +82,31 @@
|
||||||
|
|
||||||
</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="">
|
||||||
|
<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;">
|
<hr style="border-top: 1px solid #dedede; margin-top: 40px; margin-bottom: 30px;">
|
||||||
|
|
||||||
<h2 class="heading_b uk-margin-bottom">Coming soon</h2>
|
<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-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-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
|
<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">
|
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>
|
<a class="el-link uk-position-cover uk-margin-remove-adjacent uk-disabled"></a>
|
||||||
|
@ -167,11 +147,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
<div class="">
|
||||||
|
|
||||||
<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
|
<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">
|
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>
|
<a class="el-link uk-position-cover uk-margin-remove-adjacent uk-disabled"></a>
|
||||||
|
@ -190,6 +166,12 @@
|
||||||
|
|
||||||
</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>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- RIGHT HELP CONTENT -->
|
<!-- RIGHT HELP CONTENT -->
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import {Component, OnInit} from '@angular/core';
|
import {Component, OnInit} from '@angular/core';
|
||||||
import { Router } from "@angular/router";
|
import {Router} from '@angular/router';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-sources-register',
|
selector: 'app-sources-register',
|
||||||
|
@ -8,20 +8,19 @@ import { Router } from "@angular/router";
|
||||||
|
|
||||||
export class SourcesRegisterComponent implements OnInit {
|
export class SourcesRegisterComponent implements OnInit {
|
||||||
|
|
||||||
constructor(private router: Router) {
|
constructor(private router: Router) {}
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
let body = document.getElementsByTagName('body')[0];
|
const body = document.getElementsByTagName('body')[0];
|
||||||
body.classList.remove("top_bar_active"); //remove the class
|
body.classList.remove('top_bar_active'); // remove the class
|
||||||
body.classList.remove("page_heading_active");
|
body.classList.remove('page_heading_active');
|
||||||
body.classList.remove("landing");
|
body.classList.remove('landing');
|
||||||
body.classList.add("dashboard");
|
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)
|
// 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) {
|
goTo(datasourceType: string) {
|
||||||
if(datasourceType==='literature') {
|
if (datasourceType === 'repository') {
|
||||||
this.router.navigateByUrl(`/sources/register/${datasourceType}?step=selectDatasource`);
|
this.router.navigateByUrl(`/sources/register/${datasourceType}?step=selectDatasource`);
|
||||||
} else if (datasourceType === 'data') {
|
} else if (datasourceType === 'data') {
|
||||||
this.router.navigateByUrl(`/sources/register/${datasourceType}?step=selectDatasource`);
|
this.router.navigateByUrl(`/sources/register/${datasourceType}?step=selectDatasource`);
|
||||||
|
@ -29,6 +28,8 @@ export class SourcesRegisterComponent implements OnInit {
|
||||||
this.router.navigateByUrl(`/sources/register/${datasourceType}?step=basicInformation`);
|
this.router.navigateByUrl(`/sources/register/${datasourceType}?step=basicInformation`);
|
||||||
} else if (datasourceType === 'aggregator') {
|
} else if (datasourceType === 'aggregator') {
|
||||||
this.router.navigateByUrl(`/sources/register/${datasourceType}?step=basicInformation`);
|
this.router.navigateByUrl(`/sources/register/${datasourceType}?step=basicInformation`);
|
||||||
|
} else if (datasourceType === 'cris') {
|
||||||
|
this.router.navigateByUrl(`/sources/register/${datasourceType}?step=selectDatasource`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,20 +5,45 @@
|
||||||
{{ alertMessage }}
|
{{ alertMessage }}
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-alert uk-alert-info">
|
<div class="uk-alert uk-alert-info">
|
||||||
Please make sure your repository is registered in
|
|
||||||
<a target="_blank" href="{{ sourceUrl }}">
|
<ng-container *ngIf="mode === 'repository'">
|
||||||
<i class="fas fa-external-link-alt" style="margin-right:3px;"></i>{{ sourceTitle }}
|
Please make sure your repository is registered in <a href="https://v2.sherpa.ac.uk/opendoar/" target="_blank">OpenDOAR</a>,
|
||||||
</a>
|
<a href="http://www.re3data.org/" target="_blank">Re3data</a> or <a href="https://fairsharing.org/search?fairsharingRegistry=Database" target="_blank">FAIRsharing</a>.
|
||||||
. <br>
|
<span *ngIf="opendoarlatestUpdate && (opendoarlatestUpdate !== 'null')">
|
||||||
<span *ngIf="latestUpdate && (latestUpdate !== 'null')">
|
<br><b>Last Updated (OpenDOAR): </b>{{ opendoarlatestUpdate }}
|
||||||
<b>Last Updated: </b>{{ latestUpdate }}
|
|
||||||
</span>
|
</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>
|
||||||
<div class="uk-margin-medium-top">
|
<div class="uk-margin-medium-top">
|
||||||
<div class="md-input-wrapper md-input-filled">
|
<div class="md-input-wrapper md-input-filled">
|
||||||
<label style="top: -16px;" class="">Select country</label>
|
<label style="top: -16px;" class="">Select country</label>
|
||||||
<select class="md-input" (change)="getReposInCountry($event.target.value)">
|
<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 :
|
<option *ngFor="let country of countries; let i = index" value="{{ i }}">{{ country.name ? country.name :
|
||||||
country.code }}
|
country.code }}
|
||||||
</option>
|
</option>
|
||||||
|
@ -29,12 +54,12 @@
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="selectedCountry">
|
<div *ngIf="selectedCountry">
|
||||||
<div>
|
<div>
|
||||||
<h2 class="heading_b uk-margin-bottom uk-margin-medium-top">{{ sourceTitle }} Repositories in {{
|
<h2 class="heading_b uk-margin-bottom uk-margin-medium-top">{{ sourceTitle }}
|
||||||
selectedCountry.name ? selectedCountry.name : selectedCountry.code }}</h2>
|
{{mode === 'cris' ? '- Research Information Systems' : 'Repositories'}} in
|
||||||
|
{{selectedCountry.name ? selectedCountry.name : selectedCountry.code }}</h2>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="loadingMessage" class="loading-big">
|
<div *ngIf="loadingMessage" class="loading-big">
|
||||||
<div class="loader-big"
|
<div class="loader-big" style="text-align: center; padding-top: 170px; color: rgb(47, 64, 80); font-weight: bold;">
|
||||||
style="text-align: center; padding-top: 170px; color: rgb(47, 64, 80); font-weight: bold;">
|
|
||||||
{{ loadingMessage }}
|
{{ loadingMessage }}
|
||||||
</div>
|
</div>
|
||||||
<div class="whiteFilm"></div>
|
<div class="whiteFilm"></div>
|
||||||
|
@ -51,15 +76,11 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group"
|
<div class="form-group" *ngFor="let repo of countryRepos | repoFilter: searchBox">
|
||||||
*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;">
|
||||||
<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"
|
<input type="radio" value="{{ repo.id }}" id="{{ repo.id }}" name="repositories"
|
||||||
(change)="onChooseRepository(repo.id)" [disabled]="repo.registeredby !== null">
|
(change)="onChooseRepository(repo.id)" [disabled]="repo.registeredby !== null">
|
||||||
<span>
|
<span>{{(repo.officialname !== null) ? repo.officialname : repo.englishname }}
|
||||||
{{(repo.officialname !== null) ? repo.officialname : repo.englishname }}
|
|
||||||
<span *ngIf="repo.registeredby !== null"
|
<span *ngIf="repo.registeredby !== null"
|
||||||
class="uk-badge uk-badge-warning uk-margin-small-right uk-margin-small-left">Registered</span>
|
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]="">
|
<a target="_blank" href="{{ (repo.websiteurl !== null) ? repo.websiteurl : '' }}" [ngStyle]="">
|
||||||
|
|
|
@ -28,6 +28,9 @@ export class RegisterDatasourceSelectExistingComponent implements OnInit {
|
||||||
sourceUrl: string;
|
sourceUrl: string;
|
||||||
sourceTitle: string;
|
sourceTitle: string;
|
||||||
latestUpdate: string;
|
latestUpdate: string;
|
||||||
|
opendoarlatestUpdate: string;
|
||||||
|
re3datalatestUpdate: string;
|
||||||
|
fairsharinglatestUpdate: string;
|
||||||
|
|
||||||
@Input() mode: string;
|
@Input() mode: string;
|
||||||
|
|
||||||
|
@ -44,20 +47,22 @@ export class RegisterDatasourceSelectExistingComponent implements OnInit {
|
||||||
this.hasSelectedCountry = false;
|
this.hasSelectedCountry = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
setUpSourceInfo() {
|
setUpSourceInfo() { // deprecated?
|
||||||
if (this.mode === 'opendoar') {
|
if (this.mode === 'opendoar') {
|
||||||
this.sourceUrl = 'http://v2.sherpa.ac.uk/opendoar/';
|
this.sourceUrl = 'http://v2.sherpa.ac.uk/opendoar/';
|
||||||
this.sourceTitle = 'OpenDOAR';
|
this.sourceTitle = 'OpenDOAR';
|
||||||
} else if (this.mode === 're3data') {
|
} else if (this.mode === 're3data') {
|
||||||
this.sourceUrl = 'https://www.re3data.org/';
|
this.sourceUrl = 'https://www.re3data.org/';
|
||||||
this.sourceTitle = 'Re3data';
|
this.sourceTitle = 'Re3data';
|
||||||
|
} else if (this.mode === 'cris') {
|
||||||
|
this.sourceUrl = 'https://eurocris.org';
|
||||||
|
this.sourceTitle = 'euroCRIS';
|
||||||
}
|
}
|
||||||
this.getLatestUpdate();
|
this.getLatestUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
getCountries() {
|
getCountries() {
|
||||||
this.repoService.getCountries()
|
this.repoService.getCountries().subscribe(
|
||||||
.subscribe(
|
|
||||||
countries => {
|
countries => {
|
||||||
// TODO: check again getCountries null return values
|
// TODO: check again getCountries null return values
|
||||||
/*/!* check for null values *!/
|
/*/!* check for null values *!/
|
||||||
|
@ -88,7 +93,7 @@ export class RegisterDatasourceSelectExistingComponent implements OnInit {
|
||||||
|
|
||||||
getReposInCountry(i: number) {
|
getReposInCountry(i: number) {
|
||||||
const country = this.countries[i];
|
const country = this.countries[i];
|
||||||
console.log(`I got ${country} and ${this.mode}`);
|
// console.log(`I got ${country} and ${this.mode}`);
|
||||||
this.countryRepos = [];
|
this.countryRepos = [];
|
||||||
this.selectedCountry = country;
|
this.selectedCountry = country;
|
||||||
this.hasSelectedCountry = false;
|
this.hasSelectedCountry = false;
|
||||||
|
@ -118,14 +123,21 @@ export class RegisterDatasourceSelectExistingComponent implements OnInit {
|
||||||
}
|
}
|
||||||
this.loadingMessage = '';
|
this.loadingMessage = '';
|
||||||
this.alertMessage = '';
|
this.alertMessage = '';
|
||||||
console.log('this.selectedCountry became', JSON.stringify(this.selectedCountry));
|
// console.log('this.selectedCountry became', JSON.stringify(this.selectedCountry));
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
getLatestUpdate() {
|
getLatestUpdate() {
|
||||||
return this.repoService.getListLatestUpdate(this.mode).subscribe(
|
return this.repoService.getListLatestUpdate(this.mode).subscribe(
|
||||||
responseDate => this.latestUpdate = responseDate['lastCollectionDate'],
|
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)
|
error => console.log(error)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,36 +23,34 @@
|
||||||
<div class="steps clearfix">
|
<div class="steps clearfix">
|
||||||
<ul role="tablist">
|
<ul role="tablist">
|
||||||
<li role="tab" class="first {{ (currentStep == 0) ? 'current' : '' }}" aria-disabled="false" aria-selected="true">
|
<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="current-info audible">current step: </span>-->
|
||||||
<span class="number">1</span>
|
<span class="number">1</span>
|
||||||
<span class="title">Select Repository</span>
|
<span class="title">Select {{currentMode === 'cris' ? 'Datasource' : 'Repository'}}</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li role="tab" class="{{ (currentStep < 1) ? 'disabled' : '' }} {{ (currentStep == 1) ? 'current' : '' }}" aria-disabled="true">
|
<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="number">2</span>
|
||||||
<span class="title">Register data source</span>
|
<span class="title">Register data source</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li role="tab" class=" {{ (currentStep < 2) ? 'disabled' : '' }} {{ (currentStep == 2) ? 'current' : '' }}" aria-disabled="true">
|
<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="number">3</span>
|
||||||
<span class="title">Register interface</span>
|
<span class="title">Register interface</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li role="tab" class="last {{ (currentStep < 3) ? 'disabled' : '' }} {{ (currentStep == 3) ? 'current' : '' }}" aria-disabled="true">
|
<li role="tab" class=" {{ (currentStep < 3) ? 'disabled' : '' }} {{ (currentStep == 3) ? 'current' : '' }}" aria-disabled="true">
|
||||||
<!-- ToU: replace above line with below line -->
|
<a id="wizard_advanced-t-3" aria-controls="wizard_advanced-p-3" style="cursor: default">
|
||||||
<!--<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">
|
|
||||||
<span class="number">4</span>
|
<span class="number">4</span>
|
||||||
<!-- ToU: uncomment this section -->
|
<span class="title">Terms of Use</span>
|
||||||
<!--<span class="title">Terms of Use</span>
|
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li role="tab" class="last {{ (currentStep < 4) ? 'disabled' : '' }} {{ (currentStep == 4) ? 'current' : '' }}" aria-disabled="true">
|
<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">
|
<a id="wizard_advanced-t-4" aria-controls="wizard_advanced-p-4" style="cursor: default">
|
||||||
<span class="number">5</span>-->
|
<span class="number">5</span>
|
||||||
<span class="title">Finish</span>
|
<span class="title">Finish</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
@ -73,11 +71,13 @@
|
||||||
<section id="wizard_advanced-p-0" role="tabpanel" aria-labelledby="wizard_advanced-h-0"
|
<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">
|
class="body step-0 {{ (currentStep == 0) ? 'current' : '' }}" data-step="0" aria-hidden="false">
|
||||||
|
|
||||||
<app-select-existing-datasource *ngIf="(currentStep === 0) && (currentMode !== null) && !loadingMessage"
|
<app-select-existing-datasource
|
||||||
|
*ngIf="(currentStep === 0) && (currentMode !== null) && !loadingMessage"
|
||||||
#datasourcesByCountry
|
#datasourcesByCountry
|
||||||
[mode]="currentMode"
|
[mode]="currentMode"
|
||||||
(emitRepoId)="getRepoId($event)"
|
(emitRepoId)="getRepoId($event)"
|
||||||
(promptNext)="goToStep2($event)"></app-select-existing-datasource>
|
(promptNext)="goToStep2($event)">
|
||||||
|
</app-select-existing-datasource>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- second section -->
|
<!-- second section -->
|
||||||
|
@ -86,9 +86,9 @@
|
||||||
class="body step-1 {{ (currentStep == 1) ? 'current' : '' }}" data-step="1" aria-hidden="true">
|
class="body step-1 {{ (currentStep == 1) ? 'current' : '' }}" data-step="1" aria-hidden="true">
|
||||||
|
|
||||||
<datasource-update-form *ngIf="(currentStep === 1) && (repo !== null) && !loadingMessage"
|
<datasource-update-form *ngIf="(currentStep === 1) && (repo !== null) && !loadingMessage"
|
||||||
#registerDatasource
|
#registerDatasource [selectedRepo]="repo" [mode]="currentMode"
|
||||||
[selectedRepo]="repo"
|
(emittedInfo)="getUpdatedRepo($event)">
|
||||||
(emittedInfo)="getUpdatedRepo($event)"></datasource-update-form>
|
</datasource-update-form>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- third section -->
|
<!-- third section -->
|
||||||
|
@ -102,7 +102,7 @@
|
||||||
<div>
|
<div>
|
||||||
<div class="md-card" style="height: 100%">
|
<div class="md-card" style="height: 100%">
|
||||||
<app-repository-interface-form #interfacesArray
|
<app-repository-interface-form #interfacesArray
|
||||||
[data]="inter"
|
[data]="inter" [mode]="currentMode"
|
||||||
(emitDeleteInterface)="removeInterfaceFromList($event)">
|
(emitDeleteInterface)="removeInterfaceFromList($event)">
|
||||||
</app-repository-interface-form>
|
</app-repository-interface-form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -131,28 +131,24 @@
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- fourth section -->
|
<!-- fourth section -->
|
||||||
<h3 id="wizard_advanced-h-3" tabindex="-1" class="title {{ (currentStep == 3) ? 'current' : '' }}">Finish</h3>
|
<h3 id="wizard_advanced-h-3" tabindex="-1" class="title {{ (currentStep == 3) ? 'current' : '' }}">Terms of Use</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>-->
|
|
||||||
<section id="wizard_advanced-p-3" role="tabpanel" aria-labelledby="wizard_advanced-h-3"
|
<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">
|
class="body step-3 {{ (currentStep == 3) ? 'current' : '' }}" data-step="3" 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">
|
|
||||||
<div *ngIf="(currentStep === 3) && !loadingMessage" class="uk-grid uk-grid-match">
|
<div *ngIf="(currentStep === 3) && !loadingMessage" class="uk-grid uk-grid-match">
|
||||||
<datasource-update-terms-form #updateTermsForm
|
<datasource-update-terms-form #updateTermsForm
|
||||||
[selectedRepo]="repo"
|
[selectedRepo]="repo"
|
||||||
[showButton]=false></datasource-update-terms-form>
|
[showButton]=false
|
||||||
|
(emittedInfo)="getTerms($event)">
|
||||||
|
</datasource-update-terms-form>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!– fifth section –>
|
<!-- fifth section -->
|
||||||
<h3 id="wizard_advanced-h-4" tabindex="-1" class="title {{ (currentStep == 4) ? 'current' : '' }}">Finish</h3>
|
<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"
|
<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">
|
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-lg-12">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div>
|
<div>
|
||||||
|
@ -160,8 +156,9 @@
|
||||||
<h2 class="openAIRECompliantLogoMessage">
|
<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 repository with/on OpenAIRE.
|
||||||
It usually takes about 6 weeks to check your metadata and index it.
|
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>
|
For questions, please create a ticket
|
||||||
or write to <a href="mailto:helpdesk@openaire.eu">helpdesk@openaire.eu</a>.
|
<!-- <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>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -172,21 +169,8 @@
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="currentStep != 3" class="actions clearfix">
|
|
||||||
<ul role="menu" aria-label="Pagination">
|
<div *ngIf="currentStep != 4" class="actions clearfix">
|
||||||
<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">
|
|
||||||
<ul role="menu" aria-label="Pagination">
|
<ul role="menu" aria-label="Pagination">
|
||||||
<li class="button_previous {{ (currentStep < 1) ? 'disabled' : '' }}" aria-disabled="true">
|
<li class="button_previous {{ (currentStep < 1) ? 'disabled' : '' }}" aria-disabled="true">
|
||||||
<a (click)="moveBackAStep()" role="menuitem"><i class="material-icons"></i> Previous</a>
|
<a (click)="moveBackAStep()" role="menuitem"><i class="material-icons"></i> Previous</a>
|
||||||
|
@ -198,7 +182,7 @@
|
||||||
<a (click)="moveAStep()" role="menuitem">Finish</a>
|
<a (click)="moveAStep()" role="menuitem">Finish</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>-->
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -219,4 +203,3 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@ import {
|
||||||
} from '../../../domain/shared-messages';
|
} from '../../../domain/shared-messages';
|
||||||
import { DatasourceUpdateFormComponent } from '../../../shared/reusablecomponents/sources-forms/datasource-update-form.component';
|
import { DatasourceUpdateFormComponent } from '../../../shared/reusablecomponents/sources-forms/datasource-update-form.component';
|
||||||
import { RegisterDatasourceSelectExistingComponent } from './register-datasource-select-existing.component';
|
import { RegisterDatasourceSelectExistingComponent } from './register-datasource-select-existing.component';
|
||||||
|
import {DatasourceUpdateTermsFormComponent} from '../../../shared/reusablecomponents/sources-forms/datasource-update-terms-form.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-register-existing-datasource',
|
selector: 'app-register-existing-datasource',
|
||||||
|
@ -63,13 +64,14 @@ export class RegisterExistingDatasourceComponent implements OnInit {
|
||||||
@ViewChildren('interfacesArray') interfacesArray: QueryList<DatasourceNewInterfaceFormComponent>;
|
@ViewChildren('interfacesArray') interfacesArray: QueryList<DatasourceNewInterfaceFormComponent>;
|
||||||
dataForInterfaceComp: any[] = [];
|
dataForInterfaceComp: any[] = [];
|
||||||
|
|
||||||
|
@ViewChild('updateTermsForm')
|
||||||
|
updateTermsForm: DatasourceUpdateTermsFormComponent;
|
||||||
|
|
||||||
constructor(private fb: FormBuilder,
|
constructor(private fb: FormBuilder,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private repoService: RepositoryService) {}
|
private repoService: RepositoryService) {}
|
||||||
|
|
||||||
// @ViewChild('updateTermsForm')
|
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
if (this.datasourceType && this.currentMode) {
|
if (this.datasourceType && this.currentMode) {
|
||||||
// will execute getStep() every time there is a change in query params
|
// will execute getStep() every time there is a change in query params
|
||||||
|
@ -98,17 +100,14 @@ export class RegisterExistingDatasourceComponent implements OnInit {
|
||||||
} else {
|
} else {
|
||||||
this.currentStep = 2;
|
this.currentStep = 2;
|
||||||
}
|
}
|
||||||
} else if (stepName === 'finish') {
|
} else if (stepName === 'termsOfUse') {
|
||||||
this.currentStep = 3;
|
|
||||||
// ToU: to enable ToU delete the 2 lines above and uncomment the section below
|
|
||||||
/*} else if (stepName === 'termsOfUse') {
|
|
||||||
if (!this.interfacesArray) {
|
if (!this.interfacesArray) {
|
||||||
this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=selectDatasource`);
|
this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=selectDatasource`);
|
||||||
} else {
|
} else {
|
||||||
this.currentStep = 3;
|
this.currentStep = 3;
|
||||||
}
|
}
|
||||||
} else if (stepName === 'finish') {
|
} else if (stepName === 'finish') {
|
||||||
this.currentStep = 4;*/
|
this.currentStep = 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.rightHelperContent.ngOnInit();
|
this.rightHelperContent.ngOnInit();
|
||||||
|
@ -135,9 +134,7 @@ export class RegisterExistingDatasourceComponent implements OnInit {
|
||||||
window.scrollTo(1, 1);
|
window.scrollTo(1, 1);
|
||||||
} else {
|
} else {
|
||||||
if (this.repoInterfaces.length > 0) {
|
if (this.repoInterfaces.length > 0) {
|
||||||
this.registerRepository();
|
this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=termsOfUse`);
|
||||||
// ToU: replace above line with the comment below
|
|
||||||
// this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=termsOfUse`);
|
|
||||||
} else {
|
} else {
|
||||||
this.errorMessage = noInterfacesSaved;
|
this.errorMessage = noInterfacesSaved;
|
||||||
window.scrollTo(1, 1);
|
window.scrollTo(1, 1);
|
||||||
|
@ -145,9 +142,8 @@ export class RegisterExistingDatasourceComponent implements OnInit {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
// ToU: uncomment these lines
|
} else if (this.currentStep === 3) {
|
||||||
// } else if (this.currentStep === 3) {
|
this.registerRepository();
|
||||||
// this.registerRepository();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,19 +158,15 @@ export class RegisterExistingDatasourceComponent implements OnInit {
|
||||||
of(this.getInterfaces()).subscribe(
|
of(this.getInterfaces()).subscribe(
|
||||||
() => this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=basicInformation`)
|
() => this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=basicInformation`)
|
||||||
);
|
);
|
||||||
// ToU: uncomment these lines
|
} else if (this.currentStep === 3) {
|
||||||
// } else if (this.currentStep === 3) {
|
this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=interfaces`);
|
||||||
// this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=interfaces`);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
addInterfaceToList(intrf?: RepositoryInterface) {
|
addInterfaceToList(intrf?: RepositoryInterface) {
|
||||||
|
|
||||||
console.log('clicked add interface to list');
|
|
||||||
|
|
||||||
const curIndex = this.dataForInterfaceComp.length;
|
const curIndex = this.dataForInterfaceComp.length;
|
||||||
const curRepoInfo = { id: this.repo.id, datasourceType: this.repo.datasourceType,
|
const curRepoInfo = { id: this.repo.id, datasourceType: this.repo.eoscDatasourceType,
|
||||||
datasourceClass: this.repo.datasourceClass, registeredBy: this.repo.registeredBy };
|
datasourceClass: this.repo.eoscDatasourceType, registeredBy: this.repo.registeredby };
|
||||||
if (intrf) {
|
if (intrf) {
|
||||||
this.dataForInterfaceComp.push([true, curIndex, curRepoInfo, intrf]);
|
this.dataForInterfaceComp.push([true, curIndex, curRepoInfo, intrf]);
|
||||||
} else {
|
} else {
|
||||||
|
@ -190,7 +182,7 @@ export class RegisterExistingDatasourceComponent implements OnInit {
|
||||||
}
|
}
|
||||||
tempArray.splice(i, 1);
|
tempArray.splice(i, 1);
|
||||||
this.dataForInterfaceComp = tempArray;
|
this.dataForInterfaceComp = tempArray;
|
||||||
console.log(JSON.stringify(this.dataForInterfaceComp));
|
// console.log(JSON.stringify(this.dataForInterfaceComp));
|
||||||
}
|
}
|
||||||
|
|
||||||
getInterfaces() {
|
getInterfaces() {
|
||||||
|
@ -215,10 +207,10 @@ export class RegisterExistingDatasourceComponent implements OnInit {
|
||||||
} else {
|
} else {
|
||||||
this.repoInterfaces.push(repo_interface);
|
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;
|
return invalidFormsCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,9 +221,9 @@ export class RegisterExistingDatasourceComponent implements OnInit {
|
||||||
this.dataForInterfaceComp.push([
|
this.dataForInterfaceComp.push([
|
||||||
true, i,
|
true, i,
|
||||||
{ id: this.repo.id,
|
{ id: this.repo.id,
|
||||||
datasourceType: this.repo.datasourceType,
|
datasourceType: this.repo.eoscDatasourceType,
|
||||||
datasourceClass: this.repo.datasourceClass,
|
datasourceClass: this.repo.eoscDatasourceType,
|
||||||
registeredBy: this.repo.registeredBy
|
registeredBy: this.repo.registeredby
|
||||||
},
|
},
|
||||||
this.repoInterfaces[i]
|
this.repoInterfaces[i]
|
||||||
]);
|
]);
|
||||||
|
@ -240,9 +232,9 @@ export class RegisterExistingDatasourceComponent implements OnInit {
|
||||||
this.dataForInterfaceComp.push([
|
this.dataForInterfaceComp.push([
|
||||||
true, 0,
|
true, 0,
|
||||||
{ id: this.repo.id,
|
{ id: this.repo.id,
|
||||||
datasourceType: this.repo.datasourceType,
|
datasourceType: this.repo.eoscDatasourceType,
|
||||||
datasourceClass: this.repo.datasourceClass,
|
datasourceClass: this.repo.eoscDatasourceType,
|
||||||
registeredBy: this.repo.registeredBy
|
registeredBy: this.repo.registeredby
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@ -279,6 +271,7 @@ export class RegisterExistingDatasourceComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
getUpdatedRepo(repo: Repository) {
|
getUpdatedRepo(repo: Repository) {
|
||||||
|
console.log('getUpdatedRepo(repo: Repository)');
|
||||||
this.repo = repo;
|
this.repo = repo;
|
||||||
if (this.repoInterfaces.length === 0) {
|
if (this.repoInterfaces.length === 0) {
|
||||||
this.getRepoInterfaces();
|
this.getRepoInterfaces();
|
||||||
|
@ -303,7 +296,7 @@ export class RegisterExistingDatasourceComponent implements OnInit {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
console.log(`the number of interfaces is ${this.repoInterfaces.length}`);
|
// console.log(`the number of interfaces is ${this.repoInterfaces.length}`);
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
|
@ -320,17 +313,24 @@ export class RegisterExistingDatasourceComponent implements OnInit {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// recheck if needed
|
||||||
|
getTerms(repo: Repository) {
|
||||||
|
this.repo = repo;
|
||||||
|
}
|
||||||
|
|
||||||
downloadLogo() {
|
downloadLogo() {
|
||||||
window.open('../../../../assets/imgs/3_0ValidatedLogo.png', '_blank', 'enabledstatus=0,toolbar=0,menubar=0,location=0');
|
window.open('../../../../assets/imgs/3_0ValidatedLogo.png', '_blank', 'enabledstatus=0,toolbar=0,menubar=0,location=0');
|
||||||
}
|
}
|
||||||
|
|
||||||
registerRepository() {
|
registerRepository() {
|
||||||
|
console.log('in registerRepository, step ===', this.currentStep);
|
||||||
if (this.repo) {
|
if (this.repo) {
|
||||||
this.loadingMessage = 'Saving changes';
|
this.loadingMessage = 'Saving changes';
|
||||||
this.errorMessage = '';
|
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 => {
|
response => {
|
||||||
console.log(`addRepository responded: ${response.id}, ${response.registeredBy}`);
|
console.log(`addRepository responded: ${response.id}, ${response.registeredby}`);
|
||||||
this.repo = response;
|
this.repo = response;
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
|
@ -341,7 +341,6 @@ export class RegisterExistingDatasourceComponent implements OnInit {
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
this.saveNewInterfaces();
|
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) {
|
if (intrf.id) {
|
||||||
let req;
|
let req;
|
||||||
if (this.interfacesToDelete.some(id => id === intrf.id)) {
|
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 {
|
} else {
|
||||||
// console.log('comments', intrf.comments);
|
// 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;
|
return req;
|
||||||
} else {
|
} else {
|
||||||
// console.log('comments', intrf.comments);
|
// 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(
|
).subscribe(
|
||||||
|
|
|
@ -23,28 +23,27 @@
|
||||||
<div class="steps clearfix">
|
<div class="steps clearfix">
|
||||||
<ul role="tablist">
|
<ul role="tablist">
|
||||||
<li role="tab" class="first {{ (currentStep == 1) ? 'current' : '' }}" aria-disabled="false" aria-selected="true">
|
<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="current-info audible">current step: </span>-->
|
||||||
<span class="number">1</span>
|
<span class="number">1</span>
|
||||||
<span class="title">Register data source</span>
|
<span class="title">Register data source</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li role="tab" class="{{ (currentStep < 2) ? 'disabled' : '' }} {{ (currentStep == 2) ? 'current' : '' }}" aria-disabled="true">
|
<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="number">2</span>
|
||||||
<span class="title">Register interface</span>
|
<span class="title">Register interface</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li role="tab" class=" {{ (currentStep < 3) ? 'disabled' : '' }} {{ (currentStep == 3) ? 'current' : '' }}" aria-disabled="true">
|
<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>
|
<span class="number">3</span>
|
||||||
<!-- ToU: uncomment this section -->
|
<span class="title">Terms of Use</span>
|
||||||
<!--<span class="title">Terms of Use</span>
|
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li role="tab" class=" {{ (currentStep < 4) ? 'disabled' : '' }} {{ (currentStep == 4) ? 'current' : '' }}" aria-disabled="true">
|
<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">
|
<a id="wizard_advanced-t-3" aria-controls="wizard_advanced-p-2" style="cursor: default">
|
||||||
<span class="number">4</span>-->
|
<span class="number">4</span>
|
||||||
<span class="title">Finish</span>
|
<span class="title">Finish</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
@ -92,7 +91,7 @@
|
||||||
<div>
|
<div>
|
||||||
<div class="md-card" style="height: 100%">
|
<div class="md-card" style="height: 100%">
|
||||||
<app-repository-interface-form #interfacesArray
|
<app-repository-interface-form #interfacesArray
|
||||||
[data]="inter"
|
[data]="inter" [mode]=""
|
||||||
(emitDeleteInterface)="removeInterfaceFromList($event)">
|
(emitDeleteInterface)="removeInterfaceFromList($event)">
|
||||||
</app-repository-interface-form>
|
</app-repository-interface-form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -122,34 +121,32 @@
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- third section -->
|
<!-- third section -->
|
||||||
<h3 id="wizard_advanced-h-2" tabindex="-1" class="title {{ (currentStep == 3) ? 'current' : '' }}">Finish</h3>
|
<h3 id="wizard_advanced-h-2" tabindex="-1" class="title {{ (currentStep == 3) ? 'current' : '' }}">Terms of Use</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>-->
|
|
||||||
<section id="wizard_advanced-p-2" role="tabpanel" aria-labelledby="wizard_advanced-h-2"
|
<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">
|
class="body step-2 {{ (currentStep == 3) ? 'current' : '' }}" data-step="2" aria-hidden="true">
|
||||||
<div *ngIf="(currentStep === 3) && !loadingMessage" class="row openAIRECompliantLogoDownload">
|
<div *ngIf="(currentStep === 3) && !loadingMessage" class="uk-grid">
|
||||||
<!-- ToU: delete line above and uncomment section below -->
|
|
||||||
<!--<div *ngIf="(currentStep === 3) && !loadingMessage" class="uk-grid">
|
|
||||||
<datasource-update-terms-form #updateTermsForm
|
<datasource-update-terms-form #updateTermsForm
|
||||||
[selectedRepo]="repo"
|
[selectedRepo]="repo"
|
||||||
[showButton]=false></datasource-update-terms-form>
|
[showButton]=false
|
||||||
|
(emittedInfo)="getTerms($event)"></datasource-update-terms-form>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!– fourth section –>
|
<!-- fourth section -->
|
||||||
<h3 id="wizard_advanced-h-3" tabindex="-1" class="title {{ (currentStep == 4) ? 'current' : '' }}">Finish</h3>
|
<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"
|
<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">
|
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-lg-12">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div>
|
<div>
|
||||||
<div class="openAIRECompliantLogo">
|
<div class="openAIRECompliantLogo">
|
||||||
<h2 class="openAIRECompliantLogoMessage">
|
<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.
|
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>
|
For questions, please create a ticket
|
||||||
or write to <a href="mailto:helpdesk@openaire.eu">helpdesk@openaire.eu</a>.
|
<!-- <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.-->
|
<!--Congratulations! Your repository was successfully registered in OpenAIRE. You can download this logo to use in your site.-->
|
||||||
</h2>
|
</h2>
|
||||||
<!--<img src="../../../../assets/imgs/3_0ValidatedLogo.png" alt="OpenAireCompliant">-->
|
<!--<img src="../../../../assets/imgs/3_0ValidatedLogo.png" alt="OpenAireCompliant">-->
|
||||||
|
@ -165,21 +162,8 @@
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="currentStep != 3" class="actions clearfix">
|
|
||||||
<ul role="menu" aria-label="Pagination">
|
<div *ngIf="currentStep != 4" class="actions clearfix">
|
||||||
<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">
|
|
||||||
<ul role="menu" aria-label="Pagination">
|
<ul role="menu" aria-label="Pagination">
|
||||||
<li class="button_previous {{ (currentStep <= 1) ? 'disabled' : '' }}" aria-disabled="true">
|
<li class="button_previous {{ (currentStep <= 1) ? 'disabled' : '' }}" aria-disabled="true">
|
||||||
<a (click)="moveBackAStep()" role="menuitem"><i class="material-icons"></i> Previous</a>
|
<a (click)="moveBackAStep()" role="menuitem"><i class="material-icons"></i> Previous</a>
|
||||||
|
@ -191,7 +175,7 @@
|
||||||
<a (click)="moveAStep()" role="menuitem">Finish</a>
|
<a (click)="moveAStep()" role="menuitem">Finish</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>-->
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -9,11 +9,13 @@ import { DatasourceNewInterfaceFormComponent } from '../../../shared/reusablecom
|
||||||
import { from, of } from 'rxjs';
|
import { from, of } from 'rxjs';
|
||||||
import { concatMap } from 'rxjs/operators';
|
import { concatMap } from 'rxjs/operators';
|
||||||
import { errorsInInterfaces, formErrorRegisterRepo, noInterfacesSaved } from '../../../domain/shared-messages';
|
import { errorsInInterfaces, formErrorRegisterRepo, noInterfacesSaved } from '../../../domain/shared-messages';
|
||||||
|
import {DatasourceUpdateTermsFormComponent} from '../../../shared/reusablecomponents/sources-forms/datasource-update-terms-form.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-register-new-datasource',
|
selector: 'app-register-new-datasource',
|
||||||
templateUrl: './register-new-datasource.component.html'
|
templateUrl: './register-new-datasource.component.html'
|
||||||
})
|
})
|
||||||
|
|
||||||
export class RegisterNewDatasourceComponent implements OnInit {
|
export class RegisterNewDatasourceComponent implements OnInit {
|
||||||
loadingMessage: string;
|
loadingMessage: string;
|
||||||
errorMessage: string;
|
errorMessage: string;
|
||||||
|
@ -48,13 +50,14 @@ export class RegisterNewDatasourceComponent implements OnInit {
|
||||||
@ViewChildren('interfacesArray') interfacesArray: QueryList<DatasourceNewInterfaceFormComponent>;
|
@ViewChildren('interfacesArray') interfacesArray: QueryList<DatasourceNewInterfaceFormComponent>;
|
||||||
dataForInterfaceComp: any[] = [];
|
dataForInterfaceComp: any[] = [];
|
||||||
|
|
||||||
|
@ViewChild('updateTermsForm')
|
||||||
|
updateTermsForm: DatasourceUpdateTermsFormComponent;
|
||||||
|
|
||||||
constructor(private fb: FormBuilder,
|
constructor(private fb: FormBuilder,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private repoService: RepositoryService) {}
|
private repoService: RepositoryService) {}
|
||||||
|
|
||||||
// @ViewChild('updateTermsForm')
|
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
if (this.datasourceType) {
|
if (this.datasourceType) {
|
||||||
|
|
||||||
|
@ -80,17 +83,14 @@ export class RegisterNewDatasourceComponent implements OnInit {
|
||||||
} else {
|
} else {
|
||||||
this.currentStep = 2;
|
this.currentStep = 2;
|
||||||
}
|
}
|
||||||
} else if (stepName === 'finish') {
|
} else if (stepName === 'termsOfUse') {
|
||||||
this.currentStep = 3;
|
|
||||||
// ToU: to enable ToU delete the 2 lines above and uncomment the section below
|
|
||||||
/*} else if (stepName === 'termsOfUse') {
|
|
||||||
if (this.interfacesArray && this.interfacesArray.length === 0) {
|
if (this.interfacesArray && this.interfacesArray.length === 0) {
|
||||||
this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=basicInformation`);
|
this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=basicInformation`);
|
||||||
} else {
|
} else {
|
||||||
this.currentStep = 3;
|
this.currentStep = 3;
|
||||||
}
|
}
|
||||||
} else if (stepName === 'finish') {
|
} else if (stepName === 'finish') {
|
||||||
this.currentStep = 4;*/
|
this.currentStep = 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.rightHelperContent.ngOnInit();
|
this.rightHelperContent.ngOnInit();
|
||||||
|
@ -111,9 +111,7 @@ export class RegisterNewDatasourceComponent implements OnInit {
|
||||||
window.scrollTo(1, 1);
|
window.scrollTo(1, 1);
|
||||||
} else {
|
} else {
|
||||||
if (this.repoInterfaces.length > 0) {
|
if (this.repoInterfaces.length > 0) {
|
||||||
this.addRepository();
|
this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=termsOfUse`);
|
||||||
// ToU: replace above line with the comment below
|
|
||||||
// this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=termsOfUse`);
|
|
||||||
} else {
|
} else {
|
||||||
this.errorMessage = noInterfacesSaved;
|
this.errorMessage = noInterfacesSaved;
|
||||||
window.scrollTo(1, 1);
|
window.scrollTo(1, 1);
|
||||||
|
@ -121,9 +119,8 @@ export class RegisterNewDatasourceComponent implements OnInit {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
// ToU: uncomment these lines
|
} else if ( this.currentStep === 3 ) {
|
||||||
// } else if ( this.currentStep === 3 ) {
|
this.addRepository();
|
||||||
// this.addRepository();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,16 +130,15 @@ export class RegisterNewDatasourceComponent implements OnInit {
|
||||||
of(this.getInterfaces()).subscribe(
|
of(this.getInterfaces()).subscribe(
|
||||||
() => this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=basicInformation`)
|
() => this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=basicInformation`)
|
||||||
);
|
);
|
||||||
// ToU: uncomment these lines
|
} else if (this.currentStep === 3) {
|
||||||
// } else if (this.currentStep === 3) {
|
this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=interfaces`);
|
||||||
// this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=interfaces`);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
addInterfaceToList(intrf?: RepositoryInterface) {
|
addInterfaceToList(intrf?: RepositoryInterface) {
|
||||||
const curIndex = this.dataForInterfaceComp.length;
|
const curIndex = this.dataForInterfaceComp.length;
|
||||||
const curRepoInfo = { id: this.repo.id, datasourceType: this.repo.datasourceType,
|
const curRepoInfo = { id: this.repo.id, datasourceType: this.repo.eoscDatasourceType,
|
||||||
datasourceClass: this.repo.datasourceClass, registeredBy: this.repo.registeredBy };
|
datasourceClass: this.repo.eoscDatasourceType, registeredBy: this.repo.registeredby };
|
||||||
if (intrf) {
|
if (intrf) {
|
||||||
this.dataForInterfaceComp.push([true, curIndex, curRepoInfo, intrf]);
|
this.dataForInterfaceComp.push([true, curIndex, curRepoInfo, intrf]);
|
||||||
} else {
|
} else {
|
||||||
|
@ -184,9 +180,9 @@ export class RegisterNewDatasourceComponent implements OnInit {
|
||||||
this.dataForInterfaceComp.push([
|
this.dataForInterfaceComp.push([
|
||||||
true, i,
|
true, i,
|
||||||
{ id: this.repo.id,
|
{ id: this.repo.id,
|
||||||
datasourceType: this.repo.datasourceType,
|
datasourceType: this.repo.eoscDatasourceType,
|
||||||
datasourceClass: this.repo.datasourceClass,
|
datasourceClass: this.repo.eoscDatasourceType,
|
||||||
registeredBy: this.repo.registeredBy
|
registeredBy: this.repo.registeredby
|
||||||
},
|
},
|
||||||
this.repoInterfaces[i]
|
this.repoInterfaces[i]
|
||||||
]);
|
]);
|
||||||
|
@ -195,9 +191,9 @@ export class RegisterNewDatasourceComponent implements OnInit {
|
||||||
this.dataForInterfaceComp.push([
|
this.dataForInterfaceComp.push([
|
||||||
true, 0,
|
true, 0,
|
||||||
{ id: this.repo.id,
|
{ id: this.repo.id,
|
||||||
datasourceType: this.repo.datasourceType,
|
datasourceType: this.repo.eoscDatasourceType,
|
||||||
datasourceClass: this.repo.datasourceClass,
|
datasourceClass: this.repo.eoscDatasourceType,
|
||||||
registeredBy: this.repo.registeredBy
|
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() {
|
downloadLogo() {
|
||||||
window.open('../../../../assets/imgs/3_0ValidatedLogo.png', '_blank', 'enabledstatus=0,toolbar=0,menubar=0,location=0');
|
window.open('../../../../assets/imgs/3_0ValidatedLogo.png', '_blank', 'enabledstatus=0,toolbar=0,menubar=0,location=0');
|
||||||
}
|
}
|
||||||
|
|
||||||
addRepository() {
|
addRepository() {
|
||||||
|
console.log('in addRepository, step ===', this.currentStep);
|
||||||
if (this.repo) {
|
if (this.repo) {
|
||||||
this.loadingMessage = 'Saving changes';
|
this.loadingMessage = 'Saving changes';
|
||||||
this.errorMessage = '';
|
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 => {
|
response => {
|
||||||
console.log(`addRepository responded: ${response.id}, ${response.registeredBy}`);
|
console.log(`addRepository responded: ${response.id}, ${response.registeredby}`);
|
||||||
this.repo = response;
|
this.repo = response;
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
|
@ -230,7 +235,6 @@ export class RegisterNewDatasourceComponent implements OnInit {
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
this.saveNewInterfaces();
|
this.saveNewInterfaces();
|
||||||
// TODO: update terms when backend is ready, maybe POST with updateRepository
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -242,10 +246,12 @@ export class RegisterNewDatasourceComponent implements OnInit {
|
||||||
concatMap(intrf => {
|
concatMap(intrf => {
|
||||||
if (intrf.id) {
|
if (intrf.id) {
|
||||||
// console.log('comments', intrf.comments);
|
// 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 {
|
} else {
|
||||||
// console.log('comments', intrf.comments);
|
// 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(
|
).subscribe(
|
||||||
|
|
|
@ -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 { Component, OnInit } from '@angular/core';
|
||||||
import { RegisterExistingDatasourceComponent } from './register-existing-datasource.component';
|
import { RegisterExistingDatasourceComponent } from './register-existing-datasource.component';
|
||||||
|
|
||||||
@Component ({
|
@Component ({
|
||||||
selector: 'app-sr-data',
|
selector: 'app-sr-cris',
|
||||||
templateUrl: './register-existing-datasource.component.html'
|
templateUrl: './register-existing-datasource.component.html'
|
||||||
})
|
})
|
||||||
|
export class SrCrisComponent extends RegisterExistingDatasourceComponent implements OnInit {
|
||||||
export class SrDataComponent extends RegisterExistingDatasourceComponent implements OnInit {
|
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.datasourceType = 'data';
|
this.datasourceType = 'cris';
|
||||||
this.currentMode = 're3data';
|
this.currentMode = 'cris';
|
||||||
super.ngOnInit();
|
super.ngOnInit();
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 { Component, OnInit } from '@angular/core';
|
||||||
import { RegisterExistingDatasourceComponent } from './register-existing-datasource.component';
|
import { RegisterExistingDatasourceComponent } from './register-existing-datasource.component';
|
||||||
|
|
||||||
@Component ({
|
@Component ({
|
||||||
selector: 'app-sr-literature',
|
selector: 'app-sr-repository',
|
||||||
templateUrl: './register-existing-datasource.component.html'
|
templateUrl: './register-existing-datasource.component.html'
|
||||||
})
|
})
|
||||||
export class SrLiteratureComponent extends RegisterExistingDatasourceComponent implements OnInit {
|
export class SrRepositoryComponent extends RegisterExistingDatasourceComponent implements OnInit {
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.datasourceType = 'literature';
|
this.datasourceType = 'repository';
|
||||||
this.currentMode = 'opendoar';
|
this.currentMode = 'repository';
|
||||||
super.ngOnInit();
|
super.ngOnInit();
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,17 +4,17 @@ import { SourcesComponent } from './sources.component';
|
||||||
import { SourcesRegisterComponent } from './sources-register.component';
|
import { SourcesRegisterComponent } from './sources-register.component';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { TabsModule } from 'ngx-bootstrap';
|
import { TabsModule } from 'ngx-bootstrap';
|
||||||
import { SrLiteratureComponent } from './sources-register/sr-literature.component';
|
|
||||||
import { ReusableComponentsModule } from '../../shared/reusablecomponents/reusable-components.module';
|
import { ReusableComponentsModule } from '../../shared/reusablecomponents/reusable-components.module';
|
||||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||||
import { RepoFilter } from './sourcesPipes';
|
import { RepoFilter } from './sourcesPipes';
|
||||||
import { SrDataComponent } from './sources-register/sr-data.component';
|
|
||||||
import { RegisterDatasourceSelectExistingComponent } from './sources-register/register-datasource-select-existing.component';
|
import { RegisterDatasourceSelectExistingComponent } from './sources-register/register-datasource-select-existing.component';
|
||||||
import { SrJournalComponent } from './sources-register/sr-journal.component';
|
import { SrJournalComponent } from './sources-register/sr-journal.component';
|
||||||
import { SrAggregatorComponent } from './sources-register/sr-aggregator.component';
|
import { SrAggregatorComponent } from './sources-register/sr-aggregator.component';
|
||||||
import { RegisterNewDatasourceComponent } from './sources-register/register-new-datasource.component';
|
import { RegisterNewDatasourceComponent } from './sources-register/register-new-datasource.component';
|
||||||
import { RegisterExistingDatasourceComponent } from './sources-register/register-existing-datasource.component';
|
import { RegisterExistingDatasourceComponent } from './sources-register/register-existing-datasource.component';
|
||||||
import { DatasourceUpdateTermsFormComponent } from '../../shared/reusablecomponents/sources-forms/datasource-update-terms-form.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 ({
|
@NgModule ({
|
||||||
imports: [
|
imports: [
|
||||||
|
@ -33,10 +33,10 @@ import { DatasourceUpdateTermsFormComponent } from '../../shared/reusablecompone
|
||||||
SourcesRegisterComponent,
|
SourcesRegisterComponent,
|
||||||
RegisterNewDatasourceComponent,
|
RegisterNewDatasourceComponent,
|
||||||
RegisterExistingDatasourceComponent,
|
RegisterExistingDatasourceComponent,
|
||||||
SrLiteratureComponent,
|
SrRepositoryComponent,
|
||||||
SrDataComponent,
|
|
||||||
SrJournalComponent,
|
SrJournalComponent,
|
||||||
SrAggregatorComponent,
|
SrAggregatorComponent,
|
||||||
|
SrCrisComponent,
|
||||||
RegisterDatasourceSelectExistingComponent,
|
RegisterDatasourceSelectExistingComponent,
|
||||||
DatasourceUpdateTermsFormComponent,
|
DatasourceUpdateTermsFormComponent,
|
||||||
RepoFilter // a pipe that searches for string in repository name
|
RepoFilter // a pipe that searches for string in repository name
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import { RouterModule, Routes } from '@angular/router';
|
import { RouterModule, Routes } from '@angular/router';
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { SourcesRegisterComponent } from './sources-register.component';
|
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 { SrJournalComponent } from './sources-register/sr-journal.component';
|
||||||
import { SrAggregatorComponent } from './sources-register/sr-aggregator.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 = [
|
const sourcesRoutes: Routes = [
|
||||||
{
|
{
|
||||||
|
@ -19,12 +19,8 @@ const sourcesRoutes: Routes = [
|
||||||
component: SourcesRegisterComponent
|
component: SourcesRegisterComponent
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'literature',
|
path: 'repository',
|
||||||
component: SrLiteratureComponent
|
component: SrRepositoryComponent
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'data',
|
|
||||||
component: SrDataComponent
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'journal',
|
path: 'journal',
|
||||||
|
@ -33,30 +29,14 @@ const sourcesRoutes: Routes = [
|
||||||
{
|
{
|
||||||
path: 'aggregator',
|
path: 'aggregator',
|
||||||
component: SrAggregatorComponent
|
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
|
|
||||||
// }
|
|
||||||
// ]
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -10,19 +10,19 @@ export class AuthGuardService implements CanActivate, CanLoad {
|
||||||
constructor (private authenticationService: AuthenticationService, private router: Router) {}
|
constructor (private authenticationService: AuthenticationService, private router: Router) {}
|
||||||
|
|
||||||
canActivate (route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
|
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; }
|
|
||||||
|
|
||||||
|
// Store the attempted URL for redirecting
|
||||||
|
if (state.url !== '/join') {
|
||||||
/* If no cookie was found, clear the app's session.
|
/* If no cookie was found, clear the app's session.
|
||||||
The user may have logged out using another OpenAIRE portal */
|
The user may have logged out using another OpenAIRE portal */
|
||||||
sessionStorage.clear();
|
sessionStorage.clear();
|
||||||
|
this.authenticationService.redirectUrl = state.url;
|
||||||
// Store the attempted URL for redirecting
|
|
||||||
sessionStorage.setItem('state.location', 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
|
// If we decide that in this case we will send the user back to the aai
|
||||||
// this.authenticationService.redirectUrl = state.url;
|
// this.authenticationService.redirectUrl = state.url;
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { ActivatedRoute, Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { environment } from '../../environments/environment';
|
import { environment } from '../../environments/environment';
|
||||||
import { deleteCookie, getCookie } from '../domain/utils';
|
import { deleteCookie, getCookie } from '../domain/utils';
|
||||||
|
import { BehaviorSubject } from 'rxjs';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class AuthenticationService {
|
export class AuthenticationService {
|
||||||
|
|
||||||
constructor(private route: ActivatedRoute,
|
constructor(private router: Router,
|
||||||
private router: Router,
|
|
||||||
private http: HttpClient) {}
|
private http: HttpClient) {}
|
||||||
|
|
||||||
private apiUrl: string = environment.API_ENDPOINT;
|
private apiUrl: string = environment.API_ENDPOINT;
|
||||||
|
@ -17,16 +17,19 @@ export class AuthenticationService {
|
||||||
// store the URL so we can redirect after logging in
|
// store the URL so we can redirect after logging in
|
||||||
public redirectUrl: string;
|
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() {
|
public loginWithState() {
|
||||||
console.log(`logging in with state. Current url is: ${this.router.url}`);
|
console.log(`logging in with state. Current url is: ${this.router.url}`);
|
||||||
if (this.redirectUrl) {
|
if (this.redirectUrl) {
|
||||||
const url = this.redirectUrl;
|
const url = this.redirectUrl;
|
||||||
this.redirectUrl = null;
|
this.redirectUrl = null;
|
||||||
console.log('stored location', url);
|
|
||||||
sessionStorage.setItem('state.location', url);
|
sessionStorage.setItem('state.location', url);
|
||||||
} else {
|
} else {
|
||||||
/*sessionStorage.setItem("state.location", this.router.url);*/
|
/*sessionStorage.setItem("state.location", this.router.url);*/
|
||||||
|
@ -37,35 +40,35 @@ export class AuthenticationService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public logout() {
|
public logout() {
|
||||||
deleteCookie('openAIREUser');
|
|
||||||
deleteCookie('AccessToken');
|
deleteCookie('AccessToken');
|
||||||
sessionStorage.clear();
|
sessionStorage.clear();
|
||||||
this.isLoggedIn = false;
|
this.isLoggedIn_.next(false);
|
||||||
|
|
||||||
console.log('logging out, calling:');
|
console.log('logging out, calling:');
|
||||||
console.log(`${this.apiUrl}/openid_logout`);
|
console.log(`${this.apiUrl}/openid_logout`);
|
||||||
|
|
||||||
/*window.location.href = `${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() {
|
public tryLogin() {
|
||||||
if ( getCookie('openAIREUser') && (getCookie('openAIREUser') !== '') ) {
|
this.cookie = getCookie('AccessToken');
|
||||||
console.log(`I got the cookie!`);
|
if (this.cookie && this.cookie !== '') {
|
||||||
console.log(`in tryLogin -> document.cookie is: ${document.cookie.toString()}`);
|
// console.log(`I got the cookie!`);
|
||||||
|
// console.log(`in tryLogin -> document.cookie is: ${document.cookie.toString()}`);
|
||||||
/* SETTING INTERVAL TO REFRESH SESSION TIMEOUT COUNTDOWN */
|
/* SETTING INTERVAL TO REFRESH SESSION TIMEOUT COUNTDOWN */
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
this.http.get(this.apiUrl + '/user/login', { withCredentials: true }).subscribe(
|
this.http.get(this.apiUrl + '/user/login', { withCredentials: true }).subscribe(
|
||||||
userInfo => {
|
userInfo => {
|
||||||
console.log('User is still logged in');
|
// console.log('User is still logged in');
|
||||||
console.log(userInfo);
|
// console.log(userInfo);
|
||||||
this.isLoggedIn = true;
|
this.isLoggedIn_.next(true);
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
this.logout();
|
this.logout();
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
if ( !getCookie('openAIREUser') || (getCookie('openAIREUser') === '') ) {
|
this.cookie = getCookie('AccessToken');
|
||||||
|
if ( !this.cookie || this.cookie === '') {
|
||||||
this.logout();
|
this.logout();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -75,24 +78,24 @@ export class AuthenticationService {
|
||||||
|
|
||||||
}, 1000 * 60 * 5);
|
}, 1000 * 60 * 5);
|
||||||
if (!this.getIsUserLoggedIn()) {
|
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(
|
this.http.get(this.apiUrl + '/user/login', { withCredentials: true }).subscribe(
|
||||||
userInfo => {
|
userInfo => {
|
||||||
console.log(userInfo);
|
// console.log(userInfo);
|
||||||
sessionStorage.setItem('name', userInfo['name']);
|
sessionStorage.setItem('name', userInfo['name']);
|
||||||
sessionStorage.setItem('email', userInfo['email'].trim());
|
sessionStorage.setItem('email', userInfo['email'].trim());
|
||||||
sessionStorage.setItem('role', userInfo['role']);
|
sessionStorage.setItem('role', userInfo['role']);
|
||||||
this.isLoggedIn = true;
|
this.isLoggedIn_.next(true);
|
||||||
console.log(`the current user is: ${sessionStorage.getItem('name')},
|
// console.log(`the current user is: ${sessionStorage.getItem('name')},
|
||||||
${sessionStorage.getItem('email')}, ${sessionStorage.getItem('role')}`);
|
// ${sessionStorage.getItem('email')}, ${sessionStorage.getItem('role')}`);
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
sessionStorage.clear();
|
sessionStorage.clear();
|
||||||
console.log('Error!');
|
console.log('Error!');
|
||||||
console.log(error);
|
console.log(error);
|
||||||
deleteCookie('openAIREUser');
|
|
||||||
deleteCookie('AccessToken');
|
deleteCookie('AccessToken');
|
||||||
this.isLoggedIn = false;
|
deleteCookie('AccessToken');
|
||||||
|
this.isLoggedIn_.next(false);
|
||||||
this.router.navigate(['/home']);
|
this.router.navigate(['/home']);
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
|
@ -101,7 +104,7 @@ export class AuthenticationService {
|
||||||
sessionStorage.removeItem('state.location');
|
sessionStorage.removeItem('state.location');
|
||||||
console.log(`tried to login - returning to state: ${state}`);
|
console.log(`tried to login - returning to state: ${state}`);
|
||||||
if ( !this.getIsUserLoggedIn() ) {
|
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']);
|
this.router.navigate(['/home']);
|
||||||
} else {
|
} else {
|
||||||
this.router.navigate([state]);
|
this.router.navigate([state]);
|
||||||
|
@ -110,26 +113,26 @@ export class AuthenticationService {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
this.isLoggedIn = true;
|
this.isLoggedIn_.next(true);
|
||||||
console.log(`the current user is: ${sessionStorage.getItem('name')},
|
// console.log(`the current user is: ${sessionStorage.getItem('name')},
|
||||||
${sessionStorage.getItem('email')}, ${sessionStorage.getItem('role')}`);
|
// ${sessionStorage.getItem('email')}, ${sessionStorage.getItem('role')}`);
|
||||||
if (this.redirectUrl) {
|
if (this.redirectUrl) {
|
||||||
const url = this.redirectUrl;
|
const url = this.redirectUrl;
|
||||||
this.redirectUrl = null;
|
this.redirectUrl = null;
|
||||||
this.router.navigate([url]);
|
this.router.navigate([url]);
|
||||||
console.log('route is', url);
|
// console.log('route is', url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public getIsUserLoggedIn() {
|
public getIsUserLoggedIn() {
|
||||||
this.isLoggedIn = (getCookie('openAIREUser') && (getCookie('openAIREUser') !== '') && (sessionStorage.getItem('email') !== null ) );
|
// todo: probably not all of them are needed
|
||||||
return this.isLoggedIn;
|
return this.isLoggedIn_.value && this.cookie && this.cookie !== '' && sessionStorage.getItem('email') !== null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public getUserName() {
|
public getUserName() {
|
||||||
if (this.isLoggedIn) {
|
if (this.isLoggedIn_.value) {
|
||||||
return sessionStorage.getItem('name');
|
return sessionStorage.getItem('name');
|
||||||
} else {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
|
@ -145,7 +148,7 @@ export class AuthenticationService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public getUserRole() {
|
public getUserRole() {
|
||||||
if (this.isLoggedIn) {
|
if (this.isLoggedIn_.value) {
|
||||||
return sessionStorage.getItem('role');
|
return sessionStorage.getItem('role');
|
||||||
} else {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
|
|
|
@ -30,11 +30,10 @@ export class MonitorService {
|
||||||
|
|
||||||
getJobsOfUser(params: URLParameter[]): Observable<JobsOfUser> {
|
getJobsOfUser(params: URLParameter[]): Observable<JobsOfUser> {
|
||||||
let url = `${this.apiUrl}getJobsOfUser`;
|
let url = `${this.apiUrl}getJobsOfUser`;
|
||||||
|
if ( params.length > 0 ) {
|
||||||
|
url += `?`
|
||||||
for (const param of params) {
|
for (const param of params) {
|
||||||
if (param.key === 'offset') {
|
url += `${param.key}=${param.value[0]}&`; // An ending "&" in the url does no cause any issues.
|
||||||
url += `?${param.key}=${param.value[0]}`;
|
|
||||||
} else {
|
|
||||||
url += `&${param.key}=${param.value[0]}`;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(`knocking on: ${url}`);
|
console.log(`knocking on: ${url}`);
|
||||||
|
|
|
@ -10,7 +10,7 @@ import {
|
||||||
Country, MetricsInfo,
|
Country, MetricsInfo,
|
||||||
Repository,
|
Repository,
|
||||||
RepositoryInterface,
|
RepositoryInterface,
|
||||||
RepositorySnippet, RepositorySummaryInfo,
|
RepositorySnippet, RepositorySummaryInfo, TermsOfUse,
|
||||||
Timezone,
|
Timezone,
|
||||||
Typology, User
|
Typology, User
|
||||||
} from '../domain/typeScriptClasses';
|
} from '../domain/typeScriptClasses';
|
||||||
|
@ -33,24 +33,28 @@ export class RepositoryService {
|
||||||
|
|
||||||
constructor(private httpClient: HttpClient) { }
|
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;
|
let url;
|
||||||
|
comment = newInterface.comments; // temp fix for emailing comment
|
||||||
if (comment == null || comment === '') {
|
if (comment == null || comment === '') {
|
||||||
url = `${this.apiUrl}addInterface?datatype=${datatype}&repoId=${repoId}®isteredBy=${registeredBy}`;
|
url = `${this.apiUrl}addInterface?datatype=${datatype}&repoId=${repoId}®isteredBy=${registeredBy}&desiredCompatibilityLevel=${desiredCompatibilityLevel}`;
|
||||||
} else {
|
} else {
|
||||||
url = `${this.apiUrl}addInterface?datatype=${datatype}&repoId=${repoId}®isteredBy=${registeredBy}&comment=${comment}`;
|
url = `${this.apiUrl}addInterface?datatype=${datatype}&repoId=${repoId}®isteredBy=${registeredBy}&comment=${comment}&desiredCompatibilityLevel=${desiredCompatibilityLevel}`;
|
||||||
}
|
}
|
||||||
console.log(`knocking on: ${url}`);
|
console.log(`knocking on: ${url}`);
|
||||||
console.log(`sending ${JSON.stringify(newInterface)}`);
|
console.log(`sending ${JSON.stringify(newInterface)}`);
|
||||||
return this.httpClient.post<RepositoryInterface>(url, newInterface, headerOptions);
|
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;
|
let url;
|
||||||
|
comment = interfaceInfo.comments; // temp fix for emailing comment
|
||||||
if (comment == null || comment === '') {
|
if (comment == null || comment === '') {
|
||||||
url = `${this.apiUrl}updateRepositoryInterface?repoId=${repoId}®isteredBy=${registeredBy}`;
|
url = `${this.apiUrl}updateRepositoryInterface?repoId=${repoId}®isteredBy=${registeredBy}&desiredCompatibilityLevel=${desiredCompatibilityLevel}`;
|
||||||
} else {
|
} else {
|
||||||
url = `${this.apiUrl}updateRepositoryInterface?repoId=${repoId}®isteredBy=${registeredBy}&comment=${comment}`;
|
url = `${this.apiUrl}updateRepositoryInterface?repoId=${repoId}®isteredBy=${registeredBy}&comment=${comment}&desiredCompatibilityLevel=${desiredCompatibilityLevel}`;
|
||||||
}
|
}
|
||||||
console.log(`knocking on: ${url}`);
|
console.log(`knocking on: ${url}`);
|
||||||
console.log(`sending ${JSON.stringify(interfaceInfo)}`);
|
console.log(`sending ${JSON.stringify(interfaceInfo)}`);
|
||||||
|
@ -64,6 +68,10 @@ export class RepositoryService {
|
||||||
return this.httpClient.delete(url, {withCredentials: true, responseType: 'text'});
|
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> {
|
addRepository(datatype: string, newRepository: Repository): Observable<Repository> {
|
||||||
const url = `${this.apiUrl}addRepository?datatype=${datatype}`;
|
const url = `${this.apiUrl}addRepository?datatype=${datatype}`;
|
||||||
console.log(`knocking on: ${url}`);
|
console.log(`knocking on: ${url}`);
|
||||||
|
@ -85,6 +93,13 @@ export class RepositoryService {
|
||||||
return this.httpClient.post<Repository>(url, repoInfo, headerOptions);
|
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[]> {
|
getRepositoriesOfCountry(country: string, mode: string): Observable<RepositorySnippet[]> {
|
||||||
const url = `${this.apiUrl}getRepositoriesByCountry/${country}/${mode}`;
|
const url = `${this.apiUrl}getRepositoriesByCountry/${country}/${mode}`;
|
||||||
console.log(`knocking on: ${url}`);
|
console.log(`knocking on: ${url}`);
|
||||||
|
@ -97,7 +112,6 @@ export class RepositoryService {
|
||||||
return this.httpClient.get<RepositorySnippet[]>(url, headerOptions);
|
return this.httpClient.get<RepositorySnippet[]>(url, headerOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
getRepositoryById(id: string): Observable<Repository> {
|
getRepositoryById(id: string): Observable<Repository> {
|
||||||
const url = `${this.apiUrl}getRepositoryById/${id}`;
|
const url = `${this.apiUrl}getRepositoryById/${id}`;
|
||||||
console.log(`knocking on: ${url}`);
|
console.log(`knocking on: ${url}`);
|
||||||
|
@ -110,7 +124,6 @@ export class RepositoryService {
|
||||||
return this.httpClient.get<RepositoryInterface[]>(url, headerOptions);
|
return this.httpClient.get<RepositoryInterface[]>(url, headerOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
getUrlsOfUserRepos(): Observable<string[]> {
|
getUrlsOfUserRepos(): Observable<string[]> {
|
||||||
const url = `${this.apiUrl}getUrlsOfUserRepos/0/100/`;
|
const url = `${this.apiUrl}getUrlsOfUserRepos/0/100/`;
|
||||||
console.log(`knocking on: ${url}`);
|
console.log(`knocking on: ${url}`);
|
||||||
|
@ -156,7 +169,7 @@ export class RepositoryService {
|
||||||
return this.httpClient.get<Map<string, string>>(url, headerOptions);
|
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}`;
|
const url = `${this.apiUrl}getDatasourceClasses/${mode}`;
|
||||||
console.log(`knocking on: ${url}`);
|
console.log(`knocking on: ${url}`);
|
||||||
return this.httpClient.get<Map<string, string>>(url, headerOptions);
|
return this.httpClient.get<Map<string, string>>(url, headerOptions);
|
||||||
|
|
|
@ -6,6 +6,7 @@ import { Injectable } from '@angular/core';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { ReportResponseWrapper } from '../domain/usageStatsClasses';
|
import { ReportResponseWrapper } from '../domain/usageStatsClasses';
|
||||||
import { environment } from '../../environments/environment';
|
import { environment } from '../../environments/environment';
|
||||||
|
import {COUNTER_Dataset_Report, COUNTER_Item_Report} from '../domain/sushilite';
|
||||||
|
|
||||||
const headerOptions = {
|
const headerOptions = {
|
||||||
headers : new HttpHeaders().set('Content-Type', 'application/json')
|
headers : new HttpHeaders().set('Content-Type', 'application/json')
|
||||||
|
@ -15,17 +16,24 @@ const headerOptions = {
|
||||||
|
|
||||||
@Injectable ()
|
@Injectable ()
|
||||||
export class UsagestatsService {
|
export class UsagestatsService {
|
||||||
private apiUrl = environment.API_ENDPOINT + '/sushilite/';
|
private apiUrl = environment.API_ENDPOINT + '';
|
||||||
|
|
||||||
constructor(private httpClient: HttpClient) { }
|
constructor(private httpClient: HttpClient) { }
|
||||||
|
|
||||||
|
|
||||||
getReportResponse(page: String, pageSize: String, params: URLSearchParams): Observable<ReportResponseWrapper> {
|
getReportResponse(page: String, pageSize: String, params: URLSearchParams): Observable<ReportResponseWrapper> {
|
||||||
const url = `${this.apiUrl}getReportResults/${page}/${pageSize}?${params}`;
|
const url = `${this.apiUrl}/sushilite/getReportResults/${page}/${pageSize}?${params}`;
|
||||||
console.log(`knocking on: ${url}`);
|
// console.log(`knocking on: ${url}`);
|
||||||
|
|
||||||
return this.httpClient.get<ReportResponseWrapper>(url, headerOptions);
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,7 @@ export class ConfirmationDialogComponent {
|
||||||
@Input() public hideModalButton: string = 'Cancel';
|
@Input() public hideModalButton: string = 'Cancel';
|
||||||
|
|
||||||
@Output() emitObject: EventEmitter<any> = new EventEmitter();
|
@Output() emitObject: EventEmitter<any> = new EventEmitter();
|
||||||
|
@Output() clearAll: EventEmitter<any> = new EventEmitter();
|
||||||
|
|
||||||
private _ids: string[] = [];
|
private _ids: string[] = [];
|
||||||
|
|
||||||
|
@ -37,6 +38,7 @@ export class ConfirmationDialogComponent {
|
||||||
|
|
||||||
public hideModal(): void {
|
public hideModal(): void {
|
||||||
this.isModalShown = false;
|
this.isModalShown = false;
|
||||||
|
this.clearAll.emit();
|
||||||
// this.autoShownModal.hide();
|
// this.autoShownModal.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -122,14 +122,14 @@ export class MyGroup implements OnInit, AfterContentInit {
|
||||||
<div class="">
|
<div class="">
|
||||||
<label class="" *ngIf="description?.label !== null && description?.label !== ''"
|
<label class="" *ngIf="description?.label !== null && description?.label !== ''"
|
||||||
[ngClass]="{'required' : description.mandatory==true}" title="{{ description.desc }}">
|
[ngClass]="{'required' : description.mandatory==true}" title="{{ description.desc }}">
|
||||||
{{ description.label }}
|
{{ description.label + (description.mandatory ? ' (*)' : '') }}
|
||||||
</label>
|
</label>
|
||||||
<ng-content></ng-content>
|
<ng-content></ng-content>
|
||||||
<span class="md-input-bar"></span>
|
<span class="md-input-bar"></span>
|
||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
export class InlineFormWrapper implements OnChanges {
|
export class InlineFormWrapper implements OnChanges {
|
||||||
|
|
||||||
@Input() public description: Description = null;
|
@Input() public description: Description = null;
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<form-inline [description]="issnDesc" [valid]="group.get('issn').valid">
|
<form-inline [description]="issnDesc" [valid]="group.get('issn').valid">
|
||||||
<span *ngIf="group.get('issn').invalid && group.get('issn').touched && group.get('issn').dirty"
|
<span *ngIf="group.get('issn').invalid && group.get('issn').touched && group.get('issn').dirty"
|
||||||
class="help-block inline uk-text-danger"
|
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"
|
<input formControlName="issn" class="md-input" type="text"
|
||||||
(focus)="group.get('issn').markAsUntouched()" (blur)="group.get('issn').updateValueAndValidity()">
|
(focus)="group.get('issn').markAsUntouched()" (blur)="group.get('issn').updateValueAndValidity()">
|
||||||
</form-inline>
|
</form-inline>
|
||||||
|
@ -71,7 +71,7 @@
|
||||||
<form-inline [description]="eissnDesc" [valid]="group.get('eissn').valid">
|
<form-inline [description]="eissnDesc" [valid]="group.get('eissn').valid">
|
||||||
<span *ngIf="group.get('eissn').invalid && group.get('eissn').touched && group.get('eissn').dirty"
|
<span *ngIf="group.get('eissn').invalid && group.get('eissn').touched && group.get('eissn').dirty"
|
||||||
class="help-block inline uk-text-danger"
|
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"
|
<input formControlName="eissn" class="md-input" type="text"
|
||||||
(focus)="group.get('eissn').markAsUntouched()" (blur)="group.get('eissn').updateValueAndValidity()">
|
(focus)="group.get('eissn').markAsUntouched()" (blur)="group.get('eissn').updateValueAndValidity()">
|
||||||
</form-inline>
|
</form-inline>
|
||||||
|
@ -85,7 +85,7 @@
|
||||||
<form-inline [description]="lissnDesc" [valid]="group.get('lissn').valid">
|
<form-inline [description]="lissnDesc" [valid]="group.get('lissn').valid">
|
||||||
<span *ngIf="group.get('lissn').invalid && group.get('lissn').touched && group.get('lissn').dirty"
|
<span *ngIf="group.get('lissn').invalid && group.get('lissn').touched && group.get('lissn').dirty"
|
||||||
class="help-block inline uk-text-danger"
|
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"
|
<input formControlName="lissn" class="md-input" type="text"
|
||||||
(focus)="group.get('lissn').markAsUntouched()" (blur)="group.get('lissn').updateValueAndValidity()">
|
(focus)="group.get('lissn').markAsUntouched()" (blur)="group.get('lissn').updateValueAndValidity()">
|
||||||
</form-inline>
|
</form-inline>
|
||||||
|
@ -111,7 +111,7 @@
|
||||||
<form-inline [description]="countryDesc" [valid]="group.get('country')">
|
<form-inline [description]="countryDesc" [valid]="group.get('country')">
|
||||||
<select formControlName="country" class="md-input">
|
<select formControlName="country" class="md-input">
|
||||||
<option value="">-- none selected --</option>
|
<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>
|
</select>
|
||||||
</form-inline>
|
</form-inline>
|
||||||
</div>
|
</div>
|
||||||
|
@ -277,7 +277,7 @@
|
||||||
<form-inline [description]="datasourceTypeDesc" [valid]="group.get('datasourceType').valid">
|
<form-inline [description]="datasourceTypeDesc" [valid]="group.get('datasourceType').valid">
|
||||||
<select formControlName="datasourceType" class="md-input">
|
<select formControlName="datasourceType" class="md-input">
|
||||||
<option value="">-- none selected --</option>
|
<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>
|
</select>
|
||||||
</form-inline>
|
</form-inline>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -51,19 +51,17 @@ export class DatasourceCreateFormComponent implements OnInit {
|
||||||
formSubmitted = false;
|
formSubmitted = false;
|
||||||
group: FormGroup;
|
group: FormGroup;
|
||||||
|
|
||||||
// old issn regex
|
|
||||||
// issn : ['', [Validators.pattern('^\\d\\d\\d\\d[-]\\d\\d\\d\\d$')] ],
|
|
||||||
readonly groupDefinition = {
|
readonly groupDefinition = {
|
||||||
softwarePlatform : ['', Validators.required],
|
softwarePlatform : ['', Validators.required],
|
||||||
platformName : '',
|
platformName : '',
|
||||||
officialName : ['', Validators.required],
|
officialName : ['', Validators.required],
|
||||||
issn : ['', [Validators.pattern('^\\d{4}-\\d{3}[\\dxX]$')] ],
|
issn : ['', [Validators.pattern('^(\\d{4}-?\\d{3}[\\dxX])$')] ],
|
||||||
eissn : ['', Validators.pattern('^\\d{4}-\\d{3}[\\dxX]$') ],
|
eissn : ['', Validators.pattern('^(\\d{4}-?\\d{3}[\\dxX])$') ],
|
||||||
lissn : ['', Validators.pattern('^\\d{4}-\\d{3}[\\dxX]$') ],
|
lissn : ['', Validators.pattern('^(\\d{4}-?\\d{3}[\\dxX])$') ],
|
||||||
repoDescription : ['', Validators.required],
|
repoDescription : ['', Validators.required],
|
||||||
country : ['', Validators.required],
|
country : ['', Validators.required],
|
||||||
longtitude : ['', [Validators.required, Validators.min(-180), Validators.max(180)] ],
|
longtitude : ['', [Validators.min(-180), Validators.max(180)] ],
|
||||||
latitude : ['', [Validators.required, Validators.min(-90), Validators.max(90)] ],
|
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})?(\\/.*)?$')] ],
|
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],
|
institutionName : ['', Validators.required],
|
||||||
englishName: ['', Validators.required],
|
englishName: ['', Validators.required],
|
||||||
|
@ -110,7 +108,7 @@ export class DatasourceCreateFormComponent implements OnInit {
|
||||||
this.group = this.fb.group(this.groupDefinition);
|
this.group = this.fb.group(this.groupDefinition);
|
||||||
if (this.mode === 'journal') {
|
if (this.mode === 'journal') {
|
||||||
this.group.get('issn').clearValidators();
|
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.getTypologies();
|
||||||
this.getTimezones();
|
this.getTimezones();
|
||||||
|
@ -124,29 +122,29 @@ export class DatasourceCreateFormComponent implements OnInit {
|
||||||
|
|
||||||
setupForm() {
|
setupForm() {
|
||||||
if (this.selectedRepo) {
|
if (this.selectedRepo) {
|
||||||
console.log(`my datasource type is: ${this.selectedRepo.datasourceType}`);
|
console.log(`my datasource type is: ${this?.selectedRepo?.eoscDatasourceType}`);
|
||||||
|
|
||||||
this.group.setValue({
|
this.group.setValue({
|
||||||
softwarePlatform: this.selectedRepo.typology,
|
softwarePlatform: this.selectedRepo.platform,
|
||||||
platformName: '',
|
platformName: '',
|
||||||
officialName: this.selectedRepo.officialName,
|
officialName: this.selectedRepo.officialname,
|
||||||
issn: '',
|
issn: '',
|
||||||
eissn: '',
|
eissn: '',
|
||||||
lissn: '',
|
lissn: '',
|
||||||
repoDescription: this.selectedRepo.description,
|
repoDescription: this.selectedRepo.description,
|
||||||
country: this.selectedRepo.countryCode,
|
country: this.selectedRepo.organizations[0].country, // countryCode
|
||||||
longtitude: this.selectedRepo.longitude,
|
longtitude: this.selectedRepo.longitude,
|
||||||
latitude: this.selectedRepo.latitude,
|
latitude: this.selectedRepo.latitude,
|
||||||
websiteUrl: this.selectedRepo.websiteUrl,
|
websiteUrl: this.selectedRepo.websiteurl,
|
||||||
institutionName: this.selectedRepo.organization,
|
institutionName: this.selectedRepo.organizations[0].legalname,
|
||||||
englishName: this.selectedRepo.englishName,
|
englishName: this.selectedRepo.englishname,
|
||||||
logoUrl: this.selectedRepo.logoUrl,
|
logoUrl: this.selectedRepo.logourl,
|
||||||
timezone: this.selectedRepo.timezone,
|
timezone: this.selectedRepo.timezone,
|
||||||
datasourceType: this.selectedRepo.datasourceClass,
|
datasourceType: this.selectedRepo.eoscDatasourceType, // TODO: still needed? should it be typology? typology exists on that stage?
|
||||||
adminEmail: this.selectedRepo.contactEmail
|
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);
|
let ssnToShow = this.selectedRepo.issn.slice(0, 4) + '-' + this.selectedRepo.issn.toString().slice(4);
|
||||||
this.group.get('issn').setValue(ssnToShow);
|
this.group.get('issn').setValue(ssnToShow);
|
||||||
|
@ -185,15 +183,17 @@ export class DatasourceCreateFormComponent implements OnInit {
|
||||||
|
|
||||||
getDatasourceClasses() {
|
getDatasourceClasses() {
|
||||||
this.repoService.getDatasourceClasses(this.mode).subscribe(
|
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 => {
|
error => {
|
||||||
this.errorMessage = noServiceMessage;
|
this.errorMessage = noServiceMessage;
|
||||||
console.log(error);
|
console.log(error);
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
for (const key of Object.keys(this.datasourceClasses)) {
|
this.classCodes = Array.from(this.datasourceClasses.keys());
|
||||||
this.classCodes.push(key);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -227,25 +227,28 @@ export class DatasourceCreateFormComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
createNewRepository(): Repository {
|
createNewRepository(): Repository {
|
||||||
const newRepo: Repository = new Repository();
|
const newRepo = new Repository();
|
||||||
newRepo.officialName = this.group.get('officialName').value.toString();
|
newRepo.officialname = this.group.get('officialName').value.toString();
|
||||||
newRepo.englishName = this.group.get('englishName').value.toString();
|
newRepo.englishname = this.group.get('englishName').value.toString();
|
||||||
newRepo.websiteUrl = this.group.get('websiteUrl').value;
|
newRepo.websiteurl = this.group.get('websiteUrl').value;
|
||||||
newRepo.logoUrl = this.group.get('logoUrl').value;
|
newRepo.logourl = this.group.get('logoUrl').value;
|
||||||
newRepo.contactEmail = this.group.get('adminEmail').value;
|
newRepo.contactemail = this.group.get('adminEmail').value;
|
||||||
newRepo.countryName = this.countries.filter(x => x.code === this.group.get('country').value)[0].name;
|
newRepo.organizations.push({
|
||||||
newRepo.countryCode = this.group.get('country').value;
|
legalshortname: null,
|
||||||
newRepo.organization = this.group.get('institutionName').value.toString();
|
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.latitude = this.group.get('latitude').value;
|
||||||
newRepo.longitude = this.group.get('longtitude').value;
|
newRepo.longitude = this.group.get('longtitude').value;
|
||||||
newRepo.timezone = this.group.get('timezone').value;
|
newRepo.timezone = this.group.get('timezone').value;
|
||||||
newRepo.datasourceClass = this.group.get('datasourceType').value;
|
if (this.group.get('softwarePlatform').value !== '') {
|
||||||
if (this.group.get('softwarePlatform').value ) {
|
newRepo.platform = this.group.get('softwarePlatform').value;
|
||||||
newRepo.typology = this.group.get('softwarePlatform').value;
|
|
||||||
} else if (this.group.get('platformName').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.description = this.group.get('repoDescription').value.toString();
|
||||||
newRepo.issn = '';
|
newRepo.issn = '';
|
||||||
newRepo.eissn = '';
|
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.eoscDatasourceType = this.mode; // keep this
|
||||||
newRepo.datasourceType = this.mode;
|
newRepo.managed = true;
|
||||||
newRepo.dateOfCreation = new Date(Date.now()); // NOT NEEDED ??
|
|
||||||
newRepo.registered = true;
|
|
||||||
newRepo.registrationDate = new Date(Date.now()); // NOT NEEDED ??
|
|
||||||
|
|
||||||
|
const now = new Date(Date.now());
|
||||||
|
newRepo.consentTermsOfUseDate = now;
|
||||||
|
newRepo.lastConsentTermsOfUseDate = now;
|
||||||
|
newRepo.registrationdate = now;
|
||||||
return newRepo;
|
return newRepo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,136 +14,87 @@
|
||||||
<div class="md-card-toolbar">
|
<div class="md-card-toolbar">
|
||||||
<div class="md-card-toolbar-actions">
|
<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 *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>
|
</div>
|
||||||
<!--<h3 class="md-card-toolbar-heading-text"> Card Heading </h3>-->
|
|
||||||
</div>
|
</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 class="md-card-content">
|
||||||
<div *ngIf="successMessage" class="uk-alert uk-alert-success" style="clear: both">{{ successMessage }}</div>
|
<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,
|
<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' : '' }}">
|
<div class="md-input-wrapper uk-margin-top {{ (repoInterfaceForm.get('baseurl') != null) ? 'md-input-filled' : '' }}">
|
||||||
<label class="" for="baseUrl" title="{{ baseUrlDesc.desc }}">Base OAI-PMH URL (*)</label>
|
<div>
|
||||||
<span *ngIf="showIdentifiedBaseUrl" class="help-block inline" style="margin-top: 8px; margin-bottom: 0px; padding-left: 10px; display: block;">
|
<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
|
Identified
|
||||||
</span>
|
</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>
|
<span class="md-input-bar"></span>
|
||||||
</div>
|
</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">
|
<div class="radioButtonForm uk-margin-top">
|
||||||
<label class="control-label">Validation Set</label>
|
<label for="selectValidationSet{{interfaceID}}" class="control-label uk-text-bold">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>
|
|
||||||
<div class="md-input-wrapper">
|
<div class="md-input-wrapper">
|
||||||
<!--<label class="">Select repository's country</label>-->
|
|
||||||
<select class="md-input" id="selectValidationSet{{interfaceID}}" formControlName="selectValidationSet" (change)="checkIfValid()">
|
<select class="md-input" id="selectValidationSet{{interfaceID}}" formControlName="selectValidationSet" (change)="checkIfValid()">
|
||||||
<option value="" selected>-- none selected --</option>
|
<option value="" selected>-- none selected --</option>
|
||||||
<option *ngFor="let set of valsetList" value="{{set}}">{{set}}</option>
|
<option *ngFor="let set of valsetList" value="{{set}}">{{set}}</option>
|
||||||
</select>
|
</select>
|
||||||
<span class="md-input-bar"></span>
|
<span class="md-input-bar"></span>
|
||||||
</div>
|
</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>
|
||||||
|
|
||||||
|
|
||||||
<!--<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>-- none selected --</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">
|
<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>
|
<div>
|
||||||
<select class="md-input" id="compLvl" formControlName="compatibilityLevel" (change)="checkIfValid()">
|
<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 value="">-- none selected --</option>
|
||||||
<option *ngFor="let key of classCodes" value="{{key}}">{{compClasses[key]}}</option>
|
<option *ngFor="let key of classCodes" value="{{key}}">{{compClasses[key]}}</option>
|
||||||
</select>
|
</select>
|
||||||
<span class="md-input-bar"></span>
|
<span class="md-input-bar"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--<div class="form-group">-->
|
<div class="uk-margin-medium-top">
|
||||||
<!--<label class="control-label" for="compLvl" title="{{ compatibilityLevelDesc.desc }}">Desired Compatibility Level (*)</label>-->
|
<label class="uk-text-bold">Current compatibility level</label>
|
||||||
<!--<select class="form-control" id="compLvl" formControlName="compatibilityLevel" (change)="checkIfValid()">-->
|
<div class="uk-comment-meta uk-text-italic uk-margin-small-top uk-margin-small-bottom">
|
||||||
<!--<option value="">-- none selected --</option>-->
|
Compatible level returned by the Validator tool after your request to register the interface.
|
||||||
<!--<option *ngFor="let key of classCodes" value="{{key}}">{{compClasses[key]}}</option>-->
|
</div>
|
||||||
<!--</select>-->
|
<div class="uk-margin-small-top">{{(repoInterfaceForm.get('compatibilityLevel').value && repoInterfaceForm.get('compatibilityLevel').value !== 'UNKNOWN')
|
||||||
<!--</div>-->
|
? this.compClasses[repoInterfaceForm.get('compatibilityLevel').value] : 'not available' }}</div>
|
||||||
|
|
||||||
<div class="">
|
|
||||||
<label class="">Current Compatibility Level</label>
|
|
||||||
<div *ngIf="existingCompLevel">{{ existingCompLevel ? existingCompLevel : 'not available' }}</div>
|
|
||||||
</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">
|
<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>
|
<textarea id="comment" class="uk-textarea" rows="3" formControlName="comment" (blur)="checkIfValid()"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- <pre>{{repoInterfaceForm.value | json}}</pre>-->
|
||||||
|
<!-- <pre>{{interfaceToExport | json}}</pre>-->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||||
import { baseUrlDesc, compatibilityLevelDesc, customValSetDesc, Description, existingValSetDesc, commentDesc } from '../../../domain/oa-description';
|
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 { ValidatorService } from '../../../services/validator.service';
|
||||||
import { RepositoryService } from '../../../services/repository.service';
|
import { RepositoryService } from '../../../services/repository.service';
|
||||||
import { formErrorWasntSaved, formInfoLoading, formSubmitting, formSuccessAddedInterface, formSuccessUpdatedInterface, invalidCustomBaseUrl,
|
import { formErrorWasntSaved, formInfoLoading, formSubmitting, formSuccessAddedInterface, formSuccessUpdatedInterface, invalidCustomBaseUrl,
|
||||||
|
@ -26,6 +26,7 @@ export class DatasourceNewInterfaceFormComponent implements OnInit {
|
||||||
invalidCustomBaseUrl = invalidCustomBaseUrl;
|
invalidCustomBaseUrl = invalidCustomBaseUrl;
|
||||||
|
|
||||||
@Input() data: any[] = []; // expects an array containing at least 3 of the 4 below fields in this order
|
@Input() data: any[] = []; // expects an array containing at least 3 of the 4 below fields in this order
|
||||||
|
@Input() mode: string = null;
|
||||||
inRegister: boolean;
|
inRegister: boolean;
|
||||||
interfaceID: number; // holds the interface index in the interfaces array as displayed
|
interfaceID: number; // holds the interface index in the interfaces array as displayed
|
||||||
currentRepo: RepoFields; // a fraction of the Repository class
|
currentRepo: RepoFields; // a fraction of the Repository class
|
||||||
|
@ -36,10 +37,11 @@ export class DatasourceNewInterfaceFormComponent implements OnInit {
|
||||||
|
|
||||||
repoInterfaceForm: FormGroup;
|
repoInterfaceForm: FormGroup;
|
||||||
readonly repoInterfaceFormDef = {
|
readonly repoInterfaceFormDef = {
|
||||||
baseUrl: ['', Validators.required],
|
baseurl: ['', Validators.required],
|
||||||
selectValidationSet: [''],
|
selectValidationSet: [''],
|
||||||
customValidationSet: [''],
|
compatibilityLevel: null,
|
||||||
compatibilityLevel: [''],
|
desiredCompatibilityLevel: null,
|
||||||
|
compatibilityLevelOverride: null,
|
||||||
comment: ['']
|
comment: ['']
|
||||||
};
|
};
|
||||||
baseUrlDesc: Description = baseUrlDesc;
|
baseUrlDesc: Description = baseUrlDesc;
|
||||||
|
@ -49,12 +51,12 @@ export class DatasourceNewInterfaceFormComponent implements OnInit {
|
||||||
commentDesc: Description = commentDesc;
|
commentDesc: Description = commentDesc;
|
||||||
|
|
||||||
identifiedBaseUrl: boolean;
|
identifiedBaseUrl: boolean;
|
||||||
showIdentifiedBaseUrl: boolean;
|
canEdit = true;
|
||||||
|
showIdentifiedBaseUrl: boolean = null;
|
||||||
valsetList: string[] = [];
|
valsetList: string[] = [];
|
||||||
existingCompLevel: string;
|
existingCompLevel: string;
|
||||||
classCodes: string[] = [];
|
classCodes: string[] = [];
|
||||||
compClasses: Map<string, string> = new Map<string, string>();
|
compClasses: Map<string, string> = new Map<string, string>();
|
||||||
existingValSet: boolean;
|
|
||||||
interfaceInfo: InterfaceInformation;
|
interfaceInfo: InterfaceInformation;
|
||||||
|
|
||||||
constructor(private fb: FormBuilder,
|
constructor(private fb: FormBuilder,
|
||||||
|
@ -67,11 +69,22 @@ export class DatasourceNewInterfaceFormComponent implements OnInit {
|
||||||
this.interfaceID = this.data[1];
|
this.interfaceID = this.data[1];
|
||||||
this.currentRepo = this.data[2];
|
this.currentRepo = this.data[2];
|
||||||
this.repoInterfaceForm = this.fb.group(this.repoInterfaceFormDef);
|
this.repoInterfaceForm = this.fb.group(this.repoInterfaceFormDef);
|
||||||
this.chooseValSet(true);
|
// this.chooseValSet(true);
|
||||||
if (this.data[3]) {
|
if (this.data[3]) {
|
||||||
this.currentInterface = this.data[3];
|
this.currentInterface = this.data[3];
|
||||||
this.repoInterfaceForm.get('baseUrl').setValue(this.currentInterface.baseUrl);
|
if (this.currentInterface.baseurl !== null && this.currentInterface.baseurl !== '') {
|
||||||
this.repoInterfaceForm.get('compatibilityLevel').setValue(this.currentInterface.desiredCompatibilityLevel);
|
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.getInterfaceInfo();
|
||||||
this.getCompatibilityClasses();
|
this.getCompatibilityClasses();
|
||||||
|
@ -83,10 +96,10 @@ export class DatasourceNewInterfaceFormComponent implements OnInit {
|
||||||
this.successMessage = '';
|
this.successMessage = '';
|
||||||
this.errorMessage = '';
|
this.errorMessage = '';
|
||||||
|
|
||||||
const baseUrl = this.repoInterfaceForm.get('baseUrl').value;
|
const baseurl = this.repoInterfaceForm.get('baseurl').value;
|
||||||
if (baseUrl) {
|
if (baseurl) {
|
||||||
this.loadingMessage = formInfoLoading;
|
this.loadingMessage = formInfoLoading;
|
||||||
this.valService.getInterfaceInformation(baseUrl).subscribe(
|
this.valService.getInterfaceInformation(baseurl).subscribe(
|
||||||
info => {
|
info => {
|
||||||
this.interfaceInfo = info;
|
this.interfaceInfo = info;
|
||||||
if (this.interfaceInfo.identified) {
|
if (this.interfaceInfo.identified) {
|
||||||
|
@ -94,12 +107,12 @@ export class DatasourceNewInterfaceFormComponent implements OnInit {
|
||||||
this.showIdentifiedBaseUrl = true;
|
this.showIdentifiedBaseUrl = true;
|
||||||
} else {
|
} else {
|
||||||
this.errorMessage = invalidCustomBaseUrl;
|
this.errorMessage = invalidCustomBaseUrl;
|
||||||
this.identifiedBaseUrl = true; // pass interface without baseUrl identification
|
this.identifiedBaseUrl = true; // pass interface without baseurl identification
|
||||||
this.showIdentifiedBaseUrl = false;
|
this.showIdentifiedBaseUrl = false;
|
||||||
}
|
}
|
||||||
if (this.interfaceInfo.sets) {
|
if (this.interfaceInfo.sets) {
|
||||||
this.valsetList = this.interfaceInfo.sets;
|
this.valsetList = this.interfaceInfo.sets;
|
||||||
console.log(this.valsetList);
|
// console.log(this.valsetList);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
|
@ -109,23 +122,24 @@ export class DatasourceNewInterfaceFormComponent implements OnInit {
|
||||||
this.errorMessage = noServiceMessage;
|
this.errorMessage = noServiceMessage;
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
if ( this.currentInterface && this.currentInterface.accessParams && this.currentInterface.accessParams['set'] ) {
|
if (this.currentInterface?.apiParams?.find(entry => entry.param === 'set')) {
|
||||||
if ( this.valsetList.some( x => x === this.currentInterface.accessParams['set']) ) {
|
this.repoInterfaceForm.get('selectValidationSet').setValue(this.currentInterface.apiParams
|
||||||
this.repoInterfaceForm.get('selectValidationSet').setValue(this.currentInterface.accessParams['set']);
|
.find(entry => entry.param === 'set').value);
|
||||||
} else {
|
|
||||||
this.repoInterfaceForm.get('customValidationSet').setValue(this.currentInterface.accessParams['set']);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.loadingMessage = '';
|
|
||||||
this.repoInterfaceForm.updateValueAndValidity();
|
this.repoInterfaceForm.updateValueAndValidity();
|
||||||
this.checkIfValid();
|
this.checkIfValid();
|
||||||
}
|
}
|
||||||
|
this.loadingMessage = '';
|
||||||
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getCompatibilityClasses() {
|
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 => {
|
classes => {
|
||||||
this.compClasses = classes;
|
this.compClasses = classes;
|
||||||
this.classCodes = Object.keys(this.compClasses);
|
this.classCodes = Object.keys(this.compClasses);
|
||||||
|
@ -143,37 +157,23 @@ export class DatasourceNewInterfaceFormComponent implements OnInit {
|
||||||
|
|
||||||
getExistingCompatibilityLevel() {
|
getExistingCompatibilityLevel() {
|
||||||
if (this.currentInterface) {
|
if (this.currentInterface) {
|
||||||
if (this.currentInterface.desiredCompatibilityLevel &&
|
if (this.currentInterface.compatibility
|
||||||
this.classCodes.some( x => x === this.currentInterface.desiredCompatibilityLevel ) ) {
|
&& this.classCodes.some( x => x === this.currentInterface.compatibilityOverride)) {
|
||||||
this.existingCompLevel = this.compClasses[this.currentInterface.desiredCompatibilityLevel];
|
this.existingCompLevel = this.compClasses[this.currentInterface.compatibility];
|
||||||
} else {
|
} else {
|
||||||
this.repoInterfaceForm.get('compatibilityLevel').setValue('');
|
// this.repoInterfaceForm.get('compatibilityLevel').setValue('');
|
||||||
this.existingCompLevel = this.currentInterface.desiredCompatibilityLevel;
|
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() {
|
checkIfCompatibilityLevelWasChosen() {
|
||||||
return ( (this.repoInterfaceForm.get('compatibilityLevel').value !== '') ||
|
return ( (this.repoInterfaceForm.get('compatibilityLevel').value !== '') ||
|
||||||
(this.existingCompLevel && (this.existingCompLevel !== '')) );
|
(this.existingCompLevel && (this.existingCompLevel !== '')) );
|
||||||
}
|
}
|
||||||
|
|
||||||
formIsValid() {
|
formIsValid() {
|
||||||
return (this.repoInterfaceForm.valid &&
|
return (this.repoInterfaceForm.valid && this.identifiedBaseUrl && this.checkIfCompatibilityLevelWasChosen());
|
||||||
this.identifiedBaseUrl &&
|
|
||||||
this.checkIfCompatibilityLevelWasChosen());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
checkIfValid() {
|
checkIfValid() {
|
||||||
|
@ -185,7 +185,7 @@ export class DatasourceNewInterfaceFormComponent implements OnInit {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.successMessage = '';
|
this.successMessage = '';
|
||||||
this.interfaceToExport = null;
|
// this.interfaceToExport = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -194,88 +194,81 @@ export class DatasourceNewInterfaceFormComponent implements OnInit {
|
||||||
this.errorMessage = '';
|
this.errorMessage = '';
|
||||||
this.successMessage = '';
|
this.successMessage = '';
|
||||||
if (this.formIsValid()) {
|
if (this.formIsValid()) {
|
||||||
const baseUrl = this.repoInterfaceForm.get('baseUrl').value;
|
const baseurl = this.repoInterfaceForm.get('baseurl').value;
|
||||||
let valset = '';
|
const valset = this.repoInterfaceForm.get('selectValidationSet').value;
|
||||||
if (this.existingValSet) {
|
const desiredCompLvl = this.repoInterfaceForm.get('desiredCompatibilityLevel').value;
|
||||||
valset = this.repoInterfaceForm.get('selectValidationSet').value;
|
const compLvl = this.existingCompLevel;
|
||||||
} 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;
|
|
||||||
}
|
|
||||||
let comment = '';
|
let comment = '';
|
||||||
if (this.repoInterfaceForm.get('comment').value) {
|
if (this.repoInterfaceForm.get('comment').value) {
|
||||||
comment = this.repoInterfaceForm.get('comment').value;
|
comment = this.repoInterfaceForm.get('comment').value;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.currentInterface) {
|
if (this.currentInterface) {
|
||||||
this.updateCurrent(baseUrl, valset, compLvl, comment);
|
this.updateCurrent(baseurl, valset, desiredCompLvl, compLvl, comment);
|
||||||
} else {
|
} else {
|
||||||
this.addCurrent(baseUrl, valset, compLvl, comment);
|
this.addCurrent(baseurl, valset, desiredCompLvl, compLvl, comment);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.interfaceToExport = null;
|
// this.interfaceToExport = null;
|
||||||
this.errorMessage = 'Please make sure all required fields are filled with acceptable values.';
|
this.errorMessage = 'Please make sure all required fields are filled with acceptable values.';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getCurrentValues() {
|
getCurrentValues() {
|
||||||
|
console.log('getcurrentvalues');
|
||||||
let intrf = this.currentInterface;
|
let intrf = this.currentInterface;
|
||||||
if (intrf == null) {
|
if (intrf == null) {
|
||||||
intrf = new RepositoryInterface();
|
intrf = new RepositoryInterface();
|
||||||
}
|
}
|
||||||
intrf.baseUrl = this.repoInterfaceForm.get('baseUrl').value;
|
intrf.baseurl = this.repoInterfaceForm.get('baseurl').value;
|
||||||
if (this.existingValSet) {
|
this.updateValidationSet(intrf, this.repoInterfaceForm.get('selectValidationSet').value);
|
||||||
intrf.accessSet = this.repoInterfaceForm.get('selectValidationSet').value;
|
console.log(intrf);
|
||||||
intrf.accessParams = {'set': this.repoInterfaceForm.get('selectValidationSet').value};
|
|
||||||
} else {
|
|
||||||
intrf.accessSet = this.repoInterfaceForm.get('customValidationSet').value;
|
|
||||||
intrf.accessParams = {'set': this.repoInterfaceForm.get('customValidationSet').value};
|
|
||||||
}
|
|
||||||
if (this.repoInterfaceForm.get('compatibilityLevel').value) {
|
if (this.repoInterfaceForm.get('compatibilityLevel').value) {
|
||||||
intrf.desiredCompatibilityLevel = this.repoInterfaceForm.get('compatibilityLevel').value;
|
intrf.compatibilityOverride = this.repoInterfaceForm.get('compatibilityLevel').value;
|
||||||
intrf.compliance = this.repoInterfaceForm.get('compatibilityLevel').value;
|
intrf.compatibility = this.repoInterfaceForm.get('compatibilityLevel').value;
|
||||||
} else {
|
} else {
|
||||||
intrf.desiredCompatibilityLevel = this.existingCompLevel;
|
intrf.compatibilityOverride = this.existingCompLevel;
|
||||||
intrf.compliance = this.existingCompLevel;
|
intrf.compatibility = this.existingCompLevel;
|
||||||
}
|
}
|
||||||
intrf.typology = this.currentRepo.datasourceClass;
|
intrf.typology = this.currentRepo.datasourceClass;
|
||||||
|
|
||||||
return intrf;
|
return intrf;
|
||||||
}
|
}
|
||||||
|
|
||||||
addCurrent (baseUrl: string, valset: string, compLvl: string, comment: string) {
|
updateValidationSet(intrf: RepositoryInterface, value: string) {
|
||||||
const currentInterface = new RepositoryInterface();
|
let validationSet = intrf.apiParams.find(element => element.param === 'set');
|
||||||
currentInterface.baseUrl = baseUrl;
|
if (!validationSet) {
|
||||||
currentInterface.accessSet = valset;
|
validationSet = new ApiParamDetails('set', value);
|
||||||
currentInterface.accessParams = {'set': valset};
|
intrf.apiParams.push(validationSet);
|
||||||
currentInterface.desiredCompatibilityLevel = compLvl;
|
} else {
|
||||||
currentInterface.compliance = compLvl;
|
validationSet.value = this.repoInterfaceForm.get('selectValidationSet').value;
|
||||||
currentInterface.typology = this.currentRepo.datasourceClass;
|
}
|
||||||
currentInterface.comments = comment;
|
}
|
||||||
|
|
||||||
|
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) {
|
if (!this.inRegister) {
|
||||||
this.addInterface(currentInterface);
|
this.addInterface();
|
||||||
} else {
|
} else {
|
||||||
this.successMessage = 'The harvesting settings are valid!';
|
this.successMessage = 'The harvesting settings are valid!';
|
||||||
console.log('SAVED !');
|
console.log('SAVED !');
|
||||||
this.interfaceToExport = currentInterface;
|
this.interfaceToExport = this.currentInterface;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
addInterface(newInterface: RepositoryInterface) {
|
addInterface() {
|
||||||
this.loadingMessage = formSubmitting;
|
this.loadingMessage = formSubmitting;
|
||||||
this.repoService.addInterface(this.currentRepo.datasourceType,
|
this.repoService.addInterface(this.currentRepo.datasourceType, this.currentRepo.id,
|
||||||
this.currentRepo.id,
|
this.currentRepo.registeredBy, this.currentRepo.comments, this.currentInterface,
|
||||||
this.currentRepo.registeredBy,
|
this.repoInterfaceForm.get('desiredCompatibilityLevel').value).subscribe(
|
||||||
this.currentRepo.comments,
|
|
||||||
newInterface).subscribe(
|
|
||||||
addedInterface => {
|
addedInterface => {
|
||||||
console.log(`addInterface responded ${JSON.stringify(addedInterface)}`);
|
console.log(`addInterface responded ${JSON.stringify(addedInterface)}`);
|
||||||
this.currentInterface = addedInterface;
|
this.currentInterface = addedInterface;
|
||||||
|
@ -299,13 +292,13 @@ export class DatasourceNewInterfaceFormComponent implements OnInit {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateCurrent (baseurl: string, valset: string, desiredCompLvl: string, compLvl: string, comment: string) {
|
||||||
updateCurrent (baseUrl: string, valset: string, compLvl: string, comment: string) {
|
console.log('update current');
|
||||||
this.currentInterface.baseUrl = baseUrl;
|
this.updateValidationSet(this.currentInterface, valset);
|
||||||
this.currentInterface.accessSet = valset;
|
this.currentInterface.baseurl = baseurl;
|
||||||
this.currentInterface.accessParams['set'] = valset;
|
this.currentInterface.desiredCompatibilityLevel = desiredCompLvl;
|
||||||
this.currentInterface.desiredCompatibilityLevel = compLvl;
|
console.log(this.currentInterface.desiredCompatibilityLevel);
|
||||||
this.currentInterface.compliance = compLvl;
|
this.currentInterface.compatibility = compLvl;
|
||||||
this.currentInterface.typology = this.currentRepo.datasourceClass;
|
this.currentInterface.typology = this.currentRepo.datasourceClass;
|
||||||
this.currentInterface.comments = comment;
|
this.currentInterface.comments = comment;
|
||||||
|
|
||||||
|
@ -320,10 +313,8 @@ export class DatasourceNewInterfaceFormComponent implements OnInit {
|
||||||
|
|
||||||
updateInterface() {
|
updateInterface() {
|
||||||
this.loadingMessage = formSubmitting;
|
this.loadingMessage = formSubmitting;
|
||||||
this.repoService.updateInterface(this.currentRepo.id,
|
this.repoService.updateInterface(this.currentRepo.id, this.currentRepo.registeredBy, this.currentRepo.comments,
|
||||||
this.currentRepo.registeredBy,
|
this.currentInterface, this.repoInterfaceForm.get('desiredCompatibilityLevel').value).subscribe(
|
||||||
this.currentRepo.comments,
|
|
||||||
this.currentInterface).subscribe(
|
|
||||||
response => {
|
response => {
|
||||||
console.log(`updateRepository responded ${JSON.stringify(response)}`);
|
console.log(`updateRepository responded ${JSON.stringify(response)}`);
|
||||||
if (response) {
|
if (response) {
|
||||||
|
|
|
@ -12,15 +12,20 @@
|
||||||
Basic information
|
Basic information
|
||||||
</h4>
|
</h4>
|
||||||
</div>
|
</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>
|
The following fields are completed by OpenDOAR.<br>
|
||||||
If you want to edit them, you can do it by using this
|
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>
|
||||||
<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>
|
The following fields are completed by Re3data.<br>
|
||||||
If you want to edit them, you can do it by using this
|
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>
|
||||||
|
|
||||||
<div data-dynamic-fields="d_field_wizard" class="uk-grid" data-uk-grid-margin="" dynamic-fields-counter="0">
|
<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>
|
</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 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="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">
|
<form-inline [description]="issnDesc" [valid]="updateGroup.get('issn').valid">
|
||||||
<span *ngIf="updateGroup.get('issn').invalid && updateGroup.get('issn').touched && updateGroup.get('issn').dirty"
|
<span *ngIf="updateGroup.get('issn').invalid && updateGroup.get('issn').touched && updateGroup.get('issn').dirty"
|
||||||
class="help-block inline uk-text-danger"
|
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"
|
<input formControlName="issn" class="md-input" type="text"
|
||||||
(focus)="updateGroup.get('issn').markAsUntouched()" (blur)="updateGroup.get('issn').updateValueAndValidity()">
|
(focus)="updateGroup.get('issn').markAsUntouched()" (blur)="updateGroup.get('issn').updateValueAndValidity()">
|
||||||
</form-inline>
|
</form-inline>
|
||||||
|
@ -80,7 +85,7 @@
|
||||||
<form-inline [description]="eissnDesc" [valid]="updateGroup.get('eissn').valid">
|
<form-inline [description]="eissnDesc" [valid]="updateGroup.get('eissn').valid">
|
||||||
<span *ngIf="updateGroup.get('eissn').invalid && updateGroup.get('eissn').touched && updateGroup.get('eissn').dirty"
|
<span *ngIf="updateGroup.get('eissn').invalid && updateGroup.get('eissn').touched && updateGroup.get('eissn').dirty"
|
||||||
class="help-block inline uk-text-danger"
|
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"
|
<input formControlName="eissn" class="md-input" type="text"
|
||||||
(focus)="updateGroup.get('eissn').markAsUntouched()" (blur)="updateGroup.get('eissn').updateValueAndValidity()">
|
(focus)="updateGroup.get('eissn').markAsUntouched()" (blur)="updateGroup.get('eissn').updateValueAndValidity()">
|
||||||
</form-inline>
|
</form-inline>
|
||||||
|
@ -94,7 +99,7 @@
|
||||||
<form-inline [description]="lissnDesc" [valid]="updateGroup.get('lissn').valid">
|
<form-inline [description]="lissnDesc" [valid]="updateGroup.get('lissn').valid">
|
||||||
<span *ngIf="updateGroup.get('lissn').invalid && updateGroup.get('lissn').touched && updateGroup.get('lissn').dirty"
|
<span *ngIf="updateGroup.get('lissn').invalid && updateGroup.get('lissn').touched && updateGroup.get('lissn').dirty"
|
||||||
class="help-block inline uk-text-danger"
|
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"
|
<input formControlName="lissn" class="md-input" type="text"
|
||||||
(focus)="updateGroup.get('lissn').markAsUntouched()" (blur)="updateGroup.get('lissn').updateValueAndValidity()">
|
(focus)="updateGroup.get('lissn').markAsUntouched()" (blur)="updateGroup.get('lissn').updateValueAndValidity()">
|
||||||
</form-inline>
|
</form-inline>
|
||||||
|
@ -120,7 +125,7 @@
|
||||||
<form-inline [description]="countryDesc" [valid]="updateGroup.get('country')">
|
<form-inline [description]="countryDesc" [valid]="updateGroup.get('country')">
|
||||||
<select formControlName="country" class="md-input">
|
<select formControlName="country" class="md-input">
|
||||||
<option value="">-- none selected --</option>
|
<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>
|
</select>
|
||||||
</form-inline>
|
</form-inline>
|
||||||
</div>
|
</div>
|
||||||
|
@ -217,7 +222,7 @@
|
||||||
<form-inline [description]="datasourceTypeDesc" [valid]="updateGroup.get('datasourceType').valid">
|
<form-inline [description]="datasourceTypeDesc" [valid]="updateGroup.get('datasourceType').valid">
|
||||||
<select formControlName="datasourceType" class="md-input">
|
<select formControlName="datasourceType" class="md-input">
|
||||||
<option value="">-- none selected --</option>
|
<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>
|
</select>
|
||||||
</form-inline>
|
</form-inline>
|
||||||
</div>
|
</div>
|
||||||
|
@ -244,4 +249,3 @@
|
||||||
<button class="uk-button uk-button-primary updateRepoInfoButton" type="button" (click)="updateRepo()">Update Information</button>
|
<button class="uk-button uk-button-primary updateRepoInfoButton" type="button" (click)="updateRepo()">Update Information</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ import { Description, softwarePlatformDesc, platformNameDesc, officialNameDesc,
|
||||||
longtitudeDesc, latitudeDesc, websiteUrlDesc, institutionNameDesc, englishNameDesc, logoUrlDesc, timezoneDesc,
|
longtitudeDesc, latitudeDesc, websiteUrlDesc, institutionNameDesc, englishNameDesc, logoUrlDesc, timezoneDesc,
|
||||||
datasourceTypeDesc, adminEmailDesc, lissnDesc, eissnDesc, issnDesc } from '../../../domain/oa-description';
|
datasourceTypeDesc, adminEmailDesc, lissnDesc, eissnDesc, issnDesc } from '../../../domain/oa-description';
|
||||||
import { AuthenticationService } from '../../../services/authentication.service';
|
import { AuthenticationService } from '../../../services/authentication.service';
|
||||||
import {SharedService} from "../../../services/shared.service";
|
import {SharedService} from '../../../services/shared.service';
|
||||||
|
|
||||||
@Component ({
|
@Component ({
|
||||||
selector: 'datasource-update-form',
|
selector: 'datasource-update-form',
|
||||||
|
@ -32,6 +32,8 @@ export class DatasourceUpdateFormComponent implements OnInit {
|
||||||
|
|
||||||
@Input() selectedRepo: Repository;
|
@Input() selectedRepo: Repository;
|
||||||
|
|
||||||
|
@Input() mode: string;
|
||||||
|
|
||||||
@Input() showButton: boolean;
|
@Input() showButton: boolean;
|
||||||
|
|
||||||
repoId: string;
|
repoId: string;
|
||||||
|
@ -41,9 +43,9 @@ export class DatasourceUpdateFormComponent implements OnInit {
|
||||||
softwarePlatform : '',
|
softwarePlatform : '',
|
||||||
platformName : '',
|
platformName : '',
|
||||||
officialName : ['', Validators.required],
|
officialName : ['', Validators.required],
|
||||||
issn : ['', [Validators.pattern('^\\d{4}-\\d{3}[\\dxX]$')] ],
|
issn : ['', [Validators.pattern('^(\\d{4}-?\\d{3}[\\dxX])$')] ],
|
||||||
eissn : ['', Validators.pattern('^\\d{4}-\\d{3}[\\dxX]$') ],
|
eissn : ['', Validators.pattern('^(\\d{4}-?\\d{3}[\\dxX])$') ],
|
||||||
lissn : ['', Validators.pattern('^\\d{4}-\\d{3}[\\dxX]$') ],
|
lissn : ['', Validators.pattern('^(\\d{4}-?\\d{3}[\\dxX])$') ],
|
||||||
repoDescription : ['', Validators.required],
|
repoDescription : ['', Validators.required],
|
||||||
country : '',
|
country : '',
|
||||||
longtitude : '',
|
longtitude : '',
|
||||||
|
@ -84,6 +86,7 @@ export class DatasourceUpdateFormComponent implements OnInit {
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.loadForm();
|
this.loadForm();
|
||||||
|
console.log('mode: ', this.mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
loadForm() {
|
loadForm() {
|
||||||
|
@ -99,51 +102,64 @@ export class DatasourceUpdateFormComponent implements OnInit {
|
||||||
|
|
||||||
setupUpdateForm() {
|
setupUpdateForm() {
|
||||||
if (this.selectedRepo) {
|
if (this.selectedRepo) {
|
||||||
console.log(`my datasource type is: ${this.selectedRepo.datasourceType}`);
|
|
||||||
|
|
||||||
this.updateGroup.setValue({
|
this.updateGroup.setValue({
|
||||||
softwarePlatform: this.selectedRepo.typology,
|
softwarePlatform: this.selectedRepo.platform,
|
||||||
platformName: '',
|
platformName: '',
|
||||||
officialName: this.selectedRepo.officialName,
|
officialName: this.selectedRepo.officialname,
|
||||||
issn: '',
|
issn: '',
|
||||||
eissn: '',
|
eissn: '',
|
||||||
lissn: '',
|
lissn: '',
|
||||||
repoDescription: this.selectedRepo.description,
|
repoDescription: this.selectedRepo.description,
|
||||||
country: this.selectedRepo.countryCode,
|
country: this.selectedRepo.organizations[0].country, // countryCode
|
||||||
longtitude: this.selectedRepo.longitude,
|
longtitude: this.selectedRepo.longitude,
|
||||||
latitude: this.selectedRepo.latitude,
|
latitude: this.selectedRepo.latitude,
|
||||||
websiteUrl: this.selectedRepo.websiteUrl,
|
websiteUrl: this.selectedRepo.websiteurl,
|
||||||
institutionName: this.selectedRepo.organization,
|
institutionName: this.selectedRepo.organizations[0].legalname,
|
||||||
englishName: this.selectedRepo.englishName,
|
englishName: this.selectedRepo.englishname,
|
||||||
logoUrl: this.selectedRepo.logoUrl,
|
logoUrl: this.selectedRepo.logourl,
|
||||||
timezone: this.selectedRepo.timezone,
|
timezone: this.selectedRepo.timezone,
|
||||||
datasourceType: this.selectedRepo.datasourceClass,
|
datasourceType: this.selectedRepo.typology, // TODO: rename to typology?
|
||||||
adminEmail: this.selectedRepo.contactEmail
|
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('softwarePlatform').setValue('');
|
||||||
this.updateGroup.get('platformName').setValue(this.selectedRepo.typology);
|
this.updateGroup.get('platformName').setValue(this.selectedRepo.platform);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((this.selectedRepo.datasourceType === 'opendoar') ||
|
if (this.selectedRepo.eoscDatasourceType === 'Journal archive') {
|
||||||
(this.selectedRepo.datasourceType === 're3data')) {
|
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('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);
|
let ssnToShow = this.selectedRepo.issn.slice(0, 4) + '-' + this.selectedRepo.issn.toString().slice(4);
|
||||||
this.updateGroup.get('issn').setValue(ssnToShow);
|
this.updateGroup.get('issn').setValue(ssnToShow);
|
||||||
this.updateGroup.get('issn').clearValidators();
|
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) {
|
if (this.selectedRepo.eissn.trim().length) {
|
||||||
ssnToShow = this.selectedRepo.eissn.slice(0, 4) + '-' + this.selectedRepo.eissn.toString().slice(4);
|
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('eissn').disable();
|
||||||
this.updateGroup.get('lissn').disable();*/
|
this.updateGroup.get('lissn').disable();*/
|
||||||
}
|
}
|
||||||
/*this.getDatasourceClasses();*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getDatasourceClasses() {
|
getDatasourceClasses() {
|
||||||
this.repoService.getDatasourceClasses(this.selectedRepo.datasourceType).subscribe(
|
// FIXME: Use eoscDatasourceType when we support the new model
|
||||||
classes => this.datasourceClasses = classes,
|
|
||||||
|
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 => {
|
error => {
|
||||||
this.loadingMessage = '';
|
this.loadingMessage = '';
|
||||||
this.errorMessage = noServiceMessage;
|
this.errorMessage = noServiceMessage;
|
||||||
console.log(error);
|
console.log(error);
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
for (const key of Object.keys(this.datasourceClasses)) {
|
console.log('gotDatasourceClasses');
|
||||||
this.classCodes.push(key);
|
this.classCodes = Array.from(this.datasourceClasses.keys());
|
||||||
}
|
|
||||||
this.getCountries();
|
this.getCountries();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
getCountries() {
|
getCountries() {
|
||||||
this.repoService.getCountries()
|
this.repoService.getCountries().subscribe(
|
||||||
.subscribe(
|
|
||||||
countries => this.countries = countries.sort( function(a, b) {
|
countries => this.countries = countries.sort( function(a, b) {
|
||||||
if (a.name < b.name) {
|
if (a.name < b.name) {
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -236,7 +258,7 @@ export class DatasourceUpdateFormComponent implements OnInit {
|
||||||
window.scroll(1, 1);
|
window.scroll(1, 1);
|
||||||
|
|
||||||
if (this.updateGroup.valid) {
|
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();
|
this.refreshSelectedRepo();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -281,24 +303,26 @@ export class DatasourceUpdateFormComponent implements OnInit {
|
||||||
|
|
||||||
refreshSelectedRepo() {
|
refreshSelectedRepo() {
|
||||||
if (this.updateGroup.get('softwarePlatform').value ) {
|
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) {
|
} 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.description = this.updateGroup.get('repoDescription').value.toString();
|
||||||
this.selectedRepo.countryCode = this.updateGroup.get('country').value;
|
this.selectedRepo.organizations[0].country = this.updateGroup.get('country').value; // countryCode
|
||||||
this.selectedRepo.countryName = this.countries.filter(x => x.code === this.updateGroup.get('country').value)[0].name;
|
|
||||||
this.selectedRepo.longitude = this.updateGroup.get('longtitude').value;
|
this.selectedRepo.longitude = this.updateGroup.get('longtitude').value;
|
||||||
this.selectedRepo.latitude = this.updateGroup.get('latitude').value;
|
this.selectedRepo.latitude = this.updateGroup.get('latitude').value;
|
||||||
this.selectedRepo.websiteUrl = this.updateGroup.get('websiteUrl').value;
|
this.selectedRepo.websiteurl = this.updateGroup.get('websiteUrl').value;
|
||||||
this.selectedRepo.organization = this.updateGroup.get('institutionName').value.toString();
|
this.selectedRepo.organizations[0].legalname = this.updateGroup.get('institutionName').value.toString();
|
||||||
this.selectedRepo.englishName = this.updateGroup.get('englishName').value.toString();
|
this.selectedRepo.englishname = this.updateGroup.get('englishName').value.toString();
|
||||||
this.selectedRepo.logoUrl = this.updateGroup.get('logoUrl').value;
|
this.selectedRepo.logourl = this.updateGroup.get('logoUrl').value;
|
||||||
this.selectedRepo.timezone = this.updateGroup.get('timezone').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;
|
||||||
this.selectedRepo.contactEmail = this.updateGroup.get('adminEmail').value;
|
if (this.selectedRepo.eoscDatasourceType === 'journal') {
|
||||||
if (this.selectedRepo.datasourceType === 'journal') {
|
|
||||||
let ssnParts = this.updateGroup.get('issn').value.split('-');
|
let ssnParts = this.updateGroup.get('issn').value.split('-');
|
||||||
let correctSSN = ssnParts[0] + ssnParts[1];
|
let correctSSN = ssnParts[0] + ssnParts[1];
|
||||||
this.selectedRepo.issn = correctSSN;
|
this.selectedRepo.issn = correctSSN;
|
||||||
|
@ -313,10 +337,13 @@ export class DatasourceUpdateFormComponent implements OnInit {
|
||||||
this.selectedRepo.lissn = correctSSN;
|
this.selectedRepo.lissn = correctSSN;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!this.showButton) {
|
if (!this.showButton) { // on register
|
||||||
this.selectedRepo.registeredBy = this.authService.getUserEmail();
|
this.selectedRepo.registeredby = this.authService.getUserEmail();
|
||||||
this.selectedRepo.registered = true;
|
this.selectedRepo.managed = true;
|
||||||
this.selectedRepo.registrationDate = new Date(Date.now()); // NOT NEEDED ??
|
const now = new Date(Date.now());
|
||||||
|
this.selectedRepo.consentTermsOfUseDate = now;
|
||||||
|
this.selectedRepo.lastConsentTermsOfUseDate = now;
|
||||||
|
this.selectedRepo.registrationdate = now;
|
||||||
this.emittedInfo.emit(this.selectedRepo);
|
this.emittedInfo.emit(this.selectedRepo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,18 +8,35 @@
|
||||||
<div *ngIf="successMessage" class="uk-alert uk-alert-success">{{ successMessage }}</div>
|
<div *ngIf="successMessage" class="uk-alert uk-alert-success">{{ successMessage }}</div>
|
||||||
|
|
||||||
<form *ngIf="selectedRepo && !loadingMessage" [formGroup]="agreementForm">
|
<form *ngIf="selectedRepo && !loadingMessage" [formGroup]="agreementForm">
|
||||||
<br>
|
<div *ngIf="showButton" class="uk-margin-small"> <!-- Update -->
|
||||||
<!-- {{agreementForm.get('acceptTerms').value}}-->
|
<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>
|
<form-inline>
|
||||||
<label><input formControlName="acceptTerms" class="uk-checkbox" type="checkbox" checked> I Agree with the </label>
|
<label><input formControlName="acceptTerms" class="uk-checkbox" type="checkbox" checked
|
||||||
<a href="https://zenodo.org/record/1446384#.XiGIAdmxU5n" target="_blank">OpenAIRE's Terms of Agreement for Content Providers</a>
|
[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>
|
</form-inline>
|
||||||
<!-- {{agreementForm.get('optOut').value}}-->
|
|
||||||
<form-inline>
|
<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>
|
</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">
|
<div *ngIf="showButton" class="form-group">
|
||||||
<button class="uk-button uk-button-primary updateRepoInfoButton" type="button" (click)="updateRepo()">Update Information</button>
|
<button class="uk-button uk-button-primary updateRepoInfoButton" type="button" (click)="updateRepo()">Update Information</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<!--<pre>{{agreementForm.value|json}}</pre>-->
|
||||||
|
|
|
@ -19,7 +19,7 @@ export class DatasourceUpdateTermsFormComponent implements OnInit {
|
||||||
|
|
||||||
agreementForm = this.fb.group({
|
agreementForm = this.fb.group({
|
||||||
acceptTerms: '',
|
acceptTerms: '',
|
||||||
optOut: ''
|
textMining: ''
|
||||||
});
|
});
|
||||||
|
|
||||||
consentTermsOfUseDate: Date;
|
consentTermsOfUseDate: Date;
|
||||||
|
@ -38,8 +38,6 @@ export class DatasourceUpdateTermsFormComponent implements OnInit {
|
||||||
repoId: string;
|
repoId: string;
|
||||||
formSubmitted = false;
|
formSubmitted = false;
|
||||||
// updateGroup: FormGroup;
|
// updateGroup: FormGroup;
|
||||||
termsTick: boolean;
|
|
||||||
dataMiningTick: boolean;
|
|
||||||
readonly updateGroupDefinition = {
|
readonly updateGroupDefinition = {
|
||||||
softwarePlatform : ''
|
softwarePlatform : ''
|
||||||
};
|
};
|
||||||
|
@ -52,20 +50,24 @@ export class DatasourceUpdateTermsFormComponent implements OnInit {
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
console.log(this.selectedRepo);
|
this.agreementForm.get('acceptTerms').setValue(this.selectedRepo.consentTermsOfUse ? this.selectedRepo.consentTermsOfUse : false);
|
||||||
// this.dataMiningTick = false; // until we have an actual value
|
this.agreementForm.get('textMining').setValue(this.selectedRepo.fullTextDownload ? this.selectedRepo.fullTextDownload : false);
|
||||||
if (this.router.url.indexOf('/sources/update') > -1) {
|
this.selectedRepo.consentTermsOfUse = this.agreementForm.value.acceptTerms;
|
||||||
console.log('up');
|
this.selectedRepo.fullTextDownload = this.agreementForm.value.textMining;
|
||||||
this.termsTick = (this.selectedRepo.consentTermsOfUse ? (this.selectedRepo.consentTermsOfUse === 'true') : true);
|
// if (this.router.url.indexOf('/sources/update') > -1) {
|
||||||
// this.addTerm(this.selectedRepo.consentTermsOfUse, this.dataMiningTick);
|
// console.log('update');
|
||||||
|
// } else
|
||||||
} else if (this.router.url.indexOf('/sources/register') > -1) {
|
if (this.router.url.indexOf('/sources/register') > -1) {
|
||||||
console.log('reg');
|
this.emitRepo();
|
||||||
this.termsTick = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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() {
|
updateRepo() {
|
||||||
this.formSubmitted = true;
|
this.formSubmitted = true;
|
||||||
this.errorMessage = '';
|
this.errorMessage = '';
|
||||||
|
@ -76,6 +78,12 @@ export class DatasourceUpdateTermsFormComponent implements OnInit {
|
||||||
if (this.showButton) {
|
if (this.showButton) {
|
||||||
this.loadingMessage = formSubmitting;
|
this.loadingMessage = formSubmitting;
|
||||||
this.errorMessage = '';
|
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(
|
this.repoService.updateRepository(this.selectedRepo).subscribe(
|
||||||
response => {
|
response => {
|
||||||
if (response) {
|
if (response) {
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="reposOfUser && reposOfUser.length>0" class="menu_section border_top">
|
<div *ngIf="reposOfUser && reposOfUser.length>0" class="menu_section border_top">
|
||||||
<div class="sidebar_heading">REPOSITORIES</div>
|
<div class="sidebar_heading">DATASOURCES</div>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
<li *ngFor="let repo of visibleReposOfUser" [routerLinkActive]="['current_section']" class="">
|
<li *ngFor="let repo of visibleReposOfUser" [routerLinkActive]="['current_section']" class="">
|
||||||
|
@ -113,8 +113,8 @@
|
||||||
</a>
|
</a>
|
||||||
<ul [ngClass]="{'uk-display-block': visibleAdminRepo}">
|
<ul [ngClass]="{'uk-display-block': visibleAdminRepo}">
|
||||||
<li class="act_item">
|
<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.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}}</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -36,37 +36,6 @@
|
||||||
<a class="uk-search-input" [routerLink]="['emptyPage']" [routerLinkActive]="['uk-active']">Dashboard</a>
|
<a class="uk-search-input" [routerLink]="['emptyPage']" [routerLinkActive]="['uk-active']">Dashboard</a>
|
||||||
</li>
|
</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>
|
<li><a (click)="logout()">Logout</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -118,7 +87,7 @@
|
||||||
<div class="uk-container uk-container-expand">
|
<div class="uk-container uk-container-expand">
|
||||||
<nav class="uk-navbar" uk-navbar="{"align":"left"}">
|
<nav class="uk-navbar" uk-navbar="{"align":"left"}">
|
||||||
<div class="uk-navbar-left">
|
<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">
|
<img src="../../../assets/imgs/OA_PROVIDE_B.png" alt="OpenAIRE" class="uk-responsive-height">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -127,19 +96,13 @@
|
||||||
|
|
||||||
<ul class="uk-navbar-nav" >
|
<ul class="uk-navbar-nav" >
|
||||||
<li class="uk-parent" [routerLinkActive]="['uk-active']">
|
<li class="uk-parent" [routerLinkActive]="['uk-active']">
|
||||||
<a [routerLink]="['home']" [routerLinkActive]="['uk-active']">
|
<a [routerLink]="['home']" [routerLinkActive]="['uk-active']">Home</a>
|
||||||
Home
|
|
||||||
</a>
|
|
||||||
</li>
|
</li>
|
||||||
<li class="uk-parent" [routerLinkActive]="['uk-active']">
|
<li class="uk-parent" [routerLinkActive]="['uk-active']">
|
||||||
<a [routerLink]="['about']" [routerLinkActive]="['uk-active']">
|
<a [routerLink]="['about']" [routerLinkActive]="['uk-active']">About</a>
|
||||||
About
|
|
||||||
</a>
|
|
||||||
</li>
|
</li>
|
||||||
<li *ngIf="getIsUserLoggedIn()" class="uk-parent" [routerLinkActive]="['uk-active']">
|
<li *ngIf="getIsUserLoggedIn()" class="uk-parent" [routerLinkActive]="['uk-active']">
|
||||||
<a [routerLink]="['join']" [routerLinkActive]="['uk-active']">
|
<a [routerLink]="['join']" [routerLinkActive]="['uk-active']">Dashboard</a>
|
||||||
Dashboard
|
|
||||||
</a>
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li *ngIf="!getIsUserLoggedIn()" class="uk-parent">
|
<li *ngIf="!getIsUserLoggedIn()" class="uk-parent">
|
||||||
|
@ -183,55 +146,6 @@
|
||||||
|
|
||||||
</ul>
|
</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">-->
|
|
||||||
<!--<!–<ul *ngIf="getIsUserAdmin()" class="uk-nav uk-navbar-dropdown-nav">–>-->
|
|
||||||
<!--<!–<li class="uk-nav-header" style="display: block;">Admin</li>–>-->
|
|
||||||
<!--<!–<li style="display: block"><a href="{{adminHomePage}}" target="_blank">Help Texts</a></li>–>-->
|
|
||||||
<!--<!–<li style="display: block"><a [routerLink]="['/admin/metrics']">Metrics</a></li>–>-->
|
|
||||||
<!--<!–<li style="display: block" class="uk-margin-small-bottom"><a [routerLink]="['/admin/registrations']">Registrations</a></li>–>-->
|
|
||||||
<!--<!–</ul>–>-->
|
|
||||||
<!--<li><a class="" (click)="logout()">Log out</a></li>-->
|
|
||||||
<!--</ul>-->
|
|
||||||
<!--</div>-->
|
|
||||||
<!--</div>-->
|
|
||||||
<!--</div>-->
|
|
||||||
<!--</li>-->
|
|
||||||
<!--</ul>-->
|
|
||||||
|
|
||||||
<!--</div>-->
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</nav>
|
</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 |
|
@ -9722,7 +9722,7 @@ div.ganttview .ui-resizable-w {
|
||||||
@media only screen and (min-width: 960px) {
|
@media only screen and (min-width: 960px) {
|
||||||
.wizard > .steps > ul > li {
|
.wizard > .steps > ul > li {
|
||||||
float: left;
|
float: left;
|
||||||
width: 25%;
|
width: 20%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.wizard > .steps > ul > li + li a {
|
.wizard > .steps > ul > li + li a {
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,6 @@
|
||||||
export const environment = {
|
export const environment = {
|
||||||
production: true,
|
production: true,
|
||||||
|
AAI_LOGOUT: 'https://aai.openaire.eu/proxy/saml2/idp/SingleLogoutService.php?ReturnTo=',
|
||||||
MATOMO_URL: 'https://analytics.openaire.eu/',
|
MATOMO_URL: 'https://analytics.openaire.eu/',
|
||||||
MATOMO_SITE: 92,
|
MATOMO_SITE: 92,
|
||||||
API_ENDPOINT: '/api',
|
API_ENDPOINT: '/api',
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
export const environment = {
|
export const environment = {
|
||||||
production: true,
|
production: true,
|
||||||
|
AAI_LOGOUT: 'https://aai.openaire.eu/proxy/saml2/idp/SingleLogoutService.php?ReturnTo=',
|
||||||
MATOMO_URL: 'https://analytics.openaire.eu/',
|
MATOMO_URL: 'https://analytics.openaire.eu/',
|
||||||
MATOMO_SITE: 111,
|
MATOMO_SITE: 111,
|
||||||
API_ENDPOINT: '/api',
|
API_ENDPOINT: '/api',
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
export const environment = {
|
export const environment = {
|
||||||
production: false,
|
production: false,
|
||||||
|
AAI_LOGOUT: 'https://aai.openaire.eu/proxy/saml2/idp/SingleLogoutService.php?ReturnTo=',
|
||||||
API_ENDPOINT: '/uoa-repository-manager-service',
|
API_ENDPOINT: '/uoa-repository-manager-service',
|
||||||
MATOMO_URL: 'https://analytics.openaire.eu/',
|
MATOMO_URL: 'https://analytics.openaire.eu/',
|
||||||
MATOMO_SITE: 9222222,
|
MATOMO_SITE: 9222222,
|
||||||
|
|
Loading…
Reference in New Issue