Revision 60171
Added by Argiro Kokogiannaki over 3 years ago
dataset.component.ts | ||
---|---|---|
2 | 2 |
import {ActivatedRoute, Router} from "@angular/router"; |
3 | 3 |
import {StakeholderService} from "../../../openaireLibrary/monitor/services/stakeholder.service"; |
4 | 4 |
import {Subscriber} from "rxjs"; |
5 |
import {ConfigurationService} from "../../../openaireLibrary/utils/configuration/configuration.service"; |
|
5 | 6 |
|
6 | 7 |
@Component({ |
7 | 8 |
selector: 'monitor-dataset', |
8 | 9 |
template: ` |
9 | 10 |
<div id="page_content"> |
10 |
<result-landing *ngIf="initialized" type="dataset"></result-landing> |
|
11 |
<result-landing *ngIf="initialized" type="dataset" [communityId]="communityId" [piwikSiteId]="piwikSiteId"></result-landing>
|
|
11 | 12 |
</div> |
12 | 13 |
`, |
13 | 14 |
}) |
14 | 15 |
export class MonitorDatasetComponent { |
15 | 16 |
initialized: boolean = false; |
16 |
|
|
17 |
communityId; |
|
18 |
piwikSiteId; |
|
17 | 19 |
constructor(private route: ActivatedRoute, |
18 | 20 |
private router: Router, |
19 |
private stakeholderService: StakeholderService) { |
|
21 |
private stakeholderService: StakeholderService, private configurationService: ConfigurationService) {
|
|
20 | 22 |
} |
21 | 23 |
subscriptions = []; |
22 | 24 |
ngOnDestroy() { |
... | ... | |
32 | 34 |
this.subscriptions.push(this.stakeholderService.getStakeholderAsObservable().subscribe(stakeholder => { |
33 | 35 |
if (stakeholder) { |
34 | 36 |
this.initialized = true; |
37 |
this.communityId = stakeholder.alias; |
|
38 |
this.subscriptions.push(this.configurationService.communityInformationState.subscribe(portal => { |
|
39 |
if (portal) { |
|
40 |
this.piwikSiteId = portal.piwik; |
|
41 |
} |
|
42 |
})); |
|
35 | 43 |
} |
36 | 44 |
})); |
37 | 45 |
} |
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