1
0
Fork 0

fixed wrong behaviour when updatating foxx repository was not successful (#4762)

This commit is contained in:
Heiko 2018-03-06 12:02:26 +01:00 committed by Jan
parent bca18a75dc
commit 4ff33c0ee2
2 changed files with 14 additions and 8 deletions

View File

@ -6,6 +6,7 @@
window.ServiceInstallView = Backbone.View.extend({ window.ServiceInstallView = Backbone.View.extend({
el: '#content', el: '#content',
readOnly: false, readOnly: false,
foxxStoreRetry: 0,
template: templateEngine.createTemplate('serviceInstallView.ejs'), template: templateEngine.createTemplate('serviceInstallView.ejs'),
@ -31,11 +32,17 @@
} }
}, },
waitForResponse: function () { fetchStore: function () {
var self = this; var self = this;
window.setTimeout(function () { this.foxxStoreRetry = 1;
self.render(); this.collection.fetch({
}, 200); cache: false,
success: function () {
if (window.location.hash === '#services/install') {
self.render();
}
}
});
}, },
search: function () { search: function () {
@ -90,8 +97,8 @@
arangoHelper.buildServicesSubNav('Store'); arangoHelper.buildServicesSubNav('Store');
this.breadcrumb(); this.breadcrumb();
if (this.collection.length === 0) { if (this.collection.length === 0 && this.foxxStoreRetry === 0) {
this.waitForResponse(); this.fetchStore();
return; return;
} }

View File

@ -160,8 +160,7 @@ var updateFishbowlFromZip = function (filename) {
} }
}); });
arangodb.printf('Updated local repository information with %d service(s)\n', require('console').log('Updated local foxx repository with ' + toSave.length + ' service(s)');
toSave.length);
} }
} catch (err) { } catch (err) {
if (tempPath !== undefined && tempPath !== '') { if (tempPath !== undefined && tempPath !== '') {