Send app object to message filters

this lets us access the state of an app
This commit is contained in:
Girish Ramakrishnan
2019-07-31 11:40:16 -07:00
parent 02dcbb9a52
commit 6bfcda9fdc
2 changed files with 6 additions and 4 deletions

View File

@@ -206,7 +206,8 @@ app.filter('activeOAuthClients', function () {
// this appears when an item in app grid is clicked
app.filter('prettyAppMessage', function () {
return function (message) {
return function (app) {
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.';
return message;
@@ -215,7 +216,8 @@ app.filter('prettyAppMessage', function () {
// this appears as tool tip in app grid
app.filter('shortAppMessage', function () {
return function (message) {
return function (app) {
var message = app.message;
if (message === 'ETRYAGAIN') return 'DNS record not setup correctly';
return message;
};