Skip to content

Commit

Permalink
Merge pull request #6102 from elastic/implement/es6Modules/privatePro…
Browse files Browse the repository at this point in the history
…viders

es6 modules 1 - hoist private module providers
  • Loading branch information
w33ble committed Feb 8, 2016
2 parents 94a9e65 + 13560d7 commit c8e38a6
Show file tree
Hide file tree
Showing 650 changed files with 29,012 additions and 28,882 deletions.
126 changes: 62 additions & 64 deletions src/fixtures/agg_resp/geohash_grid.js
Original file line number Diff line number Diff line change
@@ -1,83 +1,81 @@
import _ from 'lodash';
define(function (require) {
return function GeoHashGridAggResponseFixture() {
export default function GeoHashGridAggResponseFixture() {


// 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
}
}
};
});
};
38 changes: 18 additions & 20 deletions src/fixtures/fake_chart_events.js
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
}
};
Loading

0 comments on commit c8e38a6

Please sign in to comment.