diff --git a/x-pack/plugins/security/public/views/management/edit_role/components/_index.scss b/x-pack/plugins/security/public/views/management/edit_role/components/_index.scss index b0a4e5ac5ceb6..32b3832e7a9fa 100644 --- a/x-pack/plugins/security/public/views/management/edit_role/components/_index.scss +++ b/x-pack/plugins/security/public/views/management/edit_role/components/_index.scss @@ -1,6 +1,7 @@ @import './collapsible_panel/collapsible_panel'; @import './privileges/kibana/space_aware_privilege_section/index'; @import './privileges/kibana/feature_table/index'; +@import './spaces_popover_list/spaces_popover_list'; .secPrivilegeFeatureIcon { flex-shrink: 0; diff --git a/x-pack/plugins/security/public/views/management/edit_role/components/privileges/kibana/feature_table/feature_table.tsx b/x-pack/plugins/security/public/views/management/edit_role/components/privileges/kibana/feature_table/feature_table.tsx index 11296f51e64bc..2d002b50cfdec 100644 --- a/x-pack/plugins/security/public/views/management/edit_role/components/privileges/kibana/feature_table/feature_table.tsx +++ b/x-pack/plugins/security/public/views/management/edit_role/components/privileges/kibana/feature_table/feature_table.tsx @@ -133,10 +133,9 @@ export class FeatureTable extends Component { ); tooltipElement = ( { return { id: `${featureId}_${priv}`, label: _.capitalize(priv), - // TODO: Waiting on update from EUI isDisabled: !enabledFeaturePrivileges.includes(priv), }; }); @@ -215,7 +213,6 @@ export class FeatureTable extends Component { options.push({ id: `${featureId}_${NO_PRIVILEGE_VALUE}`, label: 'None', - // TODO: Waiting on update from EUI isDisabled: !allowsNone, }); diff --git a/x-pack/plugins/security/public/views/management/edit_role/components/privileges/kibana/space_aware_privilege_section/_privilege_matrix.scss b/x-pack/plugins/security/public/views/management/edit_role/components/privileges/kibana/space_aware_privilege_section/_privilege_matrix.scss index 2866ef2cf7b72..5f9fbced5ee6a 100644 --- a/x-pack/plugins/security/public/views/management/edit_role/components/privileges/kibana/space_aware_privilege_section/_privilege_matrix.scss +++ b/x-pack/plugins/security/public/views/management/edit_role/components/privileges/kibana/space_aware_privilege_section/_privilege_matrix.scss @@ -1,3 +1,12 @@ +/** + * 1. Allow table to scroll both directions + */ + +.secPrivilegeMatrix__modal, +.secPrivilegeMatrix__modal .euiModal__flex { + overflow: hidden; /* 1 */ +} + .secPrivilegeMatrix__row--isBasePrivilege, .secPrivilegeMatrix__cell--isGlobalPrivilege, .secPrivilegeTable__row--isGlobalSpace, { diff --git a/x-pack/plugins/security/public/views/management/edit_role/components/privileges/kibana/space_aware_privilege_section/privilege_display.tsx b/x-pack/plugins/security/public/views/management/edit_role/components/privileges/kibana/space_aware_privilege_section/privilege_display.tsx index fbf01f2288ab1..3ea0877b5dbd6 100644 --- a/x-pack/plugins/security/public/views/management/edit_role/components/privileges/kibana/space_aware_privilege_section/privilege_display.tsx +++ b/x-pack/plugins/security/public/views/management/edit_role/components/privileges/kibana/space_aware_privilege_section/privilege_display.tsx @@ -118,10 +118,10 @@ function getIconTip(iconType?: IconType, tooltipContent?: ReactNode) { return ( { if (this.state.showModal) { modal = ( - + { id: 'xpack.security.management.editRole.spacePrivilegeMatrix.featureColumnTitle', defaultMessage: 'Feature', }), + width: '230px', render: (feature: Feature & { isBase: boolean }) => { return feature.isBase ? ( {feature.name} { }, }, ...spacesColumns.map(item => { + let columnWidth; + if (item.isGlobal) { + columnWidth = '100px'; + } else if (item.spaces.length - SPACES_DISPLAY_COUNT) { + columnWidth = '90px'; + } else { + columnWidth = '80px'; + } + return { // TODO: this is a hacky way to determine if we are looking at the global feature // used for cellProps below... field: item.isGlobal ? 'global' : 'feature', + width: columnWidth, name: (
{item.spaces.slice(0, SPACES_DISPLAY_COUNT).map((space: Space) => ( diff --git a/x-pack/plugins/security/public/views/management/edit_role/components/spaces_popover_list/_spaces_popover_list.scss b/x-pack/plugins/security/public/views/management/edit_role/components/spaces_popover_list/_spaces_popover_list.scss new file mode 100644 index 0000000000000..3a8ce0166b359 --- /dev/null +++ b/x-pack/plugins/security/public/views/management/edit_role/components/spaces_popover_list/_spaces_popover_list.scss @@ -0,0 +1,3 @@ +.secSpacesPopoverList__buttonText { + font-size: $euiFontSizeXS; +} diff --git a/x-pack/plugins/security/public/views/management/edit_role/components/spaces_popover_list/spaces_popover_list.tsx b/x-pack/plugins/security/public/views/management/edit_role/components/spaces_popover_list/spaces_popover_list.tsx index d2657d9c1eb10..0e07bd4ba08fd 100644 --- a/x-pack/plugins/security/public/views/management/edit_role/components/spaces_popover_list/spaces_popover_list.tsx +++ b/x-pack/plugins/security/public/views/management/edit_role/components/spaces_popover_list/spaces_popover_list.tsx @@ -40,7 +40,7 @@ export class SpacesPopoverList extends Component { public render() { const button = ( - {this.props.buttonText} + {this.props.buttonText} );