diff --git a/beat/web/reports/static/reports/app/controllers/reportController.js b/beat/web/reports/static/reports/app/controllers/reportController.js index 2c4700588265357f3fc37a4666a76d2c0445e3c3..64b783d7bd56d685468883c979fbeafe2dc4f29d 100644 --- a/beat/web/reports/static/reports/app/controllers/reportController.js +++ b/beat/web/reports/static/reports/app/controllers/reportController.js @@ -21,33 +21,7 @@ */ /* reportController - * - * This controller retrieves data from the reportFactory/experimentFactory through the REST API and associates it with the $scope. - * The $scope is ultimately bound to the report view. - * - * This controller is "deprecated" - it needs to be completely removed, and should not be expanded/built upon. + * bootstraps the reports angular code by requiring the ReportService. + * NOTE: DONT add any code to this controller. */ -angular.module('reportApp').controller('reportController',['$scope', 'reportFactory', 'ReportService', function ($scope, reportFactory, ReportService){ - $scope.user; - $scope.report_id; - $scope.url_prefix; - $scope.reportFactory = reportFactory; - $scope.report = {}; - $scope.report_experiments = {}; - $scope.num_report_items = 0; - $scope.max_num = 0; - $scope.item_content = []; - $scope.table_item_content = []; - $scope.selectedObject = {}; - - $scope.init = function(user, report_id, url_prefix){ - $scope.user = user; - $scope.report_id = report_id; - $scope.url_prefix = url_prefix; - }; - - $scope.initWithReportNumber = function(report_number, url_prefix){ - $scope.report_number = report_number; - $scope.url_prefix = url_prefix; - }; -}]); +angular.module('reportApp').controller('reportController',['ReportService', function (ReportService){}]); diff --git a/beat/web/reports/templates/reports/report.html b/beat/web/reports/templates/reports/report.html index 4934e4fd5e47728564b338e6bbdb9ad607905558..a5eb70ed21fd7e60082e419ba60675ce84b8eaa5 100644 --- a/beat/web/reports/templates/reports/report.html +++ b/beat/web/reports/templates/reports/report.html @@ -140,10 +140,7 @@ {% block content %} -<div ng-app="reportApp" ng-controller="reportController" - {% if author and not report_number %}ng-init="init('{{ author }}', '{{report_name}}', '{{ URL_PREFIX }}')"{% endif %} - {% if report_number and not author %}ng-init="initWithReportNumber('{{report_number}}', '{{ URL_PREFIX }}')"{% endif %} - > +<div ng-app="reportApp" ng-controller="reportController"> {% csrf_token %} {% if report %}