modified wireless links to obtain colors based on connected network from the session, LinkData will no provide a color itself
This commit is contained in:
parent
42979f1bb3
commit
e2490dee4a
10 changed files with 33 additions and 22 deletions
|
@ -86,6 +86,7 @@ def handle_link_event(event: LinkData) -> core_pb2.LinkEvent:
|
|||
options=options,
|
||||
network_id=event.network_id,
|
||||
label=event.label,
|
||||
color=event.color,
|
||||
)
|
||||
return core_pb2.LinkEvent(message_type=event.message_type.value, link=link)
|
||||
|
||||
|
|
|
@ -372,6 +372,7 @@ def convert_link(session: Session, link_data: LinkData) -> core_pb2.Link:
|
|||
options=options,
|
||||
network_id=link_data.network_id,
|
||||
label=link_data.label,
|
||||
color=link_data.color,
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -1494,12 +1494,14 @@ class CoreGrpcServer(core_pb2_grpc.CoreApiServicer):
|
|||
flag = MessageFlags.ADD
|
||||
else:
|
||||
flag = MessageFlags.DELETE
|
||||
color = session.get_link_color(emane_one.id)
|
||||
link = LinkData(
|
||||
message_type=flag,
|
||||
link_type=LinkTypes.WIRELESS,
|
||||
node1_id=node_one.id,
|
||||
node2_id=node_two.id,
|
||||
network_id=emane_one.id,
|
||||
color=color,
|
||||
)
|
||||
session.broadcast_link(link)
|
||||
return EmaneLinkResponse(result=True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue