app.error is now an object
This commit is contained in:
@@ -221,7 +221,7 @@ app.filter('prettyAppMessage', function () {
|
||||
if (app.health === HSTATES.UNHEALTHY) return 'The app is not responding to health checks. Check the logs for any error messages.';
|
||||
}
|
||||
|
||||
var message = app.errorMessage;
|
||||
var message = app.error ? app.error.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.';
|
||||
return message;
|
||||
@@ -231,7 +231,7 @@ app.filter('prettyAppMessage', function () {
|
||||
// this appears as tool tip in app grid
|
||||
app.filter('shortAppMessage', function () {
|
||||
return function (app) {
|
||||
var message = app.errorMessage;
|
||||
var message = app.error ? app.error.message : '';
|
||||
if (message === 'ETRYAGAIN') return 'DNS record not setup correctly';
|
||||
return message;
|
||||
};
|
||||
@@ -294,12 +294,6 @@ app.filter('installationActive', function () {
|
||||
|
||||
// this appears in the app grid
|
||||
app.filter('installationStateLabel', function() {
|
||||
// for better DNS errors
|
||||
function detailedError(app) {
|
||||
if (app.errorMessage === 'ETRYAGAIN') return 'DNS Error';
|
||||
return 'Error';
|
||||
}
|
||||
|
||||
return function(app) {
|
||||
var waiting = app.progress === 0 ? ' (Queued)' : '';
|
||||
|
||||
@@ -312,7 +306,9 @@ app.filter('installationStateLabel', function() {
|
||||
case ISTATES.PENDING_RESTORE: return 'Restoring' + waiting;
|
||||
case ISTATES.PENDING_UPDATE: return 'Updating' + waiting;
|
||||
case ISTATES.PENDING_BACKUP: return 'Backing up' + waiting;
|
||||
case ISTATES.ERROR: return detailedError(app);
|
||||
case ISTATES.ERROR:
|
||||
if (app.error && app.error.message === 'ETRYAGAIN') return 'DNS Error';
|
||||
return 'Error';
|
||||
case ISTATES.INSTALLED: {
|
||||
if (app.debugMode) {
|
||||
return app.debugMode.readonlyRootfs ? 'Paused (Repair)' : 'Paused (Debug)';
|
||||
|
||||
Reference in New Issue
Block a user