Compare commits
2 Commits
cd186590b7
...
d2cc0b0f33
Author | SHA1 | Date |
---|---|---|
argirok | d2cc0b0f33 | |
argirok | 3650b11215 |
|
@ -7,10 +7,9 @@
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
<slider-container [total]="activeCards.length" [navigation]="'progress'" [period]="6000" [infinite]="true" [parent]="parent">
|
<slider-container [total]="activeCards.length" [navigation]="'progress'" [period]="6000" [infinite]="true" [parent]="parent">
|
||||||
|
<ng-container *ngIf="activeCards.length > 0">
|
||||||
<slider-column type="nav" class="slider-nav">
|
<slider-column type="nav" class="slider-nav" style="min-height: 300px">
|
||||||
<ng-container *ngFor="let card of activeCards; let i = index">
|
<ng-container *ngFor="let card of activeCards; let i = index">
|
||||||
<ng-container *ngIf="card.show">
|
|
||||||
<slider-nav-item [start]="i">
|
<slider-nav-item [start]="i">
|
||||||
<div class="uk-text-primary">{{card.tag}}</div>
|
<div class="uk-text-primary">{{card.tag}}</div>
|
||||||
<div class="uk-margin-remove uk-text-large uk-text-bold">
|
<div class="uk-margin-remove uk-text-large uk-text-bold">
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
</a>
|
</a>
|
||||||
</slider-nav-item>
|
</slider-nav-item>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</ng-container>
|
|
||||||
</slider-column>
|
</slider-column>
|
||||||
<slider-column type="slider">
|
<slider-column type="slider">
|
||||||
<slider-item type="static">
|
<slider-item type="static">
|
||||||
|
@ -31,14 +29,13 @@
|
||||||
+ 'connect.openaire.eu/assets/connect-assets/home/tablet.png'"
|
+ 'connect.openaire.eu/assets/connect-assets/home/tablet.png'"
|
||||||
alt="ipad" loading="lazy">
|
alt="ipad" loading="lazy">
|
||||||
</slider-item>
|
</slider-item>
|
||||||
<ng-container *ngFor="let card of pluginObject.cardInfoArray; let i = index">
|
<ng-container *ngFor="let card of activeCards; let i = index">
|
||||||
<ng-container *ngIf="card.show">
|
|
||||||
<slider-item type="slide" [start]="i">
|
<slider-item type="slide" [start]="i">
|
||||||
<img [src]="card.image" [alt]="card.tag" loading="lazy">
|
<img [src]="card.image" [alt]="card.tag" loading="lazy">
|
||||||
</slider-item>
|
</slider-item>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</ng-container>
|
|
||||||
</slider-column>
|
</slider-column>
|
||||||
|
</ng-container>
|
||||||
</slider-container>
|
</slider-container>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -21,7 +21,7 @@ export class MonitorComponent extends MonitorIndicatorStakeholderBaseComponent {
|
||||||
activeChartSectionIndex: number = 0;
|
activeChartSectionIndex: number = 0;
|
||||||
stakeholder = null;
|
stakeholder = null;
|
||||||
@Input() pluginObject: PluginStats;
|
@Input() pluginObject: PluginStats;
|
||||||
|
profiles;
|
||||||
constructor(protected _route: ActivatedRoute,
|
constructor(protected _route: ActivatedRoute,
|
||||||
protected _router: Router,
|
protected _router: Router,
|
||||||
protected _meta: Meta,
|
protected _meta: Meta,
|
||||||
|
@ -45,9 +45,29 @@ export class MonitorComponent extends MonitorIndicatorStakeholderBaseComponent {
|
||||||
this.subscriptions.push(this.communityService.getCommunityAsObservable().subscribe(communityInfo => {
|
this.subscriptions.push(this.communityService.getCommunityAsObservable().subscribe(communityInfo => {
|
||||||
|
|
||||||
if (communityInfo) {
|
if (communityInfo) {
|
||||||
|
this.subscriptions.push(this.http.get(this.properties.monitorStatsFrameUrl+"/schema/profiles").subscribe((profiles:any[]) => {
|
||||||
|
this.profiles = profiles.map( (profile) => profile.name);
|
||||||
|
let profile = PluginStats.getDefaultProfile();
|
||||||
|
if(this.profiles.indexOf("monitor_"+communityInfo.communityId.replace("-","_"))!=-1){
|
||||||
|
profile = this.profiles[this.profiles.indexOf("monitor_"+communityInfo.communityId.replace("-","_"))];
|
||||||
|
}else if(communityInfo.type == "ri" && this.profiles.indexOf("monitor_ris_tail")!=-1){
|
||||||
|
profile = "monitor_ris_tail";
|
||||||
|
}
|
||||||
|
this.init(communityInfo, profile);
|
||||||
|
}, error => {
|
||||||
|
let profile =
|
||||||
|
this.init(communityInfo, PluginStats.getDefaultProfile());
|
||||||
|
}))
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
public init(communityInfo, profile){
|
||||||
|
console.log(profile)
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.stakeholder = PluginStats.getMockStakeholder();
|
this.stakeholder = PluginStats.getMockStakeholder();
|
||||||
|
this.stakeholder.statsProfile = profile;
|
||||||
this.stakeholder.index_id = communityInfo.communityId
|
this.stakeholder.index_id = communityInfo.communityId
|
||||||
this.stakeholder.index_name = communityInfo.title;
|
this.stakeholder.index_name = communityInfo.title;
|
||||||
this.stakeholder.index_shortName = communityInfo.shortTitle;
|
this.stakeholder.index_shortName = communityInfo.shortTitle;
|
||||||
|
@ -66,11 +86,7 @@ export class MonitorComponent extends MonitorIndicatorStakeholderBaseComponent {
|
||||||
ids.push(indicator._id)
|
ids.push(indicator._id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
public showSection(section: Section): boolean {
|
public showSection(section: Section): boolean {
|
||||||
for (let indicator of section.indicators) {
|
for (let indicator of section.indicators) {
|
||||||
if (this.showIndicator(indicator)) {
|
if (this.showIndicator(indicator)) {
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue