Skip to content
Snippets Groups Projects
Commit 07400103 authored by Jaden Diefenbaugh's avatar Jaden Diefenbaugh
Browse files

rm static data files and assoc helpers

parent 4f3beb31
No related branches found
No related tags found
1 merge request!223Reports overhaul
......@@ -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;
};
......
[
{
"identifier": "table",
"name": "Table",
"description": "Compare elements in a table"
},
{
"identifier": "plot",
"name": "Figure",
"description": "Compare graphical elements (ROC, bar plots, etc.)"
}
]
[
{
"identifier": "tableresults",
"name": "Results",
"description": "Only compare experiments results"
}
]
/*
* 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
};
});
......@@ -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 %}
......
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