From 8ec044a8946c672cc63e3ee31563f9b8ce4aa1e0 Mon Sep 17 00:00:00 2001 From: Scott Bender Date: Thu, 21 Nov 2024 09:10:41 -0500 Subject: [PATCH] fix: show count of apps still installing --- .../server-admin-ui/src/views/appstore/Apps/Apps.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/server-admin-ui/src/views/appstore/Apps/Apps.js b/packages/server-admin-ui/src/views/appstore/Apps/Apps.js index 0932974b0..a1fc919a7 100644 --- a/packages/server-admin-ui/src/views/appstore/Apps/Apps.js +++ b/packages/server-admin-ui/src/views/appstore/Apps/Apps.js @@ -129,9 +129,11 @@ const Apps = function (props) { onClick={() => setSelectedView('Installing')} > Installing + {installingCount(props.appStore) > 0 && ( - {props.appStore.installing.length} + {installingCount(props.appStore)} + )} )} @@ -187,6 +189,12 @@ const Apps = function (props) { ) } +const installingCount = (appStore) => { + return appStore.installing.filter(app => { + return app.isWaiting || app.isInstalling + }).length +} + const selectedViewToFilter = (selectedView, appStore) => { if (selectedView === 'Installed') { return (app) => app.installedVersion