Send app object to message filters
this lets us access the state of an app
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user