From 7df4ccd371df1a228fe9a54686a3dbbc1267101c Mon Sep 17 00:00:00 2001 From: Jaden Diefenbaugh <blakcap@users.noreply.github.com> Date: Fri, 3 Mar 2017 14:56:46 +0100 Subject: [PATCH] move aliases to group exp list --- .../app/directives/groupPanelAliases.js | 71 ------------------- .../app/directives/groupPanelContent.js | 3 +- .../app/directives/groupPanelExperiments.js | 28 ++++++-- .../web/reports/templates/reports/report.html | 1 - 4 files changed, 22 insertions(+), 81 deletions(-) delete mode 100644 beat/web/reports/static/reports/app/directives/groupPanelAliases.js diff --git a/beat/web/reports/static/reports/app/directives/groupPanelAliases.js b/beat/web/reports/static/reports/app/directives/groupPanelAliases.js deleted file mode 100644 index 9e663b962..000000000 --- a/beat/web/reports/static/reports/app/directives/groupPanelAliases.js +++ /dev/null @@ -1,71 +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/. - */ - -/* - * groupPanelAliases - * Desc: - * displays & manages the aliases of the group - */ -angular.module('reportApp').directive("groupPanelAliases", [function(){ - return { - scope: { - group: '=' - }, - link: function(scope){ - }, - template: ` -<div id="{{group.name}}-aliaslist-heading" class="panel-heading" role="tab"> - <h4 class="panel-title"> - <a - class='' - role="button" - data-toggle="collapse" - data-parent="#{{group.name}}-aliaslist-heading" - href="#collapse-{{group.name}}-aliaslist" - aria-expanded="true" - aria-controls="collapse-{{group.name}}-aliaslist"> - Aliases - </a> - </h4> -</div> -<div id="collapse-{{group.name}}-aliaslist" - class="panel-collapse collapse in" - role="tabpanel" - aria-labelledby="{{group.name}}-aliaslist-heading"> - <table class="table table-striped table-hover"> - <thead> - <tr> - <th>Experiment</th> - <th>Alias</th> - </tr> - </thead> - <tbody> - <tr ng-repeat='(expName, alias) in group.aliases'> - <td>{{ expName }}</td> - <td><input ng-model='group.aliases[expName]'></input></td> - </tr> - </tbody> - </table> -</div> -` - } -}]); diff --git a/beat/web/reports/static/reports/app/directives/groupPanelContent.js b/beat/web/reports/static/reports/app/directives/groupPanelContent.js index f80c5ddd5..87af1610b 100644 --- a/beat/web/reports/static/reports/app/directives/groupPanelContent.js +++ b/beat/web/reports/static/reports/app/directives/groupPanelContent.js @@ -58,11 +58,10 @@ angular.module('reportApp').directive("groupPanelContent", ['GroupsService', fun <div class="panel-body panel-group"> <i ng-if='group.analyzer.length > 0'>Analyzer: {{ group.analyzer }}</i> <div group-panel-experiments group='group' class='panel panel-default'></div> - <div ng-if='group.experiments.length > 0' group-panel-aliases group='group' class='panel panel-default'></div> <div ng-if='group.experiments.length > 0' group-panel-items group='group' class='panel panel-default'></div> </div> </div> ` - } + }; }]); diff --git a/beat/web/reports/static/reports/app/directives/groupPanelExperiments.js b/beat/web/reports/static/reports/app/directives/groupPanelExperiments.js index 83c0b5e40..ada18bdbc 100644 --- a/beat/web/reports/static/reports/app/directives/groupPanelExperiments.js +++ b/beat/web/reports/static/reports/app/directives/groupPanelExperiments.js @@ -77,14 +77,28 @@ angular.module('reportApp').directive("groupPanelExperiments", ['ExperimentsServ role="tabpanel" aria-labelledby="{{group.name}}-explist-heading"> <div class="panel-body"> - <ul class='list-group'> - <li class='list-group-item' ng-repeat='exp in group.experiments'> - <button class="btn btn-danger" aria-hidden="true" ng-click='group.removeExperiment(exp)'>Remove</button> - <span>{{ exp }}</span> - </li> - </ul> + <table class="table table-striped table-hover"> + <thead> + <tr> + <th></th> + <th>Experiment</th> + <th>Alias</th> + </tr> + </thead> + <tbody> + <tr ng-repeat='expName in group.experiments'> + <td> + <button class="btn btn-danger" aria-hidden="true" ng-click='group.removeExperiment(expName)'> + Remove + </button> + </td> + <td>{{ expName }}</td> + <td><input ng-model='group.aliases[expName]'></input></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 f62b21cfe..436991622 100644 --- a/beat/web/reports/templates/reports/report.html +++ b/beat/web/reports/templates/reports/report.html @@ -119,7 +119,6 @@ <script src="{% fingerprint "reports/app/directives/groupPlotItem.js" %}" type="text/javascript" charset="utf-8"></script> <script src="{% fingerprint "reports/app/directives/groupTextItem.js" %}" type="text/javascript" charset="utf-8"></script> <script src="{% fingerprint "reports/app/directives/groupTableFieldSelector.js" %}" type="text/javascript" charset="utf-8"></script> - <script src="{% fingerprint "reports/app/directives/groupPanelAliases.js" %}" type="text/javascript" charset="utf-8"></script> <script src="{% fingerprint "reports/app/directives/groupViewSerialized.js" %}" type="text/javascript" charset="utf-8"></script> -- GitLab