def get_snap_item_attributes(self, snapkey): """ Default method for providing some stock settings for snaps """ attrs = SnapItemAttributes() attrs.bgcolor = "white" attrs.border_color = "red" attrs.border_width = 0 attrs.label = "" attrs.label_color = "red" attrs.width = 20 attrs.draw_debug = True return attrs
def get_snap_item_attributes(self, snapkey): """ Default method for providing some stock settings for snaps """ attrs = SnapItemAttributes() attrs.bgcolor = "darkCyan" if 'c' in snapkey else "green" attrs.border_color = "darkBlue" if 'c' in snapkey else "darkGreen" attrs.border_width = 1 attrs.label = self._topology.snaps[snapkey].connection.edge.name attrs.label_color = "white" attrs.width = 20 return attrs
def get_snap_item_attributes(self, snapkey): """ Default method for providing some stock settings for snaps """ snap = self._topology.snaps[snapkey] attrs = SnapItemAttributes() if snap._connection.node.nodeType == "queue": attrs.bgcolor = "red" attrs.label_color = "black" elif snap._connection.node.nodeType == 'sb': attrs.bgcolor = "blue" attrs.label_color = "white" else: attrs.bgcolor = "gray" attrs.label_color = "black" attrs.border_color = "black" attrs.border_width = 0 attrs.label = str(snap._connection.routingKeys) attrs.width = 20 return attrs