Change piwik base on the new dynamic piwik.
This commit is contained in:
parent
dc7a9fc66a
commit
cb6d935171
|
@ -134,7 +134,7 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||
this.subscriptions.push(this.data.subscribe(data => {
|
||||
if (data && data.portal) {
|
||||
this.setProperties(data.portal);
|
||||
this.configurationService.initCommunityInformation(this.properties, this.properties.adminToolsCommunity);
|
||||
this.configurationService.initPortal(this.properties, this.properties.adminToolsCommunity);
|
||||
}
|
||||
}));
|
||||
this.subscriptions.push(this.userManagementService.getUserInfo().subscribe(user => {
|
||||
|
@ -453,6 +453,6 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||
} else {
|
||||
ConnectHelper.setPortalTypeFromPid(id);
|
||||
}
|
||||
this.configurationService.initCommunityInformation(this.properties, this.properties.adminToolsCommunity);
|
||||
this.configurationService.initPortal(this.properties, this.properties.adminToolsCommunity);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ import {Router} from "@angular/router";
|
|||
import {StakeholderUtils} from "../utils/indicator-utils";
|
||||
import {OpenaireEntities} from "../openaireLibrary/utils/properties/searchFields";
|
||||
import {EnvProperties} from "../openaireLibrary/utils/properties/env-properties";
|
||||
import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service";
|
||||
|
||||
@Component({
|
||||
selector: 'develop',
|
||||
|
@ -132,6 +133,7 @@ export class DevelopComponent implements OnInit, OnDestroy {
|
|||
constructor(private stakeholderService: StakeholderService,
|
||||
private seoService: SEOService,
|
||||
private _meta: Meta,
|
||||
private piwikService: PiwikService,
|
||||
private _router: Router,
|
||||
private _title: Title) {
|
||||
}
|
||||
|
@ -153,7 +155,7 @@ export class DevelopComponent implements OnInit, OnDestroy {
|
|||
this._meta.updateTag({content: description}, "property='og:description'");
|
||||
this._meta.updateTag({content: title}, "property='og:title'");
|
||||
this._title.setTitle(title);
|
||||
|
||||
this.subscriptions.push(this.piwikService.trackView(properties, title).subscribe());
|
||||
/* Initializations */
|
||||
this.stakeholderUtils.types.forEach(type => {
|
||||
if (type.value === stakeholder.type) {
|
||||
|
|
|
@ -45,7 +45,6 @@ import {RangeFilterComponent} from "../openaireLibrary/utils/rangeFilter/rangeFi
|
|||
export class MonitorComponent implements OnInit, OnDestroy {
|
||||
public user: User;
|
||||
public subscriptions: any[] = [];
|
||||
piwikSiteId;
|
||||
title;
|
||||
description;
|
||||
public pageContents = null;
|
||||
|
@ -185,15 +184,7 @@ export class MonitorComponent implements OnInit, OnDestroy {
|
|||
this._meta.updateTag({content: this.description}, "property='og:description'");
|
||||
this._meta.updateTag({content: this.title}, "property='og:title'");
|
||||
this._title.setTitle(this.title);
|
||||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
||||
this.subscriptions.push(this.configurationService.communityInformationState.subscribe(portal => {
|
||||
if (portal && portal.piwik) {
|
||||
this.piwikSiteId = portal.piwik;
|
||||
this.subscriptions.push(this._piwikService.trackView(this.properties, this.title, this.piwikSiteId).subscribe());
|
||||
}
|
||||
}));
|
||||
|
||||
}
|
||||
this.subscriptions.push(this._piwikService.trackView(this.properties, this.title).subscribe());
|
||||
if (this.hasPermission((this.view && this.isManager(this.stakeholder))?this.view:this.stakeholder.visibility)) {
|
||||
//this.getDivContents();
|
||||
// this.getPageContents();
|
||||
|
@ -216,11 +207,7 @@ export class MonitorComponent implements OnInit, OnDestroy {
|
|||
});
|
||||
this.subscriptions.push(subscription);
|
||||
} else {
|
||||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
||||
if (this.piwikSiteId) {
|
||||
this.subscriptions.push(this._piwikService.trackView(this.properties, this.title, this.piwikSiteId).subscribe());
|
||||
}
|
||||
}
|
||||
this.subscriptions.push(this._piwikService.trackView(this.properties, this.title).subscribe());
|
||||
this.subscriptions.push(this.route.queryParams.subscribe( queryParams => {
|
||||
this.handleQueryParams(queryParams, params);
|
||||
}));
|
||||
|
@ -228,7 +215,7 @@ export class MonitorComponent implements OnInit, OnDestroy {
|
|||
}));
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
get monitorLink() {
|
||||
return "https://" + (this.properties.environment == 'beta' ? 'beta.' : '') + 'monitor.openaire.eu';
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 1785da3c45eab2438f014f6e5149c1e995bd7bff
|
||||
Subproject commit 5d6fa99a7310f05942ebded409fc5703b98c823e
|
|
@ -2,22 +2,20 @@ import {Component} from '@angular/core';
|
|||
import {ActivatedRoute, Router} from "@angular/router";
|
||||
import {StakeholderService} from "../../../openaireLibrary/monitor/services/stakeholder.service";
|
||||
import {Subscriber} from "rxjs";
|
||||
import {ConfigurationService} from "../../../openaireLibrary/utils/configuration/configuration.service";
|
||||
|
||||
@Component({
|
||||
selector: 'monitor-dataprovider',
|
||||
template: `
|
||||
<div id="page_content">
|
||||
<dataprovider *ngIf="initialized" [communityId]="communityId" [piwikSiteId]="piwikSiteId"></dataprovider>
|
||||
<dataprovider *ngIf="initialized" [communityId]="communityId"></dataprovider>
|
||||
</div>`,
|
||||
})
|
||||
export class MonitorDataProviderComponent {
|
||||
initialized: boolean = false;
|
||||
communityId;
|
||||
piwikSiteId;
|
||||
constructor(private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private stakeholderService: StakeholderService, private configurationService: ConfigurationService) {
|
||||
private stakeholderService: StakeholderService) {
|
||||
}
|
||||
subscriptions = [];
|
||||
ngOnDestroy() {
|
||||
|
@ -34,11 +32,6 @@ export class MonitorDataProviderComponent {
|
|||
if (stakeholder) {
|
||||
this.initialized = true;
|
||||
this.communityId = stakeholder.alias;
|
||||
this.subscriptions.push(this.configurationService.communityInformationState.subscribe(portal => {
|
||||
if (portal) {
|
||||
this.piwikSiteId = portal.piwik;
|
||||
}
|
||||
}));
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
|
|
@ -7,16 +7,15 @@ import {ConfigurationService} from "../../../openaireLibrary/utils/configuration
|
|||
@Component({
|
||||
selector: 'monitor-dataset',
|
||||
template: `
|
||||
<result-landing *ngIf="initialized" type="dataset" [communityId]="communityId" [piwikSiteId]="piwikSiteId"></result-landing>
|
||||
<result-landing *ngIf="initialized" type="dataset" [communityId]="communityId"></result-landing>
|
||||
`,
|
||||
})
|
||||
export class MonitorDatasetComponent {
|
||||
initialized: boolean = false;
|
||||
communityId;
|
||||
piwikSiteId;
|
||||
constructor(private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private stakeholderService: StakeholderService, private configurationService: ConfigurationService) {
|
||||
private stakeholderService: StakeholderService) {
|
||||
}
|
||||
subscriptions = [];
|
||||
ngOnDestroy() {
|
||||
|
@ -33,11 +32,6 @@ export class MonitorDatasetComponent {
|
|||
if (stakeholder) {
|
||||
this.initialized = true;
|
||||
this.communityId = stakeholder.alias;
|
||||
this.subscriptions.push(this.configurationService.communityInformationState.subscribe(portal => {
|
||||
if (portal) {
|
||||
this.piwikSiteId = portal.piwik;
|
||||
}
|
||||
}));
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
|
|
@ -7,18 +7,20 @@ import {ConfigurationService} from "../../../openaireLibrary/utils/configuration
|
|||
@Component({
|
||||
selector: 'monitor-organization',
|
||||
template: `
|
||||
<organization *ngIf="initialized" [communityId]="communityId" [piwikSiteId]="piwikSiteId"></organization>
|
||||
<organization *ngIf="initialized" [communityId]="communityId"></organization>
|
||||
`,
|
||||
})
|
||||
export class MonitorOrganizationComponent {
|
||||
initialized: boolean = false;
|
||||
communityId;
|
||||
piwikSiteId;
|
||||
|
||||
constructor(private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private stakeholderService: StakeholderService, private configurationService: ConfigurationService) {
|
||||
private stakeholderService: StakeholderService) {
|
||||
}
|
||||
|
||||
subscriptions = [];
|
||||
|
||||
ngOnDestroy() {
|
||||
this.subscriptions.forEach(subscription => {
|
||||
if (subscription instanceof Subscriber) {
|
||||
|
@ -26,6 +28,7 @@ export class MonitorOrganizationComponent {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.subscriptions.push(this.route.params.subscribe(params => {
|
||||
if (params['stakeholder']) {
|
||||
|
@ -33,11 +36,6 @@ export class MonitorOrganizationComponent {
|
|||
if (stakeholder) {
|
||||
this.initialized = true;
|
||||
this.communityId = stakeholder.alias;
|
||||
this.subscriptions.push(this.configurationService.communityInformationState.subscribe(portal => {
|
||||
if (portal) {
|
||||
this.piwikSiteId = portal.piwik;
|
||||
}
|
||||
}));
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
|
|
@ -7,17 +7,17 @@ import {ConfigurationService} from "../../../openaireLibrary/utils/configuration
|
|||
@Component({
|
||||
selector: 'monitor-orp',
|
||||
template: `
|
||||
<result-landing *ngIf="initialized" type="orp" [communityId]="communityId" [piwikSiteId]="piwikSiteId"></result-landing>
|
||||
<result-landing *ngIf="initialized" type="orp" [communityId]="communityId"></result-landing>
|
||||
`,
|
||||
})
|
||||
|
||||
export class MonitorOrpComponent {
|
||||
initialized: boolean = false;
|
||||
communityId;
|
||||
piwikSiteId;
|
||||
|
||||
constructor(private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private stakeholderService: StakeholderService, private configurationService: ConfigurationService) {
|
||||
private stakeholderService: StakeholderService) {
|
||||
}
|
||||
subscriptions = [];
|
||||
ngOnDestroy() {
|
||||
|
@ -34,11 +34,6 @@ export class MonitorOrpComponent {
|
|||
if (stakeholder) {
|
||||
this.initialized = true;
|
||||
this.communityId = stakeholder.alias;
|
||||
this.subscriptions.push(this.configurationService.communityInformationState.subscribe(portal => {
|
||||
if (portal) {
|
||||
this.piwikSiteId = portal.piwik;
|
||||
}
|
||||
}));
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
|
|
@ -7,16 +7,16 @@ import {ConfigurationService} from "../../../openaireLibrary/utils/configuration
|
|||
@Component({
|
||||
selector: 'monitor-project',
|
||||
template: `
|
||||
<project *ngIf="initialized" [communityId]="communityId" [piwikSiteId]="piwikSiteId"></project>
|
||||
<project *ngIf="initialized" [communityId]="communityId"></project>
|
||||
`,
|
||||
})
|
||||
export class MonitorProjectComponent {
|
||||
initialized: boolean = false;
|
||||
communityId;
|
||||
piwikSiteId;
|
||||
|
||||
constructor(private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private stakeholderService: StakeholderService, private configurationService: ConfigurationService) {
|
||||
private stakeholderService: StakeholderService) {
|
||||
}
|
||||
subscriptions = [];
|
||||
ngOnDestroy() {
|
||||
|
@ -33,11 +33,6 @@ export class MonitorProjectComponent {
|
|||
if (stakeholder) {
|
||||
this.initialized = true;
|
||||
this.communityId = stakeholder.alias;
|
||||
this.subscriptions.push(this.configurationService.communityInformationState.subscribe(portal => {
|
||||
if (portal) {
|
||||
this.piwikSiteId = portal.piwik;
|
||||
}
|
||||
}));
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
|
|
@ -7,16 +7,16 @@ import {ConfigurationService} from "../../../openaireLibrary/utils/configuration
|
|||
@Component({
|
||||
selector: 'monitor-publication',
|
||||
template: `
|
||||
<result-landing *ngIf="initialized" type="publication" [communityId]="communityId" [piwikSiteId]="piwikSiteId"></result-landing>
|
||||
<result-landing *ngIf="initialized" type="publication" [communityId]="communityId"></result-landing>
|
||||
`,
|
||||
})
|
||||
export class MonitorPublicationComponent {
|
||||
initialized: boolean = false;
|
||||
communityId;
|
||||
piwikSiteId;
|
||||
|
||||
constructor(private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private stakeholderService: StakeholderService, private configurationService: ConfigurationService) {
|
||||
private stakeholderService: StakeholderService) {
|
||||
}
|
||||
subscriptions = [];
|
||||
ngOnDestroy() {
|
||||
|
@ -33,11 +33,6 @@ export class MonitorPublicationComponent {
|
|||
if (stakeholder) {
|
||||
this.initialized = true;
|
||||
this.communityId = stakeholder.alias;
|
||||
this.subscriptions.push(this.configurationService.communityInformationState.subscribe(portal => {
|
||||
if (portal) {
|
||||
this.piwikSiteId = portal.piwik;
|
||||
}
|
||||
}));
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
|
|
@ -7,16 +7,16 @@ import {ConfigurationService} from "../../../openaireLibrary/utils/configuration
|
|||
@Component({
|
||||
selector: 'monitor-result',
|
||||
template: `
|
||||
<result-landing *ngIf="initialized" type="result" [communityId]="communityId" [piwikSiteId]="piwikSiteId"></result-landing>
|
||||
<result-landing *ngIf="initialized" type="result" [communityId]="communityId"></result-landing>
|
||||
`,
|
||||
})
|
||||
export class MonitorResultComponent {
|
||||
initialized: boolean = false;
|
||||
communityId;
|
||||
piwikSiteId;
|
||||
|
||||
constructor(private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private stakeholderService: StakeholderService, private configurationService: ConfigurationService) {
|
||||
private stakeholderService: StakeholderService) {
|
||||
}
|
||||
subscriptions = [];
|
||||
ngOnDestroy() {
|
||||
|
@ -33,11 +33,6 @@ export class MonitorResultComponent {
|
|||
if (stakeholder) {
|
||||
this.initialized = true;
|
||||
this.communityId = stakeholder.alias;
|
||||
this.subscriptions.push(this.configurationService.communityInformationState.subscribe(portal => {
|
||||
if (portal) {
|
||||
this.piwikSiteId = portal.piwik;
|
||||
}
|
||||
}));
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
|
|
@ -7,16 +7,16 @@ import {ConfigurationService} from "../../../openaireLibrary/utils/configuration
|
|||
@Component({
|
||||
selector: 'monitor-software',
|
||||
template: `
|
||||
<result-landing *ngIf="initialized" type="software" [piwikSiteId]="piwikSiteId"></result-landing>
|
||||
<result-landing *ngIf="initialized" type="software"></result-landing>
|
||||
`,
|
||||
})
|
||||
export class MonitorSoftwareComponent {
|
||||
initialized: boolean = false;
|
||||
communityId;
|
||||
piwikSiteId;
|
||||
|
||||
constructor(private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private stakeholderService: StakeholderService, private configurationService: ConfigurationService) {
|
||||
private stakeholderService: StakeholderService) {
|
||||
}
|
||||
subscriptions = [];
|
||||
ngOnDestroy() {
|
||||
|
@ -33,11 +33,6 @@ export class MonitorSoftwareComponent {
|
|||
if (stakeholder) {
|
||||
this.initialized = true;
|
||||
this.communityId = stakeholder.alias;
|
||||
this.subscriptions.push(this.configurationService.communityInformationState.subscribe(portal => {
|
||||
if (portal) {
|
||||
this.piwikSiteId = portal.piwik;
|
||||
}
|
||||
}));
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ import {SearchCustomFilter} from "../../../openaireLibrary/searchPages/searchUti
|
|||
import {ActivatedRoute, Router} from "@angular/router";
|
||||
import {StakeholderService} from "../../../openaireLibrary/monitor/services/stakeholder.service";
|
||||
import {Subscriber} from "rxjs";
|
||||
import {ConfigurationService} from "../../../openaireLibrary/utils/configuration/configuration.service";
|
||||
import {SearchForm} from "../../../openaireLibrary/searchPages/searchUtils/newSearchPage.component";
|
||||
|
||||
@Component({
|
||||
|
@ -11,7 +10,7 @@ import {SearchForm} from "../../../openaireLibrary/searchPages/searchUtils/newSe
|
|||
template: `
|
||||
<search-dataproviders *ngIf="initialized" [simpleView]="false"
|
||||
[customFilter]=customFilter [hasPrefix]="false" [searchForm]="searchForm"
|
||||
[includeOnlyResultsAndFilter]="false" [showSwitchSearchLink]="showSwitchSearchLink" [piwikSiteId]="piwikSiteId">
|
||||
[includeOnlyResultsAndFilter]="false" [showSwitchSearchLink]="showSwitchSearchLink">
|
||||
</search-dataproviders>
|
||||
`
|
||||
})
|
||||
|
@ -19,13 +18,15 @@ export class MonitorAdvancedSearchDataprovidersComponent {
|
|||
@Input() searchForm: SearchForm = {class: 'search-form', dark: false};
|
||||
customFilter: SearchCustomFilter = null;
|
||||
initialized: boolean = false;
|
||||
showSwitchSearchLink:boolean = false;
|
||||
piwikSiteId;
|
||||
showSwitchSearchLink: boolean = false;
|
||||
|
||||
constructor(private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private stakeholderService: StakeholderService, private configurationService: ConfigurationService) {
|
||||
private stakeholderService: StakeholderService) {
|
||||
}
|
||||
|
||||
subscriptions = [];
|
||||
|
||||
ngOnDestroy() {
|
||||
this.subscriptions.forEach(subscription => {
|
||||
if (subscription instanceof Subscriber) {
|
||||
|
@ -40,24 +41,19 @@ export class MonitorAdvancedSearchDataprovidersComponent {
|
|||
this.subscriptions.push(this.stakeholderService.getStakeholderAsObservable().subscribe(stakeholder => {
|
||||
if (stakeholder) {
|
||||
if (stakeholder.type === "organization") {
|
||||
let value = stakeholder.index_id;
|
||||
this.customFilter = new SearchCustomFilter("Organization", "relorganizationid", value, "");
|
||||
this.showSwitchSearchLink = true;
|
||||
let value = stakeholder.index_id;
|
||||
this.customFilter = new SearchCustomFilter("Organization", "relorganizationid", value, "");
|
||||
this.showSwitchSearchLink = true;
|
||||
} else if (stakeholder.type === "funder") {
|
||||
let value = stakeholder.index_id+"||"+stakeholder.index_name+"||"+stakeholder.index_shortName;
|
||||
this.customFilter = new SearchCustomFilter("Funder", "relfunder", value, stakeholder.name);
|
||||
let value = stakeholder.index_id + "||" + stakeholder.index_name + "||" + stakeholder.index_shortName;
|
||||
this.customFilter = new SearchCustomFilter("Funder", "relfunder", value, stakeholder.name);
|
||||
} else if (stakeholder.type === "ri") {
|
||||
let value = stakeholder.index_id+"||"+stakeholder.index_name;
|
||||
this.customFilter = new SearchCustomFilter("Community", "community", value, stakeholder.name);
|
||||
let value = stakeholder.index_id + "||" + stakeholder.index_name;
|
||||
this.customFilter = new SearchCustomFilter("Community", "community", value, stakeholder.name);
|
||||
}
|
||||
this.subscriptions.push(this.configurationService.communityInformationState.subscribe(portal => {
|
||||
if (portal) {
|
||||
this.piwikSiteId = portal.piwik;
|
||||
}
|
||||
}));
|
||||
this.initialized = true;
|
||||
}
|
||||
}));
|
||||
this.initialized = true;
|
||||
}
|
||||
}));
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
|
|
@ -3,14 +3,12 @@ import {ActivatedRoute, Router} from "@angular/router";
|
|||
import {StakeholderService} from "../../../openaireLibrary/monitor/services/stakeholder.service";
|
||||
import {SearchCustomFilter} from "../../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
|
||||
import {Subscriber} from "rxjs";
|
||||
import {ConfigurationService} from "../../../openaireLibrary/utils/configuration/configuration.service";
|
||||
import {SearchForm} from "../../../openaireLibrary/searchPages/searchUtils/newSearchPage.component";
|
||||
|
||||
@Component({
|
||||
selector: 'monitor-advanced-search-organizations',
|
||||
template: `
|
||||
<search-organizations *ngIf="initialized" [simpleView]="false" [showSwitchSearchLink]="false" [customFilter]="customFilter"
|
||||
[piwikSiteId]="piwikSiteId" [searchForm]="searchForm">
|
||||
<search-organizations *ngIf="initialized" [simpleView]="false" [showSwitchSearchLink]="false" [customFilter]="customFilter" [searchForm]="searchForm">
|
||||
</search-organizations>
|
||||
`
|
||||
})
|
||||
|
@ -18,10 +16,10 @@ export class MonitorAdvancedSearchOrganizationsComponent {
|
|||
@Input() searchForm: SearchForm = {class: 'search-form', dark: false};
|
||||
initialized: boolean = false;
|
||||
customFilter: SearchCustomFilter = null;
|
||||
piwikSiteId;
|
||||
|
||||
constructor(private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private stakeholderService: StakeholderService, private configurationService: ConfigurationService) {
|
||||
private stakeholderService: StakeholderService) {
|
||||
}
|
||||
subscriptions = [];
|
||||
ngOnDestroy() {
|
||||
|
@ -50,11 +48,6 @@ export class MonitorAdvancedSearchOrganizationsComponent {
|
|||
this.customFilter = new SearchCustomFilter("Community", "community", value, stakeholder.name);
|
||||
this.customFilter.isHiddenFilter = false;
|
||||
}
|
||||
this.subscriptions.push(this.configurationService.communityInformationState.subscribe(portal => {
|
||||
if (portal) {
|
||||
this.piwikSiteId = portal.piwik;
|
||||
}
|
||||
}));
|
||||
this.initialized = true;
|
||||
}
|
||||
}));
|
||||
|
|
|
@ -4,7 +4,6 @@ import {ActivatedRoute, Router} from "@angular/router";
|
|||
import {StakeholderService} from "../../../openaireLibrary/monitor/services/stakeholder.service";
|
||||
import {Subscriber} from "rxjs";
|
||||
import {properties} from "../../../../environments/environment";
|
||||
import {ConfigurationService} from "../../../openaireLibrary/utils/configuration/configuration.service";
|
||||
import {SearchForm} from "../../../openaireLibrary/searchPages/searchUtils/newSearchPage.component";
|
||||
|
||||
@Component({
|
||||
|
@ -14,7 +13,7 @@ import {SearchForm} from "../../../openaireLibrary/searchPages/searchUtils/newSe
|
|||
[customFilter]=customFilter [hasPrefix]="false"
|
||||
[includeOnlyResultsAndFilter]="false" [showSwitchSearchLink]="showSwitchSearchLink"
|
||||
[openaireLink]="'https://'+(properties.environment != 'production'?'beta.':'')+'explore.openaire.eu/search/simple/projects'"
|
||||
[piwikSiteId]="piwikSiteId" [searchForm]="searchForm"
|
||||
[searchForm]="searchForm"
|
||||
>
|
||||
</search-projects>
|
||||
`
|
||||
|
@ -26,10 +25,10 @@ export class MonitorAdvancedSearchProjectsComponent {
|
|||
initialized: boolean = false;
|
||||
showSwitchSearchLink:boolean = false;
|
||||
properties;
|
||||
piwikSiteId;
|
||||
|
||||
constructor(private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private stakeholderService: StakeholderService, private configurationService: ConfigurationService) {
|
||||
private stakeholderService: StakeholderService) {
|
||||
}
|
||||
subscriptions = [];
|
||||
ngOnDestroy() {
|
||||
|
@ -58,11 +57,6 @@ export class MonitorAdvancedSearchProjectsComponent {
|
|||
let value = stakeholder.index_id+"||"+stakeholder.index_name;
|
||||
this.customFilter = new SearchCustomFilter("Community", "community", value, stakeholder.name);
|
||||
}
|
||||
this.subscriptions.push(this.configurationService.communityInformationState.subscribe(portal => {
|
||||
if (portal) {
|
||||
this.piwikSiteId = portal.piwik;
|
||||
}
|
||||
}));
|
||||
this.initialized = true;
|
||||
}
|
||||
}));
|
||||
|
|
|
@ -15,7 +15,7 @@ import {SearchForm} from "../../../openaireLibrary/searchPages/searchUtils/newSe
|
|||
[includeOnlyResultsAndFilter]="false"
|
||||
[showSwitchSearchLink]="true"
|
||||
[openaireLink]="'https://'+(properties.environment != 'production'?'beta.':'')+'explore.openaire.eu/search/advanced/research-outcomes'"
|
||||
[piwikSiteId]="piwikSiteId" [searchForm]="searchForm"
|
||||
[searchForm]="searchForm"
|
||||
></search-research-results>
|
||||
`
|
||||
})
|
||||
|
@ -24,10 +24,9 @@ export class MonitorAdvancedSearchResearchResultsComponent {
|
|||
initialized: boolean = false;
|
||||
@Input() searchForm: SearchForm = {class: 'search-form', dark: false};
|
||||
properties;
|
||||
piwikSiteId;
|
||||
constructor(private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private stakeholderService: StakeholderService, private configurationService: ConfigurationService) {
|
||||
private stakeholderService: StakeholderService) {
|
||||
}
|
||||
subscriptions = [];
|
||||
ngOnDestroy() {
|
||||
|
@ -54,11 +53,6 @@ export class MonitorAdvancedSearchResearchResultsComponent {
|
|||
let value = stakeholder.index_id+"||"+stakeholder.index_name;
|
||||
this.customFilter = new SearchCustomFilter("Community", "community", value, stakeholder.name);
|
||||
}
|
||||
this.subscriptions.push(this.configurationService.communityInformationState.subscribe(portal => {
|
||||
if (portal) {
|
||||
this.piwikSiteId = portal.piwik;
|
||||
}
|
||||
}));
|
||||
this.initialized = true;
|
||||
}
|
||||
}));
|
||||
|
|
|
@ -13,8 +13,7 @@ import {properties} from "../../../../environments/environment";
|
|||
template: `
|
||||
<search-dataproviders *ngIf="initialized"
|
||||
[customFilter]=customFilter [hasPrefix]="false" [searchForm]="searchForm"
|
||||
[includeOnlyResultsAndFilter]="false" [showSwitchSearchLink]="showSwitchSearchLink"
|
||||
[piwikSiteId]="piwikSiteId">
|
||||
[includeOnlyResultsAndFilter]="false" [showSwitchSearchLink]="showSwitchSearchLink">
|
||||
</search-dataproviders>
|
||||
`
|
||||
})
|
||||
|
@ -23,12 +22,11 @@ export class MonitorSearchDataprovidersComponent {
|
|||
customFilter: SearchCustomFilter = null;
|
||||
initialized: boolean = false;
|
||||
showSwitchSearchLink: boolean = false;
|
||||
piwikSiteId;
|
||||
public properties: EnvProperties = properties;
|
||||
|
||||
constructor(private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private stakeholderService: StakeholderService, private configurationService: ConfigurationService) {
|
||||
private stakeholderService: StakeholderService) {
|
||||
}
|
||||
|
||||
subscriptions = [];
|
||||
|
@ -54,11 +52,6 @@ export class MonitorSearchDataprovidersComponent {
|
|||
} else if (stakeholder.type === "ri") {
|
||||
this.navigateToError();
|
||||
}
|
||||
this.subscriptions.push(this.configurationService.communityInformationState.subscribe(portal => {
|
||||
if (portal) {
|
||||
this.piwikSiteId = portal.piwik;
|
||||
}
|
||||
}));
|
||||
this.initialized = true;
|
||||
}
|
||||
}));
|
||||
|
|
|
@ -8,14 +8,13 @@ import {SearchForm} from "../../../openaireLibrary/searchPages/searchUtils/newSe
|
|||
@Component({
|
||||
selector: 'monitor-search-organizations',
|
||||
template: `
|
||||
<search-organizations *ngIf="initialized" [searchForm]="searchForm" [piwikSiteId]="piwikSiteId">
|
||||
<search-organizations *ngIf="initialized" [searchForm]="searchForm">
|
||||
</search-organizations>
|
||||
`
|
||||
})
|
||||
export class MonitorSearchOrganizationsComponent {
|
||||
@Input() searchForm: SearchForm = {class: 'search-form', dark: false};
|
||||
initialized: boolean = false;
|
||||
piwikSiteId;
|
||||
constructor(private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private stakeholderService: StakeholderService, private configurationService: ConfigurationService) {
|
||||
|
@ -34,11 +33,6 @@ export class MonitorSearchOrganizationsComponent {
|
|||
if (params['stakeholder']) {
|
||||
this.subscriptions.push(this.stakeholderService.getStakeholderAsObservable().subscribe(stakeholder => {
|
||||
if (stakeholder) {
|
||||
this.subscriptions.push(this.configurationService.communityInformationState.subscribe(portal => {
|
||||
if (portal) {
|
||||
this.piwikSiteId = portal.piwik;
|
||||
}
|
||||
}));
|
||||
this.initialized = true;
|
||||
}
|
||||
}));
|
||||
|
|
|
@ -4,7 +4,6 @@ import {ActivatedRoute, Router} from "@angular/router";
|
|||
import {StakeholderService} from "../../../openaireLibrary/monitor/services/stakeholder.service";
|
||||
import {Subscriber} from "rxjs";
|
||||
import {properties} from "../../../../environments/environment";
|
||||
import {ConfigurationService} from "../../../openaireLibrary/utils/configuration/configuration.service";
|
||||
import {SearchForm} from "../../../openaireLibrary/searchPages/searchUtils/newSearchPage.component";
|
||||
|
||||
@Component({
|
||||
|
@ -13,8 +12,8 @@ import {SearchForm} from "../../../openaireLibrary/searchPages/searchUtils/newSe
|
|||
<search-projects *ngIf="initialized"
|
||||
[customFilter]=customFilter [hasPrefix]="false"
|
||||
[includeOnlyResultsAndFilter]="false"
|
||||
[openaireLink]="'https://'+(properties.environment != 'production'?'beta.':'')+'explore.openaire.eu/search/simple/projects'"
|
||||
[piwikSiteId]="piwikSiteId" [searchForm]="searchForm">
|
||||
[openaireLink]="'https://'+(properties.environment != 'production'?'beta.':'')+'explore.openaire.eu/search/simple/projects'"
|
||||
[searchForm]="searchForm">
|
||||
</search-projects>
|
||||
`
|
||||
|
||||
|
@ -24,10 +23,9 @@ export class MonitorSearchProjectsComponent {
|
|||
customFilter: SearchCustomFilter = null;
|
||||
initialized: boolean = false;
|
||||
properties;
|
||||
piwikSiteId;
|
||||
constructor(private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private stakeholderService: StakeholderService, private configurationService: ConfigurationService) {
|
||||
private stakeholderService: StakeholderService) {
|
||||
}
|
||||
subscriptions = [];
|
||||
ngOnDestroy() {
|
||||
|
@ -53,11 +51,6 @@ export class MonitorSearchProjectsComponent {
|
|||
} else if (stakeholder.type === "ri") {
|
||||
this.navigateToError();
|
||||
}
|
||||
this.subscriptions.push(this.configurationService.communityInformationState.subscribe(portal => {
|
||||
if (portal) {
|
||||
this.piwikSiteId = portal.piwik;
|
||||
}
|
||||
}));
|
||||
this.initialized = true;
|
||||
|
||||
}
|
||||
|
|
|
@ -16,7 +16,6 @@ import {SearchForm} from "../../../openaireLibrary/searchPages/searchUtils/newSe
|
|||
[showSwitchSearchLink]="true"
|
||||
[searchForm]="searchForm"
|
||||
[openaireLink]="'https://'+(properties.environment != 'production'?'beta.':'')+'explore.openaire.eu/search/find/research-outcomes'"
|
||||
[piwikSiteId]="piwikSiteId"
|
||||
></search-research-results>
|
||||
`,
|
||||
})
|
||||
|
@ -25,10 +24,9 @@ export class MonitorSearchResearchResultsComponent {
|
|||
customFilter: SearchCustomFilter = null;
|
||||
initialized: boolean = false;
|
||||
properties;
|
||||
piwikSiteId;
|
||||
constructor(private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private stakeholderService: StakeholderService, private configurationService: ConfigurationService) {
|
||||
private stakeholderService: StakeholderService) {
|
||||
}
|
||||
subscriptions = [];
|
||||
ngOnDestroy() {
|
||||
|
@ -55,11 +53,6 @@ export class MonitorSearchResearchResultsComponent {
|
|||
let value = stakeholder.index_id+"||"+stakeholder.index_name;
|
||||
this.customFilter = new SearchCustomFilter("Community", "community", value, stakeholder.name);
|
||||
}
|
||||
this.subscriptions.push(this.configurationService.communityInformationState.subscribe(portal => {
|
||||
if (portal) {
|
||||
this.piwikSiteId = portal.piwik;
|
||||
}
|
||||
}));
|
||||
this.initialized = true;
|
||||
}
|
||||
}));
|
||||
|
|
|
@ -49,7 +49,6 @@ export let properties: EnvProperties = {
|
|||
vocabulariesAPI: "https://beta.services.openaire.eu/provision/mvc/vocabularies/",
|
||||
|
||||
piwikBaseUrl: "https://analytics.openaire.eu/piwik.php?idsite=",
|
||||
piwikSiteId: "298",
|
||||
loginUrl: "https://beta.services.openaire.eu/login-service/openid_connect_login",
|
||||
userInfoUrl: "https://beta.services.openaire.eu/login-service/userInfo",
|
||||
registryUrl: 'https://beta.services.openaire.eu/uoa-user-management/api/registry/',
|
||||
|
|
|
@ -49,7 +49,6 @@ export let properties: EnvProperties = {
|
|||
vocabulariesAPI: "https://services.openaire.eu/provision/mvc/vocabularies/",
|
||||
|
||||
piwikBaseUrl: "https://analytics.openaire.eu/piwik.php?idsite=",
|
||||
piwikSiteId: "104",
|
||||
loginUrl: "https://services.openaire.eu/login-service/openid_connect_login",
|
||||
registryUrl: 'https://services.openaire.eu/uoa-user-management/api/registry/',
|
||||
userInfoUrl: "https://services.openaire.eu/login-service/userInfo",
|
||||
|
|
|
@ -10,7 +10,7 @@ export let properties: EnvProperties = {
|
|||
dashboard: 'monitor',
|
||||
adminToolsPortalType: "monitor",
|
||||
isDashboard: true,
|
||||
enablePiwikTrack: false,
|
||||
enablePiwikTrack: true,
|
||||
useCache: false,
|
||||
useLongCache: false,
|
||||
showContent: true,
|
||||
|
@ -54,7 +54,6 @@ export let properties: EnvProperties = {
|
|||
utilsService: "http://mpagasas.di.uoa.gr:8000",
|
||||
vocabulariesAPI: "https://dev-openaire.d4science.org/provision/mvc/vocabularies/",
|
||||
piwikBaseUrl: "https://analytics.openaire.eu/piwik.php?idsite=",
|
||||
piwikSiteId: "80",
|
||||
registryUrl: 'http://mpagasas.di.uoa.gr:8080/dnet-openaire-users-1.0.0-SNAPSHOT/api/registry/',
|
||||
loginUrl: "http://mpagasas.di.uoa.gr:19080/login-service/openid_connect_login",
|
||||
userInfoUrl: "http://mpagasas.di.uoa.gr:19080/login-service/userInfo",
|
||||
|
|
Loading…
Reference in New Issue