Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/packages/console-app/locales/en/console-app.json
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@
"Create {{label}}": "Create {{label}}",
"Edit {{label}}": "Edit {{label}}",
"{helpText}": "{helpText}",
"Create PodDiscruptionBudget": "Create PodDiscruptionBudget",
"Create PodDisruptionBudget": "Create PodDisruptionBudget",
"Disruption not allowed": "Disruption not allowed",
"PodDisruptionBudget": "PodDisruptionBudget",
"No PodDisruptionBudget": "No PodDisruptionBudget",
Expand Down
2 changes: 1 addition & 1 deletion frontend/packages/console-app/locales/es/console-app.json
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@
"Create {{label}}": "Crear {{label}}",
"Edit {{label}}": "Editar {{label}}",
"{helpText}": "{helpText}",
"Create PodDiscruptionBudget": "Crear PodDiscruptionBudget",
"Create PodDisruptionBudget": "Crear PodDisruptionBudget",
"Disruption not allowed": "No se permiten interrupciones",
"PodDisruptionBudget": "PodDisruptionBudget",
"No PodDisruptionBudget": "Sin PodDisruptionBudget",
Expand Down
2 changes: 1 addition & 1 deletion frontend/packages/console-app/locales/fr/console-app.json
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@
"Create {{label}}": "Créer {{label}}",
"Edit {{label}}": "Modifier {{label}}",
"{helpText}": "{helpText}",
"Create PodDiscruptionBudget": "Créer un objet PodDiscruptionBudget",
"Create PodDisruptionBudget": "Créer un objet PodDisruptionBudget",
"Disruption not allowed": "Disruption non autorisée",
"PodDisruptionBudget": "PodDisruptionBudget",
"No PodDisruptionBudget": "Aucun objet PodDisruptionBudget",
Expand Down
2 changes: 1 addition & 1 deletion frontend/packages/console-app/locales/ja/console-app.json
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@
"Create {{label}}": "{{label}} の作成",
"Edit {{label}}": "{{label}} の編集",
"{helpText}": "{helpText}",
"Create PodDiscruptionBudget": "PodDiscruptionBudget の作成",
"Create PodDisruptionBudget": "PodDisruptionBudget の作成",
"Disruption not allowed": "中断できません",
"PodDisruptionBudget": "PodDisruptionBudget",
"No PodDisruptionBudget": "PodDisruptionBudget がありません",
Expand Down
2 changes: 1 addition & 1 deletion frontend/packages/console-app/locales/ko/console-app.json
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@
"Create {{label}}": "{{label}} 만들기",
"Edit {{label}}": "{{label}} 편집",
"{helpText}": "{helpText}",
"Create PodDiscruptionBudget": "PodDiscruptionBudget 만들기",
"Create PodDisruptionBudget": "PodDisruptionBudget 만들기",
"Disruption not allowed": "중단이 허용되지 않음",
"PodDisruptionBudget": "PodDisruptionBudget",
"No PodDisruptionBudget": "PodDisruptionBudget 없음",
Expand Down
2 changes: 1 addition & 1 deletion frontend/packages/console-app/locales/zh/console-app.json
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@
"Create {{label}}": "创建{{label}}",
"Edit {{label}}": "编辑 {{label}}",
"{helpText}": "{helpText}",
"Create PodDiscruptionBudget": "创建 PodDiscruptionBudget",
"Create PodDisruptionBudget": "创建 PodDisruptionBudget",
"Disruption not allowed": "不允许中断",
"PodDisruptionBudget": "PodDisruptionBudget",
"No PodDisruptionBudget": "没有 PodDisruptionBudget",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const PodDisruptionBudgetsPage: React.FC<PodDisruptionBudgetsPageProps> =
<>
<ListPageHeader title={showTitle ? t(PodDisruptionBudgetModel.labelPluralKey) : undefined}>
<ListPageCreate groupVersionKind={resourceKind} createAccessReview={accessReview}>
{t('console-app~Create PodDiscruptionBudget')}
{t('console-app~Create PodDisruptionBudget')}
</ListPageCreate>
</ListPageHeader>
<ListPageBody>
Expand Down
19 changes: 13 additions & 6 deletions frontend/public/components/RBAC/role.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,17 @@ export const RolesPage = ({ namespace, mock, showTitle }) => {
namespace: createNS,
};
const { t } = useTranslation();
const location = useLocation();

const isUserManagementContext =
location.pathname.includes('/k8s/ns/') || location.pathname.includes('/k8s/all-namespaces/');

const resources = [{ kind: 'Role', namespaced: true, optional: mock }];

if (!isUserManagementContext) {
resources.push({ kind: 'ClusterRole', namespaced: false, optional: true });
}

return (
<MultiListPage
ListComponent={RolesList}
Expand All @@ -374,18 +385,14 @@ export const RolesPage = ({ namespace, mock, showTitle }) => {
createAccessReview={accessReview}
createButtonText={t('public~Create Role')}
createProps={{ to: `/k8s/ns/${createNS}/roles/~new` }}
flatten={(resources) => _.flatMap(resources, 'data').filter((r) => !!r)}
resources={[
{ kind: 'Role', namespaced: true, optional: mock },
{ kind: 'ClusterRole', namespaced: false, optional: true },
]}
flatten={(resourceData) => _.flatMap(resourceData, 'data').filter((r) => !!r)}
resources={resources}
rowFilters={[
{
filterGroupName: t('public~Role'),
type: 'role-kind',
reducer: roleType,
items: [
{ id: 'cluster', title: t('public~Cluster-wide Roles') },
{ id: 'namespace', title: t('public~Namespace Roles') },
{ id: 'system', title: t('public~System Roles') },
],
Expand Down