Commit 632b2abb by Rashid Khan

Fixed config.timefield references

parent ce5273b7
...@@ -29,7 +29,7 @@ angular.module('kibana.hits', []) ...@@ -29,7 +29,7 @@ angular.module('kibana.hits', [])
var results = request var results = request
.query(ejs.FilteredQuery( .query(ejs.FilteredQuery(
ejs.QueryStringQuery($scope.panel.query || '*'), ejs.QueryStringQuery($scope.panel.query || '*'),
ejs.RangeFilter(config.timefield) ejs.RangeFilter($scope.time.field)
.from($scope.time.from) .from($scope.time.from)
.to($scope.time.to) .to($scope.time.to)
) )
......
...@@ -38,7 +38,7 @@ angular.module('kibana.map', []) ...@@ -38,7 +38,7 @@ angular.module('kibana.map', [])
.facetFilter(ejs.QueryFilter( .facetFilter(ejs.QueryFilter(
ejs.FilteredQuery( ejs.FilteredQuery(
ejs.QueryStringQuery($scope.panel.query || '*'), ejs.QueryStringQuery($scope.panel.query || '*'),
ejs.RangeFilter(config.timefield) ejs.RangeFilter($scope.time.field)
.from($scope.time.from) .from($scope.time.from)
.to($scope.time.to) .to($scope.time.to)
)))).size(0) )))).size(0)
......
...@@ -70,7 +70,7 @@ angular.module('kibana.pie', []) ...@@ -70,7 +70,7 @@ angular.module('kibana.pie', [])
_.each($scope.panel.query, function(v) { _.each($scope.panel.query, function(v) {
queries.push(ejs.FilteredQuery( queries.push(ejs.FilteredQuery(
ejs.QueryStringQuery(v.query || '*'), ejs.QueryStringQuery(v.query || '*'),
ejs.RangeFilter(config.timefield) ejs.RangeFilter($scope.time.field)
.from($scope.time.from) .from($scope.time.from)
.to($scope.time.to)) .to($scope.time.to))
) )
...@@ -110,7 +110,7 @@ angular.module('kibana.pie', []) ...@@ -110,7 +110,7 @@ angular.module('kibana.pie', [])
.facetFilter(ejs.QueryFilter( .facetFilter(ejs.QueryFilter(
ejs.FilteredQuery( ejs.FilteredQuery(
ejs.QueryStringQuery($scope.panel.query.query || '*'), ejs.QueryStringQuery($scope.panel.query.query || '*'),
ejs.RangeFilter(config.timefield) ejs.RangeFilter($scope.time.field)
.from($scope.time.from) .from($scope.time.from)
.to($scope.time.to) .to($scope.time.to)
.cache(false) .cache(false)
...@@ -138,7 +138,7 @@ angular.module('kibana.pie', []) ...@@ -138,7 +138,7 @@ angular.module('kibana.pie', [])
} else { } else {
var results = request var results = request
.query(ejs.QueryStringQuery($scope.panel.query.query || '*')) .query(ejs.QueryStringQuery($scope.panel.query.query || '*'))
.filter(ejs.RangeFilter(config.timefield) .filter(ejs.RangeFilter($scope.time.field)
.from($scope.time.from) .from($scope.time.from)
.to($scope.time.to) .to($scope.time.to)
.cache(false)) .cache(false))
......
...@@ -4,7 +4,7 @@ angular.module('kibana.sort', []) ...@@ -4,7 +4,7 @@ angular.module('kibana.sort', [])
// Set and populate defaults // Set and populate defaults
var _d = { var _d = {
label : "Sort", label : "Sort",
sort : [config.timefield,'desc'], sort : ['_score','desc'],
group : "default" group : "default"
} }
_.defaults($scope.panel,_d); _.defaults($scope.panel,_d);
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</form> </form>
</div> </div>
<div ng-switch-when="true"> <div ng-switch-when="true">
<form ng-class="{form-inline: panel.multi_arrange == 'horizontal'}" style="width:100%;" > <form ng-class="{'form-inline': panel.multi_arrange == 'horizontal'}" style="width:100%;" >
<span ng-repeat="q in panel.query"> <span ng-repeat="q in panel.query">
<span class="input-append" style="margin-bottom:0px;margin-right:5px"> <span class="input-append" style="margin-bottom:0px;margin-right:5px">
<button class="btn btn-danger" type="submit" style="width:50px;margin-left:-50px;visibility:hidden"></button> <button class="btn btn-danger" type="submit" style="width:50px;margin-left:-50px;visibility:hidden"></button>
......
...@@ -6,7 +6,7 @@ angular.module('kibana.stringquery', []) ...@@ -6,7 +6,7 @@ angular.module('kibana.stringquery', [])
label : "Search", label : "Search",
query : "*", query : "*",
size : 100, size : 100,
sort : [config.timefield,'desc'], sort : ['_score','desc'],
group : "default", group : "default",
multi : false, multi : false,
multi_arrange: 'horizontal', multi_arrange: 'horizontal',
......
...@@ -82,7 +82,7 @@ angular.module('kibana.table', []) ...@@ -82,7 +82,7 @@ angular.module('kibana.table', [])
var results = request var results = request
.query(ejs.FilteredQuery( .query(ejs.FilteredQuery(
ejs.QueryStringQuery($scope.panel.query || '*'), ejs.QueryStringQuery($scope.panel.query || '*'),
ejs.RangeFilter(config.timefield) ejs.RangeFilter($scope.time.field)
.from($scope.time.from) .from($scope.time.from)
.to($scope.time.to) .to($scope.time.to)
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment