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

a bit better debugging help for these plot bugs

parent 9c944234
No related branches found
No related tags found
1 merge request!223Reports overhaul
......@@ -63,12 +63,21 @@ angular.module('reportApp').factory('PlotService', ['UrlService', function(UrlSe
// which can each have different configurations (plotter parameter instances)
let config = content.savedConfig || plotterParameters.find(pp => pp.name === defaults.parameter);
if(!content || !defaults || !plotter || !config){
console.error(`plotter info not found: content: ${content} defaults: ${defaults} plotter: ${plotter} config: ${config}`);
console.log(plotters);
console.log(defaultPlotters);
console.log(plotterParameters);
return;
}
// sanity check for the plotter & config
// the config's "plotter" field should be equal to the plotter's id field
if(!(config.plotter === plotter.id)){
if(config.plotter !== plotter.id){
console.error(`Config plotter val "${config.plotter}" != plotter id "${plotter.id}":`);
console.log(config);
console.log(plotter);
return;
};
// the data to be sent to the server
......
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