2018-01-26 16:00:07 +01:00
|
|
|
import {Component, ViewChild, ElementRef} from '@angular/core';
|
2019-03-01 12:34:19 +01:00
|
|
|
import {ActivatedRoute} from '@angular/router';
|
2018-04-11 12:40:29 +02:00
|
|
|
import {PiwikHelper} from '../../utils/piwikHelper';
|
|
|
|
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
|
2018-01-26 16:00:07 +01:00
|
|
|
@Component({
|
|
|
|
selector: 'openaire-software',
|
2018-04-11 12:40:29 +02:00
|
|
|
template: `<software [piwikSiteId]=piwikSiteId></software>`,
|
2018-01-26 16:00:07 +01:00
|
|
|
})
|
|
|
|
export class OpenaireSoftwareComponent{
|
2018-04-11 12:40:29 +02:00
|
|
|
piwikSiteId = null;
|
2019-03-01 12:34:19 +01:00
|
|
|
constructor (private route: ActivatedRoute ) {
|
|
|
|
this.route.data
|
|
|
|
.subscribe((data: { envSpecific: any }) => {
|
|
|
|
|
|
|
|
var communityId = ConnectHelper.getCommunityFromDomain(data.envSpecific.domain);
|
|
|
|
this.piwikSiteId = PiwikHelper.siteIDs[communityId];
|
|
|
|
});
|
2018-01-26 16:00:07 +01:00
|
|
|
}
|
|
|
|
|
2019-03-01 12:34:19 +01:00
|
|
|
|
2018-01-26 16:00:07 +01:00
|
|
|
ngOnInit() {
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|