elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.73k stars 8.14k forks source link

[Fleet] Agent activity enhancements - Step 3 #180701

Open jillguyonnet opened 5 months ago

jillguyonnet commented 5 months ago

Continuation of https://github.com/elastic/kibana/issues/153232

Figma designs

1. Add a Change schedule button to scheduled upgrade actions

This button should allow the user to update the scheduled upgrade with a new start time. This involves rendering a date and time picker when the button is clicked (details should be confirm with our UX team).

Implementation-wise, this probably requires cancelling the previous action and scheduling a new one (https://github.com/elastic/kibana/issues/153232#issuecomment-1471580113).

UX-wise, expectations should be confirmed:

2. Investigate missing timestamps

See https://github.com/elastic/kibana/pull/179161#issuecomment-2018250761.

In some cases, items from .fleet-actions-results have '@timestamp': '0001-01-01T00:00:00Z'. This seems to happen consistently for agent upgrades. It would be useful to investigate where this is coming from and whether it can be fixed: in this case, the logic to hide the timestamp in the UI should be removed: https://github.com/elastic/kibana/blob/main/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/agent_activity_flyout/activity_item.tsx#L70-L82

3. Stretch: investigate persisting state for Review errors badge

This is likely a bigger change and should perhaps be its own issue. Capturing it here for now.

With the introduction of the Review errors badge next to the Agent activity button in https://github.com/elastic/kibana/pull/179161, the Agents page has to query new actions outside of the flyout. New actions with errors are stored in the state until the flyout is opened. This works as long as the page is open, but the state is lost if the user navigates to another page. There could be an opportunity here to 1) make the queries more efficient 2) ensure "unread" actions with errors are persisted across pages, e.g. by refactoring the page using React Query and introducing a shared cache between the badge and the flyout.

elasticmachine commented 5 months ago

Pinging @elastic/fleet (Team:Fleet)