From c3ffe446079734c58a91cc676dac0eef67223ad0 Mon Sep 17 00:00:00 2001 From: Jaden Date: Mon, 12 Aug 2019 08:35:37 -0700 Subject: [PATCH] [reports] only omit exp usernames in non-accessible exps --- .../static/reports/app/directives/experimentsTable.js | 9 +++++++-- .../static/reports/app/directives/panelExperiments.js | 8 ++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/beat/web/reports/static/reports/app/directives/experimentsTable.js b/beat/web/reports/static/reports/app/directives/experimentsTable.js index ac13f826..cb8e0d90 100644 --- a/beat/web/reports/static/reports/app/directives/experimentsTable.js +++ b/beat/web/reports/static/reports/app/directives/experimentsTable.js @@ -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') - {{ expName }} - {{ expName }} + {{ getFullExpName(expName) }} + {{ getNoUserExpName(expName) }} diff --git a/beat/web/reports/static/reports/app/directives/panelExperiments.js b/beat/web/reports/static/reports/app/directives/panelExperiments.js index a7dbc915..3a1b1e8f 100644 --- a/beat/web/reports/static/reports/app/directives/panelExperiments.js +++ b/beat/web/reports/static/reports/app/directives/panelExperiments.js @@ -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', {{ group.aliases[expName] }} - {{ getExpName(expName) }} - experiment not accessible for current user + {{ expName }} + {{ getNoUserExpName(expName) }} -- 2.21.0