diff --git a/server.ts b/server.ts index 852d757..5794d7e 100644 --- a/server.ts +++ b/server.ts @@ -13,7 +13,7 @@ enableProdMode(); // Express server const app = express(); -const PORT = process.env.PORT || 4000; +const PORT = process.env.PORT || 5000; const DIST_FOLDER = join(process.cwd(), 'dist'); // Our index.html we'll use as our template diff --git a/src/app/monitor/monitor.component.html b/src/app/monitor/monitor.component.html index 03fdfd0..a44a977 100644 --- a/src/app/monitor/monitor.component.html +++ b/src/app/monitor/monitor.component.html @@ -3,7 +3,11 @@
@@ -91,8 +84,33 @@ [(ngModel)]="endYear">
--> -

Indicators

+

Indicators +

+ + +
+
+
+ No indicators available yet. Stay tuned! +
+
+
+
+
+
+ {{activeSubCategory.description && activeSubCategory.description.length > 0 ? activeSubCategory.description + :(activeCategory.description && activeCategory.description.length > 0 ? activeCategory.description : + (activeTopic.description && activeTopic.description.length > 0 ? activeTopic.description : ""))}} +
+
+
+
+
-
+
-
-
{{chart.name}}
-
+
+ +

+
{{chart.name + " "}}
+

+
- -
@@ -145,4 +166,10 @@
+ +
+
+ + diff --git a/src/app/utils/entities/stakeholderCreator.ts b/src/app/utils/entities/stakeholderCreator.ts index 9b8252d..e9e6bc5 100644 --- a/src/app/utils/entities/stakeholderCreator.ts +++ b/src/app/utils/entities/stakeholderCreator.ts @@ -5,68 +5,36 @@ export class StakeholderCreator { static createFunderDefaultProfile():Stakeholder{ let funder:Stakeholder = new Stakeholder(null,"funder","_funder_id_","_funder_name_","_FSN_",true,"deafult_funder",true,true, null); funder.topics.push(StakeholderCreator.createResearchProductionTopic(funder)); - funder.topics.push(StakeholderCreator.createOpenAccessTopic(funder)); - funder.topics.push(StakeholderCreator.createOSTopic(funder)); - funder.topics.push(funder.createImpactTopic()); - funder.topics.push(funder.createCollaborationTopic()); + 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")); + funder.topics.push(collaboration); + + funder.topics.push(StakeholderCreator.createEmptyTopic("Diffusion","","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")); + funder.topics.push(impact); + return funder; } - static createFunderFromDefaultProfile(id: string, type: string, index_id, index_name: string, index_shortName:string , isDefaultProfile: boolean, alias:string , isActive: boolean, isPublic: boolean, logoUrl:string):Stakeholder{ - let funder:Stakeholder = StakeholderCreator.createFunderDefaultProfile(); - funder.initializeFunder(id,type, index_id, index_name, index_shortName, isDefaultProfile, alias, isActive, isPublic, logoUrl); - for (let topic of funder.topics) { - for (let category of topic.categories) { - let subTokeep: SubCategory[] = []; - for (let subCategory of category.subCategories) { - let chartsTokeep: Indicator[] = []; - if (subCategory.recommendedFor.length == 0 || subCategory.recommendedFor.indexOf(id) != -1) { - subTokeep.push(subCategory); - } - for (let indicator of subCategory.charts) { - if (indicator.recommendedFor.length == 0 || indicator.recommendedFor.indexOf(id) != -1) { - chartsTokeep.push(indicator); - } - for (let indicatorPath of indicator.indicatorPaths) { - if (indicatorPath.parameters) { - Object.keys(indicatorPath.parameters).forEach(key => { - if (indicatorPath.parameters[key].indexOf("_funder_name_") != -1) { - indicatorPath.parameters[key] = indicatorPath.parameters[key].replace("_funder_name_", funder.index_name); - } else if (indicatorPath.parameters[key].indexOf("_fsn_") != -1) { - indicatorPath.parameters[key] = indicatorPath.parameters[key].toString().replace("_fsn_", funder.index_shortName.toLowerCase()); - } - }); - } - } - } - subCategory.charts = chartsTokeep; - for (let indicator of subCategory.numbers) { - for (let indicatorPath of indicator.indicatorPaths) { - indicatorPath.url = indicatorPath.url.replace("_funder_id_", funder.index_id); - // if(indicatorPath.parameters) { - // indicatorPath.parameters.forEach((value: string, key: string) => { - // if (value.indexOf("_funder_name_")!=-1) { - // indicatorPath.parameters.set(key,value.toString().replace("_funder_name_", funder.index_name)); - // }else if (value.indexOf("_fsn_")!=-1) { - // indicatorPath.parameters.set(key,value.toString().replace("_fsn_", funder.index_shortName.toLowerCase())); - // } - // }); - // } - } - } - - } - category.subCategories = subTokeep; - } - } - - console.log(funder); - return funder; + static createEmptyTopic(name: string, description: string, alias: string):Topic{ + let topic = new Topic(name, description, alias, true, true); + topic.categories.push(this.createEmptyCategory("Overview","","overview")); + return topic; + } + static createEmptyCategory(name: string, description: string, alias: string):Category{ + let cat:Category = new Category(name, description, alias,true,true); + cat.subCategories.push(new SubCategory("Overview","","overview",true,true,true)); + return cat; } static createResearchProductionTopic(stakeholder:Stakeholder):Topic { - let topic = new Topic("Research production", "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do...", "research-production", true, true); + let topic = new Topic("Throughput / Output", "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do...", "research-production", true, true); let pubCategory:Category = new Category("Publications","","publications",true,true); topic.categories.push(pubCategory); @@ -74,7 +42,6 @@ export class StakeholderCreator { pubCategory.subCategories.push(StakeholderCreator.createResearchProductionPerType(stakeholder,"Publications", "Publication","publication", "publications",0)); pubCategory.subCategories.push(StakeholderCreator.createResearchProductionPerType(stakeholder,"Publications", "Publication","publication", "publications",1)); pubCategory.subCategories.push(StakeholderCreator.createResearchProductionPerType(stakeholder,"Publications", "Publication","publication", "publications",2)); - let dataCategory:Category = new Category("Research data","","data",true,true); topic.categories.push(dataCategory); dataCategory.subCategories.push(StakeholderCreator.createResearchProductionPerType(stakeholder,"Research data", "Research data","dataset", "datasets",0)); @@ -161,32 +128,32 @@ export class StakeholderCreator { //{"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"}}} let datasource = new Indicator("",null, "chart","small",true, true,[new IndicatorPath("bar", "stats-tool", "chart?json=", - '{"library":"HighCharts","chartDescription":{"queries":[{"name":"'+typePlural+'","type":"'+ChartHelper.prefix+'type'+ChartHelper.suffix+'","query":{"name":"monitor.'+ChartHelper.prefix+'id'+ChartHelper.suffix+(index==1?".h2020":(index==2?".fp7":""))+'.'+dbTypePlural+'.datasources"}}],"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":"Content provider"}},"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)]); + '{"library":"HighCharts","chartDescription":{"queries":[{"name":"'+typePlural+'","type":"'+ChartHelper.prefix+'type'+ChartHelper.suffix+'","query":{"name":"monitor.'+ChartHelper.prefix+'id'+ChartHelper.suffix+(index==2?".h2020":(index==1?".fp7":""))+'.'+dbTypePlural+'.datasources"}}],"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":"Content provider"}},"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)]); datasource.indicatorPaths[0].parameters = IndicatorPath.createParameters(stakeholder.index_name,chartTitle[index] + typeSingl+" content provider","bar"); datasource.indicatorPaths[0].parameters["id"] = stakeholder.index_shortName.toLowerCase(); pubDefSub.charts.push(datasource); if(dbType == "publication") { let journal = new Indicator("", null, "chart", "small", true, true, [new IndicatorPath("bar", "stats-tool", "chart?json=", - '{"library":"HighCharts","chartDescription":{"queries":[{"name":"' + typePlural + '","type":"' + ChartHelper.prefix + 'type' + ChartHelper.suffix + '","query":{"name":"monitor.' + ChartHelper.prefix + 'id' + ChartHelper.suffix +(index==1?".h2020":(index==2?".fp7":""))+ '.' + dbTypePlural + '.journals"}}],"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":"Journal"}},"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)]); + '{"library":"HighCharts","chartDescription":{"queries":[{"name":"' + typePlural + '","type":"' + ChartHelper.prefix + 'type' + ChartHelper.suffix + '","query":{"name":"monitor.' + ChartHelper.prefix + 'id' + ChartHelper.suffix +(index==2?".h2020":(index==1?".fp7":""))+ '.' + dbTypePlural + '.journals"}}],"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":"Journal"}},"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)]); journal.indicatorPaths[0].parameters = IndicatorPath.createParameters(stakeholder.index_name, chartTitle[index] + typeSingl + " journal", "bar"); journal.indicatorPaths[0].parameters["id"] = stakeholder.index_shortName.toLowerCase(); pubDefSub.charts.push(journal); let repo = new Indicator("", null, "chart", "small", true, true, [new IndicatorPath("bar", "stats-tool", "chart?json=", - '{"library":"HighCharts","chartDescription":{"queries":[{"name":"' + typePlural + '","type":"' + ChartHelper.prefix + 'type' + ChartHelper.suffix + '","query":{"name":"monitor.' + ChartHelper.prefix + 'id' + ChartHelper.suffix +(index==1?".h2020":(index==2?".fp7":""))+ '.' + dbTypePlural + '.repositories"}}],"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":"Repositories"}},"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)]); + '{"library":"HighCharts","chartDescription":{"queries":[{"name":"' + typePlural + '","type":"' + ChartHelper.prefix + 'type' + ChartHelper.suffix + '","query":{"name":"monitor.' + ChartHelper.prefix + 'id' + ChartHelper.suffix +(index==2?".h2020":(index==1?".fp7":""))+ '.' + dbTypePlural + '.repositories"}}],"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":"Repositories"}},"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)]); repo.indicatorPaths[0].parameters = IndicatorPath.createParameters(stakeholder.index_name, chartTitle[index] + typeSingl + " repositories", "bar"); repo.indicatorPaths[0].parameters["id"] = stakeholder.index_shortName.toLowerCase(); pubDefSub.charts.push(repo); } if(dbType == "dataset") { let repo = new Indicator("", null, "chart", "small", true, true, [new IndicatorPath("bar", "stats-tool", "chart?json=", - '{"library":"HighCharts","chartDescription":{"queries":[{"name":"' + typePlural + '","type":"' + ChartHelper.prefix + 'type' + ChartHelper.suffix + '","query":{"name":"monitor.' + ChartHelper.prefix + 'id' + ChartHelper.suffix + (index==1?".h2020":(index==2?".fp7":""))+'.' + dbTypePlural + '.drepositories"}}],"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":"Data Repositories"}},"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)]); + '{"library":"HighCharts","chartDescription":{"queries":[{"name":"' + typePlural + '","type":"' + ChartHelper.prefix + 'type' + ChartHelper.suffix + '","query":{"name":"monitor.' + ChartHelper.prefix + 'id' + ChartHelper.suffix + (index==2?".h2020":(index==1?".fp7":""))+'.' + dbTypePlural + '.drepositories"}}],"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":"Data Repositories"}},"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)]); repo.indicatorPaths[0].parameters = IndicatorPath.createParameters(stakeholder.index_name, chartTitle[index] + typeSingl + " repositories", "bar"); repo.indicatorPaths[0].parameters["id"] = stakeholder.index_shortName.toLowerCase(); pubDefSub.charts.push(repo); let irepo = new Indicator("", null, "chart", "small", true, true, [new IndicatorPath("bar", "stats-tool", "chart?json=", - '{"library":"HighCharts","chartDescription":{"queries":[{"name":"' + typePlural + '","type":"' + ChartHelper.prefix + 'type' + ChartHelper.suffix + '","query":{"name":"monitor.' + ChartHelper.prefix + 'id' + ChartHelper.suffix +(index==1?".h2020":(index==2?".fp7":""))+ '.' + dbTypePlural + '.irepositories"}}],"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":"Institutional repositories"}},"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)]); + '{"library":"HighCharts","chartDescription":{"queries":[{"name":"' + typePlural + '","type":"' + ChartHelper.prefix + 'type' + ChartHelper.suffix + '","query":{"name":"monitor.' + ChartHelper.prefix + 'id' + ChartHelper.suffix +(index==2?".h2020":(index==1?".fp7":""))+ '.' + dbTypePlural + '.irepositories"}}],"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":"Institutional repositories"}},"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)]); irepo.indicatorPaths[0].parameters = IndicatorPath.createParameters(stakeholder.index_name, chartTitle[index] + typeSingl + " institutional repositories", "bar"); irepo.indicatorPaths[0].parameters["id"] = stakeholder.index_shortName.toLowerCase(); pubDefSub.charts.push(irepo); @@ -202,7 +169,7 @@ export class StakeholderCreator { } return pubDefSub; } - static createOASub(){ +/* static createOASub(){ let subCategories:SubCategory[] = []; let overviewSub = new SubCategory("Overview", null,"overview",true, true); subCategories.push(overviewSub); @@ -211,42 +178,32 @@ export class StakeholderCreator { let byProgramSub = new SubCategory("By Programme", null,"programme",true, true); subCategories.push(byProgramSub); return subCategories; - - + }*/ + 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")); + return category; } - static createOpenAccessTopic(stakeholder:Stakeholder):Topic { - let topic = new Topic("Open Access", "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do...", "open-access", true, true); - - let pubCategory:Category = new Category("Publications","","publications",true,true); - topic.categories.push(pubCategory); - pubCategory.subCategories = StakeholderCreator.createOASub(); - - let dataCategory:Category = new Category("Research data","","data",true,true); - topic.categories.push(dataCategory); - dataCategory.subCategories = StakeholderCreator.createOASub(); - - let softwareCategory:Category = new Category("Software","","software",true,true); - topic.categories.push(softwareCategory); - softwareCategory.subCategories = StakeholderCreator.createOASub(); - - let otherCategory:Category = new Category("Other research products","","other",true,true); - topic.categories.push(otherCategory); - - otherCategory.subCategories = StakeholderCreator.createOASub(); - - return topic; - + static createOASub(stakeholder:Stakeholder,typePlural, typeSingl, dbType, dbTypePlural ):SubCategory { + let sub:SubCategory = new SubCategory(typePlural, null, dbTypePlural, true, true); + return sub; } static createOSTopic(stakeholder:Stakeholder):Topic{ let topic = new Topic("Open Science","Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do...","open-science",true,true); + topic.categories.push(this.createOpenAccessTopic(stakeholder)); + let linked:Category = new Category("Fair / Linked","","linked",true,true); + topic.categories.push(linked); + linked.subCategories.push(this.createOSOverviewPerType(stakeholder,"Publications","Publication","publication","publications")); + linked.subCategories.push(this.createOSOverviewPerType(stakeholder,"Research data","Research data","dataset","datasets")); + linked.subCategories.push(this.createOSOverviewPerType(stakeholder,"Software","Software","software","software")); + linked.subCategories.push(this.createOSOverviewPerType(stakeholder,"Other research products","Other research product","other","other")); - let overview:Category = new Category("Overview","","overview",true,true); - topic.categories.push(overview); - overview.subCategories.push(this.createOSOverviewPerType(stakeholder,"Publications","Publication","publication","publications")); - overview.subCategories.push(this.createOSOverviewPerType(stakeholder,"Research data","Research data","dataset","datasets")); - overview.subCategories.push(this.createOSOverviewPerType(stakeholder,"Software","Software","software","software")); - overview.subCategories.push(this.createOSOverviewPerType(stakeholder,"Other research products","Other research product","other","other")); - + let openInfra:Category = new Category("Open Infrastructures","","open-infrastructures",true,true); + openInfra.subCategories.push(new SubCategory("Overview","","overview",true,true,true)); + topic.categories.push(openInfra); return topic; } diff --git a/src/app/utils/indicator-utils.ts b/src/app/utils/indicator-utils.ts index 918f964..642ffff 100644 --- a/src/app/utils/indicator-utils.ts +++ b/src/app/utils/indicator-utils.ts @@ -37,11 +37,11 @@ export class StakeholderUtils { let subTokeep: SubCategory[] = []; for (let subCategory of category.subCategories) { let chartsTokeep: Indicator[] = []; - if (subCategory.recommendedFor.length == 0 || subCategory.recommendedFor.indexOf(funder.index_id) != -1) { + if (subCategory.recommendedFor.length == 0 || subCategory.recommendedFor.indexOf(funder._id) != -1) { subTokeep.push(subCategory); } for (let indicator of subCategory.charts) { - if (indicator.recommendedFor.length == 0 || indicator.recommendedFor.indexOf(funder.index_id) != -1) { + if (indicator.recommendedFor.length == 0 || indicator.recommendedFor.indexOf(funder._id) != -1) { chartsTokeep.push(indicator); } for (let indicatorPath of indicator.indicatorPaths) { diff --git a/src/assets/monitor-custom.css b/src/assets/monitor-custom.css index 9fcbcc5..0496c75 100644 --- a/src/assets/monitor-custom.css +++ b/src/assets/monitor-custom.css @@ -95,3 +95,7 @@ .double-header .uk-logo img{ max-height: 80px; } + +.stakeholderPage #style_switcher{ + top:200px; +} diff --git a/src/assets/theme-assets/beta_flag.svg b/src/assets/theme-assets/beta_flag.svg new file mode 100644 index 0000000..23d1998 --- /dev/null +++ b/src/assets/theme-assets/beta_flag.svg @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/theme-assets/dashboard-custom.css b/src/assets/theme-assets/dashboard-custom.css index c27be13..13b03bf 100644 --- a/src/assets/theme-assets/dashboard-custom.css +++ b/src/assets/theme-assets/dashboard-custom.css @@ -204,3 +204,11 @@ body.dashboard { .dashboard .uk-dropdown .uk-nav.uk-dropdown-nav > li > a { padding: 5px 10px; } + +.large-badge { + height: 104px; + position: absolute; + top: 0; + left: 0; + z-index: 1; +} diff --git a/src/assets/theme-assets/prototype_flag.svg b/src/assets/theme-assets/prototype_flag.svg new file mode 100644 index 0000000..a1dc871 --- /dev/null +++ b/src/assets/theme-assets/prototype_flag.svg @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/index.html b/src/index.html index 8e053e6..799ccce 100644 --- a/src/index.html +++ b/src/index.html @@ -6,6 +6,7 @@ +