-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add error prompts for missing permissions
- Loading branch information
Showing
5 changed files
with
130 additions
and
46 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
.../solutions/search/plugins/search_synonyms/public/components/error_prompt/error_prompt.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* 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 { EuiEmptyPrompt } from '@elastic/eui'; | ||
import { FormattedMessage } from '@kbn/i18n-react'; | ||
|
||
export const ErrorPrompt = () => { | ||
return ( | ||
<EuiEmptyPrompt | ||
iconType="logoEnterpriseSearch" | ||
title={ | ||
<h2> | ||
<FormattedMessage | ||
id="xpack.search.synonyms.errorTitle" | ||
defaultMessage="An error occurred" | ||
/> | ||
</h2> | ||
} | ||
body={ | ||
<p> | ||
<FormattedMessage | ||
id="xpack.search.synonyms.errorDescription" | ||
defaultMessage="An error occured while fetching synonyms. Check Kibana logs for more information." | ||
/> | ||
</p> | ||
} | ||
/> | ||
); | ||
}; |
35 changes: 35 additions & 0 deletions
35
...rch/plugins/search_synonyms/public/components/missing_permissions/missing_permissions.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* 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 { EuiEmptyPrompt } from '@elastic/eui'; | ||
import { FormattedMessage } from '@kbn/i18n-react'; | ||
|
||
export const MissingPermissionsPrompt = () => { | ||
return ( | ||
<EuiEmptyPrompt | ||
iconType="logoEnterpriseSearch" | ||
title={ | ||
<h2> | ||
<FormattedMessage | ||
id="xpack.search.synonyms.missingPermissionsTitle" | ||
defaultMessage="Missing permissions" | ||
/> | ||
</h2> | ||
} | ||
body={ | ||
<p> | ||
<FormattedMessage | ||
id="xpack.search.synonyms.missingPermissionsDescription" | ||
defaultMessage="You do not have the necessary permissions to manage synonyms. Contact your system administrator." | ||
/> | ||
</p> | ||
} | ||
/> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters