-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[es6modules] unwrap amd modules, hoist imports
- Loading branch information
Showing
473 changed files
with
28,526 additions
and
29,472 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,83 +1,81 @@ | ||
define(function (require) { | ||
return function GeoHashGridAggResponseFixture() { | ||
export default function GeoHashGridAggResponseFixture() { | ||
|
||
var _ = require('lodash'); | ||
var _ = require('lodash'); | ||
|
||
// for vis: | ||
// | ||
// vis = new Vis(indexPattern, { | ||
// type: 'tile_map', | ||
// aggs:[ | ||
// { schema: 'metric', type: 'avg', params: { field: 'bytes' } }, | ||
// { schema: 'split', type: 'terms', params: { field: '@tags', size: 10 } }, | ||
// { schema: 'segment', type: 'geohash_grid', params: { field: 'geo.coordinates', precision: 3 } } | ||
// ], | ||
// params: { | ||
// isDesaturated: true, | ||
// mapType: 'Scaled%20Circle%20Markers' | ||
// }, | ||
// }); | ||
// for vis: | ||
// | ||
// vis = new Vis(indexPattern, { | ||
// type: 'tile_map', | ||
// aggs:[ | ||
// { schema: 'metric', type: 'avg', params: { field: 'bytes' } }, | ||
// { schema: 'split', type: 'terms', params: { field: '@tags', size: 10 } }, | ||
// { schema: 'segment', type: 'geohash_grid', params: { field: 'geo.coordinates', precision: 3 } } | ||
// ], | ||
// params: { | ||
// isDesaturated: true, | ||
// mapType: 'Scaled%20Circle%20Markers' | ||
// }, | ||
// }); | ||
|
||
var geoHashCharts = _.union( | ||
_.range(48, 57), // 0-9 | ||
_.range(65, 90), // A-Z | ||
_.range(97, 122) // a-z | ||
); | ||
var geoHashCharts = _.union( | ||
_.range(48, 57), // 0-9 | ||
_.range(65, 90), // A-Z | ||
_.range(97, 122) // a-z | ||
); | ||
|
||
var totalDocCount = 0; | ||
var totalDocCount = 0; | ||
|
||
var tags = _.times(_.random(4, 20), function (i) { | ||
// random number of tags | ||
var docCount = 0; | ||
var buckets = _.times(_.random(40, 200), function () { | ||
return _.sample(geoHashCharts, 3).join(''); | ||
}) | ||
.sort() | ||
.map(function (geoHash) { | ||
var count = _.random(1, 5000); | ||
var tags = _.times(_.random(4, 20), function (i) { | ||
// random number of tags | ||
var docCount = 0; | ||
var buckets = _.times(_.random(40, 200), function () { | ||
return _.sample(geoHashCharts, 3).join(''); | ||
}) | ||
.sort() | ||
.map(function (geoHash) { | ||
var count = _.random(1, 5000); | ||
|
||
totalDocCount += count; | ||
docCount += count; | ||
|
||
return { | ||
key: geoHash, | ||
doc_count: count, | ||
1: { | ||
value: 2048 + i | ||
} | ||
}; | ||
}); | ||
totalDocCount += count; | ||
docCount += count; | ||
|
||
return { | ||
key: 'tag ' + (i + 1), | ||
doc_count: docCount, | ||
3: { | ||
buckets: buckets | ||
}, | ||
key: geoHash, | ||
doc_count: count, | ||
1: { | ||
value: 1000 + i | ||
value: 2048 + i | ||
} | ||
}; | ||
}); | ||
|
||
return { | ||
took: 3, | ||
timed_out: false, | ||
_shards: { | ||
total: 4, | ||
successful: 4, | ||
failed: 0 | ||
}, | ||
hits: { | ||
total: 298, | ||
max_score: 0.0, | ||
hits: [] | ||
key: 'tag ' + (i + 1), | ||
doc_count: docCount, | ||
3: { | ||
buckets: buckets | ||
}, | ||
aggregations: { | ||
2: { | ||
buckets: tags | ||
} | ||
1: { | ||
value: 1000 + i | ||
} | ||
}; | ||
}); | ||
|
||
return { | ||
took: 3, | ||
timed_out: false, | ||
_shards: { | ||
total: 4, | ||
successful: 4, | ||
failed: 0 | ||
}, | ||
hits: { | ||
total: 298, | ||
max_score: 0.0, | ||
hits: [] | ||
}, | ||
aggregations: { | ||
2: { | ||
buckets: tags | ||
} | ||
} | ||
}; | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,20 @@ | ||
define(function (require) { | ||
var results = {}; | ||
var results = {}; | ||
|
||
results.timeSeries = { | ||
data: { | ||
ordered: { | ||
date: true, | ||
interval: 600000, | ||
max: 1414437217559, | ||
min: 1414394017559 | ||
} | ||
}, | ||
label: 'apache', | ||
value: 44, | ||
point: { | ||
label: 'apache', | ||
x: 1414400400000, | ||
y: 44, | ||
y0: 0 | ||
results.timeSeries = { | ||
data: { | ||
ordered: { | ||
date: true, | ||
interval: 600000, | ||
max: 1414437217559, | ||
min: 1414394017559 | ||
} | ||
}; | ||
}); | ||
}, | ||
label: 'apache', | ||
value: 44, | ||
point: { | ||
label: 'apache', | ||
x: 1414400400000, | ||
y: 44, | ||
y0: 0 | ||
} | ||
}; |
Oops, something went wrong.