kytos-ng / pathfinder

Kytos main path finder Network Application (NApp)

Home Page:https://kytos-ng.github.io/api/pathfinder.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ui: Display human friendly ids in the constraint path list (metadata, name or id fallback)

viniarck opened this issue · comments

Similarly part of the effort addressed on this issue #16, this is for making this component to render a name in that list more friendly, in this order of preference:

  • interface.metadata.port_name if it's an interface and if this attribute is set and not empty, otherwise interface.name
  • switch.metadata.node_name if it's an switch and if this attribute is set and not empty, otherwise switch.id

To differentiate if it's an interface or a switch in the response from pathfinder, you can count the number of :s in the string, interfaces will have 8 :s, and interfaces will have 7 :s.

Currently, this table is displaying this information like this:

2022-02-23-114818_406x470_scrot