#98, test sync impl

This commit is contained in:
azivner
2018-07-23 10:29:17 +02:00
parent e7460ca3a9
commit a06618d851
6 changed files with 43 additions and 2 deletions

View File

@@ -192,6 +192,7 @@ addTabHandler((function() {
const $syncServerHost = $("#sync-server-host");
const $syncServerTimeout = $("#sync-server-timeout");
const $syncProxy = $("#sync-proxy");
const $testSyncButton = $("#test-sync-button");
function optionsLoaded(options) {
$syncServerHost.val(options['syncServerHost']);
@@ -209,6 +210,17 @@ addTabHandler((function() {
return false;
});
$testSyncButton.click(async () => {
const result = await server.post('sync/test');
if (result.connection === "Success") {
infoService.showMessage("Sync server handshake has been successful");
}
else {
infoService.showError("Sync server handshake failed, error: " + result.error);
}
});
return {
optionsLoaded
};