[Data set quality] Allow edit failure store#233858
Conversation
|
Pinging @elastic/kibana-management (Team:Kibana Management) |
| /> | ||
| </EuiToolTip> | ||
| )} | ||
| {displayEditFailureStore && canUserReadFailureStore && ( |
There was a problem hiding this comment.
Would canUserReadFailureStore be enough for enabling/disabling/updating failure store?
afaik we have read_failure_store and manage_failure_store, shouldn't all these actions tight to manage_failure_store?
| lastReloadTime={lastReloadTime} | ||
| displayCreateRuleButton={selectedQualityCard === 'degraded'} | ||
| openAlertFlyout={openAlertFlyout} | ||
| displayEditFailureStore={selectedQualityCard === 'failed'} |
There was a problem hiding this comment.
[nit] we could group the display features into one property, e.g.
actions: {
createRule,
editFailureStore,
}
57479c5 to
cc1804d
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR enables editing and disabling of failure store functionality from the dataset quality plugin. Previously, users could only enable failure store from the plugin but couldn't modify or disable it.
Key changes:
- Introduces a new
canManageFailureStoreprivilege to control edit permissions - Adds an edit button (pencil icon) to the failure store card in the document trends section
- Creates a reusable failure store modal hook for managing modal state and operations
Reviewed Changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
x-pack/platform/plugins/shared/dataset_quality/common/constants.ts |
Adds new MANAGE_FAILURE_STORE_PRIVILEGE constant |
x-pack/platform/plugins/shared/dataset_quality/common/api_types.ts |
Updates API types to include canManageFailureStore privilege |
x-pack/platform/plugins/shared/dataset_quality/server/services/privileges.ts |
Updates privilege service to check manage failure store permissions |
x-pack/platform/plugins/shared/dataset_quality/server/routes/data_streams/ |
Updates data stream routes to include manage failure store privilege |
x-pack/platform/plugins/shared/dataset_quality/public/hooks/use_failure_store_modal.ts |
New hook for managing failure store modal state and operations |
x-pack/platform/plugins/shared/dataset_quality/public/components/dataset_quality_details/overview/ |
Updates UI components to display edit button and use new modal hook |
x-pack/platform/plugins/shared/dataset_quality/public/state_machines/ |
Fixes condition check for failure store updates |
| Test files | Adds comprehensive test coverage for the new edit functionality |
...dataset_quality/public/components/dataset_quality_details/overview/document_trends/index.tsx
Show resolved
Hide resolved
...dataset_quality/public/components/dataset_quality_details/overview/document_trends/index.tsx
Show resolved
Hide resolved
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
History
cc @SoniaSanzV |
Closes elastic#231848 ## Summary With elastic#231846 we introduced the possibility for the users to enabling failure store from the data quality plugin, but they couldn't edit or disable it from there. With this PR, we introduce the option of editing failure store from data set quality. ### How to test * Go to data quality plugin * Select a data set * Enable the failure store if disabled * Click the failure store card * Click the new pen icon * Verify the failure store modal opens * Verify that you can edit data and disable the failure store Note: Despite that in the mocks the icon is on the left, I add it to the right so the discover button is consisten with the one that the other card enables. ### Mocks <img width="1846" height="690" alt="image" src="https://github.com/user-attachments/assets/3069ae8c-b276-487a-9104-106f4adfa948" /> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Closes elastic#231848 ## Summary With elastic#231846 we introduced the possibility for the users to enabling failure store from the data quality plugin, but they couldn't edit or disable it from there. With this PR, we introduce the option of editing failure store from data set quality. ### How to test * Go to data quality plugin * Select a data set * Enable the failure store if disabled * Click the failure store card * Click the new pen icon * Verify the failure store modal opens * Verify that you can edit data and disable the failure store Note: Despite that in the mocks the icon is on the left, I add it to the right so the discover button is consisten with the one that the other card enables. ### Mocks <img width="1846" height="690" alt="image" src="https://github.com/user-attachments/assets/3069ae8c-b276-487a-9104-106f4adfa948" /> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Closes elastic#231848 ## Summary With elastic#231846 we introduced the possibility for the users to enabling failure store from the data quality plugin, but they couldn't edit or disable it from there. With this PR, we introduce the option of editing failure store from data set quality. ### How to test * Go to data quality plugin * Select a data set * Enable the failure store if disabled * Click the failure store card * Click the new pen icon * Verify the failure store modal opens * Verify that you can edit data and disable the failure store Note: Despite that in the mocks the icon is on the left, I add it to the right so the discover button is consisten with the one that the other card enables. ### Mocks <img width="1846" height="690" alt="image" src="https://github.com/user-attachments/assets/3069ae8c-b276-487a-9104-106f4adfa948" /> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Closes #231848 ## Summary With #231846 we introduced the possibility for the users to enabling failure store from the data quality plugin, but they couldn't edit or disable it from there. With this PR, we introduce the option of editing failure store from data set quality. ### How to test * Go to data quality plugin * Select a data set * Enable the failure store if disabled * Click the failure store card * Click the new pen icon * Verify the failure store modal opens * Verify that you can edit data and disable the failure store Note: Despite that in the mocks the icon is on the left, I add it to the right so the discover button is consisten with the one that the other card enables. ### Mocks <img width="1846" height="690" alt="image" src="https://github.com/user-attachments/assets/3069ae8c-b276-487a-9104-106f4adfa948" /> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Closes #231848
Summary
With #231846 we introduced the possibility for the users to enabling failure store from the data quality plugin, but they couldn't edit or disable it from there. With this PR, we introduce the option of editing failure store from data set quality.
How to test
Note: Despite that in the mocks the icon is on the left, I add it to the right so the discover button is consisten with the one that the other card enables.
Mocks