diff --git a/js/services.js b/js/services.js
index 1173e0e8464..e27e255dbc5 100644
--- a/js/services.js
+++ b/js/services.js
@@ -352,6 +352,8 @@ angular.module('kibana.services', [])
.to(filter.to);
case 'querystring':
return ejs.QueryFilter(ejs.QueryStringQuery(filter.query)).cache(true);
+ case 'field':
+ return ejs.QueryFilter(ejs.FieldQuery(filter.field,filter.query)).cache(true);
case 'terms':
return ejs.TermsFilter(filter.field,filter.value);
case 'exists':
diff --git a/panels/filtering/module.html b/panels/filtering/module.html
index 47a56525401..c117f34d440 100644
--- a/panels/filtering/module.html
+++ b/panels/filtering/module.html
@@ -7,7 +7,7 @@
display:inline-block;
vertical-align: top;
margin-left: 10px;
- width: 200px;
+ width: 220px;
padding: 5px 5px 0px 5px;
border: #555 1px solid;
margin: 0px 5px 5px 0px;
@@ -36,7 +36,10 @@
text-decoration: underline;
cursor: pointer;
}
-
+ .filter-apply {
+ float:right;
+ margin-bottom: 5px;
+ }
@@ -47,17 +50,29 @@
{{filterSrv.list[id].mandate}}
-
-
+
+
-
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/panels/filtering/module.js b/panels/filtering/module.js
index f06037316ae..5b450f53c5f 100644
--- a/panels/filtering/module.js
+++ b/panels/filtering/module.js
@@ -48,4 +48,13 @@ angular.module('kibana.filtering', [])
return !_.contains(['type','id','alias','mandate','active','editing'],key);
};
+ $scope.isEditable = function(filter) {
+ var uneditable = ['time'];
+ if(_.contains(uneditable,filter.type)) {
+ return false;
+ } else {
+ return true;
+ }
+ };
+
});
\ No newline at end of file
diff --git a/panels/table/module.js b/panels/table/module.js
index 4bd4d127152..e70aa387039 100644
--- a/panels/table/module.js
+++ b/panels/table/module.js
@@ -108,14 +108,14 @@ angular.module('kibana.table', [])
};
$scope.build_search = function(field,value,negate) {
- var query = field+":";
+ var query;
// This needs to be abstracted somewhere
if(_.isArray(value)) {
- query = query+"(" + _.map(value,function(v){return angular.toJson(v);}).join(" AND ") + ")";
+ query = "(" + _.map(value,function(v){return angular.toJson(v);}).join(" AND ") + ")";
} else {
- query = query+angular.toJson(value);
+ query = angular.toJson(value);
}
- filterSrv.set({type:'querystring',query:query,mandate:(negate ? 'mustNot':'must')});
+ filterSrv.set({type:'field',field:field,query:query,mandate:(negate ? 'mustNot':'must')});
$scope.panel.offset = 0;
dashboard.refresh();
};