From 85eca47a9304817043a7edd3b458f1b1984dead8 Mon Sep 17 00:00:00 2001 From: Alex Corey Date: Tue, 12 Mar 2019 16:29:03 -0400 Subject: [PATCH] fixes broken documentation link --- .../shared/smart-search/smart-search.controller.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/awx/ui/client/src/shared/smart-search/smart-search.controller.js b/awx/ui/client/src/shared/smart-search/smart-search.controller.js index be3fcd3c12..2294fa474f 100644 --- a/awx/ui/client/src/shared/smart-search/smart-search.controller.js +++ b/awx/ui/client/src/shared/smart-search/smart-search.controller.js @@ -1,5 +1,6 @@ function SmartSearchController ( $scope, + $rootScope, $state, $stateParams, $transitions, @@ -111,10 +112,13 @@ function SmartSearchController ( configService.getConfig() .then(config => { let version; - - try { - [version] = config.version.split('-'); - } catch (err) { + if ($rootScope.BRAND_NAME === 'Tower') { + try { + [version] = config.version.split('-'); + } catch (err) { + version = 'latest'; + } + } else { version = 'latest'; } @@ -279,6 +283,7 @@ function SmartSearchController ( SmartSearchController.$inject = [ '$scope', + '$rootScope', '$state', '$stateParams', '$transitions',