Skip to content

Commit

Permalink
fix(admin-ui): basic page correction
Browse files Browse the repository at this point in the history
  • Loading branch information
mjatin-dev committed Jul 19, 2022
1 parent c1cabd2 commit 8f33c39
Show file tree
Hide file tree
Showing 3 changed files with 146 additions and 106 deletions.
12 changes: 9 additions & 3 deletions admin-ui/app/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@
"enable_custom_validation_for_this_attribute": "Enable custom validation for this attribute?",
"enabled_oAuth_audit_logging": "Enable Oauth Audit Logging?",
"enter_the_attribute_inum": "Enter the attribute inum",
"grant_types": "Grant Types",
"grant_types": "Grants",
"redirect_regex": "Redirect Regex",
"host_name": "Host Name",
"hide_on_discovery": "Hide On Discovery?",
"http_logging_enabled": "Enable HTTP Logging",
Expand Down Expand Up @@ -383,7 +384,7 @@
"all_oidc_clients": "OpenID Clients",
"all_scopes": "OAuth/OpenID Scopes",
"couchbase_authentication": "Couchbase Authentication",
"client_advanced": "Advanced",
"client_advanced": "Advanced Client Properties",
"client_attributes": "Client Attributes",
"client_basic": "Basic",
"client_encryption_signing": "Encryption/Signing",
Expand Down Expand Up @@ -414,7 +415,12 @@
"scripts": "Custom Interception Scripts",
"schemaName": "Schema Name",
"user_management": "User Management",
"error": "error"
"error": "error",
"token": "Tokens",
"log_out": "Logout",
"software_info": "Software Info",
"CIBA_PAR_UMA": "CIBA / PAR / UMA",
"encryption_signing": "Encription / Signing"
},
"links": {
"support": "https://support.gluu.org/"
Expand Down
35 changes: 21 additions & 14 deletions admin-ui/plugins/auth-server/components/Clients/ClientBasicPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,21 @@ const ClientBasicPanel = ({ client, scopes, formik }) => {
value={client.description}
doc_category={DOC_CATEGORY}
/>
<GluuInputRow
label="fields.redirect_regex"
name="redirect_regex"
formik={formik}
value={client.redirect_regex}
doc_category={DOC_CATEGORY}
/>
<GluuToogleRow
name="disabled"
formik={formik}
label="fields.is_active"
value={!client.disabled}
doc_category={DOC_CATEGORY}
/>
{client.expirable && (
{/* {client.expirable && (
<GluuToogleRow
name="expirable"
formik={formik}
Expand All @@ -146,8 +153,8 @@ const ClientBasicPanel = ({ client, scopes, formik }) => {
handler={handleExpirable}
doc_category={DOC_CATEGORY}
/>
)}
{client.expirable && client.expirable.length && (
)} */}
{/* {client.expirable && client.expirable.length && (
<FormGroup row>
<GluuLabel label="client_expiration_date" size={5} />
<Col sm={7}>
Expand All @@ -166,29 +173,29 @@ const ClientBasicPanel = ({ client, scopes, formik }) => {
/>
</Col>
</FormGroup>
)}
)} */}

<GluuInputRow
{/* <GluuInputRow
label="fields.policy_uri"
name="policyUri"
formik={formik}
value={client.policyUri}
doc_category={DOC_CATEGORY}
/>
<GluuInputRow
/> */}
{/* <GluuInputRow
label="fields.logo_uri"
name="logoUri"
formik={formik}
value={client.logoUri}
doc_category={DOC_CATEGORY}
/>
<GluuInputRow
/> */}
{/* <GluuInputRow
label="fields.sector_uri"
name="sectorIdentifierUri"
formik={formik}
value={client.sectorIdentifierUri}
doc_category={DOC_CATEGORY}
/>
/> */}
<FormGroup row>
<GluuLabel label="fields.application_type" />
<Col sm={3}>
Expand Down Expand Up @@ -247,7 +254,7 @@ const ClientBasicPanel = ({ client, scopes, formik }) => {
options={scopes}
doc_category={DOC_CATEGORY}
></GluuTypeAheadForDn>
<GluuTypeAheadWithAdd
{/* <GluuTypeAheadWithAdd
name="postLogoutRedirectUris"
label="fields.post_logout_redirect_uris"
formik={formik}
Expand All @@ -257,7 +264,7 @@ const ClientBasicPanel = ({ client, scopes, formik }) => {
validator={postUriValidator}
inputId={post_uri_id}
doc_category={DOC_CATEGORY}
></GluuTypeAheadWithAdd>
></GluuTypeAheadWithAdd> */}

<GluuTypeAheadWithAdd
name="redirectUris"
Expand All @@ -272,7 +279,7 @@ const ClientBasicPanel = ({ client, scopes, formik }) => {
></GluuTypeAheadWithAdd>

<FormGroup row>
<Col sm={6}>
{/* <Col sm={6}>
<GluuToogleRow
name="persistClientAuthorizations"
lsize={9}
Expand All @@ -282,7 +289,7 @@ const ClientBasicPanel = ({ client, scopes, formik }) => {
value={client.persistClientAuthorizations}
doc_category={DOC_CATEGORY}
/>
</Col>
</Col> */}
<Col sm={6}>
<GluuToogleRow
name="trustedClient"
Expand Down
205 changes: 116 additions & 89 deletions admin-ui/plugins/auth-server/components/Clients/ClientWizardForm.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
import React, { useState, useContext } from 'react'
import {
Wizard,
Card,
CardFooter,
CardBody,
Form,
Button,
} from 'Components'
import { Wizard, Card, CardFooter, CardBody, Form, Button } from 'Components'
import ClientBasic from './ClientBasicPanel'
import ClientAdvanced from './ClientAdvancedPanel'
import ClientEncryption from './ClientEncryptionPanel'
Expand Down Expand Up @@ -92,7 +85,6 @@ function ClientWizardForm({
toggle()
//document.querySelector('button[type="submit"]').click()
document.getElementsByClassName('UserActionSubmitButton')[0].click()

}

const initialValues = {
Expand Down Expand Up @@ -243,14 +235,49 @@ function ClientWizardForm({
>
{t('titles.client_basic')}
</Wizard.Step>
<Wizard.Step
id={setId(0)}
icon={<i className="fa fa-credit-card fa-fw"></i>}
complete={isComplete(sequence[0])}
>
{t('titles.token')}
</Wizard.Step>
<Wizard.Step
id={setId(0)}
icon={<i className="fa fa-credit-card fa-fw"></i>}
complete={isComplete(sequence[0])}
>
{t('titles.log_out')}
</Wizard.Step>
<Wizard.Step
id={setId(0)}
icon={<i className="fa fa-credit-card fa-fw"></i>}
complete={isComplete(sequence[0])}
>
{t('titles.software_info')}
</Wizard.Step>
<Wizard.Step
id={setId(0)}
icon={<i className="fa fa-credit-card fa-fw"></i>}
complete={isComplete(sequence[0])}
>
{t('titles.CIBA_PAR_UMA')}
</Wizard.Step>
<Wizard.Step
id={setId(0)}
icon={<i className="fa fa-credit-card fa-fw"></i>}
complete={isComplete(sequence[0])}
>
{t('titles.encryption_signing')}
</Wizard.Step>
<Wizard.Step
id={setId(1)}
icon={<i className="fa fa-cube fa-fw"></i>}
complete={isComplete(sequence[1])}
>
{t('titles.client_advanced')}
</Wizard.Step>
<Wizard.Step
{/* <Wizard.Step
id={setId(2)}
icon={<i className="fa fa-credit-card fa-fw"></i>}
complete={isComplete(sequence[2])}
Expand All @@ -263,7 +290,7 @@ function ClientWizardForm({
complete={isComplete(sequence[3])}
>
{t('titles.client_attributes')}
</Wizard.Step>
</Wizard.Step> */}
<Wizard.Step
id={setId(4)}
icon={<i className="fa fa-credit-card fa-fw"></i>}
Expand All @@ -277,83 +304,83 @@ function ClientWizardForm({
{(() => {
setClient(formik.values)
switch (currentStep) {
case sequence[0]:
return (
<div
style={
view_only
? { pointerEvents: 'none', opacity: '0.99' }
: {}
}
>
<ClientBasic
client={client}
scopes={scopes}
formik={formik}
/>
</div>
)
case sequence[1]:
return (
<div
style={
view_only
? { pointerEvents: 'none', opacity: '0.99' }
: {}
}
>
<ClientAdvanced
client={client}
scripts={scripts}
formik={formik}
/>
</div>
)
case sequence[2]:
return (
<div
style={
view_only
? { pointerEvents: 'none', opacity: '0.99' }
: {}
}
>
<ClientEncryption
client={client}
formik={formik}
oidcConfiguration={oidcConfiguration}
/>
</div>
)
case sequence[3]:
return (
<div
style={
view_only
? { pointerEvents: 'none', opacity: '0.99' }
: {}
}
>
<ClientAttributes client={client} formik={formik} />
</div>
)
case sequence[4]:
return (
<div
style={
view_only
? { pointerEvents: 'none', opacity: '0.99' }
: {}
}
>
<ClientScript
client={client}
formik={formik}
scripts={scripts}
scopes={scopes}
/>
</div>
)
case sequence[0]:
return (
<div
style={
view_only
? { pointerEvents: 'none', opacity: '0.99' }
: {}
}
>
<ClientBasic
client={client}
scopes={scopes}
formik={formik}
/>
</div>
)
case sequence[1]:
return (
<div
style={
view_only
? { pointerEvents: 'none', opacity: '0.99' }
: {}
}
>
<ClientAdvanced
client={client}
scripts={scripts}
formik={formik}
/>
</div>
)
case sequence[2]:
return (
<div
style={
view_only
? { pointerEvents: 'none', opacity: '0.99' }
: {}
}
>
<ClientEncryption
client={client}
formik={formik}
oidcConfiguration={oidcConfiguration}
/>
</div>
)
case sequence[3]:
return (
<div
style={
view_only
? { pointerEvents: 'none', opacity: '0.99' }
: {}
}
>
<ClientAttributes client={client} formik={formik} />
</div>
)
case sequence[4]:
return (
<div
style={
view_only
? { pointerEvents: 'none', opacity: '0.99' }
: {}
}
>
<ClientScript
client={client}
formik={formik}
scripts={scripts}
scopes={scopes}
/>
</div>
)
}
})()}
</CardBody>
Expand Down Expand Up @@ -395,7 +422,7 @@ function ClientWizardForm({
>
{t('actions.apply')}
</Button>
)}
)}
</div>
</CardFooter>
<Button
Expand Down

0 comments on commit 8f33c39

Please sign in to comment.