-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check for indices before enabling get search profile in serverless #201630
Check for indices before enabling get search profile in serverless #201630
Conversation
Pinging @elastic/kibana-management (Team:Kibana Management) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! Small suggestion on the copy to use an active voice 🚗
<EuiToolTip | ||
position="top" | ||
content={i18n.translate('xpack.searchProfiler.formProfileButtonTooltip', { | ||
defaultMessage: 'An index must be created before leveraging Search Profiler', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
defaultMessage: 'An index must be created before leveraging Search Profiler', | |
defaultMessage: 'You must have at least one index to use Search Profiler', |
Attempt to make the sentence active
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your feedback. Changed :)
5832a76
to
c4e45db
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work @SoniaSanzV! Tested locally and all works well. I do have a few things I'd like to discuss further in terms of implementation, but let me know what you think!
x-pack/plugins/searchprofiler/public/application/hooks/use_indices.ts
Outdated
Show resolved
Hide resolved
<EuiText> | ||
{i18n.translate('xpack.searchProfiler.formProfileButtonLabel', { | ||
defaultMessage: 'Profile', | ||
{licenseEnabled && !hasIndices ? ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It feels a bit odd to redefine the button twice based on the conditionals provided, how about we refactor it a little bit to avoid redefining elements? I was thinking perhaps something like this might work:
const isDisabled = !licenseEnabled || !hasIndices;
const tooltipContent = i18n.translate('xpack.searchProfiler.formProfileButtonTooltip', {
defaultMessage: 'You must have at least one index to use Search Profiler',
});
const button = (
<EuiButton
data-test-subj={isDisabled ? 'disabledProfileButton' : 'profileButton'}
fill
disabled={isDisabled}
onClick={!isDisabled ? handleProfileClick : undefined}
>
<EuiText>
{i18n.translate('xpack.searchProfiler.formProfileButtonLabel', {
defaultMessage: 'Profile',
})}
</EuiText>
</EuiButton>
);
...
{isDisabled ? (
<EuiToolTip position="top" content={tooltipContent}>
{button}
</EuiToolTip>
) : (
button
)};
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, I agree is odd. I did this way because the tooltip is only displayed when there is not indices. But I can think on a way of avoiding duplicate code.
); | ||
router.get( | ||
{ | ||
path: '/api/searchprofiler/getIndices', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
path: '/api/searchprofiler/getIndices', | |
path: '/api/searchprofiler/get_indices', |
c55824a
to
b2a6b66
Compare
@florent-leborgne I changed what you requested an added a new tooltip [in code]. It would be shown when the user hasn't a valid license and when it happens we already show a banner at top level ![]() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SoniaSanzV thanks for the ping. Let me know if the suggestion sounds good to you
const isDisabled = !licenseEnabled || !hasIndices; | ||
const tooltipContent = !licenseEnabled | ||
? i18n.translate('xpack.searchProfiler.formProfileButton.noLicenseTooltip', { | ||
defaultMessage: 'You do not have the license to use Search Profiler', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
defaultMessage: 'You do not have the license to use Search Profiler', | |
defaultMessage: 'You need an active license to use Search Profiler', |
Would that work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, that sounds so much better! Changed, thank you!
b2a6b66
to
62b484a
Compare
62b484a
to
510c707
Compare
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for addressing my feedback @SoniaSanzV! Left few more comments, let me know what you think
return response.ok({ | ||
body: { | ||
ok: true, | ||
hasIndices, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a bit strange to me, the api endpoint is called get_indices
so I would be expecting a list of indices but in reality it returns a boolean that says whether it has indices or not.
I think we can rename this api endpoint to then be something slightly more semantic such as has_indices
which clearly reflects that the API checks if indices exists or not. Also we dont need the ok: true
since we have the http status code if needed.
Likewise the useIndices
hook in the UI I think we could also rename to something like useHasIndices
, in order to properly reflect which endpoint is calling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, it makes more sense
useEffect(() => { | ||
setHasIndices(indicesData?.ok ? indicesData?.hasIndices : false); | ||
}, [indicesData]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can remove the complexity of the useEffect and the useState by leveraging the states returned from the useIndices
hook.
const { data: indicesData, isLoading, error } = useIndices();
...
const hasIndices = (isLoading || error) ? false : indicesData?.hasIndices;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job, latest changes lgtm! Just one last comment 🚀
|
||
return response.ok({ | ||
body: { | ||
ok: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont think we need the ok: true
anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i missed that part of your previous comment 😓
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/12163452744 |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Async chunks
Page load bundle
History
cc @SoniaSanzV |
…lastic#201630) Closes [elastic#195342](elastic#195342) ## Summary In serverless, the default query for the search profiler fails if there is not indices. For avoiding this error, when there are no indices present, this PR disabled the "Profile" button and add a tooltip explaining why it is disabled. ### New strings This is the tooltip for string verification @kibana-docs [[Code](https://github.com/elastic/kibana/pull/201630/commits/5832a76683ad0cf55558655ca5981d623f344b72?diff=unified&w=0#diff-bf48cd9834b39a2a1634680225fc63c9a4ddb3ca881d9120f648006ad0277046R154-R1552?diff=unified&w=0#diff-bf48cd9834b39a2a1634680225fc63c9a4ddb3ca881d9120f648006ad0277046R155)]: <img width="460" alt="Screenshot 2024-11-25 at 16 15 08" src="https://github.com/user-attachments/assets/a3395cfb-fc5e-4c22-9dd8-954a60fd1b5d"> ### How to test * Run Kibana in serverless * Go to Index Management and verify you haven't indices (or delete them if you do have indices). * Go to Dev Tools and click the Search Profiler tab. Verify that the button is disabled and the tooltip displayed if you hover over it. * Go back to Index Management and create one or more indices. * Go back to Dev Tools > Search Profiler. Now the button should be enabled and the profile should be created if you click it. ### Demo https://github.com/user-attachments/assets/9bda072e-7897-4418-a906-14807e736c44 ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] 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) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [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 - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: Elastic Machine <[email protected]> (cherry picked from commit 41bd2af)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…ess (#201630) (#202972) # Backport This will backport the following commits from `main` to `8.x`: - [Check for indices before enabling get search profile in serverless (#201630)](#201630) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Sonia Sanz Vivas","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-04T15:53:36Z","message":"Check for indices before enabling get search profile in serverless (#201630)\n\nCloses [#195342](https://github.com/elastic/kibana/issues/195342)\r\n\r\n## Summary\r\nIn serverless, the default query for the search profiler fails if there\r\nis not indices. For avoiding this error, when there are no indices\r\npresent, this PR disabled the \"Profile\" button and add a tooltip\r\nexplaining why it is disabled.\r\n\r\n### New strings\r\nThis is the tooltip for string verification @kibana-docs\r\n[[Code](https://github.com/elastic/kibana/pull/201630/commits/5832a76683ad0cf55558655ca5981d623f344b72?diff=unified&w=0#diff-bf48cd9834b39a2a1634680225fc63c9a4ddb3ca881d9120f648006ad0277046R154-R1552?diff=unified&w=0#diff-bf48cd9834b39a2a1634680225fc63c9a4ddb3ca881d9120f648006ad0277046R155)]:\r\n<img width=\"460\" alt=\"Screenshot 2024-11-25 at 16 15 08\"\r\nsrc=\"https://github.com/user-attachments/assets/a3395cfb-fc5e-4c22-9dd8-954a60fd1b5d\">\r\n\r\n### How to test\r\n* Run Kibana in serverless\r\n* Go to Index Management and verify you haven't indices (or delete them\r\nif you do have indices).\r\n* Go to Dev Tools and click the Search Profiler tab. Verify that the\r\nbutton is disabled and the tooltip displayed if you hover over it.\r\n* Go back to Index Management and create one or more indices.\r\n* Go back to Dev Tools > Search Profiler. Now the button should be\r\nenabled and the profile should be created if you click it.\r\n\r\n### Demo\r\n\r\n\r\nhttps://github.com/user-attachments/assets/9bda072e-7897-4418-a906-14807e736c44\r\n\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following conditions. \r\n\r\nReviewers should verify this PR satisfies this list as well.\r\n\r\n- [ ] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [ ]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] If a plugin configuration key changed, check if it needs to be\r\nallowlisted in the cloud and added to the [docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n- [ ] This was checked for breaking HTTP API changes, and any breaking\r\nchanges have been approved by the breaking-change committee. The\r\n`release_note:breaking` label should be applied in these situations.\r\n- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- [ ] The PR description includes the appropriate Release Notes section,\r\nand the correct `release_note:*` label is applied per the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"41bd2af9f142b97ab6a5deef2444330a8e93f7ed","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Kibana Management","release_note:skip","Feature:Search Profiler","v9.0.0","backport:prev-minor"],"title":"Check for indices before enabling get search profile in serverless","number":201630,"url":"https://github.com/elastic/kibana/pull/201630","mergeCommit":{"message":"Check for indices before enabling get search profile in serverless (#201630)\n\nCloses [#195342](https://github.com/elastic/kibana/issues/195342)\r\n\r\n## Summary\r\nIn serverless, the default query for the search profiler fails if there\r\nis not indices. For avoiding this error, when there are no indices\r\npresent, this PR disabled the \"Profile\" button and add a tooltip\r\nexplaining why it is disabled.\r\n\r\n### New strings\r\nThis is the tooltip for string verification @kibana-docs\r\n[[Code](https://github.com/elastic/kibana/pull/201630/commits/5832a76683ad0cf55558655ca5981d623f344b72?diff=unified&w=0#diff-bf48cd9834b39a2a1634680225fc63c9a4ddb3ca881d9120f648006ad0277046R154-R1552?diff=unified&w=0#diff-bf48cd9834b39a2a1634680225fc63c9a4ddb3ca881d9120f648006ad0277046R155)]:\r\n<img width=\"460\" alt=\"Screenshot 2024-11-25 at 16 15 08\"\r\nsrc=\"https://github.com/user-attachments/assets/a3395cfb-fc5e-4c22-9dd8-954a60fd1b5d\">\r\n\r\n### How to test\r\n* Run Kibana in serverless\r\n* Go to Index Management and verify you haven't indices (or delete them\r\nif you do have indices).\r\n* Go to Dev Tools and click the Search Profiler tab. Verify that the\r\nbutton is disabled and the tooltip displayed if you hover over it.\r\n* Go back to Index Management and create one or more indices.\r\n* Go back to Dev Tools > Search Profiler. Now the button should be\r\nenabled and the profile should be created if you click it.\r\n\r\n### Demo\r\n\r\n\r\nhttps://github.com/user-attachments/assets/9bda072e-7897-4418-a906-14807e736c44\r\n\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following conditions. \r\n\r\nReviewers should verify this PR satisfies this list as well.\r\n\r\n- [ ] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [ ]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] If a plugin configuration key changed, check if it needs to be\r\nallowlisted in the cloud and added to the [docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n- [ ] This was checked for breaking HTTP API changes, and any breaking\r\nchanges have been approved by the breaking-change committee. The\r\n`release_note:breaking` label should be applied in these situations.\r\n- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- [ ] The PR description includes the appropriate Release Notes section,\r\nand the correct `release_note:*` label is applied per the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"41bd2af9f142b97ab6a5deef2444330a8e93f7ed"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/201630","number":201630,"mergeCommit":{"message":"Check for indices before enabling get search profile in serverless (#201630)\n\nCloses [#195342](https://github.com/elastic/kibana/issues/195342)\r\n\r\n## Summary\r\nIn serverless, the default query for the search profiler fails if there\r\nis not indices. For avoiding this error, when there are no indices\r\npresent, this PR disabled the \"Profile\" button and add a tooltip\r\nexplaining why it is disabled.\r\n\r\n### New strings\r\nThis is the tooltip for string verification @kibana-docs\r\n[[Code](https://github.com/elastic/kibana/pull/201630/commits/5832a76683ad0cf55558655ca5981d623f344b72?diff=unified&w=0#diff-bf48cd9834b39a2a1634680225fc63c9a4ddb3ca881d9120f648006ad0277046R154-R1552?diff=unified&w=0#diff-bf48cd9834b39a2a1634680225fc63c9a4ddb3ca881d9120f648006ad0277046R155)]:\r\n<img width=\"460\" alt=\"Screenshot 2024-11-25 at 16 15 08\"\r\nsrc=\"https://github.com/user-attachments/assets/a3395cfb-fc5e-4c22-9dd8-954a60fd1b5d\">\r\n\r\n### How to test\r\n* Run Kibana in serverless\r\n* Go to Index Management and verify you haven't indices (or delete them\r\nif you do have indices).\r\n* Go to Dev Tools and click the Search Profiler tab. Verify that the\r\nbutton is disabled and the tooltip displayed if you hover over it.\r\n* Go back to Index Management and create one or more indices.\r\n* Go back to Dev Tools > Search Profiler. Now the button should be\r\nenabled and the profile should be created if you click it.\r\n\r\n### Demo\r\n\r\n\r\nhttps://github.com/user-attachments/assets/9bda072e-7897-4418-a906-14807e736c44\r\n\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following conditions. \r\n\r\nReviewers should verify this PR satisfies this list as well.\r\n\r\n- [ ] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [ ]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] If a plugin configuration key changed, check if it needs to be\r\nallowlisted in the cloud and added to the [docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n- [ ] This was checked for breaking HTTP API changes, and any breaking\r\nchanges have been approved by the breaking-change committee. The\r\n`release_note:breaking` label should be applied in these situations.\r\n- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- [ ] The PR description includes the appropriate Release Notes section,\r\nand the correct `release_note:*` label is applied per the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"41bd2af9f142b97ab6a5deef2444330a8e93f7ed"}}]}] BACKPORT--> Co-authored-by: Sonia Sanz Vivas <[email protected]>
…lastic#201630) Closes [elastic#195342](elastic#195342) ## Summary In serverless, the default query for the search profiler fails if there is not indices. For avoiding this error, when there are no indices present, this PR disabled the "Profile" button and add a tooltip explaining why it is disabled. ### New strings This is the tooltip for string verification @kibana-docs [[Code](https://github.com/elastic/kibana/pull/201630/commits/5832a76683ad0cf55558655ca5981d623f344b72?diff=unified&w=0#diff-bf48cd9834b39a2a1634680225fc63c9a4ddb3ca881d9120f648006ad0277046R154-R1552?diff=unified&w=0#diff-bf48cd9834b39a2a1634680225fc63c9a4ddb3ca881d9120f648006ad0277046R155)]: <img width="460" alt="Screenshot 2024-11-25 at 16 15 08" src="https://github.com/user-attachments/assets/a3395cfb-fc5e-4c22-9dd8-954a60fd1b5d"> ### How to test * Run Kibana in serverless * Go to Index Management and verify you haven't indices (or delete them if you do have indices). * Go to Dev Tools and click the Search Profiler tab. Verify that the button is disabled and the tooltip displayed if you hover over it. * Go back to Index Management and create one or more indices. * Go back to Dev Tools > Search Profiler. Now the button should be enabled and the profile should be created if you click it. ### Demo https://github.com/user-attachments/assets/9bda072e-7897-4418-a906-14807e736c44 ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] 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) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [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 - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: Elastic Machine <[email protected]>
…lastic#201630) Closes [elastic#195342](elastic#195342) ## Summary In serverless, the default query for the search profiler fails if there is not indices. For avoiding this error, when there are no indices present, this PR disabled the "Profile" button and add a tooltip explaining why it is disabled. ### New strings This is the tooltip for string verification @kibana-docs [[Code](https://github.com/elastic/kibana/pull/201630/commits/5832a76683ad0cf55558655ca5981d623f344b72?diff=unified&w=0#diff-bf48cd9834b39a2a1634680225fc63c9a4ddb3ca881d9120f648006ad0277046R154-R1552?diff=unified&w=0#diff-bf48cd9834b39a2a1634680225fc63c9a4ddb3ca881d9120f648006ad0277046R155)]: <img width="460" alt="Screenshot 2024-11-25 at 16 15 08" src="https://github.com/user-attachments/assets/a3395cfb-fc5e-4c22-9dd8-954a60fd1b5d"> ### How to test * Run Kibana in serverless * Go to Index Management and verify you haven't indices (or delete them if you do have indices). * Go to Dev Tools and click the Search Profiler tab. Verify that the button is disabled and the tooltip displayed if you hover over it. * Go back to Index Management and create one or more indices. * Go back to Dev Tools > Search Profiler. Now the button should be enabled and the profile should be created if you click it. ### Demo https://github.com/user-attachments/assets/9bda072e-7897-4418-a906-14807e736c44 ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] 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) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [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 - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: Elastic Machine <[email protected]>
…lastic#201630) Closes [elastic#195342](elastic#195342) ## Summary In serverless, the default query for the search profiler fails if there is not indices. For avoiding this error, when there are no indices present, this PR disabled the "Profile" button and add a tooltip explaining why it is disabled. ### New strings This is the tooltip for string verification @kibana-docs [[Code](https://github.com/elastic/kibana/pull/201630/commits/5832a76683ad0cf55558655ca5981d623f344b72?diff=unified&w=0#diff-bf48cd9834b39a2a1634680225fc63c9a4ddb3ca881d9120f648006ad0277046R154-R1552?diff=unified&w=0#diff-bf48cd9834b39a2a1634680225fc63c9a4ddb3ca881d9120f648006ad0277046R155)]: <img width="460" alt="Screenshot 2024-11-25 at 16 15 08" src="https://github.com/user-attachments/assets/a3395cfb-fc5e-4c22-9dd8-954a60fd1b5d"> ### How to test * Run Kibana in serverless * Go to Index Management and verify you haven't indices (or delete them if you do have indices). * Go to Dev Tools and click the Search Profiler tab. Verify that the button is disabled and the tooltip displayed if you hover over it. * Go back to Index Management and create one or more indices. * Go back to Dev Tools > Search Profiler. Now the button should be enabled and the profile should be created if you click it. ### Demo https://github.com/user-attachments/assets/9bda072e-7897-4418-a906-14807e736c44 ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] 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) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [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 - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: Elastic Machine <[email protected]>
…lastic#201630) Closes [elastic#195342](elastic#195342) ## Summary In serverless, the default query for the search profiler fails if there is not indices. For avoiding this error, when there are no indices present, this PR disabled the "Profile" button and add a tooltip explaining why it is disabled. ### New strings This is the tooltip for string verification @kibana-docs [[Code](https://github.com/elastic/kibana/pull/201630/commits/5832a76683ad0cf55558655ca5981d623f344b72?diff=unified&w=0#diff-bf48cd9834b39a2a1634680225fc63c9a4ddb3ca881d9120f648006ad0277046R154-R1552?diff=unified&w=0#diff-bf48cd9834b39a2a1634680225fc63c9a4ddb3ca881d9120f648006ad0277046R155)]: <img width="460" alt="Screenshot 2024-11-25 at 16 15 08" src="https://github.com/user-attachments/assets/a3395cfb-fc5e-4c22-9dd8-954a60fd1b5d"> ### How to test * Run Kibana in serverless * Go to Index Management and verify you haven't indices (or delete them if you do have indices). * Go to Dev Tools and click the Search Profiler tab. Verify that the button is disabled and the tooltip displayed if you hover over it. * Go back to Index Management and create one or more indices. * Go back to Dev Tools > Search Profiler. Now the button should be enabled and the profile should be created if you click it. ### Demo https://github.com/user-attachments/assets/9bda072e-7897-4418-a906-14807e736c44 ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] 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) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [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 - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: Elastic Machine <[email protected]>
…lastic#201630) Closes [elastic#195342](elastic#195342) ## Summary In serverless, the default query for the search profiler fails if there is not indices. For avoiding this error, when there are no indices present, this PR disabled the "Profile" button and add a tooltip explaining why it is disabled. ### New strings This is the tooltip for string verification @kibana-docs [[Code](https://github.com/elastic/kibana/pull/201630/commits/5832a76683ad0cf55558655ca5981d623f344b72?diff=unified&w=0#diff-bf48cd9834b39a2a1634680225fc63c9a4ddb3ca881d9120f648006ad0277046R154-R1552?diff=unified&w=0#diff-bf48cd9834b39a2a1634680225fc63c9a4ddb3ca881d9120f648006ad0277046R155)]: <img width="460" alt="Screenshot 2024-11-25 at 16 15 08" src="https://github.com/user-attachments/assets/a3395cfb-fc5e-4c22-9dd8-954a60fd1b5d"> ### How to test * Run Kibana in serverless * Go to Index Management and verify you haven't indices (or delete them if you do have indices). * Go to Dev Tools and click the Search Profiler tab. Verify that the button is disabled and the tooltip displayed if you hover over it. * Go back to Index Management and create one or more indices. * Go back to Dev Tools > Search Profiler. Now the button should be enabled and the profile should be created if you click it. ### Demo https://github.com/user-attachments/assets/9bda072e-7897-4418-a906-14807e736c44 ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] 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) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [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 - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: Elastic Machine <[email protected]>
Closes #195342
Summary
In serverless, the default query for the search profiler fails if there is not indices. For avoiding this error, when there are no indices present, this PR disabled the "Profile" button and add a tooltip explaining why it is disabled.
New strings
This is the tooltip for string verification @kibana-docs [Code]:

How to test
Demo
Screen.Recording.2024-11-25.at.16.02.24.mov
Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
release_note:breaking
label should be applied in these situations.release_note:*
label is applied per the guidelines