mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
Fix stupid / buggy error handling for postinstall
This commit is contained in:
parent
b760316218
commit
b97ef045e8
2 changed files with 3 additions and 8 deletions
|
@ -102,9 +102,9 @@
|
|||
var args = data;
|
||||
// TODO: change this code
|
||||
if (uri === '/postinstall') {
|
||||
var installing = false;
|
||||
var post_installing = false;
|
||||
setInterval(function () {
|
||||
installing = true;
|
||||
post_installing = true;
|
||||
}, 1500);
|
||||
}
|
||||
|
||||
|
@ -112,8 +112,7 @@
|
|||
callbackOnFailure = function(xhr) {
|
||||
// Postinstall is a custom case, we have to wait that
|
||||
// operation is done before doing anything
|
||||
if (uri === '/postinstall') {
|
||||
if (installing) {
|
||||
if ((uri === '/postinstall') && (post_installing)) {
|
||||
interval = window.location.hostname === args.domain ? 20000 : 5000;
|
||||
checkInstall = setInterval(function () {
|
||||
c.checkInstall(function(isInstalled) {
|
||||
|
@ -124,9 +123,6 @@
|
|||
}
|
||||
});
|
||||
}, interval);
|
||||
} else {
|
||||
c.flash('fail', y18n.t('error_occured'));
|
||||
}
|
||||
}
|
||||
// Regular errors
|
||||
else {
|
||||
|
|
|
@ -141,7 +141,6 @@
|
|||
"enable": "Enable",
|
||||
"enabled": "Enabled",
|
||||
"error_modify_something": "You should modify something",
|
||||
"error_occured": "An error occurred, try again",
|
||||
"error_retrieve_feed": "Could not retrieve feed: %s. You might have a plugin prevent your browser from performing this request (or the website is down).",
|
||||
"error_select_domain": "You should indicate a domain",
|
||||
"error_server": "Server error",
|
||||
|
|
Loading…
Reference in a new issue