diff --git a/beat/web/reports/static/reports/app/factories/dataFactory.js b/beat/web/reports/static/reports/app/factories/dataFactory.js index d584fb4ee98b59eecb7731f4866ed1490b0e26dd..f3fb497e02e392212a867ef4576cd0b86e09b786 100644 --- a/beat/web/reports/static/reports/app/factories/dataFactory.js +++ b/beat/web/reports/static/reports/app/factories/dataFactory.js @@ -20,7 +20,7 @@ * with the BEAT platform. If not, see http://www.gnu.org/licenses/. */ //This factory retrieves data from the static files and associates it with the $scope -app.factory('dataFactory', function($http){ +angular.module('reportApp').factory('dataFactory', function($http){ var getData = function (URL) { //return $http.get(URL + 'itemcontent.json'); var obj = {content:null}; diff --git a/beat/web/reports/static/reports/app/factories/experimentFactory.js b/beat/web/reports/static/reports/app/factories/experimentFactory.js index efc742fe5a67136588855c0e570286b470da9757..6ef4f0b32436f78da2d77a8a02909ce5f88134b6 100644 --- a/beat/web/reports/static/reports/app/factories/experimentFactory.js +++ b/beat/web/reports/static/reports/app/factories/experimentFactory.js @@ -20,7 +20,7 @@ * with the BEAT platform. If not, see http://www.gnu.org/licenses/. */ //This factory retrieves data from the REST API and associates it with the $scope -app.factory('experimentFactory', function($http, $q){ +angular.module('reportApp').factory('experimentFactory', function($http, $q){ return { getExperimentInformation: function (url_prefix, experiment_id){ urlBase = url_prefix + '/api/v1/experiments'; @@ -45,6 +45,5 @@ app.factory('experimentFactory', function($http, $q){ return response.data; }); } - - } + }; }); diff --git a/beat/web/reports/static/reports/app/factories/plotterFactory.js b/beat/web/reports/static/reports/app/factories/plotterFactory.js index 56d7e4132c1f464ca073cfa8f716f54111cecf4d..f19e23ec6da51ac5406efe79c39d06e5cf4dfd20 100644 --- a/beat/web/reports/static/reports/app/factories/plotterFactory.js +++ b/beat/web/reports/static/reports/app/factories/plotterFactory.js @@ -20,7 +20,7 @@ * with the BEAT platform. If not, see http://www.gnu.org/licenses/. */ //This factory retrieves data from the REST API and associates it with the $scope -app.factory('plotterFactory', ['$http', function($http){ +angular.module('reportApp').factory('plotterFactory', ['$http', function($http){ var plotterFactory = {}; plotterFactory.getPlotters = function (url_prefix){ diff --git a/beat/web/reports/static/reports/app/factories/reportFactory.js b/beat/web/reports/static/reports/app/factories/reportFactory.js index 721fc8559e4fd7b4d3043e86053c735d1eddb0db..431abd8bdaa733df07c8da171cd2614a58bb2e67 100644 --- a/beat/web/reports/static/reports/app/factories/reportFactory.js +++ b/beat/web/reports/static/reports/app/factories/reportFactory.js @@ -20,7 +20,7 @@ * with the BEAT platform. If not, see http://www.gnu.org/licenses/. */ //This factory retrieves data from the REST API and associates it with the $scope -app.factory('reportFactory', ['$http', 'experimentFactory', function($http, experimentFactory) { +angular.module('reportApp').factory('reportFactory', ['$http', 'experimentFactory', function($http, experimentFactory) { var urlBase = '/api/v1/reports'; var reportFactory = {}; @@ -43,8 +43,7 @@ app.factory('reportFactory', ['$http', 'experimentFactory', function($http, expe url: urlBase + '/' + user + '/' + report_id + '/', method: "PUT", data: reportData, - }) - + }); }; reportFactory.lockReport = function (user, report_id, url_prefix){ @@ -56,8 +55,7 @@ app.factory('reportFactory', ['$http', 'experimentFactory', function($http, expe url: urlBase + '/' + user + '/' + report_id + '/lock/', method: "POST", //data: reportData, - }) - + }); }; reportFactory.publishReport = function (url_prefix, user, report_id, reportData){ @@ -69,8 +67,7 @@ app.factory('reportFactory', ['$http', 'experimentFactory', function($http, expe url: urlBase + '/' + user + '/' + report_id + '/publish/', method: "POST", data: reportData, - }) - + }); }; reportFactory.publishReportAlgorithms = function (user, report_id, url_prefix){ @@ -82,8 +79,7 @@ app.factory('reportFactory', ['$http', 'experimentFactory', function($http, expe url: urlBase + '/' + user + '/' + report_id + '/algorithms/', method: "GET", //data: reportData, - }) - + }); }; reportFactory.removeExperiment = function (user, report_id, experiment, url_prefix){ @@ -95,8 +91,7 @@ app.factory('reportFactory', ['$http', 'experimentFactory', function($http, expe url: urlBase + '/' + user + '/' + report_id + '/remove/', method: "POST", data: experiment, - }) - + }); }; return reportFactory;