Revision 60171
Added by Argiro Kokogiannaki over 3 years ago
searchProjects.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-advanced-search-projects', |
... | ... | |
13 | 14 |
[customFilter]=customFilter [hasPrefix]="false" |
14 | 15 |
[includeOnlyResultsAndFilter]="false" [showSwitchSearchLink]="showSwitchSearchLink" |
15 | 16 |
[openaireLink]="'https://'+(properties.environment != 'production'?'beta.':'')+'explore.openaire.eu/search/simple/projects'" |
17 |
[piwikSiteId]="piwikSiteId" |
|
16 | 18 |
> |
17 | 19 |
</search-projects> |
18 | 20 |
</div> |
... | ... | |
24 | 26 |
initialized: boolean = false; |
25 | 27 |
showSwitchSearchLink:boolean = false; |
26 | 28 |
properties; |
29 |
piwikSiteId; |
|
27 | 30 |
constructor(private route: ActivatedRoute, |
28 | 31 |
private router: Router, |
29 |
private stakeholderService: StakeholderService) { |
|
32 |
private stakeholderService: StakeholderService, private configurationService: ConfigurationService) {
|
|
30 | 33 |
} |
31 | 34 |
subscriptions = []; |
32 | 35 |
ngOnDestroy() { |
... | ... | |
55 | 58 |
let value = stakeholder.index_id+"||"+stakeholder.index_name; |
56 | 59 |
this.customFilter = new SearchCustomFilter("Community", "community", value, stakeholder.name); |
57 | 60 |
} |
61 |
this.subscriptions.push(this.configurationService.communityInformationState.subscribe(portal => { |
|
62 |
if (portal) { |
|
63 |
this.piwikSiteId = portal.piwik; |
|
64 |
} |
|
65 |
})); |
|
58 | 66 |
this.initialized = true; |
59 | 67 |
} |
60 | 68 |
})); |
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