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-software',
|
|
|
|
template: `
|
2020-05-26 13:05:14 +02:00
|
|
|
<result-landing type="software" [piwikSiteId]="piwikSiteId" [communityId]="communityId"></result-landing>
|
2019-09-05 10:56:01 +02:00
|
|
|
`,
|
2019-07-22 11:19:34 +02:00
|
|
|
})
|
2021-04-01 16:25:15 +02:00
|
|
|
export class OpenaireSoftwareComponent 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
|
|
|
}
|