Skip to content

Commit

Permalink
fix: show count of apps still installing
Browse files Browse the repository at this point in the history
  • Loading branch information
sbender9 committed Nov 21, 2024
1 parent 262f96f commit 8ec044a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/server-admin-ui/src/views/appstore/Apps/Apps.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,11 @@ const Apps = function (props) {
onClick={() => setSelectedView('Installing')}
>
Installing
{installingCount(props.appStore) > 0 && (
<span className="badge__update">
{props.appStore.installing.length}
{installingCount(props.appStore)}
</span>
)}
</Button>
)}
</div>
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8ec044a

Please sign in to comment.