diff --git a/beat/web/reports/static/reports/app/controllers/reportController.js b/beat/web/reports/static/reports/app/controllers/reportController.js index c88a986700d4371ff63a94ffb5bd491e23d71828..677bc851802146d3e159a968ee162c529dded75a 100644 --- a/beat/web/reports/static/reports/app/controllers/reportController.js +++ b/beat/web/reports/static/reports/app/controllers/reportController.js @@ -27,7 +27,7 @@ * * This controller is "deprecated" - it needs to be completely removed, and should not be expanded/built upon. */ -angular.module('reportApp').controller('reportController',['$scope', 'reportFactory', 'experimentFactory', 'plotterFactory', 'dataFactory', '$q', 'ReportService', function ($scope, reportFactory, experimentFactory, plotterFactory, dataFactory, $q, ReportService){ +angular.module('reportApp').controller('reportController',['$scope', 'reportFactory', function ($scope, reportFactory){ $scope.q = $q; $scope.user; $scope.report_id; @@ -41,13 +41,13 @@ angular.module('reportApp').controller('reportController',['$scope', 'reportFact $scope.table_item_content = []; $scope.selectedObject = {}; - $scope.init = function(user, report_id, url_prefix, data_itemcontent_file, data_table_itemcontent_file){ + $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, data_itemcontent_file, data_table_itemcontent_file){ + $scope.initWithReportNumber = function(report_number, url_prefix){ $scope.report_number = report_number; $scope.url_prefix = url_prefix; }; diff --git a/beat/web/reports/static/reports/app/data/itemcontent.json b/beat/web/reports/static/reports/app/data/itemcontent.json deleted file mode 100644 index 297831665fdde6e7bf49f9756e1f9e6c697617a8..0000000000000000000000000000000000000000 --- a/beat/web/reports/static/reports/app/data/itemcontent.json +++ /dev/null @@ -1,12 +0,0 @@ -[ - { - "identifier": "table", - "name": "Table", - "description": "Compare elements in a table" - }, - { - "identifier": "plot", - "name": "Figure", - "description": "Compare graphical elements (ROC, bar plots, etc.)" - } -] diff --git a/beat/web/reports/static/reports/app/data/table_itemcontent.json b/beat/web/reports/static/reports/app/data/table_itemcontent.json deleted file mode 100644 index 13e37560096b4947b4c0a316a0bb9f71a7698260..0000000000000000000000000000000000000000 --- a/beat/web/reports/static/reports/app/data/table_itemcontent.json +++ /dev/null @@ -1,7 +0,0 @@ -[ - { - "identifier": "tableresults", - "name": "Results", - "description": "Only compare experiments results" - } -] diff --git a/beat/web/reports/static/reports/app/factories/dataFactory.js b/beat/web/reports/static/reports/app/factories/dataFactory.js deleted file mode 100644 index aeb3cb67ffdca308685f23cce6ebcc15bddd0275..0000000000000000000000000000000000000000 --- a/beat/web/reports/static/reports/app/factories/dataFactory.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/ - * Contact: beat.support@idiap.ch - * - * This file is part of the beat.web module of the BEAT platform. - * - * Commercial License Usage - * Licensees holding valid commercial BEAT licenses may use this file in - * accordance with the terms contained in a written agreement between you - * and Idiap. For further information contact tto@idiap.ch - * - * Alternatively, this file may be used under the terms of the GNU Affero - * Public License version 3 as published by the Free Software and appearing - * in the file LICENSE.AGPL included in the packaging of this file. - * The BEAT platform is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the GNU Affero Public License along - * 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 -angular.module('reportApp').factory('dataFactory', function($http){ - let getData = function (URL) { - //return $http.get(URL + 'itemcontent.json'); - let obj = {content:null}; - //return $http.get(URL); - $http.get(URL).success(function(data){ - obj.content = data; - }); - - return obj; - }; - - return { - getData: getData - }; -}); diff --git a/beat/web/reports/templates/reports/report.html b/beat/web/reports/templates/reports/report.html index 333730fdc42b4b078febd6fe738516d03db11038..ed18936f930f7e4535a679ea940a11bf0b667ee8 100644 --- a/beat/web/reports/templates/reports/report.html +++ b/beat/web/reports/templates/reports/report.html @@ -82,7 +82,6 @@ <script src="{% fingerprint "reports/app/factories/reportFactory.js" %}" type="text/javascript" charset="utf-8"></script> <script src="{% fingerprint "reports/app/factories/experimentFactory.js" %}" type="text/javascript" charset="utf-8"></script> <script src="{% fingerprint "reports/app/factories/plotterFactory.js" %}" type="text/javascript" charset="utf-8"></script> - <script src="{% fingerprint "reports/app/factories/dataFactory.js" %}" type="text/javascript" charset="utf-8"></script> <!-- services --> <script src="{% fingerprint "reports/app/services/groupsService.js" %}" type="text/javascript" charset="utf-8"></script> @@ -135,10 +134,10 @@ {% block content %} {% if author %} - <div class="col-sm-12" ng-app="reportApp" ng-controller="reportController" ng-init="init('{{ author }}', '{{report_name}}', '{{ URL_PREFIX }}', '{% fingerprint "reports/app/data/itemcontent.json" %}', '{% fingerprint "reports/app/data/table_itemcontent.json" %}')"> + <div class="col-sm-12" ng-app="reportApp" ng-controller="reportController" ng-init="init('{{ author }}', '{{report_name}}', '{{ URL_PREFIX }}')"> {% endif %} {% if report_number %} - <div class="col-sm-12" ng-app="reportApp" ng-controller="reportController" ng-init="initWithReportNumber('{{report_number}}', '{{ URL_PREFIX }}', '{% fingerprint "reports/app/data/itemcontent.json" %}', '{% fingerprint "reports/app/data/table_itemcontent.json" %}')"> + <div class="col-sm-12" ng-app="reportApp" ng-controller="reportController" ng-init="initWithReportNumber('{{report_number}}', '{{ URL_PREFIX }}')"> {% endif %} {% csrf_token %}