aws-solutions / media-services-application-mapper

Media Services Application Mapper is a browser-based tool that allows operators to visualize the structure and logical connections among AWS Media Services and supporting services in the cloud. The tool can be used as a top-down resource monitoring tool when integrated with CloudWatch.
Apache License 2.0
84 stars 27 forks source link

Please introduce a method to lock diagrams to prevent unwanted changes #186

Closed spainala closed 2 years ago

spainala commented 3 years ago

Please introduce a method to lock nodes/connectors in a diagram. It is simple to select a node and mistakenly drag or move the diagram.

It would be really helpful to lock a diagram to prevent changes. If the diagram needs to be changed. Unlock the diagram. Make changes and then apply the lock to prevent further changes.

JimTharioAmazon commented 2 years ago

Changes:

These menu ids are disabled when a diagram is locked:

const menu_ids = ["diagram_manage_contents", "diagram_add_downstream", "diagram_add_upstream",
      "diagram_add_all_nodes", "nodes_align_vertical", "nodes_align_horizontal", "nodes_layout_vertical",
      "nodes_layout_horizontal", "nodes_layout_isolated", "diagram_remove_selected", "diagram_remove_diagram"];
JimTharioAmazon commented 2 years ago

Top left locked: image

JimTharioAmazon commented 2 years ago

Disabled menu items when locked: image

JimTharioAmazon commented 2 years ago

Locked diagrams still accept drag-n-drop nodes, so reopening to disable drop target when locked.