Revision 60171
Added by Argiro Kokogiannaki over 3 years ago
searchDataproviders.component.ts | ||
---|---|---|
3 | 3 |
import {ActivatedRoute, Router} from "@angular/router"; |
4 | 4 |
import {StakeholderService} from "../../../openaireLibrary/monitor/services/stakeholder.service"; |
5 | 5 |
import {Subscriber} from "rxjs"; |
6 |
import {ConfigurationService} from "../../../openaireLibrary/utils/configuration/configuration.service"; |
|
6 | 7 |
|
7 | 8 |
@Component({ |
8 | 9 |
selector: 'monitor-advanced-search-dataproviders', |
... | ... | |
10 | 11 |
<div id="page_content"> |
11 | 12 |
<search-dataproviders *ngIf="initialized" [simpleView]="false" |
12 | 13 |
[customFilter]=customFilter [hasPrefix]="false" |
13 |
[includeOnlyResultsAndFilter]="false" [showSwitchSearchLink]="showSwitchSearchLink"> |
|
14 |
[includeOnlyResultsAndFilter]="false" [showSwitchSearchLink]="showSwitchSearchLink" [piwikSiteId]="piwikSiteId">
|
|
14 | 15 |
</search-dataproviders> |
15 | 16 |
</div> |
16 | 17 |
` |
... | ... | |
19 | 20 |
customFilter: SearchCustomFilter = null; |
20 | 21 |
initialized: boolean = false; |
21 | 22 |
showSwitchSearchLink:boolean = false; |
23 |
piwikSiteId; |
|
22 | 24 |
constructor(private route: ActivatedRoute, |
23 | 25 |
private router: Router, |
24 |
private stakeholderService: StakeholderService) { |
|
26 |
private stakeholderService: StakeholderService, private configurationService: ConfigurationService) {
|
|
25 | 27 |
} |
26 | 28 |
subscriptions = []; |
27 | 29 |
ngOnDestroy() { |
... | ... | |
48 | 50 |
let value = stakeholder.index_id+"||"+stakeholder.index_name; |
49 | 51 |
this.customFilter = new SearchCustomFilter("Community", "community", value, stakeholder.name); |
50 | 52 |
} |
53 |
this.subscriptions.push(this.configurationService.communityInformationState.subscribe(portal => { |
|
54 |
if (portal) { |
|
55 |
this.piwikSiteId = portal.piwik; |
|
56 |
} |
|
57 |
})); |
|
51 | 58 |
this.initialized = true; |
52 | 59 |
} |
53 | 60 |
})); |
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