Compare commits

...

No commits in common. "master" and "test" have entirely different histories.
master ... test

645 changed files with 8648 additions and 182917 deletions

View File

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

108
README.md
View File

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

View File

@ -33,22 +33,10 @@
"src/assets/js/altair_admin_common.min.js",
"src/assets/js/common.min.js",
"src/assets/js/pages/forms_wizard.js"
],
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
]
},
"configurations": {
"production": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
@ -58,18 +46,14 @@
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true
},
"beta": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
@ -79,13 +63,14 @@
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true
}
},
"defaultConfiguration": ""
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",

33769
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -3,58 +3,57 @@
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve --proxy-config proxy.conf.json",
"start": "ng serve",
"start:proxy": "ng serve --proxy-config proxy.conf.json",
"build": "ng build --output-hashing=all",
"build:beta": "ng build --configuration beta --output-hashing=all",
"build:prod": "ng build --configuration production --output-hashing=all",
"build": "rm -rf dist; ng build --prod",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "12.2.17",
"@angular/common": "12.2.17",
"@angular/compiler": "12.2.17",
"@angular/core": "12.2.17",
"@angular/forms": "12.2.17",
"@angular/platform-browser": "12.2.17",
"@angular/platform-browser-dynamic": "^12.2.17",
"@angular/router": "12.2.17",
"@angular/animations": "^6.0.3",
"@angular/common": "^6.0.3",
"@angular/compiler": "^6.0.3",
"@angular/core": "^6.0.3",
"@angular/forms": "^6.0.3",
"@angular/http": "^6.0.3",
"@angular/platform-browser": "^6.0.3",
"@angular/platform-browser-dynamic": "^6.0.3",
"@angular/router": "^6.0.3",
"altair": "^1.0.0",
"angular2-cookie-law": "^6.0.4",
"bootstrap": "^4.1.3",
"core-js": "^2.5.4",
"highcharts": "^9.1.2",
"highcharts-angular": "^2.10.0",
"highcharts": "^7.2.1",
"highcharts-angular": "^2.4.0",
"jquery": "^3.4.1",
"jquery-bez": "^1.0.11",
"ngx-bootstrap": "^4.3.0",
"ngx-matomo": "1.0.0-rc.0",
"rxjs": "6.6.7",
"tslib": "^2.0.0",
"ngx-bootstrap": "^3.0.1",
"ngx-matomo": "^0.1.2",
"rxjs": "6.3.3",
"uikit": "^3.0.0-rc.19",
"zone.js": "~0.11.4"
"zone.js": "^0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "~12.2.18",
"@angular/cli": "~12.2.18",
"@angular/compiler-cli": "^12.2.17",
"@angular/language-service": "^12.2.17",
"@types/jasmine": "~3.6.0",
"@angular-devkit/build-angular": "~0.6.8",
"@angular/cli": "~6.0.8",
"@angular/compiler-cli": "^6.0.3",
"@angular/language-service": "^6.0.3",
"@types/jasmine": "~2.8.6",
"@types/jasminewd2": "~2.0.3",
"@types/node": "^12.11.1",
"codelyzer": "^6.0.0",
"jasmine-core": "~3.8.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~6.3.4",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"protractor": "~7.0.0",
"@types/node": "~8.9.4",
"codelyzer": "~4.2.1",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.0.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.0",
"karma-jasmine": "~1.1.1",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "^5.4.1",
"ts-node": "~5.0.1",
"tslint": "~6.1.0",
"typescript": "~4.3.5"
"tslint": "~5.9.1",
"typescript": "~2.7.2"
}
}

View File

@ -1,9 +0,0 @@
# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
# For IE 9-11 support, please uncomment the last line of the file and adjust as needed
> 0.5%
last 2 versions
Firefox ESR
not dead
# IE 9-11

View File

@ -3,9 +3,9 @@ import { NgModule } from '@angular/core';
import { HomeComponent } from './pages/landing/home/home.component';
import { AuthGuardService } from './services/auth-guard.service';
import { ForbiddenPageComponent } from './shared/reusablecomponents/403-forbidden-page.component';
import { EmptyPageComponent } from './pages/emptypage/empty-page.component';
import { JoinComponent } from './pages/join/join.component';
import { AboutComponent } from './pages/landing/about/about.component';
import { EmptyPageComponent } from "./pages/emptypage/empty-page.component";
import { JoinComponent } from "./pages/join/join.component";
import { AboutComponent } from "./pages/landing/about/about.component";
const appRoutes: Routes = [
{
@ -33,38 +33,57 @@ const appRoutes: Routes = [
},
{
path: 'repository',
loadChildren: () => import('./pages/repository/repository.module').then(m => m.RepositoryModule),
loadChildren: './pages/repository/repository.module#RepositoryModule',
// loadChildren: () => import('./pages/repository/repository.module').then(m => m.RepositoryModule),
canActivate: [AuthGuardService]
},
{
path: 'repositoryAdmin',
loadChildren: () => import('./pages/repository/repository.module').then(m => m.RepositoryModule),
loadChildren: './pages/repository/repository.module#RepositoryModule',
// loadChildren: () => import('./pages/repository/repository.module').then(m => m.RepositoryModule),
canActivate: [AuthGuardService]
},
// {
// path: 'dashboard',
// component: DashboardComponent,
// canActivate: [AuthGuardService]
// },
{
path: 'sources',
loadChildren: () => import('./pages/sources/sources.module').then(m => m.SourcesModule),
loadChildren: './pages/sources/sources.module#SourcesModule',
canActivate: [AuthGuardService]
},
{
path: 'compatibility',
loadChildren: () => import('./pages/compatibility/compatibility.module').then(m => m.CompatibilityModule)
loadChildren: './pages/compatibility/compatibility.module#CompatibilityModule'
},
{
path: 'content',
loadChildren: () => import('./pages/content/content.module').then(m => m.ContentModule),
loadChildren: './pages/content/content.module#ContentModule',
canActivate: [AuthGuardService]
},
// {
// path: 'getImpact',
// loadChildren: './pages/metrics/metrics.module#MetricsModule',
// canActivate: [AuthGuardService]
// },
{
path: 'admin',
loadChildren: () => import('./pages/adminPg/adminPg.module').then(m => m.AdminPgModule),
loadChildren: './pages/adminPg/adminPg.module#AdminPgModule',
},
{
path: '403-forbidden',
component: ForbiddenPageComponent
},
// {
// path: '',
// redirectTo: '/home',
// pathMatch: 'full'
// },
{
// fixme redirect to 404
//fixme redirect to 404
path: '**',
redirectTo: '/403-forbidden',
// component: ForbiddenPageComponent
@ -73,7 +92,7 @@ const appRoutes: Routes = [
@NgModule ({
imports: [RouterModule.forRoot(appRoutes, { relativeLinkResolution: 'legacy' })],
imports: [RouterModule.forRoot(appRoutes)],
exports: [RouterModule]
})

View File

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

View File

@ -1,24 +1,24 @@
import { TestBed, waitForAsync } from '@angular/core/testing';
import { TestBed, async } from '@angular/core/testing';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(waitForAsync(() => {
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [
AppComponent
],
}).compileComponents();
}));
it('should create the app', waitForAsync(() => {
it('should create the app', async(() => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance;
expect(app).toBeTruthy();
}));
it(`should have as title 'app'`, waitForAsync(() => {
it(`should have as title 'app'`, async(() => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance;
expect(app.title).toEqual('app');
}));
it('should render title in a h1 tag', waitForAsync(() => {
it('should render title in a h1 tag', async(() => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.debugElement.nativeElement;

View File

@ -1,12 +1,14 @@
import {Component, OnInit, ViewChild} from '@angular/core';
import {NavigationEnd, Router} from '@angular/router';
import {AuthenticationService} from './services/authentication.service';
import {environment} from '../environments/environment';
import {MatomoTracker} from 'ngx-matomo';
import {ConfirmationDialogComponent} from './shared/reusablecomponents/confirmation-dialog.component';
import {RepositoryService} from './services/repository.service';
import {RepositorySnippet} from './domain/typeScriptClasses';
import {FormBuilder, FormGroup, FormArray} from '@angular/forms';
import { NavigationEnd, Router, RoutesRecognized } from '@angular/router';
import { AuthenticationService } from './services/authentication.service';
import { environment } from '../environments/environment';
import { MatomoInjector, MatomoTracker } from 'ngx-matomo';
import { ConfirmationDialogComponent } from './shared/reusablecomponents/confirmation-dialog.component';
import { RepositoryService } from './services/repository.service';
import { RepositorySnippet } from './domain/typeScriptClasses';
import {FormBuilder, FormGroup, FormControl, FormArray} from '@angular/forms';
import {element} from 'protractor';
import {timestamp} from 'rxjs/operators';
@Component({
selector: 'oa-repo-manager',
@ -30,10 +32,28 @@ export class AppComponent implements OnInit {
open: boolean = true;
constructor(private router: Router, private authService: AuthenticationService, private matomoTracker: MatomoTracker,
private repositoryService: RepositoryService, private fb: FormBuilder) {
constructor(private router: Router,
private authService: AuthenticationService,
private matomoInjector: MatomoInjector,
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?');
let piwikUrl;
if (window.location.origin.includes('beta')) {
// piwikUrl = 'https://analytics.openaire.eu/piwik.php?idsite=92&rec=1';
piwikUrl = '92';
} else if (window.location.origin.includes('localhost:4200') ||
window.location.origin.includes('athenarc')) {
// piwikUrl = 'https://analytics.openaire.eu/piwik.php?idsite=92&rec=1';
piwikUrl = '9222222';
} else {
// piwikUrl = 'https://analytics.openaire.eu/piwik.php?idsite=111&rec=1';
piwikUrl = '111';
}
this.matomoInjector.init('https://analytics.openaire.eu/', piwikUrl);
/*disabling console.log in production*/
if ( environment.production === true ) {
@ -51,64 +71,63 @@ export class AppComponent implements OnInit {
this.authService.tryLogin();
}
ngOnInit() {
this.router.events.subscribe((evt) => {
if (!(evt instanceof NavigationEnd)) {
return;
}
if (this.authService.isLoggedIn_) {
this.matomoTracker.setUserId(this.authService.getUserEmail());
}
window.scrollTo(0, 0);
});
this.authService.isLoggedIn.subscribe(
logged => {if (logged) {this.getReposOfUser(); }},
error => {console.log(error); }
);
}
getReposOfUser(): void {
this.repositoryService.getRepositoriesSnippetsOfUser().subscribe(
repos => {
this.reposOfUser = repos;
},
error => {
console.log(error);
},
this.repositoryService.getRepositoriesOfUser()
.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;
}
});
}
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() {
this.repositoryService.updateRepositoriesTerms(this.agreementForm.value.terms).subscribe(
res => {},
err => {console.log(err); }
);
/* 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');
}
addTerm(name: string, id: string, consent: boolean) {
ngOnInit() {
this.router.events.subscribe((evt) => {
if (!(evt instanceof NavigationEnd)) {
return;
}
if (this.authService.isLoggedIn) {
this.matomoTracker.setUserId(this.authService.getUserEmail());
}
window.scrollTo(0, 0);
});
// this.getReposOfUser();
}
addTerm(name: string, id: string, consent: string) {
this.terms.push(this.newTerm(name, id, consent));
}
newTerm(name: string, id: string, consent: boolean): FormGroup {
newTerm(name: string, id: string, consent: string): FormGroup {
return this.fb.group({
id: [id],
name: [name],
// accept: [(consent ? consent : true)]
consentTermsOfUse: false,
fullTextDownload: false
accept: [(consent ? consent : true)]
});
}

View File

@ -1,30 +1,29 @@
import {AppComponent} from './app.component';
import {NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {NoopAnimationsModule} from '@angular/platform-browser/animations';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {HTTP_INTERCEPTORS, HttpClientModule} from '@angular/common/http';
import {ReusableComponentsModule} from './shared/reusablecomponents/reusable-components.module';
import {CookieLawModule} from './shared/reusablecomponents/cookie-law/cookie-law.module';
import {AppRoutingModule} from './app-routing.module';
import {AuthenticationInterceptor} from './services/authentication-interceptor';
import {BrokerService} from './services/broker.service';
import {MonitorService} from './services/monitor.service';
import {PiwikService} from './services/piwik.service';
import {RepositoryService} from './services/repository.service';
import {ValidatorService} from './services/validator.service';
import {UsagestatsService} from './services/usagestats.service';
import {StatisticsService} from './services/statistics.service';
import {AuthGuardService} from './services/auth-guard.service';
import {AuthenticationService} from './services/authentication.service';
import {HomeComponent} from './pages/landing/home/home.component';
import {MatomoModule} from 'ngx-matomo';
import {DashboardService} from './services/dashboard.service';
import {EmptyPageComponent} from './pages/emptypage/empty-page.component';
import {SharedService} from './services/shared.service';
import {JoinComponent} from './pages/join/join.component';
import {AboutComponent} from './pages/landing/about/about.component';
import {environment} from '../environments/environment';
import { AppComponent } from './app.component';
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';
import { ReusableComponentsModule } from './shared/reusablecomponents/reusable-components.module';
import { CookieLawModule } from './shared/reusablecomponents/cookie-law/cookie-law.module';
import { AppRoutingModule } from './app-routing.module';
import { AuthenticationInterceptor } from './services/authentication-interceptor';
import { BrokerService } from './services/broker.service';
import { MonitorService } from './services/monitor.service';
import { PiwikService } from './services/piwik.service';
import { RepositoryService } from './services/repository.service';
import { ValidatorService } from './services/validator.service';
import { UsagestatsService } from './services/usagestats.service';
import { StatisticsService } from './services/statistics.service';
import { AuthGuardService } from './services/auth-guard.service';
import { AuthenticationService } from './services/authentication.service';
import { HomeComponent } from './pages/landing/home/home.component';
import { MatomoModule } from 'ngx-matomo';
import { DashboardService } from "./services/dashboard.service";
import { EmptyPageComponent } from "./pages/emptypage/empty-page.component";
import { SharedService } from "./services/shared.service";
import { JoinComponent } from "./pages/join/join.component";
import { AboutComponent } from "./pages/landing/about/about.component";
@NgModule({
@ -43,18 +42,7 @@ import {environment} from '../environments/environment';
HttpClientModule,
ReusableComponentsModule,
CookieLawModule,
MatomoModule.forRoot({
scriptUrl: environment.MATOMO_URL + 'matomo.js',
trackers: [
{
trackerUrl: environment.MATOMO_URL + 'matomo.php',
siteId: environment.MATOMO_SITE
}
],
routeTracking: {
enable: true
}
}),
MatomoModule,
AppRoutingModule
],
providers: [
@ -77,5 +65,4 @@ import {environment} from '../environments/environment';
],
bootstrap: [AppComponent]
})
export class AppModule {
}
export class AppModule { }

View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

@ -15,6 +15,7 @@ import {RepositoryService} from '../../services/repository.service';
import {ActivatedRoute, Router} from '@angular/router';
import {PiwikInfoPage} from '../../domain/page-content';
import {environment} from '../../../environments/environment';
import {st} from '@angular/core/src/render3';
@Component ({
selector: 'app-admin-metrics',
@ -43,7 +44,7 @@ export class AdminPgMetricsComponent implements OnInit {
dataForm: FormGroup;
@ViewChild('confirmApprovalModal', { static: true })
@ViewChild('confirmApprovalModal')
public confirmApprovalModal: ConfirmationDialogComponent;
private pageTotal: number;
private piwiksTotal: number;

View File

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

View File

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

View File

@ -27,13 +27,13 @@ export class CompatibilityValidateTypeComponent implements OnInit {
* the param that is used is 'step' and the values are: 'baseUrl','guidelines','crisEntities'/'parameters','finish'
*/
currentStep: number;
@ViewChild('topHelperContent', { static: true })
@ViewChild('topHelperContent')
public topHelperContent: HelpContentComponent;
@ViewChild('leftHelperContent', { static: true })
@ViewChild('leftHelperContent')
public leftHelperContent: AsideHelpContentComponent;
@ViewChild('rightHelperContent', { static: true })
@ViewChild('rightHelperContent')
public rightHelperContent: AsideHelpContentComponent;
@ViewChild('bottomHelperContent', { static: true })
@ViewChild('bottomHelperContent')
public bottomHelperContent: HelpContentComponent;
baseUrlList: string[] = [];

View File

@ -25,7 +25,7 @@
<a [routerLink]="['literature']" [queryParams]="{ step: 'baseUrl' }" class="el-link uk-position-cover uk-margin-remove-adjacent"></a>
<div class="md-card-content large-padding uk-margin-medium-top uk-margin-bottom">
<div class="">
<img class="el-image" src="../../../assets/imgs/datasourcetypes/Literature%20repository.svg" alt="" width="50">
<img class="el-image" src="../../../assets/imgs/datasourcetypes/Asset%203.svg" alt="" width="50">
</div>
<h3>Literature repository</h3>
<div class="uk-transition-slide-bottom uk-position-bottom uk-overlay uk-overlay-primary">
@ -41,7 +41,7 @@
<a [routerLink]="['data']" [queryParams]="{ step: 'baseUrl' }" 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="50">
<img class="el-image" src="../../../assets/imgs/datasourcetypes/Asset%202.svg" alt="" width="50">
</div>
<h3>Data repository</h3>
<div class="uk-transition-slide-bottom uk-position-bottom uk-overlay uk-overlay-primary">
@ -57,7 +57,7 @@
<a [routerLink]="['cris']" [queryParams]="{ step: 'baseUrl' }" 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">
<img class="el-image" src="../../../assets/imgs/datasourcetypes/Asset%201.svg" alt="" width="50">
</div>
<h3>CRIS systems</h3>
<div class="uk-transition-slide-bottom uk-position-bottom uk-overlay uk-overlay-primary">
@ -69,29 +69,6 @@
</div>
<div class="uk-grid uk-grid-match uk-grid-medium repositoryTypeSelection uk-child-width-1-3@l uk-child-widht-1-3@m" data-uk-grid-margin="">
<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">
<img alt="BETA" class="large-beta-indication" src="../../../assets/imgs/beta_flag.svg" width="100" style="position:absolute; left: 0;">
<a [routerLink]="['fair']" [queryParams]="{ step: 'baseUrl' }" 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/Fair.svg" alt="" width="50">
</div>
<h3>FAIR assessment</h3>
<div class="uk-transition-slide-bottom uk-position-bottom uk-overlay uk-overlay-primary">
<p class="uk-margin-remove">Perform a fair assessment on your metadata.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- RIGHT HELP CONTENT -->

View File

@ -7,6 +7,7 @@ import { loadingJobSummary, loadingJobSummaryError, noContentRulesResults,
import { ConfirmationDialogComponent } from '../../shared/reusablecomponents/confirmation-dialog.component';
import { AuthenticationService } from '../../services/authentication.service';
import * as Highcharts from 'highcharts';
import {text} from '@angular/core/src/render3/instructions';
@Component({
selector: 'app-compatibility-validation-results',
@ -40,7 +41,7 @@ export class CompatibilityValidationResultsComponent implements OnInit {
chartOptionsForContent: Highcharts.Options;
chartOptionsForUsage: Highcharts.Options;
@ViewChild('checkErrors', { static: true })
@ViewChild('checkErrors')
public checkErrors: ConfirmationDialogComponent;
constructor (private route: ActivatedRoute,

View File

@ -41,7 +41,7 @@ export class JoinComponent implements OnInit {
}
getReposOfUser(): void {
this.repositoryService.getRepositoriesSnippetsOfUser()
this.repositoryService.getRepositoriesOfUser()
.subscribe(
repos => {
this.repositoriesOfUser = repos;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,4 +1,4 @@
import {Component, OnDestroy, OnInit} from '@angular/core';
import { Component, OnInit } from '@angular/core';
import { AuthenticationService } from '../../../services/authentication.service';
import { RepositoryService } from '../../../services/repository.service';
import {
@ -16,15 +16,15 @@ import {DashboardService} from '../../../services/dashboard.service';
import {DomSanitizer, SafeResourceUrl} from '@angular/platform-browser';
import {PiwikService} from '../../../services/piwik.service';
import {ValidatorService} from '../../../services/validator.service';
import {ActivatedRoute} from '@angular/router';
import {SharedService} from '../../../services/shared.service';
import {ActivatedRoute} from "@angular/router";
import {SharedService} from "../../../services/shared.service";
@Component ({
selector: 'app-dashboard',
templateUrl: 'dashboard.component.html'
})
export class DashboardComponent implements OnInit, OnDestroy {
export class DashboardComponent implements OnInit {
repository: Repository = null;
errorMessage: string;
@ -88,25 +88,29 @@ export class DashboardComponent implements OnInit, OnDestroy {
ngOnInit() {
if (this.sharedService.getRepository()) {
if(this.sharedService.getRepository()) {
this.repository = this.sharedService.getRepository();
this.getSelectedRepositorySummaryInfo(this.repository);
}
const body = document.getElementsByTagName('body')[0];
body.classList.remove('top_bar_active');
body.classList.remove('page_heading_active');
body.classList.remove('landing');
body.classList.add('dashboard');
this.sharedService.repository$.subscribe(
r => {
this.repository = r;
// console.log("RepositoryID: ", this.repository.id);
this.getSelectedRepositorySummaryInfo(this.repository);
}
);
let body = document.getElementsByTagName('body')[0];
body.classList.remove("top_bar_active");
body.classList.remove("page_heading_active");
body.classList.remove("landing");
body.classList.add("dashboard");
const currentTime = new Date();
this.currentDate = currentTime.getFullYear() + '-' + (currentTime.getMonth() + 1);
}
ngOnDestroy() {
// this.sharedService.repository.unsubscribe();
}
getSelectedRepositorySummaryInfo(repository: Repository) {
// Aggregations
@ -183,7 +187,7 @@ export class DashboardComponent implements OnInit, OnDestroy {
this.validatorService.getValidationSummary(repository.id).subscribe(
validationSummary => {
this.storedJob = validationSummary;
// console.log(validationSummary);
console.log(validationSummary);
},
error => {
this.errorValidationsMessage = loadingJobSummaryError;
@ -199,7 +203,7 @@ export class DashboardComponent implements OnInit, OnDestroy {
getCollectionMonitorSummary(collectionMonitorSummary: CollectionMonitorSummary) {
this.latestAggregations = collectionMonitorSummary.aggregationInfo;
this.latestAggregations = collectionMonitorSummary.aggregationDetails;
this.lastIndexedVersion = collectionMonitorSummary.lastIndexedVersion;
if ( !this.latestAggregations || (this.latestAggregations.length === 0) ) {
@ -214,16 +218,16 @@ export class DashboardComponent implements OnInit, OnDestroy {
this.brokerSummary = brokerSummary;
if (this.brokerSummary.userSubs == null)
if(this.brokerSummary.userSubs==null)
this.noSubscriptions = noTopicsFound;
if (this.brokerSummary.topicsForDatasource == null)
if(this.brokerSummary.topicsForDatasource==null)
this.noTopics = noSubscriptionsFound;
this.totalNumberOfEvents = 0;
this.totalMore = 0;
this.totalMissing = 0;
if (brokerSummary.topicsForDatasource) {
for (const browseEntry of brokerSummary.topicsForDatasource) {
if(brokerSummary.topicsForDatasource) {
for (let browseEntry of brokerSummary.topicsForDatasource) {
this.totalNumberOfEvents += browseEntry.size;
if (browseEntry.value.startsWith('ENRICH/MORE')) {
this.totalMore += browseEntry.size;
@ -268,18 +272,18 @@ export class DashboardComponent implements OnInit, OnDestroy {
getViewsUrl () {
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"}}}');
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"}}}');
this.viewsUrl = this.sanitizer.bypassSecurityTrustResourceUrl(`${this.repoMetrics.diagramsBaseURL}chart?json=${encodedURL}`);
}
getDownloadsUrl () {
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"}}}');
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 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.downloadsUrl = this.sanitizer.bypassSecurityTrustResourceUrl(`${this.repoMetrics.diagramsBaseURL}chart?json=${encodedURL}`);
}
getCorrectName() {
const temp = this.repository.officialname.split('|');
const temp = this.repository.officialName.split('|');
let correctName = temp[0];
let repoName = temp[0];
for (let i = 1; i < temp.length; i++) {

View File

@ -57,7 +57,7 @@ export class ContentEventsOfRepoEventslistComponent implements OnInit {
modalErrorMessage: string;
isModalShown: boolean;
@ViewChild('subscribeToEventsModal', { static: true })
@ViewChild('subscribeToEventsModal')
public subscribeToEventsModal: ConfirmationDialogComponent;
constructor (private route: ActivatedRoute,
@ -74,7 +74,7 @@ export class ContentEventsOfRepoEventslistComponent implements OnInit {
if(this.sharedService.getRepository()) {
this.repoName = this.sharedService.getRepository().officialname;
this.repoName = this.sharedService.getRepository().officialName;
this.initQuery();
this.initForm();
this.currentPage = 0; /* DELETE WHEN ADVANCED SHOW EVENTS IS FIXED AND SENDS CORRECT VALUE FOR CURRENT PAGE */
@ -84,7 +84,7 @@ export class ContentEventsOfRepoEventslistComponent implements OnInit {
this.sharedService.repository$.subscribe(
r => {
if (r) {
this.repoName = r.officialname;
this.repoName = r.officialName;
this.initQuery();
this.initForm();
this.currentPage = 0; /* DELETE WHEN ADVANCED SHOW EVENTS IS FIXED AND SENDS CORRECT VALUE FOR CURRENT PAGE */

View File

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

View File

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

View File

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

View File

@ -37,7 +37,7 @@ export class MetricsShowComponent implements OnInit {
ngOnInit() {
if (this.sharedService.getRepository()) {
if(this.sharedService.getRepository()) {
this.repoId = this.sharedService.getRepository().id;
this.piwik = this.sharedService.getRepository().piwikInfo;
this.getMetrics();
@ -51,11 +51,11 @@ export class MetricsShowComponent implements OnInit {
}
);
const body = document.getElementsByTagName('body')[0];
body.classList.remove('top_bar_active'); // remove the class
body.classList.remove('page_heading_active');
body.classList.remove('landing');
body.classList.add('dashboard');
let body = document.getElementsByTagName('body')[0];
body.classList.remove("top_bar_active"); //remove the class
body.classList.remove("page_heading_active");
body.classList.remove("landing");
body.classList.add("dashboard");
}
getMetrics() {
@ -90,7 +90,7 @@ export class MetricsShowComponent implements OnInit {
getViewsUrl () {
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"}}}');
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"}}}');
this.viewsUrl = this.sanitizer.bypassSecurityTrustResourceUrl(`${this.repoMetrics.diagramsBaseURL}chart?json=${encodedURL}`);
// this.viewsUrl = this.sanitizer.bypassSecurityTrustResourceUrl(
@ -112,7 +112,7 @@ export class MetricsShowComponent implements OnInit {
getDownloadsUrl () {
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"}}}');
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 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.downloadsUrl = this.sanitizer.bypassSecurityTrustResourceUrl(`${this.repoMetrics.diagramsBaseURL}chart?json=${encodedURL}`);
// this.downloadsUrl = this.sanitizer.bypassSecurityTrustResourceUrl(

View File

@ -14,176 +14,7 @@
</aside-help-content>
<!-- 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="loadingMessage" class="loading-big">
@ -202,10 +33,10 @@
<div class="uk-width-4-5@m">
<h3>{{ repoResponse.ReportDefinition['@Name'] }} Report Results
<!--<span *ngIf="repoResponse.Report &&-->
<!--repoResponse.Report.Report &&-->
<!--repoResponse.Report.Report.Customer &&-->
<!--repoResponse.Report.Report.Customer.ReportItems &&-->
<!--repoResponse.Report.Report.Customer.ReportItems.length > 0">for {{ repoResponse.Report.Report.Customer.ReportItems[0].ItemPlatform }}</span>-->
<!--repoResponse.Report.Report &&-->
<!--repoResponse.Report.Report.Customer &&-->
<!--repoResponse.Report.Report.Customer.ReportItems &&-->
<!--repoResponse.Report.Report.Customer.ReportItems.length > 0">for {{ repoResponse.Report.Report.Customer.ReportItems[0].ItemPlatform }}</span>-->
</h3>
</div>
<div class="uk-width-1-5@m">
@ -306,6 +137,75 @@
</table>
</div>
<!--<div>-->
<!--<div>-->
<!--<div class="uk-overflow-auto uk-scrollspy-inview uk-animation-slide-top-medium uk-margin-top uk-margin-bottom">-->
<!--<table class="uk-table uk-table-middle uk-table-striped" style="vertical-align: top !important;">-->
<!--<thead>-->
<!--<tr>-->
<!--<th *ngIf="chosenReport !== 'RR1'">Title</th>-->
<!--<th *ngIf="chosenReport !== 'RR1'">Publisher</th>-->
<!--<th *ngIf="chosenReport === 'RR1'">Platform name</th>-->
<!--<th>{{ (chosenReport !== 'RR1') ? 'Item Urls' : 'Url' }}</th>-->
<!--<th>Type</th>-->
<!--<th colspan="2">Downloads/Views</th>-->
<!--</tr>-->
<!--</thead>-->
<!--<td colspan="6" *ngIf="infoMessage">{{ infoMessage }}</td>-->
<!--<tbody *ngFor="let item of repoResponse.Report.Report.Customer.ReportItems; let item_i = index"-->
<!--style="border-bottom: 1px solid whitesmoke;">-->
<!--<tr>-->
<!--<td *ngIf="chosenReport !== 'RR1'">{{ item.ItemName }}</td>-->
<!--<td *ngIf="chosenReport !== 'RR1'">{{ item.ItemPublisher }}</td>-->
<!--<td *ngIf="chosenReport === 'RR1'">{{ item.ItemPlatform }}</td>-->
<!--<td style="min-width: 300px;">-->
<!--<span *ngFor="let url of transformItem(item.ItemIdentifier); let i = index">-->
<!--<br *ngIf="i>0">{{ url }}-->
<!--</span>-->
<!--</td>-->
<!--<td>{{ item.ItemDataType }}</td>-->
<!--<td class="uk-text-center"-->
<!--*ngIf="repoResponse.ReportDefinition.Filters.ReportAttribute[0].Value === 'Monthly'" colspan="2">-->
<!--<a *ngIf="item.ItemPerformance && (item.ItemPerformance.length > 0)"-->
<!--(click)="displayItemPerformance(item_i)">{{ (selectedItemIndex === item_i) ? 'Hide' : 'See' }} results</a>-->
<!--</td>-->
<!--<td class="uk-text-center"-->
<!--*ngIf="repoResponse.ReportDefinition.Filters.ReportAttribute[0].Value === 'Totals'">-->
<!--{{ item.ItemPerformance[0].Instance[0].Count }}-->
<!--</td>-->
<!--<td class="uk-text-center"-->
<!--*ngIf="repoResponse.ReportDefinition.Filters.ReportAttribute[0].Value === 'Totals'">-->
<!--{{ item.ItemPerformance[0].Instance[1].Count }}-->
<!--</td>-->
<!--</tr>-->
<!--<tr *ngIf="(selectedItemIndex === item_i)">-->
<!--<td colspan="6">-->
<!--<div class="uk-animation-slide-top-medium uk-margin-small-top">-->
<!--<table class="uk-table uk-table-middle uk-table-striped innerTable">-->
<!--<tr>-->
<!--<th>Month</th>-->
<!--<th>Downloads</th>-->
<!--<th>Views</th>-->
<!--</tr>-->
<!--<tr *ngFor="let month of item.ItemPerformance">-->
<!--<td>{{ month.Period.Begin | date: "MMM yyyy" }}</td>-->
<!--<td>{{ month.Instance[0].Count }}</td>-->
<!--<td>{{ month.Instance[1].Count }}</td>-->
<!--</tr>-->
<!--</table>-->
<!--</div>-->
<!--</td>-->
<!--</tr>-->
<!--</tbody>-->
<!--</table>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!-- BOTTOM PAGINATION LINKS -->
<ul class="uk-pagination uk-margin-medium-top">
<li class="uk-pagination-previous"><a (click)="goToPreviousPage()"><i class="uk-icon-angle-left"></i><span class="uk-margin-left">Previous</span></a></li>
@ -533,7 +433,6 @@
<!--</div>-->
</div>
</ng-template>
<!-- RIGHT HELP CONTENT -->
<aside-help-content #rightHelperContent [position]="'right'"

View File

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

View File

@ -42,7 +42,7 @@
<div class="md-input-wrapper md-input-filled uk-margin-bottom">
<label>Release</label>
<input class="md-input label-fixed" type="text" value="{{release}}" disabled>
<input class="md-input label-fixed" type="text" value="4" disabled>
<span class="md-input-bar "></span>
</div>
@ -112,77 +112,17 @@
</div>
<div *ngIf="chosen_report != 'JR1' && chosen_report != 'RR1' && chosen_report != 'PR'
&& chosen_report != 'PR_P1' && chosen_report != 'DSR'">
<div *ngIf="chosen_report != 'JR1' && chosen_report != 'RR1'" class="">
<div class="md-input-wrapper md-input-filled uk-margin-bottom">
<label>Item Identifier</label>
<input class="md-input label-fixed" name="ItemIdentifier" placeholder="e.g. doi:10.xyz/12345"
<input class="md-input label-fixed" name="ItemIdentifier" placeholder="e.g. openaire:od_________::fb90de6f20d79783d05749d8f60417d5"
type="text" (blur)="updateItemIdentifier($event)">
<span class="md-input-bar "></span>
</div>
</div>
<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 *ngIf="chosen_report == 'IR1' || chosen_report == 'RR1' || chosen_report == 'JR1'">
<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>
@ -190,7 +130,7 @@
<div class="md-input-wrapper md-input-filled">
<label class="">Item Data Type</label>
<select class="md-input label-fixed" name="ItemDataType" (change)="updateItemDataType($event)">
<select class="md-input" name="ItemDataType" (change)="updateItemDataType($event)">
<!-- TODO: get the list from api if it becomes available -->
<option value="">--- Select Item Data Type ---</option>
<option value="Annotation">Annotation</option>

View File

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

View File

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

View File

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

View File

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

View File

@ -25,17 +25,17 @@ const repositoryRoutes: Routes = [
},
{
path: 'getImpact',
loadChildren: () => import('./metrics/metrics.module').then(m => m.MetricsModule),
loadChildren: './metrics/metrics.module#MetricsModule',
canActivate: [AuthGuardService]
},
{
path: 'aggregationHistory',
loadChildren: () => import('./aggregationhistory/compatibility-monitor.module').then(m => m.AggregationHistoryModule),
loadChildren: './aggregationhistory/compatibility-monitor.module#AggregationHistoryModule',
canActivate: [AuthGuardService]
},
{
path: 'events',
loadChildren: () => import('./events/events.module').then(m => m.EventsModule),
loadChildren: './events/events.module#EventsModule',
canActivate: [AuthGuardService]
},
{

View File

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

View File

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

View File

@ -3,24 +3,23 @@ import { CommonModule } from '@angular/common';
import { TabsModule } from 'ngx-bootstrap';
import { ReusableComponentsModule } from '../../shared/reusablecomponents/reusable-components.module';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { RepositoryComponent } from './repository.component';
import { RepositoryRoutingModule } from './repository-routing.module';
import { DashboardComponent } from './dashboard/dashboard.component';
import {AuthenticationInterceptor} from '../../services/authentication-interceptor';
import {UsagestatsService} from '../../services/usagestats.service';
import {RepositoryService} from '../../services/repository.service';
import {AuthGuardService} from '../../services/auth-guard.service';
import {ValidatorService} from '../../services/validator.service';
import {AuthenticationService} from '../../services/authentication.service';
import {MonitorService} from '../../services/monitor.service';
import {PiwikService} from '../../services/piwik.service';
import {StatisticsService} from '../../services/statistics.service';
import {BrokerService} from '../../services/broker.service';
import {DashboardService} from '../../services/dashboard.service';
import { SharedService } from '../../services/shared.service';
import { SourcesUpdateRepoComponent } from './update/sources-update-repo.component';
import { SourcesModule } from '../sources/sources.module';
import { UpdateRepoAdminsComponent } from './update/update-repo-admins.component';
import { RepositoryComponent } from "./repository.component";
import { RepositoryRoutingModule } from "./repository-routing.module";
import { DashboardComponent } from "./dashboard/dashboard.component";
import {AuthenticationInterceptor} from "../../services/authentication-interceptor";
import {UsagestatsService} from "../../services/usagestats.service";
import {RepositoryService} from "../../services/repository.service";
import {AuthGuardService} from "../../services/auth-guard.service";
import {ValidatorService} from "../../services/validator.service";
import {AuthenticationService} from "../../services/authentication.service";
import {MonitorService} from "../../services/monitor.service";
import {PiwikService} from "../../services/piwik.service";
import {StatisticsService} from "../../services/statistics.service";
import {BrokerService} from "../../services/broker.service";
import {DashboardService} from "../../services/dashboard.service";
import { SharedService } from "../../services/shared.service";
import { SourcesUpdateRepoComponent } from "./update/sources-update-repo.component";
import {SourcesModule} from '../sources/sources.module';
@NgModule ({
imports: [
@ -37,7 +36,6 @@ import { UpdateRepoAdminsComponent } from './update/update-repo-admins.component
RepositoryComponent,
DashboardComponent,
SourcesUpdateRepoComponent,
UpdateRepoAdminsComponent
// SourcesComponent,
// SourcesRegisterComponent,
// SourcesUpdateComponent,

View File

@ -43,23 +43,22 @@
<li class="uk-active" aria-expanded="true"><a href="#">Update Information</a></li>
<li aria-expanded="false" class=""><a href="#">Update Interfaces</a></li>
<li aria-expanded="false" class=""><a href="#">Update Admins</a></li>
<li aria-expanded="false" class=""><a href="#">Update Terms of Use</a></li>
<!-- <li aria-expanded="false" class=""><a href="#">Update Terms of Agreement</a></li>-->
</ul>
<ul id="tabs_anim4" class="uk-switcher uk-margin">
<li aria-hidden="false" class="uk-active" style="animation-duration: 200ms;">
<datasource-update-form #datasourceUpdateForm
[selectedRepo]="repo"
[mode]="this.mode"
[showButton]=true
(emittedUrl)="getNewLogoUrl($event)">
</datasource-update-form>
(emittedUrl)="getNewLogoUrl($event)"></datasource-update-form>
</li>
<li aria-hidden="true" style="animation-duration: 200ms;" class="">
<div *ngIf="repo && repoInterfaces && !loadingMessage" class="uk-grid uk-grid-match uk-margin-top" style="padding: 0px 3px 0px 3px;">
<div *ngFor="let inter of dataForInterfaceComp" class="uk-width-1-2@m uk-margin-bottom">
<div>
<div class="md-card" style="height: 100%">
<app-repository-interface-form #interfacesArray [data]="inter"
<app-repository-interface-form #interfacesArray
[data]="inter"
(emitDeleteInterface)="removeInterfaceFromList($event)">
</app-repository-interface-form>
</div>
@ -85,7 +84,51 @@
</div>
</li>
<li>
<app-update-repo-admins [repo]="repo"></app-update-repo-admins>
<div class="uk-margin-small-top">
<div>This is a mock representation of the update admins functionality coming soon..</div>
<div class="uk-margin-top">
<div class="uk-flex uk-flex-right@m uk-flex-right@l">
<a class="uk-button uk-button-primary action uk-flex uk-flex-middle">
<!--<i class="md-icon material-icons">clear</i>-->
<span class="uk-margin-small-left">Invite admin</span>
</a>
</div>
</div>
<div class="uk-margin-medium-top">
<div class="uk-grid uk-grid-divider uk-flex uk-flex-middle" uk-grid="">
<div class="uk-width-3-4@l uk-width-1-2@m uk-first-column">
<div class="">
<span class="uk-text-muted">Email: </span>
<span class="uk-text-bold">admin1@gmail.com</span>
</div>
</div>
<div class="uk-width-expand">
<div class="uk-flex uk-flex-center">
<a class="uk-button uk-button-default action uk-flex uk-flex-middle">
<i class="md-icon material-icons">clear</i>
<span class="uk-margin-small-left">Remove</span>
</a>
</div>
</div>
</div>
<div class="uk-grid uk-grid-divider uk-flex uk-flex-middle" uk-grid="">
<div class="uk-width-3-4@l uk-width-1-2@m uk-first-column">
<div class="">
<span class="uk-text-muted">Email: </span>
<span class="uk-text-bold">admin2@gmail.com</span>
</div>
</div>
<div class="uk-width-expand">
<div class="uk-flex uk-flex-center">
<a class="uk-button uk-button-default action uk-flex uk-flex-middle">
<i class="md-icon material-icons">clear</i>
<span class="uk-margin-small-left">Remove</span>
</a>
</div>
</div>
</div>
</div>
</div>
</li>
<li class="el-item">
<div>

View File

@ -1,16 +1,16 @@
import {Component, OnInit, QueryList, ViewChild, ViewChildren} from '@angular/core';
import {FormBuilder, FormGroup} from '@angular/forms';
import {Repository, RepositoryInterface} from '../../../domain/typeScriptClasses';
import {RepositoryService} from '../../../services/repository.service';
import {ActivatedRoute, Router} from '@angular/router';
import {loadingRepoError} from '../../../domain/shared-messages';
import {DatasourceUpdateFormComponent} from '../../../shared/reusablecomponents/sources-forms/datasource-update-form.component';
import {ConfirmationDialogComponent} from '../../../shared/reusablecomponents/confirmation-dialog.component';
import {AuthenticationService} from '../../../services/authentication.service';
import {DatasourceNewInterfaceFormComponent} from '../../../shared/reusablecomponents/sources-forms/datasource-new-interface-form.component';
import {SharedService} from '../../../services/shared.service';
import { Component, OnInit, QueryList, ViewChild, ViewChildren } from '@angular/core';
import { FormBuilder, FormGroup } from '@angular/forms';
import { Repository, RepositoryInterface } from '../../../domain/typeScriptClasses';
import { RepositoryService } from '../../../services/repository.service';
import { ActivatedRoute, Router } from '@angular/router';
import { formInfoLoading, loadingRepoError } from '../../../domain/shared-messages';
import { DatasourceUpdateFormComponent } from '../../../shared/reusablecomponents/sources-forms/datasource-update-form.component';
import { ConfirmationDialogComponent } from '../../../shared/reusablecomponents/confirmation-dialog.component';
import { AuthenticationService } from '../../../services/authentication.service';
import { DatasourceNewInterfaceFormComponent } from '../../../shared/reusablecomponents/sources-forms/datasource-new-interface-form.component';
import {SharedService} from "../../../services/shared.service";
@Component({
@Component ({
selector: 'sources-update-repo',
templateUrl: 'sources-update-repo.component.html',
})
@ -22,7 +22,6 @@ export class SourcesUpdateRepoComponent implements OnInit {
// repoId: string;
logoURL: string;
repo: Repository;
mode: string = null;
repoInterfaces: RepositoryInterface[] = [];
@ViewChild('datasourceUpdateForm') datasourceUpdateForm: DatasourceUpdateFormComponent;
@ -33,35 +32,23 @@ export class SourcesUpdateRepoComponent implements OnInit {
dataForInterfaceComp: any[] = [];
isModalShown: boolean;
@ViewChild('updateLogoUrlModal', {static: true})
@ViewChild('updateLogoUrlModal')
public updateLogoUrlModal: ConfirmationDialogComponent;
constructor(private fb: FormBuilder,
private repoService: RepositoryService,
private authService: AuthenticationService,
private route: ActivatedRoute,
private sharedService: SharedService,
private router: Router) {
}
constructor ( private fb: FormBuilder,
private repoService: RepositoryService,
private authService: AuthenticationService,
private route: ActivatedRoute,
private sharedService: SharedService,
private router: Router) { }
@ViewChild('updateTermsForm') updateTermsForm: DatasourceUpdateFormComponent;
@ViewChild('updateTermsForm')
ngOnInit() {
if (this.sharedService.getRepository()) {
if(this.sharedService.getRepository()) {
this.repo = this.sharedService.getRepository();
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.logoURL = this.repo.logoUrl;
this.getRepoInterfaces();
}
@ -69,18 +56,18 @@ export class SourcesUpdateRepoComponent implements OnInit {
r => {
this.repo = r;
if (this.repo) {
this.logoURL = this.repo.logourl;
this.logoURL = this.repo.logoUrl;
this.getRepoInterfaces();
}
}
);
// this.readRepoId();
const body = document.getElementsByTagName('body')[0];
body.classList.remove('top_bar_active'); // remove the class
body.classList.remove('page_heading_active');
body.classList.remove('landing');
body.classList.add('dashboard');
let body = document.getElementsByTagName('body')[0];
body.classList.remove("top_bar_active"); //remove the class
body.classList.remove("page_heading_active");
body.classList.remove("landing");
body.classList.add("dashboard");
}
// readRepoId() {
@ -113,7 +100,7 @@ export class SourcesUpdateRepoComponent implements OnInit {
this.group = this.fb.group({});
this.repoService.getRepositoryInterface(this.repo.id).subscribe(
interfaces => {
this.repoInterfaces = interfaces.sort(function (a, b) {
this.repoInterfaces = interfaces.sort( function(a, b) {
if (a.id < b.id) {
return -1;
} else if (a.id > b.id) {
@ -143,11 +130,10 @@ export class SourcesUpdateRepoComponent implements OnInit {
for (let i = 0; i < this.repoInterfaces.length; i++) {
this.dataForInterfaceComp.push([
false, i,
{
id: this.repo.id,
datasourceType: this.repo.eoscDatasourceType,
datasourceClass: this.repo.eoscDatasourceType,
registeredBy: this.repo.registeredby
{ id: this.repo.id,
datasourceType: this.repo.datasourceType,
datasourceClass: this.repo.datasourceClass,
registeredBy: this.repo.registeredBy
},
this.repoInterfaces[i]
]);
@ -155,11 +141,10 @@ export class SourcesUpdateRepoComponent implements OnInit {
} else {
this.dataForInterfaceComp.push([
false, 0,
{
id: this.repo.id,
datasourceType: this.repo.eoscDatasourceType,
datasourceClass: this.repo.eoscDatasourceType,
registeredBy: this.repo.registeredby
{ id: this.repo.id,
datasourceType: this.repo.datasourceType,
datasourceClass: this.repo.datasourceClass,
registeredBy: this.repo.registeredBy
}
]);
}
@ -167,10 +152,8 @@ export class SourcesUpdateRepoComponent implements OnInit {
addInterfaceToList(intrf?: RepositoryInterface) {
const curIndex = this.dataForInterfaceComp.length;
const curRepoInfo = {
id: this.repo.id, datasourceType: this.repo.eoscDatasourceType,
datasourceClass: this.repo.eoscDatasourceType, registeredBy: this.repo.registeredby
};
const curRepoInfo = { id: this.repo.id, datasourceType: this.repo.datasourceType,
datasourceClass: this.repo.datasourceClass, registeredBy: this.repo.registeredBy };
if (intrf) {
this.dataForInterfaceComp.push([false, curIndex, curRepoInfo, intrf]);
} else {
@ -204,13 +187,13 @@ export class SourcesUpdateRepoComponent implements OnInit {
}
updatedLogoUrl(event: any) {
this.repo.logourl = this.logoURL;
this.repo.logoUrl = this.logoURL;
this.datasourceUpdateForm.updateGroup.get('logoUrl').setValue(this.logoURL);
this.datasourceUpdateForm.updateRepo();
}
getNewLogoUrl(event: any) {
getNewLogoUrl( event: any ) {
this.logoURL = event.target.value;
}

View File

@ -1,122 +0,0 @@
<div class="uk-margin-small-top">
<div>Update the users who can access the dashboard to manage the datasource.</div>
<div *ngIf="errorMessage" class="uk-alert uk-alert-danger">{{errorMessage}}</div>
<div *ngIf="loadingMessage" class="loading-medium">
<div class="loader-small" style="text-align: center; padding-top: 170px; color: rgb(47, 64, 80); font-weight: bold;">
{{ loadingMessage }}
</div>
<div class="whiteFilm"></div>
</div>
<div *ngIf="!loadingMessage" >
<div class="uk-margin-top">
<div class="uk-flex uk-flex-right@m uk-flex-right@l">
<a class="uk-button uk-button-primary action uk-flex uk-flex-middle" (click)="showAddRepoAdminModal()">
<!--<i class="md-icon material-icons">clear</i>-->
<span class="uk-margin-small-left">Invite admin</span>
</a>
</div>
</div>
<div class="uk-margin-medium-top">
<div *ngFor="let repoAdmin of repoAdmins" class="uk-grid uk-grid-divider uk-flex uk-flex-middle" uk-grid="">
<div class="uk-width-3-4@l uk-width-1-2@m uk-first-column">
<div class="">
<span class="uk-text-muted">Email: </span>
<span class="uk-text-bold">{{repoAdmin.email}}</span>
</div>
</div>
<div class="uk-width-expand">
<div class="uk-flex uk-flex-center">
<a class="uk-button uk-button-default action uk-flex uk-flex-middle" (click)="showDeletionModal(repoAdmin)">
<i class="md-icon material-icons">clear</i>
<span class="uk-margin-small-left">Remove</span>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
<confirmation-dialog #deleteRepositoryAdminModal [title]="'Remove datasource admin'" [isModalShown]="isDeleteModalShown"
[confirmButNotCloseButton]="'Remove'" (emitObject)="deleteRepoAdmin($event)" (clearAll)="clearModal()">
<div *ngIf="modalErrorMessage" class="uk-alert uk-alert-danger">{{modalErrorMessage}}</div>
<div *ngIf="modalLoadingMessage" class="loading-small">
<div class="loader-small" style="text-align: center; padding-top: 170px; color: rgb(47, 64, 80); font-weight: bold;">
{{ modalLoadingMessage }}
</div>
<div class="whiteFilm"></div>
</div>
<div *ngIf="selectedAdminForDelete">
<h6>Are you sure you want to remove this user admin?</h6>
<pre>
<ng-container *ngIf="selectedAdminForDelete.firstName || selectedAdminForDelete.lastName">
{{selectedAdminForDelete.firstName}} {{selectedAdminForDelete.lastName}}
</ng-container>
{{ selectedAdminForDelete.email }}
</pre>
</div>
</confirmation-dialog>
<confirmation-dialog #addRepositoryAdminModal [title]="'Add new datasource admin'" [isModalShown]="isAddModalShown"
[confirmButNotCloseButton]="'Submit'" (emitObject)="addRepositoryAdmin()" (clearAll)="clearModal()">
<div *ngIf="modalErrorMessage" class="uk-alert uk-alert-danger">{{modalErrorMessage}}</div>
<div *ngIf="modalLoadingMessage" class="loading-small">
<div class="loader-small" style="text-align: center; padding-top: 170px; color: rgb(47, 64, 80); font-weight: bold;">
{{ modalLoadingMessage }}
</div>
<div class="whiteFilm"></div>
</div>
<h6>Add the email address of the new user admin. Make sure the user already has an OpenAIRE account with this email address.</h6>
<form>
<div class="uk-margin">
<input class="uk-input" placeholder="Enter email..." [formControl]="emailControl">
</div>
</form>
</confirmation-dialog>
<!--<div id="addAdminModal" uk-modal>-->
<!--<div class="uk-modal-dialog" style="top: 95.5px;">-->
<!--<div class="uk-modal-header">-->
<!--<h3 class="uk-modal-title">Adding a new repository admin for this repository</h3>-->
<!--</div>-->
<!--<div class="uk-modal-body">-->
<!--<p>Lorem ipsum.....</p>-->
<!--</div>-->
<!--<div class="uk-modal-footer uk-text-right">-->
<!--<button type="button" class="md-btn md-btn-flat uk-modal-close">Cancel</button>-->
<!--<button (click)="addRepositoryAdmin()" type="button" class="md-btn md-btn-flat md-btn-flat-primary">Add admin</button>-->
<!--</div>-->
<!--</div>-->
<!--&lt;!&ndash;<div *ngIf="!loadingMessage" class="uk-modal-dialog uk-modal-body">&ndash;&gt;-->
<!--&lt;!&ndash;<div *ngIf="selectedAdminForDelete">&ndash;&gt;-->
<!--&lt;!&ndash;<h6>Are you sure you want to delete {{ selectedAdminForDelete.email }} from the list of repository admins?</h6>&ndash;&gt;-->
<!--&lt;!&ndash;&lt;!&ndash;<p>Deleting a {{serviceORresource}} is an irreversible action.</p>&ndash;&gt;&ndash;&gt;-->
<!--&lt;!&ndash;</div>&ndash;&gt;-->
<!--&lt;!&ndash;<button class="uk-button uk-button-danger uk-modal-close" type="button" (click)="deleteRepoAdmin(selectedAdminForDelete.email)">Delete</button>&ndash;&gt;-->
<!--&lt;!&ndash;<button class="uk-button uk-button-primary uk-modal-close" type="button" (click)="closeDeletionModal()">Cancel</button>&ndash;&gt;-->
<!--&lt;!&ndash;</div>&ndash;&gt;-->
<!--&lt;!&ndash;<div *ngIf="loadingMessage">&ndash;&gt;-->
<!--&lt;!&ndash;<div class="loader-small" style="text-align: center; padding-top: 170px; color: rgb(47, 64, 80); font-weight: bold;">&ndash;&gt;-->
<!--&lt;!&ndash;{{ loadingMessage }}&ndash;&gt;-->
<!--&lt;!&ndash;</div>&ndash;&gt;-->
<!--&lt;!&ndash;&lt;!&ndash; <div class="whiteFilm"></div>&ndash;&gt;&ndash;&gt;-->
<!--&lt;!&ndash;</div>&ndash;&gt;-->
<!--</div>-->

View File

@ -1,146 +0,0 @@
import {Component, Input, OnChanges, SimpleChanges, ViewChild} from '@angular/core';
import { Repository, User } from '../../../domain/typeScriptClasses';
import { RepositoryService } from '../../../services/repository.service';
import {loadingRepoMessage} from '../../../domain/shared-messages';
import {ConfirmationDialogComponent} from '../../../shared/reusablecomponents/confirmation-dialog.component';
import {FormControl} from '@angular/forms';
declare var UIkit: any;
@Component ({
selector: 'app-update-repo-admins',
templateUrl: 'update-repo-admins.component.html',
})
export class UpdateRepoAdminsComponent implements OnChanges {
@Input() repo: Repository;
loadingMessage: string;
errorMessage: string;
repoAdmins: User[];
selectedAdminForDelete: User;
isDeleteModalShown: boolean;
@ViewChild('deleteRepositoryAdminModal', { static: true })
public deleteRepositoryAdminModal: ConfirmationDialogComponent;
isAddModalShown: boolean;
@ViewChild('addRepositoryAdminModal', { static: true })
public addRepositoryAdminModal: ConfirmationDialogComponent;
modalErrorMessage: string;
modalLoadingMessage: string;
emailControl = new FormControl();
constructor (private repoService: RepositoryService) { }
ngOnChanges(changes: SimpleChanges): void {
this.getRepositoryAdmins();
}
getRepositoryAdmins() {
this.loadingMessage = 'Retrieving repository\'s admins...';
this.repoService.getRepositoryAdmins(this.repo.id).subscribe(
users => {
this.repoAdmins = users;
},
error => {
console.log(error);
this.loadingMessage = '';
this.errorMessage = 'Error retrieving the repository\'s admins';
},
() => {
this.loadingMessage = '';
}
);
}
showDeletionModal(repoAdmin: User) {
this.errorMessage = '';
this.loadingMessage = '';
this.selectedAdminForDelete = repoAdmin;
if (this.selectedAdminForDelete) {
this.deleteRepositoryAdminModal.showModal();
// UIkit.modal('#deletionModal').show();
}
}
clearModal() {
this.selectedAdminForDelete = null;
this.modalErrorMessage = null;
}
deleteRepoAdmin(event: any) {
console.log('deleting: ', this.selectedAdminForDelete.email);
// this.deleteRepositoryAdminModal.hideModal();
this.modalLoadingMessage = 'Deleting admin...';
this.repoService.deleteRepositoryAdmin(this.repo.id, this.selectedAdminForDelete.email).subscribe(
res => {
this.selectedAdminForDelete = null;
this.deleteRepositoryAdminModal.hideModal();
this.getRepositoryAdmins();
},
error => {
console.log('Error deleting repository\'s admins', error);
this.modalLoadingMessage = '';
this.modalErrorMessage = 'Error deleting admin';
},
() => {
this.modalLoadingMessage = '';
// this.deleteRepositoryAdminModal.hideModal();
}
);
}
showAddRepoAdminModal() {
this.emailControl.reset();
this.modalErrorMessage = '';
this.modalLoadingMessage = '';
this.addRepositoryAdminModal.showModal();
// UIkit.modal('#addAdminModal').show();
}
addRepositoryAdmin() {
this.modalLoadingMessage = 'Adding repository admin';
console.log('Adding repository admin..', this.emailControl.value);
this.repoService.addRepositoryAdmin(this.repo.id, this.emailControl.value).subscribe(
res => {
this.addRepositoryAdminModal.hideModal();
this.getRepositoryAdmins();
}, error => {
console.log('Error adding repository admin', error);
this.modalLoadingMessage = '';
if (error.status === 404) {
this.modalErrorMessage = 'This email address is not associated with an OpenAIRE user account.\n' +
'Please make sure the user has an OpenAIRE account and then try again.';
} else {
this.modalErrorMessage = 'Error adding the new admin, please try again. If the error persists, ' +
'please contact helpdesk@openaire.eu';
}
},
() => {
this.modalLoadingMessage = '';
}
);
// UIkit.modal('#addAdminModal').hide();
}
}

View File

@ -22,21 +22,45 @@
<div class="uk-row-first">
<div class="uk-text-center md-card md-card-default md-card-hover uk-scrollspy-inview uk-animation-slide-top-medium
datasourceTypeCard uk-inline-clip uk-transition-toggle" uk-scrollspy-class="" tabindex="0">
<a [routerLink]="['repository']" [queryParams]="{ step: 'selectDatasource' }" class="el-link uk-position-cover uk-margin-remove-adjacent"></a>
<a [routerLink]="['literature']" [queryParams]="{ step: 'selectDatasource' }" class="el-link uk-position-cover uk-margin-remove-adjacent"></a>
<div class="md-card-content large-padding uk-margin-medium-top uk-margin-bottom">
<div class="">
<img class="el-image" src="../../../assets/imgs/datasourcetypes/Literature%20repository.svg" alt="" width="51">
<img class="el-image" src="../../../assets/imgs/datasourcetypes/Asset%203.svg" alt="" width="51">
</div>
<h3>Repository</h3>
<div class="uk-transition-slide-bottom uk-position-bottom uk-overlay uk-overlay-primary" (click)="goTo('repository')" style="cursor: pointer">
<p class="uk-margin-remove">Make sure your repository is already registered in one of the following global registries -
<a href="https://v2.sherpa.ac.uk/opendoar/">OpenDOAR<i class="fas fa-external-link-alt" style="margin-left: 3px !important;"></i></a>,
<a href="http://www.re3data.org/">Re3data<i class="fas fa-external-link-alt" style="margin-left: 3px !important;"></i></a> or
<a href="https://fairsharing.org/search?fairsharingRegistry=Database">FAIRsharing<i class="fas fa-external-link-alt" style="margin-left: 3px !important;"></i></a>
and is compatible with the
<a href="https://guidelines.openaire.eu/en/latest/">OpenAIRE Guidelines<i class="fas fa-external-link-alt" style="margin-left: 3px !important;"></i></a>.
<br>For any questions please contact the <a href="mailto:helpdesk@openaire.eu" target="_blank">OpenAIRE helpdesk.<i class="fas fa-external-link-alt" style="margin-left: 3px !important;"></i></a>
</p>
<h3>Literature repository</h3>
<!--<a [routerLink]="['literature']" [queryParams]="{ step: 'selectDatasource' }" class="el-link uk-position-cover uk-margin-remove-adjacent"></a>-->
<div class="uk-transition-slide-bottom uk-position-bottom uk-overlay uk-overlay-primary" (click)="goTo('literature')" style="cursor: pointer">
<p class="uk-margin-remove">Make sure your repository is already registered in OpenDOAR, the authoritative
directory of institutional and thematic OA repositories, and is compatible with the OpenAIRE Guidelines for Literature Repositories.</p>
<a href="http://v2.sherpa.ac.uk/opendoar/" target="_blank">
List provided by
<br>
OpenDOAR<i class="fas fa-external-link-alt" style="margin-left: 3px !important;"></i>
</a>
</div>
</div>
</div>
</div>
<div class="">
<div class="uk-text-center md-card md-card-default md-card-hover uk-scrollspy-inview uk-animation-slide-top-medium
datasourceTypeCard uk-inline-clip uk-transition-toggle" uk-scrollspy-class="" tabindex="0">
<a [routerLink]="['data']" [queryParams]="{ step: 'selectDatasource' }" class="el-link uk-position-cover uk-margin-remove-adjacent"></a>
<div class="md-card-content large-padding uk-margin-medium-top uk-margin-bottom">
<div class="">
<img class="el-image" src="../../../assets/imgs/datasourcetypes/Asset%202.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>
@ -48,7 +72,7 @@
<a [routerLink]="['journal']" [queryParams]="{ step: 'basicInformation' }" 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/Journal.svg" alt="" width="37">
<img class="el-image" src="../../../assets/imgs/datasourcetypes/Asset%208.svg" alt="" width="37">
</div>
<h3>Journal</h3>
<div class="uk-transition-slide-bottom uk-position-bottom uk-overlay uk-overlay-primary" (click)="goTo('journal')" style="cursor: pointer">
@ -61,13 +85,17 @@
</div>
</div>
</div>
<div class="uk-margin uk-grid uk-grid-match uk-grid-medium repositoryTypeSelection uk-child-width-1-3@l uk-child-widht-1-3@m" uk-grid="">
<div class="uk-row-first">
<div class="uk-text-center md-card md-card-default md-card-hover uk-scrollspy-inview uk-animation-slide-top-medium
datasourceTypeCard uk-inline-clip uk-transition-toggle" uk-scrollspy-class="" tabindex="0">
<a [routerLink]="['aggregator']" [queryParams]="{ step: 'basicInformation' }" 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/Aggregator.svg" alt="" width="50">
<img class="el-image" src="../../../assets/imgs/datasourcetypes/Asset%204.svg" alt="" width="50">
</div>
<h3>Aggregator</h3>
<div class="uk-transition-slide-bottom uk-position-bottom uk-overlay uk-overlay-primary" (click)="goTo('aggregator')" style="cursor: pointer">
@ -82,31 +110,6 @@
</div>
<div class="uk-margin uk-grid uk-grid-match uk-grid-medium repositoryTypeSelection uk-child-width-1-3@l uk-child-widht-1-3@m" uk-grid="">
<div class="">
<div class="uk-text-center md-card md-card-default md-card-hover uk-scrollspy-inview uk-animation-slide-top-medium
datasourceTypeCard uk-inline-clip uk-transition-toggle" uk-scrollspy-class="" tabindex="0">
<a [routerLink]="['cris']" [queryParams]="{ step: 'selectDatasource' }" class="el-link uk-position-cover uk-margin-remove-adjacent"></a>
<div class="md-card-content large-padding uk-margin-medium-top uk-margin-bottom">
<div class="">
<img class="el-image" src="../../../assets/imgs/datasourcetypes/Cris.svg" alt="" width="50">
</div>
<h3>CRIS systems</h3>
<div class="uk-transition-slide-bottom uk-position-bottom uk-overlay uk-overlay-primary" (click)="goTo('cris')" style="cursor: pointer">
<p class="uk-margin-remove">Please make sure your CRIS is registered in DRIS the Directory of Research
Information Systems, and is compatible with the OpenAIRE Guidelines for CRIS Managers.
<a href="https://dspacecris.eurocris.org/cris/explore/dris" target="_blank">
List provided by DRIS.<i class="fas fa-external-link-alt" style="margin-left: 3px !important;"></i>
</a>
</p>
</div>
</div>
</div>
</div>
</div>
<hr style="border-top: 1px solid #dedede; margin-top: 40px; margin-bottom: 30px;">
<h2 class="heading_b uk-margin-bottom">Coming soon</h2>
@ -119,7 +122,24 @@
<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/Software.svg" alt="" width="51">
<img class="el-image" src="../../../assets/imgs/datasourcetypes/Asset%201.svg" alt="" width="50">
</div>
<h3>CRIS systems</h3>
<div class="uk-transition-slide-bottom uk-position-bottom uk-overlay uk-overlay-primary">
<p class="uk-margin-remove">Stay tuned.</p>
</div>
</div>
<div class="whiteFilm"></div>
</div>
</div>
<div class="">
<div class="uk-text-center md-card md-card-default md-card-hover uk-scrollspy-inview uk-animation-slide-top-medium
datasourceTypeCard uk-inline-clip uk-transition-toggle" uk-scrollspy-class="" tabindex="0">
<a class="el-link uk-position-cover uk-margin-remove-adjacent uk-disabled"></a>
<div class="md-card-content large-padding uk-margin-medium-top uk-margin-bottom">
<div class="">
<img class="el-image" src="../../../assets/imgs/datasourcetypes/Asset%207.svg" alt="" width="51">
</div>
<h3>Software</h3>
<div class="uk-transition-slide-bottom uk-position-bottom uk-overlay uk-overlay-primary">
@ -136,7 +156,7 @@
<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/Catch-all.svg" alt="" width="47">
<img class="el-image" src="../../../assets/imgs/datasourcetypes/Asset%206.svg" alt="" width="47">
</div>
<h3>Catch-all</h3>
<div class="uk-transition-slide-bottom uk-position-bottom uk-overlay uk-overlay-primary">
@ -147,28 +167,26 @@
</div>
</div>
<div class="">
<div class="uk-text-center md-card md-card-default md-card-hover uk-scrollspy-inview uk-animation-slide-top-medium
datasourceTypeCard uk-inline-clip uk-transition-toggle" uk-scrollspy-class="" tabindex="0">
<a class="el-link uk-position-cover uk-margin-remove-adjacent uk-disabled"></a>
<div class="md-card-content large-padding uk-margin-medium-top uk-margin-bottom">
<div class="">
<img class="el-image" src="../../../assets/imgs/datasourcetypes/Other.svg" alt="" width="50">
</div>
<h3>Other sources</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>
<div class="uk-margin uk-grid uk-grid-match uk-grid-medium repositoryTypeSelection uk-child-width-1-3@l uk-child-widht-1-3@m" uk-grid="">
<div class="uk-row-first">
<div class="uk-text-center md-card md-card-default md-card-hover uk-scrollspy-inview uk-animation-slide-top-medium
datasourceTypeCard uk-inline-clip uk-transition-toggle" uk-scrollspy-class="" tabindex="0">
<a class="el-link uk-position-cover uk-margin-remove-adjacent uk-disabled"></a>
<div class="md-card-content large-padding uk-margin-medium-top uk-margin-bottom">
<div class="">
<img class="el-image" src="../../../assets/imgs/datasourcetypes/Asset%205.svg" alt="" width="50">
</div>
<h3>Other sources</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>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -10,9 +10,9 @@ import {
Country, MetricsInfo,
Repository,
RepositoryInterface,
RepositorySnippet, RepositorySummaryInfo, TermsOfUse,
RepositorySnippet, RepositorySummaryInfo,
Timezone,
Typology, User
Typology
} from '../domain/typeScriptClasses';
import { Observable, of } from 'rxjs';
import { timezones } from '../domain/timezones';
@ -28,34 +28,20 @@ const headerOptions = {
@Injectable ()
export class RepositoryService {
private apiUrl = environment.API_ENDPOINT + '/repositories/';
private apiUrl = environment.API_ENDPOINT + '/repository/';
private dashboardAPIUrl = environment.API_ENDPOINT + '/dashboard/';
constructor(private httpClient: HttpClient) { }
addInterface(datatype: string, repoId: string, registeredBy: string, comment: string,
newInterface: RepositoryInterface, desiredCompatibilityLevel: string): Observable<RepositoryInterface> {
let url;
comment = newInterface.comments; // temp fix for emailing comment
if (comment == null || comment === '') {
url = `${this.apiUrl}addInterface?datatype=${datatype}&repoId=${repoId}&registeredBy=${registeredBy}&desiredCompatibilityLevel=${desiredCompatibilityLevel}`;
} else {
url = `${this.apiUrl}addInterface?datatype=${datatype}&repoId=${repoId}&registeredBy=${registeredBy}&comment=${comment}&desiredCompatibilityLevel=${desiredCompatibilityLevel}`;
}
addInterface(datatype: string, repoId: string, registeredBy: string, comment: string, newInterface: RepositoryInterface): Observable<RepositoryInterface> {
const url = `${this.apiUrl}addInterface?datatype=${datatype}&repoId=${repoId}&registeredBy=${registeredBy}&comment=${comment}`;
console.log(`knocking on: ${url}`);
console.log(`sending ${JSON.stringify(newInterface)}`);
return this.httpClient.post<RepositoryInterface>(url, newInterface, headerOptions);
}
updateInterface(repoId: string, registeredBy: string, comment: string, interfaceInfo: RepositoryInterface,
desiredCompatibilityLevel?: string): Observable<RepositoryInterface> {
let url;
comment = interfaceInfo.comments; // temp fix for emailing comment
if (comment == null || comment === '') {
url = `${this.apiUrl}updateRepositoryInterface?repoId=${repoId}&registeredBy=${registeredBy}&desiredCompatibilityLevel=${desiredCompatibilityLevel}`;
} else {
url = `${this.apiUrl}updateRepositoryInterface?repoId=${repoId}&registeredBy=${registeredBy}&comment=${comment}&desiredCompatibilityLevel=${desiredCompatibilityLevel}`;
}
updateInterface(repoId: string, registeredBy: string, comment: string, interfaceInfo: RepositoryInterface): Observable<RepositoryInterface> {
const url = `${this.apiUrl}updateRepositoryInterface?repoId=${repoId}&registeredBy=${registeredBy}&comment=${comment}`;
console.log(`knocking on: ${url}`);
console.log(`sending ${JSON.stringify(interfaceInfo)}`);
return this.httpClient.post<RepositoryInterface>(url, interfaceInfo, headerOptions);
@ -68,10 +54,6 @@ export class RepositoryService {
return this.httpClient.delete(url, {withCredentials: true, responseType: 'text'});
}
getInterfaceDesiredCompatibilityLevel(repoId: string, interfaceId: string) {
return this.httpClient.get(environment.API_ENDPOINT + `/compliance/${repoId}/${interfaceId}`);
}
addRepository(datatype: string, newRepository: Repository): Observable<Repository> {
const url = `${this.apiUrl}addRepository?datatype=${datatype}`;
console.log(`knocking on: ${url}`);
@ -93,27 +75,21 @@ export class RepositoryService {
return this.httpClient.post<Repository>(url, repoInfo, headerOptions);
}
updateRepositoriesTerms(termsList: any): Observable<TermsOfUse> {
const url = `${this.apiUrl}terms`;
console.log(`knocking on: ${url}`);
console.log(`sending ${JSON.stringify(termsList)}`);
return this.httpClient.post<TermsOfUse>(url, termsList, headerOptions);
}
getRepositoriesOfCountry(country: string, mode: string): Observable<RepositorySnippet[]> {
const url = `${this.apiUrl}getRepositoriesByCountry/${country}/${mode}`;
console.log(`knocking on: ${url}`);
return this.httpClient.get<RepositorySnippet[]>(url, headerOptions);
}
getRepositoriesSnippetsOfUser(): Observable<RepositorySnippet[]> {
const url = `${this.apiUrl}snippets/user`;
getRepositoriesOfUser(): Observable<RepositorySnippet[]> {
const url = `${this.apiUrl}getRepositoriesOfUser/0/100`;
console.log(`knocking on: ${url}`);
return this.httpClient.get<RepositorySnippet[]>(url, headerOptions);
}
getRepositoryById(id: string): Observable<Repository> {
const url = `${this.apiUrl}getRepositoryById/${id}`;
const url = `${this.apiUrl}getRepositoryById/${id}`;
console.log(`knocking on: ${url}`);
return this.httpClient.get<Repository>(url, headerOptions);
}
@ -124,6 +100,7 @@ export class RepositoryService {
return this.httpClient.get<RepositoryInterface[]>(url, headerOptions);
}
getUrlsOfUserRepos(): Observable<string[]> {
const url = `${this.apiUrl}getUrlsOfUserRepos/0/100/`;
console.log(`knocking on: ${url}`);
@ -157,7 +134,7 @@ export class RepositoryService {
}
getCountries(): Observable<Country[]> {
const url = `${this.apiUrl}countries`;
const url = `${this.apiUrl}getCountries`;
console.log(`knocking on: ${url}`);
return this.httpClient.get<Country[]>(url, headerOptions);
}
@ -169,7 +146,7 @@ export class RepositoryService {
return this.httpClient.get<Map<string, string>>(url, headerOptions);
}
getDatasourceClasses(mode: string): Observable<Object> {
getDatasourceClasses(mode: string): Observable<Map<string, string>> {
const url = `${this.apiUrl}getDatasourceClasses/${mode}`;
console.log(`knocking on: ${url}`);
return this.httpClient.get<Map<string, string>>(url, headerOptions);
@ -206,22 +183,4 @@ export class RepositoryService {
console.log(`knocking on: ${url}`);
return this.httpClient.get<RepositorySummaryInfo[]>(url, headerOptions);
}
getRepositoryAdmins(repoId: string): Observable<User[]> {
const url = `${this.apiUrl}${repoId}/admins`;
console.log(`knocking on: ${url}`);
return this.httpClient.get<User[]>(url, headerOptions);
}
deleteRepositoryAdmin(repoId: string, repoAdminEmail: string) {
const url = `${this.apiUrl}${repoId}/admins/${repoAdminEmail}`;
console.log(`knocking on: ${url}`);
return this.httpClient.delete(url, headerOptions);
}
addRepositoryAdmin(repoId: string, repoAdminEmail: string) {
const url = `${this.apiUrl}${repoId}/admins`;
return this.httpClient.post<string>(url, repoAdminEmail, headerOptions);
}
}

View File

@ -1,6 +1,6 @@
import {Injectable} from '@angular/core';
import {Repository, RepositorySnippet} from '../domain/typeScriptClasses';
import {Subject} from 'rxjs/internal/Subject';
import { Injectable } from "@angular/core";
import { Repository, RepositorySnippet } from "../domain/typeScriptClasses";
import { Subject } from "rxjs/internal/Subject";
@Injectable()
export class SharedService {
@ -12,6 +12,7 @@ export class SharedService {
private repositoriesOfUser: Subject<RepositorySnippet[]> = new Subject<RepositorySnippet[]>();
get repository$() {
return this.repository.asObservable();
}
@ -20,7 +21,7 @@ export class SharedService {
return this.repositoryCopy;
}
setRepository(data: Repository) {
setRepository(data:Repository) {
this.repository.next(data);
this.repositoryCopy = data;
}

View File

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

View File

@ -31,7 +31,6 @@
<div class="uk-modal-footer uk-text-right">
<button (click)="hideModal()" type="button" class="md-btn md-btn-flat uk-modal-close">{{ hideModalButton }}</button>
<button *ngIf="confirmActionButton" (click)="confirmedAction()" type="button" class="md-btn md-btn-flat md-btn-flat-primary">{{confirmActionButton}}</button>
<button *ngIf="confirmButNotCloseButton" (click)="confirmedButNotCloseAction()" type="button" class="md-btn md-btn-flat md-btn-flat-primary">{{confirmButNotCloseButton}}</button>
</div>
</div>
</div>

View File

@ -19,12 +19,10 @@ export class ConfirmationDialogComponent {
@Input() public title: string;
@Input() public confirmActionButton: string;
@Input() public confirmButNotCloseButton: string;
@Input() public hideModalButton: string = 'Cancel';
@Output() emitObject: EventEmitter<any> = new EventEmitter();
@Output() clearAll: EventEmitter<any> = new EventEmitter();
private _ids: string[] = [];
@ -38,7 +36,6 @@ export class ConfirmationDialogComponent {
public hideModal(): void {
this.isModalShown = false;
this.clearAll.emit();
// this.autoShownModal.hide();
}
@ -53,8 +50,4 @@ export class ConfirmationDialogComponent {
// this.hideModal();
}
}
public confirmedButNotCloseAction() {
this.emitObject.emit(this._ids);
}
}

View File

@ -44,7 +44,7 @@ export class MyArray extends MyGroup {
@Input() public initEmpty: boolean = false;
@ViewChild(MyFormDirective, { static: true }) protected formComponents: MyFormDirective;
@ViewChild(MyFormDirective) protected formComponents: MyFormDirective;
protected _cfr: ComponentFactoryResolver;

View File

@ -120,16 +120,16 @@ export class MyGroup implements OnInit, AfterContentInit {
selector : 'form-inline',
template : `
<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 }}">
{{ description.label + (description.mandatory ? ' (*)' : '') }}
{{ description.label }}
</label>
<ng-content></ng-content>
<span class="md-input-bar"></span>
</div>
`
})
})
export class InlineFormWrapper implements OnChanges {
@Input() public description: Description = null;

View File

@ -1,13 +1,12 @@
/**
* Created by stefanos on 19/5/2017.
*/
import { EventEmitter, Input, OnInit, Output, ViewChild, ViewRef, Directive } from '@angular/core';
import { EventEmitter, Input, OnInit, Output, ViewChild, ViewRef } from '@angular/core';
import { Description } from '../../../domain/oa-description';
import { MyFormDirective } from './my-form.directive';
import { throwError } from 'rxjs';
@Directive()
export abstract class MyWrapper implements OnInit{
@Input() public component: ViewRef;
@ -18,7 +17,7 @@ export abstract class MyWrapper implements OnInit{
@Output() deleteNotifier: EventEmitter<ViewRef> = new EventEmitter();
@ViewChild(MyFormDirective, { static: true }) private formComponents: MyFormDirective;
@ViewChild(MyFormDirective) private formComponents: MyFormDirective;
public first = true;

View File

@ -22,7 +22,7 @@ export class ReadMoreComponent implements AfterContentInit {
//@Input() text: string;
//maximum height of the container
@Input("maxHeight") maxHeight: number = 100;
@ViewChild("readMoreDiv", { static: true })
@ViewChild("readMoreDiv")
readMoreDiv: ElementRef;
//set these to false to get the height of the expended container
public isCollapsed: boolean = false;

View File

@ -30,7 +30,7 @@ export class RepositoryTilesComponent implements OnInit {
getReposOfUser(): void {
this.loadingMessage = loadingReposMessage;
this.repoService.getRepositoriesSnippetsOfUser()
this.repoService.getRepositoriesOfUser()
.subscribe(
repos => this.reposOfUser = repos.sort( function(a, b) {
if (a.officialname < b.officialname) {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -8,35 +8,18 @@
<div *ngIf="successMessage" class="uk-alert uk-alert-success">{{ successMessage }}</div>
<form *ngIf="selectedRepo && !loadingMessage" [formGroup]="agreementForm">
<div *ngIf="showButton" class="uk-margin-small"> <!-- Update -->
<span>Being registered in OpenAIRE, you are giving consent to OpenAIRE to download, transform and enrich the metadata records, publishing them in the OpenAIRE Research Graph.</span>
</div>
<div *ngIf="!showButton" class="uk-margin-medium"> <!-- Register -->
<span>By registering your data source, you are giving your consent to OpenAIRE to download, transform and enrich the metadata records, publishing them in the OpenAIRE Research Graph.</span>
</div>
<br>
<!-- {{agreementForm.get('acceptTerms').value}}-->
<form-inline>
<label><input formControlName="acceptTerms" class="uk-checkbox" type="checkbox" checked
[checked]="this.agreementForm.get('acceptTerms').value === true"
(change)="emitRepo()">
Accept the
</label>
<a href="https://www.openaire.eu/terms-of-use-for-content-providers" target="_blank">Terms of Use</a>
<label><input formControlName="acceptTerms" class="uk-checkbox" type="checkbox" checked> I Agree with the </label>
<a href="https://zenodo.org/record/1446384#.XiGIAdmxU5n" target="_blank">OpenAIRE's Terms of Agreement for Content Providers</a>
</form-inline>
<!-- {{agreementForm.get('optOut').value}}-->
<form-inline>
<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>
<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>
</form-inline>
<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>
<br>
<div *ngIf="showButton" class="form-group">
<button class="uk-button uk-button-primary updateRepoInfoButton" type="button" (click)="updateRepo()">Update Information</button>
</div>
</form>
<!--<pre>{{agreementForm.value|json}}</pre>-->

View File

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

View File

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

View File

@ -136,8 +136,8 @@ export class SideMenuComponent implements OnInit {
}
getIsUserAdmin() {
this.isUserAdmin = (this.authService.getUserRole().includes('SUPER_ADMINISTRATOR') ||
this.authService.getUserRole().includes('CONTENT_PROVIDER_DASHBOARD_ADMINISTRATOR'));
this.isUserAdmin = (this.authService.getUserRole().includes('ROLE_ADMIN') ||
this.authService.getUserRole().includes('ROLE_PROVIDE_ADMIN'));
return this.isUserAdmin;
}
@ -154,7 +154,7 @@ export class SideMenuComponent implements OnInit {
}
getReposOfUser(): void {
this.repositoryService.getRepositoriesSnippetsOfUser()
this.repositoryService.getRepositoriesOfUser()
.subscribe(
repos => {
this.reposOfUser = repos;

View File

@ -74,8 +74,8 @@ export class TopmenuDashboardComponent implements OnInit {
}
getIsUserAdmin() {
this.isUserAdmin = (this.authService.getUserRole().includes('SUPER_ADMINISTRATOR') ||
this.authService.getUserRole().includes('CONTENT_PROVIDER_DASHBOARD_ADMINISTRATOR'));
this.isUserAdmin = (this.authService.getUserRole().includes('ROLE_ADMIN') ||
this.authService.getUserRole().includes('ROLE_PROVIDE_ADMIN'));
return this.isUserAdmin;
}
}

View File

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

View File

@ -57,8 +57,8 @@ export class TopmenuLandingComponent implements OnInit {
}
getIsUserAdmin() {
this.isUserAdmin = (this.authService.getUserRole().includes('SUPER_ADMINISTRATOR') ||
this.authService.getUserRole().includes('CONTENT_PROVIDER_DASHBOARD_ADMINISTRATOR'));
this.isUserAdmin = (this.authService.getUserRole().includes('ROLE_ADMIN') ||
this.authService.getUserRole().includes('ROLE_PROVIDE_ADMIN'));
return this.isUserAdmin;
}
}

View File

@ -14,13 +14,13 @@
@import url('https://fonts.googleapis.com/css?family=Sura:400,700');
body.landing {
padding-top: 0;
padding-top: 0px;
}
/* yard */
.tm-page {
border-width:0!important;
border:0!important;
border-width:0px!important;
border:0px!important;
}
body { font-family: 'Open Sans', sans-serif !important;}
/*
@ -71,7 +71,7 @@ font-weight: 400!important;
}
.news .wk-panel-box, .news .wk-panel-header {
padding :20px 0 30px 0;
padding :20px 0px 30px 0px;
margin-bottom:40px;
}
/*
@ -94,7 +94,7 @@ margin-bottom:40px;
.wk-twitter-firstpage .wk-article-meta{
font-size:12px!important;
line-height:16px;
margin:0;
margin:0px;
}
.wk-twitter-firstpage .wk-margin {
@ -164,7 +164,7 @@ font-weight:300;
.service-button > .wk-subnav>li>a,
.boxedpills > .uk-subnav>li>a {
border: 1px solid #9c9c9c!important;
border-radius: 0!important;
border-radius: 0px!important;
color: #9c9c9c!important;
}
@ -204,11 +204,11 @@ font-weight:300;
background: #fff;
/* border: 1px solid #e5e5e5; */
border: none!important;
border-radius: 0;
border-radius: 0px;
background: #fff;
color: #767779;
color: rgb(108, 109, 116);
box-shadow: rgba(0, 0, 0, 0.08) 0 5px 15px;
box-shadow: rgba(0, 0, 0, 0.08) 0px 5px 15px;
background: rgb(255, 255, 255)!important;
}
@ -325,8 +325,8 @@ background-color:#222080;}
.tm-toolbar {
position:relative;
color: #fff;
padding-top: 0;
padding-bottom:0;
padding-top: 0px;
padding-bottom:0px;
background:rgba(255,255,255, 0.0);
z-index:10000;
/*background: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,0)), url(/images/toolbar_bg.png);*/
@ -345,19 +345,19 @@ background:rgba(255,255,255, 0.4);
}
.uk-logo > img {max-height:80px;}
.inner {
left:0;
left:0px;
margin-top:-5px;
background-color: #222080;
}
.tm-toolbar .uk-container {
padding-right:0;
padding-right:0px;
}
.tm-toolbar ul.uk-subnav.uk-subnav-line,
.tm-toolbar ul.uk-subnav{
margin-top:-10px;
margin-top: -5px; /* no border on top */
padding:10px 10px 0 0;
padding:10px 10px 0px 0px;
-ms-transform: skew(25deg);
-webkit-transform: skew(25deg);
transform: skew(25deg);
@ -390,7 +390,7 @@ padding-right:0;
.uk-subnav-line > :nth-child(n + 2):before,
.tm-toolbar .uk-subnav > :nth-child(n + 2):before {
margin-right: 10px;
border-left: 0 ;
border-left: 0px ;
}
.tm-toolbar .uk-subnav-line li a,
@ -432,7 +432,7 @@ li.home-hover
}
.tm-toolbar .uk-dotnav, .tm-toolbar .uk-subnav {
margin-bottom:0!important;
margin-bottom:0px!important;
}
.tm-toolbar .uk-subnav-line li a:hover,
@ -461,13 +461,13 @@ li.home-hover
white-space: nowrap;
/*white-space:pre-wrap;*/
text-align:center;
-moz-border-radius: 0;
-webkit-border-radius: 0;
border-radius: 0;
-moz-border-radius: 0px;
-webkit-border-radius: 0px;
border-radius: 0px;
background: #fff;
-moz-box-shadow: 0 0 1px #666;
-webkit-box-shadow: 0 0 1px #666;
box-shadow: 0 0 1px #666;
-moz-box-shadow: 0px 0px 1px #666;
-webkit-box-shadow: 0px 0px 1px #666;
box-shadow: 0px 0px 1px #666;
}
.tm-toolbar .uk-subnav a[title]:hover:before{
@ -747,13 +747,13 @@ color: #17106E;
.uk-section-secondary:not(.uk-preserve-color) .uk-navbar-nav > li > a:focus,
.uk-section-secondary:not(.uk-preserve-color) .uk-navbar-nav > li > a.uk-open,
.uk-card-primary.uk-card-body .uk-navbar-nav > li:hover > a, .uk-card-primary.uk-card-body .uk-navbar-nav > li > a:focus,
.uk-card-primary.uk-card-body .uk-navbar-nav > li > a.uk-open, .uk-card-primary > :not([class *='uk-card-media']) .uk-navbar-nav > li:hover > a,
.uk-card-primary > :not([class *='uk-card-media']) .uk-navbar-nav > li > a:focus,
.uk-card-primary > :not([class *='uk-card-media']) .uk-navbar-nav > li > a.uk-open,
.uk-card-primary.uk-card-body .uk-navbar-nav > li > a.uk-open, .uk-card-primary > :not([class * ='uk-card-media']) .uk-navbar-nav > li:hover > a,
.uk-card-primary > :not([class * ='uk-card-media']) .uk-navbar-nav > li > a:focus,
.uk-card-primary > :not([class * ='uk-card-media']) .uk-navbar-nav > li > a.uk-open,
.uk-card-secondary.uk-card-body .uk-navbar-nav > li:hover > a, .uk-card-secondary.uk-card-body .uk-navbar-nav > li > a:focus,
.uk-card-secondary.uk-card-body .uk-navbar-nav > li > a.uk-open, .uk-card-secondary > :not([class *='uk-card-media']) .uk-navbar-nav > li:hover > a,
.uk-card-secondary > :not([class *='uk-card-media']) .uk-navbar-nav > li > a:focus,
.uk-card-secondary > :not([class *='uk-card-media']) .uk-navbar-nav > li > a.uk-open,
.uk-card-secondary.uk-card-body .uk-navbar-nav > li > a.uk-open, .uk-card-secondary > :not([class * ='uk-card-media']) .uk-navbar-nav > li:hover > a,
.uk-card-secondary > :not([class * ='uk-card-media']) .uk-navbar-nav > li > a:focus,
.uk-card-secondary > :not([class * ='uk-card-media']) .uk-navbar-nav > li > a.uk-open,
.uk-overlay-primary .uk-navbar-nav > li:hover > a, .uk-overlay-primary .uk-navbar-nav > li > a:focus,
.uk-overlay-primary .uk-navbar-nav > li > a.uk-open, .uk-navbar-container:not(.uk-navbar-transparent) .uk-navbar-nav > li:hover > a,
.uk-navbar-container:not(.uk-navbar-transparent) .uk-navbar-nav > li > a:focus,
@ -805,7 +805,7 @@ color: #17106E;
color: #63BDE9!important;
}
*/
*/
/*
.uk-tile-primary {background-color: #17106E;}
*/
@ -913,7 +913,7 @@ transform: translateY(-50%);
color:#fff;
}
.first_page_panel {
border: 0 solid #e5e5e7!important;
border: 0px solid #e5e5e7!important;
padding:20px 20px!important;
/*width:100%!important;*/
font-size:24pt!important;
@ -997,8 +997,8 @@ border-top: 1px solid #6c6c6c;
border-bottom: 1px solid #c5c5c5;
}
.mod_events_latest_table td p{
margin-bottom:0;
margin-top:0;
margin-bottom:0px;
margin-top:0px;
}
.mod_events_latest_date {
@ -1013,7 +1013,7 @@ border-top: 1px solid #6c6c6c;
margin-right:8px;
margin-top:5px;
text-align:center;
padding:10px 0;
padding:10px 0px;
line-height:20px;
*/
color: #4687E6;
@ -1031,7 +1031,7 @@ border-top: 1px solid #6c6c6c;
line-height:14px;
font-weight:400;
font-size:12px;
padding: 5px 0;
padding: 5px 0px;
margin-bottom: 8px;
text-transform:none;
*/
@ -1094,7 +1094,7 @@ font-family: 'Heebo', sans-serif;
font-size:13px!important;
line-height: 18px;
font-weight:normal!important;
margin-top: 0;
margin-top: 0px;
margin-bottom: 8px;
}
.nspArt { border-bottom: 1px solid #c5c5c5;}
@ -1112,7 +1112,7 @@ font-family: 'Heebo', sans-serif;
.nspLinks ul li p {
text-transform:none;
font-size: 14px;
margin:0;
margin:0px;
}
.readon-button{
background:0!important;
@ -1203,16 +1203,16 @@ color: rgba(255, 255, 255, 0.5)!important;
#btl .btl-panel > span .btl-dropdown { border:3!important;}
#btl .btl-panel > span{
border: 0!important;
border: 0px!important;
background-color: transparent!important;
color:#444!important;
padding-right:30px;
padding-left:6px;
height:0!important;
height:0px!important;
line-height:20px!important;
margin:0 !important;
box-shadow: 0 0 0;
border-radius:0!important;
margin:0px !important;
box-shadow: 0px 0px 0px;
border-radius:0px!important;
display: inline-table!important;
text-transform:none!important;
font-size: 14px;
@ -1250,12 +1250,12 @@ border-bottom-left-radius: 2px;
border-bottom-right-radius: 2px;
border-top-left-radius: 2px;
border-top-right-radius: 2px;
box-shadow: rgba(41, 44, 61, 0.0980392) 2px 15px 50px 0;
box-shadow: rgba(41, 44, 61, 0.0980392) 2px 15px 50px 0px;
box-sizing: border-box;
color: rgb(79, 82, 96);
display: none;
height: auto;
margin-top: 0;
margin-top: 0px;
padding-bottom: 25px;
padding-left: 25px;
padding-right: 25px;
@ -1285,8 +1285,8 @@ list-style-image: none;
list-style-position: outside;
list-style-type: none;
padding-bottom: 6px;
padding-left: 0;
padding-right: 0;
padding-left: 0px;
padding-right: 0px;
padding-top: 6px;
text-align: left;
text-decoration: none;
@ -1433,7 +1433,7 @@ color: #2D72D6;
box-shadow:none;
border: 1px solid #eee;
padding:0 30px 15px 30px;
padding:0px 30px 15px 30px;
background: #fff;
color: #767779;
@ -1442,7 +1442,7 @@ box-shadow: 0 6px 50px rgba(0,0,0,.05);
}
.ifaq-tpl-clean_blue_arrow .ifaq-collapsible > a {
display: block; padding: 1px 0 1px 0;
display: block; padding: 1px 0 1px 0px;
background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2213%22%20height%3D%2213%22%20viewBox%3D%220%200%2013%2013%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%3Crect%20fill%3D%22%236C6D74%22%20width%3D%2213%22%20height%3D%221%22%20x%3D%220%22%20y%3D%226%22%3E%3C%2Frect%3E%0A%20%20%20%20%3Crect%20fill%3D%22%236C6D74%22%20width%3D%221%22%20height%3D%2213%22%20x%3D%226%22%20y%3D%220%22%3E%3C%2Frect%3E%0A%3C%2Fsvg%3E");
background-repeat: no-repeat;
background-position: 98% 50%;

View File

@ -1,40 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 118 118" style="enable-background:new 0 0 118 118;" xml:space="preserve">
<style type="text/css">
.st0{clip-path:url(#SVGID_2_);}
.st1{fill:#FFE250;}
.st2{fill:none;stroke:#EFC82A;stroke-width:3;stroke-dasharray:8;}
.st3{enable-background:new ;}
</style>
<g>
<defs>
<rect id="SVGID_1_" y="0" width="118" height="118"/>
</defs>
<clipPath id="SVGID_2_">
<use xlink:href="#SVGID_1_" style="overflow:visible;"/>
</clipPath>
<g class="st0">
<g transform="translate(27 32)">
<g transform="translate(-161.906 166.693) rotate(-45)">
<rect x="0" y="0" transform="matrix(-1 2.535182e-06 -2.535182e-06 -1 523.3979 37.2033)" class="st1" width="523.4" height="37.2"/>
<rect x="1.5" y="1.5" transform="matrix(-1 2.535182e-06 -2.535182e-06 -1 523.3979 37.2033)" class="st2" width="520.4" height="34.2"/>
</g>
<g class="st3">
<path d="M3.9,21.3l2.2-2.2c1-1,1.9-1.6,2.6-1.8c0.7-0.2,1.4,0.1,2,0.7c0.4,0.4,0.7,0.9,0.7,1.3s0,0.9-0.3,1.3l0,0
c0.5-0.3,1.1-0.5,1.5-0.4c0.5,0.1,0.9,0.3,1.4,0.8c0.6,0.6,0.9,1.4,0.8,2.2c-0.1,0.8-0.6,1.6-1.4,2.4L11,28.4L3.9,21.3z
M8.2,22.6l0.9-0.9c0.4-0.4,0.6-0.8,0.7-1.1s-0.1-0.6-0.3-0.9c-0.3-0.3-0.6-0.4-0.9-0.3c-0.3,0.1-0.7,0.3-1.1,0.8l-0.8,0.8
L8.2,22.6z M9.4,23.8l1.8,1.8l1-1c0.4-0.4,0.6-0.8,0.7-1.2c0-0.4-0.1-0.7-0.4-1c-0.6-0.6-1.3-0.5-2.1,0.4L9.4,23.8z"/>
<path d="M21.7,17.7l-4.1,4.1l-7.1-7.1l4.1-4.1l1.2,1.2l-2.6,2.6l1.6,1.6l2.4-2.4l1.2,1.2l-2.4,2.4l1.8,1.8l2.6-2.6L21.7,17.7z"
/>
<path d="M25.9,13.5L24.4,15l-5.8-5.8l-1.9,1.9l-1.2-1.2l5.3-5.3L22,5.7l-1.9,1.9L25.9,13.5z"/>
<path d="M33.3,6.1L31.1,5l-2.6,2.6l1.2,2.2L28,11.4l-4.6-9.6l1.8-1.8l9.6,4.6L33.3,6.1z M29.4,4.1c-2-1.1-3.1-1.6-3.4-1.8
c-0.3-0.1-0.5-0.3-0.6-0.3c0.3,0.5,1,1.8,2.1,4L29.4,4.1z"/>
</g>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 89.13 90.48"><defs><style>.cls-1,.cls-2{fill:#35baa0;}.cls-1{opacity:0.11;}</style></defs><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><circle class="cls-1" cx="11.7" cy="55.01" r="8.97"/><circle class="cls-1" cx="44.33" cy="79.24" r="8.97"/><circle class="cls-1" cx="77.3" cy="56.17" r="8.97"/><path class="cls-2" d="M77.16,43.33a12,12,0,0,0-11.72,9.51C60.51,52.78,47.76,51.58,47,41V8.48l9.78,9.64a2.5,2.5,0,0,0,3.51-3.55L46.25.73h0L46.15.64a2,2,0,0,0-.29-.22L45.67.31a1.67,1.67,0,0,0-.23-.12A1.58,1.58,0,0,0,45.13.1L45,.05l-.34,0h-.18a2.06,2.06,0,0,0-.26,0,1.46,1.46,0,0,0-.22,0l-.19.05L43.5.2l-.15.08-.28.16-.14.11a2.29,2.29,0,0,0-.23.21h0L29,15.11A2.49,2.49,0,0,0,29,18.64a2.52,2.52,0,0,0,1.73.69,2.47,2.47,0,0,0,1.81-.77L42,8.73V40.84s0,0,0,.08c-.73,10.52-13.21,11.83-18.28,11.92a12,12,0,1,0,0,5c5.67-.06,13.34-1.51,18.31-6V66.88a12,12,0,1,0,5-.15V51.83c5,4.57,12.8,6,18.48,6a12,12,0,1,0,11.7-14.53ZM12,62.28a7,7,0,1,1,7-7A7,7,0,0,1,12,62.28ZM51.79,78.5a7,7,0,1,1-7-7A7,7,0,0,1,51.79,78.5ZM77.16,62.28a7,7,0,1,1,7-7A7,7,0,0,1,77.16,62.28Z"/></g></g></svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 77.12 92.97"><defs><style>.cls-1,.cls-2{fill:#937245;}.cls-1{opacity:0.18;}</style></defs><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><rect class="cls-1" x="2.09" y="17.5" width="56.62" height="73.4" rx="12"/><path class="cls-2" d="M66,0H27c-4.72,0-8.75,3.33-10.37,8a11.6,11.6,0,0,0-8.27,7.71C3.57,17.12,0,22.06,0,27.93V80.39C0,87.33,5,93,11.14,93H50.08c4.69,0,8.71-3.28,10.34-7.93a11.8,11.8,0,0,0,7.65-7.65c5.14-1.1,9.05-6.22,9.05-12.35V12.58C77.12,5.64,72.12,0,66,0ZM50.08,87.68H11.14c-3.56,0-6.45-3.27-6.45-7.29V27.93A7.58,7.58,0,0,1,7.6,21.84a5.94,5.94,0,0,1,3.54-1.19H50.08c3.55,0,6.45,3.26,6.45,7.28V80.39a7.78,7.78,0,0,1-1.8,5A6.12,6.12,0,0,1,50.08,87.68Zm11.14-8.74v-51c0-6.94-5-12.57-11.14-12.57h-36a6.59,6.59,0,0,1,1.82-1.52,5.89,5.89,0,0,1,2.84-.74H57.68c3.56,0,6.45,3.27,6.45,7.28V72.85a7.82,7.82,0,0,1-1.58,4.76A6.45,6.45,0,0,1,61.22,78.94ZM72.43,65a7.46,7.46,0,0,1-3.61,6.54V20.38c0-6.93-5-12.58-11.14-12.58H22.17A6.13,6.13,0,0,1,27,5.29H66c3.56,0,6.45,3.27,6.45,7.29Z"/></g></g></svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 86 92.48"><defs><style>.cls-1{fill:#ce4d20;opacity:0.11;}.cls-2{fill:#e4572e;}</style></defs><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><circle class="cls-1" cx="55.66" cy="50.79" r="11.53"/><circle class="cls-1" cx="11.62" cy="50.09" r="10.83"/><circle class="cls-1" cx="74.89" cy="9.19" r="7.11"/><circle class="cls-1" cx="77.22" cy="83.99" r="7.11"/><path class="cls-2" d="M84.51,78.86a8.72,8.72,0,0,0-9.37-3.61L65.33,60.47a13.91,13.91,0,0,0-1-20.85L73,19.31l.15,0a10.27,10.27,0,0,0,1.9.18A9.79,9.79,0,1,0,68.54,17l-8.6,20.21a14.27,14.27,0,0,0-1.62-.43A13.94,13.94,0,0,0,42,47.78c0,.14,0,.27-.06.41l-18.74-.61A11.71,11.71,0,0,0,14,38.8a11.75,11.75,0,1,0,9.25,13.79h0L42,53.2a13.91,13.91,0,0,0,19.21,10L70.83,77.8a8.74,8.74,0,0,0,4.73,14.52,9,9,0,0,0,1.71.16,8.75,8.75,0,0,0,7.24-13.62Zm-14.14-70a4.77,4.77,0,1,1,3.75,5.6A4.77,4.77,0,0,1,70.37,8.84Zm-52,42.79a6.74,6.74,0,1,1-6.64-8.06,7.38,7.38,0,0,1,1.32.13,6.75,6.75,0,0,1,5.32,7.93ZM53.9,59.24a8.94,8.94,0,0,1,1.71-17.7,9.43,9.43,0,0,1,1.75.17A8.93,8.93,0,0,1,53.9,59.24Zm27,25.22A3.75,3.75,0,1,1,77.25,80a4.39,4.39,0,0,1,.72.07,3.76,3.76,0,0,1,3,4.41Z"/></g></g></svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 85.94 86.44"><defs><style>.cls-1,.cls-2{fill:#28beff;}.cls-1{opacity:0.11;}</style></defs><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><polygon class="cls-1" points="41.77 4.17 3.79 27.24 42.94 50.77 82.32 26.54 41.77 4.17"/><path class="cls-2" d="M84.75,25.61,43.85.37a2.54,2.54,0,0,0-2.62,0L1.2,24.73a2.51,2.51,0,0,0,0,4.29L42.13,53.38a2.42,2.42,0,0,0,1.27.36,2.51,2.51,0,0,0,1.27-.35l40-23.5a2.49,2.49,0,0,0,0-4.28ZM43.41,48.33,7.35,26.84,42.53,5.43,78.59,27.68Z"/><path class="cls-2" d="M82.17,41.74,43.41,64.49,3.78,40.88a2.5,2.5,0,1,0-2.56,4.3L42.13,69.55a2.48,2.48,0,0,0,2.54,0l40-23.49a2.5,2.5,0,0,0-2.53-4.32Z"/><path class="cls-2" d="M82.17,58.28,43.41,81,3.78,57.42a2.5,2.5,0,1,0-2.56,4.3L42.13,86.08a2.42,2.42,0,0,0,1.27.36,2.51,2.51,0,0,0,1.27-.35l40-23.5a2.5,2.5,0,0,0-2.53-4.31Z"/></g></g></svg>

Before

Width:  |  Height:  |  Size: 892 B

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 69.74 88.08"><defs><style>.cls-1,.cls-2{fill:#4059ad;}.cls-2{opacity:0.05;}</style></defs><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path class="cls-1" d="M23.58,47V45h-7V56.75h2.59V52.08h3.39v-2H19.18V47Z"/><path class="cls-1" d="M31.75,45.81H29.14L25.6,57.6H28l.58-2.43h3.32l.59,2.43h2.65Zm-2.69,7.33,1.15-4.82,1.18,4.82Z"/><path class="cls-1" d="M38.83,45.81V57.6h2.59V45.81Z"/><path class="cls-1" d="M52.25,51.59a3.22,3.22,0,0,0,1.66-3.1,4.16,4.16,0,0,0-.33-1.7,3,3,0,0,0-.92-1.2,2.71,2.71,0,0,0-1.17-.53,11.07,11.07,0,0,0-1.65-.1h-3.7V56.75h2.59V52.08H50l1.58,4.67h2.81Zm-2.39-1.41H48.73V46.87h1a2.43,2.43,0,0,1,.88.13,1.21,1.21,0,0,1,.52.51,1.86,1.86,0,0,1,.23,1C51.39,49.61,50.88,50.18,49.86,50.18Z"/><path class="cls-2" d="M66.35,9.47V82.56C59.7,86.8,44.7,88.08,34.87,88.08c-10.5,0-26.9-1.45-32.73-6.42V9.47A10.71,10.71,0,0,1,2.72,6c6.26-4.6,22-6,32.15-6,9.37,0,23.46,1.16,30.5,4.94A10.71,10.71,0,0,1,66.35,9.47Z"/><path class="cls-1" d="M65.37,4.94C58.33,1.16,44.24,0,34.87,0,24.69,0,9,1.37,2.72,6A5.67,5.67,0,0,0,0,10.5V77.58a5.33,5.33,0,0,0,2.14,4.08c5.83,5,22.23,6.42,32.73,6.42,9.83,0,24.83-1.28,31.48-5.52,2.12-1.34,3.39-3,3.39-5V10.5C69.74,8.21,68.06,6.38,65.37,4.94ZM4.59,10.53c.49-1.7,10.15-5.94,30.28-5.94s29.69,4.2,30.26,5.91c-.57,1.72-10.24,5.91-30.26,5.91S5.08,12.17,4.59,10.55Zm60.55,67c-.48,1.69-10.15,5.94-30.27,5.94S5,79.23,4.59,77.58V61.19c7.13,3.69,21,4.82,30.28,4.82S58,64.88,65.14,61.19Zm0-22.06c-.48,1.7-10.15,5.93-30.27,5.93S5,57.17,4.59,55.51V37.88c7.13,3.68,21,4.82,30.28,4.82S58,41.56,65.14,37.88Zm0-23.32c-.48,1.7-10.15,5.94-30.27,5.94S5,33.85,4.59,32.2v-16c7.13,3.69,21,4.82,30.28,4.82S58,19.87,65.14,16.18Z"/></g></g></svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 69.08 88.18"><defs><style>.cls-1,.cls-2{fill:#6d326d;}.cls-1{opacity:0.11;}</style></defs><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path class="cls-1" d="M54.4,2H13.62a12,12,0,0,0-12,12V72.52a12,12,0,0,0,12,12H54.4a12,12,0,0,0,12-12V14A12,12,0,0,0,54.4,2ZM22.21,17.87a6.91,6.91,0,1,1-6.9,6.91A6.91,6.91,0,0,1,22.21,17.87Zm.18,20.8a6.91,6.91,0,1,1-6.91,6.9A6.9,6.9,0,0,1,22.39,38.67ZM23.26,74a6.9,6.9,0,1,1,6.9-6.9A6.9,6.9,0,0,1,23.26,74Z"/><path class="cls-2" d="M54.58,0H14.5A14.51,14.51,0,0,0,0,14.5V73.68a14.51,14.51,0,0,0,14.5,14.5H54.58a14.51,14.51,0,0,0,14.5-14.5V14.5A14.51,14.51,0,0,0,54.58,0Zm9.5,73.68a9.51,9.51,0,0,1-9.5,9.5H14.5A9.51,9.51,0,0,1,5,73.68v-4h7.67a9.68,9.68,0,1,0,0-5H5V48.37h7.67a9.68,9.68,0,1,0,0-5H5V27.09h7.67a9.68,9.68,0,1,0,0-5H5V14.5A9.51,9.51,0,0,1,14.5,5H54.58a9.51,9.51,0,0,1,9.5,9.5ZM17.33,67.15A4.68,4.68,0,1,1,22,71.82,4.69,4.69,0,0,1,17.33,67.15Zm0-21.28A4.68,4.68,0,1,1,22,50.54,4.69,4.69,0,0,1,17.33,45.87Zm0-21.28A4.68,4.68,0,1,1,22,29.26,4.69,4.69,0,0,1,17.33,24.59Z"/></g></g></svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 77.93 86.2"><defs><style>.cls-1,.cls-2{fill:#f4b942;}.cls-1{opacity:0.11;}</style></defs><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><rect class="cls-1" x="0.99" y="14.54" width="61.51" height="69.44" rx="12"/><path class="cls-2" d="M53.43,12.9H11.88A11.89,11.89,0,0,0,0,24.78V74.33A11.89,11.89,0,0,0,11.88,86.2H53.43A11.89,11.89,0,0,0,65.31,74.33V24.78A11.89,11.89,0,0,0,53.43,12.9Zm6.88,61.43a6.88,6.88,0,0,1-6.88,6.87H11.88A6.88,6.88,0,0,1,5,74.33V24.78a6.89,6.89,0,0,1,6.88-6.88H53.43a6.89,6.89,0,0,1,6.88,6.88Z"/><path class="cls-2" d="M64.32,0H17.14a2.5,2.5,0,0,0,0,5H64.32a8.69,8.69,0,0,1,8.61,8.75V74.58a2.5,2.5,0,0,0,5,0V13.75A13.7,13.7,0,0,0,64.32,0Z"/><path class="cls-2" d="M48.73,36.47H16.57a2.5,2.5,0,0,0,0,5H48.73a2.5,2.5,0,0,0,0-5Z"/><path class="cls-2" d="M48.73,49.92H16.57a2.5,2.5,0,0,0,0,5H48.73a2.5,2.5,0,1,0,0-5Z"/><path class="cls-2" d="M48.73,63.38H16.57a2.5,2.5,0,0,0,0,5H48.73a2.5,2.5,0,1,0,0-5Z"/></g></g></svg>

Before

Width:  |  Height:  |  Size: 1021 B

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 95.17 30.66"><defs><style>.cls-1,.cls-2{fill:#323332;}.cls-1{opacity:0.11;}</style></defs><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><circle class="cls-1" cx="15" cy="15.34" r="11.62"/><circle class="cls-1" cx="47.68" cy="15.34" r="11.62"/><circle class="cls-1" cx="78.78" cy="15.34" r="11.62"/><path class="cls-2" d="M15.33,30.66A15.33,15.33,0,1,1,30.66,15.33,15.35,15.35,0,0,1,15.33,30.66ZM15.33,5A10.33,10.33,0,1,0,25.66,15.33,10.34,10.34,0,0,0,15.33,5Z"/><path class="cls-2" d="M47.59,30.66A15.33,15.33,0,1,1,62.92,15.33,15.35,15.35,0,0,1,47.59,30.66ZM47.59,5A10.33,10.33,0,1,0,57.92,15.33,10.34,10.34,0,0,0,47.59,5Z"/><path class="cls-2" d="M79.85,30.66A15.33,15.33,0,1,1,95.17,15.33,15.34,15.34,0,0,1,79.85,30.66ZM79.85,5A10.33,10.33,0,1,0,90.17,15.33,10.34,10.34,0,0,0,79.85,5Z"/></g></g></svg>

Before

Width:  |  Height:  |  Size: 885 B

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 74.15 87.09"><defs><style>.cls-1,.cls-2{fill:#3e703e;}.cls-1{opacity:0.11;}</style></defs><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><rect class="cls-1" x="2.44" y="3.93" width="67.81" height="80.16" rx="12"/><path class="cls-2" d="M59.15,87.09H15a15,15,0,0,1-15-15V15A15,15,0,0,1,15,0H59.15a15,15,0,0,1,15,15V72.09A15,15,0,0,1,59.15,87.09ZM15,6a9,9,0,0,0-9,9V72.09a9,9,0,0,0,9,9H59.15a9,9,0,0,0,9-9V15a9,9,0,0,0-9-9Z"/><path class="cls-2" d="M25,56.48a3,3,0,0,1-2.12-.88L11.93,44.69a3.06,3.06,0,0,1-.88-2.14A3,3,0,0,1,12,40.42L22.75,29.88a3,3,0,1,1,4.19,4.29l-8.62,8.42,8.77,8.77a3,3,0,0,1,0,4.24A3,3,0,0,1,25,56.48Z"/><path class="cls-2" d="M49.64,56.93a3,3,0,0,1-2.12-.88,3,3,0,0,1,0-4.24L56.29,43l-8.62-8.42a3,3,0,1,1,4.19-4.29L62.65,40.87a3,3,0,0,1,0,4.27L51.76,56.05A3,3,0,0,1,49.64,56.93Z"/><path class="cls-2" d="M31.67,63.7a2.74,2.74,0,0,1-.93-.15,3,3,0,0,1-1.92-3.78L40.52,24.1A3,3,0,0,1,46.22,26L34.52,61.64A3,3,0,0,1,31.67,63.7Z"/></g></g></svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

Some files were not shown because too many files have changed in this diff Show More