def __init__(self):
        CommandConditionPlugin.__init__(
            self,
            basename=plugin_name(__file__),
            name=_("Template"),
            description=_("Explain here what it does"),
            author="John Smith",
            copyright="Copyright (c) 2016",
            icon='puzzle',
            help_string=HELP,
            version="0.1.0",
        )
        # to repeat checks after first success uncomment the following line
        # self.repeat = True

        # the icon resource is only needed if the plugin uses a custom icon
        # self.graphics.append('plugin_icon.png')

        # the items below might be not needed and can be deleted if the
        # plugin does not have a configuration panel
        self.resources.append('plugin_template.glade')
        self.builder = self.get_dialog('plugin_template')
        self.plugin_panel = None
        self.forward_allowed = False  # forward not enabled by default

        # define this only if the plugin provides one or more scripts
        # self.scripts.append('needed_script.sh')

        # mandatory or anyway structural variables and object values follow:
        self.command_line = None  # full command line to run
        self.summary_description = None  # must be set for all plugins

        # this variable is defined here only for demonstrational purposes
        self.value = None
    def __init__(self):
        CommandConditionPlugin.__init__(
            self,
            basename=plugin_name(__file__),
            name=_("Fire This"),
            description=_(
                "Expect a file with specific name in the home directory"),
            author="Francesco Garosi",
            copyright="Copyright (c) 2016",
            icon='firethis',
            help_string=HELP,
            version="1.0.0",
        )
        # the append steps inform the plugin installer of the resource files
        self.graphics.append('firethis.png')
        self.resources.append('firethis.glade')

        # here the pane is prepared in the same way as a dialog box, but
        # it is not initialized: the initialization is deferred to the first
        # attempt to retrieve the pane
        self.builder = self.get_dialog('firethis')
        self.plugin_panel = None
        self.forward_allowed = True

        # the default command line is almost the same as before
        self.command_line = "test -f ~/'fire.this'"
        self.summary_description = \
            "On creation of a 'fire.this' file in the home directory"
Example #3
0
    def __init__(self):
        CommandConditionPlugin.__init__(
            self,
            basename=plugin_name(__file__),
            name=_("Fire This"),
            description=_(
                "Expect a file with specific name in the home directory"),
            author="Francesco Garosi",
            copyright="Copyright (c) 2016",
            icon='firethis',
            help_string=HELP,
            version="1.0.0",
        )
        # the append steps inform the plugin installer of the resource files
        self.graphics.append('firethis.png')
        self.resources.append('firethis.glade')

        # here the pane is prepared in the same way as a dialog box, but
        # it is not initialized: the initialization is deferred to the first
        # attempt to retrieve the pane
        self.builder = self.get_dialog('firethis')
        self.plugin_panel = None
        self.forward_allowed = True

        # the default command line is almost the same as before
        self.command_line = "test -f ~/'fire.this'"
        self.summary_description = \
            "On creation of a 'fire.this' file in the home directory"
    def __init__(self):
        CommandConditionPlugin.__init__(
            self,
            basename=plugin_name(__file__),
            name=_("Template"),
            description=_("Explain here what it does"),
            author="John Smith",
            copyright="Copyright (c) 2016",
            icon='puzzle',
            help_string=HELP,
            version="0.1.0",
        )
        # to repeat checks after first success uncomment the following line
        # self.repeat = True

        # the icon resource is only needed if the plugin uses a custom icon
        # self.graphics.append('plugin_icon.png')

        # the items below might be not needed and can be deleted if the
        # plugin does not have a configuration panel
        self.resources.append('plugin_template.glade')
        self.builder = self.get_dialog('plugin_template')
        self.plugin_panel = None
        self.forward_allowed = False        # forward not enabled by default

        # define this only if the plugin provides one or more scripts
        # self.scripts.append('needed_script.sh')

        # mandatory or anyway structural variables and object values follow:
        self.command_line = None            # full command line to run
        self.summary_description = None     # must be set for all plugins

        # this variable is defined here only for demonstrational purposes
        self.value = None
 def __init__(self):
     CommandConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Command"),
         description=_("Check Successful Execution of Command"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='start',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.builder = self.get_dialog('plugin_cond-misc-command')
     self.plugin_panel = None
     self.forward_allowed = False
     self.command_line = None
 def __init__(self):
     CommandConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Command"),
         description=_("Check Successful Execution of Command"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='start',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.builder = self.get_dialog('plugin_cond-misc-command')
     self.plugin_panel = None
     self.forward_allowed = False
     self.command_line = None
 def __init__(self):
     CommandConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Downloads Finished"),
         description=_("Check that all Active Downloads have Finished"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='business',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.category = PLUGIN_CONST.CATEGORY_COND_FILESYSTEM
     self.script = self.get_script('plugin_cond-fs-downloads-finished.sh')
     self.download_dir = "~/Downloads"
     self.command_line = '%s "%s"' % (self.script, self.download_dir)
     self.summary_description = _("When all downloads in '%s' are complete") % self.download_dir
 def __init__(self):
     CommandConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("System Temperature"),
         description=_("Check system temperature against a target"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='electrical_sensor',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.repeat = True
     self.builder = self.get_dialog('plugin_cond-misc-systemp')
     self.plugin_panel = None
     self.forward_allowed = False
     self.command_line = None
     self.summary_description = None
Example #9
0
 def __init__(self):
     CommandConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("System Load"),
         description=_("Check system load against a target"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='electronics',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.repeat = True
     self.builder = self.get_dialog('plugin_cond-misc-sysload')
     self.plugin_panel = None
     self.forward_allowed = False
     self.command_line = None
     self.summary_description = None
 def __init__(self):
     CommandConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Downloads Finished"),
         description=_("Check that all Active Downloads have Finished"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='business',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.category = PLUGIN_CONST.CATEGORY_COND_FILESYSTEM
     self.script = self.get_script('plugin_cond-fs-downloads-finished.sh')
     self.download_dir = "~/Downloads"
     self.command_line = '%s "%s"' % (self.script, self.download_dir)
     self.summary_description = _(
         "When all downloads in '%s' are complete") % self.download_dir
 def __init__(self):
     CommandConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Resource URL"),
         description=_("The Resource at the given URL is available"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='globe',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.category = PLUGIN_CONST.CATEGORY_COND_NETWORK
     self.resources.append('plugin_cond-net-urlavailable.glade')
     self.builder = self.get_dialog('plugin_cond-net-urlavailable')
     self.plugin_panel = None
     self.forward_allowed = False        # forward not enabled by default
     self.command_line = None            # full command line to run
     self.summary_description = None     # must be set for all plugins
 def __init__(self):
     CommandConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Resource URL"),
         description=_("The Resource at the given URL is available"),
         author=APP_AUTHOR,
         copyright=APP_COPYRIGHT,
         icon='globe',
         help_string=HELP,
         version=APP_VERSION,
     )
     self.stock = True
     self.category = PLUGIN_CONST.CATEGORY_COND_NETWORK
     self.resources.append('plugin_cond-net-urlavailable.glade')
     self.builder = self.get_dialog('plugin_cond-net-urlavailable')
     self.plugin_panel = None
     self.forward_allowed = False  # forward not enabled by default
     self.command_line = None  # full command line to run
     self.summary_description = None  # must be set for all plugins
 def __init__(self):
     CommandConditionPlugin.__init__(
         self,
         basename=plugin_name(__file__),
         name=_("Confluence"),
         description=_("Triggered by a Group of Confluent Events"),
         author="Francesco Garosi",
         copyright="Copyright (c) 2016",
         icon='collect',
         help_string=HELP,
         version="0.1.0",
     )
     self.resources.append('plugin_cond-confluence.glade')
     self.builder = self.get_dialog('plugin_cond-confluence')
     self.plugin_panel = None
     self.forward_allowed = False
     self.scripts.append('cond-confluence.sh')
     self.command_line = None
     self.summary_description = None
     self.persistence_dir = self.file_storage('plugin_confluence')