예제 #1
0
    def __init__(self):
        """Create components for the app."""
        super().__init__()
        info = app_module.Info(app_id=self.app_id, version=version,
                               is_essential=is_essential, depends=depends,
                               name=_('Let\'s Encrypt'), icon='fa-lock',
                               short_description=_('Certificates'),
                               description=_description,
                               manual_page='LetsEncrypt',
                               donation_url='https://letsencrypt.org/donate/')
        self.add(info)

        menu_item = menu.Menu('menu-letsencrypt', info.name,
                              info.short_description, info.icon,
                              'letsencrypt:index', parent_url_name='system')
        self.add(menu_item)

        backup_restore = BackupRestore('backup-restore-letsencrypt',
                                       **manifest.backup)
        self.add(backup_restore)

        domain_added.connect(on_domain_added)
        domain_removed.connect(on_domain_removed)

        post_module_loading.connect(_certificate_handle_modified)
예제 #2
0
def init():
    """Initialize the names module."""
    menu = cfg.main_menu.get('system:index')
    menu.add_urlname(title, 'glyphicon-tag', 'names:index')

    domain_added.connect(on_domain_added)
    domain_removed.connect(on_domain_removed)
예제 #3
0
def init():
    """Initialize the names module."""
    menu = main_menu.get('system')
    menu.add_urlname(name, 'glyphicon-tag', 'names:index')

    domain_added.connect(on_domain_added)
    domain_removed.connect(on_domain_removed)
예제 #4
0
def init():
    """Intialize the module."""
    menu = main_menu.get('system')
    menu.add_urlname(name,
                     'glyphicon-lock', 'letsencrypt:index', short_description)
    domainname_change.connect(on_domainname_change)
    domain_added.connect(on_domain_added)
    domain_removed.connect(on_domain_removed)
예제 #5
0
파일: __init__.py 프로젝트: bhuvi8/Plinth
def init():
    """Initialize the names module."""
    menu = cfg.main_menu.get('system:index')
    menu.add_urlname(ugettext_lazy('Name Services'), 'glyphicon-tag',
                     'names:index', 19)

    domain_added.connect(on_domain_added)
    domain_removed.connect(on_domain_removed)
예제 #6
0
def init():
    """Intialize the module."""
    menu = main_menu.get('system')
    menu.add_urlname(name, 'glyphicon-lock', 'letsencrypt:index',
                     short_description)
    domainname_change.connect(on_domainname_change)
    domain_added.connect(on_domain_added)
    domain_removed.connect(on_domain_removed)
예제 #7
0
def init():
    """Initialize the names module."""
    global app
    app = NamesApp()
    app.set_enabled(True)

    domain_added.connect(on_domain_added)
    domain_removed.connect(on_domain_removed)
예제 #8
0
def init():
    """Initialize the names module."""
    menu = cfg.main_menu.get('system:index')
    menu.add_urlname(ugettext_lazy('Name Services'), 'glyphicon-tag',
                     'names:index', 19)

    domain_added.connect(on_domain_added)
    domain_removed.connect(on_domain_removed)
예제 #9
0
def init():
    """Initialize the module."""
    global app
    app = LetsEncryptApp()
    app.set_enabled(True)

    domain_added.connect(on_domain_added)
    domain_removed.connect(on_domain_removed)

    post_module_loading.connect(_certificate_handle_modified)
예제 #10
0
def init():
    """Initialize the module."""
    global app
    app = CockpitApp()

    setup_helper = globals()['setup_helper']
    if setup_helper.get_state() != 'needs-setup' and app.is_enabled():
        app.set_enabled(True)

    domain_added.connect(on_domain_added)
    domain_removed.connect(on_domain_removed)
예제 #11
0
    def __init__(self):
        """Create components for the app."""
        super().__init__()
        info = app_module.Info(app_id=self.app_id,
                               version=version,
                               is_essential=is_essential,
                               name=_('Cockpit'),
                               icon='fa-wrench',
                               icon_filename='cockpit',
                               short_description=_('Server Administration'),
                               description=_description,
                               manual_page='Cockpit',
                               clients=manifest.clients)
        self.add(info)

        menu_item = menu.Menu('menu-cockpit',
                              info.name,
                              info.short_description,
                              info.icon,
                              'cockpit:index',
                              parent_url_name='system')
        self.add(menu_item)

        shortcut = frontpage.Shortcut('shortcut-cockpit',
                                      info.name,
                                      short_description=info.short_description,
                                      icon=info.icon_filename,
                                      url='/_cockpit/',
                                      clients=info.clients,
                                      login_required=True,
                                      allowed_groups=['admin'])
        self.add(shortcut)

        firewall = Firewall('firewall-cockpit',
                            info.name,
                            ports=['http', 'https'],
                            is_external=True)
        self.add(firewall)

        webserver = Webserver('webserver-cockpit',
                              'cockpit-freedombox',
                              urls=['https://{host}/_cockpit/'])
        self.add(webserver)

        daemon = Daemon('daemon-cockpit', managed_services[0])
        self.add(daemon)

        backup_restore = BackupRestore('backup-restore-cockpit',
                                       **manifest.backup)
        self.add(backup_restore)

        domain_added.connect(on_domain_added)
        domain_removed.connect(on_domain_removed)
예제 #12
0
def init():
    """Intialize the module."""
    menu = main_menu.get('system')
    menu.add_urlname(name, 'glyphicon-wrench', 'cockpit:index',
                     short_description)

    global service
    setup_helper = globals()['setup_helper']
    if setup_helper.get_state() != 'needs-setup':
        service = service_module.Service(
            managed_services[0], name, ports=['http', 'https'],
            is_external=True,
            is_enabled=is_enabled, enable=enable, disable=disable)

        if is_enabled():
            add_shortcut()

    domain_added.connect(on_domain_added)
    domain_removed.connect(on_domain_removed)
    domainname_change.connect(on_domainname_change)
예제 #13
0
    def __init__(self):
        """Create components for the app."""
        super().__init__()
        info = app_module.Info(app_id=self.app_id,
                               version=version,
                               is_essential=is_essential,
                               name=_('Name Services'),
                               icon='fa-tags',
                               description=_description,
                               manual_page='NameServices')
        self.add(info)

        menu_item = menu.Menu('menu-names',
                              info.name,
                              None,
                              info.icon,
                              'names:index',
                              parent_url_name='system')
        self.add(menu_item)

        domain_added.connect(on_domain_added)
        domain_removed.connect(on_domain_removed)
예제 #14
0
def init():
    """Intialize the module."""
    menu = main_menu.get('system')
    menu.add_urlname(name, 'glyphicon-wrench', 'cockpit:index',
                     short_description)

    global service
    setup_helper = globals()['setup_helper']
    if setup_helper.get_state() != 'needs-setup':
        service = service_module.Service(managed_services[0],
                                         name,
                                         ports=['http', 'https'],
                                         is_external=True,
                                         is_enabled=is_enabled,
                                         enable=enable,
                                         disable=disable)

        if is_enabled():
            add_shortcut()

    domain_added.connect(on_domain_added)
    domain_removed.connect(on_domain_removed)
    domainname_change.connect(on_domainname_change)
예제 #15
0
파일: __init__.py 프로젝트: JoKeyser/Plinth
 def post_init():
     """Perform post initialization operations."""
     domain_added.connect(on_domain_added)
     domain_removed.connect(on_domain_removed)
예제 #16
0
    def post_init():
        """Perform post initialization operations."""
        domain_added.connect(on_domain_added)
        domain_removed.connect(on_domain_removed)

        post_app_loading.connect(_certificate_handle_modified)