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-search-projects', |
... | ... | |
12 | 13 |
<search-projects *ngIf="initialized" |
13 | 14 |
[customFilter]=customFilter [hasPrefix]="false" |
14 | 15 |
[includeOnlyResultsAndFilter]="false" |
15 |
[openaireLink]="'https://'+(properties.environment != 'production'?'beta.':'')+'explore.openaire.eu/search/simple/projects'"> |
|
16 |
[openaireLink]="'https://'+(properties.environment != 'production'?'beta.':'')+'explore.openaire.eu/search/simple/projects'" |
|
17 |
[piwikSiteId]="piwikSiteId"> |
|
16 | 18 |
</search-projects> |
17 | 19 |
</div> |
18 | 20 |
` |
... | ... | |
21 | 23 |
export class MonitorSearchProjectsComponent { |
22 | 24 |
customFilter: SearchCustomFilter = null; |
23 | 25 |
initialized: boolean = false; |
24 |
properties |
|
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() { |
... | ... | |
50 | 53 |
} else if (stakeholder.type === "ri") { |
51 | 54 |
this.navigateToError(); |
52 | 55 |
} |
56 |
this.subscriptions.push(this.configurationService.communityInformationState.subscribe(portal => { |
|
57 |
if (portal) { |
|
58 |
this.piwikSiteId = portal.piwik; |
|
59 |
} |
|
60 |
})); |
|
53 | 61 |
this.initialized = true; |
54 | 62 |
|
55 | 63 |
} |
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