Commit c3ffe446 authored by Jaden's avatar Jaden Committed by Samuel GAIST

[reports] only omit exp usernames in non-accessible exps

parent f884e08e
......@@ -60,6 +60,11 @@ angular.module('reportApp')
return ReportService.experiments.find(n => n.split('/').pop() === expName);
}
};
scope.getNoUserExpName = (eName) => {
let expName = scope.getFullExpName(eName);
const noUserName = expName.split('/').slice(1).join('/');
return noUserName;
};
scope.getAccessMap = (expName) => ReportService.accessMap[scope.getFullExpName(expName)];
scope.getAnalyzerAccessMap = (expName) => ReportService.analyzerAccessMap[scope.getFullExpName(expName)];
......@@ -146,8 +151,8 @@ angular.module('reportApp')
</span>
</td>
<td>
<a ng-if='getAccessMap(expName)' href='{{ getExpUrl(getFullExpName(expName)) }}'>{{ expName }}</a>
<span ng-if='!getAccessMap(expName)'>{{ expName }}</span>
<a ng-if='getAccessMap(expName)' href='{{ getExpUrl(getFullExpName(expName)) }}'>{{ getFullExpName(expName) }}</a>
<span ng-if='!getAccessMap(expName)' title='experiment not accessible for current user'>{{ getNoUserExpName(expName) }}</span>
</td>
<td>
<span ng-repeat='db in getExpDatabases(expName) track by db'>
......
......@@ -42,6 +42,10 @@ angular.module('reportApp').directive("groupPanelExperiments", ['GroupsService',
scope.analyzerIsAccessible = () => ReportService.analyzerAccessMap[scope.group.experiments[0]];
scope.getExpName = (expName) => scope.experiments[expName] ? expName : expName.split('/').pop();
scope.getNoUserExpName = (expName) => {
const noUserName = expName.split('/').slice(1).join('/');
return noUserName;
};
const getExp = (expName) => scope.experiments[expName] || scope.experiments[expName.split('/').pop()];
// find experiments that are not in the group but are
......@@ -145,8 +149,8 @@ angular.module('reportApp').directive("groupPanelExperiments", ['GroupsService',
<td ng-if='!isViewmode()'><input ng-model='group.aliases[expName]' ng-model-options="{ debounce: 500 }"></input></td>
<td ng-if='isViewmode()'><span>{{ group.aliases[expName] }}</span></td>
<td>
<a ng-if='accessMap[expName]' href='{{ getExpUrl(expName) }}'>{{ getExpName(expName) }}</a>
<i ng-if='!accessMap[expName]'><small>experiment not accessible for current user</small></i>
<a ng-if='accessMap[expName]' href='{{ getExpUrl(expName) }}'>{{ expName }}</a>
<span ng-if='!accessMap[expName]' title='experiment not accessible for current user'>{{ getNoUserExpName(expName) }}</span>
</td>
<td>
<span ng-repeat='db in getExpDatabases(expName)'>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment