@@ -3576,7 +3576,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
3576
3576
"<h1 class=\"contains-actions\">\n" +
3577
3577
"<div class=\"pull-right dropdown\">\n" +
3578
3578
"\n" +
3579
- "<button ng-if=\"project.metadata.name | canIAddToProject\" type=\"button\" class=\"btn btn-default hidden-xs\" ng-click=\"addToApplication()\">\n" +
3579
+ "<button ng-if=\"( project.metadata.name | canIAddToProject) && secret.data \" type=\"button\" class=\"btn btn-default hidden-xs\" ng-click=\"addToApplication()\">\n" +
3580
3580
"Add to Application\n" +
3581
3581
"</button>\n" +
3582
3582
"<button type=\"button\" class=\"dropdown-toggle btn btn-default actions-dropdown-btn hidden-xs\" data-toggle=\"dropdown\" ng-hide=\"!('secrets' | canIDoAny)\">\n" +
@@ -3586,7 +3586,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
3586
3586
"\n" +
3587
3587
"<a href=\"\" ng-if=\"project.metadata.name | canIAddToProject\" class=\"dropdown-toggle actions-dropdown-kebab visible-xs-inline\" data-toggle=\"dropdown\"><i class=\"fa fa-ellipsis-v\" aria-hidden=\"true\"></i><span class=\"sr-only\">Actions</span></a>\n" +
3588
3588
"<ul class=\"dropdown-menu dropdown-menu-right actions action-button\">\n" +
3589
- "<li ng-if=\"project.metadata.name | canIAddToProject\" class=\"visible-xs\">\n" +
3589
+ "<li ng-if=\"( project.metadata.name | canIAddToProject) && secret.data \" class=\"visible-xs\">\n" +
3590
3590
"<a href=\"\" role=\"button\" ng-click=\"addToApplication()\">Add to Application</a>\n" +
3591
3591
"</li>\n" +
3592
3592
"<li ng-if=\"'secrets' | canI : 'update'\">\n" +
@@ -3611,7 +3611,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
3611
3611
"<div class=\"resource-details\">\n" +
3612
3612
"<h2 class=\"mar-top-none\">\n" +
3613
3613
"{{secret.type}}\n" +
3614
- "<small class=\"mar-left-sm\"><a href=\"\" ng-click=\"view.showSecret = !view.showSecret\">{{view.showSecret ? \"Hide\" : \"Reveal\"}} Secret</a></small>\n" +
3614
+ "<small class=\"mar-left-sm\"><a href=\"\" ng-if=\"secret.data\" ng- click=\"view.showSecret = !view.showSecret\">{{view.showSecret ? \"Hide\" : \"Reveal\"}} Secret</a></small>\n" +
3615
3615
"</h2>\n" +
3616
3616
"<dl class=\"secret-data left\">\n" +
3617
3617
"<div ng-repeat=\"(secretDataName, secretData) in decodedSecretData\" class=\"image-source-item\">\n" +
@@ -3636,6 +3636,10 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
3636
3636
"</div>\n" +
3637
3637
"</div>\n" +
3638
3638
"</dl>\n" +
3639
+ "<div ng-if=\"!secret.data\" class=\"empty-state-message text-center\">\n" +
3640
+ "<h2>No data.</h2>\n" +
3641
+ "<p>This secret has no data.</p>\n" +
3642
+ "</div>\n" +
3639
3643
"<annotations annotations=\"secret.metadata.annotations\"></annotations>\n" +
3640
3644
"</div>\n" +
3641
3645
"</div>\n" +
0 commit comments