From 875c962f996df35ff0db66d85cb4742b579c763e Mon Sep 17 00:00:00 2001
From: Jaden Diefenbaugh <blakcap@users.noreply.github.com>
Date: Tue, 14 Mar 2017 13:47:49 +0100
Subject: [PATCH] rm unused panelExperiments from report view directives

---
 .../app/directives/view/panelExperiments.js   | 99 -------------------
 .../web/reports/templates/reports/report.html |  1 -
 2 files changed, 100 deletions(-)
 delete mode 100644 beat/web/reports/static/reports/app/directives/view/panelExperiments.js

diff --git a/beat/web/reports/static/reports/app/directives/view/panelExperiments.js b/beat/web/reports/static/reports/app/directives/view/panelExperiments.js
deleted file mode 100644
index df8bd1632..000000000
--- a/beat/web/reports/static/reports/app/directives/view/panelExperiments.js
+++ /dev/null
@@ -1,99 +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/.
- */
-
-/*
- * groupPanelExperiments
- * Desc:
- * 	displays the experiments panel of the group
- */
-angular.module('reportApp').directive("groupPanelExperiments", ['GroupsService', 'ExperimentsService', 'UrlService', function(GroupsService, ExperimentsService, UrlService){
-	return {
-		scope: {
-			group: '='
-		},
-		link: function(scope){
-			scope.experiments = ExperimentsService.experiments;
-			scope.expsNotInGroup = () => {
-				return Object.keys(ExperimentsService.experiments)
-				// exps not in group
-				.filter(e => !scope.group.experiments.includes(e))
-				// exp has compatible analyzer
-				.filter(e => scope.group.analyzer === '' || ExperimentsService.getAnalyzerFromExpName(e) === scope.group.analyzer)
-				;
-			};
-			scope.getExpDatabases = (expName) => {
-				let dbs = scope.experiments[expName].declaration.datasets;
-				return Array.from(new Set(Object.values(dbs).map(db => db.database)));
-			};
-			scope.getAnalyzerFromExpName = ExperimentsService.getAnalyzerFromExpName;
-			scope.getExpUrl = UrlService.getExperimentUrl;
-			scope.getBlockUrl = UrlService.getBlockUrl;
-			scope.getDatabaseUrl = UrlService.getDatabaseUrl;
-		},
-		template: `
-<div id="{{group.name}}-explist-heading" class="panel-heading" role="tab">
-	<h4 class="panel-title">
-		<a
-			role="button"
-			data-toggle="collapse"
-			data-parent="#{{group.name}}-explist-heading"
-			href="#collapse-{{group.name}}-explist"
-			aria-expanded="true"
-			aria-controls="collapse-{{group.name}}-explist">
-			Experiments
-		</a>
-		<i style='margin-left: 5px;' ng-if='group.analyzer.length > 0'>
-			Analyzer: <a href='{{ getBlockUrl(group.analyzer) }}'>{{ group.analyzer }}</a>
-		</i>
-	</h4>
-</div>
-<div id="collapse-{{group.name}}-explist"
-	class="panel-collapse collapse in"
-	role="tabpanel"
-	aria-labelledby="{{group.name}}-explist-heading">
-	<div class="panel-body">
-		<table ng-if='group.experiments.length > 0' class="table table-striped table-hover">
-			<thead>
-				<tr>
-					<th>Experiment</th>
-					<th>Databases</th>
-					<th>Alias</th>
-				</tr>
-			</thead>
-			<tbody>
-				<tr ng-repeat='expName in group.experiments' ng-if='experiments[expName]'>
-					<td><a href='{{ getExpUrl(expName) }}'>{{ expName }}</a></td>
-					<td>
-						<span ng-repeat='db in getExpDatabases(expName)'>
-							<a href='{{ getDatabaseUrl(db) }}'>{{ db }}</a>
-							&nbsp;
-						</span>
-					</td>
-					<td>{{ group.aliases[expName] }}</td>
-				</tr>
-			</tbody>
-		</table>
-	</div>
-</div>
-`
-	};
-}]);
diff --git a/beat/web/reports/templates/reports/report.html b/beat/web/reports/templates/reports/report.html
index 1ba856a11..295100371 100644
--- a/beat/web/reports/templates/reports/report.html
+++ b/beat/web/reports/templates/reports/report.html
@@ -128,7 +128,6 @@
     <script src="{% fingerprint "reports/app/directives/view/layout.js" %}" type="text/javascript" charset="utf-8"></script>
     <script src="{% fingerprint "reports/app/directives/view/itemContainer.js" %}" type="text/javascript" charset="utf-8"></script>
     <script src="{% fingerprint "reports/app/directives/view/panelContent.js" %}" type="text/javascript" charset="utf-8"></script>
-    <script src="{% fingerprint "reports/app/directives/view/panelExperiments.js" %}" type="text/javascript" charset="utf-8"></script>
     <script src="{% fingerprint "reports/app/directives/view/panelItems.js" %}" type="text/javascript" charset="utf-8"></script>
     <script src="{% fingerprint "reports/app/directives/view/plotItem.js" %}" type="text/javascript" charset="utf-8"></script>
     <script src="{% fingerprint "reports/app/directives/view/tableItem.js" %}" type="text/javascript" charset="utf-8"></script>
-- 
GitLab