Skip to content

Commit

Permalink
Merge pull request #622 from SavinduDimal/key-manager-ui-changes
Browse files Browse the repository at this point in the history
Added UI changes related to Key Manager usage implementations
  • Loading branch information
tharikaGitHub committed Mar 25, 2024
2 parents e419a29 + 04b8ced commit c1943a6
Show file tree
Hide file tree
Showing 12 changed files with 1,378 additions and 356 deletions.
16 changes: 16 additions & 0 deletions portals/admin/src/main/webapp/site/public/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@
"AdminPagesGatewayEnvironments.AddEditGWEnvironment.form.environment.displayName.empty": "Display Name is Empty",
"AdminPagesGatewayEnvironments.AddEditGWEnvironment.form.environment.vhost.duplicate": "VHosts are duplicated",
"AdminPagesGatewayEnvironments.AddEditGWEnvironment.form.environment.vhost.empty": "VHost is empty",
"Api.Name": "API Name",
"Api.Provider": "Provider",
"Api.Version": "Version",
"Apis.Details.Scopes.CreateScope.roles.help": "Enter a valid role and press `Enter`.",
"Apis.Details.Scopes.Roles.Invalid": "A Role is invalid",
"Apis.Listing.Listing.apis.search": "Search",
Expand All @@ -112,6 +115,9 @@
"Apis.Shared.ConfirmDialog.ok": "OK",
"Apis.Shared.ConfirmDialog.please.confirm": "Please Confirm",
"Apis.Shared.RedirectToLogin.you.will.be.redirected.to": "You will be redirected to {page}",
"Application.Name": "Application Name",
"Application.Owner": "Application Owner",
"Application.organization": "Application Organization",
"Applications.Listing.ApplicationTableHead.actions": "Actions",
"Applications.Listing.ApplicationTableHead.name": "Name",
"Applications.Listing.ApplicationTableHead.owner": "Owner",
Expand Down Expand Up @@ -227,6 +233,8 @@
"KeyManagers.AddEditKeyManager.advanced": "Advanced Configurations",
"KeyManagers.AddEditKeyManager.advanced.description": "Advanced options for the Key Manager",
"KeyManagers.AddEditKeyManager.api.invocation.method": "API Invocation Method",
"KeyManagers.AddEditKeyManager.api.no.usages": "No API usages for\n this key manager specifically.",
"KeyManagers.AddEditKeyManager.application.no.usages": "No Application usages\n for this key manager specifically.",
"KeyManagers.AddEditKeyManager.certificate": "Certificates",
"KeyManagers.AddEditKeyManager.certificate.description": "Upload or provide the certificate inline.",
"KeyManagers.AddEditKeyManager.claim.mappings.hidden.help": "Expand to add edit claim mappings",
Expand Down Expand Up @@ -289,6 +297,7 @@
"KeyManagers.AddEditKeyManager.title.newGlobal": "Global Key Manager - Create new",
"KeyManagers.AddEditKeyManager.token.handling.options": "Token Handling Options",
"KeyManagers.AddEditKeyManager.token.validation.method": "Token Validation Method",
"KeyManagers.AddEditKeyManager.usages": "Key Manager Usage",
"KeyManagers.AddEditKeyManager.useIntrospect": "Use introspect",
"KeyManagers.AddEditTokenExchangeIDP.form.Issuer": "Issuer",
"KeyManagers.AddEditTokenExchangeIDP.form.issuer.help": "E.g.,: https://localhost:9443/oauth2/token",
Expand All @@ -307,6 +316,12 @@
"KeyManagers.ImportConfig.dialog.trigger.import": "Import",
"KeyManagers.ImportConfig.form.url": "Url",
"KeyManagers.ImportConfig.form.url.help": "Provide Url",
"KeyManagers.ListKeyManagerAPIUsages.error": "Unable to get Key Manager API usage details",
"KeyManagers.ListKeyManagerApplicationUsages.error": "Unable to get Key Manager application usage details",
"KeyManagers.ListKeyManagerUsages.empty.content": "There are no Key Manger usages.",
"KeyManagers.ListKeyManagerUsages.empty.title": "Key Manager Usages",
"KeyManagers.ListKeyManagerUsages.permission.denied.content": "You dont have enough permission to view Key Manager Usages. Please contact the site administrator.",
"KeyManagers.ListKeyManagerUsages.permission.denied.title": "Permission Denied",
"KeyManagers.ListKeyManagers.List.title": "Key Managers",
"KeyManagers.ListKeyManagers.addButtonProps.triggerButtonText": "Add Key Manager",
"KeyManagers.ListKeyManagers.addGlobalKeyManager": "Add Global Key Manager",
Expand All @@ -316,6 +331,7 @@
"KeyManagers.ListKeyManagers.table.header.label.name": "Name",
"KeyManagers.ListKeyManagers.table.header.label.provider": "Provider",
"KeyManagers.ListKeyManagers.table.header.label.tokenType": "Type",
"KeyManagers.ListKeyManagers.table.header.label.usage": "Usage",
"Keymanager.Claim.Action": "Action",
"Keymanager.KeyValidation.Action": "Action",
"Keymanager.KeyValidation.ClaimKey": "Claim Key",
Expand Down
16 changes: 16 additions & 0 deletions portals/admin/src/main/webapp/site/public/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@
"AdminPagesGatewayEnvironments.AddEditGWEnvironment.form.environment.displayName.empty": "",
"AdminPagesGatewayEnvironments.AddEditGWEnvironment.form.environment.vhost.duplicate": "",
"AdminPagesGatewayEnvironments.AddEditGWEnvironment.form.environment.vhost.empty": "",
"Api.Name": "",
"Api.Provider": "",
"Api.Version": "",
"Apis.Details.Scopes.CreateScope.roles.help": "",
"Apis.Details.Scopes.Roles.Invalid": "",
"Apis.Listing.Listing.apis.search": "",
Expand All @@ -112,6 +115,9 @@
"Apis.Shared.ConfirmDialog.ok": "",
"Apis.Shared.ConfirmDialog.please.confirm": "",
"Apis.Shared.RedirectToLogin.you.will.be.redirected.to": "",
"Application.Name": "",
"Application.Owner": "",
"Application.organization": "",
"Applications.Listing.ApplicationTableHead.actions": "",
"Applications.Listing.ApplicationTableHead.name": "",
"Applications.Listing.ApplicationTableHead.owner": "",
Expand Down Expand Up @@ -227,6 +233,8 @@
"KeyManagers.AddEditKeyManager.advanced": "",
"KeyManagers.AddEditKeyManager.advanced.description": "",
"KeyManagers.AddEditKeyManager.api.invocation.method": "",
"KeyManagers.AddEditKeyManager.api.no.usages": "",
"KeyManagers.AddEditKeyManager.application.no.usages": "",
"KeyManagers.AddEditKeyManager.certificate": "",
"KeyManagers.AddEditKeyManager.certificate.description": "",
"KeyManagers.AddEditKeyManager.claim.mappings.hidden.help": "",
Expand Down Expand Up @@ -289,6 +297,7 @@
"KeyManagers.AddEditKeyManager.title.newGlobal": "",
"KeyManagers.AddEditKeyManager.token.handling.options": "",
"KeyManagers.AddEditKeyManager.token.validation.method": "",
"KeyManagers.AddEditKeyManager.usages": "",
"KeyManagers.AddEditKeyManager.useIntrospect": "",
"KeyManagers.AddEditTokenExchangeIDP.form.Issuer": "",
"KeyManagers.AddEditTokenExchangeIDP.form.issuer.help": "",
Expand All @@ -307,6 +316,12 @@
"KeyManagers.ImportConfig.dialog.trigger.import": "",
"KeyManagers.ImportConfig.form.url": "",
"KeyManagers.ImportConfig.form.url.help": "",
"KeyManagers.ListKeyManagerAPIUsages.error": "",
"KeyManagers.ListKeyManagerApplicationUsages.error": "",
"KeyManagers.ListKeyManagerUsages.empty.content": "",
"KeyManagers.ListKeyManagerUsages.empty.title": "",
"KeyManagers.ListKeyManagerUsages.permission.denied.content": "",
"KeyManagers.ListKeyManagerUsages.permission.denied.title": "",
"KeyManagers.ListKeyManagers.List.title": "",
"KeyManagers.ListKeyManagers.addButtonProps.triggerButtonText": "",
"KeyManagers.ListKeyManagers.addGlobalKeyManager": "",
Expand All @@ -316,6 +331,7 @@
"KeyManagers.ListKeyManagers.table.header.label.name": "",
"KeyManagers.ListKeyManagers.table.header.label.provider": "",
"KeyManagers.ListKeyManagers.table.header.label.tokenType": "",
"KeyManagers.ListKeyManagers.table.header.label.usage": "",
"Keymanager.Claim.Action": "",
"Keymanager.KeyValidation.Action": "",
"Keymanager.KeyValidation.ClaimKey": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { useAppContext } from 'AppComponents/Shared/AppContext';
* @param {JSON} props component props.
* @returns {JSX} Loading animation.
*/
function Delete({ updateList, dataRow }) {
function Delete({ updateList, dataRow, isDisabled }) {
const { id, type, isGlobal } = dataRow;
const { isSuperTenant, user: { _scopes } } = useAppContext();
const isSuperAdmin = isSuperTenant && _scopes.includes('apim:admin_settings');
Expand Down Expand Up @@ -68,7 +68,7 @@ function Delete({ updateList, dataRow }) {
triggerIconProps={{
color: 'primary',
component: 'span',
disabled: type === 'default' || (isGlobal && !isSuperAdmin),
disabled: type === 'default' || (isGlobal && !isSuperAdmin) || isDisabled,
}}
>
<DialogContentText>
Expand Down
Loading

0 comments on commit c1943a6

Please sign in to comment.