mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Update role mappings empty UI for consistency (#162357)
## Summary Fixes #161137 Update style of empty role mappings prompt to meet consistency.  Update icon of create api key button of empty api key prompt.  ### Checklist Delete any items that are not applicable to this PR. - [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) ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Jeramy Soucy <jeramy.soucy@elastic.co>
This commit is contained in:
parent
7b2a00a712
commit
2d17d753ef
5 changed files with 13 additions and 18 deletions
|
@ -147,7 +147,7 @@ export const ApiKeysEmptyPrompt: FunctionComponent<ApiKeysEmptyPromptProps> = ({
|
|||
|
||||
return (
|
||||
<KibanaPageTemplate.EmptyPrompt
|
||||
iconType="gear"
|
||||
iconType="managementApp"
|
||||
title={
|
||||
<h1>
|
||||
<FormattedMessage
|
||||
|
|
|
@ -198,7 +198,7 @@ export class APIKeysGridPage extends Component<Props, State> {
|
|||
<EuiButton
|
||||
{...reactRouterNavigate(this.props.history, '/create')}
|
||||
fill
|
||||
iconType="plusInCircleFilled"
|
||||
iconType="plusInCircle"
|
||||
data-test-subj="apiKeysCreatePromptButton"
|
||||
href={'/'}
|
||||
>
|
||||
|
|
|
@ -21,6 +21,7 @@ interface CreateRoleMappingButtonProps {
|
|||
export const CreateRoleMappingButton = ({ history }: CreateRoleMappingButtonProps) => {
|
||||
return (
|
||||
<EuiButton
|
||||
iconType="plusInCircle"
|
||||
data-test-subj="createRoleMappingButton"
|
||||
{...reactRouterNavigate(history, EDIT_ROLE_MAPPING_PATH)}
|
||||
fill
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { EuiEmptyPrompt } from '@elastic/eui';
|
||||
import React, { Fragment } from 'react';
|
||||
import React from 'react';
|
||||
|
||||
import type { ScopedHistory } from '@kbn/core/public';
|
||||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
import { KibanaPageTemplate } from '@kbn/shared-ux-page-kibana-template';
|
||||
|
||||
import { CreateRoleMappingButton } from '../create_role_mapping_button';
|
||||
|
||||
|
@ -22,7 +22,7 @@ export const EmptyPrompt: React.FunctionComponent<EmptyPromptProps> = ({
|
|||
history,
|
||||
readOnly = false,
|
||||
}) => (
|
||||
<EuiEmptyPrompt
|
||||
<KibanaPageTemplate.EmptyPrompt
|
||||
iconType="managementApp"
|
||||
title={
|
||||
<h1>
|
||||
|
@ -40,14 +40,12 @@ export const EmptyPrompt: React.FunctionComponent<EmptyPromptProps> = ({
|
|||
</h1>
|
||||
}
|
||||
body={
|
||||
<Fragment>
|
||||
<p>
|
||||
<FormattedMessage
|
||||
id="xpack.security.management.roleMappings.emptyPromptDescription"
|
||||
defaultMessage="Role mappings control which roles are assigned to your users."
|
||||
/>
|
||||
</p>
|
||||
</Fragment>
|
||||
<p>
|
||||
<FormattedMessage
|
||||
id="xpack.security.management.roleMappings.emptyPromptDescription"
|
||||
defaultMessage="Role mappings control which roles are assigned to your users."
|
||||
/>
|
||||
</p>
|
||||
}
|
||||
actions={readOnly ? null : <CreateRoleMappingButton history={history} />}
|
||||
data-test-subj="roleMappingsEmptyPrompt"
|
||||
|
|
|
@ -136,11 +136,7 @@ export class RoleMappingsGridPage extends Component<Props, State> {
|
|||
}
|
||||
|
||||
if (loadState === 'finished' && roleMappings && roleMappings.length === 0) {
|
||||
return (
|
||||
<EuiPageSection alignment="center" color="subdued">
|
||||
<EmptyPrompt history={this.props.history} readOnly={this.props.readOnly} />
|
||||
</EuiPageSection>
|
||||
);
|
||||
return <EmptyPrompt history={this.props.history} readOnly={this.props.readOnly} />;
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue