Beispiel #1
0
  def onMenu(self, event):
    """Handle custom menu events for inspectors, such as saving the config."""

    menuItemID = event.GetId()
    name = self.menuItemIDs.get(menuItemID, None)
    if name:
      if name == 'loadConfig':
        _inspect.loadInspectors(self.network, showRun=False)
      elif name == 'saveConfig':
        _inspect.saveInspectors()
      elif name == 'enterPrompt':
        _inspect.enterPrompt(self.network)
      elif name == 'enableLogging':
        _inspect.enableLogging()
      else:
        raise RuntimeError('Unknown command name: %s' % name)
    else:
      event.Skip()
Beispiel #2
0
  def onMenu(self, event):
    """Handle custom menu events for inspectors, such as saving the config."""

    menuItemID = event.GetId()
    name = self.menuItemIDs.get(menuItemID, None)
    if name:
      if name == 'loadConfig':
        _inspect.loadInspectors(self.network, showRun=False)
      elif name == 'saveConfig':
        _inspect.saveInspectors()
      elif name == 'enterPrompt':
        _inspect.enterPrompt(self.network)
      elif name == 'enableLogging':
        _inspect.enableLogging()
      else:
        raise RuntimeError('Unknown command name: %s' % name)
    else:
      event.Skip()
Beispiel #3
0
    def enterPrompt(self):
        """Enter the interactive prompt."""

        _inspect.enterPrompt(self.root, self.getRegion(), self.inspector)
Beispiel #4
0
  def enterPrompt(self):
    """Enter the interactive prompt."""

    _inspect.enterPrompt(self.root, self.getRegion(), self.inspector)