mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
Revert "[fix] Reload the page after postinstall anyway"
This reverts commit c03423a6ff
.
This commit is contained in:
parent
c03423a6ff
commit
779fb1adfa
1 changed files with 15 additions and 9 deletions
24
js/app.js
24
js/app.js
|
@ -179,7 +179,7 @@ app = Sammy('#main', function (sam) {
|
||||||
c.flash('success', v);
|
c.flash('success', v);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
callback(data);
|
callback(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
loaded = true;
|
loaded = true;
|
||||||
|
@ -213,10 +213,16 @@ app = Sammy('#main', function (sam) {
|
||||||
} else {
|
} else {
|
||||||
if (uri === '/postinstall') {
|
if (uri === '/postinstall') {
|
||||||
if (installing) {
|
if (installing) {
|
||||||
setTimeout(function () {
|
interval = window.location.hostname === args.domain ? 20000 : 5000;
|
||||||
c.flash('success', y18n.t('installation_complete'));
|
checkInstall = setInterval(function () {
|
||||||
window.location.href = 'https://'+ window.location.hostname +'/yunohost/admin/';
|
c.checkInstall(function(isInstalled) {
|
||||||
}, 10000);
|
if (isInstalled || (window.location.hostname === args.domain && typeof isInstalled === 'undefined')) {
|
||||||
|
c.flash('success', y18n.t('installation_complete'));
|
||||||
|
clearInterval(checkInstall);
|
||||||
|
window.location.href = 'https://'+ window.location.hostname +'/yunohost/admin/';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}, interval);
|
||||||
} else {
|
} else {
|
||||||
c.flash('fail', y18n.t('error_occured'));
|
c.flash('fail', y18n.t('error_occured'));
|
||||||
}
|
}
|
||||||
|
@ -230,7 +236,7 @@ app = Sammy('#main', function (sam) {
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// Render view (cross-browser)
|
// Render view (cross-browser)
|
||||||
view: function (view, data, callback) {
|
view: function (view, data, callback) {
|
||||||
|
@ -432,7 +438,7 @@ app = Sammy('#main', function (sam) {
|
||||||
store.set('maindomain', domain);
|
store.set('maindomain', domain);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
sam.get('#/postinstall/password', function(c) {
|
sam.get('#/postinstall/password', function(c) {
|
||||||
|
@ -977,11 +983,11 @@ app = Sammy('#main', function (sam) {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//
|
//
|
||||||
sam.get('#/monitor', function (c) {
|
sam.get('#/monitor', function (c) {
|
||||||
monitorData = {}
|
monitorData = {}
|
||||||
|
|
||||||
// Why this method ?
|
// Why this method ?
|
||||||
c.api('/services/glances', function(data) { // ?
|
c.api('/services/glances', function(data) { // ?
|
||||||
monitorData.status = true;
|
monitorData.status = true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue