Skip to content

Commit 82c47e1

Browse files
committed
feat(admin-ui): loading in the client list page
1 parent b6a185b commit 82c47e1

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

admin-ui/plugins/auth-server/components/Clients/ClientListPage.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ function ClientListPage({ clients, permissions, scopes, loading, dispatch }) {
5353
const bgThemeColor = { background: themeColors.background }
5454
const [scopeClients, setScopeClients] = useState()
5555
const [haveScopeINUMParam] = useState(search.indexOf('?scopeInum=') > -1)
56+
const [isPageLoading, setIsPageLoading] = useState(loading)
5657

5758
SetTitle(t('titles.oidc_clients'))
5859

@@ -141,12 +142,17 @@ function ClientListPage({ clients, permissions, scopes, loading, dispatch }) {
141142
setScopeClients(clientsScope)
142143
}
143144
} else {
145+
setIsPageLoading(true)
144146
makeOptions()
145147
buildPayload(userAction, FETCHING_OIDC_CLIENTS, options)
146148
dispatch(getOpenidClients(userAction))
147149

148150
buildPayload(userAction, '', options)
149151
dispatch(getScopes(userAction))
152+
153+
setTimeout(() => {
154+
setIsPageLoading(false)
155+
}, 3000);
150156
}
151157
}, [haveScopeINUMParam])
152158

@@ -284,7 +290,7 @@ function ClientListPage({ clients, permissions, scopes, loading, dispatch }) {
284290
}}
285291
columns={tableColumns}
286292
data={haveScopeINUMParam ? scopeClients : clients}
287-
isLoading={loading}
293+
isLoading={isPageLoading}
288294
title=""
289295
actions={myActions}
290296
options={{

admin-ui/plugins/auth-server/components/Clients/ClientShowScopes.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function ClientShowScopes({ handler, data, isOpen }) {
2727
</div>
2828
)
2929
}) : (
30-
<div>{t('message.no_scope_in_client')}</div>
30+
<div>{t('messages.no_scope_in_client')}</div>
3131
)}
3232
</ModalBody>
3333
<ModalFooter>

0 commit comments

Comments
 (0)