Welcome to mirror list, hosted at ThFree Co, Russian Federation.

upgrade.js « js « files « apps - github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 714adf824a1841e6a56e10822b2a436c6ad27670 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
 * Copyright (c) 2014
 *
 * This file is licensed under the Affero General Public License version 3
 * or later.
 *
 * See the COPYING-README file.
 *
 */

/* global OC */
$(document).ready(function () {
	var eventSource, total, bar = $('#progressbar');
	console.log('start');
	bar.progressbar({value: 0});
	eventSource = new OC.EventSource(OC.filePath('files', 'ajax', 'upgrade.php'));
	eventSource.listen('total', function (count) {
		total = count;
		console.log(count + ' files needed to be migrated');
	});
	eventSource.listen('count', function (count) {
		bar.progressbar({value: (count / total) * 100});
		console.log(count);
	});
	eventSource.listen('done', function () {
		document.location.reload();
	});
});