From ca7b309d67f0b30906c5030dad4f469d9716837b Mon Sep 17 00:00:00 2001 From: Argiro Kokogiannaki Date: Mon, 9 Dec 2019 10:41:58 +0000 Subject: [PATCH] [Monitor dashborad|Trunk] Updates on funder default profile git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-monitor-portal/trunk/monitor_dashboard@57839 d315682c-612b-4755-9ff5-7f18f6832af3 --- src/app/monitor/monitor.component.html | 334 +++++++++---------- src/app/monitor/monitor.component.ts | 50 +-- src/app/utils/entities/stakeholderCreator.ts | 107 ++++-- src/assets/monitor-custom.css | 5 +- 4 files changed, 273 insertions(+), 223 deletions(-) diff --git a/src/app/monitor/monitor.component.html b/src/app/monitor/monitor.component.html index c9d423a..2abbad6 100644 --- a/src/app/monitor/monitor.component.html +++ b/src/app/monitor/monitor.component.html @@ -1,178 +1,174 @@
-
-
-
- -
settings
-
+
+ + +
settings
+
diff --git a/src/app/monitor/monitor.component.ts b/src/app/monitor/monitor.component.ts index b24095f..f06376f 100644 --- a/src/app/monitor/monitor.component.ts +++ b/src/app/monitor/monitor.component.ts @@ -55,18 +55,18 @@ export class MonitorComponent implements OnInit, OnDestroy, IDeactivateComponent public keyword: FormControl; constructor( - private route: ActivatedRoute, - private _router: Router, - private _meta: Meta, - private _title: Title, - private _piwikService: PiwikService, - private helper: HelperService, - private stakeholderService: StakeholderService, - private statisticsService: StatisticsService, - private layoutService: LayoutService, - private seoService: SEOService, - private cdr: ChangeDetectorRef, - private sanitizer: DomSanitizer, private _fb: FormBuilder) { + private route: ActivatedRoute, + private _router: Router, + private _meta: Meta, + private _title: Title, + private _piwikService: PiwikService, + private helper: HelperService, + private stakeholderService: StakeholderService, + private statisticsService: StatisticsService, + private layoutService: LayoutService, + private seoService: SEOService, + private cdr: ChangeDetectorRef, + private sanitizer: DomSanitizer, private _fb: FormBuilder) { this.errorCodes = new ErrorCodes(); this.errorMessages = new ErrorMessagesComponent(); this.status = this.errorCodes.LOADING; @@ -91,8 +91,8 @@ export class MonitorComponent implements OnInit, OnDestroy, IDeactivateComponent this.status = this.errorCodes.LOADING; this.numberResults = new Map(); this.chartsActiveType = new Map(); - subscription = this.stakeholderService.getStakeholderAsObservable().subscribe(stakeholder => { - /*let stakeholder: Stakeholder = null; + // subscription = this.stakeholderService.getStakeholderAsObservable().subscribe(stakeholder => { + let stakeholder: Stakeholder = null; if (params['stakeholder'] == "fwf") { stakeholder = new Stakeholder(null, "funder", "fwf_________::FWF", "Austrian Science Fund (FWF)", "FWF", false, "fwf", true, true, null); @@ -110,7 +110,7 @@ export class MonitorComponent implements OnInit, OnDestroy, IDeactivateComponent false, "ec", true, true, null); stakeholder = this.stakeholderUtils.createFunderFromDefaultProfile(stakeholder, StakeholderCreator.createFunderDefaultProfile().topics); stakeholder.logoUrl = "./assets/ec.png"; - }*/ + } if (stakeholder) { this.stakeholder = stakeholder; this.seoService.createLinkForCanonicalURL(url, false); @@ -129,9 +129,9 @@ export class MonitorComponent implements OnInit, OnDestroy, IDeactivateComponent this.status = this.errorCodes.DONE; this.setView(params); } - }, error => { - this.navigateToError(); - }); + // }, error => { + // this.navigateToError(); + // }); this.subscriptions.push(subscription); } else { this.setView(params); @@ -213,7 +213,7 @@ export class MonitorComponent implements OnInit, OnDestroy, IDeactivateComponent } } else { this.activeSubCategory = this.activeCategory.subCategories.find(subCategory => - subCategory.isPublic && subCategory.isActive); + subCategory.isPublic && subCategory.isActive); } if (this.activeSubCategory) { this.setSideBar(); @@ -258,8 +258,8 @@ export class MonitorComponent implements OnInit, OnDestroy, IDeactivateComponent category.subCategories.forEach(subCategory => { if (subCategory.isPublic && subCategory.isActive) { subItems.push(new Item(subCategory.alias, subCategory.name, ( - '/' + this.stakeholder.alias + '/' + this.activeTopic.alias + '/' + category.alias + '/' + subCategory.alias), - null, null, false)); + '/' + this.stakeholder.alias + '/' + this.activeTopic.alias + '/' + category.alias + '/' + subCategory.alias), + null, null, false)); } }); let open = this.activeCategory.alias === category.alias; @@ -267,8 +267,8 @@ export class MonitorComponent implements OnInit, OnDestroy, IDeactivateComponent open = MonitorComponent.sidebarStatus.status[index]; } items.push(new Item(category.alias, category.name, ( - '/' + this.stakeholder.alias + '/' + this.activeTopic.alias + '/' + category.alias), - subItems, null, open)); + '/' + this.stakeholder.alias + '/' + this.activeTopic.alias + '/' + category.alias), + subItems, null, open)); } }); if(items.length === 0) { @@ -317,7 +317,7 @@ export class MonitorComponent implements OnInit, OnDestroy, IDeactivateComponent public getUrlByStakeHolder(indicatorPath: IndicatorPath) { return this.sanitizer.bypassSecurityTrustResourceUrl( - this.statisticsService.getChartUrl(indicatorPath.source, this.indicatorUtils.getFullUrl(indicatorPath, this.fundingL0, this.startYear, this.endYear))); + this.statisticsService.getChartUrl(indicatorPath.source, this.indicatorUtils.getFullUrl(indicatorPath, this.fundingL0, this.startYear, this.endYear))); } public setActiveChart(index, type: string) { @@ -332,7 +332,7 @@ export class MonitorComponent implements OnInit, OnDestroy, IDeactivateComponent public navigateTo(stakeholder: string, topic: string, category: string = null, subcategory: string = null) { let url = stakeholder + '/' + topic + ((category) ? ('/' - + category) : '') + ((subcategory) ? ('/' + subcategory) : ''); + + category) : '') + ((subcategory) ? ('/' + subcategory) : ''); return this._router.navigate([url]); } diff --git a/src/app/utils/entities/stakeholderCreator.ts b/src/app/utils/entities/stakeholderCreator.ts index 1093b79..be2e81f 100644 --- a/src/app/utils/entities/stakeholderCreator.ts +++ b/src/app/utils/entities/stakeholderCreator.ts @@ -8,16 +8,18 @@ export class StakeholderCreator { funder.topics.push(StakeholderCreator.createResearchProductionTopic(funder)); funder.topics.push(StakeholderCreator.createOSTopic(funder)); let collaboration = new Topic("Collaboration","Indexes for collaboration","collaboration", true, true); - collaboration.categories.push(this.createEmptyCategory("Academic Impact","","academic-impact")); - collaboration.categories.push(this.createEmptyCategory("Economic Impact","","economic-impact")); - collaboration.categories.push(this.createEmptyCategory("Societal Impact","","societal-impact")); + collaboration.categories.push(this.createEmptyCategory("International collaboration","Indicators for international collaborations based on the percentage of research results or patents with at least one co-author from abroad","international-collaboration")); + collaboration.categories.push(this.createEmptyCategory("EU collaboration","Indicators for EU Collaboration based on the percentage of research results or patents with at least one co-author from another EU organization","eu-collaboration")); + collaboration.categories.push(this.createEmptyCategory("Industrial collaboration","Indicators for Industrial collaboration based on the percentage of research results or patents with at least one co-author from the industry","industrial-collaboration")); + collaboration.categories.push(this.createEmptyCategory("Transdisciplinary / transectoral collaboration","Indicators for Transdisciplinary/transectoral collaboration based on the percentage of research results or patents with at least one co-author from another discipline or sector","transdisciplinary-collaboration")); + funder.topics.push(collaboration); - funder.topics.push(StakeholderCreator.createEmptyTopic("Diffusion","","diffusion")); + funder.topics.push(StakeholderCreator.createEmptyTopic("Diffusion","Indicators based on citations, classifications and usage data: How diverse are the research knowledge resources upon which an article is drawn? How diverse are the venues in which a body of research appears? How diverse are the fields that cite a research result?","diffusion")); let impact = new Topic("Impact", "", "impact", true, true); - impact.categories.push(this.createEmptyCategory("Academic Impact","","academic-impact")); - impact.categories.push(this.createEmptyCategory("Economic Impact","","economic-impact")); - impact.categories.push(this.createEmptyCategory("Societal Impact","","societal-impact")); + impact.categories.push(this.createEmptyCategory("Academic Impact","Indicators based on citations and collaboration, related to MAG classifications.","academic-impact")); + impact.categories.push(this.createEmptyCategory("Economic Impact","Indicators based on patents and collaboration between industry and academia","economic-impact")); + impact.categories.push(this.createEmptyCategory("Societal Impact","Indicators that correlate research results with SDGs","societal-impact")); funder.topics.push(impact); return funder; @@ -183,53 +185,104 @@ export class StakeholderCreator { static createOpenAccessTopic(stakeholder:Stakeholder):Category { let category = new Category("Open Access", "", "open-access", true, true); category.subCategories.push(this.createOASub(stakeholder,"Publications","Publication","publication","publications")); - category.subCategories.push(this.createOASub(stakeholder,"Research data","Research data","dataset","datasets")); - category.subCategories.push(this.createOASub(stakeholder,"Software","Software","software","software")); - category.subCategories.push(this.createOASub(stakeholder,"Other research products","Other research product","other","other")); + // category.subCategories.push(this.createOASub(stakeholder,"Research data","Research data","dataset","datasets")); + // category.subCategories.push(this.createOASub(stakeholder,"Software","Software","software","software")); + // category.subCategories.push(this.createOASub(stakeholder,"Other research products","Other research product","other","other")); return category; } static createOASub(stakeholder:Stakeholder,typePlural, typeSingl, dbType, dbTypePlural ):SubCategory { let sub:SubCategory = new SubCategory(typePlural, null, dbTypePlural, true, true); - // sub.charts = sub.charts.concat( this.createOAPerType(stakeholder,typePlural, typeSingl, dbType, dbTypePlural, 0 )); - // sub.charts = sub.charts.concat( this.createOAPerType(stakeholder,typePlural, typeSingl, dbType, dbTypePlural, 1 )); + sub.charts = sub.charts.concat( this.createOAPerType(stakeholder,typePlural, typeSingl, dbType, dbTypePlural, 0 )); + sub.charts = sub.charts.concat( this.createOAPerType(stakeholder,typePlural, typeSingl, dbType, dbTypePlural, 1 )); // sub.charts = sub.charts.concat( this.createOAPerType(stakeholder,typePlural, typeSingl, dbType, dbTypePlural, 2 )); return sub; } static createOAPerType(stakeholder:Stakeholder,typePlural, typeSingl, dbType, dbTypePlural, index:number):Indicator[] { - let fundingFilter = ['', ',{"groupFilters":[{"field":"' + dbType + '.project.funding level 0","type":"=","values":["FP7"]}],"op":"AND"}', - ',{"groupFilters":[{"field":"' + dbType + '.project.funding level 0","type":"=","values":["H2020"]}],"op":"AND"}']; - let categoryTitle = ["Overview", "FP7", "H2020"]; + let fundingFilter = ['', '{"groupFilters":[{"field":"' + dbType + '.project.funding level 0","type":"=","values":["FP7"]}],"op":"AND"}', + '{"groupFilters":[{"field":"' + dbType + '.project.funding level 0","type":"=","values":["H2020"]}],"op":"AND"}']; + let fieldValue = ["", "FP7", "H2020"]; let chartTitle = ["", "FP7 ", "H2020 "]; let indicators:Indicator[]=[]; let utils = new IndicatorUtils(); let open_non_url = "http://88.197.53.71:8080/stats-api/chart?json="+encodeURIComponent('{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","type":"pie","color":"#e62020ee","query":{"name":"monitor.' + ChartHelper.prefix + 'id' + ChartHelper.suffix +(index==2?".h2020":(index==1?".fp7":""))+ '.' + dbTypePlural+'.oavsnonoa"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"'+chartTitle[index]+' Open Access vs Non Open Access"},"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"}}}'); encodeURIComponent('{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","type":"pie","query":{"name":"monitor.' + ChartHelper.prefix + 'id' + ChartHelper.suffix +(index==2?".h2020":(index==1?".fp7":""))+ '.' + dbTypePlural+'.greenvsgold"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{},"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"}}}'); - let open_non_ind:Indicator = new Indicator(categoryTitle[index], "", "column", "small", true, true, [utils.generateIndicatorByChartUrl("stats-tool", open_non_url, "pie")]) + let open_non_ind:Indicator = new Indicator(chartTitle[index], "", "chart", "small", true, true, [utils.generateIndicatorByChartUrl("stats-tool", open_non_url, "pie")]) open_non_ind.indicatorPaths[0].parameters["id"] = stakeholder.index_shortName.toLowerCase(); + if(index!=0){ + open_non_ind.recommendedFor.push("ec__________::EC"); + } indicators.push(open_non_ind); - let gold_vs_green_url = "http://88.197.53.71:8080/stats-api/chart?json="+ encodeURIComponent('{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","type":"pie","query":{"name":"monitor.' + ChartHelper.prefix + 'id' + ChartHelper.suffix +(index==2?".h2020":(index==1?".fp7":""))+ '.' + dbTypePlural+'.greenvsgold"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{},"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"}}}'); - let gold_vs_green_ind:Indicator = (new Indicator("", "", "column", "small", true, true, [utils.generateIndicatorByChartUrl("stats-tool", gold_vs_green_url, "pie")])); - gold_vs_green_ind.indicatorPaths[0].parameters["id"] = stakeholder.index_shortName.toLowerCase(); - indicators.push(gold_vs_green_ind); + if(dbType == "publication") { + let gold_vs_green_url = "http://88.197.53.71:8080/stats-api/chart?json=" + encodeURIComponent('{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","type":"column","query":{"name":"monitor.' + ChartHelper.prefix + 'id' + ChartHelper.suffix + (index == 2 ? ".h2020" : (index == 1 ? ".fp7" : "")) + '.' + dbTypePlural + '.greenvsgold"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"' + chartTitle[index] + ' Green vs Gold"},"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"}}}'); + let gold_vs_green_ind: Indicator = (new Indicator("", "", "chart", "small", true, true, [utils.generateIndicatorByChartUrl("stats-tool", gold_vs_green_url, "pie")])); + gold_vs_green_ind.indicatorPaths[0].parameters["id"] = stakeholder.index_shortName.toLowerCase(); + if (index != 0) { + gold_vs_green_ind.recommendedFor.push("ec__________::EC"); + } + indicators.push(gold_vs_green_ind); - let gold_vs_green_time_url = "http://88.197.53.71:8080/stats-api/chart?json="+ encodeURIComponent('{"library":"HighCharts","chartDescription":{"queries":[{"name":"Gold OA","type":"column","color":"#F8B500","query":{"name":"monitor.'+ ChartHelper.prefix + 'id' + ChartHelper.suffix +(index==2?".h2020":(index==1?".fp7":""))+ '.' + dbTypePlural+'.gold.year"}},{"name":"Green OA","type":"column","color":"#239D60","query":{"name":"monitor.'+ ChartHelper.prefix + 'id' + ChartHelper.suffix +(index==2?".h2020":(index==1?".fp7":""))+ '.' + dbTypePlural+'.green.year"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Green vs Gold Open Access"},"subtitle":{"text":"by year"},"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"}}}'); - let gold_vs_green_time_ind:Indicator = (new Indicator("", "", "column", "small", true, true, [utils.generateIndicatorByChartUrl("stats-tool", gold_vs_green_time_url, "column")])); - gold_vs_green_time_ind.indicatorPaths[0].parameters["id"] = stakeholder.index_shortName.toLowerCase(); - indicators.push(gold_vs_green_time_ind); + let gold_vs_green_time_url = "http://88.197.53.71:8080/stats-api/chart?json=" + encodeURIComponent('{"library":"HighCharts","chartDescription":{"queries":[{"name":"Gold OA","type":"column","color":"#F8B500","query":{"name":"monitor.' + ChartHelper.prefix + 'id' + ChartHelper.suffix + (index == 2 ? ".h2020" : (index == 1 ? ".fp7" : "")) + '.' + dbTypePlural + '.gold.year"}},{"name":"Green OA","type":"column","color":"#239D60","query":{"name":"monitor.' + ChartHelper.prefix + 'id' + ChartHelper.suffix + (index == 2 ? ".h2020" : (index == 1 ? ".fp7" : "")) + '.' + dbTypePlural + '.green.year"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Green vs Gold Open Access"},"subtitle":{"text":"by year"},"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"}}}'); + let gold_vs_green_time_ind: Indicator = (new Indicator("", "", "chart", "small", true, true, [utils.generateIndicatorByChartUrl("stats-tool", gold_vs_green_time_url, "column")])); + gold_vs_green_time_ind.indicatorPaths[0].parameters["id"] = stakeholder.index_shortName.toLowerCase(); + if (index != 0) { + gold_vs_green_time_ind.recommendedFor.push("ec__________::EC"); + } + indicators.push(gold_vs_green_time_ind); + } let top_project_url = "http://88.197.53.71:8080/stats-api/chart?json="+ encodeURIComponent('{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","type":"bar","query":{"name":"monitor.'+ ChartHelper.prefix + 'id' + ChartHelper.suffix +(index==2?".h2020":(index==1?".fp7":""))+ '.' + dbTypePlural+'.top10projects"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Top 15 projects"},"subtitle":{"text":"by publications"},"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"}}}'); - let top_project_ind:Indicator = (new Indicator("", "", "column", "medium", true, true, [utils.generateIndicatorByChartUrl("stats-tool", top_project_url, "column")])); + let top_project_ind:Indicator = (new Indicator("", "", "chart", "medium", true, true, [utils.generateIndicatorByChartUrl("stats-tool", top_project_url, "column")])); top_project_ind.indicatorPaths[0].parameters["id"] = stakeholder.index_shortName.toLowerCase(); + if(index!=0){ + top_project_ind.recommendedFor.push("ec__________::EC"); + } indicators.push(top_project_ind); if(index == 0) { - let top_datasources_url = "http://88.197.53.71:8080/stats-api/chart?json=" + encodeURIComponent('{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","type":"bar","color":"#e62020ee","query":{"name":"monitor.' + ChartHelper.prefix + 'id' + ChartHelper.suffix + '.' + dbTypePlural + '.top10datasources"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Top 10 Datasources"},"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"}}}'); - let top_datasources_ind: Indicator = (new Indicator("By Content Providers", "", "column", "large", true, true, [utils.generateIndicatorByChartUrl("stats-tool", top_datasources_url, "column")])); + let top_datasources_url = "http://88.197.53.71:8080/stats-api/chart?json=" + encodeURIComponent('{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","type":"bar","color":"#42a5f5","query":{"name":"monitor.' + ChartHelper.prefix + 'id' + ChartHelper.suffix + '.' + dbTypePlural + '.top10datasources"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Top 10 Datasources"},"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"}}}'); + let top_datasources_ind: Indicator = (new Indicator("", "", "chart", "medium", true, true, [utils.generateIndicatorByChartUrl("stats-tool", top_datasources_url, "column")])); top_datasources_ind.indicatorPaths[0].parameters["id"] = stakeholder.index_shortName.toLowerCase(); indicators.push(top_datasources_ind); } + if(index != 0) { + let open_non_fl2 = "http://88.197.53.71:8080/stats-api/chart?json=" + encodeURIComponent( + '{"library":"HighCharts","chartDescription":{"queries":[{"name":"Open Access","type":"bar","query":{"select":[{"field":"' + dbType + '","aggregate":"count"},{"field":"' + dbType + '.project.funding level 2","aggregate":null}],"filters":['+fundingFilter[index]+',{"groupFilters":[{"field":"' + dbType + '.access mode","type":"=","values":["Open Access"]}],"op":"AND"}],"entity":"' + dbType + '","profile":"OpenAIRE All-inclusive","limit":"30"}},{"name":"Non Open Access","type":"bar","query":{"select":[{"field":"' + dbType + '","aggregate":"count"},{"field":"' + dbType + '.project.funding level 2","aggregate":null}],"filters":[{"groupFilters":[{"field":"' + dbType + '.access mode","type":"!=","values":["Open Access"]}],"op":"AND"}'+(fundingFilter[index].length >0?', ':'')+fundingFilter[index]+'],"entity":"' + dbType + '","profile":"OpenAIRE All-inclusive","limit":"30"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access vs Non Open Access"},"subtitle":{"text":"'+chartTitle[index]+'"},"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"}}}'); + let open_non_fl2_ind: Indicator = (new Indicator("By Scientific area", "", "chart", "medium", true, true, [utils.generateIndicatorByChartUrl("stats-tool", open_non_fl2, "column")])); + // open_non_fl2_ind.indicatorPaths[0].parameters["id"] = stakeholder.index_shortName.toLowerCase(); + indicators.push(open_non_fl2_ind); + if (index != 0) { + open_non_fl2_ind.recommendedFor.push("ec__________::EC"); + } + let gold_green__fl2 = "http://88.197.53.71:8080/stats-api/chart?json=" + encodeURIComponent( + '{"library":"HighCharts","chartDescription":{"queries":[{"name":"Green OA","type":"bar","query":{"select":[{"field":"' + dbType + '","aggregate":"count"},{"field":"' + dbType + '.project.funding level 2","aggregate":null}],"filters":[{"groupFilters":[{"field":"' + dbType + '.project.funding level 0","type":"=","values":["' + fieldValue[index] + '"]}],"op":"AND"},{"groupFilters":[{"field":"' + dbType + '.access mode","type":"=","values":["Open Access"]}],"op":"AND"},{"groupFilters":[{"field":"' + dbType + '.datasource.type","type":"contains","values":["repo"]}],"op":"AND"}],"entity":"' + dbType + '","profile":"OpenAIRE All-inclusive","limit":"30"}},{"name":"Gold OA","type":"bar","query":{"select":[{"field":"' + dbType + '","aggregate":"count"},{"field":"' + dbType + '.project.funding level 2","aggregate":null}],"filters":[{"groupFilters":[{"field":"' + dbType + '.access mode","type":"=","values":["Open Access"]}],"op":"AND"},{"groupFilters":[{"field":"' + dbType + '.project.funding level 0","type":"=","values":["' + fieldValue[index] + '"]}],"op":"AND"},{"groupFilters":[{"field":"' + dbType + '.datasource.id","type":"starts_with","values":["doaj"]}],"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":"Green vs Gold Open Access"},"subtitle":{"text":"' + chartTitle[index] + '"},"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"}}}'); + let gold_green_ind_fl2: Indicator = (new Indicator("", "", "chart", "medium", true, true, [utils.generateIndicatorByChartUrl("stats-tool", gold_green__fl2, "column")])); + // open_non_fl2_ind.indicatorPaths[0].parameters["id"] = stakeholder.index_shortName.toLowerCase(); + indicators.push(gold_green_ind_fl2); + if (index != 0) { + gold_green_ind_fl2.recommendedFor.push("ec__________::EC"); + } + + let open_non_fl1 = "http://88.197.53.71:8080/stats-api/chart?json=" + encodeURIComponent( + '{"library":"HighCharts","chartDescription":{"queries":[{"name":"Open Access","type":"bar","query":{"select":[{"field":"' + dbType + '","aggregate":"count"},{"field":"' + dbType + '.project.funding level 1","aggregate":null}],"filters":['+fundingFilter[index]+',{"groupFilters":[{"field":"' + dbType + '.access mode","type":"=","values":["Open Access"]}],"op":"AND"}],"entity":"' + dbType + '","profile":"OpenAIRE All-inclusive","limit":"30"}},{"name":"Non Open Access","type":"bar","query":{"select":[{"field":"' + dbType + '","aggregate":"count"},{"field":"' + dbType + '.project.funding level 1","aggregate":null}],"filters":[{"groupFilters":[{"field":"' + dbType + '.access mode","type":"!=","values":["Open Access"]}],"op":"AND"}'+(fundingFilter[index].length >0?', ':'')+fundingFilter[index]+'],"entity":"' + dbType + '","profile":"OpenAIRE All-inclusive","limit":"30"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access vs Non Open Access"},"subtitle":{"text":"'+chartTitle[index]+'"},"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"}}}'); + let open_non_fl1_ind: Indicator = (new Indicator("By Programme", "", "chart", "medium", true, true, [utils.generateIndicatorByChartUrl("stats-tool", open_non_fl1, "column")])); + // open_non_fl2_ind.indicatorPaths[0].parameters["id"] = stakeholder.index_shortName.toLowerCase(); + indicators.push(open_non_fl1_ind); + if (index != 0) { + open_non_fl1_ind.recommendedFor.push("ec__________::EC"); + } + let gold_green__fl1 = "http://88.197.53.71:8080/stats-api/chart?json=" + encodeURIComponent( + '{"library":"HighCharts","chartDescription":{"queries":[{"name":"Green OA","type":"bar","query":{"select":[{"field":"' + dbType + '","aggregate":"count"},{"field":"' + dbType + '.project.funding level 1","aggregate":null}],"filters":[{"groupFilters":[{"field":"' + dbType + '.project.funding level 0","type":"=","values":["' + fieldValue[index] + '"]}],"op":"AND"},{"groupFilters":[{"field":"' + dbType + '.access mode","type":"=","values":["Open Access"]}],"op":"AND"},{"groupFilters":[{"field":"' + dbType + '.datasource.type","type":"contains","values":["repo"]}],"op":"AND"}],"entity":"' + dbType + '","profile":"OpenAIRE All-inclusive","limit":"30"}},{"name":"Gold OA","type":"bar","query":{"select":[{"field":"' + dbType + '","aggregate":"count"},{"field":"' + dbType + '.project.funding level 1","aggregate":null}],"filters":[{"groupFilters":[{"field":"' + dbType + '.access mode","type":"=","values":["Open Access"]}],"op":"AND"},{"groupFilters":[{"field":"' + dbType + '.project.funding level 0","type":"=","values":["' + fieldValue[index] + '"]}],"op":"AND"},{"groupFilters":[{"field":"' + dbType + '.datasource.id","type":"starts_with","values":["doaj"]}],"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":"Green vs Gold Open Access"},"subtitle":{"text":"' + chartTitle[index] + '"},"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"}}}'); + let gold_green_ind_fl1: Indicator = (new Indicator("", "", "chart", "medium", true, true, [utils.generateIndicatorByChartUrl("stats-tool", gold_green__fl1, "column")])); + // open_non_fl2_ind.indicatorPaths[0].parameters["id"] = stakeholder.index_shortName.toLowerCase(); + indicators.push(gold_green_ind_fl1); + if (index != 0) { + gold_green_ind_fl1.recommendedFor.push("ec__________::EC"); + } + } + + return indicators; } static createOSTopic(stakeholder:Stakeholder):Topic{ diff --git a/src/assets/monitor-custom.css b/src/assets/monitor-custom.css index 0496c75..8676e83 100644 --- a/src/assets/monitor-custom.css +++ b/src/assets/monitor-custom.css @@ -84,8 +84,9 @@ } .dashboard .double-header .header_full #page_content_inner { - top: calc(var(--header-height) + var(--monitor-header-menu-height)); - position: absolute; + /*top: calc(var(--header-height) + var(--monitor-header-menu-height));*/ + /*position: absolute;*/ + margin-top: calc(var(--header-height) + 24px); } .stakeholderPage #sidebar_main .menu_section > ul li > a {