Skip to content

Commit

Permalink
fix(admin-ui): fix loader on api key page
Browse files Browse the repository at this point in the history
  • Loading branch information
mjatin-dev committed May 16, 2022
1 parent fc837bb commit f03903e
Showing 1 changed file with 42 additions and 38 deletions.
80 changes: 42 additions & 38 deletions admin-ui/app/utils/ApiKeyRedirect.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,47 +14,51 @@ function ApiKeyRedirect({
return (
<React.Fragment>
<Container>
<div
style={{
backgroundColor: 'white',
margin: 'auto',
marginTop: '20%',
}}
>
<img
{!isLicenseValid && islicenseCheckResultLoaded ? (
<ApiKey />
) : (
<div
style={{
display: 'block',
marginLeft: 'auto',
marginTop: 'auto',
marginRight: 'auto',
width: '100%',
height: '100%',
backgroundColor: 'white',
margin: 'auto',
marginTop: '20%',
}}
src={require('Images/gif/npe-redirecting.gif')}
alt="loading..."
/>
{!isLicenseValid && islicenseCheckResultLoaded && <ApiKey />}
{!backendIsUp && (
<GluuNotification
type="error"
message={t('The UI backend service is down')}
description={t(
'Please contact the side administrator or make sure it is up and running.',
)}
show={true}
/>
)}
{isLicenseActivationResultLoaded && !isLicenseValid && (
<GluuNotification
type="error"
message={t('Invalid License')}
description={t(
'License has been not enabled for this application. Please contact support and confirm if license-key is correct.',
)}
show={true}
>
<img
style={{
display: 'block',
marginLeft: 'auto',
marginTop: 'auto',
marginRight: 'auto',
width: '100%',
height: '100%',
}}
src={require('Images/gif/npe-redirecting.gif')}
alt="loading..."
/>
)}
</div>
</div>
)}

{!backendIsUp && (
<GluuNotification
type="error"
message={t('The UI backend service is down')}
description={t(
'Please contact the side administrator or make sure it is up and running.',
)}
show={true}
/>
)}
{isLicenseActivationResultLoaded && !isLicenseValid && (
<GluuNotification
type="error"
message={t('Invalid License')}
description={t(
'License has been not enabled for this application. Please contact support and confirm if license-key is correct.',
)}
show={true}
/>
)}
</Container>
</React.Fragment>
)
Expand Down

0 comments on commit f03903e

Please sign in to comment.