Revision 60171
Added by Argiro Kokogiannaki over 3 years ago
searchResearchResults.component.ts | ||
---|---|---|
4 | 4 |
import {StakeholderService} from "../../../openaireLibrary/monitor/services/stakeholder.service"; |
5 | 5 |
import {Subscriber} from "rxjs"; |
6 | 6 |
import {properties} from "../../../../environments/environment"; |
7 |
import {ConfigurationService} from "../../../openaireLibrary/utils/configuration/configuration.service"; |
|
7 | 8 |
|
8 | 9 |
@Component({ |
9 | 10 |
selector: 'monitor-search-results', |
... | ... | |
14 | 15 |
[includeOnlyResultsAndFilter]="false" |
15 | 16 |
[showSwitchSearchLink]="true" |
16 | 17 |
[openaireLink]="'https://'+(properties.environment != 'production'?'beta.':'')+'explore.openaire.eu/search/simple/research-outcomes'" |
18 |
[piwikSiteId]="piwikSiteId" |
|
17 | 19 |
></search-research-results> |
18 | 20 |
</div> |
19 | 21 |
`, |
... | ... | |
22 | 24 |
customFilter: SearchCustomFilter = null; |
23 | 25 |
initialized: boolean = false; |
24 | 26 |
properties; |
27 |
piwikSiteId; |
|
25 | 28 |
constructor(private route: ActivatedRoute, |
26 | 29 |
private router: Router, |
27 |
private stakeholderService: StakeholderService) { |
|
30 |
private stakeholderService: StakeholderService, private configurationService: ConfigurationService) {
|
|
28 | 31 |
} |
29 | 32 |
subscriptions = []; |
30 | 33 |
ngOnDestroy() { |
... | ... | |
51 | 54 |
let value = stakeholder.index_id+"||"+stakeholder.index_name; |
52 | 55 |
this.customFilter = new SearchCustomFilter("Community", "community", value, stakeholder.name); |
53 | 56 |
} |
57 |
this.subscriptions.push(this.configurationService.communityInformationState.subscribe(portal => { |
|
58 |
if (portal) { |
|
59 |
this.piwikSiteId = portal.piwik; |
|
60 |
} |
|
61 |
})); |
|
54 | 62 |
this.initialized = true; |
55 | 63 |
} |
56 | 64 |
})); |
Also available in: Unified diff
[Monitor dashboard | Trunk]
Admin tools:
- move amdin tool components underadmin-tool folder
- create admin tool routing module
- remove guard from each module and put it in admin tool routing module
Piwik:
- add piwik from configuration service and pass it in search, landing, monitor
App component:
- when stakeholder changes: update or reset properties adminToolsCommunity, adminToolsPortalType and init community information