Skip to content
Snippets Groups Projects
Commit 0f17fe46 authored by jaden's avatar jaden
Browse files

rm console logging, fixes #12

parent 6caeae77
No related branches found
No related tags found
1 merge request!223Reports overhaul
...@@ -30,14 +30,14 @@ angular.module('reportApp').controller('GroupsController', ['$http', 'UrlService ...@@ -30,14 +30,14 @@ angular.module('reportApp').controller('GroupsController', ['$http', 'UrlService
vm.expNamesToRemove = []; vm.expNamesToRemove = [];
vm.toggleExpName = (expName) => { vm.toggleExpName = (expName) => {
console.log(vm.expNamesToRemove); //console.log(vm.expNamesToRemove);
let idx = vm.expNamesToRemove.indexOf(expName); let idx = vm.expNamesToRemove.indexOf(expName);
if(idx > -1){ if(idx > -1){
vm.expNamesToRemove.splice(idx, 1); vm.expNamesToRemove.splice(idx, 1);
} else { } else {
vm.expNamesToRemove.push(expName); vm.expNamesToRemove.push(expName);
} }
console.log(vm.expNamesToRemove); //console.log(vm.expNamesToRemove);
}; };
vm.removeExperiments = () => { vm.removeExperiments = () => {
......
...@@ -67,7 +67,7 @@ angular.module('reportApp') ...@@ -67,7 +67,7 @@ angular.module('reportApp')
; ;
const defaultFields = Array.from(defaultFieldsSet); const defaultFields = Array.from(defaultFieldsSet);
console.log(defaultFields); //console.log(defaultFields);
// tables have an arr of selected fields // tables have an arr of selected fields
// and a float precision // and a float precision
...@@ -97,7 +97,7 @@ angular.module('reportApp') ...@@ -97,7 +97,7 @@ angular.module('reportApp')
content.savedPlotter = PlotService.getPlotter(content).name; content.savedPlotter = PlotService.getPlotter(content).name;
content.savedConfig = PlotService.getPlotterConfig(content).name; content.savedConfig = PlotService.getPlotterConfig(content).name;
console.log(content); //console.log(content);
scope.group.addReportItem(id, content); scope.group.addReportItem(id, content);
}; };
......
...@@ -41,8 +41,8 @@ angular.module('reportApp').factory('ExperimentsService', ['experimentFactory', ...@@ -41,8 +41,8 @@ angular.module('reportApp').factory('ExperimentsService', ['experimentFactory',
const getVarProp = (obj, dontLogErrors) => { const getVarProp = (obj, dontLogErrors) => {
let keys = Object.keys(obj); let keys = Object.keys(obj);
if(keys.length !== 1 && !dontLogErrors){ if(keys.length !== 1 && !dontLogErrors){
console.warn(`Found bad obj for getVarProp:`); //console.warn(`Found bad obj for getVarProp:`);
console.log(obj); //console.log(obj);
} }
return obj[keys[0]]; return obj[keys[0]];
...@@ -157,7 +157,7 @@ angular.module('reportApp').factory('ExperimentsService', ['experimentFactory', ...@@ -157,7 +157,7 @@ angular.module('reportApp').factory('ExperimentsService', ['experimentFactory',
// only the actual name of the exp is available // only the actual name of the exp is available
const partNameValid = validExpNames.includes(e.split('/').pop()); const partNameValid = validExpNames.includes(e.split('/').pop());
if(!(fullNameValid || partNameValid)){ if(!(fullNameValid || partNameValid)){
console.log(`INVALID EXPERIMENT: ${e}`); //console.log(`INVALID EXPERIMENT: ${e}`);
g.removeExperiment(e); g.removeExperiment(e);
} }
}); });
...@@ -202,9 +202,11 @@ angular.module('reportApp').factory('ExperimentsService', ['experimentFactory', ...@@ -202,9 +202,11 @@ angular.module('reportApp').factory('ExperimentsService', ['experimentFactory',
} }
}); });
/*
console.log(expData); console.log(expData);
console.log(tableData); console.log(tableData);
console.log(plotData); console.log(plotData);
*/
cleanGroups(rawExpNames); cleanGroups(rawExpNames);
......
...@@ -254,7 +254,7 @@ angular.module('reportApp').factory('GroupsService', ['reportFactory', function( ...@@ -254,7 +254,7 @@ angular.module('reportApp').factory('GroupsService', ['reportFactory', function(
Object.entries(aliases).forEach(([e, a]) => g.setAliasToExperiment(a, e)); Object.entries(aliases).forEach(([e, a]) => g.setAliasToExperiment(a, e));
}); });
console.log(groupsServiceInstance.groups); //console.log(groupsServiceInstance.groups);
}; };
return groupsServiceInstance; return groupsServiceInstance;
......
...@@ -88,6 +88,7 @@ angular.module('reportApp').factory('PlotService', ['UrlService', function(UrlSe ...@@ -88,6 +88,7 @@ angular.module('reportApp').factory('PlotService', ['UrlService', function(UrlSe
const plotter = getPlotter(content); const plotter = getPlotter(content);
const config = getPlotterConfig(content); const config = getPlotterConfig(content);
/*
if(!content || !plotter || !config){ if(!content || !plotter || !config){
console.error(`plotter info not found: content: ${content} defaults: ${defaults} plotter: ${plotter} config: ${config}`); console.error(`plotter info not found: content: ${content} defaults: ${defaults} plotter: ${plotter} config: ${config}`);
console.log(ps.plotters); console.log(ps.plotters);
...@@ -104,6 +105,7 @@ angular.module('reportApp').factory('PlotService', ['UrlService', function(UrlSe ...@@ -104,6 +105,7 @@ angular.module('reportApp').factory('PlotService', ['UrlService', function(UrlSe
console.log(plotter); console.log(plotter);
return; return;
}; };
*/
// the data to be sent to the server // the data to be sent to the server
const requestData = { const requestData = {
...@@ -128,12 +130,14 @@ angular.module('reportApp').factory('PlotService', ['UrlService', function(UrlSe ...@@ -128,12 +130,14 @@ angular.module('reportApp').factory('PlotService', ['UrlService', function(UrlSe
const possiblePlotters = getPossiblePlotters(content); const possiblePlotters = getPossiblePlotters(content);
const possibleConfigs = getPossibleConfigs(plotter); const possibleConfigs = getPossibleConfigs(plotter);
/*
console.log(`Request data:`); console.log(`Request data:`);
console.log(requestData); console.log(requestData);
console.log(`possible plotters:`); console.log(`possible plotters:`);
console.log(possiblePlotters); console.log(possiblePlotters);
console.log(`possible parameters:`); console.log(`possible parameters:`);
console.log(possibleConfigs); console.log(possibleConfigs);
*/
const returnStruct = [requestData, possiblePlotters, possibleConfigs]; const returnStruct = [requestData, possiblePlotters, possibleConfigs];
...@@ -240,7 +244,7 @@ angular.module('reportApp').factory('PlotService', ['UrlService', function(UrlSe ...@@ -240,7 +244,7 @@ angular.module('reportApp').factory('PlotService', ['UrlService', function(UrlSe
ps.getPossiblePlotters = getPossiblePlotters; ps.getPossiblePlotters = getPossiblePlotters;
ps.getPossibleConfigs = getPossibleConfigs; ps.getPossibleConfigs = getPossibleConfigs;
console.log(ps); //console.log(ps);
return ps; return ps;
}]); }]);
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
* Consumes the "report" object from the API and digests it into helper * Consumes the "report" object from the API and digests it into helper
* funcs and report-wide info. Basically an adaptor & bootstrap-er. * funcs and report-wide info. Basically an adaptor & bootstrap-er.
*/ */
angular.module('reportApp').factory('ReportService', ['GroupsService', 'plotterFactory', 'PlotService', 'reportFactory', 'UrlService', function(GroupsService, plotterFactory, PlotService, reportFactory, UrlService){ angular.module('reportApp').factory('ReportService', ['GroupsService', 'plotterFactory', 'PlotService', 'reportFactory', 'UrlService', 'ErrorService', function(GroupsService, plotterFactory, PlotService, reportFactory, UrlService, ErrorService){
const rs = {}; const rs = {};
rs.isAnonymous = undefined; rs.isAnonymous = undefined;
...@@ -43,7 +43,7 @@ angular.module('reportApp').factory('ReportService', ['GroupsService', 'plotterF ...@@ -43,7 +43,7 @@ angular.module('reportApp').factory('ReportService', ['GroupsService', 'plotterF
// processed the report data received from the server, // processed the report data received from the server,
// and bootstraps the state of various services // and bootstraps the state of various services
rs.processReport = (report) => { rs.processReport = (report) => {
console.log(report); //console.log(report);
// useful info about the app // useful info about the app
rs.isAnonymous = report.anonymous; rs.isAnonymous = report.anonymous;
...@@ -61,7 +61,7 @@ angular.module('reportApp').factory('ReportService', ['GroupsService', 'plotterF ...@@ -61,7 +61,7 @@ angular.module('reportApp').factory('ReportService', ['GroupsService', 'plotterF
const isEditable = rs.isOwner && rs.status === 'editable' && !rs.isAnonymous; const isEditable = rs.isOwner && rs.status === 'editable' && !rs.isAnonymous;
GroupsService.setEditable(isEditable); GroupsService.setEditable(isEditable);
console.log(GroupsService.groups); //console.log(GroupsService.groups);
// fetch all our plotter data // fetch all our plotter data
// these three fetches do not depend on eachother // these three fetches do not depend on eachother
...@@ -137,9 +137,9 @@ angular.module('reportApp').factory('ReportService', ['GroupsService', 'plotterF ...@@ -137,9 +137,9 @@ angular.module('reportApp').factory('ReportService', ['GroupsService', 'plotterF
}; };
rs.fetchReport() rs.fetchReport()
.catch(e => console.error(e)); .catch(e => ErrorService.logError(e, `Could not load report.`));
console.log(rs); //console.log(rs);
return rs; return rs;
}]); }]);
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