Skip to content

Commit

Permalink
Do not show "Show Annotations" link when there are none
Browse files Browse the repository at this point in the history
  • Loading branch information
jeff-phillips-18 committed Oct 5, 2017
1 parent 6ef0e8b commit f6d6886
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 31 deletions.
45 changes: 21 additions & 24 deletions app/views/directives/annotations.html
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
<p ng-class="{'mar-bottom-xl': !expandAnnotations}">
<a href="" ng-click="toggleAnnotations()" ng-if="!expandAnnotations">Show Annotations</a>
<a href="" ng-click="toggleAnnotations()" ng-if="expandAnnotations">Hide Annotations</a>
<p ng-if="annotations" ng-class="{'mar-bottom-xl': !expandAnnotations}">
<a href="" ng-click="toggleAnnotations()">{{!expandAnnotations ? 'Hide Annotations' : 'Show Annotations'}}</a>
</p>
<div ng-if="expandAnnotations">
<div ng-if="annotations" class="table-responsive scroll-shadows-horizontal">
<table class="table table-bordered table-bordered-columns key-value-table">
<tbody>
<tr ng-repeat="(annotationKey, annotationValue) in annotations">
<td class="key">{{annotationKey}}</td>
<td class="value">
<truncate-long-text
content="annotationValue | prettifyJSON"
limit="500"
newline-limit="20"
expandable="true">
</truncate-long-text>
</td>
</tr>
</tbody>
</table>
</div>
<p ng-if="!annotations" class="mar-bottom-xl">
There are no annotations on this resource.
</p>
<div ng-if="expandAnnotations && annotations" class="table-responsive scroll-shadows-horizontal">
<table class="table table-bordered table-bordered-columns key-value-table">
<tbody>
<tr ng-repeat="(annotationKey, annotationValue) in annotations">
<td class="key">{{annotationKey}}</td>
<td class="value">
<truncate-long-text
content="annotationValue | prettifyJSON"
limit="500"
newline-limit="20"
expandable="true">
</truncate-long-text>
</td>
</tr>
</tbody>
</table>
</div>
<p ng-if="!annotations" class="mar-bottom-xl">
There are no annotations on this resource.
</p>
11 changes: 4 additions & 7 deletions dist/scripts/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -5763,12 +5763,10 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(


$templateCache.put('views/directives/annotations.html',
"<p ng-class=\"{'mar-bottom-xl': !expandAnnotations}\">\n" +
"<a href=\"\" ng-click=\"toggleAnnotations()\" ng-if=\"!expandAnnotations\">Show Annotations</a>\n" +
"<a href=\"\" ng-click=\"toggleAnnotations()\" ng-if=\"expandAnnotations\">Hide Annotations</a>\n" +
"<p ng-if=\"annotations\" ng-class=\"{'mar-bottom-xl': !expandAnnotations}\">\n" +
"<a href=\"\" ng-click=\"toggleAnnotations()\">{{!expandAnnotations ? 'Hide Annotations' : 'Show Annotations'}}</a>\n" +
"</p>\n" +
"<div ng-if=\"expandAnnotations\">\n" +
"<div ng-if=\"annotations\" class=\"table-responsive scroll-shadows-horizontal\">\n" +
"<div ng-if=\"expandAnnotations && annotations\" class=\"table-responsive scroll-shadows-horizontal\">\n" +
"<table class=\"table table-bordered table-bordered-columns key-value-table\">\n" +
"<tbody>\n" +
"<tr ng-repeat=\"(annotationKey, annotationValue) in annotations\">\n" +
Expand All @@ -5783,8 +5781,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"</div>\n" +
"<p ng-if=\"!annotations\" class=\"mar-bottom-xl\">\n" +
"There are no annotations on this resource.\n" +
"</p>\n" +
"</div>"
"</p>"
);


Expand Down

0 comments on commit f6d6886

Please sign in to comment.