kibana icon indicating copy to clipboard operation
kibana copied to clipboard

[Fleet] Added modal to manage agent policies of an integration policy

Open juliaElastic opened this issue 1 year ago • 9 comments

Summary

Closes https://github.com/elastic/kibana/issues/182112

Added modal to manage agent policies.

To verify:

  • go to an integration where the integration policies are listed
  • click on the + button in the agent policies column
  • click on Manage agent policies in the popover
  • add/remove agent policies in the modal
  • click submit, the integration policy should be updated to be linked to the updated agent policies
image

Made a change to the table column display to show a + button even if there is only one policy. Previously the popover could only be accessed if there are at least 2 agent policies. Also restored the agent policy link, lock icon and revision display (instead of a badge) if there are multiple agent policies. @simosilvestri Let me know if you have any UX recommendation as it differs slightly from the prototype.

image image

EDIT: after discussing with Simona, removed the + button in case of a single agent policy assigned to the integration policy. image

Disabling Manage agent policies button if the current user doesn't have at least write integration policies and write agent policies privilege. This is how it looks with read privileges: image

Checklist

juliaElastic avatar Jun 26 '24 13:06 juliaElastic

:robot: GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

obltmachine avatar Jun 26 '24 13:06 obltmachine

/ci

juliaElastic avatar Jun 26 '24 13:06 juliaElastic

/ci

juliaElastic avatar Jun 26 '24 14:06 juliaElastic

/ci

juliaElastic avatar Jun 27 '24 07:06 juliaElastic

Hi @juliaElastic, as we discussed, we can remove the badge with the plus icon when displaying a single Agent policy, since we expect that the majority of customers will go back to the Integration wizard to edit their settings.

simosilvestri avatar Jun 27 '24 12:06 simosilvestri

/ci

juliaElastic avatar Jun 27 '24 12:06 juliaElastic

There are 2 remaining issues that I noticed:

  • after submitting the Manage agent policies modal, the Integration list UI doesn't refresh with the changes, should refresh automatically - this is fixed
  • the managed agent policies are not showing up in the combo box (this is an existing behaviour). I think they should be visible and shouldn't be removed
    • looked into this to show the managed policies in the combo, but didn't find a way to prevent removing them. Instead I went with a solution to keep them hidden, but always keep them in the policy_ids list, so the managed policies are not removed when updating an integration policy.
image image

juliaElastic avatar Jun 27 '24 12:06 juliaElastic

Pinging @elastic/fleet (Team:Fleet)

elasticmachine avatar Jun 27 '24 12:06 elasticmachine

I'm testing locally and I have two small observations about this modal:

  • When loading, the modal size briefly changes, it's not a big issue but it looks weird. It seems to happen when the modal loads the policies, so having a fixed min-width or something like this could help. I captured it in a quick video:

https://github.com/elastic/kibana/assets/16084106/986f26a3-d771-4b0c-a91d-d473adb7395c

  • The font size in the callout description is a bit too big (looks the same as the title)

Screenshot 2024-07-02 at 10 05 06

criamico avatar Jul 02 '24 08:07 criamico

Added min-width to the modal, so it shouldn't jump (it happened with at least 3 policies). Also decreased the callout description text size: image

juliaElastic avatar Jul 02 '24 08:07 juliaElastic

:yellow_heart: Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Jest Integration Tests #3 / migration actions checkClusterRoutingAllocation resolves left when cluster.routing.allocation.enabled is incompatible
  • [job] [logs] Jest Integration Tests #3 / migration actions checkClusterRoutingAllocation resolves right when cluster.routing.allocation.enabled=all
  • [job] [logs] Jest Integration Tests #3 / migration actions cloneIndex resolves left cluster_shard_limit_exceeded when the action would exceed the maximum normal open shards
  • [job] [logs] Jest Integration Tests #3 / migration actions cloneIndex resolves left index_not_found_exception if the source index does not exist
  • [job] [logs] Jest Integration Tests #3 / migration actions cloneIndex resolves left with a index_not_green_timeout if clone target already exists but takes longer than the specified timeout before turning green
  • [job] [logs] Jest Integration Tests #3 / migration actions cloneIndex resolves right if clone target already existed after waiting for index status to be green
  • [job] [logs] Jest Integration Tests #3 / migration actions cloneIndex resolves right if cloning into a new target index
  • [job] [logs] Jest Integration Tests #3 / migration actions fetchIndices includes the _meta data of the indices in the response
  • [job] [logs] Jest Integration Tests #3 / migration actions fetchIndices resolves right empty record if no indices were found
  • [job] [logs] Jest Integration Tests #3 / migration actions fetchIndices resolves right record with found indices
  • [job] [logs] Jest Integration Tests #3 / migration actions removeWriteBlock rejects if there is a non-retryable error
  • [job] [logs] Jest Integration Tests #3 / migration actions removeWriteBlock resolves right if successful when an index already has a write block
  • [job] [logs] Jest Integration Tests #3 / migration actions removeWriteBlock resolves right if successful when an index does not have a write block
  • [job] [logs] Jest Integration Tests #3 / migration actions setWriteBlock once resolved, prevents further writes to the index
  • [job] [logs] Jest Integration Tests #3 / migration actions setWriteBlock resolves left index_not_found_exception when the index does not exist
  • [job] [logs] Jest Integration Tests #3 / migration actions setWriteBlock resolves right when setting a write block on an index that already has one
  • [job] [logs] Jest Integration Tests #3 / migration actions setWriteBlock resolves right when setting the write block succeeds
  • [job] [logs] Jest Integration Tests #3 / migration actions waitForIndexStatus resolves left with "index_not_green_timeout" after waiting for an index status to be green timeout
  • [job] [logs] Jest Integration Tests #3 / migration actions waitForIndexStatus resolves left with "index_not_yellow_timeout" after waiting for an index status to be yellow timeout
  • [job] [logs] Jest Integration Tests #3 / migration actions waitForIndexStatus resolves right after waiting for an index status to be yellow if the index already existed

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
fleet 1206 1208 +2

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
fleet 1.8MB 1.8MB +5.3KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
fleet 167.2KB 167.2KB -9.0B
Unknown metric groups

async chunk count

id before after diff
fleet 11 10 -1

History

  • :broken_heart: Build #219022 failed c8898817618fe46a6474e59d748c72c49685c0ea
  • :yellow_heart: Build #218983 was flaky 99fa3df95b171e153ee184b8803cf64f767bb06c
  • :broken_heart: Build #218982 failed c0c51feddbc342bf31503c981689a1cd4bc66d05
  • :yellow_heart: Build #218442 was flaky 08a3f5cbac5c428f3280e6b5986fef141d775cb2
  • :yellow_heart: Build #218386 was flaky d56993c101531df39679bf41da2f95150be48012

To update your PR or re-run it, just comment with: @elasticmachine merge upstream

cc @juliaElastic

kibana-ci avatar Jul 02 '24 12:07 kibana-ci