Skip to content

Commit 2187dd7

Browse files
authored
Merge pull request Countly#443 from Cookiezaurs/master
[plugins][data-migration]Export tables.redirect checkbox.test timeout
2 parents 535ca53 + ed577ff commit 2187dd7

3 files changed

Lines changed: 23 additions & 6 deletions

File tree

plugins/data_migration/api/data_migration_helper.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -426,15 +426,22 @@ module.exports = function(my_db){
426426
scripts.push('mongodump ' + dbstr + ' --collection max_online_counts -q \'{ _id: ObjectId(\"' + appid + '\") }\' --out '+ my_folder);
427427
scripts.push('mongodump ' + dbstr + ' --collection events -q \'{ _id: ObjectId(\"' + appid + '\") }\' --out ' + my_folder);
428428
scripts.push('mongodump ' + dbstr + ' --collection funnels -q \'{ app_id: \"' + appid + '\" }\' --out ' + my_folder);
429-
429+
430+
//internal events
431+
for (var j=0; j<plugins.internalEvents.length; j++)
432+
{
433+
var eventCollName = "events" + crypto.createHash('sha1').update(plugins.internalEvents[j] + appid).digest('hex');
434+
scripts.push('mongodump ' + dbstr + ' --collection ' + eventCollName + ' --out ' + data.my_folder);
435+
}
436+
430437
if(plugins.isPluginEnabled('drill'))
431438
{
432439
//export drill
433-
var drill_events = ["session","view","action","push_action","push_open","push_sent","crash"]
440+
var drill_events = plugins.internalDrillEvents;
434441

435442
for (var j=0; j<drill_events.length; j++)
436443
{
437-
eventCollName = "drill_events" + crypto.createHash('sha1').update("[CLY]_"+drill_events[j] + appid).digest('hex');
444+
eventCollName = "drill_events" + crypto.createHash('sha1').update(drill_events[j] + appid).digest('hex');
438445
scripts.push('mongodump ' + dbstr_drill + ' --collection ' + eventCollName + ' --out ' + my_folder);
439446
}
440447

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,16 @@ window.DataMigrationView = countlyView.extend({
285285
$(this).addClass("selected");
286286

287287
if($(this).attr('data-from')=='export-transfer')
288+
{
288289
$('#target-server-data').css('display','block');
290+
$('#migration_redirect_traffic').css('display','block');
291+
}
289292
else
290-
$('#target-server-data').css('display','none');
293+
{
294+
$('#target-server-data').css('display','none');
295+
$('#migration_redirect_traffic').css('display','none');
296+
$('#migration_redirect_traffic').find("input").removeAttr('checked');
297+
}
291298
$("#export-widget-drawer").trigger("data-updated");
292299
});
293300

@@ -678,6 +685,7 @@ window.DataMigrationView = countlyView.extend({
678685

679686
$('#migration_additional_files').find("input").removeAttr('checked');
680687
$('#migration_redirect_traffic').find("input").removeAttr('checked');
688+
$('#migration_redirect_traffic').css('display','block');
681689
$('#target-server-data').css('display','block');
682690
$('#data-export-type-selector').find(".check[data-from=export-transfer]").addClass("selected");
683691
$('#data-export-type-selector').find(".check[data-from=export-download]").removeClass("selected");

plugins/data_migration/tests/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,8 @@ describe("Create simple export", function(){
272272
after(function( done ){
273273
//checking statuss and seeing if it moves to end
274274
counter=0;
275-
setTimeout(function(){validate_result(done,60,"finished","failed");},1000);
275+
this.timeout(0);
276+
setTimeout(function(){validate_result(done,100,"finished","failed");},1000);
276277
});
277278

278279
});
@@ -371,7 +372,8 @@ describe("Create simple export", function(){
371372
after(function( done ){
372373
//checking statuss and seeing if it moves to end
373374
counter=0;
374-
setTimeout(function(){validate_result(done,60,"finished","failed");},1000);
375+
this.timeout(0);
376+
setTimeout(function(){validate_result(done,100,"finished","failed");},1000);
375377
});
376378
});
377379

0 commit comments

Comments
 (0)