Skip to content

Commit

Permalink
feat(admin-ui): add services field to asset form #1635
Browse files Browse the repository at this point in the history
  • Loading branch information
syntrydy committed Apr 30, 2024
1 parent 272c760 commit 1f107e1
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 12 deletions.
4 changes: 2 additions & 2 deletions admin-ui/app/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"access_token_signing_alg": "JWS alg for signing",
"asset_name": "Asset Name",
"upload": "Select a file to upload",
"jansModuleProperty": "Jans Module Properties",
"jansModuleProperty": "Related Services",
"default_permission_in_token": "Default permission in token",
"aui_feature_ids": "Admin UI Features",
"introspection_signed_response_alg": "Introspection Signed Response Alg",
Expand Down Expand Up @@ -873,7 +873,7 @@
},
"documentation": {
"asset":{
"jansModuleProperty": "Jans Module Properties"
"jansModuleProperty": "Related Services"
},
"webhook": {
"url": "Webhook URL.",
Expand Down
4 changes: 2 additions & 2 deletions admin-ui/app/locales/pt/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
"asset_name": "Asset Name",
"tag": "Marcação",
"upload": "Select a file to upload",
"jansModuleProperty": "Jans Module Properties",
"jansModuleProperty": "Related Services",
"default_permission_in_token": "Permissão padrão no token",
"introspection_signed_response_alg": "Algoritmo de assinatura da resposta de introspeção",
"introspection_encrypted_response_alg": "Algoritmo de criptografia da resposta de introspeção",
Expand Down Expand Up @@ -771,7 +771,7 @@
},
"documentation": {
"asset":{
"jansModuleProperty": "Jans Module Properties"
"jansModuleProperty": "Related Services"
},
"webhook": {
"url": "URL do webhook.",
Expand Down
2 changes: 1 addition & 1 deletion admin-ui/app/utils/PermChecker.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export const MESSAGE_WRITE = BASE_URL + '/config/message.write'
export const WEBHOOK_READ = BASE_URL + '/jans-auth-server/config/adminui/webhook.readonly'
export const WEBHOOK_WRITE = BASE_URL + '/jans-auth-server/config/adminui/webhook.write'
export const WEBHOOK_DELETE = BASE_URL + '/jans-auth-server/config/adminui/webhook.delete'
export const ASSETS_READ = BASE_URL + '/jans_asset-read'
export const ASSETS_READ = BASE_URL + '/config/jans_asset-read'
export const ASSETS_WRITE = BASE_URL + '/config/jans_asset-write'
export const ASSETS_DELETE = BASE_URL + '/config/jans_asset-delete'

Expand Down
28 changes: 21 additions & 7 deletions admin-ui/plugins/admin/components/Assets/AssetForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import GluuCommitFooter from 'Routes/Apps/Gluu/GluuCommitFooter'
import GluuCommitDialog from 'Routes/Apps/Gluu/GluuCommitDialog'
import GluuUploadFile from 'Routes/Apps/Gluu/GluuUploadFile'
import GluuArrayCompleter from 'Routes/Apps/Gluu/GluuArrayCompleter'
import GluuTypeAhead from 'Routes/Apps/Gluu/GluuTypeAhead'
import { useTranslation } from 'react-i18next'
import { useDispatch, useSelector } from 'react-redux'
import * as Yup from 'yup'
Expand Down Expand Up @@ -175,16 +176,29 @@ const AssetForm = () => {
name='description'
/>
</Col>
<GluuArrayCompleter
<GluuTypeAhead
name='services'
label={t('fields.jansModuleProperty')}
formik={formik}
name='jansModuleProperty'
rsize={8}
options={["config-api","auth-server","scim","casa"]}
lsize={4}
rsize={8}
required
value={[]}
doc_category={ASSET}
label='fields.jansModuleProperty'
value={selectedAsset.jansModuleProperty || []}
options={selectedAsset.jansModuleProperty || []} >
</GluuArrayCompleter>
/>
{false &&
<GluuArrayCompleter
formik={formik}
name='jansModuleProperty'
rsize={8}
lsize={4}
doc_category={ASSET}
label='fields.jansModuleProperty'
value={selectedAsset.jansModuleProperty || []}
options={selectedAsset.jansModuleProperty || []} >
</GluuArrayCompleter>
}
<FormGroup row>
<GluuLabel
label='options.enabled'
Expand Down

0 comments on commit 1f107e1

Please sign in to comment.