From 63ebfd98527768ae436b81e776b1927b490b3527 Mon Sep 17 00:00:00 2001 From: Rashid Khan Date: Wed, 12 Feb 2014 15:05:34 -0700 Subject: [PATCH 1/2] Add default jshint grunt task. Remove promise from mapper --- src/courier/mapper.js | 6 ++++-- tasks/config/jshint.js | 19 +++++++++++++++++++ tasks/default.js | 4 ++++ 3 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 tasks/config/jshint.js create mode 100644 tasks/default.js diff --git a/src/courier/mapper.js b/src/courier/mapper.js index 77281bc89f427..b580d7c841476 100644 --- a/src/courier/mapper.js +++ b/src/courier/mapper.js @@ -8,14 +8,16 @@ define(function (require) { */ function Mapper(index, type) { this.indices = function () { - return new Promise(function (resolve, reject) { - }); }; this.getFields = function () { }; + + this.getFieldType = function (field, type) { + return field, type; + }; } return Mapper; diff --git a/tasks/config/jshint.js b/tasks/config/jshint.js new file mode 100644 index 0000000000000..52b2b6accd324 --- /dev/null +++ b/tasks/config/jshint.js @@ -0,0 +1,19 @@ +module.exports = function(config) { + return { + // just lint the source dir + source: { + files: { + src: ['Gruntfile.js', '<%= root %>/src/**/*.js'] + } + }, + options: { + jshintrc: '<%= root %>/.jshintrc', + ignores: [ + 'node_modules/*', + 'dist/*', + 'sample/*', + '<%= root %>/src/bower_components/**/*' + ] + } + }; +}; \ No newline at end of file diff --git a/tasks/default.js b/tasks/default.js new file mode 100644 index 0000000000000..6846cfd851a97 --- /dev/null +++ b/tasks/default.js @@ -0,0 +1,4 @@ +// Lint and build CSS +module.exports = function(grunt) { + grunt.registerTask('default', ['jshint:source']); +}; \ No newline at end of file From c608bfa141ebe4622b97ff1253be9b28025a6834 Mon Sep 17 00:00:00 2001 From: Rashid Khan Date: Wed, 12 Feb 2014 15:31:27 -0700 Subject: [PATCH 2/2] Point courier-test at _all --- src/kibana/controllers/kibana.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kibana/controllers/kibana.js b/src/kibana/controllers/kibana.js index 00aea06b7e5a3..4d48c8f6d9fb6 100644 --- a/src/kibana/controllers/kibana.js +++ b/src/kibana/controllers/kibana.js @@ -4,7 +4,7 @@ define(function (require) { angular.module('kibana/controllers') .controller('Kibana', function (courier, $scope, $rootScope) { $rootScope.dataSource = courier.createSource() - .index('logstash-2014.02.13') + .index('_all') .size(5); setTimeout(courier.start, 15);