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({
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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 !== '') {
|
||||||
|
|
Loading…
Reference in New Issue