diff --git a/src/js/index.js b/src/js/index.js index 0aa653b30..c44faa21e 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -285,7 +285,7 @@ app.filter('prettyDiskSize', function () { }); app.filter('installationActive', function () { - return function(app) { + return function (app) { if (app.installationState === ISTATES.ERROR) return false; if (app.installationState === ISTATES.INSTALLED) return false; return true; @@ -293,8 +293,8 @@ app.filter('installationActive', function () { }); // this appears in the app grid -app.filter('installationStateLabel', function() { - return function(app) { +app.filter('installationStateLabel', function () { + return function(app, user) { var waiting = app.progress === 0 ? ' (Queued)' : ''; switch (app.installationState) { @@ -306,9 +306,10 @@ 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: - if (app.error && app.error.message === 'ETRYAGAIN') return 'DNS Error'; - return 'Error'; + case ISTATES.ERROR: { + if (app.error && app.error.message === 'ETRYAGAIN') return 'DNS Error' + (user.admin ? ' - Click to Repair' : ''); + return 'Error' + (user.admin ? ' - Click to Repair' : ''); + } case ISTATES.INSTALLED: { if (app.debugMode) { return app.debugMode.readonlyRootfs ? 'Paused (Repair)' : 'Paused (Debug)'; diff --git a/src/views/apps.html b/src/views/apps.html index 6de8cd190..277ea66d8 100644 --- a/src/views/apps.html +++ b/src/views/apps.html @@ -576,7 +576,7 @@
{{ app.label || app.location || app.fqdn }}
- {{ app | installationStateLabel }} + {{ app | installationStateLabel:user }}