Skip to content

Commit

Permalink
[vis/editor] compile the agg <select>
Browse files Browse the repository at this point in the history
  • Loading branch information
Spencer Alger committed Oct 3, 2014
1 parent 2c66b99 commit 30fbfbf
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/kibana/apps/visualize/editor/agg.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,19 @@ define(function (require) {
(function setupControlManagement() {
var $editorContainer = $el.find('.vis-editor-agg-editor');

// this will contain the controls for the schema (rows or columns?), which are unrelated to
// controls for the agg, which is why they are first
var $schemaEditor = $('<div>').addClass('schemaEditors').appendTo($editorContainer);
var $aggSelect = $(aggSelectHtml).appendTo($editorContainer);
if ($scope.agg.schema.editor) {
$schemaEditor.append($scope.agg.schema.editor);
$compile($schemaEditor)(editorScope());
}

// allow selection of an aggregation
var $aggSelect = $(aggSelectHtml).appendTo($editorContainer);
$compile($aggSelect)($scope);

// params for the selected agg, these are rebuilt every time the agg changes
var $aggParamEditors;
var $aggParamEditorsScope;
$scope.$watch('agg.type', function updateAggParamEditor(newType, oldType) {
Expand Down

0 comments on commit 30fbfbf

Please sign in to comment.