def createInformation(self): window = self.library.window networks = window.object_libraries["resources"] protocols = window.object_libraries["protocols"] title = tr("Platform") items = [] for item in self["items"]: network = item["network"] network = networks[network] protocol = item["protocol"] protocol = protocols[protocol] html = "(%s, %s)" % ( network.createHTML(tooltip=True, icon=False), protocol.createHTML(tooltip=True, icon=False), ) html = Html(html, escape=False) items.append(html) items = BR.join(items) interface = networks[self["interface"]] options = [ (tr("Identifier"), self["id"]), (tr("Interface"), interface.createHTML(tooltip=True)), (tr("Items"), items), (tr("References"), self.createReferencesHTML()), ] return (title, options)
def formatObjects(objects): if not objects: return htmlBold(tr("(any)")) return BR.join(object.createHTML(tooltip=True) for object in objects)