Пример #1
0
    def __init__(self, key, **kwargs):
        Handler.PluginHandler.__init__(self, key, **kwargs)
        Handler.PluginHandler.AddCommon(self)

        table = CTK.PropsTable()
        table.Add(
            _('Allow PathInfo'),
            CTK.CheckCfgText('%s!allow_pathinfo' % (key), False, _('Allow')),
            _(NOTE_PATHINFO))
        table.Add(
            _('Allow Directory Listing'),
            CTK.CheckCfgText('%s!allow_dirlist' % (key), True, _('Allow')),
            _(NOTE_DIRLIST))

        submit = CTK.Submitter(URL_APPLY)
        submit += table

        self += CTK.RawHTML('<h2>%s</h2>' % (_('Parsing')))
        self += CTK.Indenter(submit)
        self += instance_plugin('file',
                                key,
                                show_document_root=False,
                                symlinks=False)
        self += instance_plugin('dirlist',
                                key,
                                show_document_root=False,
                                symlinks=True)
Пример #2
0
    def __init__ (self, key, **kwargs):
        Handler.PluginHandler.__init__ (self, key, **kwargs)
        Handler.PluginHandler.AddCommon (self)

        table = CTK.PropsTable()
        table.Add (_('Allow PathInfo'),          CTK.CheckCfgText('%s!allow_pathinfo'%(key), False, _('Allow')), _(NOTE_PATHINFO))
        table.Add (_('Allow Directory Listing'), CTK.CheckCfgText('%s!allow_dirlist'%(key),  True,  _('Allow')), _(NOTE_DIRLIST))

        submit = CTK.Submitter (URL_APPLY)
        submit += table

        self += CTK.RawHTML ('<h2>%s</h2>' %(_('Parsing')))
        self += CTK.Indenter (submit)
        self += instance_plugin('file',    key, show_document_root=False, symlinks=False)
        self += instance_plugin('dirlist', key, show_document_root=False, symlinks=True)
Пример #3
0
    def __init__(self, key, **kwargs):
        Handler.PluginHandler.__init__(self, key, **kwargs)
        Handler.PluginHandler.AddCommon(self)

        table = CTK.PropsTable()
        table.Add(_('Secret'), CTK.TextCfg('%s!secret' % (key), False),
                  _(NOTE_SECRET))
        table.Add(_('Timeout'), CTK.TextCfg('%s!timeout' % (key), True),
                  _(NOTE_TIMEOUT))

        submit = CTK.Submitter(URL_APPLY)
        submit += table

        # Streaming
        self += CTK.RawHTML('<h2>%s</h2>' % (_('Covering Parameters')))
        self += CTK.Indenter(submit)

        # File
        self += instance_plugin('file', key, show_document_root=False)

        # Publish
        VALS = [("%s!secret" % (key), validations.is_not_empty),
                ("%s!timeout" % (key), validations.is_number_gt_0)]

        CTK.publish('^%s' % (URL_APPLY),
                    CTK.cfg_apply_post,
                    validation=VALS,
                    method="POST")
Пример #4
0
    def __init__ (self, key, **kwargs):
        Handler.PluginHandler.__init__ (self, key, **kwargs)
        Handler.PluginHandler.AddCommon (self)

        rate = CTK.CheckCfgText("%s!rate"%(key), True, _('Enabled'))

        table = CTK.PropsTable()
        table.Add (_("Auto Rate"), rate, _(NOTE_RATE))
        table.Add (_("Speedup Factor"), CTK.TextCfg("%s!rate_factor"%(key), True), _(NOTE_RATE_FACTOR))
        table.Add (_("Initial Boost"),  CTK.TextCfg("%s!rate_boost"%(key), True), _(NOTE_RATE_BOOST))

        rate.bind ('change',
                  """if ($('#%(rate)s :checkbox')[0].checked) {
                           $('#%(row1)s').show();
                           $('#%(row2)s').show();
                     } else {
                           $('#%(row1)s').hide();
                           $('#%(row2)s').hide();
                  }""" %({'rate': rate.id, 'row1': table[1].id, 'row2': table[2].id}))

        submit = CTK.Submitter (URL_APPLY)
        submit += table

        # Streaming
        self += CTK.RawHTML ('<h2>%s</h2>' %(_('Audio/Video Streaming')))
        self += CTK.Indenter (submit)

        # File
        self += instance_plugin('file',    key, show_document_root=False)

        # Publish
        VALS = [("%s!rate_factor"%(key), validations.is_float),
                ("%s!rate_boost"%(key),  validations.is_number_gt_0)]

        CTK.publish ('^%s'%(URL_APPLY), CTK.cfg_apply_post, validation=VALS, method="POST")
Пример #5
0
    def __init__ (self, key, **kwargs):
        Handler.PluginHandler.__init__ (self, key, **kwargs)
        Handler.PluginHandler.AddCommon (self)

        rate = CTK.CheckCfgText("%s!rate"%(key), True, _('Enabled'))

        table = CTK.PropsTable()
        table.Add (_("Auto Rate"), rate, _(NOTE_RATE))
        table.Add (_("Speedup Factor"), CTK.TextCfg("%s!rate_factor"%(key), True), _(NOTE_RATE_FACTOR))
        table.Add (_("Initial Boost"),  CTK.TextCfg("%s!rate_boost"%(key), True), _(NOTE_RATE_BOOST))

        rate.bind ('change',
                  """if ($('#%(rate)s :checkbox')[0].checked) {
                           $('#%(row1)s').show();
                           $('#%(row2)s').show();
                     } else {
                           $('#%(row1)s').hide();
                           $('#%(row2)s').hide();
                  }""" %({'rate': rate.id, 'row1': table[1].id, 'row2': table[2].id}))

        submit = CTK.Submitter (URL_APPLY)
        submit += table

        # Streaming
        self += CTK.RawHTML ('<h2>%s</h2>' %(_('Audio/Video Streaming')))
        self += CTK.Indenter (submit)

        # File
        self += instance_plugin('file',    key, show_document_root=False)

        # Publish
        VALS = [("%s!rate_factor"%(key), validations.is_float),
                ("%s!rate_boost"%(key),  validations.is_number_gt_0)]

        CTK.publish ('^%s$'%(URL_APPLY), CTK.cfg_apply_post, validation=VALS, method="POST")
    def __init__ (self, key, **kwargs):
        Handler.PluginHandler.__init__ (self, key, **kwargs)
        Handler.PluginHandler.AddCommon (self)

        table = CTK.PropsTable()
        table.Add (_('Secret'),  CTK.TextCfg('%s!secret'%(key), False), _(NOTE_SECRET))
        table.Add (_('Timeout'), CTK.TextCfg('%s!timeout'%(key), True), _(NOTE_TIMEOUT))

        submit = CTK.Submitter (URL_APPLY)
        submit += table

        # Streaming
        self += CTK.RawHTML ('<h2>%s</h2>' %(_('Covering Parameters')))
        self += CTK.Indenter (submit)

        # File
        self += instance_plugin('file', key, show_document_root=False)

        # Publish
        VALS = [("%s!secret"%(key),  validations.is_not_empty),
                ("%s!timeout"%(key), validations.is_number_gt_0)]

        CTK.publish ('^%s$'%(URL_APPLY), CTK.cfg_apply_post, validation=VALS, method="POST")