Skip to content

Commit 1cc2789

Browse files
committed
feat(admin-ui): design the layout for api role management #327
1 parent 9e7c947 commit 1cc2789

20 files changed

+176
-35
lines changed

app/locales/en/translation.json

+5-2
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@
241241
"api": {
242242
"roles": "Access roles",
243243
"permissions": "Permissions",
244-
"mapping":"Mapping"
244+
"mapping": "Mapping"
245245
},
246246
"cache": "Cache",
247247
"clients": "Clients",
@@ -358,13 +358,15 @@
358358
},
359359
"titles": {
360360
"acrs": "ACRs",
361+
"active_users": "Actives Users && Access Token Stats",
361362
"acrs_logging": "ACRs && Logging",
362363
"algorithmic_keys": "Algorithmic Keys",
363-
"application_settings":"Application Settings",
364+
"application_settings": "Application Settings",
364365
"all_attributes": "Attributes/Claims",
365366
"all_custom_scripts": "Custom Scripts",
366367
"all_oidc_clients": "OpenID Clients",
367368
"all_scopes": "OAuth/OpenID Scopes",
369+
"couchbase_authentication": "Couchbase Authentication",
368370
"client_advanced": "Advanced",
369371
"client_attributes": "Client Attributes",
370372
"client_basic": "Basic",
@@ -377,6 +379,7 @@
377379
"detail_information": "Detailed information",
378380
"detail_contact": "Detail Contact",
379381
"ldap_authentication": "LDAP Authentication",
382+
"services_health":"Services Health Status",
380383
"sql_authentication": "SQL Authentication",
381384
"logging": "LOGGING",
382385
"jwk_keys": "JWK keys",

app/routes/Apps/Gluu/GluuAutoCompleteWithAdd.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { FormGroup, Col, Row, Button, Input } from '../../../components'
33
import { Typeahead } from 'react-bootstrap-typeahead'
44
import GluuLabel from '../Gluu/GluuLabel'
55
import GluuTooltip from './GluuTooltip'
6+
import applicationStyle from './styles/applicationstyle'
67
import { useTranslation } from 'react-i18next'
78

89
function GluuAutoCompleteWithAdd({
@@ -53,7 +54,12 @@ function GluuAutoCompleteWithAdd({
5354
<Col sm={10}>
5455
<Input placeholder={placeholder} id={inputId} />
5556
</Col>
56-
<Button color="primary" type="button" onClick={addItem}>
57+
<Button
58+
color="primary"
59+
style={applicationStyle.buttonStyle}
60+
type="button"
61+
onClick={addItem}
62+
>
5763
{t('actions.add')}
5864
</Button>
5965
</Row>

app/routes/Apps/Gluu/GluuCommitDialog.js

+12-3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
ModalFooter,
1212
} from 'reactstrap'
1313
import { useTranslation } from 'react-i18next'
14+
import applicationStyle from './styles/applicationstyle'
1415
import ClipLoader from 'react-spinners/ClipLoader'
1516

1617
const GluuCommitDialog = ({
@@ -44,7 +45,7 @@ const GluuCommitDialog = ({
4445
document.getElementById(USER_MESSAGE).value,
4546
)
4647
}
47-
setLoading(true);
48+
setLoading(true)
4849
onAccept(document.getElementById(USER_MESSAGE).value)
4950
}
5051
return (
@@ -91,12 +92,20 @@ const GluuCommitDialog = ({
9192
<ModalFooter>
9293
<ClipLoader loading={loading} size={35} />
9394
{active && (
94-
<Button color="primary" onClick={handleAccept}>
95+
<Button
96+
color="primary"
97+
style={applicationStyle.buttonStyle}
98+
onClick={handleAccept}
99+
>
95100
<i className="fa fa-check-circle mr-2"></i>
96101
{t('actions.accept')}
97102
</Button>
98103
)}{' '}
99-
<Button color="danger" onClick={handler}>
104+
<Button
105+
color="danger"
106+
style={applicationStyle.buttonStyle}
107+
onClick={handler}
108+
>
100109
<i className="fa fa-remove mr-2"></i>
101110
{t('actions.no')}
102111
</Button>

app/routes/Apps/Gluu/GluuCommitFooter.js

+14-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from 'react'
22
import { Col, Button, FormGroup, Divider } from './../../../components'
33
import { useTranslation } from 'react-i18next'
4+
import applicationStyle from '../../Apps/Gluu/styles/applicationstyle'
45

56
function GluuCommitFooter({
67
extraOnClick,
@@ -20,7 +21,12 @@ function GluuCommitFooter({
2021
&nbsp;
2122
{!hideButtons || !hideButtons['back'] ? (
2223
<Col sm={2} md={1}>
23-
<Button color="secondary" type="button" onClick={goBack}>
24+
<Button
25+
color="secondary"
26+
style={applicationStyle.buttonStyle}
27+
type="button"
28+
onClick={goBack}
29+
>
2430
<i className="fa fa-arrow-circle-left mr-2"></i>
2531
{t('actions.cancel')}
2632
</Button>
@@ -30,7 +36,12 @@ function GluuCommitFooter({
3036
)}
3137
<Col sm={0} md={7}>
3238
{extraLabel && extraOnClick && (
33-
<Button color="primary" type="button" onClick={extraOnClick}>
39+
<Button
40+
color="primary"
41+
type="button"
42+
style={applicationStyle.buttonStyle}
43+
onClick={extraOnClick}
44+
>
3445
{extraLabel}
3546
</Button>
3647
)}
@@ -47,6 +58,7 @@ function GluuCommitFooter({
4758
<Button
4859
type="button"
4960
color="primary"
61+
style={applicationStyle.buttonStyle}
5062
className="ml-auto px-4"
5163
onClick={saveHandler}
5264
>

app/routes/Apps/Gluu/GluuDialog.js

+11-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
ModalFooter,
1111
} from 'reactstrap'
1212
import { useTranslation } from 'react-i18next'
13+
import applicationStyle from '../../Apps/Gluu/styles/applicationstyle'
1314

1415
const GluuDialog = ({ row, handler, modal, onAccept, subject, name }) => {
1516
const [active, setActive] = useState(false)
@@ -54,11 +55,19 @@ const GluuDialog = ({ row, handler, modal, onAccept, subject, name }) => {
5455
</ModalBody>
5556
<ModalFooter>
5657
{active && (
57-
<Button color="primary" onClick={handleAccept}>
58+
<Button
59+
color="primary"
60+
style={applicationStyle.buttonStyle}
61+
onClick={handleAccept}
62+
>
5863
{t('actions.yes')}
5964
</Button>
6065
)}{' '}
61-
<Button color="secondary" onClick={handler}>
66+
<Button
67+
color="secondary"
68+
style={applicationStyle.buttonStyle}
69+
onClick={handler}
70+
>
6271
{t('actions.no')}
6372
</Button>
6473
</ModalFooter>

app/routes/Apps/Gluu/GluuFooter.js

+16-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from 'react'
22
import { Col, Button, FormGroup, Divider } from './../../../components'
33
import { useTranslation } from 'react-i18next'
4+
import applicationStyle from '../../Apps/Gluu/styles/applicationstyle'
45

56
function GluuFooter({ extraOnClick, extraLabel, hideButtons }) {
67
const { t } = useTranslation()
@@ -15,14 +16,22 @@ function GluuFooter({ extraOnClick, extraLabel, hideButtons }) {
1516
<FormGroup row>
1617
<Col sm={4} md={2}>
1718
{extraLabel && extraOnClick && (
18-
<Button color="primary" onClick={extraOnClick}>
19+
<Button
20+
color="primary"
21+
onClick={extraOnClick}
22+
style={applicationStyle.buttonStyle}
23+
>
1924
{t(extraLabel)}
2025
</Button>
2126
)}
2227
</Col>
2328
{!hideButtons || !hideButtons['back'] ? (
2429
<Col sm={4} md={2}>
25-
<Button color="secondary" onClick={goBack}>
30+
<Button
31+
color="secondary"
32+
onClick={goBack}
33+
style={applicationStyle.buttonStyle}
34+
>
2635
<i className="fa fa-arrow-circle-left mr-2"></i>
2736
{t('actions.cancel')}
2837
</Button>
@@ -33,7 +42,11 @@ function GluuFooter({ extraOnClick, extraLabel, hideButtons }) {
3342
&nbsp;
3443
{!hideButtons || !hideButtons['save'] ? (
3544
<Col sm={4} md={2}>
36-
<Button color="primary" type="submit">
45+
<Button
46+
color="primary"
47+
type="submit"
48+
style={applicationStyle.buttonStyle}
49+
>
3750
<i className="fa fa-check-circle mr-2"></i>
3851
{t('actions.save')}
3952
</Button>

app/routes/Apps/Gluu/GluuInlineInput.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import GluuLabel from './GluuLabel'
33
import GluuTooltip from './GluuTooltip'
44
import { useTranslation } from 'react-i18next'
55
import { Typeahead } from 'react-bootstrap-typeahead'
6+
import applicationStyle from '../../Apps/Gluu/styles/applicationstyle'
67
import {
78
Col,
89
InputGroup,
@@ -114,7 +115,12 @@ function GluuInlineInput({
114115
<Col sm={2}>
115116
{show && (
116117
<>
117-
<Button color="primary" size="sm" onClick={onAccept}>
118+
<Button
119+
color="primary"
120+
style={applicationStyle.buttonStyle}
121+
size="sm"
122+
onClick={onAccept}
123+
>
118124
<i className="fa fa-check mr-2"></i>
119125
</Button>{' '}
120126
<Button color="danger" size="sm" onClick={onCancel}>

app/routes/Apps/Gluu/GluuModal.js

+11-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
Input,
99
} from 'reactstrap'
1010
import { useTranslation } from 'react-i18next'
11+
import applicationStyle from './styles/applicationstyle'
1112

1213
function GluuModal({ title, modal, handler, onAccept }) {
1314
const { t } = useTranslation()
@@ -24,11 +25,19 @@ function GluuModal({ title, modal, handler, onAccept }) {
2425
<Input placeholder={t('placeholders.redirect_uri')} />
2526
</ModalBody>
2627
<ModalFooter>
27-
<Button color="primary" onClick={onAccept}>
28+
<Button
29+
color="primary"
30+
style={applicationStyle.buttonStyle}
31+
onClick={onAccept}
32+
>
2833
{t('actions.add')}
2934
</Button>
3035
&nbsp;
31-
<Button color="primary" onClick={handler}>
36+
<Button
37+
color="primary"
38+
style={applicationStyle.buttonStyle}
39+
onClick={handler}
40+
>
3241
{t('ations.cancel')}
3342
</Button>
3443
</ModalFooter>

app/routes/Apps/Gluu/GluuProperties.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,11 @@ function GluuProperties({
4242
<Accordion.Header>{t(label).toUpperCase()}</Accordion.Header>
4343
<Accordion.Body>
4444
<Button
45-
style={{ float: 'right', marginTop: -40 }}
45+
style={{
46+
background: 'linear-gradient(90deg, #00C9FF 0%, #92FE9D 100%)',
47+
float: 'right',
48+
marginTop: -40,
49+
}}
4650
type="button"
4751
color="primary"
4852
onClick={addProperty}

app/routes/Apps/Gluu/GluuTypeAheadWithAdd.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { FormGroup, Col, Row, Button, Input } from '../../../components'
33
import { Typeahead } from 'react-bootstrap-typeahead'
44
import GluuLabel from '../Gluu/GluuLabel'
55
import GluuTooltip from './GluuTooltip'
6+
import applicationStyle from './styles/applicationstyle'
67
import { useTranslation } from 'react-i18next'
78

89
function GluuTypeAheadWithAdd({
@@ -59,7 +60,12 @@ function GluuTypeAheadWithAdd({
5960
aria-label="new_entry"
6061
/>
6162
</Col>
62-
<Button color="primary" type="button" onClick={addItem}>
63+
<Button
64+
color="primary"
65+
type="button"
66+
style={applicationStyle.buttonStyle}
67+
onClick={addItem}
68+
>
6369
<i className="fa fa-plus-circle mr-2"></i>
6470
{t('actions.add')}
6571
</Button>

app/routes/Apps/Gluu/styles/applicationstyle.js

+3
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,7 @@ export default {
1212
padding: '0px 5px 0px 5px',
1313
color: 'white',
1414
},
15+
buttonStyle: {
16+
background: 'linear-gradient(90deg, #00C9FF 0%, #92FE9D 100%)',
17+
},
1518
}

plugins/admin/components/Configuration/LicenseDetailsPage.js

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
CardBody,
1414
CardTitle,
1515
Container,
16+
FormGroup,
1617
Row,
1718
Col,
1819
} from '../../../../app/components'
@@ -36,6 +37,8 @@ function LicenseDetailsPage({ item, loading, dispatch }) {
3637
<CardBody>
3738
<CardTitle tag="h6" className="mb-4">
3839
<GluuRibbon title="fields.licenseDetails" doTranslate fromLeft />
40+
<FormGroup row />
41+
<FormGroup row />
3942
</CardTitle>
4043
<GluuLoader blocking={loading}>
4144
{item.licenseEnable ? (

plugins/admin/components/MonthlyActiveUsersPage.js

+12-1
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@ import {
44
Card,
55
CardFooter,
66
CardBody,
7+
FormGroup,
78
Label,
89
Input,
910
Badge,
1011
} from '../../../app/components'
1112
import GluuLoader from '../../../app/routes/Apps/Gluu/GluuLoader'
13+
import GluuRibbon from '../../../app/routes/Apps/Gluu/GluuRibbon'
14+
import applicationStyle from '../../../app/routes/Apps/Gluu/styles/applicationstyle'
1215
import GluuViewWrapper from '../../../app/routes/Apps/Gluu/GluuViewWrapper'
1316
import {
1417
LineChart,
@@ -224,6 +227,9 @@ function MonthlyActiveUsersPage({ stat, permissions, loading, dispatch }) {
224227
>
225228
<ResponsiveContainer>
226229
<Card>
230+
<GluuRibbon title={t('titles.active_users')} fromLeft />
231+
<FormGroup row />
232+
<FormGroup row />
227233
<CardBody
228234
className="d-flex flex-column justify-content-center align-items-center pt-5"
229235
style={{ minHeight: '400px' }}
@@ -253,7 +259,12 @@ function MonthlyActiveUsersPage({ stat, permissions, loading, dispatch }) {
253259
onClick={_handleClickRangeBox2}
254260
/>
255261
</Picker>
256-
<Button className="ml-4 mr-4" color="primary" onClick={search}>
262+
<Button
263+
style={applicationStyle.buttonStyle}
264+
className="ml-4 mr-4"
265+
color="primary"
266+
onClick={search}
267+
>
257268
{t('actions.view')}
258269
</Button>
259270
<Label className="h4">

plugins/auth-server/components/Clients/ClientWizardForm.js

+5
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ import GluuCommitDialog from '../../../../app/routes/Apps/Gluu/GluuCommitDialog'
1717
import { Formik } from 'formik'
1818
import { useTranslation } from 'react-i18next'
1919
import { hasPermission, CLIENT_WRITE } from '../../../../app/utils/PermChecker'
20+
import applicationStyle from '../../../../app/routes/Apps/Gluu/styles/applicationstyle'
21+
2022
const sequence = [
2123
'Basic',
2224
'Advanced',
@@ -394,6 +396,7 @@ function ClientWizardForm({
394396
<Button
395397
type="button"
396398
onClick={prevStep}
399+
style={applicationStyle.buttonStyle}
397400
color="link"
398401
className="mr-3"
399402
>
@@ -406,6 +409,7 @@ function ClientWizardForm({
406409
type="button"
407410
color="primary"
408411
onClick={nextStep}
412+
style={applicationStyle.buttonStyle}
409413
className="ml-auto px-4"
410414
>
411415
{t('actions.next')}
@@ -420,6 +424,7 @@ function ClientWizardForm({
420424
color="primary"
421425
className="ml-auto px-4"
422426
onClick={toggle}
427+
style={applicationStyle.buttonStyle}
423428
>
424429
{t('actions.apply')}
425430
</Button>

0 commit comments

Comments
 (0)