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

Client: display name for nodes #25

Closed
magicnat opened this issue Jul 9, 2021 · 2 comments
Closed

Client: display name for nodes #25

magicnat opened this issue Jul 9, 2021 · 2 comments
Assignees
Labels
client Issues related to the SEED emulator client emulator Issues related to the SEED emulator enhancement New feature or request

Comments

@magicnat
Copy link
Member

magicnat commented Jul 9, 2021

For each node, such as Internet Exchange, Network, host, etc. please add a new attribute to these classes, called displayName. This name will only be used in the visualization. Their internal name such as ix100 should not change. When we display a node, if a node's displayName is not empty, we will use this name to display. If it is empty, we will use the node's internal name. This way, we can give each node a meaningful name. For example, we can call an Internet Exchange "Manhattan" to represent the real "Manhattan internet exchange" in the real world.

Originally posted by @kevin-w-du in #24 (comment)

@magicnat magicnat self-assigned this Jul 9, 2021
@magicnat magicnat added the enhancement New feature or request label Jul 9, 2021
@magicnat magicnat added this to the Public Release milestone Jul 9, 2021
@magicnat magicnat added the client Issues related to the SEED emulator client label Jul 10, 2021
@magicnat magicnat added the emulator Issues related to the SEED emulator label Jul 10, 2021
@magicnat
Copy link
Member Author

Since we are implementing a new way of changing visual/display of nodes on the map, we may as well add a few other APIs too. Let's create a new class, seedemu.core.Visualization.Vertex, which have the following methods:

  • setDisplayName: change the display name of a vertex. Will show on the map.
  • setDescription: change description of a vertex. Will show on the upper-right details panel of the map.
  • setColor / setShape / setBackgroundUrl: change color/share/background of vertex.
  • setPosition: set x, y position on a vertex on map. May be useful if we want to "overlay" the topology on a real city map. Or even just load openstreetmap/google maps as background?

Elements to be shown on the map, like Network and Node, will be subclasses of Visualization.Vertex.

This may also provide some base for #24. We can create a Visualization.Layer class. Each layer can contain a different set of lists of Visualization.Vertex and Visualization.Edge, which can be created by layers like DNS. This way, layers can provide different visualization "layers" for the client.

@magicnat
Copy link
Member Author

implemented setDisplayName / setDescription in fbbbc4e. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client Issues related to the SEED emulator client emulator Issues related to the SEED emulator enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant