Skip to content
Snippets Groups Projects
Commit 6caeae77 authored by jaden's avatar jaden
Browse files

add alias to report exp table in viewmode if 1 group, closes #47

parent 64865389
No related branches found
No related tags found
1 merge request!223Reports overhaul
......@@ -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)'>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment