def get_band_item_attributes(self, band_altitude): """ Overloads the BaseAdapters stock implementation of this method """ band = self._topology.bands[band_altitude] attrs = BandItemAttributes() attrs.bgcolor = self._colormapper.get_unique_color(band.edge.name) attrs.border_color = "red" attrs.tooltip_text = "Topic:\t%s\nBw:\t%s/sec\nHz:\t%.1f" % ( band.edge.name, sizeof_fmt(band.edge.bw), band.edge.hz) #attrs.label = band.edge.name #attrs.label_color = "white" #attrs.width = 15 attrs.label = "%s, Bw: %s/sec, Hz: %.1f" % ( band.edge.name, sizeof_fmt(band.edge.bw), band.edge.hz) #attrs.width = 15 if band.edge.bw > 1073741824: attrs.width = 130 elif band.edge.bw > 1048576 * 100: attrs.width = 110 elif band.edge.bw > 1048576 * 10: attrs.width = 90 elif band.edge.bw > 1048576: attrs.width = 70 elif band.edge.bw > 1024 * 100: attrs.width = 50 elif band.edge.bw > 1024 * 10: attrs.width = 30 else: attrs.width = 15 return attrs
def get_hook_item_attributes(self, hooklabel): """Default method for providing some stock settings for hooks""" hook = self._topology.hooks[hooklabel] attrs = BandItemAttributes() attrs.bgcolor = "black" attrs.border_color = "green" attrs.label = str(hook._routing_keys) return attrs
def get_flow_item_attributes(self, flowlabel): """Default method for providing some stock settings for flows""" flow = self._topology.flows[flowlabel] attrs = BandItemAttributes() attrs.bgcolor = "black" attrs.border_color = "green" attrs.label = str(flow._routing_keys) attrs return attrs
def get_band_item_attributes(self, band_altitude): """ Default method for providing some stock settings for bands """ band = self._topology.bands[band_altitude] attrs = BandItemAttributes() attrs.bgcolor = self._color_mapper.get_unique_color(band._edge.name) attrs.border_color = "black" attrs.label = str(band._edge.name) attrs.label_color = "black" attrs.width = 15 return attrs
def get_band_item_attributes(self, band_altitude): """ Overloads the BaseAdapters stock implementation of this method """ band = self._topology.bands[band_altitude] attrs = BandItemAttributes() attrs.bgcolor = "white" attrs.border_color = "red" attrs.label = band.edge.name attrs.label_color = "red" attrs.width = 15 attrs.draw_debug = True return attrs
def get_band_item_attributes(self, band_altitude): """ Overloads the BaseAdapters stock implementation of this method """ band = self._topology.bands[band_altitude] attrs = BandItemAttributes() attrs.bgcolor = self._colormapper.get_unique_color(band.edge.name) attrs.border_color = "red" attrs.tooltip_text = "Topic:\t%s\nBw:\t%s/sec\nHz:\t%.1f" % (band.edge.name, sizeof_fmt(band.edge.bw), band.edge.hz) attrs.label = band.edge.name attrs.label_color = "white" attrs.width = 15 return attrs
def get_band_item_attributes(self, band_altitude): """ Overloads the BaseAdapters stock implementation of this method """ band = self._topology.bands[band_altitude] attrs = BandItemAttributes() attrs.bgcolor = self._colormapper.get_unique_color(band.edge.name) attrs.border_color = "red" attrs.tooltip_text = "Topic:\t%s\nBw:\t%s/sec\nHz:\t%.1f" % ( band.edge.name, sizeof_fmt(band.edge.bw), band.edge.hz) attrs.label = band.edge.name attrs.label_color = "white" attrs.width = 15 return attrs