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') ...@@ -60,6 +60,11 @@ angular.module('reportApp')
return ReportService.experiments.find(n => n.split('/').pop() === expName); 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.getAccessMap = (expName) => ReportService.accessMap[scope.getFullExpName(expName)];
scope.getAnalyzerAccessMap = (expName) => ReportService.analyzerAccessMap[scope.getFullExpName(expName)]; scope.getAnalyzerAccessMap = (expName) => ReportService.analyzerAccessMap[scope.getFullExpName(expName)];
...@@ -146,8 +151,8 @@ angular.module('reportApp') ...@@ -146,8 +151,8 @@ angular.module('reportApp')
</span> </span>
</td> </td>
<td> <td>
<a ng-if='getAccessMap(expName)' href='{{ getExpUrl(getFullExpName(expName)) }}'>{{ expName }}</a> <a ng-if='getAccessMap(expName)' href='{{ getExpUrl(getFullExpName(expName)) }}'>{{ getFullExpName(expName) }}</a>
<span ng-if='!getAccessMap(expName)'>{{ expName }}</span> <span ng-if='!getAccessMap(expName)' title='experiment not accessible for current user'>{{ getNoUserExpName(expName) }}</span>
</td> </td>
<td> <td>
<span ng-repeat='db in getExpDatabases(expName) track by db'> <span ng-repeat='db in getExpDatabases(expName) track by db'>
......
...@@ -42,6 +42,10 @@ angular.module('reportApp').directive("groupPanelExperiments", ['GroupsService', ...@@ -42,6 +42,10 @@ angular.module('reportApp').directive("groupPanelExperiments", ['GroupsService',
scope.analyzerIsAccessible = () => ReportService.analyzerAccessMap[scope.group.experiments[0]]; scope.analyzerIsAccessible = () => ReportService.analyzerAccessMap[scope.group.experiments[0]];
scope.getExpName = (expName) => scope.experiments[expName] ? expName : expName.split('/').pop(); 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()]; const getExp = (expName) => scope.experiments[expName] || scope.experiments[expName.split('/').pop()];
// find experiments that are not in the group but are // find experiments that are not in the group but are
...@@ -145,8 +149,8 @@ angular.module('reportApp').directive("groupPanelExperiments", ['GroupsService', ...@@ -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()'><input ng-model='group.aliases[expName]' ng-model-options="{ debounce: 500 }"></input></td>
<td ng-if='isViewmode()'><span>{{ group.aliases[expName] }}</span></td> <td ng-if='isViewmode()'><span>{{ group.aliases[expName] }}</span></td>
<td> <td>
<a ng-if='accessMap[expName]' href='{{ getExpUrl(expName) }}'>{{ getExpName(expName) }}</a> <a ng-if='accessMap[expName]' href='{{ getExpUrl(expName) }}'>{{ expName }}</a>
<i ng-if='!accessMap[expName]'><small>experiment not accessible for current user</small></i> <span ng-if='!accessMap[expName]' title='experiment not accessible for current user'>{{ getNoUserExpName(expName) }}</span>
</td> </td>
<td> <td>
<span ng-repeat='db in getExpDatabases(expName)'> <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