diff --git a/public/i18n/en/common.json b/public/i18n/en/common.json
index aa9c8d6bb..37696af99 100644
--- a/public/i18n/en/common.json
+++ b/public/i18n/en/common.json
@@ -56,7 +56,7 @@
"TITLE_APPS": "Apps - {{role}}",
"TITLE_DASHBOARD": "Dashboard - {{role}}",
"TITLE_POLICIES": "Policies",
- "TITLE_POLICY": "Policy {{policyId}}",
+ "TITLE_POLICY": "Policy {{policyName}}",
"TITLE_SECRET": "Secret {{secretId}} - {{role}}",
"TITLE_SEALEDSECRET": "Sealed Secret {{secretId}} - {{role}}",
"TITLE_NETPOL": "Network Policy {{secretId}} - {{role}}",
diff --git a/src/App.tsx b/src/App.tsx
index aaa925281..3c72d96c8 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -124,7 +124,12 @@ function App() {
-
+
-
+
diff --git a/src/components/Policy.tsx b/src/components/Policy.tsx
index e9356e800..fe1fbe95e 100644
--- a/src/components/Policy.tsx
+++ b/src/components/Policy.tsx
@@ -7,8 +7,8 @@ import { GetPolicyApiResponse, GetSessionApiResponse } from 'redux/otomiApi'
import { Box, Button } from '@mui/material'
import Form from './rjsf/Form'
-export const getPolicySchema = (policyId): any => {
- const schema = cloneDeep(getSpec().components.schemas.Policies.properties[policyId])
+export const getPolicySchema = (policyName): any => {
+ const schema = cloneDeep(getSpec().components.schemas.Policies.properties[policyName])
return schema
}
@@ -23,10 +23,10 @@ interface Props extends CrudProps {
policy?: GetPolicyApiResponse
onSubmit: (formData: any) => void
editPolicies: boolean
- policyId?: string
+ policyName?: string
}
-export default function ({ policy, teamId, onSubmit, editPolicies, policyId, ...other }: Props): React.ReactElement {
+export default function ({ policy, teamId, onSubmit, editPolicies, policyName, ...other }: Props): React.ReactElement {
const { user } = useSession()
const [data, setData] = useState(policy)
useEffect(() => {
@@ -34,14 +34,14 @@ export default function ({ policy, teamId, onSubmit, editPolicies, policyId, ...
}, [policy])
// END HOOKS
const formData = cloneDeep(data)
- const schema = getPolicySchema(policyId)
+ const schema = getPolicySchema(policyName)
const uiSchema = getPolicyUiSchema(user, teamId)
return (