Revision 60254
Added by Argiro Kokogiannaki over 3 years ago
stakeholder.ts | ||
---|---|---|
1 | 1 |
import {SafeResourceUrl} from "@angular/platform-browser"; |
2 |
import {properties} from "../../../../environments/environment"; |
|
2 | 3 |
|
3 | 4 |
export const ChartHelper = { |
4 | 5 |
prefix: "((__", |
... | ... | |
209 | 210 |
}else if (field == "project"){ |
210 | 211 |
return this.getProjectFilter(filterType); |
211 | 212 |
} |
212 |
//TODO uncomment to add other options --> following doesn't work |
|
213 |
/* else if (field == "country"){ |
|
213 |
else if (field == "country"){ |
|
214 | 214 |
return this.getCountryFilter(filterType); |
215 | 215 |
}else if (field == "organization"){ |
216 | 216 |
return this.getOrganizationFilter(filterType); |
217 |
}*/
|
|
217 |
} |
|
218 | 218 |
|
219 | 219 |
} |
220 | 220 |
static getResultFilter(dbType: string = null, filterType:FilterType) { |
221 | 221 |
if (filterType == "fundingL0") { |
222 |
return '{"groupFilters":[{"field":"' + dbType + '.project.funding level 0","type":"=","values":["' + ChartHelper.prefix + 'fundingL0' + ChartHelper.suffix + '"]}],"op":"AND"}'; |
|
222 |
if(properties.useOldStatisticsSchema) { |
|
223 |
return '{"groupFilters":[{"field":"' + dbType + '.project.funding level 0","type":"=","values":["' + ChartHelper.prefix + 'fundingL0' + ChartHelper.suffix + '"]}],"op":"AND"}'; |
|
224 |
}else{//new statistcs schema |
|
225 |
return '{"groupFilters":[{"field":"' + dbType + '.project funding level 0","type":"=","values":["' + ChartHelper.prefix + 'fundingL0' + ChartHelper.suffix + '"]}],"op":"AND"}'; |
|
226 |
} |
|
223 | 227 |
} else if (filterType == "start_year") { |
224 | 228 |
return '{"groupFilters":[{"field":"' + dbType + '.year","type":">=","values":["' + ChartHelper.prefix + 'start_year' + ChartHelper.suffix + '"]}],"op":"AND"}'; |
225 | 229 |
} else if (filterType == "end_year") { |
Also available in: Unified diff
[Library|Trunk]
Monitor dashboard:
- add properties for stats tool for monitor and new schema
- apply filter for country and organization