diff --git a/dashboard/client/components/+user-management-roles-bindings/add-role-binding-dialog.tsx b/dashboard/client/components/+user-management-roles-bindings/add-role-binding-dialog.tsx index 4bd0e21d0231..4225d7b96fdf 100644 --- a/dashboard/client/components/+user-management-roles-bindings/add-role-binding-dialog.tsx +++ b/dashboard/client/components/+user-management-roles-bindings/add-role-binding-dialog.tsx @@ -9,7 +9,7 @@ import { Dialog, DialogProps } from "../dialog"; import { Wizard, WizardStep } from "../wizard"; import { Select, SelectOption } from "../select"; import { SubTitle } from "../layout/sub-title"; -import { IRoleBindingSubject, RoleBinding, ServiceAccount } from "../../api/endpoints"; +import { IRoleBindingSubject, RoleBinding, ServiceAccount, Role } from "../../api/endpoints"; import { Icon } from "../icon"; import { Input } from "../input"; import { NamespaceSelect } from "../+namespaces/namespace-select"; @@ -152,7 +152,7 @@ export class AddRoleBindingDialog extends React.Component { }; @computed get roleOptions(): BindingSelectOption[] { - let roles = rolesStore.items.filter(KubeObject.isNonSystem); + let roles = rolesStore.items as Role[] if (this.bindContext) { // show only cluster-roles or roles for selected context namespace roles = roles.filter(role => !role.getNs() || role.getNs() === this.bindContext); diff --git a/dashboard/client/components/+user-management-roles-bindings/role-bindings.tsx b/dashboard/client/components/+user-management-roles-bindings/role-bindings.tsx index 700aab0afc19..d026421afc0b 100644 --- a/dashboard/client/components/+user-management-roles-bindings/role-bindings.tsx +++ b/dashboard/client/components/+user-management-roles-bindings/role-bindings.tsx @@ -42,22 +42,6 @@ export class RoleBindings extends React.Component { (binding: RoleBinding) => binding.getSubjectNames(), ]} renderHeaderTitle={Role Bindings} - filterItems={[ - (items: RoleBinding[]) => items.filter(KubeObject.isNonSystem), - ]} - customizeHeader={({ info }) => ({ - info: ( - <> - {info} - Excluded items with "system:" prefix} - /> - - ) - })} renderTableHeader={[ { title: Name, className: "name", sortBy: sortBy.name }, { title: Bindings, className: "bindings", sortBy: sortBy.bindings }, diff --git a/dashboard/client/components/+user-management-roles/roles.tsx b/dashboard/client/components/+user-management-roles/roles.tsx index 3414efd2eb62..56abf1878577 100644 --- a/dashboard/client/components/+user-management-roles/roles.tsx +++ b/dashboard/client/components/+user-management-roles/roles.tsx @@ -10,8 +10,6 @@ import { rolesStore } from "./roles.store"; import { clusterRoleApi, Role, roleApi } from "../../api/endpoints"; import { KubeObjectListLayout } from "../kube-object"; import { AddRoleDialog } from "./add-role-dialog"; -import { Icon } from "../icon"; -import { KubeObject } from "../../api/kube-object"; import { apiManager } from "../../api/api-manager"; enum sortBy { @@ -39,23 +37,7 @@ export class Roles extends React.Component { searchFilters={[ (role: Role) => role.getSearchFields(), ]} - filterItems={[ - (items: Role[]) => items.filter(KubeObject.isNonSystem), - ]} renderHeaderTitle={Roles} - customizeHeader={({ info }) => ({ - info: ( - <> - {info} - Excluded items with "system:" prefix} - /> - - ) - })} renderTableHeader={[ { title: Name, className: "name", sortBy: sortBy.name }, { title: Namespace, className: "namespace", sortBy: sortBy.namespace },