def _newNoteSelectedCallback(self, name, text):
     for i in self.items_selected:
         if i.type == "Host":
             api.devlog("newNotecallbackHost %s " % (i.object.name))
             guiapi.createAndAddNoteToHost(i.object.getID(), name, text)
         elif i.type == "Application":
             _parent=i.object.getParent()
             api.devlog("newNotecallbackApplication %s " % (i.object.name))
             guiapi.createAndAddNoteToApplication(_parent.getID(), i.object.getID(), name, text)
         elif i.type == "Interface":
             _parent=i.object.getParent()
             api.devlog("newNotecallbackInterface %s " % (i.object.name))
             guiapi.createAndAddNoteToInterface(_parent.getID(), i.object.getID(), name, text)
         elif i.type == "Service":
             _parent=i.object.getParent().getParent()
             api.devlog("newNotecallbackService %s " % (i.name))
             guiapi.createAndAddNoteToService(_parent.getID(), i.object.getID(), name, text)
Beispiel #2
0
 def _newNoteSelectedCallback(self, name, text):
     for i in self.items_selected:
         if i.type == "Host":
             api.devlog("newNotecallbackHost %s " % (i.object.name))
             guiapi.createAndAddNoteToHost(i.object.getID(), name, text)
         elif i.type == "Application":
             _parent=i.object.getParent()
             api.devlog("newNotecallbackApplication %s " % (i.object.name))
             guiapi.createAndAddNoteToApplication(_parent.getID(), i.object.getID(), name, text)
         elif i.type == "Interface":
             _parent=i.object.getParent()
             api.devlog("newNotecallbackInterface %s " % (i.object.name))
             guiapi.createAndAddNoteToInterface(_parent.getID(), i.object.getID(), name, text)
         elif i.type == "Service":
             _parent=i.object.getParent().getParent()
             api.devlog("newNotecallbackService %s " % (i.name))
             guiapi.createAndAddNoteToService(_parent.getID(), i.object.getID(), name, text)