Current Path : /storage/v11800/testtest/public_html/wp-content/plugins/post-smtp/script/ |
Linux v11800 5.3.0-1023-aws #25~18.04.1-Ubuntu SMP Fri Jun 5 15:19:18 UTC 2020 aarch64
|
Current File : /storage/v11800/testtest/public_html/wp-content/plugins/post-smtp/script/logs-migration.js |
jQuery( document ).ready( function() {
var security = jQuery( '.ps-security' ).val();
migrateLogs();
function migrateLogs() {
jQuery.ajax({
method: 'POST',
url: ajaxurl,
data: {
action: 'ps-migrate-logs',
security: security
},
success: function( response ) {
var max = jQuery( '#ps-migration-progress' ).attr( 'max' );
var migrated = response.data.migrated;
jQuery( '#ps-migration-progress' ).val( migrated );
jQuery( '#ps-progress' ).html( `${migrated}/ ${max}` );
if( max == migrated ) {
jQuery( '#ps-migration-progress' ).val( max );
jQuery( '.ps-migration-box' ).slideUp();
location.reload()
}
else if( response.data.migrated ) {
jQuery('#ps-email-log').DataTable().ajax.reload();
migrateLogs();
}
}
});
}
} );