Skip to content

Commit

Permalink
[ML] Data Frame Analytics: ensure option to delete data view is avail…
Browse files Browse the repository at this point in the history
…able when deleting job (elastic#174381)

## Summary

This PR sets refresh option to true when fetching existing Data Views to
ensure the data view exists check is up to date when deleting a newly
created job.


### Checklist

Delete any items that are not applicable to this PR.

- [ ] 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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [ ] 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 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))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
2 people authored and delanni committed Jan 11, 2024
1 parent feaee09 commit 29598a4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const useDeleteAction = (canDeleteDataFrameAnalytics: boolean) => {

const checkDataViewExists = async () => {
try {
const dv = (await dataViews.getIdsWithTitle()).find(({ title }) => title === indexName);
const dv = (await dataViews.getIdsWithTitle(true)).find(({ title }) => title === indexName);
if (dv !== undefined) {
setDataViewExists(true);
} else {
Expand Down

0 comments on commit 29598a4

Please sign in to comment.