Project

General

Profile

« Previous | Next » 

Revision 46983

Show claims by project token to project manager | metrics updated - openaire referrer added - pageviws added | selectModal created (currently not used anywhere)

View differences:

modules/uoa-services-portal/trunk/portal-2/src/app/utils/entities/metrics.ts
1 1
export class Metrics {
2 2
    totalDownloads: string;
3 3
    totalViews: string;
4
    infos: Map<string, {"name": string, "url": string, "numOfDownloads": string, "numOfViews": string}>;
4
    totalOpenaireViews: string;
5
    totalOpenaireDownloads: string;
6
    pageViews: string;
7
    infos: Map<string, {"name": string, "url": string, "numOfDownloads": string, "numOfViews": string, "openaireDownloads": string, "openaireViews": string}>;
5 8
}
modules/uoa-services-portal/trunk/portal-2/src/app/utils/modal/selectModal.component.ts
1
import {Component, ViewEncapsulation, ComponentRef, ElementRef, Input, EventEmitter, Output} from '@angular/core';
2

  
3
@Component({
4
  selector: 'modal-select',
5
  template: `
6
  <div [class]="(!isOpen)?'uk-modal ':'uk-modal uk-open uk-animation-fade'"   [open]="!isOpen"   data-uk-modal="{center:true}" tabindex="-1" role="dialog" >
7
    <div class="uk-modal-dialog" role="">
8
      <div class="modal-content">
9

  
10
        <div class="modal-body">
11
          <div >
12
          <h3 class="text-center" >{{message}}</h3>
13
          <!--div class="uk-button uk-form-select uk-active" data-uk-form-select="">
14
            <span class=""></span>
15
            <i class="uk-icon-caret-down"></i>
16
            <select (change)="selected=$event.target.value">
17
                <option *ngFor="let option of options" value="option">aa</option>
18
            </select>
19
          </div-->
20

  
21
          <div class="uk-form-select" data-uk-form-select>
22
            <span></span>
23
            <select (change)="selected=$event.target.value">
24
                <option *ngFor="let option of options let i=index" value="{{option}}">{{option}}</option>
25
            </select>
26
          </div>
27

  
28
          <div class="uk-modal-footer uk-text-right">
29
            <button class="uk-button" (click)="close()">Proceed</button>
30
          </div>
31
        </div>
32

  
33
      </div>
34
    </div>
35
  </div>
36
  <!--div   class="uk-modal uk-open" aria-hidden="false" style="display: block; overflow-y: scroll;">
37
                            <div class="uk-modal-dialog" tabindex="">
38
                                <div class="uk-modal-spinner"></div>
39
                            </div>
40
                        </div-->
41
  `,
42
  encapsulation: ViewEncapsulation.None,
43
})
44
/**
45
  * API to an open alert window.
46
  */
47
export class ModalSelect{
48

  
49
@Input() public message:string ="Loading";
50
@Input() public options:string[] = [];
51

  
52
public selected: string;
53

  
54
  /**
55
    * if the value is true alert will be visible or else it will be hidden.
56
    */
57
  public isOpen:boolean=false;
58
  /**
59
    * Emitted when a ok button was clicked
60
    * or when Ok method is called.
61
    */
62
  @Output() public alertOutput:EventEmitter<any> = new EventEmitter();
63
  constructor( public _elementRef: ElementRef){}
64
  /**
65
       * Opens a alert window creating backdrop.
66
       */
67
  open(){
68
    this.isOpen= true;
69
  }
70

  
71
  close(){
72
    this.isOpen = false;
73
    if(!this.selected) {
74
      this.selected = this.options[0];
75
    }
76
    this.alertOutput.emit(this.selected);
77
  }
78

  
79
}
modules/uoa-services-portal/trunk/portal-2/src/app/utils/modal/selectModal.module.ts
1
import { NgModule }            from '@angular/core';
2
import { CommonModule }        from '@angular/common';
3
import { FormsModule }         from '@angular/forms';
4

  
5
 import {ModalSelect} from './selectModal.component';
6
import {ModalModule} from './modal.module';
7

  
8
//helpers
9

  
10
@NgModule({
11
  imports: [ CommonModule, FormsModule,ModalModule  ],
12
  declarations: [
13
    ModalSelect
14
  ],
15
  exports: [
16
   ModalSelect
17
  ]
18
})
19
export class SelectModalModule { }
modules/uoa-services-portal/trunk/portal-2/src/app/utils/properties/openaireProperties.ts
28 28
//http://rudie.di.uoa.gr:6081/dnet-functionality-services-2.0.0-SNAPSHOT
29 29
    // Services - APIs
30 30

  
31
    private static metricsAPIURL = "http://vatopedi.di.uoa.gr:8080/stats/";
31
    private static metricsAPIURL = "http://vatopedi.di.uoa.gr:8080/usagestats/";
32 32
    private static framesAPIURL = "http://vatopedi.di.uoa.gr/stats2/";
33 33

  
34 34
    private static loginAPIURL = "http://mpagasas.di.uoa.gr:8080/uoa-user-management-1.0.0-SNAPSHOT/api/users/authenticates";
modules/uoa-services-portal/trunk/portal-2/src/app/services/metrics.service.ts
12 12
    constructor(private http: Http, public _cache: CacheService) {}
13 13

  
14 14
    getMetrics (id: string, entity: string):any {
15
        console.info("getPublicationViews in service");
15
        console.info("getMetrics in service");
16 16
        //let url = OpenaireProperties. getSearchAPIURLLast() + 'publications/' +id+"?format=json";
17 17
        let url = OpenaireProperties.getMetricsAPIURL()+entity+"/"+id+"/clicks";
18 18
        let key = url;
19 19
        if (this._cache.has(key)) {
20 20
          return Observable.of(this._cache.get(key));
21 21
        }
22

  
22 23
        return this.http.get(url)
23 24
                    .map(res => <any> res.json())
24
                    .map(res => this.parseMetrics(res["downloads"], res["views"], res["total_downloads"], res["total_views"]))
25
                    .map(res => this.parseMetrics(res["downloads"], res["views"], res["total_downloads"], res["total_views"],
26
                                                  res["total_openaire_views"], res["total_openaire_downloads"], res["pageviews"]))
25 27
                    .do(res => {
26 28
                      this._cache.set(key, res);
27 29
                    });
28 30
    }
29 31

  
30 32

  
31
    parseMetrics(downloads: string, views: string, totalDownloads: any, totalViews: any): any {
32

  
33
    parseMetrics(downloads: any, views: any, totalDownloads: string, totalViews: string,
34
                totalOpenaireViews: string, totalOpenaireDownloads: string, pageViews: string): any {
33 35
        this.metrics = new Metrics();
34 36

  
35 37
        this.metrics.totalDownloads = totalDownloads;
36 38
        this.metrics.totalViews = totalViews;
39
        this.metrics.totalOpenaireViews = totalOpenaireViews;
40
        this.metrics.totalOpenaireDownloads = totalOpenaireDownloads;
41
        this.metrics.pageViews = pageViews;
37 42

  
38
        this.metrics.infos = new Map<string, {"name": string, "url": string, "numOfDownloads": string, "numOfViews": string}>();
43
        this.metrics.infos = new Map<string, {"name": string, "url": string, "numOfDownloads": string, "numOfViews": string, "openaireDownloads": string, "openaireViews": string}>();
39 44

  
40 45
        for(let i=0; i<downloads.length; i++) {
41 46
            let id: string = downloads[i]['datasource_id'];
42 47
            if(this.metrics.infos.has(id)) {
43 48
                this.metrics.infos.get(id).numOfDownloads = downloads[i]['value'];
49
                this.metrics.infos.get(id).openaireDownloads = downloads[i]['openaire'];
44 50
            } else {
45 51
                let info;//: {"url": string, "numOfDownloads": string, "numOfViews": string};
46 52
                info = {};
......
48 54
                info.name = downloads[i]['datasource_name'];
49 55
                info.url = OpenaireProperties.getsearchLinkToDataProvider()+id;
50 56
                info.numOfDownloads = downloads[i]['value'];
57
                info.openaireDownloads = downloads[i]['openaire'];
51 58
                info.numOfViews = "0";
59
                info.openaireViews = "0";
52 60

  
53 61
                this.metrics.infos.set(id, info);
54 62
            }
......
58 66
            let id: string = views[i]['datasource_id'];
59 67
            if(this.metrics.infos.has(id)) {
60 68
                this.metrics.infos.get(id).numOfViews = views[i]['value'];
69
                this.metrics.infos.get(id).openaireViews = views[i]['openaire'];
61 70
            } else {
62 71
                let info;//: {"url": string, "numOfDownloads": string, "numOfViews": string};
63 72
                info = {};
......
65 74
                info.name = views[i]['datasource_name'];
66 75
                info.url = OpenaireProperties.getsearchLinkToDataProvider()+id;
67 76
                info.numOfDownloads = "0";
77
                info.openaireDownloads = "0";
68 78
                info.numOfViews = views[i]['value'];
79
                info.openaireViews = views[i]['openaire'];
69 80

  
70 81
                this.metrics.infos.set(id, info);
71 82
            }
modules/uoa-services-portal/trunk/portal-2/src/app/searchPages/searchUtils/searchResult.component.ts
17 17
                <!--a href="{{result['title'].url}}"-->
18 18
                <!--a [queryParams]="{articleId: 'od_______908::3a5b2885656a91307156325644e73b92'}" routerLinkActive="router-link-active" routerLink="search/publication"-->
19 19

  
20
                <a href="/search/{{type}}?{{urlParam}}={{result.id}}">
20
                <a [queryParams]="routerHelper.createQueryParam(urlParam,result.id)" routerLinkActive="router-link-active" routerLink="/search/{{type}}">
21
                <!--a href="/search/{{type}}?{{urlParam}}={{result.id}}"-->
21 22
                    <p *ngIf="result['title'].name != undefined && result['title'].name != ''"
22 23
                        [innerHTML]="result['title'].name">
23 24
                    </p>
modules/uoa-services-portal/trunk/portal-2/src/app/claims/claimsByToken/claimsByToken-routing.module.ts
1
import { NgModule } from '@angular/core';
2
import { RouterModule } from '@angular/router';
3
import { LoginGuard} from'../../login/loginGuard.guard';
4
import { ClaimsByTokenComponent } from './claimsByToken.component';
5

  
6
@NgModule({
7
  imports: [
8
    RouterModule.forChild([
9
      { path: '', component: ClaimsByTokenComponent, canActivate: [LoginGuard]}
10

  
11
    ])
12
  ]
13
})
14
export class ClaimsByTokenRoutingModule { }
modules/uoa-services-portal/trunk/portal-2/src/app/claims/claimsByToken/claimsByToken.service.ts
1
import {Injectable} from '@angular/core';
2
import {Http, Response} from '@angular/http';
3
import {Jsonp, URLSearchParams,ResponseOptions, RequestOptions, Headers} from '@angular/http';
4
import {Observable}     from 'rxjs/Observable';
5
import {OpenaireProperties} from '../../utils/properties/openaireProperties';
6
import 'rxjs/add/operator/do';
7
import { CacheService  } from '../../shared/cache.service';
8
@Injectable()
9
export class ClaimsByTokenService {
10

  
11
    constructor(private http: Http, public _cache: CacheService) {}
12

  
13
    getClaims(token: string, user_token: string):any {
14
        console.info("getClaims in service");
15

  
16
        let url = OpenaireProperties.getClaimsAPIURL()+"projects/corda__h2020::94c962e736df90a5075a7f660ba3d7f6/claims"
17
                    +"?&token="+user_token;
18
console.info(url);
19
        let key = url;
20
        if (this._cache.has(key)) {
21
          return Observable.of(this._cache.get(key));
22
        }
23
        return this.http.get(url)
24
                    //.map(res => <any> res.text())
25
                    .map(request => <any> request.json())
26
                    .do(res => {
27
                      this._cache.set(key, res);
28
                    });
29
    }
30

  
31

  
32
/*
33
    getClaims(email: string, token: string, user_token: string):any {
34
      let url = OpenaireProperties.getClaimsAPIURL();   // What else?
35
      let body = JSON.stringify( {"email": email, "token": token} );
36
      console.warn('Json body:  : '+body);
37
      let headers = new Headers({ 'Content-Type': 'application/json' });
38
      let options = new RequestOptions({ headers: headers });
39
      return this.http.post(url, body, options)
40
                            .map(res => res.json())
41
                            .do(request => console.info("Insert Response:"+request.status) )
42
                            .catch(this.handleError);
43
    }
44
*/
45

  
46
  updateClaimsCuration(token: string, selectedRight: Set<string>, selectedWrong: Set<string>) {
47
    let url = OpenaireProperties.getClaimsAPIURL();   // What else?
48
    let claimsCurationInfo: any = [];
49
    for(let selected in selectedRight) {
50
      let claimCurationInfo: any = {"claim_id": selected, "approved": true, "token": token};
51
      claimsCurationInfo.add(claimCurationInfo);
52
    }
53
    for(let selected in selectedWrong) {
54
      let claimCurationInfo: any = {"claim_id": selected, "approved": false, "token": token};
55
      claimsCurationInfo.add(claimCurationInfo);
56
    }
57
    let body = JSON.stringify( claimsCurationInfo );
58
    console.warn('Json body:  : '+body);
59
    let headers = new Headers({ 'Content-Type': 'application/json' });
60
    let options = new RequestOptions({ headers: headers });
61
    return this.http.post(url, body, options)
62
                          .map(res => res.json())
63
                          .do(request => console.info("Insert Response:"+request.status) )
64
                          .catch(this.handleError);
65
  }
66

  
67
  private handleError (error: Response) {
68
    // in a real world app, we may send the error to some remote logging infrastructure
69
    // instead of just logging it to the console
70
    console.log(error);
71
    return Observable.throw(error  || 'Server error');
72
  }
73
}
modules/uoa-services-portal/trunk/portal-2/src/app/claims/claimsByToken/claimsByToken.component.ts
1
import {Component, ViewChild, Input} from '@angular/core';
2
import {Location} from '@angular/common';
3
import {Observable}       from 'rxjs/Observable';
4
import {ActivatedRoute, Router, Params} from '@angular/router';
5
import {ClaimsByTokenService} from './claimsByToken.service';
6

  
7
import {ModalSelect} from '../../utils/modal/selectModal.component';
8
import {ModalLoading} from '../../utils/modal/loading.component';
9

  
10
import {Session} from '../../login/utils/helper.class';
11

  
12
@Component({
13
    selector: 'claims-project-manager',
14
    template: `
15

  
16
      <!--div class="page-header">
17
          <h1> Claims Manager </h1>
18
      </div-->
19

  
20
      <!--div *ngIf="accessStatus=='empty'" class="uk-margin-top uk-width-medium-2-3 uk-container-center">
21
        <div class="uk-block uk-block-primary uk-block-large uk-contrast uk-text-center">
22
          <p class="uk-text-large">Please enter your email and then press 'See Claims' button.</p>
23
          <form class="uk-form">
24
            <fieldset data-uk-margin>
25
                <input type="text" placeholder="example@email.com" name="email" [(ngModel)]="email">
26
                <button (click)="validateJWTandToken()" class="uk-button">See Claims</button>
27
            </fieldset>
28
          </form>
29
        </div>
30
      </div-->
31

  
32
      <div *ngIf="accessStatus=='invalid'" class="uk-margin-top uk-width-medium-2-3 uk-container-center">
33
        <div class="uk-block uk-block-primary uk-block-large uk-contrast uk-text-center">
34
          <!--p class="uk-text-large">Oops! There is no entry for you! Please retry with another email or for another project.</p-->
35
          <!--button (click)="accessStatus='empty'" class="uk-button">Retry</button-->
36
          <p class="uk-text-large">Oops! Your email does not give you the authority to view claims for the selected project. Please contact the administrators.</p>
37
        </div>
38
      </div>
39

  
40
      <div *ngIf="accessStatus=='valid'">
41
        <h1> Pending Claims </h1>
42

  
43
        <div *ngIf=" pending_claims && pending_claims.length == 0" >
44
          <div class = "uk-alert uk-alert-info " >No pending claims found.</div>
45
        </div>
46

  
47
        <div class="">
48
        <table *ngIf="pending_claims && pending_claims.length > 0" class="uk-table uk-table-striped">
49
          <thead>
50
             <tr>
51
                <th>Research Result</th>
52
                <th>Link to</th>
53
                <th>Claimed by</th>
54
                <th>Claimed Date</th>
55
                <th>True</th>
56
                <th>False</th>
57
             </tr>
58
          </thead>
59
          <tbody>
60
              <tr *ngFor="let claim of pending_claims ">
61
                <td><claim-entity [entity]="claim.target" [type]="claim.targetType" > </claim-entity></td>
62
                <td><claim-entity [entity]="claim.source" [type]="claim.sourceType" > </claim-entity></td>
63
                <td>{{claim.userMail}}</td>
64
                <td>{{claim.date}}</td>
65
                <td><input [id]="claim.id" type="checkbox" (click)="selectApprove(claim.id,$event)"  [ngModel]="isSelectedRight(claim.id)"/></td>
66
                <td><input [id]="claim.id" type="checkbox" (click)="selectDisapprove(claim.id,$event)"  [ngModel]="isSelectedWrong(claim.id)"/></td>
67
              </tr>
68
          </tbody>
69
        </table>
70

  
71

  
72
        <h1> Already Curated Claims </h1>
73

  
74
        <div *ngIf=" curated_claims && curated_claims.length == 0" >
75
          <div class = "uk-alert uk-alert-info " >No curated claims found.</div>
76
        </div>
77

  
78
        <div class="">
79
        <table *ngIf="curated_claims && curated_claims.length > 0" class="uk-table uk-table-striped">
80
          <thead>
81
             <tr>
82
                <th>Research Result</th>
83
                <th>Link to</th>
84
                <th>Claimed by</th>
85
                <th>Claimed Date</th>
86
                <th>Curated by</th>
87
                <th>Curation Date</th>
88
                <th>True</th>
89
                <th>False</th>
90
                <th></th>
91
             </tr>
92
          </thead>
93
          <tbody>
94
              <tr *ngFor="let claim of curated_claims let i=index">
95
                <td><claim-entity [entity]="claim.target" [type]="claim.targetType" > </claim-entity></td>
96
                <td><claim-entity [entity]="claim.source" [type]="claim.sourceType" > </claim-entity></td>
97
                <td>{{claim.userMail}}</td>
98
                <td>{{claim.date}}</td>
99
                <td>{{claim.curatedBy}}</td>
100
                <td>{{claim.curationDate}}</td>
101
                <td><input [id]="claim.id" type="checkbox" [disabled]="!editable.has(i)" (click)="selectApprove(claim.id,$event)"  [ngModel]="isRight(claim)"/></td>
102
                <td><input [id]="claim.id" type="checkbox" [disabled]="!editable.has(i)" (click)="selectDisapprove(claim.id,$event)"  [ngModel]="isWrong(claim)"/></td>
103
                <td><button class="uk-button" (click)="editable.add(i)">Edit</button></td>
104
              </tr>
105
          </tbody>
106
        </table>
107

  
108

  
109
        <div class="uk-text-small uk-text-right">*Note that claims you did not approved or disapproved are considered as right (but not curated)</div>
110
        <button class="uk-button uk-button-success uk-float-right" type="button" (click)="saveChanges()">Save Changes</button>
111

  
112
        <!--modal-select (alertOutput)="curatorSelected($event)"></modal-select-->
113
        <modal-loading [message]= "'Loading...'"></modal-loading>
114
      </div>
115
    `,
116

  
117
})
118
export class ClaimsByTokenComponent {
119
  public token: string = "";
120
  public sub: any;
121
  private claims:any = [];
122
  public pending_claims: any = [];
123
  public curated_claims: any = [];
124
  public selectedRight: Set<string>;
125
  public selectedWrong: Set<string>;
126
  public editable: Set<string>;
127
  public contact_person: string[] = ["Konstantina", "Argiro", "Katerina"];
128

  
129
  // when 'empty' show form to fill email, when 'valid' show proper claims, when 'invalid' show no matched entry-wanna retry
130
  public accessStatus: string;// = "empty";
131

  
132
  @ViewChild (ModalSelect) selectModal : ModalSelect;
133
  @ViewChild (ModalLoading) loading : ModalLoading ;
134

  
135
  constructor ( private route: ActivatedRoute, private _router:Router, private claimsByTokenService: ClaimsByTokenService ) {
136

  
137
  }
138
  ngOnInit() {
139
    this.sub =  this.route.queryParams.subscribe(params => {
140
        this.token = params['token'];
141
        this.selectedRight = new Set<string>();
142
        this.selectedWrong = new Set<string>();
143
        this.editable = new Set<string>();
144
        //this.openSelect();
145
        //this.setMessageSelect("Please select your identity:");
146
        //this.setOptionsSelect(this.contact_person);
147
        this.validateJWTandToken();
148
      }
149
    );
150
  }
151

  
152
  validateJWTandToken() {
153
    var user_token=Session.getUserJwt();
154
    if(this.token) {
155
      this.claimsByTokenService.getClaims(this.token, user_token).subscribe(
156
          data => {
157
            this.closeLoading();
158
            this.accessStatus = "valid";
159
              //console.info(data);
160
              this.claims = data.data;
161
              for(let claim of this.claims) {
162
                if(claim.curatedBy) {
163
                  this.curated_claims.push(claim);
164
                } else {
165
                  this.pending_claims.push(claim);
166
                }
167
              }
168
          },
169
          err => {
170
              this.accessStatus = "invalid";
171
              console.log(err);
172
          }
173
        );
174
      } else {
175
        this.accessStatus = "invalid";
176
      }
177
  }
178

  
179
  selectApprove(id:string, event) {
180
    var value = event.currentTarget.checked;
181
    if(value){
182
      this.selectedRight.add(id);
183
      this.selectedWrong.delete(id);
184
      console.info(this.selectedRight);
185
    }else{
186
      this.selectedRight.delete(id);
187
      console.info(this.selectedRight);
188
    }
189
  }
190

  
191
  selectDisapprove(id:string,event) {
192
    var value = event.currentTarget.checked;
193
    if(value){
194
      this.selectedWrong.add(id);
195
      this.selectedRight.delete(id);
196
    }else{
197
      this.selectedWrong.delete(id);
198
    }
199
  }
200

  
201
  isSelectedRight(id:string) {
202
    return this.selectedRight.has(id);
203
  }
204

  
205
  isSelectedWrong(id:string) {
206
    return this.selectedWrong.has(id);
207
  }
208

  
209
  isRight(claim: any) {
210
    //claim.approved = true;
211
    if(this.isSelectedRight(claim.id)) {
212
      return true;
213
    } else if(claim.approved == true && !this.isSelectedWrong(claim.id)) {
214
      return true;
215
    }
216

  
217
    return false;
218
  }
219

  
220
  isWrong(claim: any) {
221
    if(this.isSelectedWrong(claim.id)) {
222
      return true;
223
    } else if(claim.approved == false && !this.isSelectedRight(claim.id)) {
224
      return true;
225
    }
226

  
227
    return false;
228
  }
229

  
230
  saveChanges() {
231
    console.info("Changes Saved!");
232
    /*
233
    this.claimsByTokenService.updateClaimsCuration(this.token, this.selectedRight, this.selectedWrong).subscribe(
234
        data => {
235
            console.info(data);
236
        },
237
        err => {
238
            console.log(err);
239
        }
240
      );
241
    */
242
  }
243

  
244
  public closeLoading(){
245
    if(this.loading){
246
      this.loading.close();
247
    }
248
  }
249

  
250
  curatorSelected(selected: string) {
251
    console.info("selected curator: "+selected);
252
  }
253

  
254
  public openSelect(){
255
    if(this.selectModal){
256
      this.selectModal.open();
257
    }
258
  }
259

  
260
  public setMessageSelect(message: string){
261
    if(this.selectModal){
262
      this.selectModal.message = message;
263
    }
264
  }
265

  
266
  public setOptionsSelect(options: string[]){
267
    if(this.selectModal){
268
      this.selectModal.options = options;
269
    }
270
  }
271
}
modules/uoa-services-portal/trunk/portal-2/src/app/claims/claimsByToken/claimsByToken.module.ts
1
import { NgModule } from '@angular/core';
2

  
3
import { SharedModule } from '../../shared/shared.module';
4
import { ClaimsByTokenComponent } from './claimsByToken.component';
5
import { ClaimsByTokenService } from './claimsByToken.service';
6
import { ClaimsByTokenRoutingModule } from './claimsByToken-routing.module';
7
import {ClaimEntityFormatterModule} from '../claim-utils/entityFormatter/claimEntityFormatter.module';
8
// import{ClaimServiceModule} from '../claim-utils/service/claimsService.module';
9
//import {DisplayClaimsModule} from '../claim-utils/displayClaims/displayClaims.module';
10
import {SelectModalModule} from '../../utils/modal/selectModal.module';
11
import {LoadingModalModule} from '../../utils/modal/loadingModal.module';
12

  
13
import {LoginGuard} from'../../login/loginGuard.guard';
14

  
15
@NgModule({
16
  imports: [
17
    SharedModule,
18
    ClaimsByTokenRoutingModule,
19
    ClaimEntityFormatterModule,
20
    SelectModalModule,
21
    LoadingModalModule
22
    // ClaimServiceModule,
23
    //DisplayClaimsModule
24

  
25
  ],
26
  providers:[
27
    ClaimsByTokenService,
28
    LoginGuard
29
  ],
30
  declarations: [
31
    ClaimsByTokenComponent
32
  ]
33
})
34
export class ClaimsByTokenModule { }
modules/uoa-services-portal/trunk/portal-2/src/app/landingPages/dataProvider/dataProvider.component.html
131 131
                          </div>
132 132
                        </div>
133 133

  
134
                        <metrics *ngIf="  tab.content=='metricsTab' && metricsClicked"
135
                            [id]="id" [type]="'datasources'" [name]="dataProviderInfo.title['name']" (metricsResults)="metricsResults($event)">
134
                        <metrics *ngIf="  tab.content=='metricsTab'"
135
                            [id]="datasourceId" [type]="'datasources'" [name]="dataProviderInfo.title['name']" (metricsResults)="metricsResults($event)">
136 136
                        </metrics>
137 137
                        <i-frame *ngIf="  tab.content=='metricsTab' && metricsClicked && totalViews > 0"
138 138
                            [url]=viewsFrameUrl width="100%" height="250">
......
157 157
                      </dd>
158 158
                  </dl>
159 159
                </li>
160

  
161
                <li>
162
                    <dl class="uk-description-list-line">
163
                        <dt>Page Views: {{pageViews}}</dt>
164
                    </dl>
165
                </li>
160 166
            </ul>
161 167
        </div>
162 168
    </div>
modules/uoa-services-portal/trunk/portal-2/src/app/landingPages/dataProvider/dataProvider.component.ts
50 50
  private downloadsFrameUrl: string;
51 51
  private totalViews: number;
52 52
  private totalDownloads: number;
53
  private pageViews: number;
53 54

  
54 55
  public statsClicked: boolean = false;
55 56
  private  docsTimelineUrl: string;
......
151 152
               this.count(1, 0);
152 153

  
153 154
               this.metricsClicked = false;
154
               this.viewsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"dtsrcOpenAIRETimeline", "dtsrcName":"'+this.datasourceId+'", "table":"","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":"OpenAIRE","yaxisheaders":["Monthly views"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]},{"query":"dtsrcRepoTimeline", "dtsrcName":"'+this.datasourceId+'", "table":"","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":"Repository","yaxisheaders":[""],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]}]&info_types=["column","column"]&stacking=normal&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';
155

  
156
               this.viewsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"dtsrcRepoViews","dtsrcName":"'+this.datasourceId+'","table":"","fields":[{"fld":"sum","agg":"sum","type":"chart","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":"","yaxisheaders":["Monthly views"],"generalxaxis":"","theme":0,"in":[]}]&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&persistent=false';
157
               /*this.viewsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"dtsrcOpenAIRETimeline", "dtsrcName":"'+this.datasourceId+'", "table":"","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":"OpenAIRE","yaxisheaders":["Monthly views"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]},{"query":"dtsrcRepoTimeline", "dtsrcName":"'+this.datasourceId+'", "table":"","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":"Repository","yaxisheaders":[""],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]}]&info_types=["column","column"]&stacking=normal&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';
158
               */
159

  
160
               this.downloadsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"dtsrcRepoDownloads","dtsrcName":"'+this.datasourceId+'","table":"","fields":[{"fld":"sum","agg":"sum","type":"chart","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":"","yaxisheaders":["Monthly downloads"],"generalxaxis":"","theme":0,"in":[]}]&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&persistent=false';
161
               /*
155 162
               this.downloadsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"dtsrcDownloadsTimeline","dtsrcName":"'+this.datasourceId+'","table":"","fields":[{"fld":"sum","agg":"sum","type":"chart","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":"","yaxisheaders":["Monthly downloads"],"generalxaxis":"","theme":0,"in":[]}]&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';
163
               */
156 164

  
157 165
               this.docsTimelineUrl ='https://beta.openaire.eu/stats/chart.php?com=query&persistent=false&data={"query":"dtsrcYear","dtsrcName":"'+this.datasourceId+'","table": "result", "fields": [{"fld": "number", "agg": "count", "type": "line", "yaxis":1, "c":true}], "xaxis":{"name": "year", "agg": "avg"}, "group": "", "color": "", "type": "chart", "size":30, "sort": "xaxis", "xStyle":{"r": "-", "s": "-", "l": "-", "ft": "-", "wt": "-"}, "yaxisheaders": [""], "fieldsheaders": ["Documents"], "in": [{"f":0, "text": "Yearly"}], "filters": [{"name":"year","max":"2016","min":"1997"},{"name": "result_datasources-datasource-name", "values":[""], "to": "-1"}],"having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": "Year"}&w=600&h=250';
158 166
               this.docsTypesUrl = 'https://beta.openaire.eu/stats/chart.php?com=query&persistent=false&data={"query":"dtsrcPubs","dtsrcName":"'+this.datasourceId+'", "table": "result", "fields": [{"fld": "number", "agg": "count", "type": "pie", "yaxis":1, "c":false}], "xaxis":{"name": "result_classifications-type", "agg": "avg"}, "group": "", "color": "", "type": "chart", "size":30, "sort": "xaxis", "xStyle":{"r": "-", "s": "-", "l": "-", "ft": "-", "wt": "-"}, "yaxisheaders": [""], "fieldsheaders": ["Documents"], "in": [], "filters": [{"name": "result_datasources-datasource-name", "values": [""], "to": "-1"}], "having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": ""}&w=600&h=250';
......
284 292
    public metricsResults($event) {
285 293
      this.totalViews = $event.totalViews;
286 294
      this.totalDownloads = $event.totalDownloads;
295
      this.pageViews = $event.pageViews;
287 296
    }
288 297
}
modules/uoa-services-portal/trunk/portal-2/src/app/landingPages/dataset/dataset.component.html
101 101
                    </div>
102 102
                </li>
103 103
                <li class="uk-animation-fade">
104
                    <metrics *ngIf="metricsClicked"
104
                    <metrics
105 105
                        [id]="datasetId" [type]="'results'" (metricsResults)="metricsResults($event)">
106 106
                    </metrics>
107 107
                    <i-frame *ngIf="metricsClicked && totalViews > 0"
......
267 267
                        </dd>
268 268
                    </dl>
269 269
                </li>
270
                
271
                <li>
272
                    <dl class="uk-description-list-line">
273
                        <dt>Page Views: {{pageViews}}</dt>
274
                    </dl>
275
                </li>
270 276
            </ul>
271 277
        </div>
272 278
    </div>
modules/uoa-services-portal/trunk/portal-2/src/app/landingPages/dataset/dataset.component.ts
32 32
    private downloadsFrameUrl: string;
33 33
    private totalViews: number;
34 34
    private totalDownloads: number;
35
    private pageViews: number;
35 36

  
36 37
    public relatedResearchResultsNum: number = 0;
37 38

  
......
60 61
            }
61 62

  
62 63
            this.metricsClicked = false;
63
            //this.viewsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"resOpenAIRETimeline", "resTitle":"'+this.datasetId+'", "table":"","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":"OpenAIRE","yaxisheaders":["Monthly views"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]},{"query":"resRepoTimeline", "resTitle":"'+this.datasetId+'", "table":"","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":"Repository","yaxisheaders":[""],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]}]&info_types=["column","column"]&stacking=normal&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';
64
            this.viewsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"resViewsTimeline", "resTitle":"'+this.datasetId+'", "table":"","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":"Repository","yaxisheaders":["Monthly views"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]}]&info_types=["column"]&stacking=normal&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&persistent=false';
65
            this.downloadsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"resRepoDownloadTimeline", "resTitle":"'+this.datasetId+'", "table":"","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":"Repository","yaxisheaders":["Monthly downloads"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]}]&info_types=["column"]&stacking=normal&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(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';
66 64

  
65
            this.viewsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"resRepoViews", "resTitle":"'+this.datasetId+'", "table":"","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":"Repository","yaxisheaders":["Monthly views"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]}]&info_types=["column"]&stacking=normal&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(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&persistent=false';
66
            /*this.viewsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"resViewsTimeline", "resTitle":"'+this.datasetId+'", "table":"","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":"Repository","yaxisheaders":["Monthly views"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]}]&info_types=["column"]&stacking=normal&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&persistent=false';
67
            */
68

  
69
            this.downloadsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"resRepoDownloads", "resTitle":"'+this.datasetId+'", "table":"","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":"Repository","yaxisheaders":["Monthly downloads"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]}]&info_types=["column"]&stacking=normal&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(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&persistent=false';
70
            /*this.downloadsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"resRepoDownloadTimeline", "resTitle":"'+this.datasetId+'", "table":"","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":"Repository","yaxisheaders":["Monthly downloads"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]}]&info_types=["column"]&stacking=normal&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(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';
71
            */
67 72
            if (typeof document !== 'undefined') {
68 73
               this.element.nativeElement.scrollIntoView();
69 74
            }
......
111 116
    public metricsResults($event) {
112 117
      this.totalViews = $event.totalViews;
113 118
      this.totalDownloads = $event.totalDownloads;
119
      this.pageViews = $event.pageViews;
114 120
    }
115 121
    updateDescription(description:string){
116 122
      this._meta.updateMeta("description", description);
modules/uoa-services-portal/trunk/portal-2/src/app/landingPages/metrics.component.ts
47 47
            <tr>
48 48
                <td class="uk-text-center">
49 49
                    {{metrics.totalViews}}
50
                    <span *ngIf="metrics.totalViews > 0 && metrics.totalOpenaireViews > 0">
51
                      ( {{metrics.totalOpenaireViews}} from OpenAIRE )
52
                    </span>
50 53
                </td>
51 54
                <td class="uk-text-center">
52 55
                    {{metrics.totalDownloads}}
56
                    <span *ngIf="metrics.totalDownloads > 0 && metrics.totalOpenaireDownloads > 0">
57
                      ( {{metrics.totalOpenaireDownloads}} from OpenAIRE )
58
                    </span>
53 59
                </td>
54 60
            </tr>
55 61
        </tbody>
......
73 79
                </td>
74 80
                <td class="uk-text-center">
75 81
                    {{metrics.infos.get(key).numOfViews}}
82
                    <span *ngIf="metrics.infos.get(key).numOfViews > 0 && metrics.infos.get(key).openaireViews > 0">
83
                      ( {{metrics.infos.get(key).openaireViews}} from OpenAIRE )
84
                    </span>
76 85
                </td>
77 86
                <td class="uk-text-center">
78 87
                    {{metrics.infos.get(key).numOfDownloads}}
88
                    <span *ngIf="metrics.infos.get(key).numOfDownloads > 0 && metrics.infos.get(key).openaireDownloads > 0">
89
                      ( {{metrics.infos.get(key).openaireDownloads}} from OpenAIRE )
90
                    </span>
79 91
                </td>
80 92
            </tr>
81 93
        </tbody>
......
115 127
             this.status = this.errorCodes.DONE;
116 128
             this.metricsResults.emit({
117 129
                 totalViews: this.metrics.totalViews,
118
                 totalDownloads: this.metrics.totalDownloads
119

  
130
                 totalDownloads: this.metrics.totalDownloads,
131
                 pageViews: this.metrics.pageViews
120 132
             });
121 133
         },
122 134
         err => {
modules/uoa-services-portal/trunk/portal-2/src/app/landingPages/project/project.component.html
160 160
                  </div>
161 161
                </li>
162 162
                <li class="uk-animation-fade">
163
                    <metrics *ngIf="metricsClicked"
163
                    <metrics
164 164
                        [id]="projectId" [type]="'projects'" [name]="projectName" (metricsResults)="metricsResults($event)">
165 165
                    </metrics>
166 166
                    <!--i-frame *ngIf="metricsClicked" [url]=viewsFrameUrl width="800" height="350"></i-frame-->
......
243 243
                        Deposit Publications
244 244
                    </a>
245 245
                </li>
246

  
247
                <li>
248
                    <dl class="uk-description-list-line">
249
                        <dt>Page Views: {{pageViews}}</dt>
250
                    </dl>
251
                </li>
246 252
            </ul>
247 253
        </div>
248 254
    </div>
modules/uoa-services-portal/trunk/portal-2/src/app/landingPages/project/project.component.ts
31 31
  public downloadsFrameUrl: string;
32 32
  private totalViews: number;
33 33
  private totalDownloads: number;
34
  private pageViews: number;
34 35
  public statsClicked: boolean;
35 36
  public chartScientificResultsUrl: string;
36 37
  public chartAccessModeUrl: string;
......
178 179
          this.updateDescription("project, funding, open access, publications, datasets, "+this.projectName+ ","+this.projectInfo.funder);
179 180
          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 };
180 181

  
181
          this.viewsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"projViewsTimeline","projTitle":"'+this.projectId+'","table":"","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":"","yaxisheaders":["Monthly views"],"generalxaxis":"","theme":0,"in":[]}]&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';
182
          this.viewsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"projRepoViews","projTitle":"'+this.projectId+'","table":"","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":"","yaxisheaders":["Monthly views"],"generalxaxis":"","theme":0,"in":[]}]&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&persistent=false';
183
          /*this.viewsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"projViewsTimeline","projTitle":"'+this.projectId+'","table":"","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":"","yaxisheaders":["Monthly views"],"generalxaxis":"","theme":0,"in":[]}]&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';
184
          */
185

  
186
          this.downloadsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"projRepoDownloads","projTitle":"'+this.projectId+'","table":"","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":"","yaxisheaders":["Monthly downloads"],"generalxaxis":"","theme":0,"in":[]}]&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&persistent=false';
187
          /*
182 188
          this.downloadsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"projDownloadsTimeline","projTitle":"'+this.projectId+'","table":"","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":"","yaxisheaders":["Monthly downloads"],"generalxaxis":"","theme":0,"in":[]}]&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';
189
          */
190

  
183 191
          //stats tab charts
184 192
          this.chartScientificResultsUrl='https://beta.openaire.eu/stats/chart.php?com=query&persistent=false&data={"query":"projScient","projTitle":"'+this.projectId+'", "table": "result", "fields": [{"fld": "number", "agg": "count", "type": "spline", "yaxis":1, "c":false}], "xaxis":{"name": "result_classifications-type", "agg": "avg"}, "group": "", "color": "", "type": "chart", "size":30, "sort": "xaxis", "xStyle":{"r": "-", "s": "-", "l": "-", "ft": "-", "wt": "-"}, "yaxisheaders": [""], "fieldsheaders": ["Publications"], "in": [], "filters": [{"name": "result_datasources-datasource-name", "values": [" "], "to": "-1"}], "having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": ""}&w=600&h=250';
185 193
          this.chartAccessModeUrl='https://beta.openaire.eu/stats/chart.php?com=query&persistent=false&data={"query":"projOA","projTitle":"'+this.projectId+'", "table": "result", "fields": [{"fld": "number", "agg": "count", "type": "pie", "yaxis":1, "c":false}], "xaxis":{"name": "result_classifications-type", "agg": "avg"}, "group": "", "color": "", "type": "chart", "size":30, "sort": "xaxis", "xStyle":{"r": "-", "s": "-", "l": "-", "ft": "-", "wt": "-"}, "yaxisheaders": [""], "fieldsheaders": ["Publications"], "in": [], "filters": [{"name": "result_datasources-datasource-name", "values": [" "], "to": "-1"}], "having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": ""}&w=600&h=250';
......
245 253
    public metricsResults($event) {
246 254
      this.totalViews = $event.totalViews;
247 255
      this.totalDownloads = $event.totalDownloads;
256
      this.pageViews = $event.pageViews;
248 257
    }
249 258
    updateDescription(description:string){
250 259
      this._meta.updateMeta("description", description);
modules/uoa-services-portal/trunk/portal-2/src/app/landingPages/publication/publication.component.ts
30 30
  private downloadsFrameUrl: string;
31 31
  private totalViews: number;
32 32
  private totalDownloads: number;
33
  private pageViews: number;
33 34

  
34 35
  public showAllReferences: boolean = false;
35 36
  public showAllRelResData: boolean = false;
......
71 72
              this.warningMessage="No valid publication id";
72 73
          }
73 74
          this.metricsClicked = false;
74
          //this.viewsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"resOpenAIRETimeline", "resTitle":"'+this.articleId+'", "table":"","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":"OpenAIRE","yaxisheaders":["Monthly views"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]},{"query":"resRepoTimeline", "resTitle":"'+this.articleId+'", "table":"","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":"Repository","yaxisheaders":[""],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]}]&info_types=["column","column"]&stacking=normal&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';
75
          this.viewsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"resViewsTimeline", "resTitle":"'+this.articleId+'", "table":"","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":"Repository","yaxisheaders":["Monthly views"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]}]&info_types=["column"]&stacking=normal&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&persistent=false';
76
          this.downloadsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"resRepoDownloadTimeline", "resTitle":"'+this.articleId+'", "table":"","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":"Repository","yaxisheaders":["Monthly downloads"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]}]&info_types=["column"]&stacking=normal&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(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';
77 75

  
76
          this.viewsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"resRepoViews", "resTitle":"'+this.articleId+'", "table":"","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":"Repository","yaxisheaders":["Monthly views"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]}]&info_types=["column"]&stacking=normal&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(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&persistent=false';
77
          /*this.viewsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"resViewsTimeline", "resTitle":"'+this.articleId+'", "table":"","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":"Repository","yaxisheaders":["Monthly views"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]}]&info_types=["column"]&stacking=normal&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&persistent=false';
78
          */
79

  
80
          this.downloadsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"resRepoDownloads", "resTitle":"'+this.articleId+'", "table":"","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":"Repository","yaxisheaders":["Monthly downloads"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]}]&info_types=["column"]&stacking=normal&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(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&persistent=false';
81
          /*this.downloadsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"resRepoDownloadTimeline", "resTitle":"'+this.articleId+'", "table":"","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":"Repository","yaxisheaders":["Monthly downloads"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]}]&info_types=["column"]&stacking=normal&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(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';
82
          */
78 83
          if (typeof document !== 'undefined') {
79 84
             this.element.nativeElement.scrollIntoView();
80 85
          }
......
143 148
    public metricsResults($event) {
144 149
      this.totalViews = $event.totalViews;
145 150
      this.totalDownloads = $event.totalDownloads;
151
      this.pageViews = $event.pageViews;
146 152
    }
147 153

  
148 154
    public buildTooltip(item: { "id": string, "acronym": string, "title": string,
modules/uoa-services-portal/trunk/portal-2/src/app/landingPages/publication/publication.component.html
313 313
                    </table>
314 314
                </li>
315 315
                <li class="uk-animation-fade">
316
                    <metrics *ngIf="metricsClicked"
316
                    <metrics
317 317
                        [id]="articleId" [type]="'results'" (metricsResults)="metricsResults($event)">
318 318
                    </metrics>
319 319
                    <!--i-frame *ngIf="metricsClicked" [url]=viewsFrameUrl width="100%" height="250"></i-frame-->
......
342 342
                    </altmetrics>
343 343
                </li>
344 344

  
345

  
346 345
                <li *ngIf="publicationInfo.downloadFrom != undefined && publicationInfo.downloadFrom.size > 0">
347 346
                    <dl class="uk-description-list-line">
348 347
                        <dt class="title">Download from</dt>
......
542 541
                        </dd>
543 542
                    </dl>
544 543
                </li>
544

  
545
                <li>
546
                    <dl class="uk-description-list-line">
547
                        <dt>Page Views: {{pageViews}}</dt>
548
                    </dl>
549
                </li>
545 550
            </ul>
546 551
        </div>
547 552
    </div>
modules/uoa-services-portal/trunk/portal-2/src/app/app-routing.module.ts
115 115
  return System.import('./claims/claimsAdmin/claimsAdmin.module' + (process.env.AOT ? '.ngfactory' : ''))
116 116
    .then(mod => mod[(process.env.AOT ? 'ClaimsAdminModuleNgFactory' : 'ClaimsAdminModule')]);
117 117
}
118

  
119
export function getClaimsByTokenModule() {
120
  return System.import('./claims/claimsByToken/claimsByToken.module' + (process.env.AOT ? '.ngfactory' : ''))
121
    .then(mod => mod[(process.env.AOT ? 'ClaimsByTokenModuleNgFactory' : 'ClaimsByTokenModule')]);
122
}
123

  
118 124
export function getLinkingModule() {
119 125
  return System.import('./claims/linking/linkingGeneric.module' + (process.env.AOT ? '.ngfactory' : ''))
120 126
    .then(mod => mod[(process.env.AOT ? 'LinkingGenericModuleNgFactory' : 'LinkingGenericModule')]);
......
162 168
      { path: 'claims', loadChildren: getClaimsAdminModule },
163 169
      { path: 'participate/claim', loadChildren: getLinkingModule },
164 170
      { path: 'participate/direct-claim', loadChildren: getDirectLinkingModule },
171
      { path: 'claims-project-manager', loadChildren: getClaimsByTokenModule },
165 172
      { path: 'user-info', loadChildren: getUserModule },
166 173

  
167 174
    ])
modules/uoa-services-portal/trunk/portal-2/src/server.routes.ts
16 16
  'search/advanced/people','search/advanced/publications','search/advanced/projects','search/advanced/datasets','search/advanced/dataproviders','search/advanced/organizations',
17 17
  'participate/deposit-publications','participate/deposit-datasets','participate/deposit-publications-result','participate/deposit-datasets-result',
18 18
  'search/data-providers','search/entity-registries', 'project-report',
19
  'claims','myclaims','participate/claim', 'participate/direct-claim',
19
  'claims','myclaims','participate/claim', 'participate/direct-claim', 'claims-project-manager',
20 20
  'test', 'user-info',
21 21
  '**','error'
22 22

  

Also available in: Unified diff