Skip to content
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

Watcher UI - allow sorting options for State, Condition last met, Last checked and Comment columns #164126

Closed
hp0620 opened this issue Aug 17, 2023 · 5 comments · Fixed by #170085
Assignees
Labels
Feature:Watcher Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more

Comments

@hp0620
Copy link

hp0620 commented Aug 17, 2023

Describe the feature:

Feature I
Currently with 8.8.2 versions of Watcher UI under Stack Management, users have only 2 sorting options, which are ID and Name.

The sorting works as expected on those 2 columns, but sorting against other columns in Watcher UI, such as State, Condition last met, Last checked, and Comment do not work, which makes it very difficult to navigate if you have hundreds of watchers.

The sorting on the other columns somewhat works as they do re-arrange when users click on the column title. However, when users re-click on the column title to re-shuffle the order on State, Condition last met, Last checked, and Comment, the result sets already rendered are stuck and they do not re-arrange until users click on either the Name or ID column to reshuffle the deck.

Screenshot 2023-08-16 at 8 43 28 PM

A complete sorting options using the up or down arrow on these columns will make navigation on multiple watchers much easier, to identify which ones are active, depending on the last run, etc which is critical in enterprise size use case.

Feature II
In order to edit the watcher, users will have to navigate back to the main Watcher configuration and click on the pencil icon. It would be nice to have an Edit button within the Action status page, so users can jump directly to the Edit page when they identify the Watcher needs modification.

@botelastic botelastic bot added the needs-team Issues missing a team label label Aug 17, 2023
@alisonelizabeth alisonelizabeth added the Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more label Aug 17, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/platform-deployment-management (Team:Deployment Management)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Aug 17, 2023
@PixelOrange
Copy link

PixelOrange commented Aug 17, 2023

I would argue that Feature 1 is a bug not a feature request. The columns are clickable which suggests that they should be sortable. With hundreds of watchers, it's very difficult to see which ones are in an error state without the ability to sort them. Scrolling through each page to check is both tedious and error prone.

Feature 2 is a quality of life request. It's not a bug but every person I've talked to regarding Watcher (including elastic support) says that they accidentally click on the watcher name and not the edit icon. Since Kibana does not save your search results you have to go back to the previous page, re-search, and click on the appropriate icon. It's not intuitive and is very frustrating.

@Erikg346
Copy link

Erikg346 commented Oct 6, 2023

I agree, Watcher UI needs to be easier to manage.

@ElenaStoeva
Copy link
Contributor

ElenaStoeva commented Oct 23, 2023

@elastic/platform-deployment-management Just a few notes on the implementation:

Currently, Watcher fetches all watches by sending a search request on the .watches system index here, and we recently received a recommendation from Es team (#152142) to replace this with the Query Watch API. We started working on this (#154143) but it turned out that this work depends on an enhancement from the Es side: elastic/elasticsearch#95464

With that being said, I'm not sure if there is an easy way to sort the watches with the current logic - the only way I can think of right now is by sorting the watches client-side after we fetched them through searching the system index. However, if we first convert to the Query Watches API, we could easily utilise the sort parameter to sort the watches on Es side.

@Ikuni17
Copy link
Contributor

Ikuni17 commented Oct 28, 2023

I've added #170085 for the sorting portion of this issue. I think Feature II should be it's own new issue because it's not really relevant to the sorting bug. cc @alisonelizabeth

Ikuni17 added a commit that referenced this issue Oct 30, 2023
## Summary
Closes #164126

EUI in memory tables need to have stable headers between renders to sort
properly when the header is a JSX element
([Docs](https://eui.elastic.co/#/tabular-content/in-memory-tables)).
This PR stabilizes the headers for `WatchListPage` only. I noticed there
were some other columns which likely have the same issue in Watcher, but
I'm unsure how far reaching these changes need to be. Reading through
the issue @ElenaStoeva mentions changing the sorting anyways, so a quick
fix seems more appropriate.


![Untitled](https://github.com/elastic/kibana/assets/14021797/7d79c576-58b8-4ef5-a713-b87a3c52ea19)


## Release Note
Fixed issue where certain columns in the Watcher table were not sorting
properly.
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Oct 30, 2023
## Summary
Closes elastic#164126

EUI in memory tables need to have stable headers between renders to sort
properly when the header is a JSX element
([Docs](https://eui.elastic.co/#/tabular-content/in-memory-tables)).
This PR stabilizes the headers for `WatchListPage` only. I noticed there
were some other columns which likely have the same issue in Watcher, but
I'm unsure how far reaching these changes need to be. Reading through
the issue @ElenaStoeva mentions changing the sorting anyways, so a quick
fix seems more appropriate.

![Untitled](https://github.com/elastic/kibana/assets/14021797/7d79c576-58b8-4ef5-a713-b87a3c52ea19)

## Release Note
Fixed issue where certain columns in the Watcher table were not sorting
properly.

(cherry picked from commit 540e6c0)
Ikuni17 added a commit that referenced this issue Nov 9, 2023
# Backport

This will backport the following commits from `main` to `8.11`:
- [[Watcher] Fix sorting on JSX headers
(#170085)](#170085)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Brad
White","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-10-30T15:34:43Z","message":"[Watcher]
Fix sorting on JSX headers (#170085)\n\n## Summary\r\nCloses
#164126\r\n\r\nEUI in memory tables need to have stable headers between
renders to sort\r\nproperly when the header is a JSX
element\r\n([Docs](https://eui.elastic.co/#/tabular-content/in-memory-tables)).\r\nThis
PR stabilizes the headers for `WatchListPage` only. I noticed
there\r\nwere some other columns which likely have the same issue in
Watcher, but\r\nI'm unsure how far reaching these changes need to be.
Reading through\r\nthe issue @ElenaStoeva mentions changing the sorting
anyways, so a quick\r\nfix seems more
appropriate.\r\n\r\n\r\n![Untitled](https://github.com/elastic/kibana/assets/14021797/7d79c576-58b8-4ef5-a713-b87a3c52ea19)\r\n\r\n\r\n##
Release Note\r\nFixed issue where certain columns in the Watcher table
were not
sorting\r\nproperly.","sha":"540e6c0acb1b357e4f309091b27a6bdc24bf04c0","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","backport:prev-minor","v8.12.0"],"number":170085,"url":"https://github.com/elastic/kibana/pull/170085","mergeCommit":{"message":"[Watcher]
Fix sorting on JSX headers (#170085)\n\n## Summary\r\nCloses
#164126\r\n\r\nEUI in memory tables need to have stable headers between
renders to sort\r\nproperly when the header is a JSX
element\r\n([Docs](https://eui.elastic.co/#/tabular-content/in-memory-tables)).\r\nThis
PR stabilizes the headers for `WatchListPage` only. I noticed
there\r\nwere some other columns which likely have the same issue in
Watcher, but\r\nI'm unsure how far reaching these changes need to be.
Reading through\r\nthe issue @ElenaStoeva mentions changing the sorting
anyways, so a quick\r\nfix seems more
appropriate.\r\n\r\n\r\n![Untitled](https://github.com/elastic/kibana/assets/14021797/7d79c576-58b8-4ef5-a713-b87a3c52ea19)\r\n\r\n\r\n##
Release Note\r\nFixed issue where certain columns in the Watcher table
were not
sorting\r\nproperly.","sha":"540e6c0acb1b357e4f309091b27a6bdc24bf04c0"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/170085","number":170085,"mergeCommit":{"message":"[Watcher]
Fix sorting on JSX headers (#170085)\n\n## Summary\r\nCloses
#164126\r\n\r\nEUI in memory tables need to have stable headers between
renders to sort\r\nproperly when the header is a JSX
element\r\n([Docs](https://eui.elastic.co/#/tabular-content/in-memory-tables)).\r\nThis
PR stabilizes the headers for `WatchListPage` only. I noticed
there\r\nwere some other columns which likely have the same issue in
Watcher, but\r\nI'm unsure how far reaching these changes need to be.
Reading through\r\nthe issue @ElenaStoeva mentions changing the sorting
anyways, so a quick\r\nfix seems more
appropriate.\r\n\r\n\r\n![Untitled](https://github.com/elastic/kibana/assets/14021797/7d79c576-58b8-4ef5-a713-b87a3c52ea19)\r\n\r\n\r\n##
Release Note\r\nFixed issue where certain columns in the Watcher table
were not
sorting\r\nproperly.","sha":"540e6c0acb1b357e4f309091b27a6bdc24bf04c0"}}]}]
BACKPORT-->

Co-authored-by: Brad White <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Watcher Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants