event_log - entity and logging sync info

This commit is contained in:
azivner
2017-11-03 22:08:27 -04:00
parent bd71547258
commit e35c2dd4ad
10 changed files with 90 additions and 76 deletions
+5 -5
View File
@@ -108,7 +108,7 @@ $("#encryption-password-form").submit(() => {
.catch(reason => {
console.log(reason);
alert(reason);
error(reason);
});
return false;
@@ -257,7 +257,7 @@ async function changeEncryptionOnNoteHistory(noteId, encrypt) {
const result = await $.ajax({
url: baseApiUrl + 'notes-history/' + noteId + "?encryption=" + (encrypt ? 0 : 1),
type: 'GET',
error: () => alert("Error getting note history.")
error: () => error("Error getting note history.")
});
for (const row of result) {
@@ -277,7 +277,7 @@ async function changeEncryptionOnNoteHistory(noteId, encrypt) {
type: 'PUT',
contentType: 'application/json',
data: JSON.stringify(row),
error: () => alert("Error de/encrypting note history.")
error: () => error("Error de/encrypting note history.")
});
console.log('Note history ' + row.note_history_id + ' de/encrypted');
@@ -335,7 +335,7 @@ async function encryptSubTree(noteId) {
}
});
alert("Encryption finished.");
message("Encryption finished.");
}
async function decryptSubTree(noteId) {
@@ -362,7 +362,7 @@ async function decryptSubTree(noteId) {
}
});
alert("Decryption finished.");
message("Decryption finished.");
}
function updateSubTreeRecursively(noteId, updateCallback, successCallback) {
+1 -1
View File
@@ -38,6 +38,6 @@ $("#run-migration").click(() => {
$("#migration-table").append(row);
}
},
error: () => alert("Migration failed with unknown error")
error: () => error("Migration failed with unknown error")
});
});
+1 -1
View File
@@ -37,7 +37,7 @@ function showNoteHistoryDialog(noteId, noteHistoryId) {
$("#note-history-list").val(noteHistoryId).trigger('change');
}
},
error: () => alert("Error getting note history.")
error: () => error("Error getting note history.")
});
}
+1 -1
View File
@@ -70,7 +70,7 @@ function showRecentChanges() {
$("#recent-changes-dialog").append(dayEl);
}
},
error: () => alert("Error getting recent changes.")
error: () => error("Error getting recent changes.")
});
}
+3 -8
View File
@@ -6,17 +6,12 @@ function syncNow() {
if (result.success) {
checkStatus();
message("Sync finished successfully");
for (const l of result.log)
{
console.log(l);
}
message("Sync triggered.");
}
else {
alert("Sync failed");
error("Sync failed");
}
},
error: () => alert("Sync failed")
error: () => error("Sync failed")
});
}