updateValue(e.target.value)}
- />
-
- {filteredResults.length > 0 ? (
-
-
- {EXTERNAL_ATTRIBUTE_LABEL}
- {ATTRIBUTE_VALUE_LABEL}
- {ROLE_LABEL}
- {accessHeader}
- {shouldShowAuthProvider && (
- {AUTH_PROVIDER_LABEL}
- )}
-
-
-
- {filteredResults.map(
- ({ id, authProvider, rules, roleType, accessAllEngines, accessItems, toolTip }) => (
-
- {getFirstAttributeName(rules)}
-
- {getFirstAttributeValue(rules)}
-
- {roleType}
-
- {accessAllEngines ? (
- ALL_LABEL
- ) : (
- <>
- {accessItems.length === 0
- ? noItemsPlaceholder
- : accessItems.map(({ name }) => (
-
- {name}
-
-
- ))}
- >
- )}
-
- {shouldShowAuthProvider && (
-
- {authProvider.map(getAuthProviderDisplayValue).join(', ')}
-
- )}
-
- {id && rowActions(id)}
- {toolTip && }
-
-
- )
- )}
-
-
- ) : (
-
- {i18n.translate('xpack.enterpriseSearch.roleMapping.moResults.message', {
- defaultMessage: "No results found for '{filterValue}'",
- values: { filterValue },
- })}
-
- )}
- >
+
);
};
diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/role_mapping/users_and_roles_row_actions.test.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/role_mapping/users_and_roles_row_actions.test.tsx
new file mode 100644
index 00000000000000..dbb47b50d40669
--- /dev/null
+++ b/x-pack/plugins/enterprise_search/public/applications/shared/role_mapping/users_and_roles_row_actions.test.tsx
@@ -0,0 +1,46 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import React from 'react';
+
+import { shallow } from 'enzyme';
+
+import { EuiButtonIcon } from '@elastic/eui';
+
+import { UsersAndRolesRowActions } from './users_and_roles_row_actions';
+
+describe('UsersAndRolesRowActions', () => {
+ const onManageClick = jest.fn();
+ const onDeleteClick = jest.fn();
+
+ const props = {
+ onManageClick,
+ onDeleteClick,
+ };
+
+ it('renders', () => {
+ const wrapper = shallow();
+
+ expect(wrapper.find(EuiButtonIcon)).toHaveLength(2);
+ });
+
+ it('handles manage click', () => {
+ const wrapper = shallow();
+ const button = wrapper.find(EuiButtonIcon).first();
+ button.simulate('click');
+
+ expect(onManageClick).toHaveBeenCalled();
+ });
+
+ it('handles delete click', () => {
+ const wrapper = shallow();
+ const button = wrapper.find(EuiButtonIcon).last();
+ button.simulate('click');
+
+ expect(onDeleteClick).toHaveBeenCalled();
+ });
+});
diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/role_mapping/users_and_roles_row_actions.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/role_mapping/users_and_roles_row_actions.tsx
new file mode 100644
index 00000000000000..3d956c0aabd688
--- /dev/null
+++ b/x-pack/plugins/enterprise_search/public/applications/shared/role_mapping/users_and_roles_row_actions.tsx
@@ -0,0 +1,24 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import React from 'react';
+
+import { EuiButtonIcon } from '@elastic/eui';
+
+import { MANAGE_BUTTON_LABEL, DELETE_BUTTON_LABEL } from '../constants';
+
+interface Props {
+ onManageClick(): void;
+ onDeleteClick(): void;
+}
+
+export const UsersAndRolesRowActions: React.FC = ({ onManageClick, onDeleteClick }) => (
+ <>
+ {' '}
+
+ >
+);
diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json
index 13ec1efeb1bec1..ad68b7180c8966 100644
--- a/x-pack/plugins/translations/translations/ja-JP.json
+++ b/x-pack/plugins/translations/translations/ja-JP.json
@@ -7966,7 +7966,7 @@
"xpack.enterpriseSearch.roleMapping.filterRoleMappingsPlaceholder": "ロールをフィルタリング...",
"xpack.enterpriseSearch.roleMapping.individualAuthProviderLabel": "個別の認証プロバイダーを選択",
"xpack.enterpriseSearch.roleMapping.manageRoleMappingTitle": "ロールマッピングを管理",
- "xpack.enterpriseSearch.roleMapping.moResults.message": "'{filterValue}'の結果が見つかりません。",
+ "xpack.enterpriseSearch.roleMapping.noResults.message": "の結果が見つかりません。",
"xpack.enterpriseSearch.roleMapping.newRoleMappingTitle": "ロールマッピングを追加",
"xpack.enterpriseSearch.roleMapping.roleLabel": "ロール",
"xpack.enterpriseSearch.roleMapping.roleMappingsTitle": "ユーザーとロール",
diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json
index efa055e06bc405..a25a7438bcd167 100644
--- a/x-pack/plugins/translations/translations/zh-CN.json
+++ b/x-pack/plugins/translations/translations/zh-CN.json
@@ -8034,7 +8034,7 @@
"xpack.enterpriseSearch.roleMapping.filterRoleMappingsPlaceholder": "筛选角色......",
"xpack.enterpriseSearch.roleMapping.individualAuthProviderLabel": "选择单个身份验证提供程序",
"xpack.enterpriseSearch.roleMapping.manageRoleMappingTitle": "管理角色映射",
- "xpack.enterpriseSearch.roleMapping.moResults.message": "找不到“{filterValue}”的结果",
+ "xpack.enterpriseSearch.roleMapping.noResults.message": "找不到的结果",
"xpack.enterpriseSearch.roleMapping.newRoleMappingTitle": "添加角色映射",
"xpack.enterpriseSearch.roleMapping.roleLabel": "角色",
"xpack.enterpriseSearch.roleMapping.roleMappingsTitle": "用户和角色",