Project

General

Profile

« Previous | Next » 

Revision 57363

[Monitor]: Add indicators.

View differences:

monitor.component.ts
11 11
import {HelperService} from "../openaireLibrary/utils/helper/helper.service";
12 12
import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service";
13 13
import {StakeholderService} from "../services/stakeholder.service";
14
import {Category, Stakeholder, SubCategory, Topic} from "../utils/entities/stakeholder";
14
import {Category, Indicator, Stakeholder, SubCategory, Topic} from "../utils/entities/stakeholder";
15 15
import {MenuItem, RootMenuItem, SideMenuItem} from "../openaireLibrary/sharedComponents/menu";
16 16

  
17 17
@Component({
......
30 30
  public sideMenuItems: SideMenuItem[] = null;
31 31
  public errorCodes: ErrorCodes;
32 32
  public stakeholder: Stakeholder;
33
  public numbers: Indicator[] = [];
34
  public charts: Indicator[] = [];
33 35
  private errorMessages: ErrorMessagesComponent;
34 36
  properties: EnvProperties;
35 37

  
......
115 117
          }
116 118
          if(this.activeSubCategory) {
117 119
            this.setSideBar();
120
            this.setIndicators();
118 121
            return;
119 122
          }
120 123
        }
......
152 155
    });
153 156
  }
154 157

  
158
  private setIndicators() {
159
    this.stakeholderService.getIndicators(this.activeSubCategory.numbers).subscribe( numbers => {
160
      this.numbers = numbers;
161
    });
162
    this.stakeholderService.getIndicators(this.activeSubCategory.charts).subscribe( charts => {
163
      this.charts = charts;
164
    });
165
  }
166

  
155 167
  public navigateToError() {
156 168
    this._router.navigate(['/error'],{queryParams: {'page': this._router.url}});
157 169
  }

Also available in: Unified diff