From 85a98ff271873b4ff440eded75c1ed23f10dd641 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Sat, 14 Jan 2017 12:55:31 +0000 Subject: [PATCH] use of uikit classes | tabs are not responsive in landing pages | metrics tab in landing pages updated (new component+service, removed from organization landing page) git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@45390 d315682c-612b-4755-9ff5-7f18f6832af3 --- portal-2/src/app/app.component.ts | 12 +- portal-2/src/app/app.module.ts | 6 +- .../selected/selectedDatasets.component.ts | 2 +- .../dataProvider/dataProvider.component.html | 89 +- .../dataProvider/datasetsTab.component.ts | 2 +- .../dataProvider/datasourcesTab.component.ts | 2 +- .../organizationsTab.component.ts | 4 +- .../dataProvider/projectsTab.component.ts | 2 +- .../dataProvider/publicationsTab.component.ts | 2 +- .../relatedDatasourcesTab.component.ts | 15 +- .../dataProvider/statisticsTab.component.ts | 2 +- .../dataProvider/tabs.component.ts | 81 +- .../dataset/dataset.component.html | 61 +- .../landingPages/dataset/dataset.component.ts | 18 +- .../src/app/landingPages/landing.module.ts | 7 +- .../src/app/landingPages/metrics.component.ts | 108 +++ .../organization/organization.component.html | 299 +++---- .../organization/organization.component.ts | 6 +- .../landingPages/person/person.component.html | 158 ++-- .../project/project.component.html | 349 ++++---- .../landingPages/project/project.component.ts | 21 +- .../publication/publication.component.html | 772 +++++++++--------- .../publication/publication.component.ts | 48 +- .../app/landingPages/showAuthors.component.ts | 4 +- .../landingPages/showIdentifiers.component.ts | 14 +- .../landingPages/showSubjects.component.ts | 35 +- .../app/landingPages/showTitle.component.ts | 17 +- .../app/landingPages/tabPaging.component.ts | 10 +- .../app/landingPages/tabTable.component.ts | 2 +- .../src/app/searchPages/search.component.ts | 2 +- .../searchUtils/searchResult.component.ts | 4 +- .../src/app/services/dataProvider.service.ts | 16 - portal-2/src/app/services/dataset.service.ts | 62 -- portal-2/src/app/services/metrics.service.ts | 77 ++ .../src/app/services/organization.service.ts | 4 +- portal-2/src/app/services/project.service.ts | 16 - .../src/app/services/publication.service.ts | 94 +-- portal-2/src/app/services/services.module.ts | 11 +- .../app/sharedComponents/login.component.ts | 3 +- .../navigationBar.component.ts | 16 + portal-2/src/app/utils/entities/metrics.ts | 2 +- .../utils/properties/openaireProperties.ts | 7 +- .../app/utils/showDataProviders.component.ts | 6 +- portal-2/src/browser.module.ts | 5 +- portal-2/src/index.html | 13 +- portal-2/src/node.module.ts | 3 +- 46 files changed, 1210 insertions(+), 1279 deletions(-) create mode 100644 portal-2/src/app/landingPages/metrics.component.ts create mode 100644 portal-2/src/app/services/metrics.service.ts diff --git a/portal-2/src/app/app.component.ts b/portal-2/src/app/app.component.ts index 2827bdeb..25c5c5fb 100644 --- a/portal-2/src/app/app.component.ts +++ b/portal-2/src/app/app.component.ts @@ -32,18 +32,18 @@ export class XLargeDirective {
-
- + +
-
-
- something in sidebar + +
+
diff --git a/portal-2/src/app/app.module.ts b/portal-2/src/app/app.module.ts index 20393014..2fcb0386 100755 --- a/portal-2/src/app/app.module.ts +++ b/portal-2/src/app/app.module.ts @@ -1,3 +1,4 @@ +//import {MaterialModule} from '@angular/material'; import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; @@ -20,11 +21,10 @@ import { ErrorModule } from './error/error.module'; import {ServicesModule} from './services/services.module'; - - @NgModule({ declarations: [ AppComponent, XLargeDirective ], imports: [ + //MaterialModule.forRoot(), SharedModule, HomeModule, @@ -38,7 +38,7 @@ import {ServicesModule} from './services/services.module'; TestModule, HomeModule, AppRoutingModule, - ErrorModule, + ErrorModule ], exports:[] }) export class AppModule { diff --git a/portal-2/src/app/claimPages/linking/selected/selectedDatasets.component.ts b/portal-2/src/app/claimPages/linking/selected/selectedDatasets.component.ts index 55d161cf..bd0c4751 100644 --- a/portal-2/src/app/claimPages/linking/selected/selectedDatasets.component.ts +++ b/portal-2/src/app/claimPages/linking/selected/selectedDatasets.component.ts @@ -10,7 +10,7 @@ import {ClaimResult} from '../../../utils/entities/claimEntities.class';
- {{dataset.title}} + {{dataset.title}} {{dataset.title}} ({{dataset.date.substring(0,4)}}) diff --git a/portal-2/src/app/landingPages/dataProvider/dataProvider.component.html b/portal-2/src/app/landingPages/dataProvider/dataProvider.component.html index 31027cf9..042f6502 100644 --- a/portal-2/src/app/landingPages/dataProvider/dataProvider.component.html +++ b/portal-2/src/app/landingPages/dataProvider/dataProvider.component.html @@ -1,56 +1,55 @@ -
-
-
-
-

- - {{dataProviderInfo.title['name']}} - -

- {{dataProviderInfo.title['name']}} -

-

-
- - -
+
+ + -
+
- +
-
-
    -
  • - Share - Bookmark -
  • -
-
+
+
    +
  • + Share - Bookmark +
  • +
diff --git a/portal-2/src/app/landingPages/dataProvider/datasetsTab.component.ts b/portal-2/src/app/landingPages/dataProvider/datasetsTab.component.ts index 691b4c2f..c257d13c 100644 --- a/portal-2/src/app/landingPages/dataProvider/datasetsTab.component.ts +++ b/portal-2/src/app/landingPages/dataProvider/datasetsTab.component.ts @@ -8,7 +8,7 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties'; @Component({ selector: 'datasetsTab', template: ` -
+
There are no datasets
diff --git a/portal-2/src/app/landingPages/dataProvider/datasourcesTab.component.ts b/portal-2/src/app/landingPages/dataProvider/datasourcesTab.component.ts index e537f402..1b8c8af8 100644 --- a/portal-2/src/app/landingPages/dataProvider/datasourcesTab.component.ts +++ b/portal-2/src/app/landingPages/dataProvider/datasourcesTab.component.ts @@ -7,7 +7,7 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties'; @Component({ selector: 'datasourcesTab', template: ` -
+
There are no datasources
diff --git a/portal-2/src/app/landingPages/dataProvider/organizationsTab.component.ts b/portal-2/src/app/landingPages/dataProvider/organizationsTab.component.ts index ecd25c24..ba6d605e 100644 --- a/portal-2/src/app/landingPages/dataProvider/organizationsTab.component.ts +++ b/portal-2/src/app/landingPages/dataProvider/organizationsTab.component.ts @@ -3,7 +3,7 @@ import {Component, Input} from '@angular/core'; @Component({ selector: 'organizationsTab', template: ` -
+
There are no organizations
@@ -15,7 +15,7 @@ import {Component, Input} from '@angular/core';

- + {{item['name']}}

diff --git a/portal-2/src/app/landingPages/dataProvider/projectsTab.component.ts b/portal-2/src/app/landingPages/dataProvider/projectsTab.component.ts index 60c36a0a..8c6e2972 100644 --- a/portal-2/src/app/landingPages/dataProvider/projectsTab.component.ts +++ b/portal-2/src/app/landingPages/dataProvider/projectsTab.component.ts @@ -8,7 +8,7 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties'; @Component({ selector: 'projectsTab', template: ` -
+
There are no projects
diff --git a/portal-2/src/app/landingPages/dataProvider/publicationsTab.component.ts b/portal-2/src/app/landingPages/dataProvider/publicationsTab.component.ts index b1301ca9..35464e2c 100644 --- a/portal-2/src/app/landingPages/dataProvider/publicationsTab.component.ts +++ b/portal-2/src/app/landingPages/dataProvider/publicationsTab.component.ts @@ -8,7 +8,7 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties'; @Component({ selector: 'publicationsTab', template: ` -
+
There are no publications
diff --git a/portal-2/src/app/landingPages/dataProvider/relatedDatasourcesTab.component.ts b/portal-2/src/app/landingPages/dataProvider/relatedDatasourcesTab.component.ts index edb51a37..18a67417 100644 --- a/portal-2/src/app/landingPages/dataProvider/relatedDatasourcesTab.component.ts +++ b/portal-2/src/app/landingPages/dataProvider/relatedDatasourcesTab.component.ts @@ -9,7 +9,7 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties'; selector: 'relatedDatasourcesTab', template: ` -
+
There are no related dataproviders
@@ -22,19 +22,20 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties'; - - + + - - diff --git a/portal-2/src/app/landingPages/dataProvider/statisticsTab.component.ts b/portal-2/src/app/landingPages/dataProvider/statisticsTab.component.ts index c745d0f4..9a6645b4 100644 --- a/portal-2/src/app/landingPages/dataProvider/statisticsTab.component.ts +++ b/portal-2/src/app/landingPages/dataProvider/statisticsTab.component.ts @@ -3,7 +3,7 @@ import {Component, Input} from '@angular/core'; @Component({ selector: 'statisticsTab', template: ` -
+
There are no statistics
diff --git a/portal-2/src/app/landingPages/dataProvider/tabs.component.ts b/portal-2/src/app/landingPages/dataProvider/tabs.component.ts index e478a8e6..7ec53d67 100644 --- a/portal-2/src/app/landingPages/dataProvider/tabs.component.ts +++ b/portal-2/src/app/landingPages/dataProvider/tabs.component.ts @@ -13,53 +13,53 @@ import { SearchDataprovidersService } from '../../services/searchDataproviders.s @Component({ selector: 'tabs', template: ` - ` }) export class TabsComponent { @Input() id: string; + @Input() name: string; @Input() resultsBy: string; @Input() tabs: {"name": string, "content": string}[]; //@Input() publications; @@ -137,8 +146,6 @@ export class TabsComponent { @Input() _dataproviderService; - public metrics: string; - public paramsForSearchLink: string = ""; public reloadPublications: boolean = true; @@ -146,6 +153,7 @@ export class TabsComponent { public reloadProjects: boolean = true; public reloadDataproviders: boolean = true; public reloadRelatedDatasources: boolean = true; + public metricsClicked: boolean; public searchPublicationsComponent : SearchPublicationsComponent; public searchDatasetsComponent: SearchDatasetsComponent; @@ -169,6 +177,8 @@ export class TabsComponent { if(this.tabs != undefined && this.tabs.length > 0) { this.search(this.tabs[0].content, 1, 10); this.count(1, 0); + + this.metricsClicked = false; } if(this.resultsBy == "collectedFrom") { @@ -209,23 +219,10 @@ export class TabsComponent { } else if(content=='relatedDatasourcesTab') { this.searchRelatedDatasources(1, 0); } else if(content=='metricsTab') { - this.getMetrics(); + this.metricsClicked = true; } } - private getMetrics() { - console.info("getDatasourceMetrics: component"); - this._dataproviderService.getMetrics(this.id).subscribe( - data => { - this.metrics = data; - }, - err => { - console.log(err); - console.info("error"); - } - ); - } - private searchPublications(page: number, size: number) { if(this.reloadPublications) { this.searchPublicationsComponent.getResultsForDataproviders(this.id, this.resultsBy, page, size); diff --git a/portal-2/src/app/landingPages/dataset/dataset.component.html b/portal-2/src/app/landingPages/dataset/dataset.component.html index 18c278ed..e2e7dac5 100644 --- a/portal-2/src/app/landingPages/dataset/dataset.component.html +++ b/portal-2/src/app/landingPages/dataset/dataset.component.html @@ -1,15 +1,18 @@ -
-
-
+
+ + + + + +
+
+
({{datasetInfo.date}}) @@ -39,7 +42,7 @@
-
  • -
    - Metrics are currently unavailable -
    -
    -
    TotalDownloads:
    -
    {{metrics.totalDownloads}}
    -
    TotalViews:
    -
    {{metrics.totalViews}}
    -
    - -
  • Data Provider NameNumber of publications/ datasetsData Provider NameNumber of publications/ datasets
    - + + {{item.name}} - + + {{item.count}}
    - - - - - - - - - - - - - - -
    IDNumber Of DownloadsNumber Of Views
    - - {{key}} - - - {{metrics.infos.get(key).numOfDownloads}} - - {{metrics.infos.get(key).numOfViews}} -
    +
    -
    +
    • diff --git a/portal-2/src/app/landingPages/dataset/dataset.component.ts b/portal-2/src/app/landingPages/dataset/dataset.component.ts index 52a29937..99b37a72 100644 --- a/portal-2/src/app/landingPages/dataset/dataset.component.ts +++ b/portal-2/src/app/landingPages/dataset/dataset.component.ts @@ -2,7 +2,6 @@ import {Component, ViewChild} from '@angular/core'; import {Observable} from 'rxjs/Observable'; import {DatasetService} from '../../services/dataset.service'; import {DatasetInfo} from '../../utils/entities/datasetInfo'; -import {Metrics} from '../../utils/entities/metrics'; import {ActivatedRoute} from '@angular/router'; import {OpenaireProperties} from '../../utils/properties/openaireProperties' import {InlineClaimContextComponent} from '../../claimPages/inlineClaims/inlineClaimContext.component'; @@ -28,11 +27,10 @@ export class DatasetComponent { } }); + this.metricsClicked = false; } public datasetInfo: DatasetInfo; - private metrics: Metrics; - private showStyle: boolean = false; private showAllReferences: boolean = false; private showAllRelResData: boolean = false; @@ -40,7 +38,7 @@ export class DatasetComponent { private showAllBioentities: boolean = false; private datasetId : string ; private result ; - + private metricsClicked: boolean; @ViewChild (InlineClaimProjectComponent) inlineClaimProject : InlineClaimProjectComponent ; @ViewChild (InlineClaimContextComponent) inlineClaimContext : InlineClaimContextComponent ; @@ -74,18 +72,6 @@ export class DatasetComponent { } - getMetrics() { - console.info("getDatasetMetrics: component"); - this._datasetService.getMetrics(this.datasetId).subscribe( - data => { - this.metrics = data; - }, - err => { - console.log(err); - } - ); - } - /********** Methods for Inline Claim of project / dataset ******/ toggleClaimProject(){ this.inlineClaimProject.toggle(); diff --git a/portal-2/src/app/landingPages/landing.module.ts b/portal-2/src/app/landingPages/landing.module.ts index 1f41bab2..b43baf4e 100644 --- a/portal-2/src/app/landingPages/landing.module.ts +++ b/portal-2/src/app/landingPages/landing.module.ts @@ -1,4 +1,4 @@ - +//import {MaterialModule} from '@angular/material'; import { NgModule} from '@angular/core'; import { CommonModule } from '@angular/common'; import { FormsModule } from '@angular/forms'; @@ -15,6 +15,7 @@ import {ShowTitleComponent} from './showTitle.component'; import {ShowAuthorsComponent} from './showAuthors.component'; import {ShowIdentifiersComponent} from './showIdentifiers.component'; import {ShowSubjectsComponent} from './showSubjects.component'; +import {MetricsComponent} from './metrics.component'; import {PublicationsTabComponent} from './dataProvider/publicationsTab.component'; import {DatasetsTabComponent} from './dataProvider/datasetsTab.component'; @@ -25,7 +26,6 @@ import {OrganizationsTabComponent} from './dataProvider/organizationsTab.compone import {RelatedDatasourcesTabComponent} from './dataProvider/relatedDatasourcesTab.component'; import {TabsComponent} from './dataProvider/tabs.component'; - import {DataProviderComponent} from './dataProvider/dataProvider.component'; import { PersonComponent } from './person/person.component'; import { ProjectComponent } from './project/project.component'; @@ -37,6 +37,7 @@ import { LandingRoutingModule } from './landing-routing.module'; @NgModule({ imports: [ + //MaterialModule.forRoot(), CommonModule, FormsModule, UtilsModule, ClaimModule, @@ -46,7 +47,7 @@ import { LandingRoutingModule } from './landing-routing.module'; ], declarations: [ - TabPagingComponent, TabTableComponent, ShowTitleComponent, ShowAuthorsComponent,ShowIdentifiersComponent,ShowSubjectsComponent, + TabPagingComponent, TabTableComponent, ShowTitleComponent, ShowAuthorsComponent,ShowIdentifiersComponent,ShowSubjectsComponent, MetricsComponent, PublicationsTabComponent, DatasetsTabComponent, StatisticsTabComponent, ProjectsTabComponent, DatasourcesTabComponent, OrganizationsTabComponent, RelatedDatasourcesTabComponent, TabsComponent, DataProviderComponent, PersonComponent, ProjectComponent, PublicationComponent, OrganizationComponent, DatasetComponent, ], diff --git a/portal-2/src/app/landingPages/metrics.component.ts b/portal-2/src/app/landingPages/metrics.component.ts new file mode 100644 index 00000000..f0acb837 --- /dev/null +++ b/portal-2/src/app/landingPages/metrics.component.ts @@ -0,0 +1,108 @@ +import {Component, Input} from '@angular/core'; +import {Metrics} from '../utils/entities/metrics'; +import {MetricsService } from '../services/metrics.service'; + +@Component({ + selector: 'metrics', + template: ` +
      + Metrics are currently unavailable +
      + + + + + + + + + + + + + + + + + + + +
      Total Downloads + Total Publication Downloads + Total Views + Total Publication Views +
      + {{metrics.totalDownloads}} + + {{metrics.totalViews}} +
      + + + + + + + + + + + + + + + + +
      FromNumber Of DownloadsNumber Of Views
      + + {{metrics.infos.get(key).name}} + + + {{metrics.infos.get(key).numOfDownloads}} + + {{metrics.infos.get(key).numOfViews}} +
      + ` + }) + +export class MetricsComponent { + @Input() id: string; + @Input() type: string; + @Input() name: string = ""; + metrics: Metrics; + + constructor (private _metricsService: MetricsService) {} + + ngOnInit() { + this.getMetrics(); + } + + + getMetrics() { + //if(this.id == undefined || this.id == "") { + // console.log("supplied id in metrics is not acceptable"); + //} + //if(this.type == undefined || this.type == "") { + // console.log("supplied id in metrics is not acceptable"); + //} + + this._metricsService.getMetrics(this.id, this.type).subscribe( + data => { + this.metrics = data; + }, + err => { + console.log(err); + } + ); + } +} diff --git a/portal-2/src/app/landingPages/organization/organization.component.html b/portal-2/src/app/landingPages/organization/organization.component.html index afb75ddf..04bdd8e0 100644 --- a/portal-2/src/app/landingPages/organization/organization.component.html +++ b/portal-2/src/app/landingPages/organization/organization.component.html @@ -1,158 +1,161 @@ -
      -
      -
      -
      -

      - - {{organizationInfo.title['name']}} - -

      - {{organizationInfo.title['name']}} -

      -

      -
      - - +
      + + + + +
      +
      + -
      -
      -
      Name:
      -
      {{organizationInfo.name}}
      -
      Country:
      -
      {{organizationInfo.country}}
      -
      + +
      +
      Name:
      +
      {{organizationInfo.name}}
      +
      Country:
      +
      {{organizationInfo.country}}
      +
      - + -
      - -
      - -
      + +
      +

      + The results below are discovered through our pilot algorithms. + Let us know how we are doing! +

      + +
      +
      + Projects funded by {{key}} +
      +
      + +
      + Filter by Funder + + + + +
      + + + + + + + + + + + + + + +
      FunderProject Name
      + {{key}} + + + {{item['name']}} + +

      {{item['name']}}

      + ({{item['code']}}) +
      + +
      +
    • + +
    • + +
      + There are no dataproviders +
      + +
      +

      + The results below are discovered through our pilot algorithms. + Let us know how we are doing! +

      + + + +
      +
    • + +
    +
    + +
    diff --git a/portal-2/src/app/landingPages/organization/organization.component.ts b/portal-2/src/app/landingPages/organization/organization.component.ts index a449b794..e7f158e3 100644 --- a/portal-2/src/app/landingPages/organization/organization.component.ts +++ b/portal-2/src/app/landingPages/organization/organization.component.ts @@ -21,7 +21,7 @@ import {ExportCSVComponent} from '../../utils/exportCSV.component'; export class OrganizationComponent { organizationInfo: OrganizationInfo; - private metrics: string; + //private metrics: string; private organizationId: string; private projectsNum: number = 0; private fundersSet: Set; @@ -110,7 +110,7 @@ export class OrganizationComponent { } ); } - +/* private getMetrics() { console.info("getOrganizationMetrics: component"); this._organizationService.getMetrics(this.organizationId).subscribe( @@ -122,7 +122,7 @@ export class OrganizationComponent { } ); } - +*/ private handleClick(funder: string) { if(this.emptyFundersSet) { this.fundersSet.clear(); diff --git a/portal-2/src/app/landingPages/person/person.component.html b/portal-2/src/app/landingPages/person/person.component.html index 7df87b1c..a081ee61 100644 --- a/portal-2/src/app/landingPages/person/person.component.html +++ b/portal-2/src/app/landingPages/person/person.component.html @@ -1,87 +1,81 @@ -
    -
    -
    -
    -

    {{personInfo.fullname}}

    -
    - - +
    + + + +
    +
    +

    {{personInfo.fullname}}

    + +
    +
    Last name:
    +
    {{personInfo.secondnames}}
    +
    First name:
    +
    {{personInfo.firstname}}
    +
    Country:
    +
    {{personInfo.country}}
    +
    + + + +
    -
    - -
    -
    -
    Last name:
    -
    {{personInfo.secondnames}}
    -
    First name:
    -
    {{personInfo.firstname}}
    -
    Country:
    -
    {{personInfo.country}}
    -
    - - - - -
    - -
    -
      -
    • - Share - Bookmark -
    • -
    -
    +
    +
      +
    • + Share - Bookmark +
    • +
    diff --git a/portal-2/src/app/landingPages/project/project.component.html b/portal-2/src/app/landingPages/project/project.component.html index fa16387f..9cdb3cf3 100644 --- a/portal-2/src/app/landingPages/project/project.component.html +++ b/portal-2/src/app/landingPages/project/project.component.html @@ -1,192 +1,183 @@ -
    -
    -
    -
    -

    {{projectInfo.acronym}}

    -

    {{projectInfo.title}}

    -
    - - -
    +
    + + -
    +
    +
    + +

    {{projectName}}

    -
    - -
    -
    Title:
    -
    {{projectInfo.title}}
    -
    Funding:
    -
    {{projectInfo.funding}}
    -
    Call:
    -
    {{projectInfo.callIdentifier}}
    -
    Contract (GA) number:
    -
    {{projectInfo.contractNum}}
    -
    Start Date:
    -
    {{projectInfo.startDate}}
    -
    End Date:
    -
    {{projectInfo.endDate}}
    -
    Open Access mandate:
    -
    {{projectInfo.openAccessMandate}}
    -
    Special Clause 39:
    -
    {{projectInfo.specialClause39}}
    -
    Organizations:
    -
    - - - {{key}} - - - {{key}} - - , +
    +
    Title:
    +
    {{projectInfo.title}}
    +
    Funding:
    +
    {{projectInfo.funding}}
    +
    Call:
    +
    {{projectInfo.callIdentifier}}
    +
    Contract (GA) number:
    +
    {{projectInfo.contractNum}}
    +
    Start Date:
    +
    {{projectInfo.startDate}}
    +
    End Date:
    +
    {{projectInfo.endDate}}
    +
    Open Access mandate:
    +
    {{projectInfo.openAccessMandate}}
    +
    Special Clause 39:
    +
    {{projectInfo.specialClause39}}
    +
    Organizations:
    +
    + + + {{key}} + + + {{key}} -
    -
    More information:
    -
    + , + +
    +
    More information:
    +
    + {{projectInfo.urlInfo}} -
    -
    -
    - -
    - - - - - +
    +
    +
    +
    +
    + - + + +
    + +
  • + +
  • +
    diff --git a/portal-2/src/app/landingPages/project/project.component.ts b/portal-2/src/app/landingPages/project/project.component.ts index bb57c4a9..212896ed 100644 --- a/portal-2/src/app/landingPages/project/project.component.ts +++ b/portal-2/src/app/landingPages/project/project.component.ts @@ -22,7 +22,7 @@ export class ProjectComponent{ private projectId : string ; public projectInfo: ProjectInfo; - private metrics: string; + private projectName: string; private metricsClicked: boolean; private viewsFrameUrl: string; @@ -119,8 +119,9 @@ export class ProjectComponent{ data => { this.projectInfo = data; this.project= { funderId: "", funderName: this.projectInfo.funder, projectId: this.projectId, projectName: this.projectInfo.title, projectAcronym: this.projectInfo.acronym, startDate: this.projectInfo.startDate, endDate: this.projectInfo.endDate }; - console.log(this.project); + this.projectName = (this.projectInfo.acronym != undefined && this.projectInfo.acronym != '') ? this.projectInfo.acronym : this.projectInfo.title; + this.viewsFrameUrl = ('http://vaggelas.athenarc.gr/stats/merge.php?com=query&data=[{"table":"project_stats_monthly","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":"","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":-30,"s":"0","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"Number of views for project '+this.projectName+'","yaxisheaders":["sum of views"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"id","values":["'+this.projectId+'"],"to":"-1"}]}]&info_types=["spline"]&stacking=&steps=false&fontFamily=Courier&spacing=[5,0,0,0]&style=[{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"000000","size":""},{"color":"000000","size":""}]&backgroundColor=rgba(255,255,255,1)&colors[]=rgba(124, 181, 236, 1)&colors[]=rgba(67, 67, 72, 1)&colors[]=rgba(144, 237, 125, 1)&colors[]=rgba(247, 163, 92, 1)&colors[]=rgba(128, 133, 233, 1)&colors[]=rgba(241, 92, 128, 1)&colors[]=rgba(228, 211, 84, 1)&colors[]=rgba(43, 144, 143, 1)&colors[]=rgba(244, 91, 91, 1)&colors[]=rgba(145, 232, 225, 1)&xlinew=0&ylinew=1&legends=true&tooltips=true'); }, err => { console.log(err); @@ -129,22 +130,6 @@ export class ProjectComponent{ ); } - getMetrics() { - this.metricsClicked = true; - let projectName: string = (this.projectInfo.acronym != undefined && this.projectInfo.acronym != '') ? this.projectInfo.acronym : this.projectInfo.title; - this.viewsFrameUrl = ('http://vaggelas.athenarc.gr/stats/merge.php?com=query&data=[{"table":"project_stats_monthly","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":"","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":-30,"s":"0","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"Number of views for project '+projectName+'","yaxisheaders":["sum of views"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"id","values":["'+this.projectId+'"],"to":"-1"}]}]&info_types=["spline"]&stacking=&steps=false&fontFamily=Courier&spacing=[5,0,0,0]&style=[{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"000000","size":""},{"color":"000000","size":""}]&backgroundColor=rgba(255,255,255,1)&colors[]=rgba(124, 181, 236, 1)&colors[]=rgba(67, 67, 72, 1)&colors[]=rgba(144, 237, 125, 1)&colors[]=rgba(247, 163, 92, 1)&colors[]=rgba(128, 133, 233, 1)&colors[]=rgba(241, 92, 128, 1)&colors[]=rgba(228, 211, 84, 1)&colors[]=rgba(43, 144, 143, 1)&colors[]=rgba(244, 91, 91, 1)&colors[]=rgba(145, 232, 225, 1)&xlinew=0&ylinew=1&legends=true&tooltips=true'); - - console.info("getProjectMetrics: component"); - this._projectService.getMetrics(this.projectId).subscribe( - data => { - this.metrics = data; - }, - err => { - console.log(err); - } - ); - } - /* ********* Methods for Inline Claim of results ***** */ diff --git a/portal-2/src/app/landingPages/publication/publication.component.html b/portal-2/src/app/landingPages/publication/publication.component.html index 3a8b64d3..470b2016 100644 --- a/portal-2/src/app/landingPages/publication/publication.component.html +++ b/portal-2/src/app/landingPages/publication/publication.component.html @@ -1,125 +1,140 @@ -
    -
    -
    - +
    + + + + + +
    +
    + + + + + + + +
    + + ({{publicationInfo.date}})
    - - -
    -
    +
    +
    Publisher:
    +
    {{publicationInfo.publisher}}
    +
    Journal:
    +
    + {{publicationInfo.journal['journal']}} + + ( + + + issn: {{publicationInfo.journal['issn']}} + + + lissn: {{publicationInfo.journal['lissn']}} + + + ) + +
    +
    Languages:
    +
    {{publicationInfo.languages}}
    +
    Types:
    +
    {{publicationInfo.types}}
    +
    Embargo end date:
    +
    {{publicationInfo.embargoEndDate}}
    -
    -
    - - ({{publicationInfo.date}}) -
    + + + +
    -
    -
    Publisher:
    -
    {{publicationInfo.publisher}}
    -
    Journal:
    -
    - {{publicationInfo.journal['journal']}} - - ( +
    +
    +
    +
    + +
    + + +
    -
    Languages:
    -
    {{publicationInfo.languages}}
    -
    Types:
    -
    {{publicationInfo.types}}
    -
    Embargo end date:
    -
    {{publicationInfo.embargoEndDate}}
    +
    + +
  • + + Bioentities + {{bioentitiesNum}} + +
  • +
  • + + Software + {{publicationInfo.software.length}} + +
  • +
  • + + Metrics + +
  • + - - - -
    +
    + - -
  • -
    - There are no similar research results -
    -
    -

    - The results below are discovered through our pilot algorithms. - Let us know how we are doing! -

    - - -
    -
  • -
  • +
  • +
    + There are no related research results +
    +

    The results below are discovered through our pilot algorithms. Let us know how we are doing!

    - - - - - - - - - - - - - -
    Bio EntitySite Name
    - - {{keyIn}} - - - {{key}} -
    -
  • -
  • + + +
  • + + + +
  • +
    + There are no similar research results +
    +

    The results below are discovered through our pilot algorithms. Let us know how we are doing!

    - - - - - - - - - - - -
    Site Name
    - - {{item.name}} - -
    -
  • -
  • -
    - Metrics are currently unavailable -
    -
    -
    TotalDownloads:
    -
    {{metrics.totalDownloads}}
    -
    TotalViews:
    -
    {{metrics.totalViews}}
    -
    - - - - - - - - - - - - - - - -
    IDNumber Of DownloadsNumber Of Views
    - - {{key}} - - - {{metrics.infos.get(key).numOfDownloads}} - - {{metrics.infos.get(key).numOfViews}} -
    - - -
  • - -
    -
    - - +
    -
  • -
    -
    Funded By
    -
    - - View less + -
    -
    - - View less - -
    -
    - - View more - -
    -
    + + +
  • +
  • +
    +
    Related to
    +
    + + {{item['labelContext']}} + -> {{item['labelCategory']}} + : {{item['labelConcept']}} + + + {{item['labelContext']}} + -> {{item['labelCategory']}} + : {{item['labelConcept']}} + +
    +
    +
    +
    Related to
    - - -
  • -
  • -
    -
    Related to
    -
    - - {{item['labelContext']}} - -> {{item['labelCategory']}} - : {{item['labelConcept']}} - - - {{item['labelContext']}} - -> {{item['labelCategory']}} - : {{item['labelConcept']}} - -
    -
    -
    -
    Related to
    - -
    - - -
  • - -
    + + + + +
    +
    +
    Login Form
    diff --git a/portal-2/src/app/sharedComponents/navigationBar.component.ts b/portal-2/src/app/sharedComponents/navigationBar.component.ts index 7257a5c3..a302fc69 100644 --- a/portal-2/src/app/sharedComponents/navigationBar.component.ts +++ b/portal-2/src/app/sharedComponents/navigationBar.component.ts @@ -90,6 +90,22 @@ import 'rxjs/Rx'; +
    +
      + +
    +
    diff --git a/portal-2/src/app/utils/entities/metrics.ts b/portal-2/src/app/utils/entities/metrics.ts index e71a83ec..6d18cd76 100644 --- a/portal-2/src/app/utils/entities/metrics.ts +++ b/portal-2/src/app/utils/entities/metrics.ts @@ -1,5 +1,5 @@ export class Metrics { totalDownloads: string; totalViews: string; - infos: Map; + infos: Map; } diff --git a/portal-2/src/app/utils/properties/openaireProperties.ts b/portal-2/src/app/utils/properties/openaireProperties.ts index 9fb979af..52fe6f9f 100644 --- a/portal-2/src/app/utils/properties/openaireProperties.ts +++ b/portal-2/src/app/utils/properties/openaireProperties.ts @@ -36,16 +36,19 @@ export class OpenaireProperties { // private static searchAPIURL = "http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/"; - private static searchAPIURLLAst = "http://astero.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/"; + private static searchAPIURLLAst = "http://astero.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/"; // private searchAPIURL = "http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2.0/api/"; // private static searchAPIURL = "http://scoobydoo.di.uoa.gr:8181/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/"; // private static searchAPIURLLAst = "http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/"; //private static searchAPIURLLAst = "http://scoobydoo.di.uoa.gr:8181/dnet-functionality-services-2.0.0-SNAPSHOT-new/rest/v2/api/"; + //private static searchAPIURLLAst = "http://scoobydoo.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/"; // private static searchResourcesAPIURL = "http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/resources"; - private static searchResourcesAPIURL = "http://scoobydoo.di.uoa.gr:8181/dnet-functionality-services-2.0.0-SNAPSHOT-new/rest/v2/api/resources"; + //private static searchResourcesAPIURL = "http://scoobydoo.di.uoa.gr:8181/dnet-functionality-services-2.0.0-SNAPSHOT-new/rest/v2/api/resources"; + private static searchResourcesAPIURL = "http://astero.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/resources"; + //private static searchServiveURL = "http://astero.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/"; private static searchServiveURL = "http://scoobydoo.di.uoa.gr:8181/dnet-functionality-services-2.0.0-SNAPSHOT/"; diff --git a/portal-2/src/app/utils/showDataProviders.component.ts b/portal-2/src/app/utils/showDataProviders.component.ts index 284faa41..53d85972 100644 --- a/portal-2/src/app/utils/showDataProviders.component.ts +++ b/portal-2/src/app/utils/showDataProviders.component.ts @@ -15,7 +15,7 @@ import {Component, Input} from '@angular/core';