From acd3cd3f94f475db935277ae45daa91fdfc2cd40 Mon Sep 17 00:00:00 2001 From: Jakub Hadvig Date: Fri, 3 Nov 2017 13:55:41 +0100 Subject: [PATCH] Bug 1509142 - Should not display the 'Reveal Secret' link when secrets without 'data' field --- app/scripts/controllers/secret.js | 3 +++ app/views/browse/secret.html | 11 ++++++++--- dist/scripts/scripts.js | 2 +- dist/scripts/templates.js | 12 ++++++++---- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/app/scripts/controllers/secret.js b/app/scripts/controllers/secret.js index b0dd222f22..8e87760bcb 100644 --- a/app/scripts/controllers/secret.js +++ b/app/scripts/controllers/secret.js @@ -30,6 +30,9 @@ angular.module('openshiftConsole') $scope.addToApplicationVisible = false; $scope.addToApplication = function() { + if (!$scope.secret.data) { + return; + } $scope.addToApplicationVisible = true; }; diff --git a/app/views/browse/secret.html b/app/views/browse/secret.html index e0176b3443..7f9f4da4f6 100644 --- a/app/views/browse/secret.html +++ b/app/views/browse/secret.html @@ -19,6 +19,7 @@

@@ -32,8 +33,8 @@

class="dropdown-toggle actions-dropdown-kebab visible-xs-inline" data-toggle="dropdown">Actions