Skip to content

Commit

Permalink
changed as per code review
Browse files Browse the repository at this point in the history
  • Loading branch information
scampi committed Oct 11, 2016
1 parent 43767f0 commit 53469d5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ uiModules
if (param.name === 'field') {
fields = $aggParamEditorsScope.indexedFields = getIndexedFields(param);
} else if (param.type === 'field') {
fields = $aggParamEditorsScope[param.name] = getIndexedFields(param);
fields = $aggParamEditorsScope[`${param.name}Options`] = getIndexedFields(param);
}

if (fields) {
Expand Down
6 changes: 3 additions & 3 deletions src/ui/public/agg_types/controls/top_sort.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
name="sortField"
required
ng-model="agg.params.sortField"
ng-show="sortField.length"
auto-select-if-only-one="sortField"
ng-options="field as field.displayName group by field.type for field in sortField">
ng-show="sortFieldOptions.length"
auto-select-if-only-one="sortFieldOptions"
ng-options="field as field.displayName group by field.type for field in sortFieldOptions">
</select>
</div>

Expand Down
5 changes: 1 addition & 4 deletions src/ui/public/agg_types/metrics/top.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ export default function AggTypeMetricTopProvider(Private) {
if (vis.type.name === 'table') {
return true;
}
if (vis.type.name === 'pie') {
return value === 'number';
}
return value === 'number' || value === 'date';
return value === 'number';
},
write(agg, output) {
output.params = {
Expand Down

0 comments on commit 53469d5

Please sign in to comment.