mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
# Backport This will backport the following commits from `main` to `8.15`: - [[Obs AI Assistant] Fix AI Assistant Settings when plugin disabled (#188160)](https://github.com/elastic/kibana/pull/188160) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Sandra G","email":"neptunian@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-07-15T17:58:02Z","message":"[Obs AI Assistant] Fix AI Assistant Settings when plugin disabled (#188160)\n\n## Summary\r\n\r\nFixes https://github.com/elastic/kibana/issues/187977\r\n\r\nAI Assistant settings page doesn't load when the plugin is disabled. \r\n\r\n### Changes\r\n\r\n- fixes not checking for object before accessing property\r\n- simplifies message so it makes sense for all possible states (read\r\nonly, disabled in space, plugin disabled)\r\n\r\n### Testing steps\r\n- create a Viewer user\r\n- go to Stack Management -> Advanced Settings -> AI Assistant\r\n- page should load with message that the feature is disabled\r\n\r\n<img width=\"804\" alt=\"Screenshot 2024-07-11 at 4 57 59 PM\"\r\nsrc=\"https://github.com/user-attachments/assets/98cf85a2-913f-43fd-a5f0-df4494faaf1f\">","sha":"d4ba87988da61dc793ba5982fa0bbc28034bf449","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","Team:Obs AI Assistant","v8.15.0","v8.16.0"],"title":"[Obs AI Assistant] Fix AI Assistant Settings when plugin disabled","number":188160,"url":"https://github.com/elastic/kibana/pull/188160","mergeCommit":{"message":"[Obs AI Assistant] Fix AI Assistant Settings when plugin disabled (#188160)\n\n## Summary\r\n\r\nFixes https://github.com/elastic/kibana/issues/187977\r\n\r\nAI Assistant settings page doesn't load when the plugin is disabled. \r\n\r\n### Changes\r\n\r\n- fixes not checking for object before accessing property\r\n- simplifies message so it makes sense for all possible states (read\r\nonly, disabled in space, plugin disabled)\r\n\r\n### Testing steps\r\n- create a Viewer user\r\n- go to Stack Management -> Advanced Settings -> AI Assistant\r\n- page should load with message that the feature is disabled\r\n\r\n<img width=\"804\" alt=\"Screenshot 2024-07-11 at 4 57 59 PM\"\r\nsrc=\"https://github.com/user-attachments/assets/98cf85a2-913f-43fd-a5f0-df4494faaf1f\">","sha":"d4ba87988da61dc793ba5982fa0bbc28034bf449"}},"sourceBranch":"main","suggestedTargetBranches":["8.15"],"targetPullRequestStates":[{"branch":"8.15","label":"v8.15.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/188160","number":188160,"mergeCommit":{"message":"[Obs AI Assistant] Fix AI Assistant Settings when plugin disabled (#188160)\n\n## Summary\r\n\r\nFixes https://github.com/elastic/kibana/issues/187977\r\n\r\nAI Assistant settings page doesn't load when the plugin is disabled. \r\n\r\n### Changes\r\n\r\n- fixes not checking for object before accessing property\r\n- simplifies message so it makes sense for all possible states (read\r\nonly, disabled in space, plugin disabled)\r\n\r\n### Testing steps\r\n- create a Viewer user\r\n- go to Stack Management -> Advanced Settings -> AI Assistant\r\n- page should load with message that the feature is disabled\r\n\r\n<img width=\"804\" alt=\"Screenshot 2024-07-11 at 4 57 59 PM\"\r\nsrc=\"https://github.com/user-attachments/assets/98cf85a2-913f-43fd-a5f0-df4494faaf1f\">","sha":"d4ba87988da61dc793ba5982fa0bbc28034bf449"}}]}] BACKPORT--> Co-authored-by: Sandra G <neptunian@users.noreply.github.com>
This commit is contained in:
parent
3a35a1ed94
commit
269f0bc35f
1 changed files with 2 additions and 4 deletions
|
@ -24,8 +24,7 @@ import { useAppContext } from '../../app_context';
|
|||
|
||||
export function AiAssistantSelectionPage() {
|
||||
const { capabilities, setBreadcrumbs, navigateToApp } = useAppContext();
|
||||
|
||||
const observabilityAIAssistantEnabled = capabilities.observabilityAIAssistant.show;
|
||||
const observabilityAIAssistantEnabled = capabilities.observabilityAIAssistant?.show;
|
||||
const securityAIAssistantEnabled = capabilities.securitySolutionAssistant?.['ai-assistant'];
|
||||
|
||||
useEffect(() => {
|
||||
|
@ -78,8 +77,7 @@ export function AiAssistantSelectionPage() {
|
|||
title={i18n.translate(
|
||||
'aiAssistantManagementSelection.aiAssistantSelectionPage.observabilityAi.thisFeatureIsDisabledCallOutLabel',
|
||||
{
|
||||
defaultMessage:
|
||||
'This feature is disabled. It can be enabled from Spaces > Features.',
|
||||
defaultMessage: 'This feature is disabled.',
|
||||
}
|
||||
)}
|
||||
size="s"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue