Filter index fields and scripted fields by name only (#10089)

This commit is contained in:
Richard Hoffman 2017-03-01 14:26:16 -08:00 committed by Joe Fleming
parent 516480b87c
commit 615e15962f
2 changed files with 4 additions and 4 deletions

View file

@ -37,10 +37,10 @@ uiModules.get('apps/management')
function refreshRows() {
// clear and destroy row scopes
_.invoke(rowScopes.splice(0), '$destroy');
const fields = filter($scope.indexPattern.getNonScriptedFields(), $scope.fieldFilter);
const fields = filter($scope.indexPattern.getNonScriptedFields(), { name: $scope.fieldFilter });
const sourceFilters = $scope.indexPattern.sourceFilters && $scope.indexPattern.sourceFilters.map(f => f.value) || [];
const fieldWildcardMatch = fieldWildcardMatcher(sourceFilters);
_.find($scope.editSections, {index: 'indexedFields'}).count = fields.length; // Update the tab count
_.find($scope.editSections, { index: 'indexedFields' }).count = fields.length; // Update the tab count
$scope.rows = fields.map(function (field) {
const childScope = _.assign($scope.$new(), { field: field });

View file

@ -40,8 +40,8 @@ uiModules.get('apps/management')
_.invoke(rowScopes, '$destroy');
rowScopes.length = 0;
const fields = filter($scope.indexPattern.getScriptedFields(), $scope.fieldFilter);
_.find($scope.editSections, {index: 'scriptedFields'}).count = fields.length; // Update the tab count
const fields = filter($scope.indexPattern.getScriptedFields(), { name: $scope.fieldFilter });
_.find($scope.editSections, { index: 'scriptedFields' }).count = fields.length; // Update the tab count
$scope.rows = fields.map(function (field) {
const rowScope = $scope.$new();