diff --git a/beat/web/reports/static/reports/app/directives/experimentsTable.js b/beat/web/reports/static/reports/app/directives/experimentsTable.js index a60963e389bb71dde351ecc894d26980e04e51f5..7ff2edbfbb3706554bf365bbcef3bcb17fd7e67d 100644 --- a/beat/web/reports/static/reports/app/directives/experimentsTable.js +++ b/beat/web/reports/static/reports/app/directives/experimentsTable.js @@ -44,11 +44,13 @@ angular.module('reportApp') scope.getBlockUrl = UrlService.getBlockUrl; scope.getDatabaseUrl = UrlService.getDatabaseUrl; scope.getExperimentListPath = UrlService.getExperimentListPath; - scope.isByName = UrlService.getNameSegment() ? true : false; + scope.isViewmode = UrlService.isViewmode; scope.expNames = ExperimentsService.experimentNames; scope.exps = ExperimentsService.experiments; + scope.groups = GroupsService.groups; + // collects an array of formatted databases & protocols of an experiment // format is "<database name>@<protocol name>" scope.getExpDatabases = (expName) => { @@ -83,7 +85,8 @@ angular.module('reportApp') <table ng-if='expNames.length > 0' class="table table-striped table-hover"> <thead> <tr> - <th ng-if='isByName'></th> + <th ng-if='!isViewmode()'></th> + <th ng-if='isViewmode() && groups.length == 1'>Alias</th> <th>Experiment</th> <th>Databases/Protocols</th> <th>Analyzer</th> @@ -91,17 +94,24 @@ angular.module('reportApp') </thead> <tbody> <tr ng-repeat='expName in expNames'> - <td ng-if='isByName'> + <td ng-if='!isViewmode()'> <div class='btn-group action-buttons'> <span ng-click='deleteExpFromReport(expName)' style='cursor: pointer;' class="btn-delete" - data-toggle="tooltip" data-placement="top" title="Remove Experiment from Report"> + data-toggle="tooltip" + data-placement="top" + title="Remove Experiment from Report"> <i class="fa fa-times fa-lg"></i> </span> </div> </td> + <td ng-if='isViewmode() && groups.length == 1'> + <span ng-if='groups[0].experiments.includes(expName)'> + {{ groups[0].aliases[expName] }} + </span> + </td> <td><a href='{{ getExpUrl(expName) }}'>{{ expName }}</a></td> <td> <span ng-repeat='db in getExpDatabases(expName)'>