Commit b19517b3 authored by Philip ABBET's avatar Philip ABBET
Browse files

Remove console.log() statements in JS files

parent f1434472
......@@ -113,7 +113,6 @@ beat.experiments.utils.displayPlot = function(
var tr = document.createElement('tr');
var td = document.createElement('td');
console.log(value);
if(!value.report_number){
table_element.appendChild(tr);
......@@ -176,7 +175,6 @@ beat.experiments.utils.displayPlot = function(
var tr = document.createElement('tr');
var td = document.createElement('td');
console.log(value);
if(!value.report_number){
table_element.appendChild(tr);
......
......@@ -174,11 +174,7 @@ app.directive("saveplotterparameter", function()
//No plotter is selected
if(attrs.plotter == "None")
{
if($("#plotter-selection :selected").text().length == 0)
{
//console.log("Please select a plotter first")
}
else
if($("#plotter-selection :selected").text().length > 0)
{
scope.plotterparameterData.plotter = scope.plotters.selected.id;
......@@ -200,14 +196,11 @@ app.directive("saveplotterparameter", function()
scope.plotterparameterFactory.updatePlotterParameter(scope.user, scope.plotterparameter_user, scope.plotterparameter_name, scope.plotterparameter_version, scope.plotterparameterData, scope.url_prefix)
.success(function (returnedData)
{
//alert("The report "+ scope.report_id +" has been saved.");
beat.ui.plotterparameter.plotterparameter_saved('plotterparameter_saved', scope);
})
.error(function (error)
{
scope.status = 'Unable to update plotterparameter data: ' + error.message;
});
}
......
......@@ -30,14 +30,12 @@ angular.module('reportApp').controller('GroupsController', ['$http', 'UrlService
vm.expNamesToRemove = [];
vm.toggleExpName = (expName) => {
//console.log(vm.expNamesToRemove);
let idx = vm.expNamesToRemove.indexOf(expName);
if(idx > -1){
vm.expNamesToRemove.splice(idx, 1);
} else {
vm.expNamesToRemove.push(expName);
}
//console.log(vm.expNamesToRemove);
};
vm.removeExperiments = () => {
......
......@@ -67,7 +67,6 @@ angular.module('reportApp')
;
const defaultFields = Array.from(defaultFieldsSet);
//console.log(defaultFields);
// tables have an arr of selected fields
// and a float precision
......@@ -97,7 +96,6 @@ angular.module('reportApp')
content.savedPlotter = PlotService.getPlotter(content).name;
content.savedConfig = PlotService.getPlotterConfig(content).name;
//console.log(content);
scope.group.addReportItem(id, content);
};
......
......@@ -119,9 +119,6 @@ angular.module('reportApp')
const isUnique = scope.isUniqueTableable(fName);
const isInGroup = scope.groupName(fName) == gName;
// console.log(`for field "${fName}" and group "${gName}":`);
// console.log(`isUnique: ${isUnique}; isInGroup: ${isInGroup}`);
return isUnique && isInGroup;
}
......
......@@ -40,11 +40,6 @@ angular.module('reportApp').factory('ExperimentsService', ['experimentFactory',
// These fields are the *only* available field in the obj.
const getVarProp = (obj, dontLogErrors) => {
let keys = Object.keys(obj);
if(keys.length !== 1 && !dontLogErrors){
//console.warn(`Found bad obj for getVarProp:`);
//console.log(obj);
}
return obj[keys[0]];
};
......@@ -157,7 +152,6 @@ angular.module('reportApp').factory('ExperimentsService', ['experimentFactory',
// only the actual name of the exp is available
const partNameValid = validExpNames.includes(e.split('/').pop());
if(!(fullNameValid || partNameValid)){
//console.log(`INVALID EXPERIMENT: ${e}`);
g.removeExperiment(e);
}
});
......@@ -202,10 +196,6 @@ angular.module('reportApp').factory('ExperimentsService', ['experimentFactory',
}
});
console.log(expData);
console.log(tableData);
console.log(plotData);
cleanGroups(rawExpNames);
return expData;
......
......@@ -253,8 +253,6 @@ angular.module('reportApp').factory('GroupsService', ['reportFactory', function(
reportItems.forEach(i => g.addReportItem(i.id, i.content));
Object.entries(aliases).forEach(([e, a]) => g.setAliasToExperiment(a, e));
});
//console.log(groupsServiceInstance.groups);
};
return groupsServiceInstance;
......
......@@ -88,25 +88,6 @@ angular.module('reportApp').factory('PlotService', ['UrlService', function(UrlSe
const plotter = getPlotter(content);
const config = getPlotterConfig(content);
/*
if(!content || !plotter || !config){
console.error(`plotter info not found: content: ${content} defaults: ${defaults} plotter: ${plotter} config: ${config}`);
console.log(ps.plotters);
console.log(ps.defaultPlotters);
console.log(ps.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){
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
const requestData = {
report_number: ps.reportNumber,
......@@ -130,15 +111,6 @@ angular.module('reportApp').factory('PlotService', ['UrlService', function(UrlSe
const possiblePlotters = getPossiblePlotters(content);
const possibleConfigs = getPossibleConfigs(plotter);
/*
console.log(`Request data:`);
console.log(requestData);
console.log(`possible plotters:`);
console.log(possiblePlotters);
console.log(`possible parameters:`);
console.log(possibleConfigs);
*/
const returnStruct = [requestData, possiblePlotters, possibleConfigs];
return returnStruct;
......@@ -244,7 +216,5 @@ angular.module('reportApp').factory('PlotService', ['UrlService', function(UrlSe
ps.getPossiblePlotters = getPossiblePlotters;
ps.getPossibleConfigs = getPossibleConfigs;
//console.log(ps);
return ps;
}]);
......@@ -43,7 +43,6 @@ angular.module('reportApp').factory('ReportService', ['GroupsService', 'plotterF
// processed the report data received from the server,
// and bootstraps the state of various services
rs.processReport = (report) => {
//console.log(report);
// useful info about the app
rs.isAnonymous = report.anonymous;
......@@ -61,8 +60,6 @@ angular.module('reportApp').factory('ReportService', ['GroupsService', 'plotterF
const isEditable = rs.isOwner && rs.status === 'editable' && !rs.isAnonymous;
GroupsService.setEditable(isEditable);
//console.log(GroupsService.groups);
// fetch all our plotter data
// these three fetches do not depend on eachother
const pPlotters = plotterFactory.getPlotters('')
......@@ -139,7 +136,5 @@ angular.module('reportApp').factory('ReportService', ['GroupsService', 'plotterF
rs.fetchReport()
.catch(e => ErrorService.logError(e, `Could not load report.`));
//console.log(rs);
return rs;
}]);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment