Fix error message when clicking on unhealthy app

Fixes cloudron/box#643
This commit is contained in:
Girish Ramakrishnan
2019-07-31 11:43:14 -07:00
parent 6bfcda9fdc
commit 55892097d7
+5
View File
@@ -207,6 +207,11 @@ app.filter('activeOAuthClients', function () {
// this appears when an item in app grid is clicked
app.filter('prettyAppMessage', function () {
return function (app) {
if (app.installationState === ISTATES.INSTALLED) {
// app.health can also be null to indicate insufficient data
if (app.health === HSTATES.UNHEALTHY) return 'The app is not responding to health checks. Check the logs for any error messages.';
}
var message = app.message;
if (message === 'ETRYAGAIN') return 'The DNS record for this location is not setup correctly. Please verify your DNS settings and repair this app.';
if (message === 'DNS Record already exists') return 'The DNS record for this location already exists. Cloudron does not remove existing DNS records. Manually remove the DNS record and then click on repair.';