Skip to content

Commit

Permalink
fix(admin-ui): clients count fix on dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
mjatin-dev committed Sep 23, 2022
1 parent ad98b44 commit 8d6398b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion admin-ui/app/redux/reducers/InitReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const INIT_STATE = {
clients: [],
scopes: [],
attributes: [],
totalClientsEntries:0
}

const reducerName = 'initReducer'
Expand All @@ -39,7 +40,8 @@ export default function initReducer(state = INIT_STATE, action) {
if (action.payload.data) {
return {
...state,
clients: action.payload.data,
clients: action.payload.data.entries,
totalClientsEntries: action.payload.data.totalEntriesCount
}
} else {
return handleDefault()
Expand Down
4 changes: 3 additions & 1 deletion admin-ui/app/routes/Dashboards/DashboardPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ function DashboardPage({
dbStatus,
loading,
users,
totalClientsEntries,
dispatch,
}) {
const { t } = useTranslation()
Expand Down Expand Up @@ -157,7 +158,7 @@ function DashboardPage({
const summaryData = [
{
text: t('dashboard.oidc_clients_count'),
value: clients?.length,
value: totalClientsEntries,
},
{
text: t('dashboard.active_users_count'),
Expand Down Expand Up @@ -492,6 +493,7 @@ const mapStateToProps = (state) => {
statData: state.mauReducer.stat,
loading: state.mauReducer.loading,
clients: state.initReducer.clients,
totalClientsEntries: state.initReducer.totalClientsEntries,
license: state.licenseDetailsReducer.item,
serverStatus: state.healthReducer.serverStatus,
dbStatus: state.healthReducer.dbStatus,
Expand Down

0 comments on commit 8d6398b

Please sign in to comment.