Skip to content

Look for kubernetes.io/description on storage classes #1147

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion app/scripts/filters/resources.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ angular.module('openshiftConsole')
})
.filter('description', function(annotationFilter) {
return function(resource) {
return annotationFilter(resource, "description");
// Prefer `openshift.io/description`, but fall back to `kubernetes.io/description`.
return annotationFilter(resource, 'openshift.io/description') ||
annotationFilter(resource, 'kubernetes.io/description');
};
})
.filter('displayName', function(annotationFilter) {
Expand Down
6 changes: 3 additions & 3 deletions app/views/directives/osc-persistent-volume-claim.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
repeat="sclass as sclass in storageClasses | toArray | filter : { metadata: { name: $select.search } } ">
<div>
<span ng-bind-html="sclass.metadata.name | highlight : $select.search"></span>
<span ng-if="sclass.parameters.type || sclass.parameters.zone || (sclass | annotation : 'description')" class="text-muted">
<span ng-if="sclass.parameters.type || sclass.parameters.zone || (sclass | description)" class="text-muted">
<small>&ndash;
<span ng-if="sclass.parameters.type">
Type: {{sclass.parameters.type}}
Expand All @@ -29,9 +29,9 @@
<span ng-if="sclass.parameters.type">|</span>
Zone: {{sclass.parameters.zone}}
</span>
<span ng-if="sclass | annotation : 'description'">
<span ng-if="sclass | description">
<span ng-if="sclass.parameters.type || sclass.parameters.zone">|</span>
{{sclass | annotation : 'description'}}
{{sclass | description}}
</span>
</small>
</span>
Expand Down
2 changes: 1 addition & 1 deletion dist/scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -13634,7 +13634,7 @@ return null;
};
}).filter("description", [ "annotationFilter", function(a) {
return function(b) {
return a(b, "description");
return a(b, "openshift.io/description") || a(b, "kubernetes.io/description");
};
} ]).filter("displayName", [ "annotationFilter", function(a) {
return function(b, c) {
Expand Down
6 changes: 3 additions & 3 deletions dist/scripts/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -7787,7 +7787,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"<ui-select-choices repeat=\"sclass as sclass in storageClasses | toArray | filter : { metadata: { name: $select.search } } \">\n" +
"<div>\n" +
"<span ng-bind-html=\"sclass.metadata.name | highlight : $select.search\"></span>\n" +
"<span ng-if=\"sclass.parameters.type || sclass.parameters.zone || (sclass | annotation : 'description')\" class=\"text-muted\">\n" +
"<span ng-if=\"sclass.parameters.type || sclass.parameters.zone || (sclass | description)\" class=\"text-muted\">\n" +
"<small>&ndash;\n" +
"<span ng-if=\"sclass.parameters.type\">\n" +
"Type: {{sclass.parameters.type}}\n" +
Expand All @@ -7796,9 +7796,9 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"<span ng-if=\"sclass.parameters.type\">|</span>\n" +
"Zone: {{sclass.parameters.zone}}\n" +
"</span>\n" +
"<span ng-if=\"sclass | annotation : 'description'\">\n" +
"<span ng-if=\"sclass | description\">\n" +
"<span ng-if=\"sclass.parameters.type || sclass.parameters.zone\">|</span>\n" +
"{{sclass | annotation : 'description'}}\n" +
"{{sclass | description}}\n" +
"</span>\n" +
"</small>\n" +
"</span>\n" +
Expand Down