From d4d00cfab1d3bde85df2e2ee10097d5ab25fc932 Mon Sep 17 00:00:00 2001 From: Tim Sullivan Date: Wed, 20 Nov 2024 07:39:41 -0700 Subject: [PATCH] [Spaces UI] Role Editor Flyout Should Match in Roles Mgmt (#198182) ## Summary Part of https://github.com/elastic/kibana-team/issues/1242 **Fixes for alignment of the Role editor flyout** 1. Remove the warning callout regarding global privileges that impact other privileges 1. Unify the info callouts regarding combination of privileges 1. set "Customize" as the default selected option when assigning new privileges 1. update placeholders for selector box when assigning privileges 1. Hide privileges controls if no spaces are selected 1. Update button group label text to "Define privileges" and align helper texts below 1. Align headers for assign/edit states 1. Remove descriptions under headers 1. Update size of info callout above button group to small 1. Reduce text size for the "Manage roles" link 1. Remove the "Additional Stack Management permissions can be found outside of this menu..." test for the Spaces Management context. **Polish fixes** 1. Remove features visible column 1. ~~Remove identifier column from spaces grid~~ 1. Fix vertical alignment of non-current space name in table 1. Ordered the listing of assigned roles during and after search 1. Removing a role from the space shows a confirmation modal 1. Update columns widths in the spaces grid 1. Remove the "By default your current view is Classic" callout ### Checklist Delete any items that are not applicable to this PR. - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [x] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [x] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [x] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) --- .../security/ui_components/kibana.jsonc | 2 +- .../feature_table.test.tsx | 1 + .../kibana_privilege_table/feature_table.tsx | 23 +- .../simple_privilege_section.tsx | 1 + .../privilege_space_form.test.tsx | 77 +---- .../privilege_space_form.tsx | 318 ++++++------------ .../space_selector.tsx | 3 + .../solution_view/solution_view.tsx | 16 - .../edit_space/edit_space_roles_tab.tsx | 44 ++- .../space_assign_role_privilege_form.tsx | 60 ++-- .../space_assigned_roles_table.test.tsx | 4 +- .../component/space_assigned_roles_table.tsx | 28 +- .../spaces_grid/spaces_grid_page.test.tsx | 59 +--- .../spaces_grid/spaces_grid_page.tsx | 71 +--- .../translations/translations/fr-FR.json | 20 +- .../translations/translations/ja-JP.json | 20 +- .../translations/translations/zh-CN.json | 20 +- .../test/accessibility/apps/group1/roles.ts | 4 + 18 files changed, 235 insertions(+), 536 deletions(-) diff --git a/x-pack/packages/security/ui_components/kibana.jsonc b/x-pack/packages/security/ui_components/kibana.jsonc index 1aad2d80ed7f7..996f7b78e110a 100644 --- a/x-pack/packages/security/ui_components/kibana.jsonc +++ b/x-pack/packages/security/ui_components/kibana.jsonc @@ -1,5 +1,5 @@ { - "type": "shared-common", + "type": "shared-browser", "id": "@kbn/security-ui-components", "owner": "@elastic/kibana-security" } diff --git a/x-pack/packages/security/ui_components/src/kibana_privilege_table/feature_table.test.tsx b/x-pack/packages/security/ui_components/src/kibana_privilege_table/feature_table.test.tsx index 2ed172a49ad8b..6e55fa7ed7bbf 100644 --- a/x-pack/packages/security/ui_components/src/kibana_privilege_table/feature_table.test.tsx +++ b/x-pack/packages/security/ui_components/src/kibana_privilege_table/feature_table.test.tsx @@ -54,6 +54,7 @@ const setup = (config: TestConfig) => { kibanaPrivileges={kibanaPrivileges} onChange={onChange} onChangeAll={onChangeAll} + showAdditionalPermissionsMessage={true} canCustomizeSubFeaturePrivileges={config.canCustomizeSubFeaturePrivileges} privilegeIndex={config.privilegeIndex} allSpacesSelected={true} diff --git a/x-pack/packages/security/ui_components/src/kibana_privilege_table/feature_table.tsx b/x-pack/packages/security/ui_components/src/kibana_privilege_table/feature_table.tsx index 2f77b55ce5bac..9ee1ea3517dae 100644 --- a/x-pack/packages/security/ui_components/src/kibana_privilege_table/feature_table.tsx +++ b/x-pack/packages/security/ui_components/src/kibana_privilege_table/feature_table.tsx @@ -45,13 +45,10 @@ interface Props { privilegeIndex: number; onChange: (featureId: string, privileges: string[]) => void; onChangeAll: (privileges: string[]) => void; + showAdditionalPermissionsMessage: boolean; canCustomizeSubFeaturePrivileges: boolean; allSpacesSelected: boolean; disabled?: boolean; - /** - * default is true, to remain backwards compatible - */ - showTitle?: boolean; } interface State { @@ -62,7 +59,6 @@ export class FeatureTable extends Component { public static defaultProps = { privilegeIndex: -1, showLocks: true, - showTitle: true, }; private featureCategories: Map = new Map(); @@ -189,20 +185,7 @@ export class FeatureTable extends Component { return (
- - {this.props.showTitle && ( - - - {i18n.translate( - 'xpack.security.management.editRole.featureTable.featureVisibilityTitle', - { - defaultMessage: 'Customize feature privileges', - } - )} - - - )} - + {!this.props.disabled && ( { }; private getCategoryHelpText = (category: AppCategory) => { - if (category.id === 'management') { + if (category.id === 'management' && this.props.showAdditionalPermissionsMessage) { return i18n.translate( 'xpack.security.management.editRole.featureTable.managementCategoryHelpText', { diff --git a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/simple_privilege_section/simple_privilege_section.tsx b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/simple_privilege_section/simple_privilege_section.tsx index ad6415a1f4fec..b9f4fd8e474a4 100644 --- a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/simple_privilege_section/simple_privilege_section.tsx +++ b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/simple_privilege_section/simple_privilege_section.tsx @@ -226,6 +226,7 @@ export class SimplePrivilegeSection extends Component { privilegeIndex={this.props.role.kibana.findIndex((k) => isGlobalPrivilegeDefinition(k) )} + showAdditionalPermissionsMessage={true} canCustomizeSubFeaturePrivileges={this.props.canCustomizeSubFeaturePrivileges} allSpacesSelected disabled={!this.props.editable} diff --git a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/space_aware_privilege_section/privilege_space_form.test.tsx b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/space_aware_privilege_section/privilege_space_form.test.tsx index fb472191b561d..751db03939dda 100644 --- a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/space_aware_privilege_section/privilege_space_form.test.tsx +++ b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/space_aware_privilege_section/privilege_space_form.test.tsx @@ -19,7 +19,6 @@ import type { Space } from '@kbn/spaces-plugin/public'; import { findTestSubject, mountWithIntl } from '@kbn/test-jest-helpers'; import { PrivilegeSpaceForm } from './privilege_space_form'; -import { SpaceSelector } from './space_selector'; import type { Role } from '../../../../../../../common'; const createRole = (kibana: Role['kibana'] = []): Role => { @@ -57,7 +56,7 @@ const renderComponent = (props: React.ComponentProps) }; describe('PrivilegeSpaceForm', () => { - it('renders an empty form when the role contains no Kibana privileges', () => { + it('renders no form when no role is selected', () => { const role = createRole(); const kibanaPrivileges = createKibanaPrivileges(kibanaFeatures); @@ -71,40 +70,9 @@ describe('PrivilegeSpaceForm', () => { onCancel: jest.fn(), }); - expect( - wrapper.find(EuiButtonGroup).filter('[name="basePrivilegeButtonGroup"]').props().idSelected - ).toEqual(`basePrivilege_custom`); - expect(wrapper.find(FeatureTable).props().disabled).toEqual(true); - expect(getDisplayedFeaturePrivileges(wrapper)).toMatchInlineSnapshot(` - Object { - "excluded_from_base": Object { - "primaryFeaturePrivilege": "none", - "subFeaturePrivileges": Array [], - }, - "no_sub_features": Object { - "primaryFeaturePrivilege": "none", - "subFeaturePrivileges": Array [], - }, - "with_excluded_sub_features": Object { - "primaryFeaturePrivilege": "none", - "subFeaturePrivileges": Array [], - }, - "with_require_all_spaces_for_feature_and_sub_features": Object { - "primaryFeaturePrivilege": "none", - "subFeaturePrivileges": Array [], - }, - "with_require_all_spaces_sub_features": Object { - "primaryFeaturePrivilege": "none", - "subFeaturePrivileges": Array [], - }, - "with_sub_features": Object { - "primaryFeaturePrivilege": "none", - "subFeaturePrivileges": Array [], - }, - } - `); - - expect(findTestSubject(wrapper, 'spaceFormGlobalPermissionsSupersedeWarning')).toHaveLength(0); + expect(wrapper.find(EuiButtonGroup).filter('[name="basePrivilegeButtonGroup"]')).toHaveLength( + 0 + ); }); it('renders when a base privilege is selected', () => { @@ -232,43 +200,6 @@ describe('PrivilegeSpaceForm', () => { expect(findTestSubject(wrapper, 'spaceFormGlobalPermissionsSupersedeWarning')).toHaveLength(0); }); - it('renders a warning when configuring a global privilege after space privileges are already defined', () => { - const role = createRole([ - { - base: [], - feature: { - with_sub_features: ['read'], - }, - spaces: ['foo'], - }, - { - base: [], - feature: { - with_sub_features: ['all'], - }, - spaces: ['*'], - }, - ]); - - const kibanaPrivileges = createKibanaPrivileges(kibanaFeatures); - - const wrapper = renderComponent({ - role, - spaces: displaySpaces, - kibanaPrivileges, - privilegeIndex: -1, - canCustomizeSubFeaturePrivileges: true, - onChange: jest.fn(), - onCancel: jest.fn(), - }); - - wrapper.find(SpaceSelector).props().onChange(['*']); - - wrapper.update(); - - expect(findTestSubject(wrapper, 'globalPrivilegeWarning')).toHaveLength(1); - }); - it('renders a warning when space privileges are less permissive than configured global privileges', () => { const role = createRole([ { diff --git a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/space_aware_privilege_section/privilege_space_form.tsx b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/space_aware_privilege_section/privilege_space_form.tsx index 8275a7b1203ab..5946197d35d69 100644 --- a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/space_aware_privilege_section/privilege_space_form.tsx +++ b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/space_aware_privilege_section/privilege_space_form.tsx @@ -5,7 +5,6 @@ * 2.0. */ -import type { EuiButtonColor } from '@elastic/eui'; import { EuiButton, EuiButtonEmpty, @@ -21,7 +20,6 @@ import { EuiForm, EuiFormRow, EuiSpacer, - EuiText, EuiTitle, } from '@elastic/eui'; import { remove } from 'lodash'; @@ -105,20 +103,19 @@ export class PrivilegeSpaceForm extends Component {

- + {this.state.mode === 'create' ? ( + + ) : ( + + )}

- -

- -

-
{this.getForm()} @@ -180,14 +177,13 @@ export class PrivilegeSpaceForm extends Component { label={i18n.translate( 'xpack.security.management.editRole.spacePrivilegeForm.spaceSelectorFormLabel', { - defaultMessage: 'Spaces', + defaultMessage: 'Select spaces', } )} helpText={i18n.translate( 'xpack.security.management.editRole.spacePrivilegeForm.spaceSelectorFormHelpText', { - defaultMessage: - 'Select one or more Kibana spaces to which you wish to assign privileges.', + defaultMessage: 'Users assigned to this role will gain access to selected spaces.', } )} > @@ -198,99 +194,85 @@ export class PrivilegeSpaceForm extends Component { /> - {this.getPrivilegeCallout()} - - - - - - - - -

{this.getFeatureListLabel(this.state.selectedBasePrivilege.length > 0)}

-
- - - - -

{this.getFeatureListDescription(this.state.selectedBasePrivilege.length > 0)}

-
- - - - 0 || !hasSelectedSpaces} - allSpacesSelected={this.state.selectedSpaceIds.includes(ALL_SPACES_ID)} - /> - - {this.requiresGlobalPrivilegeWarning() && ( - - - - } + {Boolean(this.state.selectedSpaceIds.length) && ( + <> + + + + + + + + + 0 || !hasSelectedSpaces} + allSpacesSelected={this.state.selectedSpaceIds.includes(ALL_SPACES_ID)} /> - + )} ); @@ -298,58 +280,34 @@ export class PrivilegeSpaceForm extends Component { private getSaveButton = () => { const { mode } = this.state; - const isGlobal = this.isDefiningGlobalPrivilege(); let buttonText; switch (mode) { case 'create': - if (isGlobal) { - buttonText = ( - - ); - } else { - buttonText = ( - - ); - } + buttonText = ( + + ); break; case 'update': - if (isGlobal) { - buttonText = ( - - ); - } else { - buttonText = ( - - ); - } + buttonText = ( + + ); break; default: throw new Error(`Unsupported mode: ${mode}`); } - let buttonColor: EuiButtonColor = 'primary'; - if (this.requiresGlobalPrivilegeWarning()) { - buttonColor = 'warning'; - } - return ( {buttonText} @@ -357,65 +315,6 @@ export class PrivilegeSpaceForm extends Component { ); }; - private getFeatureListLabel = (disabled: boolean) => { - if (disabled) { - return i18n.translate( - 'xpack.security.management.editRole.spacePrivilegeForm.summaryOfFeaturePrivileges', - { - defaultMessage: 'Summary of feature privileges', - } - ); - } else { - return i18n.translate( - 'xpack.security.management.editRole.spacePrivilegeForm.customizeFeaturePrivileges', - { - defaultMessage: 'Customize by feature', - } - ); - } - }; - - private getFeatureListDescription = (disabled: boolean) => { - if (disabled) { - return i18n.translate( - 'xpack.security.management.editRole.spacePrivilegeForm.featurePrivilegeSummaryDescription', - { - defaultMessage: - 'Some features might be hidden by the space or affected by a global space privilege.', - } - ); - } else { - return i18n.translate( - 'xpack.security.management.editRole.spacePrivilegeForm.customizeFeaturePrivilegeDescription', - { - defaultMessage: - 'Increase privilege levels on a per feature basis. Some features might be hidden by the space or affected by a global space privilege.', - } - ); - } - }; - - private getPrivilegeCallout = () => { - if (this.isDefiningGlobalPrivilege()) { - return ( - - - - ); - } - - return null; - }; - private closeFlyout = () => { this.props.onCancel(); }; @@ -594,13 +493,4 @@ export class PrivilegeSpaceForm extends Component { }; private isDefiningGlobalPrivilege = () => this.state.selectedSpaceIds.includes('*'); - - private requiresGlobalPrivilegeWarning = () => { - const hasOtherSpacePrivilegesDefined = this.props.role.kibana.length > 0; - return ( - this.state.mode === 'create' && - this.isDefiningGlobalPrivilege() && - hasOtherSpacePrivilegesDefined - ); - }; } diff --git a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/space_aware_privilege_section/space_selector.tsx b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/space_aware_privilege_section/space_selector.tsx index 99e9edb48d556..d7edbdfa59e8b 100644 --- a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/space_aware_privilege_section/space_selector.tsx +++ b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/space_aware_privilege_section/space_selector.tsx @@ -57,6 +57,9 @@ export class SpaceSelector extends Component { aria-label={i18n.translate('xpack.security.management.editRole.spaceSelectorLabel', { defaultMessage: 'Spaces', })} + placeholder={i18n.translate('xpack.security.management.editRole.spaceSelectorPlaceholder', { + defaultMessage: 'Add spaces...', + })} fullWidth options={this.getOptions()} renderOption={renderOption} diff --git a/x-pack/plugins/spaces/public/management/components/solution_view/solution_view.tsx b/x-pack/plugins/spaces/public/management/components/solution_view/solution_view.tsx index 701490be4c4c4..730aef8153340 100644 --- a/x-pack/plugins/spaces/public/management/components/solution_view/solution_view.tsx +++ b/x-pack/plugins/spaces/public/management/components/solution_view/solution_view.tsx @@ -8,7 +8,6 @@ import type { EuiSuperSelectOption, EuiThemeComputed } from '@elastic/eui'; import { EuiBetaBadge, - EuiCallOut, EuiFlexGroup, EuiFlexItem, EuiFormRow, @@ -181,21 +180,6 @@ export const SolutionView: FunctionComponent = ({ isInvalid={validator.validateSolutionView(space, isEditing).isInvalid} /> - - {showClassicDefaultViewCallout && ( - <> - - - - )}
diff --git a/x-pack/plugins/spaces/public/management/edit_space/edit_space_roles_tab.tsx b/x-pack/plugins/spaces/public/management/edit_space/edit_space_roles_tab.tsx index 2e3d40527dbd7..18e11110d7564 100644 --- a/x-pack/plugins/spaces/public/management/edit_space/edit_space_roles_tab.tsx +++ b/x-pack/plugins/spaces/public/management/edit_space/edit_space_roles_tab.tsx @@ -5,9 +5,9 @@ * 2.0. */ -import { EuiFlexGroup, EuiFlexItem, EuiText } from '@elastic/eui'; +import { EuiConfirmModal, EuiFlexGroup, EuiFlexItem, EuiText } from '@elastic/eui'; import type { FC } from 'react'; -import React, { useCallback, useEffect } from 'react'; +import React, { useCallback, useEffect, useState } from 'react'; import type { KibanaFeature } from '@kbn/features-plugin/common'; import { i18n } from '@kbn/i18n'; @@ -40,6 +40,8 @@ export const EditSpaceAssignedRolesTab: FC = ({ space, features, isReadOn invokeClient, } = services; + const [removeRoleConfirm, setRemoveRoleConfirm] = useState(null); + // Roles are already loaded in app state, refresh them when user navigates to this tab useEffect(() => { const getRoles = async () => { @@ -175,7 +177,7 @@ export const EditSpaceAssignedRolesTab: FC = ({ space, features, isReadOn ); return ( - + <> @@ -194,8 +196,8 @@ export const EditSpaceAssignedRolesTab: FC = ({ space, features, isReadOn onClickBulkRemove={async (selectedRoles) => { await removeRole(selectedRoles); }} - onClickRowRemoveAction={async (rowRecord) => { - await removeRole([rowRecord]); + onClickRemoveRoleConfirm={async (rowRecord) => { + setRemoveRoleConfirm(rowRecord); }} onClickAssignNewRole={async () => { showRolesPrivilegeEditor(); @@ -203,6 +205,36 @@ export const EditSpaceAssignedRolesTab: FC = ({ space, features, isReadOn /> - + {removeRoleConfirm && ( + setRemoveRoleConfirm(null)} + onConfirm={() => { + removeRole([removeRoleConfirm]); + setRemoveRoleConfirm(null); + }} + > +

+ +

+
+ )} + ); }; diff --git a/x-pack/plugins/spaces/public/management/edit_space/roles/component/space_assign_role_privilege_form.tsx b/x-pack/plugins/spaces/public/management/edit_space/roles/component/space_assign_role_privilege_form.tsx index 74f2b2fde4667..84859631cdb77 100644 --- a/x-pack/plugins/spaces/public/management/edit_space/roles/component/space_assign_role_privilege_form.tsx +++ b/x-pack/plugins/spaces/public/management/edit_space/roles/component/space_assign_role_privilege_form.tsx @@ -20,7 +20,6 @@ import { EuiFormRow, EuiLink, EuiLoadingSpinner, - EuiSpacer, EuiText, EuiTitle, useGeneratedHtmlId, @@ -31,7 +30,6 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react' import type { KibanaFeature, KibanaFeatureConfig } from '@kbn/features-plugin/common'; import { i18n } from '@kbn/i18n'; -import { FormattedMessage } from '@kbn/i18n-react'; import type { RawKibanaPrivileges, Role, @@ -157,7 +155,7 @@ export const PrivilegesRolesForm: FC = (props) => { const [roleSpacePrivilege, setRoleSpacePrivilege] = useState( !selectedRoles.length || !selectedRolesCombinedPrivileges.length - ? FEATURE_PRIVILEGES_ALL + ? FEATURE_PRIVILEGES_CUSTOM : selectedRolesCombinedPrivileges[0] ); @@ -378,17 +376,19 @@ export const PrivilegesRolesForm: FC = (props) => { { defaultMessage: 'Select roles' } )} labelAppend={ - - {i18n.translate( - 'xpack.spaces.management.spaceDetails.roles.selectRolesFormRowLabelAnchor', - { defaultMessage: 'Manage roles' } - )} - + + + {i18n.translate( + 'xpack.spaces.management.spaceDetails.roles.selectRolesFormRowLabelAnchor', + { defaultMessage: 'Manage roles' } + )} + + } helpText={i18n.translate( 'xpack.spaces.management.spaceDetails.roles.selectRolesHelp', @@ -409,7 +409,7 @@ export const PrivilegesRolesForm: FC = (props) => { )} placeholder={i18n.translate( 'xpack.spaces.management.spaceDetails.roles.selectRolesPlaceholder', - { defaultMessage: 'Add a role...' } + { defaultMessage: 'Add roles...' } )} isLoading={fetchingDataDeps} options={createRolesComboBoxOptions(spaceUnallocatedRoles)} @@ -452,9 +452,9 @@ export const PrivilegesRolesForm: FC = (props) => { iconType="iInCircle" data-test-subj="privilege-info-callout" title={i18n.translate( - 'xpack.spaces.management.spaceDetails.roles.assign.privilegeConflictMsg.title', + 'xpack.spaces.management.spaceDetails.roles.assign.privilegeCombinationMsg.title', { - defaultMessage: 'Privileges will apply only to this space.', + defaultMessage: `The user's resulting access depends on a combination of their role's global space privileges and specific privileges applied to this space.`, } )} /> @@ -464,7 +464,14 @@ export const PrivilegesRolesForm: FC = (props) => { label={i18n.translate( 'xpack.spaces.management.spaceDetails.roles.assign.privilegesLabelText', { - defaultMessage: 'Define role privileges', + defaultMessage: 'Define privileges', + } + )} + helpText={i18n.translate( + 'xpack.spaces.management.spaceDetails.roles.assign.privilegesHelpText', + { + defaultMessage: + 'Assign the privilege level you wish to grant to all present and future features across this space.', } )} > @@ -518,7 +525,6 @@ export const PrivilegesRolesForm: FC = (props) => { ) : ( = (props) => { canCustomizeSubFeaturePrivileges={ license?.getFeatures().allowSubFeaturePrivileges ?? false } + showAdditionalPermissionsMessage={false} /> )} @@ -643,10 +650,10 @@ export const PrivilegesRolesForm: FC = (props) => { > {isEditOperation.current ? i18n.translate('xpack.spaces.management.spaceDetails.roles.updateRoleButton', { - defaultMessage: 'Update', + defaultMessage: 'Update role privileges', }) : i18n.translate('xpack.spaces.management.spaceDetails.roles.assignRoleButton', { - defaultMessage: 'Assign', + defaultMessage: 'Assign roles', })} ); @@ -659,7 +666,7 @@ export const PrivilegesRolesForm: FC = (props) => {

{isEditOperation.current ? i18n.translate('xpack.spaces.management.spaceDetails.roles.assignRoleButton', { - defaultMessage: 'Edit role privileges', + defaultMessage: 'Edit role privileges for space', }) : i18n.translate( 'xpack.spaces.management.spaceDetails.roles.assign.privileges.custom', @@ -669,15 +676,6 @@ export const PrivilegesRolesForm: FC = (props) => { )}

- - -

- -

-
{getForm()} diff --git a/x-pack/plugins/spaces/public/management/edit_space/roles/component/space_assigned_roles_table.test.tsx b/x-pack/plugins/spaces/public/management/edit_space/roles/component/space_assigned_roles_table.test.tsx index f909dba415c41..0ddb633cd1f5c 100644 --- a/x-pack/plugins/spaces/public/management/edit_space/roles/component/space_assigned_roles_table.test.tsx +++ b/x-pack/plugins/spaces/public/management/edit_space/roles/component/space_assigned_roles_table.test.tsx @@ -18,7 +18,7 @@ const defaultProps: Pick< | 'onClickAssignNewRole' | 'onClickBulkRemove' | 'onClickRowEditAction' - | 'onClickRowRemoveAction' + | 'onClickRemoveRoleConfirm' | 'currentSpace' > = { currentSpace: { @@ -29,7 +29,7 @@ const defaultProps: Pick< onClickBulkRemove: jest.fn(), onClickRowEditAction: jest.fn(), onClickAssignNewRole: jest.fn(), - onClickRowRemoveAction: jest.fn(), + onClickRemoveRoleConfirm: jest.fn(), }; const renderTestComponent = ( diff --git a/x-pack/plugins/spaces/public/management/edit_space/roles/component/space_assigned_roles_table.tsx b/x-pack/plugins/spaces/public/management/edit_space/roles/component/space_assigned_roles_table.tsx index ffe7ecba85ec0..f59bd00561671 100644 --- a/x-pack/plugins/spaces/public/management/edit_space/roles/component/space_assigned_roles_table.tsx +++ b/x-pack/plugins/spaces/public/management/edit_space/roles/component/space_assigned_roles_table.tsx @@ -41,7 +41,7 @@ interface ISpaceAssignedRolesTableProps { assignedRoles: Map; onClickAssignNewRole: () => Promise; onClickRowEditAction: (role: Role) => void; - onClickRowRemoveAction: (role: Role) => void; + onClickRemoveRoleConfirm: (role: Role) => void; supportsBulkAction?: boolean; onClickBulkRemove?: (selectedRoles: Role[]) => void; } @@ -67,10 +67,10 @@ const getTableColumns = ({ isReadOnly, currentSpace, onClickRowEditAction, - onClickRowRemoveAction, + onClickRemoveRoleConfirm, }: Pick< ISpaceAssignedRolesTableProps, - 'isReadOnly' | 'onClickRowEditAction' | 'onClickRowRemoveAction' | 'currentSpace' + 'isReadOnly' | 'onClickRowEditAction' | 'onClickRemoveRoleConfirm' | 'currentSpace' >) => { const columns: Array> = [ { @@ -205,7 +205,7 @@ const getTableColumns = ({ { defaultMessage: 'Click this action to remove the user from this space.' } ), available: (rowRecord) => isEditableRole(rowRecord), - onClick: onClickRowRemoveAction, + onClick: onClickRemoveRoleConfirm, }, ], }); @@ -237,14 +237,19 @@ export const SpaceAssignedRolesTable = ({ onClickAssignNewRole, onClickBulkRemove, onClickRowEditAction, - onClickRowRemoveAction, + onClickRemoveRoleConfirm, isReadOnly = false, supportsBulkAction = false, }: ISpaceAssignedRolesTableProps) => { const tableColumns = useMemo( () => - getTableColumns({ isReadOnly, onClickRowEditAction, onClickRowRemoveAction, currentSpace }), - [currentSpace, isReadOnly, onClickRowEditAction, onClickRowRemoveAction] + getTableColumns({ + isReadOnly, + onClickRowEditAction, + onClickRemoveRoleConfirm, + currentSpace, + }), + [currentSpace, isReadOnly, onClickRowEditAction, onClickRemoveRoleConfirm] ); const [rolesInView, setRolesInView] = useState([]); const [selectedRoles, setSelectedRoles] = useState([]); @@ -262,14 +267,17 @@ export const SpaceAssignedRolesTable = ({ const onSearchQueryChange = useCallback>>( ({ query }) => { - const _assignedRolesTransformed = Array.from(assignedRoles.values()); + const assignedRolesTransformed = Array.from(assignedRoles.values()); + const sortedAssignedRolesTransformed = assignedRolesTransformed.sort(sortRolesForListing); if (query?.text) { setRolesInView( - _assignedRolesTransformed.filter((role) => role.name.includes(query.text.toLowerCase())) + sortedAssignedRolesTransformed.filter((role) => + role.name.includes(query.text.toLowerCase()) + ) ); } else { - setRolesInView(_assignedRolesTransformed); + setRolesInView(sortedAssignedRolesTransformed); } }, [assignedRoles] diff --git a/x-pack/plugins/spaces/public/management/spaces_grid/spaces_grid_page.test.tsx b/x-pack/plugins/spaces/public/management/spaces_grid/spaces_grid_page.test.tsx index 169f12c3487c4..7a9cf421d02c9 100644 --- a/x-pack/plugins/spaces/public/management/spaces_grid/spaces_grid_page.test.tsx +++ b/x-pack/plugins/spaces/public/management/spaces_grid/spaces_grid_page.test.tsx @@ -154,12 +154,21 @@ describe('SpacesGridPage', () => { wrapper.update(); expect(wrapper.find('EuiInMemoryTable').prop('items')).toBe(spacesWithSolution); - expect(wrapper.find('EuiInMemoryTable').prop('columns')).toContainEqual({ - field: 'solution', - name: 'Solution view', - sortable: true, - render: expect.any(Function), - }); + expect(wrapper.find('EuiInMemoryTable').prop('columns')).toEqual( + expect.arrayContaining([ + expect.objectContaining({ name: '', field: 'initials' }), + expect.objectContaining({ name: 'Space', field: 'name' }), + expect.objectContaining({ name: 'Description', field: 'description' }), + expect.objectContaining({ name: 'Solution view', field: 'solution' }), + expect.objectContaining({ + actions: expect.arrayContaining([ + expect.objectContaining({ name: 'Edit', icon: 'pencil' }), + expect.objectContaining({ name: 'Switch', icon: 'merge' }), + expect.objectContaining({ name: 'Delete', icon: 'trash' }), + ]), + }), + ]) + ); }); it('renders a "current" badge for the current space', async () => { @@ -413,44 +422,6 @@ describe('SpacesGridPage', () => { }); }); - it(`renders the 'Features visible' column when not serverless`, async () => { - const httpStart = httpServiceMock.createStartContract(); - httpStart.get.mockResolvedValue([]); - - const error = new Error('something awful happened'); - - const notifications = notificationServiceMock.createStartContract(); - - const wrapper = shallowWithIntl( - Promise.reject(error)} - notifications={notifications} - getUrlForApp={getUrlForApp} - history={history} - capabilities={{ - navLinks: {}, - management: {}, - catalogue: {}, - spaces: { manage: true }, - }} - allowSolutionVisibility - {...spacesGridCommonProps} - /> - ); - - // allow spacesManager to load spaces and lazy-load SpaceAvatar - await act(async () => {}); - wrapper.update(); - - expect(wrapper.find('EuiInMemoryTable').prop('columns')).toContainEqual( - expect.objectContaining({ - field: 'disabledFeatures', - name: 'Features visible', - }) - ); - }); - it(`does not render the 'Features visible' column when serverless`, async () => { const httpStart = httpServiceMock.createStartContract(); httpStart.get.mockResolvedValue([]); diff --git a/x-pack/plugins/spaces/public/management/spaces_grid/spaces_grid_page.tsx b/x-pack/plugins/spaces/public/management/spaces_grid/spaces_grid_page.tsx index 586992c1b6b48..10bbde47a106f 100644 --- a/x-pack/plugins/spaces/public/management/spaces_grid/spaces_grid_page.tsx +++ b/x-pack/plugins/spaces/public/management/spaces_grid/spaces_grid_page.tsx @@ -18,8 +18,6 @@ import { EuiPageHeader, EuiPageSection, EuiSpacer, - EuiText, - useIsWithinBreakpoints, } from '@elastic/eui'; import React, { Component, lazy, Suspense } from 'react'; @@ -36,17 +34,12 @@ import { reactRouterNavigate } from '@kbn/kibana-react-plugin/public'; import { addSpaceIdToPath, type Space } from '../../../common'; import { isReservedSpace } from '../../../common'; -import { - DEFAULT_SPACE_ID, - ENTER_SPACE_PATH, - SOLUTION_VIEW_CLASSIC, -} from '../../../common/constants'; +import { DEFAULT_SPACE_ID, ENTER_SPACE_PATH } from '../../../common/constants'; import { getSpacesFeatureDescription } from '../../constants'; import { getSpaceAvatarComponent } from '../../space_avatar'; import { SpaceSolutionBadge } from '../../space_solution_badge'; import type { SpacesManager } from '../../spaces_manager'; import { ConfirmDeleteModal, UnauthorizedPrompt } from '../components'; -import { getEnabledFeatures } from '../lib/feature_utils'; // No need to wrap LazySpaceAvatar in an error boundary, because it is one of the first chunks loaded when opening Kibana. const LazySpaceAvatar = lazy(() => @@ -255,8 +248,7 @@ export class SpacesGridPage extends Component { }; public getColumnConfig() { - const { activeSpace, features } = this.state; - const { solution: activeSolution } = activeSpace ?? {}; + const { activeSpace } = this.state; const config: Array> = [ { @@ -284,15 +276,8 @@ export class SpacesGridPage extends Component { render: (value: string, rowRecord: Space) => { const SpaceName = () => { const isCurrent = this.state.activeSpace?.id === rowRecord.id; - const isWide = useIsWithinBreakpoints(['xl']); - const gridColumns = isCurrent && isWide ? 2 : 1; return ( - + { return ; }, 'data-test-subj': 'spacesListTableRowNameCell', - width: '15%', + width: '20%', }, { field: 'description', @@ -332,55 +317,10 @@ export class SpacesGridPage extends Component { }), sortable: true, truncateText: true, - width: '45%', + width: '40%', }, ]; - const shouldShowFeaturesColumn = - !this.props.isServerless && (!activeSolution || activeSolution === SOLUTION_VIEW_CLASSIC); - if (shouldShowFeaturesColumn) { - config.push({ - field: 'disabledFeatures', - name: i18n.translate('xpack.spaces.management.spacesGridPage.featuresColumnName', { - defaultMessage: 'Features visible', - }), - sortable: (space: Space) => { - return getEnabledFeatures(features, space).length; - }, - render: (_disabledFeatures: string[], rowRecord: Space) => { - const enabledFeatureCount = getEnabledFeatures(features, rowRecord).length; - if (enabledFeatureCount === features.length) { - return ( - - ); - } - if (enabledFeatureCount === 0) { - return ( - - - - ); - } - return ( - - ); - }, - }); - } - config.push({ field: 'id', name: i18n.translate('xpack.spaces.management.spacesGridPage.identifierColumnName', { @@ -405,6 +345,7 @@ export class SpacesGridPage extends Component { render: (solution: Space['solution'], record: Space) => ( ), + width: '10%', }); } diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 4764f793e9d9b..4d6e42bc03fbd 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -3145,6 +3145,8 @@ "esqlEditor.query.EnableWordWrapLabel": "Ajouter des sauts de ligne aux barres verticales", "esqlEditor.query.errorCount": "{count} {count, plural, one {erreur} other {erreurs}}", "esqlEditor.query.errorsTitle": "Erreurs", + "esqlEditor.query.esqlQueriesCopy": "Copier la requête dans le presse-papier", + "esqlEditor.query.esqlQueriesListRun": "Exécuter la requête", "esqlEditor.query.expandLabel": "Développer", "esqlEditor.query.feedback": "Commentaires", "esqlEditor.query.hideQueriesLabel": "Masquer les recherches récentes", @@ -3154,8 +3156,6 @@ "esqlEditor.query.lineNumber": "Ligne {lineNumber}", "esqlEditor.query.querieshistory.error": "La requête a échouée", "esqlEditor.query.querieshistory.success": "La requête a été exécuté avec succès", - "esqlEditor.query.esqlQueriesCopy": "Copier la requête dans le presse-papier", - "esqlEditor.query.esqlQueriesListRun": "Exécuter la requête", "esqlEditor.query.querieshistoryTable": "Tableau d'historique des recherches", "esqlEditor.query.recentQueriesColumnLabel": "Recherches récentes", "esqlEditor.query.refreshLabel": "Actualiser", @@ -36549,7 +36549,6 @@ "xpack.security.management.editRole.featureTable.cannotCustomizeSubFeaturesTooltip": "La personnalisation des privilèges de sous-fonctionnalité est une fonctionnalité soumise à abonnement.", "xpack.security.management.editRole.featureTable.customizeSubFeaturePrivilegesSwitchLabel": "Personnaliser les privilèges des sous-fonctionnalités", "xpack.security.management.editRole.featureTable.featureAccordionSwitchLabel": "{grantedCount}/{featureCount} {featureCount, plural, one {fonctionnalité accordée} other {fonctionnalités accordées}}", - "xpack.security.management.editRole.featureTable.featureVisibilityTitle": "Personnaliser les privilèges des fonctionnalités", "xpack.security.management.editRole.featureTable.managementCategoryHelpText": "Des autorisations de gestion de suite supplémentaires sont disponibles en dehors de ce menu, dans les privilèges d'index et de cluster.", "xpack.security.management.editRole.featureTable.privilegeCustomizationTooltip": "La fonctionnalité possède des privilèges de sous-fonctionnalités personnalisés. Développez cette ligne pour en savoir plus.", "xpack.security.management.editRole.indexPrivilegeForm.clustersFormRowLabel": "Clusters distants", @@ -36609,18 +36608,10 @@ "xpack.security.management.editRole.spaceAwarePrivilegeForm.kibanaAdminTitle": "kibana_admin", "xpack.security.management.editRole.spacePrivilegeForm.basePrivilegeControlLegend": "Privilèges pour toutes les fonctionnalités", "xpack.security.management.editRole.spacePrivilegeForm.cancelButton": "Annuler", - "xpack.security.management.editRole.spacePrivilegeForm.customizeFeaturePrivilegeDescription": "Augmentez les niveaux de privilèges sur la base de chaque fonctionnalité. Certaines fonctionnalités peuvent être masquées par l'espace ou concernées par un privilège d'espace global.", - "xpack.security.management.editRole.spacePrivilegeForm.customizeFeaturePrivileges": "Personnaliser par fonctionnalité", - "xpack.security.management.editRole.spacePrivilegeForm.featurePrivilegeSummaryDescription": "Certaines fonctionnalités peuvent être masquées par l'espace ou concernées par un privilège d'espace global.", - "xpack.security.management.editRole.spacePrivilegeForm.globalPrivilegeNotice": "Ces privilèges s'appliqueront à tous les espaces, actuels et futurs.", - "xpack.security.management.editRole.spacePrivilegeForm.globalPrivilegeWarning": "La création d'un privilège global peut impacter vos autres privilèges liés aux espaces.", - "xpack.security.management.editRole.spacePrivilegeForm.modalHeadline": "Ce rôle aura accès aux espaces suivants", - "xpack.security.management.editRole.spacePrivilegeForm.modalTitle": "Affecter un rôle à l'espace", "xpack.security.management.editRole.spacePrivilegeForm.privilegeSelectorFormHelpText": "Affectez le niveau de privilège que vous souhaitez accorder à toutes les fonctionnalités présentes et futures de cet espace.", "xpack.security.management.editRole.spacePrivilegeForm.privilegeSelectorFormLabel": "Privilèges pour toutes les fonctionnalités", "xpack.security.management.editRole.spacePrivilegeForm.spaceSelectorFormHelpText": "Sélectionnez un ou plusieurs espaces Kibana auxquels vous souhaitez affecter des privilèges.", "xpack.security.management.editRole.spacePrivilegeForm.spaceSelectorFormLabel": "Espaces", - "xpack.security.management.editRole.spacePrivilegeForm.summaryOfFeaturePrivileges": "Résumé des privilèges des fonctionnalités", "xpack.security.management.editRole.spacePrivilegeForm.supersededWarning": "Les privilèges déclarés sont moins flexibles que les privilèges globaux configurés. Affichez le résumé des privilèges pour voir les privilèges effectifs.", "xpack.security.management.editRole.spacePrivilegeForm.supersededWarningTitle": "Remplacé par les privilèges globaux", "xpack.security.management.editRole.spacePrivilegeMatrix.globalSpaceName": "Tous les espaces", @@ -36753,9 +36744,7 @@ "xpack.security.management.editRoles.indexPrivilegeForm.grantedFieldsFormRowHelpText": "Si aucun champ n'est accordé, les utilisateurs affectés à ce rôle ne pourront voir aucune donnée pour cet index.", "xpack.security.management.editRoles.indexPrivilegeForm.grantedFieldsFormRowLabel": "Champs accordés", "xpack.security.management.editRoles.indexPrivilegeForm.grantFieldPrivilegesLabel": "Accorder l'accès aux champs spécifiques", - "xpack.security.management.editRolespacePrivilegeForm.createGlobalPrivilegeButton": "Créer un privilège global", "xpack.security.management.editRolespacePrivilegeForm.createPrivilegeButton": "Ajouter un privilège Kibana", - "xpack.security.management.editRolespacePrivilegeForm.updateGlobalPrivilegeButton": "Mettre à jour le privilège global", "xpack.security.management.editRolespacePrivilegeForm.updatePrivilegeButton": "Mettre à jour le privilège d'espace", "xpack.security.management.enabledBadge": "Activé", "xpack.security.management.readonlyBadge.text": "Lecture seule", @@ -44870,7 +44859,6 @@ "xpack.spaces.management.spaceDetails.footerActions.updateSpace": "Appliquer les modifications", "xpack.spaces.management.spaceDetails.keepEditingButton": "Enregistrer avant de quitter", "xpack.spaces.management.spaceDetails.leavePageButton": "Quitter", - "xpack.spaces.management.spaceDetails.privilegeForm.heading": "Définissez les privilèges qu'un rôle donné devrait avoir dans cet espace.", "xpack.spaces.management.spaceDetails.roles.assign": "Attribuer de nouveaux rôles", "xpack.spaces.management.spaceDetails.roles.assign.privilegeConflictMsg.description": "La mise à jour en groupe des paramètres ici remplacera les paramètres individuels actuels.", "xpack.spaces.management.spaceDetails.roles.assign.privilegeConflictMsg.title": "Les privilèges s'appliqueront uniquement à cet espace.", @@ -44921,7 +44909,6 @@ "xpack.spaces.management.spaceIdentifier.kibanaURLForSpaceIdentifierDescription": "Vous ne pouvez pas modifier l'identifiant d'URL après sa création.", "xpack.spaces.management.spaceIdentifier.urlIdentifierTitle": "Identifiant d'URL", "xpack.spaces.management.spacesGridPage.actionsColumnName": "Actions", - "xpack.spaces.management.spacesGridPage.allFeaturesEnabled": "Toutes les fonctionnalités", "xpack.spaces.management.spacesGridPage.createSpaceButtonLabel": "Créer l'espace", "xpack.spaces.management.spacesGridPage.currentSpaceMarkerText": "actuel", "xpack.spaces.management.spacesGridPage.deleteActionDescription": "Supprimer {spaceName}", @@ -44931,13 +44918,10 @@ "xpack.spaces.management.spacesGridPage.editSpaceActionDescription": "Modifier {spaceName}.", "xpack.spaces.management.spacesGridPage.editSpaceActionName": "Modifier", "xpack.spaces.management.spacesGridPage.errorTitle": "Erreur lors du chargement des espaces", - "xpack.spaces.management.spacesGridPage.featuresColumnName": "Fonctionnalités visibles", "xpack.spaces.management.spacesGridPage.identifierColumnName": "Identificateur", "xpack.spaces.management.spacesGridPage.loadingTitle": "chargement…", - "xpack.spaces.management.spacesGridPage.noFeaturesEnabled": "Aucune fonctionnalité visible", "xpack.spaces.management.spacesGridPage.searchPlaceholder": "Recherche", "xpack.spaces.management.spacesGridPage.solutionColumnName": "Afficher la solution", - "xpack.spaces.management.spacesGridPage.someFeaturesEnabled": "{enabledFeatureCount}/{totalFeatureCount}", "xpack.spaces.management.spacesGridPage.spaceColumnName": "Espace", "xpack.spaces.management.spacesGridPage.spacesTitle": "Espaces", "xpack.spaces.management.spacesGridPage.switchSpaceActionDescription": "Basculer vers {spaceName}", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 882c10f2f83fe..7479c77fffa7a 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -3139,6 +3139,8 @@ "esqlEditor.query.EnableWordWrapLabel": "パイプの改行を追加", "esqlEditor.query.errorCount": "{count} {count, plural, other {# 件のエラー}}", "esqlEditor.query.errorsTitle": "エラー", + "esqlEditor.query.esqlQueriesCopy": "クエリをクリップボードにコピー", + "esqlEditor.query.esqlQueriesListRun": "クエリーを実行", "esqlEditor.query.expandLabel": "拡張", "esqlEditor.query.feedback": "フィードバック", "esqlEditor.query.hideQueriesLabel": "最近のクエリーを非表示", @@ -3148,8 +3150,6 @@ "esqlEditor.query.lineNumber": "行{lineNumber}", "esqlEditor.query.querieshistory.error": "クエリ失敗", "esqlEditor.query.querieshistory.success": "クエリは正常に実行されました", - "esqlEditor.query.esqlQueriesCopy": "クエリをクリップボードにコピー", - "esqlEditor.query.esqlQueriesListRun": "クエリーを実行", "esqlEditor.query.querieshistoryTable": "クエリ履歴テーブル", "esqlEditor.query.recentQueriesColumnLabel": "最近のクエリー", "esqlEditor.query.refreshLabel": "更新", @@ -36517,7 +36517,6 @@ "xpack.security.management.editRole.featureTable.cannotCustomizeSubFeaturesTooltip": "サブ機能権限のカスタマイズはサブスクリプション機能です。", "xpack.security.management.editRole.featureTable.customizeSubFeaturePrivilegesSwitchLabel": "サブ機能権限をカスタマイズする", "xpack.security.management.editRole.featureTable.featureAccordionSwitchLabel": "{grantedCount} / {featureCount} {featureCount, plural, other {機能}}が付与されました", - "xpack.security.management.editRole.featureTable.featureVisibilityTitle": "機能権限をカスタマイズ", "xpack.security.management.editRole.featureTable.managementCategoryHelpText": "追加のスタック管理権限は、このメニューの外にあるインデックス権限とクラスター権限をご覧ください。", "xpack.security.management.editRole.featureTable.privilegeCustomizationTooltip": "機能でサブ機能の権限がカスタマイズされています。この行を展開すると詳細が表示されます。", "xpack.security.management.editRole.indexPrivilegeForm.clustersFormRowLabel": "リモートクラスター", @@ -36577,18 +36576,10 @@ "xpack.security.management.editRole.spaceAwarePrivilegeForm.kibanaAdminTitle": "kibana_admin", "xpack.security.management.editRole.spacePrivilegeForm.basePrivilegeControlLegend": "すべての機能の権限", "xpack.security.management.editRole.spacePrivilegeForm.cancelButton": "キャンセル", - "xpack.security.management.editRole.spacePrivilegeForm.customizeFeaturePrivilegeDescription": "機能ごとに権限のレベルを上げます。機能によってはスペースごとに非表示になっているか、グローバルスペース権限による影響を受けているものもあります。", - "xpack.security.management.editRole.spacePrivilegeForm.customizeFeaturePrivileges": "機能ごとにカスタマイズ", - "xpack.security.management.editRole.spacePrivilegeForm.featurePrivilegeSummaryDescription": "機能によってはスペースごとに非表示になっているか、グローバルスペース権限による影響を受けているものもあります。", - "xpack.security.management.editRole.spacePrivilegeForm.globalPrivilegeNotice": "これらの権限はすべての現在および未来のスペースに適用されます。", - "xpack.security.management.editRole.spacePrivilegeForm.globalPrivilegeWarning": "グローバル権限の作成は他のスペース権限に影響を与える可能性があります。", - "xpack.security.management.editRole.spacePrivilegeForm.modalHeadline": "このロールには、次のスペースへのアクセス権が付与されます", - "xpack.security.management.editRole.spacePrivilegeForm.modalTitle": "ロールをスペースに割り当て", "xpack.security.management.editRole.spacePrivilegeForm.privilegeSelectorFormHelpText": "このスペース全体の現在と将来のすべての機能に対して、付与する権限レベルを割り当てます。", "xpack.security.management.editRole.spacePrivilegeForm.privilegeSelectorFormLabel": "すべての機能の権限", "xpack.security.management.editRole.spacePrivilegeForm.spaceSelectorFormHelpText": "権限を割り当てる1つ以上のKibanaスペースを選択します。", "xpack.security.management.editRole.spacePrivilegeForm.spaceSelectorFormLabel": "スペース", - "xpack.security.management.editRole.spacePrivilegeForm.summaryOfFeaturePrivileges": "機能権限のサマリー", "xpack.security.management.editRole.spacePrivilegeForm.supersededWarning": "宣言された権限は、構成済みグローバル権限よりも許容度が低くなります。権限サマリーを表示すると有効な権限がわかります。", "xpack.security.management.editRole.spacePrivilegeForm.supersededWarningTitle": "グローバル権限に置き換え", "xpack.security.management.editRole.spacePrivilegeMatrix.globalSpaceName": "すべてのスペース", @@ -36721,9 +36712,7 @@ "xpack.security.management.editRoles.indexPrivilegeForm.grantedFieldsFormRowHelpText": "フィールドが提供されていない場合、このロールのユーザーはこのインデックスのデータを表示できません。", "xpack.security.management.editRoles.indexPrivilegeForm.grantedFieldsFormRowLabel": "許可されたフィールド", "xpack.security.management.editRoles.indexPrivilegeForm.grantFieldPrivilegesLabel": "特定のフィールドへのアクセスを許可", - "xpack.security.management.editRolespacePrivilegeForm.createGlobalPrivilegeButton": "グローバル権限を作成", "xpack.security.management.editRolespacePrivilegeForm.createPrivilegeButton": "Kibanaの権限を追加", - "xpack.security.management.editRolespacePrivilegeForm.updateGlobalPrivilegeButton": "グローバル特権を更新", "xpack.security.management.editRolespacePrivilegeForm.updatePrivilegeButton": "スペース権限を更新", "xpack.security.management.enabledBadge": "有効", "xpack.security.management.readonlyBadge.text": "読み取り専用", @@ -44830,7 +44819,6 @@ "xpack.spaces.management.spaceDetails.footerActions.updateSpace": "変更を適用", "xpack.spaces.management.spaceDetails.keepEditingButton": "移動する前に保存", "xpack.spaces.management.spaceDetails.leavePageButton": "移動", - "xpack.spaces.management.spaceDetails.privilegeForm.heading": "このスペースで特定のロールに割り当てる権限を定義します。", "xpack.spaces.management.spaceDetails.roles.assign": "新しいロールを割り当て", "xpack.spaces.management.spaceDetails.roles.assign.privilegeConflictMsg.description": "ここで設定を一括更新すると、現在の個別の設定が上書きされます。", "xpack.spaces.management.spaceDetails.roles.assign.privilegeConflictMsg.title": "権限はこのスペースにのみ適用されます。", @@ -44881,7 +44869,6 @@ "xpack.spaces.management.spaceIdentifier.kibanaURLForSpaceIdentifierDescription": "作成した後はURL識別子を変更できません。", "xpack.spaces.management.spaceIdentifier.urlIdentifierTitle": "URL 識別子", "xpack.spaces.management.spacesGridPage.actionsColumnName": "アクション", - "xpack.spaces.management.spacesGridPage.allFeaturesEnabled": "すべての機能", "xpack.spaces.management.spacesGridPage.createSpaceButtonLabel": "スペースを作成", "xpack.spaces.management.spacesGridPage.currentSpaceMarkerText": "現在", "xpack.spaces.management.spacesGridPage.deleteActionDescription": "{spaceName}を削除", @@ -44891,13 +44878,10 @@ "xpack.spaces.management.spacesGridPage.editSpaceActionDescription": "{spaceName} を編集。", "xpack.spaces.management.spacesGridPage.editSpaceActionName": "編集", "xpack.spaces.management.spacesGridPage.errorTitle": "スペースの読み込みエラー", - "xpack.spaces.management.spacesGridPage.featuresColumnName": "表示される機能", "xpack.spaces.management.spacesGridPage.identifierColumnName": "識別子", "xpack.spaces.management.spacesGridPage.loadingTitle": "読み込み中…", - "xpack.spaces.management.spacesGridPage.noFeaturesEnabled": "表示されている機能がありません", "xpack.spaces.management.spacesGridPage.searchPlaceholder": "検索", "xpack.spaces.management.spacesGridPage.solutionColumnName": "ソリューションビュー", - "xpack.spaces.management.spacesGridPage.someFeaturesEnabled": "{enabledFeatureCount} / {totalFeatureCount}", "xpack.spaces.management.spacesGridPage.spaceColumnName": "スペース", "xpack.spaces.management.spacesGridPage.spacesTitle": "スペース", "xpack.spaces.management.spacesGridPage.switchSpaceActionDescription": "{spaceName}に切り替える", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 80c1c97c301ea..a4d8a624c9108 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -3095,6 +3095,8 @@ "esqlEditor.query.EnableWordWrapLabel": "在管道符上添加换行符", "esqlEditor.query.errorCount": "{count} 个{count, plural, other {错误}}", "esqlEditor.query.errorsTitle": "错误", + "esqlEditor.query.esqlQueriesCopy": "复制查询到剪贴板", + "esqlEditor.query.esqlQueriesListRun": "运行查询", "esqlEditor.query.expandLabel": "展开", "esqlEditor.query.feedback": "反馈", "esqlEditor.query.hideQueriesLabel": "隐藏最近查询", @@ -3104,8 +3106,6 @@ "esqlEditor.query.lineNumber": "第 {lineNumber} 行", "esqlEditor.query.querieshistory.error": "查询失败", "esqlEditor.query.querieshistory.success": "已成功运行查询", - "esqlEditor.query.esqlQueriesCopy": "复制查询到剪贴板", - "esqlEditor.query.esqlQueriesListRun": "运行查询", "esqlEditor.query.querieshistoryTable": "查询历史记录表", "esqlEditor.query.recentQueriesColumnLabel": "最近查询", "esqlEditor.query.refreshLabel": "刷新", @@ -35943,7 +35943,6 @@ "xpack.security.management.editRole.featureTable.cannotCustomizeSubFeaturesTooltip": "定制子功能权限为订阅功能。", "xpack.security.management.editRole.featureTable.customizeSubFeaturePrivilegesSwitchLabel": "定制子功能权限", "xpack.security.management.editRole.featureTable.featureAccordionSwitchLabel": "{grantedCount} / {featureCount} 项{featureCount, plural, other {功能}}已授予", - "xpack.security.management.editRole.featureTable.featureVisibilityTitle": "定制功能权限", "xpack.security.management.editRole.featureTable.managementCategoryHelpText": "可以在此菜单以外、在索引和集群权限中找到其他堆栈管理权限。", "xpack.security.management.editRole.featureTable.privilegeCustomizationTooltip": "功能已定制子功能权限。展开此行以了解更多信息。", "xpack.security.management.editRole.indexPrivilegeForm.clustersFormRowLabel": "远程集群", @@ -36003,18 +36002,10 @@ "xpack.security.management.editRole.spaceAwarePrivilegeForm.kibanaAdminTitle": "kibana_admin", "xpack.security.management.editRole.spacePrivilegeForm.basePrivilegeControlLegend": "所有功能的权限", "xpack.security.management.editRole.spacePrivilegeForm.cancelButton": "取消", - "xpack.security.management.editRole.spacePrivilegeForm.customizeFeaturePrivilegeDescription": "按功能提高权限级别。某些功能可能被工作区隐藏或受全局工作区权限影响。", - "xpack.security.management.editRole.spacePrivilegeForm.customizeFeaturePrivileges": "按功能定制", - "xpack.security.management.editRole.spacePrivilegeForm.featurePrivilegeSummaryDescription": "某些功能可能被工作区隐藏或受全局工作区权限影响。", - "xpack.security.management.editRole.spacePrivilegeForm.globalPrivilegeNotice": "这些权限将应用到所有当前和未来工作区。", - "xpack.security.management.editRole.spacePrivilegeForm.globalPrivilegeWarning": "创建全局权限可能会影响您的其他工作区权限。", - "xpack.security.management.editRole.spacePrivilegeForm.modalHeadline": "必须向此角色授权以下工作区的访问权限", - "xpack.security.management.editRole.spacePrivilegeForm.modalTitle": "将角色分配给工作区", "xpack.security.management.editRole.spacePrivilegeForm.privilegeSelectorFormHelpText": "分配您希望向此工作区的所有现有和未来功能授予的权限级别。", "xpack.security.management.editRole.spacePrivilegeForm.privilegeSelectorFormLabel": "所有功能的权限", "xpack.security.management.editRole.spacePrivilegeForm.spaceSelectorFormHelpText": "选择一个或多个希望分配权限的 Kibana 工作区。", "xpack.security.management.editRole.spacePrivilegeForm.spaceSelectorFormLabel": "工作区", - "xpack.security.management.editRole.spacePrivilegeForm.summaryOfFeaturePrivileges": "功能权限的摘要", "xpack.security.management.editRole.spacePrivilegeForm.supersededWarning": "声明的权限相对配置的全局权限有较小的宽容度。查看权限摘要以查看有效的权限。", "xpack.security.management.editRole.spacePrivilegeForm.supersededWarningTitle": "已由全局权限取代", "xpack.security.management.editRole.spacePrivilegeMatrix.globalSpaceName": "所有工作区", @@ -36146,9 +36137,7 @@ "xpack.security.management.editRoles.indexPrivilegeForm.grantedFieldsFormRowHelpText": "如果未授权任何字段,则分配到此角色的用户将无法查看此索引的任何数据。", "xpack.security.management.editRoles.indexPrivilegeForm.grantedFieldsFormRowLabel": "已授权字段", "xpack.security.management.editRoles.indexPrivilegeForm.grantFieldPrivilegesLabel": "授予对特定字段的访问权限", - "xpack.security.management.editRolespacePrivilegeForm.createGlobalPrivilegeButton": "创建全局权限", "xpack.security.management.editRolespacePrivilegeForm.createPrivilegeButton": "添加 Kibana 权限", - "xpack.security.management.editRolespacePrivilegeForm.updateGlobalPrivilegeButton": "更新全局权限", "xpack.security.management.editRolespacePrivilegeForm.updatePrivilegeButton": "更新工作区权限", "xpack.security.management.enabledBadge": "已启用", "xpack.security.management.readonlyBadge.text": "只读", @@ -44146,7 +44135,6 @@ "xpack.spaces.management.spaceDetails.footerActions.updateSpace": "应用更改", "xpack.spaces.management.spaceDetails.keepEditingButton": "保存然后离开", "xpack.spaces.management.spaceDetails.leavePageButton": "离开", - "xpack.spaces.management.spaceDetails.privilegeForm.heading": "定义给定角色在此工作区中应具有的权限。", "xpack.spaces.management.spaceDetails.roles.assign": "分配新角色", "xpack.spaces.management.spaceDetails.roles.assign.privilegeConflictMsg.description": "在此批量更新设置会覆盖当前的单个设置。", "xpack.spaces.management.spaceDetails.roles.assign.privilegeConflictMsg.title": "权限将仅适用于此工作区。", @@ -44193,7 +44181,6 @@ "xpack.spaces.management.spaceIdentifier.kibanaURLForSpaceIdentifierDescription": "创建后,将无法更改 URL 标识符。", "xpack.spaces.management.spaceIdentifier.urlIdentifierTitle": "URL 标识符", "xpack.spaces.management.spacesGridPage.actionsColumnName": "操作", - "xpack.spaces.management.spacesGridPage.allFeaturesEnabled": "所有功能", "xpack.spaces.management.spacesGridPage.createSpaceButtonLabel": "创建工作区", "xpack.spaces.management.spacesGridPage.currentSpaceMarkerText": "当前", "xpack.spaces.management.spacesGridPage.deleteActionDescription": "删除 {spaceName}", @@ -44203,13 +44190,10 @@ "xpack.spaces.management.spacesGridPage.editSpaceActionDescription": "编辑 {spaceName}。", "xpack.spaces.management.spacesGridPage.editSpaceActionName": "编辑", "xpack.spaces.management.spacesGridPage.errorTitle": "加载工作区时出错", - "xpack.spaces.management.spacesGridPage.featuresColumnName": "功能可见", "xpack.spaces.management.spacesGridPage.identifierColumnName": "标识符", "xpack.spaces.management.spacesGridPage.loadingTitle": "正在加载……", - "xpack.spaces.management.spacesGridPage.noFeaturesEnabled": "没有可见功能", "xpack.spaces.management.spacesGridPage.searchPlaceholder": "搜索", "xpack.spaces.management.spacesGridPage.solutionColumnName": "解决方案视图", - "xpack.spaces.management.spacesGridPage.someFeaturesEnabled": "{enabledFeatureCount}/{totalFeatureCount}", "xpack.spaces.management.spacesGridPage.spaceColumnName": "工作区", "xpack.spaces.management.spacesGridPage.spacesTitle": "工作区", "xpack.spaces.management.spacesGridPage.switchSpaceActionDescription": "切换到 {spaceName}", diff --git a/x-pack/test/accessibility/apps/group1/roles.ts b/x-pack/test/accessibility/apps/group1/roles.ts index cf798bcb853f5..8a9fe187ba35b 100644 --- a/x-pack/test/accessibility/apps/group1/roles.ts +++ b/x-pack/test/accessibility/apps/group1/roles.ts @@ -14,6 +14,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const a11y = getService('a11y'); const esArchiver = getService('esArchiver'); const testSubjects = getService('testSubjects'); + const find = getService('find'); const retry = getService('retry'); const kibanaServer = getService('kibanaServer'); @@ -82,6 +83,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('a11y test for customize feature privilege', async () => { + await testSubjects.click('spaceSelectorComboBox'); + const globalSpaceOption = await find.byCssSelector(`#spaceOption_\\*`); + await globalSpaceOption.click(); await testSubjects.click('featureCategory_kibana'); await a11y.testAppSnapshot(); await testSubjects.click('cancelSpacePrivilegeButton');