mirror of https://gitee.com/bigwinds/arangodb
fixed wrong behaviour when updatating foxx repository was not successful (#4763)
This commit is contained in:
parent
f9a45032cd
commit
a9ce6f8d9a
|
@ -6,6 +6,7 @@
|
|||
window.ServiceInstallView = Backbone.View.extend({
|
||||
el: '#content',
|
||||
readOnly: false,
|
||||
foxxStoreRetry: 0,
|
||||
|
||||
template: templateEngine.createTemplate('serviceInstallView.ejs'),
|
||||
|
||||
|
@ -31,11 +32,17 @@
|
|||
}
|
||||
},
|
||||
|
||||
waitForResponse: function () {
|
||||
fetchStore: function () {
|
||||
var self = this;
|
||||
window.setTimeout(function () {
|
||||
self.render();
|
||||
}, 200);
|
||||
this.foxxStoreRetry = 1;
|
||||
this.collection.fetch({
|
||||
cache: false,
|
||||
success: function () {
|
||||
if (window.location.hash === '#services/install') {
|
||||
self.render();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
search: function () {
|
||||
|
@ -90,8 +97,8 @@
|
|||
arangoHelper.buildServicesSubNav('Store');
|
||||
this.breadcrumb();
|
||||
|
||||
if (this.collection.length === 0) {
|
||||
this.waitForResponse();
|
||||
if (this.collection.length === 0 && this.foxxStoreRetry === 0) {
|
||||
this.fetchStore();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -160,8 +160,7 @@ var updateFishbowlFromZip = function (filename) {
|
|||
}
|
||||
});
|
||||
|
||||
arangodb.printf('Updated local repository information with %d service(s)\n',
|
||||
toSave.length);
|
||||
require('console').log('Updated local foxx repository with ' + toSave.length + ' service(s)');
|
||||
}
|
||||
} catch (err) {
|
||||
if (tempPath !== undefined && tempPath !== '') {
|
||||
|
|
Loading…
Reference in New Issue