2021-04-01 16:25:15 +02:00
|
|
|
import {Component, OnInit} from '@angular/core';
|
2018-04-11 12:40:29 +02:00
|
|
|
import {PiwikHelper} from '../../utils/piwikHelper';
|
|
|
|
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
|
2020-11-30 18:04:05 +01:00
|
|
|
import {properties} from "../../../environments/environment";
|
2019-07-22 11:19:34 +02:00
|
|
|
|
2018-01-26 16:00:07 +01:00
|
|
|
@Component({
|
2019-07-22 11:19:34 +02:00
|
|
|
selector: 'openaire-project',
|
|
|
|
template: `
|
|
|
|
<project [piwikSiteId]=piwikSiteId [communityId]="communityId"></project>`,
|
|
|
|
})
|
2021-04-01 16:25:15 +02:00
|
|
|
export class OpenaireProjectComponent implements OnInit {
|
|
|
|
piwikSiteId;
|
|
|
|
communityId;
|
2020-11-30 18:04:05 +01:00
|
|
|
|
2021-04-01 16:25:15 +02:00
|
|
|
constructor() {
|
2018-01-26 16:00:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
ngOnInit() {
|
2021-04-01 16:25:15 +02:00
|
|
|
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
|
2022-06-08 13:21:09 +02:00
|
|
|
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
|
2019-07-22 11:19:34 +02:00
|
|
|
}
|
2018-01-26 16:00:07 +01:00
|
|
|
}
|