Only allow to open app when runState is also running

This commit is contained in:
Johannes Zellner
2019-09-19 18:27:02 +02:00
parent 23e15581f3
commit fdafa8adf6

View File

@@ -184,6 +184,12 @@ var HSTATES = {
ERROR: 'error',
DEAD: 'dead'
};
var RSTATES ={
RUNNING: 'running',
PENDING_START: 'pending_start',
PENDING_STOP: 'pending_stop',
STOPPED: 'stopped'
};
app.filter('installError', function () {
return function (app) {
@@ -214,7 +220,7 @@ app.filter('installSuccess', function () {
app.filter('appIsInstalledAndHealthy', function () {
return function (app) {
if (!app) return false;
return (app.installationState === ISTATES.INSTALLED && app.health === HSTATES.HEALTHY);
return (app.installationState === ISTATES.INSTALLED && app.health === HSTATES.HEALTHY && app.runState === RSTATES.RUNNING);
};
});
@@ -369,7 +375,7 @@ app.filter('inProgressApps', function () {
app.filter('applicationLink', function() {
return function(app) {
if (app.installationState === ISTATES.INSTALLED && app.health === HSTATES.HEALTHY && !app.pendingPostInstallConfirmation) {
if (app.installationState === ISTATES.INSTALLED && app.health === HSTATES.HEALTHY && app.runState === RSTATES.RUNNING && !app.pendingPostInstallConfirmation) {
return 'https://' + app.fqdn;
} else {
return '';