diff --git a/domain-server/resources/web/content/js/content.js b/domain-server/resources/web/content/js/content.js index 12a6d4b734..1e5b6ac131 100644 --- a/domain-server/resources/web/content/js/content.js +++ b/domain-server/resources/web/content/js/content.js @@ -107,7 +107,11 @@ $(document).ready(function(){ function reloadLatestBackups() { // make a GET request to get backup information to populate the table - $.get('/api/backups', function(data) { + $.ajax({ + url: '/api/backups', + cache: false + }).done(function(data) { + // split the returned data into manual and automatic manual backups var splitBackups = _.partition(data.backups, function(value, index) { return value.isManualBackup; @@ -126,7 +130,7 @@ $(document).ready(function(){ + ""; + + "
  • Delete
  • "; } var automaticRows = ""; @@ -243,7 +247,7 @@ $(document).ready(function(){ }).always(function(){ // reload the list of content archives in case we deleted a backup // or it's no longer an available backup for some other reason - reloadContentArchives(); + reloadLatestBackups(); }); } ) @@ -295,14 +299,14 @@ $(document).ready(function(){ // post the provided archive name to ask the server to kick off a manual backup $.ajax({ type: 'POST', - url: '/api/backup', + url: '/api/backups', data: { 'name': inputValue } }).done(function(data) { // since we successfully setup a new content archive, reload the table of archives // which should show that this archive is pending creation - reloadContentArchives(); + reloadLatestBackups(); }).fail(function(jqXHR, textStatus, errorThrown) { }); diff --git a/domain-server/src/DomainServer.cpp b/domain-server/src/DomainServer.cpp index f3765f6868..c23d17ed95 100644 --- a/domain-server/src/DomainServer.cpp +++ b/domain-server/src/DomainServer.cpp @@ -1941,7 +1941,7 @@ bool DomainServer::handleHTTPRequest(HTTPConnection* connection, const QUrl& url const QString URI_ASSIGNMENT = "/assignment"; const QString URI_NODES = "/nodes"; const QString URI_SETTINGS = "/settings"; - const QString URI_ENTITY_FILE_UPLOAD = "/content/upload"; + const QString URI_CONTENT_UPLOAD = "/content/upload"; const QString URI_RESTART = "/restart"; const QString URI_API_PLACES = "/api/places"; const QString URI_API_DOMAINS = "/api/domains"; @@ -2251,7 +2251,7 @@ bool DomainServer::handleHTTPRequest(HTTPConnection* connection, const QUrl& url connection->respond(HTTPConnection::StatusCode200); return true; - } else if (url.path() == URI_ENTITY_FILE_UPLOAD) { + } else if (url.path() == URI_CONTENT_UPLOAD) { // this is an entity file upload, ask the HTTPConnection to parse the data QList formData = connection->parseFormData();