Skip to content

Commit

Permalink
Xlate role_type search param to descriptive title
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Houseknecht committed Oct 3, 2016
1 parent ec66e02 commit a58c766
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions galaxy/static/js/listApp/roleListController.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,13 +258,13 @@
.$promise.then(function(data) {
angular.forEach(data.results, function(row) {
if (row.role_type == 'ANS') {
row.display_type = 'AN';
row.display_type = 'ANS';
row.display_type_title = 'Ansible';
} else if (row.role_type == 'CON') {
row.display_type = 'CR';
row.display_type = 'CON';
row.display_type_title = 'Container Enabled';
} else if (row.role_type == 'APP') {
row.display_type = 'CA';
row.display_type = 'APP';
row.display_type_title = 'Container App';
}
});
Expand Down Expand Up @@ -485,10 +485,21 @@

function _getKeys(type, data, results) {
data.split(' ').forEach(function(key) {
results.push({
type: type,
value: key
});
if (type == 'Role Type') {
angular.forEach($scope.searchRoleTypes, function(rt) {
if (rt.value == key) {
results.push({
type: type,
value: rt.title
});
}
});
} else {
results.push({
type: type,
value: key
});
}
});
}

Expand Down

0 comments on commit a58c766

Please sign in to comment.