From b14828e8e1d011d444d5488fd7672f42f2ed8795 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Tue, 6 Oct 2020 13:01:01 -0700 Subject: [PATCH] Add stopped state --- src/js/index.js | 3 ++- src/views/apps.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/js/index.js b/src/js/index.js index 5c1e705c2..e49b45f7b 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -186,8 +186,9 @@ app.filter('selectedStateFilter', function () { if (!selectedState || !selectedState.state) return true; if (selectedState.state === 'running') return app.runState === 'running' && app.health === 'healthy' && app.installationState === 'installed'; + if (selectedState.state === 'stopped') return app.runState === 'stopped'; - return app.runState !== 'running' || app.health !== 'healthy' || app.installationState !== 'installed'; + return app.runState === 'running' && (app.health !== 'healthy' || app.installationState !== 'installed'); // not responding }); }; }); diff --git a/src/views/apps.js b/src/views/apps.js index 5ed31fefd..d4267c1fe 100644 --- a/src/views/apps.js +++ b/src/views/apps.js @@ -11,7 +11,8 @@ angular.module('Application').controller('AppsController', ['$scope', '$timeout' $scope.states = [ { state: '', label: 'All States' }, { state: 'running', label: 'Running' }, - { state: 'not_running', label: 'Not Running' } + { state: 'stopped', label: 'Stopped' }, + { state: 'not_responding', label: 'Not Responding' } ]; $scope.selectedState = $scope.states[0]; $scope.selectedTags = [];