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

Service map updates #2230

Merged
merged 17 commits into from
Nov 12, 2024
Merged

Service map updates #2230

merged 17 commits into from
Nov 12, 2024

Conversation

TackAdam
Copy link
Collaborator

@TackAdam TackAdam commented Oct 25, 2024

Description

Update the service table functionality

  1. Adjust the focus table to have a popover that list all the options and is searchable.
  2. Make the focus on selection enlarge the node following the filter behavior (also clear when reset)
  3. Add reset button to the filter that recenters the tree and clears focus
  4. Adjust zoomSpeed: 0.5
  5. Set max and min zoom using moveTo function.
  6. If max zoom is exceeded recenter the page so the tree does not get lost.
  7. Loading state while rendering
  8. Darker borders / thicker on each node
  9. No movement after rendering
  10. Focus now filters to only display connected nodes
  11. Consistent diagram using seed for physics generation
  12. Bug fixes for handling switching between custom source and data prepper as well as flyout opening.

Filter Focus:

Screen.Recording.2024-11-08.at.11.52.59.AM.mov

Zoom constraints:

Screen.Recording.2024-11-08.at.11.53.34.AM.mov

Dynamic filter:
Screenshot 2024-10-25 at 4 24 04 PM

Testing with 300 nodes:
Screenshot 2024-11-08 at 11 55 09 AM

Testing Dense Nodes
Screenshot 2024-11-08 at 11 54 27 AM

Screenshot 2024-11-08 at 11 54 39 AM

Service flyout:
ServiceFlyout

Issues Resolved

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@TackAdam TackAdam marked this pull request as ready for review October 25, 2024 23:28
@TackAdam TackAdam changed the title [WIP] Service Table updates Service Table updates Oct 26, 2024
@TackAdam TackAdam changed the title Service Table updates Service map updates Oct 26, 2024
@TackAdam TackAdam added enhancement New feature or request backport 2.x labels Oct 26, 2024

// Enlarge the focused node and reset others
const updatedNodes = items.graph.nodes.map((node) =>
node.label === service ? { ...node, size: 30 } : { ...node, size: 15 }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just wondering, is there some global or environmental variable that can be used for the size here to get rid of the magic numbers?

@ps48 ps48 added the mds-2.18.0 label Nov 1, 2024
@ps48
Copy link
Member

ps48 commented Nov 11, 2024

Still looking at the code. Just a question in the service flyout when users focus on a node, does the flyout details, other red metrics graphs also change to show the details of this particular node?

Signed-off-by: Adam Tackett <[email protected]>
@TackAdam
Copy link
Collaborator Author

Still looking at the code. Just a question in the service flyout when users focus on a node, does the flyout details, other red metrics graphs also change to show the details of this particular node?

Adjusted to hide the focus while in the service fly-out. Ideally the user is utilizing the fly-out for a quick overview, and using the main page to investigate. Adjusted the functionality of the main search to allow user to quickly investigate deeper into connected nodes by clicking on them to filter (showcased in first video of description 'Filter Focus:').

@@ -18,7 +18,7 @@ import { ServiceNodeDetails } from '../../../../../../common/types/trace_analyti
interface ServiceMapNodeDetailsProps {
selectedNodeDetails: ServiceNodeDetails | null;
setSelectedNodeDetails: React.Dispatch<React.SetStateAction<ServiceNodeDetails | null>>;
addServiceFilter: (selectedServiceName: string) => void;
addServiceFilter: (selectedServiceName: string | null) => void;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we expecting to have a null passed in for addServiceFilter?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, added in the null check to handle switching between custom and data prepper to clear selections and prevent existing bugs where the page would fail to render.

@@ -209,8 +209,11 @@ export const TEST_SERVICE_MAP_GRAPH = {
label: 'order',
size: 15,
title: 'order\n\n Average duration: 90.1ms \n Error rate: 4.17% \n Request rate: 48',
borderWidth: 0,
color: 'rgba(158, 134, 192, 1)',
borderWidth: 3,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: are these changes being signed off from UX/product?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Synched offline for sign off.

@TackAdam TackAdam merged commit fdebf79 into opensearch-project:main Nov 12, 2024
11 of 18 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Nov 12, 2024
* adjusting service table and focus search

Signed-off-by: Adam Tackett <[email protected]>

* revert starting zoom to default behavior

Signed-off-by: Adam Tackett <[email protected]>

* add reset button, and enlarge focused node

Signed-off-by: Adam Tackett <[email protected]>

* adjust filter options, so only available are shown in flyout

Signed-off-by: Adam Tackett <[email protected]>

* handle empty items

Signed-off-by: Adam Tackett <[email protected]>

* loading state, borders, no movement, focus

Signed-off-by: Adam Tackett <[email protected]>

* refresh on filter cleared

Signed-off-by: Adam Tackett <[email protected]>

* update focus functionality to set filter, bug fixes

Signed-off-by: Adam Tackett <[email protected]>

* handle clearing focus

Signed-off-by: Adam Tackett <[email protected]>

* hide focus in the flyout

Signed-off-by: Adam Tackett <[email protected]>

---------

Signed-off-by: Adam Tackett <[email protected]>
Signed-off-by: Adam Tackett <[email protected]>
Co-authored-by: Adam Tackett <[email protected]>
(cherry picked from commit fdebf79)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
mengweieric pushed a commit that referenced this pull request Nov 12, 2024
* adjusting service table and focus search



* revert starting zoom to default behavior



* add reset button, and enlarge focused node



* adjust filter options, so only available are shown in flyout



* handle empty items



* loading state, borders, no movement, focus



* refresh on filter cleared



* update focus functionality to set filter, bug fixes



* handle clearing focus



* hide focus in the flyout



---------




(cherry picked from commit fdebf79)

Signed-off-by: Adam Tackett <[email protected]>
Signed-off-by: Adam Tackett <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Adam Tackett <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants