Merge branch 'master' into stable

This commit is contained in:
azivner
2017-12-20 19:52:17 -05:00
28 changed files with 330 additions and 118 deletions
+7
View File
@@ -154,6 +154,7 @@ settings.addModule((async function () {
settings.addModule((async function () {
const forceFullSyncButton = $("#force-full-sync-button");
const fillSyncRowsButton = $("#fill-sync-rows-button");
forceFullSyncButton.click(async () => {
await server.post('sync/force-full-sync');
@@ -161,6 +162,12 @@ settings.addModule((async function () {
showMessage("Full sync triggered");
});
fillSyncRowsButton.click(async () => {
await server.post('sync/fill-sync-rows');
showMessage("Sync rows filled successfully");
});
return {};
})());
+11 -4
View File
@@ -20,15 +20,22 @@ const sqlConsole = (function() {
async function execute() {
const sqlQuery = queryEl.val();
const results = await server.post("sql/execute", {
const result = await server.post("sql/execute", {
query: sqlQuery
});
if (!result.success) {
showError(result.error);
return;
}
const rows = result.rows;
resultHeadEl.empty();
resultBodyEl.empty();
if (results.length > 0) {
const result = results[0];
if (rows.length > 0) {
const result = rows[0];
const rowEl = $("<tr>");
for (const key in result) {
@@ -38,7 +45,7 @@ const sqlConsole = (function() {
resultHeadEl.append(rowEl);
}
for (const result of results) {
for (const result of rows) {
const rowEl = $("<tr>");
for (const key in result) {