Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1920674: Fix missingKey errors #7937

Merged
merged 1 commit into from
Jan 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
43 changes: 21 additions & 22 deletions frontend/public/components/RBAC/bindings.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -377,28 +377,6 @@ const ClusterRoleDropdown = (props) => {
);
};

const bindingKinds = [
{
value: 'RoleBinding',
title: i18next.t('bindings~Namespace RoleBinding (RoleBinding)'),
desc: i18next.t(
'bindings~Grant the permissions to a user or set of users within the selected namespace.',
),
},
{
value: 'ClusterRoleBinding',
title: i18next.t('bindings~Cluster-wide RoleBinding (ClusterRoleBinding)'),
desc: i18next.t(
'bindings~Grant the permissions to a user or set of users at the cluster level and in all namespaces.',
),
},
];
const subjectKinds = [
{ value: 'User', title: i18next.t('bindings~User') },
{ value: 'Group', title: i18next.t('bindings~Group') },
{ value: 'ServiceAccount', title: i18next.t('bindings~ServiceAccount') },
];

const Section = ({ label, children }) => (
<div>
<div className="co-form-section__label">{label}</div>
Expand Down Expand Up @@ -522,6 +500,27 @@ class BaseEditRoleBindingWithTranslation extends React.Component {
const { fixed, saveButtonText, t } = this.props;
const RoleDropdown = kind === 'RoleBinding' ? NsRoleDropdown : ClusterRoleDropdown;
const title = `${this.props.titleVerb} ${kindObj(kind).label}`;
const bindingKinds = [
{
value: 'RoleBinding',
title: t('bindings~Namespace role binding (RoleBinding)'),
desc: t(
'bindings~Grant the permissions to a user or set of users within the selected namespace.',
),
},
{
value: 'ClusterRoleBinding',
title: t('bindings~Cluster-wide role binding (ClusterRoleBinding)'),
desc: t(
'bindings~Grant the permissions to a user or set of users at the cluster level and in all namespaces.',
),
},
];
const subjectKinds = [
{ value: 'User', title: t('bindings~User') },
{ value: 'Group', title: t('bindings~Group') },
{ value: 'ServiceAccount', title: t('bindings~ServiceAccount') },
];

return (
<div className="co-m-pane__body">
Expand Down
6 changes: 3 additions & 3 deletions frontend/public/locales/en/bindings.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
"Namespace roles (Role)": "Namespace roles (Role)",
"Select role name": "Select role name",
"Cluster-wide roles (ClusterRole)": "Cluster-wide roles (ClusterRole)",
"Namespace RoleBinding (RoleBinding)": "Namespace RoleBinding (RoleBinding)",
"Please complete all fields.": "Please complete all fields.",
"Namespace role binding (RoleBinding)": "Namespace role binding (RoleBinding)",
"Grant the permissions to a user or set of users within the selected namespace.": "Grant the permissions to a user or set of users within the selected namespace.",
"Cluster-wide RoleBinding (ClusterRoleBinding)": "Cluster-wide RoleBinding (ClusterRoleBinding)",
"Cluster-wide role binding (ClusterRoleBinding)": "Cluster-wide role binding (ClusterRoleBinding)",
"Grant the permissions to a user or set of users at the cluster level and in all namespaces.": "Grant the permissions to a user or set of users at the cluster level and in all namespaces.",
"User": "User",
"Group": "Group",
"ServiceAccount": "ServiceAccount",
"Please complete all fields.": "Please complete all fields.",
"Associate a user/group to the selected role to define the type of access and resources that are allowed.": "Associate a user/group to the selected role to define the type of access and resources that are allowed.",
"Binding type": "Binding type",
"RoleBinding": "RoleBinding",
Expand Down