Added global field list service for use in panel editor type ahead

This commit is contained in:
Rashid Khan
2013-04-05 10:08:00 -07:00
parent 122d94f78c
commit 68b765789a
6 changed files with 24 additions and 6 deletions
+15
View File
@@ -67,6 +67,21 @@ angular.module('kibana.services', [])
});
}
})
/* Service: fields
Provides a global list of all seen fields for use in editor panels
*/
.factory('fields', function($rootScope) {
var fields = {
list : []
}
$rootScope.$on('fields', function(event,f) {
fields.list = _.union(f.data.all,fields.list)
})
return fields;
})
.service('timer', function($timeout) {
// This service really just tracks a list of $timeout promises to give us a