Skip to content

Commit 185eea8

Browse files
committed
[sources] update default config setting
1 parent d576213 commit 185eea8

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

plugins/sources/api/api.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ var utmTags = ["_ga", "_gac", "utm_source", "utm_medium", "utm_campaign", "utm_t
2222

2323

2424
(function(plugin) {
25+
plugins.setConfigs("sources", {
26+
sources_length_limit: 100
27+
});
28+
2529
plugin.urlParser = function(url) {
2630
var qIndex = url.indexOf("?");
2731
var path = qIndex > 0 ? url.substring(0, qIndex) : url;
@@ -89,8 +93,6 @@ var utmTags = ["_ga", "_gac", "utm_source", "utm_medium", "utm_campaign", "utm_t
8993
return processedURL;
9094
};
9195

92-
93-
9496
plugins.register("/worker", function() {
9597
common.dbUserMap.source = 'src';
9698
});
@@ -115,7 +117,7 @@ var utmTags = ["_ga", "_gac", "utm_source", "utm_medium", "utm_campaign", "utm_t
115117
params.qstring.metrics._store = common.db.encode(params.qstring.metrics._store);
116118
}
117119
var sourcesConfig = plugins.getConfig("sources", params.app && params.app.plugins, true) || {};
118-
var sources_length_limit = (sourcesConfig.sources_length_limit && parseInt(sourcesConfig.sources_length_limit)) || 1000;
120+
var sources_length_limit = (sourcesConfig.sources_length_limit && parseInt(sourcesConfig.sources_length_limit, 10)) || 100;
119121
params.qstring.metrics._store = params.qstring.metrics._store.substring(0, sources_length_limit);
120122
predefinedMetrics.push({
121123
db: "sources",

plugins/sources/frontend/public/javascripts/countly.views.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ app.addAppManagementView('sources', jQuery.i18n.map['sources.title'], window.cou
251251

252252
resetTemplateData: function() {
253253
this.templateData = {
254-
sources_length_limit: this.config().sources_length_limit || 1000
254+
sources_length_limit: this.config().sources_length_limit || 100
255255
};
256256
},
257257

0 commit comments

Comments
 (0)