Merge branch '664-layergroup-stats' of github.com:CartoDB/Windshaft-cartodb into 664-layergroup-stats
This commit is contained in:
@@ -5,13 +5,13 @@ function StatsBackend() {
|
||||
|
||||
module.exports = StatsBackend;
|
||||
|
||||
StatsBackend.prototype.getStats = function(mapConfig, params, dbConnection, callback) {
|
||||
StatsBackend.prototype.getStats = function(mapConfig, dbConnection, callback) {
|
||||
var enabledFeatures = global.environment.enabledFeatures;
|
||||
var layerStatsEnabled = enabledFeatures ? enabledFeatures.layerStats: false;
|
||||
if (layerStatsEnabled) {
|
||||
var layerStats = windshaftStats();
|
||||
layerStats.getStats(mapConfig, params, dbConnection, callback);
|
||||
layerStats.getStats(mapConfig, dbConnection, callback);
|
||||
} else {
|
||||
callback(null, null);
|
||||
return callback(null, null);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -367,7 +367,7 @@ function(req, res, mapconfig, layergroup, analysesResults, rendererParams, callb
|
||||
function fetchLayersStats(err) {
|
||||
assert.ifError(err);
|
||||
var next = this;
|
||||
self.statsBackend.getStats(mapconfig, rendererParams, dbConnection, function(err, layersStats) {
|
||||
self.statsBackend.getStats(mapconfig, dbConnection, function(err, layersStats) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@
|
||||
"turbo-carto": "0.19.0",
|
||||
"underscore": "~1.6.0",
|
||||
"windshaft": "cartodb/windshaft#515efb2d9237a1511b81a61fd6f7524184df38ea",
|
||||
"windshaft-stats": "cartodb/windshaft-stats#5f41e0a69763692f45f76cbae7f1e784186e1e7d",
|
||||
"windshaft-stats": "cartodb/windshaft-stats#16a973ba9addf88312ba92047e41108be2c3434f",
|
||||
"yargs": "~5.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -1532,7 +1532,7 @@ pg-types@1.*:
|
||||
postgres-date "~1.0.0"
|
||||
postgres-interval "~1.0.0"
|
||||
|
||||
pg@cartodb/node-postgres#6.1.2-cdb1:
|
||||
pg@cartodb/node-postgres#6.1.2-cdb1, "pg@github:cartodb/node-postgres#6.1.2-cdb1":
|
||||
version "6.1.2"
|
||||
resolved "https://codeload.github.com/cartodb/node-postgres/tar.gz/3c81aea432ce58d20a795786c58bbb14f68f9689"
|
||||
dependencies:
|
||||
@@ -2288,14 +2288,13 @@ window-size@^0.2.0:
|
||||
version "0.2.0"
|
||||
resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075"
|
||||
|
||||
windshaft-stats@cartodb/windshaft-stats#5f41e0a69763692f45f76cbae7f1e784186e1e7d:
|
||||
windshaft-stats@cartodb/windshaft-stats#16a973ba9addf88312ba92047e41108be2c3434f:
|
||||
version "0.0.1"
|
||||
resolved "https://codeload.github.com/cartodb/windshaft-stats/tar.gz/5f41e0a69763692f45f76cbae7f1e784186e1e7d"
|
||||
resolved "https://codeload.github.com/cartodb/windshaft-stats/tar.gz/16a973ba9addf88312ba92047e41108be2c3434f"
|
||||
dependencies:
|
||||
cartodb-psql "~0.8.0"
|
||||
d3-queue "~3.0.5"
|
||||
debug "~2.6.6"
|
||||
step "~1.0.0"
|
||||
|
||||
windshaft@cartodb/windshaft#515efb2d9237a1511b81a61fd6f7524184df38ea:
|
||||
version "3.1.3"
|
||||
|
||||
Reference in New Issue
Block a user