Project

General

Profile

« Previous | Next » 

Revision 57647

StakeholderCreator:
initialize filters where is posible
monitor page:
apply filters when available
add filters section in html for testing (commented)
Indicator-utils:
create IndicatorPath from URL:
add checks if filters & queries exist
apply parameters when there are more than one queries
add Indicator filters if possible
old Tool:
add basic fields in parameters
fix url

View differences:

modules/uoa-monitor-portal/trunk/monitor_dashboard/src/app/services/stakeholder.service.ts
81 81
                  indicatorPath.parameters = new Map<string, string>(Object.entries(indicatorPath.parameters));
82 82
                }
83 83
                if(indicatorPath.filters) {
84
                  let filters = new Map<string, Map<string, string>>();
85
                  Object.entries(indicatorPath.filters).forEach(([key, value]) => {
86
                    filters.set(key, new Map<string, string>(Object.entries(value)));
87
                  });
88
                  indicatorPath.filters = filters;
84
                  // let filters = new Map<string, Map<string, string>>();
85
                  // Object.entries(indicatorPath.filters).forEach(([key, value]) => {
86
                  //   filters.set(key, new Map<string, string>(Object.entries(value)));
87
                  // });
88
                  indicatorPath.filters =  new Map<string, string>(Object.entries(indicatorPath.filters));
89 89
                }
90 90
              });
91 91
            });
modules/uoa-monitor-portal/trunk/monitor_dashboard/src/app/monitor/monitor.component.html
27 27
  <div *ngIf="activeSubCategory"
28 28
       id="page_content" click-outside-or-esc targetId="page_content" (clickOutside)="toggleOpen($event)">
29 29
    <div id="page_content_inner">
30
<!--      <div>
31
        Filters
32
        <input class="uk-input uk-form-width-medium" placeholder="Funding Stream" type="text" name="fund_level_0"
33
               [(ngModel)]="fundingL0">
34

  
35
      <input class="uk-input uk-form-width-medium" placeholder="Start year" type="text" name="start_year"
36
             [(ngModel)]="startYear">
37
        <input class="uk-input uk-form-width-medium" placeholder="End year" type="text" name="end_year"
38
               [(ngModel)]="endYear">
39
        <button class="uk-button uk-button-primary" (click)="setIndicators()">Apply</button>
40
  </div>-->
30 41
      <h5 class="uk-margin uk-margin-top uk-text-bold">Indicators</h5>
31 42
      <div class="uk-grid uk-grid-medium uk-margin-bottom" uk-height-match="target: div > h6">
32 43
        <ng-template ngFor [ngForOf]="activeSubCategory.numbers" let-number let-i="index">
modules/uoa-monitor-portal/trunk/monitor_dashboard/src/app/monitor/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, IndicatorPath, Stakeholder, SubCategory, Topic} from "../utils/entities/stakeholder";
14
import {Category, ChartHelper, IndicatorPath, Stakeholder, SubCategory, Topic} from "../utils/entities/stakeholder";
15 15
import {StatisticsService} from "../utils/services/statistics.service";
16 16
import {Item, Sidebar} from "../utils/entities/sidebar";
17 17
import {SideBarService} from "../library/sharedComponents/sidebar/sideBar.service";
......
38 38
  public chartsActiveType: Map<number, IndicatorPath> = new Map<number, IndicatorPath>();
39 39
  private errorMessages: ErrorMessagesComponent;
40 40
  properties: EnvProperties;
41
  fundingL0;
42
  startYear;
43
  endYear;
41 44

  
42 45
  constructor(
43 46
    private route: ActivatedRoute,
......
193 196
    let urls: Map<string, number[]> = new Map<string, number[]>();
194 197
    this.activeSubCategory.numbers.forEach((number, index) => {
195 198
      if (number.isActive && number.isPublic) {
196
        const pair = JSON.stringify([number.indicatorPaths[0].source, number.indicatorPaths[0].url]);
199
        let url = number.indicatorPaths[0].url;
200
        //add fundingLevel0 filter in the query
201
        if(this.fundingL0 && number.indicatorPaths[0].filters.get("fundingL0")){
202
          url = url + number.indicatorPaths[0].filters.get("fundingL0").replace(ChartHelper.prefix+'fundingL0'+ChartHelper.suffix,encodeURIComponent(this.fundingL0));
203
        }
204
        const pair = JSON.stringify([number.indicatorPaths[0].source, url]);
197 205
        const indexes = urls.get(pair) ? urls.get(pair) : [];
198 206
        indexes.push(index);
199 207
        urls.set(pair, indexes);
......
224 232

  
225 233
  public getUrlByStakeHolder(indicatorPath: IndicatorPath) {
226 234
    return this.sanitizer.bypassSecurityTrustResourceUrl(
227
      this.statisticsService.getChartUrl(indicatorPath.source, this.indicatorUtils.getFullUrl(indicatorPath)));
235
      this.statisticsService.getChartUrl(indicatorPath.source, this.indicatorUtils.getFullUrl(indicatorPath, this.fundingL0, this.startYear, this.endYear)));
228 236
  }
229 237

  
230 238
  public setActiveChart(index, type: string) {
modules/uoa-monitor-portal/trunk/monitor_dashboard/src/app/utils/indicator-utils.ts
1
import {ChartHelper, IndicatorPath} from "./entities/stakeholder";
1
import {ChartHelper, IndicatorPath, Stakeholder} from "./entities/stakeholder";
2 2

  
3 3
export class IndicatorUtils {
4 4

  
......
20 20

  
21 21
  ignoredParameters = ['funder_name'];
22 22

  
23
  public getFullUrl(indicatorPath: IndicatorPath): string {
23
  public getFullUrl(indicatorPath: IndicatorPath, fundingL0:string = null, startDate:string = null, endDate:string = null):string{
24

  
24 25
    let replacedUrl = indicatorPath.chartObject;
25 26
    if (indicatorPath.parameters) {
26
      Object.entries(indicatorPath.parameters).forEach((key, value) => {
27
        replacedUrl = replacedUrl.replace(ChartHelper.prefix + key + ChartHelper.suffix, value.toString());
27
      indicatorPath.parameters.forEach((value, key) => {
28
        let replacedValue = value.toString();
29
        if( startDate && key == "start_year" && indicatorPath.filters.get("start_year")){
30
          replacedValue = (replacedValue < startDate)?startDate:replacedValue;
31
        }
32
        if( endDate && key == "end_year" && indicatorPath.filters.get("end_year")){
33
          replacedValue = (replacedValue > endDate)?endDate:replacedValue;
34
        }
35
        replacedUrl = replacedUrl.replace(ChartHelper.prefix + key + ChartHelper.suffix, replacedValue);
28 36
      });
29 37
    }
38
    if(indicatorPath.chartObject){
39
      if(fundingL0  && indicatorPath.filters.get("fundingL0")){
40
        let newJsonObject = JSON.parse(replacedUrl);
41
        for(let queries of newJsonObject["chartDescription"]["queries"]){
42
          if(!queries["query"]["filters"] || queries["query"]["filters"].length ==0) {
43
            queries["query"]["filters"] = [];
44
          }
45
          //TODO check how it works if the query already has a filter
46
            queries["query"]["filters"].push(JSON.parse(indicatorPath.filters.get("fundingL0").replace(ChartHelper.prefix + "fundingL0" + ChartHelper.suffix,fundingL0)));
47
        }
48
        replacedUrl = JSON.stringify(newJsonObject);
49

  
50
      }
51
    }
30 52
    return indicatorPath.url + encodeURIComponent(replacedUrl);
31 53
  }
32 54

  
......
45 67
      this.extractStartYear(chart, indicatorPath);
46 68
      this.extractEndYear(chart, indicatorPath);
47 69
      indicatorPath.chartObject = JSON.stringify(chart);
70
      this.addResultFilters(chart,indicatorPath);
48 71
    } else if (source === 'old') {
49
      indicatorPath.url = url.split("data=")[0] + "data=";
50
      indicatorPath.chartObject = decodeURIComponent(url.split("data=")[1]);
72
      indicatorPath.url = url.split("data=")[0].split("/stats/")[1] + "data=";
73
      indicatorPath.chartObject = decodeURIComponent(url.split("data=")[1].split("&")[0]);
74
      let chart = JSON.parse(indicatorPath.chartObject);
75
      this.extractOldToolTitle(chart,indicatorPath);
76
      this.extractOldToolXTitle(chart,indicatorPath);
77
      this.extractOldToolYTitle(chart,indicatorPath);
78
      indicatorPath.chartObject = JSON.stringify(chart);
51 79
    } else {
52 80
      indicatorPath.url = url;
53 81
      indicatorPath.type = type;
......
69 97

  
70 98
  private extractFunder(obj, indicatorPath: IndicatorPath) {
71 99
    let funderName;
72
    for (let filter of obj["chartDescription"]["queries"][0]["query"]["filters"]) {
73
      if (filter["groupFilters"][0]["field"].indexOf(".funder") != -1) {
74
        funderName = filter["groupFilters"][0]["values"][0];
75
        filter["groupFilters"][0]["values"][0] = ChartHelper.prefix + "funder_name" + ChartHelper.suffix;
76
        indicatorPath.parameters.set("funder_name", funderName);
100
    for (let query of obj["chartDescription"]["queries"]) {
101
      if(!query["query"]["filters"]){
102
        return;
77 103
      }
104
      for (let filter of query["query"]["filters"]) {
105
        if (filter["groupFilters"][0]["field"].indexOf(".funder") != -1) {
106
          funderName = filter["groupFilters"][0]["values"][0];
107
          filter["groupFilters"][0]["values"][0] = ChartHelper.prefix + "funder_name" + ChartHelper.suffix;
108
          indicatorPath.parameters.set("funder_name", funderName);
109
        }
110
      }
78 111
    }
79 112
  }
80 113

  
81 114
  private extractStartYear(obj, indicatorPath: IndicatorPath) {
82 115
    let start_year;
83
    for (let filter of obj["chartDescription"]["queries"][0]["query"]["filters"]) {
84
      for (let gfilter of filter["groupFilters"]) {
85
        if (gfilter["field"].indexOf(".year") != -1 && gfilter["type"].indexOf(">") != -1) {
86
          start_year = gfilter["values"][0];
87
          gfilter["values"][0] = ChartHelper.prefix + "start_year" + ChartHelper.suffix;
88
          indicatorPath.parameters.set("start_year", start_year);
116
    for (let query of obj["chartDescription"]["queries"]) {
117
      if(!query["query"]["filters"]){
118
        return;
119
      }
120
      for (let filter of query["query"]["filters"]) {
121
        for (let gfilter of filter["groupFilters"]) {
122
          if (gfilter["field"].indexOf(".year") != -1 && gfilter["type"].indexOf(">") != -1) {
123
            start_year = gfilter["values"][0];
124
            gfilter["values"][0] = ChartHelper.prefix + "start_year" + ChartHelper.suffix;
125
            indicatorPath.parameters.set("start_year", start_year);
126
          }
89 127
        }
90 128
      }
91 129
    }
......
93 131

  
94 132
  private extractEndYear(obj, indicatorPath: IndicatorPath) {
95 133
    let end_year;
96
    for (let filter of obj["chartDescription"]["queries"][0]["query"]["filters"]) {
97
      for (let gfilter of filter["groupFilters"]) {
98
        if (gfilter["field"].indexOf(".year") != -1 && gfilter["type"].indexOf("<") != -1) {
99
          end_year = gfilter["values"][0];
100
          gfilter["values"][0] = ChartHelper.prefix + "end_year" + ChartHelper.suffix;
101
          indicatorPath.parameters.set("end_year", end_year);
134
    for (let query of obj["chartDescription"]["queries"]) {
135
      if(!query["query"]["filters"]){
136
        return;
137
      }
138
      for (let filter of query["query"]["filters"]) {
139
        for (let gfilter of filter["groupFilters"]) {
140
          if (gfilter["field"].indexOf(".year") != -1 && gfilter["type"].indexOf("<") != -1) {
141
            end_year = gfilter["values"][0];
142
            gfilter["values"][0] = ChartHelper.prefix + "end_year" + ChartHelper.suffix;
143
            indicatorPath.parameters.set("end_year", end_year);
144
          }
102 145
        }
103 146
      }
104 147
    }
105 148
  }
106 149

  
107 150
  private extractTitle(obj, indicatorPath: IndicatorPath) {
108
    let title = obj["chartDescription"]["title"]["text"];
151
    let title = "";
109 152
    if (obj["chartDescription"]["title"]) {
153
      title = obj["chartDescription"]["title"]["text"];
110 154
      obj["chartDescription"]["title"]["text"] = ChartHelper.prefix + "title" + ChartHelper.suffix;
111 155
      indicatorPath.parameters.set("title", title);
112 156

  
......
114 158
  }
115 159

  
116 160
  private extractXTitle(obj, indicatorPath: IndicatorPath) {
117
    let title = obj["chartDescription"]["xAxis"]["title"]["text"];
161
    let title = "";
118 162
    if (obj["chartDescription"]["xAxis"]["title"]) {
163
      title = obj["chartDescription"]["xAxis"]["title"]["text"];
119 164
      obj["chartDescription"]["xAxis"]["title"]["text"] = ChartHelper.prefix + "xAxisTitle" + ChartHelper.suffix;
120 165
      indicatorPath.parameters.set("xAxisTitle", title);
121 166
    }
122 167
  }
123 168

  
124 169
  private extractYTitle(obj, indicatorPath: IndicatorPath) {
125
    let title = obj["chartDescription"]["yAxis"]["title"]["text"];
170
    let title = "";
126 171
    if (obj["chartDescription"]["yAxis"]["title"]) {
172
      title = obj["chartDescription"]["yAxis"]["title"]["text"];
127 173
      obj["chartDescription"]["yAxis"]["title"]["text"] = ChartHelper.prefix + "yAxisTitle" + ChartHelper.suffix;
128 174
      indicatorPath.parameters.set("yAxisTitle", title);
129 175
    }
130 176
  }
177
  private addResultFilters(obj, indicatorPath: IndicatorPath) {
178
  let resultTypes  = ["publication","software","dataset","other"];
179
  let index = -1;
180
    for (let query of obj["chartDescription"]["queries"]) {
181
      if (!query["query"]["select"]) {
182
        return;
183
      }
184
      for (let select of query["query"]["select"]) {
185
        for (var i=0; i < resultTypes.length; i++) {
186
          if(select.field.startsWith(resultTypes[i]) ) {
187
            index = i;
188
          }
189
        }
190
      }
131 191

  
192
    }
193
    if(index != -1){
194
      indicatorPath.filters = IndicatorPath.createResultFilters(resultTypes[index]);
195
    }
196
  }
197

  
198

  
199
  private extractOldToolTitle(obj, indicatorPath: IndicatorPath) {
200
    let title = "";
201
    if (obj["title"]) {
202
      title = obj["title"];
203
      obj["title"] = ChartHelper.prefix + "title" + ChartHelper.suffix;
204
      indicatorPath.parameters.set("title", title);
205

  
206
    }
207
  }
208

  
209
  private extractOldToolXTitle(obj, indicatorPath: IndicatorPath) {
210
    let title = "";
211
    if (obj["xaxistitle"]) {
212
      title = obj["xaxistitle"];
213
      obj["xaxistitle"] = ChartHelper.prefix + "xAxisTitle" + ChartHelper.suffix;
214
      indicatorPath.parameters.set("xAxisTitle", title);
215
    }
216
  }
217

  
218
  private extractOldToolYTitle(obj, indicatorPath: IndicatorPath) {
219
    let title = "";
220
    if (obj["fieldsheaders"] ) {
221
      title = obj["fieldsheaders"];
222
      obj["fieldsheaders"]  = ChartHelper.prefix + "yAxisTitle" + ChartHelper.suffix;
223
      indicatorPath.parameters.set("yAxisTitle", title);
224
    }
225
  }
226

  
132 227
}
228
/*
229
custom query
230
http://88.197.53.71:8080/stats-api/chart?json=%7B%22library%22%3A%22HighCharts%22%2C%22chartDescription%22%3A%7B%22queries%22%3A%5B%7B%22name%22%3A%22Publications%22%2C%22type%22%3A%22bar%22%2C%22query%22%3A%7B%22name%22%3A%22monitor.ec.publications.datasources%22%7D%7D%5D%2C%22chart%22%3A%7B%22backgroundColor%22%3A%22%23FFFFFFFF%22%2C%22borderColor%22%3A%22%23335cadff%22%2C%22borderRadius%22%3A0%2C%22borderWidth%22%3A0%2C%22plotBorderColor%22%3A%22%23ccccccff%22%2C%22plotBorderWidth%22%3A0%7D%2C%22title%22%3A%7B%22text%22%3A%22Publication%20content%20provider%22%7D%2C%22subtitle%22%3A%7B%7D%2C%22yAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22Publications%22%7D%7D%2C%22xAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22Content%20provider%22%7D%7D%2C%22lang%22%3A%7B%22noData%22%3A%22No%20Data%20available%20for%20the%20Query%22%7D%2C%22exporting%22%3A%7B%22enabled%22%3Atrue%7D%2C%22plotOptions%22%3A%7B%22series%22%3A%7B%22dataLabels%22%3A%7B%22enabled%22%3Afalse%7D%7D%7D%2C%22legend%22%3A%7B%22enabled%22%3Atrue%2C%22align%22%3A%22center%22%2C%22verticalAlign%22%3A%22bottom%22%2C%22layout%22%3A%22horizontal%22%7D%2C%22credits%22%3A%7B%22href%22%3Anull%2C%22enabled%22%3Atrue%2C%22text%22%3A%22Created%20by%20OpenAIRE%20via%20HighCharts%22%7D%7D%7D
231

  
232
query with year filters:
233
http://88.197.53.71:8080/stats-api/chart?json=%7B%22library%22%3A%22HighCharts%22%2C%22chartDescription%22%3A%7B%22queries%22%3A%5B%7B%22name%22%3A%22Publications%22%2C%22type%22%3A%22column%22%2C%22query%22%3A%7B%22select%22%3A%5B%7B%22field%22%3A%22publication%22%2C%22aggregate%22%3A%22count%22%7D%2C%7B%22field%22%3A%22publication.year%22%2C%22aggregate%22%3Anull%7D%5D%2C%22filters%22%3A%5B%7B%22groupFilters%22%3A%5B%7B%22field%22%3A%22publication.project.funder%22%2C%22type%22%3A%22%3D%22%2C%22values%22%3A%5B%22European%20Commission%22%5D%7D%5D%2C%22op%22%3A%22AND%22%7D%2C%7B%22groupFilters%22%3A%5B%7B%22field%22%3A%22publication.year%22%2C%22type%22%3A%22%3E%3D%22%2C%22values%22%3A%5B%222008%22%5D%7D%2C%7B%22field%22%3A%22publication.year%22%2C%22type%22%3A%22%3C%3D%22%2C%22values%22%3A%5B%222020%22%5D%7D%5D%2C%22op%22%3A%22AND%22%7D%5D%2C%22entity%22%3A%22publication%22%2C%22profile%22%3A%22OpenAIRE%20All-inclusive%22%2C%22limit%22%3A%220%22%7D%7D%5D%2C%22chart%22%3A%7B%22backgroundColor%22%3A%22%23FFFFFFFF%22%2C%22borderColor%22%3A%22%23335cadff%22%2C%22borderRadius%22%3A0%2C%22borderWidth%22%3A0%2C%22plotBorderColor%22%3A%22%23ccccccff%22%2C%22plotBorderWidth%22%3A0%7D%2C%22title%22%3A%7B%22text%22%3A%22Publications%20timeline%22%7D%2C%22subtitle%22%3A%7B%7D%2C%22yAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22Publications%22%7D%7D%2C%22xAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22Year%22%7D%7D%2C%22lang%22%3A%7B%22noData%22%3A%22No%20Data%20available%20for%20the%20Query%22%7D%2C%22exporting%22%3A%7B%22enabled%22%3Atrue%7D%2C%22plotOptions%22%3A%7B%22series%22%3A%7B%22dataLabels%22%3A%7B%22enabled%22%3Afalse%7D%7D%7D%2C%22legend%22%3A%7B%22enabled%22%3Atrue%2C%22align%22%3A%22center%22%2C%22verticalAlign%22%3A%22bottom%22%2C%22layout%22%3A%22horizontal%22%7D%2C%22credits%22%3A%7B%22href%22%3Anull%2C%22enabled%22%3Atrue%2C%22text%22%3A%22Created%20by%20OpenAIRE%20via%20HighCharts%22%7D%7D%7D
234

  
235
double query
236
http://88.197.53.71:8080/stats-api/chart?json=%7B%22library%22%3A%22HighCharts%22%2C%22chartDescription%22%3A%7B%22colors%22%3A%5B%22%2342a5f5%22%2C%22%2326a69a%22%2C%22%2390ed7d%22%2C%22%23607d8b%22%2C%22%2300838f%22%2C%22%23689f38%22%2C%22%23e4d354%22%2C%22%232b908f%22%2C%22%23546e7a%22%2C%22%2301579%22%5D%2C%22queries%22%3A%5B%7B%22name%22%3A%22Gold%22%2C%22color%22%3A%22%23f8b500%22%2C%22type%22%3A%22column%22%2C%22query%22%3A%7B%22select%22%3A%5B%7B%22field%22%3A%22result%22%2C%22aggregate%22%3A%22count%22%7D%2C%7B%22field%22%3A%22result.year%22%2C%22aggregate%22%3Anull%7D%5D%2C%22filters%22%3A%5B%7B%22groupFilters%22%3A%5B%7B%22field%22%3A%22result.project.funder%22%2C%22type%22%3A%22%3D%22%2C%22values%22%3A%5B%22European%20Commission%22%5D%7D%2C%7B%22field%22%3A%22result.project.funding%20level%200%22%2C%22type%22%3A%22%3D%22%2C%22values%22%3A%5B%22H2020%22%5D%7D%2C%7B%22field%22%3A%22result.type%22%2C%22type%22%3A%22%3D%22%2C%22values%22%3A%5B%22publication%22%5D%7D%2C%7B%22field%22%3A%22result.year%22%2C%22type%22%3A%22%3E%3D%22%2C%22values%22%3A%5B%222014%22%5D%7D%2C%7B%22field%22%3A%22result.year%22%2C%22type%22%3A%22%3C%3D%22%2C%22values%22%3A%5B%222019%22%5D%7D%2C%7B%22field%22%3A%22result.access%20mode%22%2C%22type%22%3A%22%3D%22%2C%22values%22%3A%5B%22Open%20Access%22%5D%7D%5D%2C%22op%22%3A%22AND%22%7D%2C%7B%22groupFilters%22%3A%5B%7B%22field%22%3A%22result.datasource.type%22%2C%22type%22%3A%22%3D%22%2C%22values%22%3A%5B%22Journal%22%5D%7D%2C%7B%22field%22%3A%22result.datasource.type%22%2C%22type%22%3A%22%3D%22%2C%22values%22%3A%5B%22Journal%20Aggregator%2FPublisher%22%5D%7D%5D%2C%22op%22%3A%22OR%22%7D%5D%2C%22entity%22%3A%22result%22%2C%22profile%22%3A%22OpenAIRE%20original%22%2C%22limit%22%3A%220%22%7D%7D%2C%7B%22name%22%3A%22Green%22%2C%22color%22%3A%22%23239d60%22%2C%22type%22%3A%22column%22%2C%22query%22%3A%7B%22select%22%3A%5B%7B%22field%22%3A%22result%22%2C%22aggregate%22%3A%22count%22%7D%2C%7B%22field%22%3A%22result.year%22%2C%22aggregate%22%3Anull%7D%5D%2C%22filters%22%3A%5B%7B%22groupFilters%22%3A%5B%7B%22field%22%3A%22result.project.funder%22%2C%22type%22%3A%22%3D%22%2C%22values%22%3A%5B%22European%20Commission%22%5D%7D%2C%7B%22field%22%3A%22result.project.funding%20level%200%22%2C%22type%22%3A%22%3D%22%2C%22values%22%3A%5B%22H2020%22%5D%7D%2C%7B%22field%22%3A%22result.type%22%2C%22type%22%3A%22%3D%22%2C%22values%22%3A%5B%22publication%22%5D%7D%2C%7B%22field%22%3A%22result.year%22%2C%22type%22%3A%22%3E%3D%22%2C%22values%22%3A%5B%222014%22%5D%7D%2C%7B%22field%22%3A%22result.year%22%2C%22type%22%3A%22%3C%3D%22%2C%22values%22%3A%5B%222019%22%5D%7D%2C%7B%22field%22%3A%22result.access%20mode%22%2C%22type%22%3A%22%3D%22%2C%22values%22%3A%5B%22Open%20Access%22%5D%7D%5D%2C%22op%22%3A%22AND%22%7D%2C%7B%22groupFilters%22%3A%5B%7B%22field%22%3A%22result.datasource.type%22%2C%22type%22%3A%22%3D%22%2C%22values%22%3A%5B%22Institutional%20Repository%22%5D%7D%2C%7B%22field%22%3A%22result.datasource.type%22%2C%22type%22%3A%22%3D%22%2C%22values%22%3A%5B%22Thematic%20Repository%22%5D%7D%5D%2C%22op%22%3A%22OR%22%7D%5D%2C%22entity%22%3A%22result%22%2C%22profile%22%3A%22OpenAIRE%20original%22%2C%22limit%22%3A%220%22%7D%7D%5D%2C%22chart%22%3A%7B%22backgroundColor%22%3A%22%23FFFFFFFF%22%2C%22borderColor%22%3A%22%23335cadff%22%2C%22borderRadius%22%3A0%2C%22borderWidth%22%3A0%2C%22plotBorderColor%22%3A%22%23ccccccff%22%2C%22plotBorderWidth%22%3A0%7D%2C%22title%22%3A%7B%22text%22%3A%22H2020%20green%20and%20gold%20publications%22%7D%2C%22subtitle%22%3A%7B%22text%22%3A%22over%20time%22%7D%2C%22yAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22Publications%22%7D%7D%2C%22xAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22Year%22%7D%7D%2C%22lang%22%3A%7B%22noData%22%3A%22No%20Data%20available%20for%20the%20Query%22%7D%2C%22exporting%22%3A%7B%22enabled%22%3Atrue%7D%2C%22plotOptions%22%3A%7B%22series%22%3A%7B%22dataLabels%22%3A%7B%22enabled%22%3Afalse%7D%7D%7D%2C%22legend%22%3A%7B%22enabled%22%3Afalse%2C%22align%22%3A%22center%22%2C%22verticalAlign%22%3A%22bottom%22%2C%22layout%22%3A%22horizontal%22%7D%2C%22credits%22%3A%7B%22href%22%3Anull%2C%22enabled%22%3Atrue%2C%22text%22%3A%22Created%20by%20OpenAIRE%20via%20HighCharts%22%7D%7D%7D
237

  
238

  
239
//old tool
240
https://www.openaire.eu/stats/chart.php?com=query&data={%22table%22:%22result%22,%22fields%22:[{%22fld%22:%22number%22,%22agg%22:%22count%22,%22type%22:%22bar%22,%22yaxis%22:1,%22c%22:false}],%22xaxis%22:{%22name%22:%22result_datasources-datasource-name%22,%22agg%22:%22avg%22},%22group%22:%22%22,%22color%22:%22%22,%22type%22:%22chart%22,%22size%22:%2220%22,%22sort%22:%22count-number%22,%22yaxisheaders%22:[%22%22],%22fieldsheaders%22:[%22publications%22],%22in%22:[],%22filters%22:[{%22name%22:%22result_projects-project-funding_lvl0%22,%22values%22:[%22H2020%22],%22to%22:%22-1%22},{%22name%22:%22type%22,%22values%22:[%22publication%22],%22to%22:%22-1%22},{%22name%22:%22result_datasources-datasource-type%22,%22exvalues%22:[%22Publication%20Catalogue%22]}],%22having%22:[],%22xStyle%22:{%22r%22:%22-%22,%22s%22:%22-%22,%22l%22:%22-%22,%22ft%22:%22-%22,%22wt%22:%22-%22},%22title%22:%22H2020%20Publications%20by%20datasource%20%28top%2020%29%22,%22subtitle%22:%22%22,%22xaxistitle%22:%22datasource%22,%22order%22:%22d%22}&w=90%
241
 */
modules/uoa-monitor-portal/trunk/monitor_dashboard/src/app/utils/entities/stakeholder.ts
1 1
import {SafeResourceUrl} from "@angular/platform-browser";
2
import {IndicatorUtils} from "../indicator-utils";
2 3
export const ChartHelper={
3 4
  prefix : "((__",
4 5
  suffix : "__))"
......
264 265

  
265 266
    defSub.charts.push(chart1);
266 267
    defSub.charts.push(chart2);
268
    let utils = new IndicatorUtils();
269
    let url = "https://beta.openaire.eu/stats/chart.php?com=query&data={%22table%22:%22result%22,%22fields%22:[{%22fld%22:%22number%22,%22agg%22:%22count%22,%22type%22:%22bar%22,%22yaxis%22:1,%22c%22:false}],%22xaxis%22:{%22name%22:%22result_datasources-datasource-name%22,%22agg%22:%22avg%22},%22group%22:%22%22,%22color%22:%22%22,%22type%22:%22chart%22,%22size%22:%2220%22,%22sort%22:%22count-number%22,%22yaxisheaders%22:[%22%22],%22fieldsheaders%22:[%22publications%22],%22in%22:[],%22filters%22:[{%22name%22:%22result_projects-project-funding_lvl0%22,%22values%22:[%22H2020%22],%22to%22:%22-1%22},{%22name%22:%22type%22,%22values%22:[%22publication%22],%22to%22:%22-1%22},{%22name%22:%22result_datasources-datasource-type%22,%22exvalues%22:[%22Publication%20Catalogue%22]}],%22having%22:[],%22xStyle%22:{%22r%22:%22-%22,%22s%22:%22-%22,%22l%22:%22-%22,%22ft%22:%22-%22,%22wt%22:%22-%22},%22title%22:%22H2020%20Publications%20by%20datasource%20%28top%2020%29%22,%22subtitle%22:%22%22,%22xaxistitle%22:%22datasource%22,%22order%22:%22d%22}&w=90%";
270
    defSub.charts.push(new Indicator("Old tool graph","","chart","large",true,true,[utils.generateIndicatorByChartUrl("old",url,"bar")]))
271
    url = "http://88.197.53.71:8080/stats-api/chart?json=%7B%22library%22%3A%22HighCharts%22%2C%22chartDescription%22%3A%7B%22queries%22%3A%5B%7B%22name%22%3A%22Research%20data%22%2C%22type%22%3A%22column%22%2C%22query%22%3A%7B%22select%22%3A%5B%7B%22field%22%3A%22dataset%22%2C%22aggregate%22%3A%22count%22%7D%2C%7B%22field%22%3A%22dataset.year%22%2C%22aggregate%22%3Anull%7D%5D%2C%22filters%22%3A%5B%7B%22groupFilters%22%3A%5B%7B%22field%22%3A%22dataset.project.funder%22%2C%22type%22%3A%22%3D%22%2C%22values%22%3A%5B%22European%20Commission%22%5D%7D%5D%2C%22op%22%3A%22AND%22%7D%2C%7B%22groupFilters%22%3A%5B%7B%22field%22%3A%22dataset.year%22%2C%22type%22%3A%22%3E%3D%22%2C%22values%22%3A%5B%222008%22%5D%7D%2C%7B%22field%22%3A%22dataset.year%22%2C%22type%22%3A%22%3C%3D%22%2C%22values%22%3A%5B%222020%22%5D%7D%5D%2C%22op%22%3A%22AND%22%7D%5D%2C%22entity%22%3A%22dataset%22%2C%22profile%22%3A%22OpenAIRE%20All-inclusive%22%2C%22limit%22%3A%220%22%7D%7D%5D%2C%22chart%22%3A%7B%22backgroundColor%22%3A%22%23FFFFFFFF%22%2C%22borderColor%22%3A%22%23335cadff%22%2C%22borderRadius%22%3A0%2C%22borderWidth%22%3A0%2C%22plotBorderColor%22%3A%22%23ccccccff%22%2C%22plotBorderWidth%22%3A0%7D%2C%22title%22%3A%7B%22text%22%3A%22Research%20data%20timeline%22%7D%2C%22subtitle%22%3A%7B%7D%2C%22yAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22Research%20data%22%7D%7D%2C%22xAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22Year%22%7D%7D%2C%22lang%22%3A%7B%22noData%22%3A%22No%20Data%20available%20for%20the%20Query%22%7D%2C%22exporting%22%3A%7B%22enabled%22%3Atrue%7D%2C%22plotOptions%22%3A%7B%22series%22%3A%7B%22dataLabels%22%3A%7B%22enabled%22%3Afalse%7D%7D%7D%2C%22legend%22%3A%7B%22enabled%22%3Atrue%2C%22align%22%3A%22center%22%2C%22verticalAlign%22%3A%22bottom%22%2C%22layout%22%3A%22horizontal%22%7D%2C%22credits%22%3A%7B%22href%22%3Anull%2C%22enabled%22%3Atrue%2C%22text%22%3A%22Created%20by%20OpenAIRE%20via%20HighCharts%22%7D%7D%7D";
272
    defSub.charts.push(new Indicator("","","chart","large",true,true,[utils.generateIndicatorByChartUrl("stats-tool",url,"bar")]))
267 273
    return topic;
268 274
  }
269 275
}
......
362 368
  jsonPath:string[];
363 369
  chartObject:string;
364 370
  parameters:Map<string,string>;
365
  filters:Map<string,Map<string,string>>;
371
  filters:Map<string, string>;
366 372
  constructor(type: string,  source:string, url: string, chartObject:string, jsonPath:string[]){
367 373
    this.type =  type;
368 374
    this.url = url;
......
370 376
    this.jsonPath = jsonPath;
371 377
    this.chartObject =chartObject;
372 378
    this.parameters = new Map<string, string>();
373
    this.filters = new Map<string, Map<string,string>>();
379
    this.filters = new Map<string, string>();
374 380
  }
375 381

  
376 382
  static createParameters(funderName:string=null, title:string=null, chartType:string=null):Map<string, string>{
......
380 386
    parameters.set("type",chartType);
381 387
    return parameters;
382 388
  }
389
  static createResultFilters(dbType:string=null):Map<string, string>{
390
    let filters = new Map<string, string>();
391
    filters.set("fundingL0",'{"groupFilters":[{"field":"'+dbType+'.project.funding level 0","type":"=","values":["'+ChartHelper.prefix+'fundingL0'+ChartHelper.suffix+'"]}],"op":"AND"}');
392
    filters.set("start_year",'{"groupFilters":[{"field":"'+dbType+'.year","type":">=","values":["'+ChartHelper.prefix+'start_year'+ChartHelper.suffix+'"]}],"op":"AND"}');
393
    filters.set("end_year",'{"groupFilters":[{"field":"'+dbType+'.year","type":"<=","values":["'+ChartHelper.prefix+'end_year'+ChartHelper.suffix+'"]}],"op":"AND"}');
394
    return filters;
395
  }
383 396
}
modules/uoa-monitor-portal/trunk/monitor_dashboard/src/app/utils/entities/stakeholderCreator.ts
87 87

  
88 88
    let n_total = new Indicator("Total "+typePlural,null, "number","small",true, true, [new IndicatorPath(null, "search",
89 89
      "/"+dbTypePlural+"/count?fq="+(encodeURIComponent("relfunderid exact "+stakeholder.index_id))+"&format=json", null,["total"])]);
90
    n_total.indicatorPaths[0].filters.set("fundingL0","&fq=relfundinglevel0_name exact "+ChartHelper.prefix+'fundingL0'+ChartHelper.suffix);
91

  
90 92
    pubDefSub.numbers.push(n_total);
91 93
    if( dbType != "publication") {
92 94
      let n_linkedPubs = this.createLinkToIndicator(stakeholder,typePlural,typeSingl, dbType,"Publications","publication");
......
100 102
    res_timeline.indicatorPaths[0].parameters = IndicatorPath.createParameters(stakeholder.index_name,typePlural+" timeline","column");
101 103
    res_timeline.indicatorPaths[0].parameters.set("start_year","2008");
102 104
    res_timeline.indicatorPaths[0].parameters.set("end_year","2020");
105
    res_timeline.indicatorPaths[0].filters = IndicatorPath.createResultFilters(dbType);
103 106
    pubDefSub.charts.push(res_timeline);
104 107

  
105 108

  
......
109 112
        [new IndicatorPath("column", "stats-tool", "chart?json=",
110 113
          '{"library":"HighCharts","chartDescription":{"queries":[{"name":"' + typePlural + '","type":"' + ChartHelper.prefix + 'type' + ChartHelper.suffix + '","query":{"select":[{"field":"' + dbType + '","aggregate":"count"},{"field":"' + dbType + '.classification","aggregate":null}],"filters":[{"groupFilters":[{"field":"' + dbType + '.project.funder","type":"=","values":["' + ChartHelper.prefix + 'funder_name' + ChartHelper.suffix + '"]}],"op":"AND"}],"entity":"' + dbType + '","profile":"OpenAIRE All-inclusive","limit":"0"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"' + ChartHelper.prefix + 'title' + ChartHelper.suffix + '"},"subtitle":{},"yAxis":{"title":{"text":"' + typePlural + '"}},"xAxis":{"title":{"text":"Type"}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":true,"align":"center","verticalAlign":"bottom","layout":"horizontal"},"credits":{"href":null,"enabled":true,"text":"Created by OpenAIRE via HighCharts"}}}', null)]);
111 114
      res_types.indicatorPaths[0].parameters = IndicatorPath.createParameters(stakeholder.index_name, typeSingl + " types", "bar");
115
      res_types.indicatorPaths[0].filters = IndicatorPath.createResultFilters(dbType);
112 116
      pubDefSub.charts.push(res_types);
113 117
    }
114 118
    let res_access_mode = new Indicator("",null, "chart","small",true, true,[new IndicatorPath("pie", "stats-tool", "chart?json=",
115 119
      '{"library":"HighCharts","chartDescription":{"queries":[{"name":"'+typePlural+'","type":"'+ChartHelper.prefix+'type'+ChartHelper.suffix+'","query":{"select":[{"field":"'+dbType+'","aggregate":"count"},{"field":"'+dbType+'.access mode","aggregate":null}],"filters":[{"groupFilters":[{"field":"'+dbType+'.project.funder","type":"=","values":["'+ChartHelper.prefix+'funder_name'+ChartHelper.suffix+'"]}],"op":"AND"}],"entity":"' + dbType + '","profile":"OpenAIRE All-inclusive","limit":"0"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"'+ChartHelper.prefix+'title'+ChartHelper.suffix+'"},"subtitle":{},"yAxis":{"title":{"text":"'+typePlural+'"}},"xAxis":{"title":{"text":"Year"}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":true,"align":"center","verticalAlign":"bottom","layout":"horizontal"},"credits":{"href":null,"enabled":true,"text":"Created by OpenAIRE via HighCharts"}}}', null)]);
116 120
    res_access_mode.indicatorPaths[0].parameters = IndicatorPath.createParameters(stakeholder.index_name,typeSingl+" acccess mode","pie");
121
    res_access_mode.indicatorPaths[0].filters = IndicatorPath.createResultFilters(dbType);
117 122
    pubDefSub.charts.push(res_access_mode);
118 123

  
119 124
    if( dbType != "publication") {
120 125
      let res_sci_area = new Indicator("", null, "chart", "small", true, true, [new IndicatorPath("bar", "stats-tool", "chart?json=",
121 126
        '{"library":"HighCharts","chartDescription":{"queries":[{"name":"' + typePlural + '","type":"' + ChartHelper.prefix + 'type' + ChartHelper.suffix + '","query":{"select":[{"field":"' + dbType + '","aggregate":"count"},{"field":"' + dbType + '.project.funding level 1","aggregate":null}],"filters":[{"groupFilters":[{"field":"' + dbType + '.project.funder","type":"=","values":["' + ChartHelper.prefix + 'funder_name' + ChartHelper.suffix + '"]}],"op":"AND"}],"entity":"' + dbType + '","profile":"OpenAIRE All-inclusive","limit":"30"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"' + ChartHelper.prefix + 'title' + ChartHelper.suffix + '"},"subtitle":{},"yAxis":{"title":{"text":"' + typePlural + '"}},"xAxis":{"title":{"text":"Scientific area"}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":false},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":true,"align":"center","verticalAlign":"bottom","layout":"horizontal"},"credits":{"href":null,"enabled":true,"text":"Created by OpenAIRE via HighCharts"}}}', null)]);
122 127
      res_sci_area.indicatorPaths[0].parameters = IndicatorPath.createParameters(stakeholder.index_name, typeSingl + " scientific area", "bar");
128
      res_sci_area.indicatorPaths[0].filters = IndicatorPath.createResultFilters(dbType);
123 129
      pubDefSub.charts.push(res_sci_area);
124 130

  
125 131
      let res_programmes = new Indicator("", null, "chart", "small", true, true, [new IndicatorPath("bar", "stats-tool", "chart?json=",
126 132
        '{"library":"HighCharts","chartDescription":{"queries":[{"name":"' + typePlural + '","type":"' + ChartHelper.prefix + 'type' + ChartHelper.suffix + '","query":{"select":[{"field":"' + dbType + '","aggregate":"count"},{"field":"' + dbType + '.project.funding level 2","aggregate":null}],"filters":[{"groupFilters":[{"field":"' + dbType + '.project.funder","type":"=","values":["' + ChartHelper.prefix + 'funder_name' + ChartHelper.suffix + '"]}],"op":"AND"},{"groupFilters":[{"field":"' + dbType + '.project.funding level 2","type":"!=","values":[" "]}],"op":"AND"}],"entity":"' + dbType + '","profile":"OpenAIRE All-inclusive","limit":"30"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"' + ChartHelper.prefix + 'title' + ChartHelper.suffix + '"},"subtitle":{},"yAxis":{"title":{"text":"' + typePlural + '"}},"xAxis":{"title":{"text":"Programmes"}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":false},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":true,"align":"center","verticalAlign":"bottom","layout":"horizontal"},"credits":{"href":null,"enabled":true,"text":"Created by OpenAIRE via HighCharts"}}}', null)]);
127 133
      res_programmes.indicatorPaths[0].parameters = IndicatorPath.createParameters(stakeholder.index_name, typeSingl + " programmes", "bar");
134
      res_programmes.indicatorPaths[0].filters = IndicatorPath.createResultFilters(dbType);
128 135
      pubDefSub.charts.push(res_programmes);
129 136
    }
130 137
    //{"library":"HighCharts","chartDescription":{"queries":[{"name":"Research Data","type":"bar","query":{"select":[{"field":"dataset","aggregate":"count"},{"field":"dataset.project.funding level 1","aggregate":null}],"filters":[{"groupFilters":[{"field":"dataset.project.funder","type":"=","values":["European Commission"]}],"op":"AND"}],"entity":"dataset","profile":"OpenAIRE All-inclusive","limit":"30"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Scientific Area"},"subtitle":{},"yAxis":{"title":{}},"xAxis":{"title":{}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":false},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":true,"align":"center","verticalAlign":"bottom","layout":"horizontal"},"credits":{"href":null,"enabled":true,"text":"Created by OpenAIRE via HighCharts"}}}
......
165 172
      '{"library":"HighCharts","chartDescription":{"queries":[{"name":"'+typePlural+'","type":"'+ChartHelper.prefix+'type'+ChartHelper.suffix+'","query":{"name":"monitor.'+ChartHelper.prefix+'id'+ChartHelper.suffix+'.'+dbTypePlural+'.pidtypes"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"'+ChartHelper.prefix+'title'+ChartHelper.suffix+'"},"subtitle":{},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":true,"align":"center","verticalAlign":"bottom","layout":"horizontal"},"credits":{"href":null,"enabled":true,"text":"Created by OpenAIRE via HighCharts"}}}', null)]);
166 173
    pid.indicatorPaths[0].parameters = IndicatorPath.createParameters(stakeholder.index_name,typeSingl+" PIDs","pie");
167 174
    pid.indicatorPaths[0].parameters.set("id",stakeholder.index_shortName.toLowerCase());
175
    pid.indicatorPaths[0].filters = IndicatorPath.createResultFilters(dbType);
168 176
    pubDefSub.charts.push(pid);
169 177
    return pubDefSub;
170 178
  }
......
238 246
  static createLinkToIndicator(stakeholder:Stakeholder,typePlural, typeSingl, dbType, linkedToName,linkedToType ):Indicator {
239 247
      let n_linkedPubs = new Indicator(typePlural+" linked to "+linkedToName, null, "number", "small", true, true, [new IndicatorPath(null, "search",
240 248
        "/resources?query=" + encodeURIComponent(" ( (oaftype exact result) and (resulttypeid exact " + dbType + ") and (relresulttype="+linkedToType+")  )") + "&fq=" + (encodeURIComponent("relfunderid exact " + stakeholder.index_id)) + "&page=0&size=0&format=json", null, ["meta", "total"])]);
241

  
249
      n_linkedPubs.indicatorPaths[0].filters.set("fundingL0","&fq=relfundinglevel0_name exact "+ChartHelper.prefix+'fundingL0'+ChartHelper.suffix);
250
      /*
251
    filters.set("start_year",'{"groupFilters":[{"field":"'+dbType+'.year","type":">=","values":["'+ChartHelper.prefix+'start_year'+ChartHelper.suffix+'"]}],"op":"AND"}');
252
    filters.set("end_year",'{"groupFilters":[{"field":"'+dbType+'.year","type":"<=","values":["'+ChartHelper.prefix+'end_year'+ChartHelper.suffix+'"]}],"op":"AND"}');
253
       */
242 254
    return n_linkedPubs;
243 255
  }
244 256
  static createFundingImpactTopic():Topic{
modules/uoa-monitor-portal/trunk/monitor_dashboard/src/app/app.component.ts
8 8
import {SideBarService} from "./library/sharedComponents/sidebar/sideBar.service";
9 9
import {StakeholderService} from "./services/stakeholder.service";
10 10
import {Subscriber} from "rxjs";
11
import {StakeholderCreator} from "./utils/entities/stakeholderCreator";
11 12

  
12 13
@Component({
13 14
  selector: 'app-root',
......
43 44
              if(params['stakeholder']) {
44 45
                if(!this.stakeholderService.stakeholder ||
45 46
                  this.stakeholderService.stakeholder.alias !== params['stakeholder']) {
46
                  this.stakeholderService.getStakeholder(this.properties.monitorServiceAPIURL, params['stakeholder']).subscribe(stakeholder => {
47
                  // this.stakeholderService.getStakeholder(this.properties.monitorServiceAPIURL, params['stakeholder']).subscribe(stakeholder => {
47 48
                    // stakeholder = Stakeholder.createECStakeholder();
48
                   // let  stakeHolder = StakeholderCreator.createFunderFromDefaultProfile("ec","funder","ec__________::EC","European Commission","EC",false,"ec",true,true);
49
                  this.stakeholderService.setStakeholder(stakeholder);
49
                   let  stakeHolder = StakeholderCreator.createFunderFromDefaultProfile("ec","funder","ec__________::EC","European Commission","EC",false,"ec",true,true);
50
                  this.stakeholderService.setStakeholder(stakeHolder);
50 51
                    this.sidebarService.setOpen(true);
51
                  });
52
                  // });
52 53
                }
53 54
              } else {
54 55
                this.stakeholderService.setStakeholder(null);

Also available in: Unified diff