|
|
@@ -12,9 +12,7 @@ function (angular) {
|
|
|
var target = $scope.target;
|
|
|
if (!target) { return; }
|
|
|
|
|
|
- target.metrics = target.metrics || [{ type: 'count', id: '1' }];
|
|
|
- target.bucketAggs = target.bucketAggs || [{type: 'date_histogram', id: '2', settings: {interval: 'auto'}}];
|
|
|
- target.timeField = $scope.datasource.timeField;
|
|
|
+ $scope.queryUpdated();
|
|
|
};
|
|
|
|
|
|
$scope.getFields = function(type) {
|
|
|
@@ -39,14 +37,6 @@ function (angular) {
|
|
|
return [];
|
|
|
};
|
|
|
|
|
|
- $scope.toggleQueryMode = function () {
|
|
|
- if ($scope.target.rawQuery) {
|
|
|
- delete $scope.target.rawQuery;
|
|
|
- } else {
|
|
|
- $scope.target.rawQuery = angular.toJson($scope.datasource.queryBuilder.build($scope.target), true);
|
|
|
- }
|
|
|
- };
|
|
|
-
|
|
|
$scope.init();
|
|
|
|
|
|
});
|