Skip to content
Snippets Groups Projects
Commit 2116a83e authored by Jaden Diefenbaugh's avatar Jaden Diefenbaugh
Browse files

distinguish plots by plot name not by plot type

parent 8911a5ec
No related branches found
No related tags found
1 merge request!223Reports overhaul
......@@ -79,7 +79,7 @@ angular.module('reportApp')
</button>
<ul class='dropdown-menu' ng-repeat='(expName, plots) in plottables' ng-if='expName === group.experiments[0]'>
<li ng-repeat='plot in plots'>
<a href='#' ng-click='addNewPlot(plot.type)'>{{ plot.type }}</a>
<a href='#' ng-click='addNewPlot(plot.label)'>{{ plot.label }} <i>({{ plot.type }})</i></a>
</li>
</ul>
</div>
......
......@@ -54,7 +54,6 @@ angular.module('reportApp').factory('ExperimentsService', ['experimentFactory',
const getTableablesFromExpName = (expName) => {
let currExp = expData[expName];
console.log(currExp);
// get all result objs that have a type that doesnt start with 'plot/'
// these results can be displayed in a table
let results = Object.entries(getVarProp(currExp.results))
......@@ -142,7 +141,7 @@ angular.module('reportApp').factory('ExperimentsService', ['experimentFactory',
const getPlottablesFromExpName = (expName) => {
return Object.entries(getVarProp(expData[expName].results))
.filter(([res_name, obj]) => obj.type.startsWith('plot/'))
.map(([res_name, obj]) => obj);
.map(([res_name, obj]) => Object.assign(obj, { label: res_name }));
};
// make sure there are no invalid experiments in the report's groups
......@@ -179,7 +178,7 @@ angular.module('reportApp').factory('ExperimentsService', ['experimentFactory',
cleanGroups(Object.keys(expData));
console.log(expData);
console.log(tableData);
//console.log(tableData);
console.log(plotData);
return expData;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment