Skip to content

Commit

Permalink
Merge branch 'master' into fix/elastic#1903
Browse files Browse the repository at this point in the history
  • Loading branch information
stormpython committed Nov 24, 2014
2 parents f1b15fb + 3642f17 commit ed42e73
Show file tree
Hide file tree
Showing 122 changed files with 1,788 additions and 1,232 deletions.
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The process for contributing to any of the Elasticsearch repositories is similar

Please make sure you have signed the [Contributor License Agreement](http://www.elasticsearch.org/contributor-agreement/). We are not asking you to assign copyright to us, but to give us the right to distribute your code without restriction. We ask this of all contributors in order to assure our users of the origin and continuing existence of the code. You only need to sign the CLA once.

### Run the tests and build process
### Testing and building

To ensure that your changes will not break other functionality, please run the test suite and build process before submitting your pull request.

Expand All @@ -20,6 +20,8 @@ Once that is complete just run:
grunt test build
```

Distributable, built packages can be found in `target/` after the build completes.

#### Development Environment Setup

- Install node.js (we recommend using [nvm](https://github.com/creationix/nvm))
Expand Down
1 change: 0 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
"gridster": "~0.5.0",
"inflection": "~1.3.5",
"jquery": "~2.1.0",
"jsonpath": "*",
"leaflet": "0.7.3",
"lesshat": "~3.0.2",
"lodash": "~2.4.1",
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
"request": "^2.40.0",
"requirejs": "~2.1.14",
"rjs-build-analysis": "0.0.3",
"tar": "^1.0.1"
"tar": "^1.0.1",
"glob": "~4.1.3"
},
"scripts": {
"test": "grunt test --use-jruby",
Expand Down
8 changes: 4 additions & 4 deletions src/kibana/components/agg_types/buckets/date_histogram.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,14 @@ define(function (require) {

if (val.min != null || val.max != null) {
output.params.extended_bounds = {
min: val.min,
max: val.max
min: moment(val.min).valueOf(),
max: moment(val.max).valueOf()
};
} else if (aggConfig.vis.indexPattern.timeFieldName) {
var tfBounds = timefilter.getBounds();
output.params.extended_bounds = {
min: tfBounds.min,
max: tfBounds.max
min: moment(tfBounds.min).valueOf(),
max: moment(tfBounds.max).valueOf()
};
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/kibana/components/agg_types/buckets/terms.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ define(function (require) {
},
params: [
{
name: 'field'
name: 'field',
scriptable: true
},
{
name: 'size',
Expand Down
4 changes: 2 additions & 2 deletions src/kibana/components/agg_types/controls/field.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
ng-options="
field as field.name group by field.type for field in aggConfig.vis.indexPattern.fields.raw
| fieldType: aggParam.filterFieldTypes
| filter: { indexed:true }
| orderBy:['type','name']
| filter: { indexed: true }
| orderBy: ['type', 'name']
">
</select>
</div>
2 changes: 1 addition & 1 deletion src/kibana/components/agg_types/param_types/field.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ define(function (require) {
}

FieldAggParam.prototype.editor = editorHtml;
FieldAggParam.prototype.scriptable = false;
FieldAggParam.prototype.filterFieldTypes = '*';


/**
* Called to serialize values for saving an aggConfig object
*
Expand Down
2 changes: 1 addition & 1 deletion src/kibana/components/config/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ define(function (require) {
description: 'Shorten long fields, for example, instead of foo.bar.baz, show f.b.baz',
},
'truncate:maxHeight': {
value: 100,
value: 115,
description: 'The maximum height that a cell in a table should occupy. Set to 0 to disable truncation.'
}
};
Expand Down
36 changes: 16 additions & 20 deletions src/kibana/components/courier/courier.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,25 @@ define(function (require) {
require('modules').get('kibana/courier')
.service('courier', function ($rootScope, Private, Promise, indexPatterns) {
function Courier() {
var courier = this;
var self = this;

var DocSource = Private(require('components/courier/data_source/doc_source'));
var SearchSource = Private(require('components/courier/data_source/search_source'));

var pendingRequests = Private(require('components/courier/_pending_requests'));

var docLooper = courier.docLooper = Private(require('components/courier/looper/doc'));
var searchLooper = courier.searchLooper = Private(require('components/courier/looper/search'));
var docLooper = self.docLooper = Private(require('components/courier/looper/doc'));
var searchLooper = self.searchLooper = Private(require('components/courier/looper/search'));

// expose some internal modules
courier.setRootSearchSource = Private(require('components/courier/data_source/_root_search_source')).set;
self.setRootSearchSource = Private(require('components/courier/data_source/_root_search_source')).set;

courier.SavedObject = Private(require('components/courier/saved_object/saved_object'));
courier.indexPatterns = indexPatterns;
courier.redirectWhenMissing = Private(require('components/courier/_redirect_when_missing'));
self.SavedObject = Private(require('components/courier/saved_object/saved_object'));
self.indexPatterns = indexPatterns;
self.redirectWhenMissing = Private(require('components/courier/_redirect_when_missing'));

courier.DocSource = DocSource;
courier.SearchSource = SearchSource;
self.DocSource = DocSource;
self.SearchSource = SearchSource;

var HastyRefresh = errors.HastyRefresh;
var Abort = errors.Abort;
Expand All @@ -36,7 +36,7 @@ define(function (require) {
*
* @chainable
*/
courier.fetchInterval = function (ms) {
self.fetchInterval = function (ms) {
searchLooper.ms(ms);
return this;
};
Expand All @@ -45,7 +45,7 @@ define(function (require) {
* Start fetching search requests on an interval
* @chainable
*/
courier.start = function () {
self.start = function () {
searchLooper.start();
return this;
};
Expand All @@ -55,7 +55,7 @@ define(function (require) {
* a promise that resembles the success of the fetch completing,
* individual errors are routed to their respective requests.
*/
courier.fetch = function () {
self.fetch = function () {
return searchLooper.run();
};

Expand All @@ -66,7 +66,7 @@ define(function (require) {
*
* @return {boolean}
*/
courier.started = function () {
self.started = function () {
return searchLooper.started();
};

Expand All @@ -77,7 +77,7 @@ define(function (require) {
*
* @chainable
*/
courier.stop = function () {
self.stop = function () {
searchLooper.stop();
return this;
};
Expand All @@ -88,7 +88,7 @@ define(function (require) {
*
* @param {string} type - the type of Source to create
*/
courier.createSource = function (type) {
self.createSource = function (type) {
switch (type) {
case 'doc':
return new DocSource();
Expand All @@ -97,15 +97,11 @@ define(function (require) {
}
};

courier.getFieldsFor = function (indexish) {
return courier.indexPatterns.getFieldsFor(indexish);
};

/**
* Abort all pending requests
* @return {[type]} [description]
*/
courier.close = function () {
self.close = function () {
searchLooper.stop();
docLooper.stop();

Expand Down
2 changes: 2 additions & 0 deletions src/kibana/components/courier/data_source/_abstract.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,8 @@ define(function (require) {
'match_all': {}
};
}
flatState.body.fields = ['*', '_source'];


/**
* Create a filter that can be reversed for filters with negate set
Expand Down
5 changes: 2 additions & 3 deletions src/kibana/components/courier/data_source/doc_source.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,15 @@ define(function (require) {
var VersionConflict = errors.VersionConflict;
var RequestFailure = errors.RequestFailure;

_(DocSource).inherits(SourceAbstract);
function DocSource(initialState) {
SourceAbstract.call(this, initialState);
DocSource.Super.call(this, initialState);

// move onResults over to onUpdate, because that makes more sense
this.onUpdate = this.onResults;
this.onResults = void 0;
}

inherits(DocSource, SourceAbstract);

/*****
* PUBLIC API
*****/
Expand Down
Loading

0 comments on commit ed42e73

Please sign in to comment.