From b500fcb95757fdbdfc67581b0e3380315148e59d Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Thu, 4 May 2023 11:58:11 +0300 Subject: [PATCH] resultLanding: use common structure for metrics (measure) --- .../result/resultLanding.component.html | 288 +++++++----------- .../result/resultLanding.component.ts | 8 +- 2 files changed, 119 insertions(+), 177 deletions(-) diff --git a/landingPages/result/resultLanding.component.html b/landingPages/result/resultLanding.component.html index b65506c3..0f85204b 100644 --- a/landingPages/result/resultLanding.component.html +++ b/landingPages/result/resultLanding.component.html @@ -325,7 +325,7 @@ - + @@ -374,49 +374,69 @@ -
-
-
-
-
-
+ + +
+ +
+
+
+ + +
+ +
+
+
-
- Citations - -
-
- Popularity - -
-
- Influence - -
-
- Downloads - -
-
- Views - -
+ + + + + + + + + +
-
{{formatNumber(resultLandingInfo.measure.citations)}}
-
{{resultLandingInfo.measure.popularity}}
-
{{resultLandingInfo.measure.influence}}
-
{{formatNumber(resultLandingInfo.measure.downloads)}}
-
{{formatNumber(resultLandingInfo.measure.views)}}
+ + + +
+ {{formatNumber(measure.value)}} +
+
+ +
+ {{measure.value}} +
+
+
+
+ + +
+ {{formatNumber(measure.value)}} +
+
+
@@ -1009,13 +1029,13 @@
  • Overview
  • -
  • +
  • Impact
  • Social
  • -
  • +
  • Usage
  • @@ -1023,7 +1043,7 @@
  • -
    +
    @@ -1040,54 +1060,20 @@
    - - - - - - - - - - - - - - - - - - - - + + + + + + +
    - - - Citations - - - {{formatNumber(resultLandingInfo.measure.citations)}} -
    - - - Popularity - - - {{resultLandingInfo.measure.popularity}} -
    - - - Influence - - - {{resultLandingInfo.measure.influence}} -
    - - - Impulse - - - {{resultLandingInfo.measure.impulse}} -
    + + + {{measure.name}} + + + {{isNumber(measure.value) ? formatNumber(measure.value) : measure.value}} +
    @@ -1096,7 +1082,7 @@
    -
    +
    @@ -1112,32 +1098,21 @@
    - - - - - - - - - - + + + + + + +
    - - - Downloads - - {{formatNumber(resultLandingInfo.measure.downloads)}} -
    - - - Views - - {{formatNumber(resultLandingInfo.measure.views)}} -
    + + + {{measure.name}} + + {{formatNumber(measure.value)}} +
    @@ -1146,59 +1121,25 @@
  • -
  • +
  • - - - - - - - - - - - - - - - - - - - - + + + + + + +
    - - - Citations - - - {{formatNumber(resultLandingInfo.measure.citations)}} -
    - - - Popularity - - - {{resultLandingInfo.measure.popularity}} -
    - - - Influence - - - {{resultLandingInfo.measure.influence}} -
    - - - Impulse - - - {{resultLandingInfo.measure.impulse}} -
    + + + {{measure.name}} + + + {{isNumber(measure.value) ? formatNumber(measure.value) : measure.value}} +
    @@ -1221,22 +1162,17 @@
  • -
  • +
  • -
    -
    {{formatNumber(resultLandingInfo.measure.downloads)}}
    -
    Downloads
    -
    -
    -
    {{formatNumber(resultLandingInfo.measure.views)}}
    -
    Views
    -
    + +
    +
    {{formatNumber(measure.value)}}
    +
    {{measure.name}}
    +
    +
    diff --git a/landingPages/result/resultLanding.component.ts b/landingPages/result/resultLanding.component.ts index 5b1c9b53..815cd238 100644 --- a/landingPages/result/resultLanding.component.ts +++ b/landingPages/result/resultLanding.component.ts @@ -1084,11 +1084,17 @@ export class ResultLandingComponent { return "
    This indicator reflects the \"current\" impact/attention (the \"hype\") of an article in the research community at large, based on the underlying citation network.
    BIP!Popularity provided by BIP!
    "; } else if (value == 'influence') { return "
    This indicator reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically).
    BIP!Influence provided by BIP!
    "; - } else if (value == 'downloads') { + } else if (value == 'impulse') { + return "
    This indicator reflects the initial momentum of an article directly after its publication, based on the underlying citation network.
    BIP!Impulse provided by BIP!
    "; + } else if (value == 'downloads') { return "
    OpenAIRE UsageCountsDownloads provided by UsageCounts
    "; } else if (value == 'views') { return "
    OpenAIRE UsageCountsViews provided by UsageCounts
    "; } } } + + public isNumber(value): boolean { + return typeof value === 'number'; + } }