Exemple #1
0
class LoggerFilterForm(FilterForm):
    def __init__(self, *args, **kwargs):
        super(LoggerFilterForm, self).__init__(*args, **kwargs)

    def _get_header_title(self):
        return _("Logged Actions")

    def get_key_time_field(self):
        return self.base_fields['TimeBegin']

    default_fields_names = ['ServiceType', 'TimeBegin', 'IsMonitoring']

    ServiceType = IntegerChoiceField(id="logger_service_type_id",
                                     label=_('Service type'),
                                     choices=CorbaLazyRequestIterStruct(
                                         'Logger', None, 'getServices',
                                         ['id', 'name'], None),
                                     onchange="filter_action_types();")
    SourceIp = CharField(label=_('Source IP'))
    UserName = CharField(label=_('Username'))
    RequestType = IntegerChoiceField(id="logger_action_type_id",
                                     label=_('Request type'),
                                     choices=[],
                                     validate=False,
                                     onfocus="filter_action_types();")
    TimeBegin = DateTimeIntervalField(label=_('Begin time'))
    TimeEnd = DateTimeIntervalField(label=_('End time'))
    RequestPropertyValue = CompoundFilterField(label=_('Property'),
                                               form_class=PropertyFilterForm)
    ResultCode = CompoundFilterField(label=_('Result code'),
                                     form_class=ResultCodeFilterForm)
    IsMonitoring = BooleanField(label=_("Monitoring"))
Exemple #2
0
class ObjectStateFilterForm(FilterForm):
    default_field_names = ['StateId']

    StateId = ChoiceField(label=_('State Type'),
                          choices=CorbaLazyRequestIterStruct(
                              'Admin', None, 'getObjectStatusDescList',
                              ['id', 'shortName'], None, config.lang[:2]))

    ValidFrom = DateTimeIntervalField(label=_('Valid from'))
    ValidTo = DateTimeIntervalField(label=_('Valid to'))
Exemple #3
0
class PublicRequestFilterForm(FilterForm):
    default_fields_names = ['Id']

    Id = IntegerField(label=_('ID'))
    Type = CorbaEnumChoiceField(label=_('Type'),
                                corba_enum=Registry.PublicRequest.Type)
    Status = CorbaEnumChoiceField(label=_('Status'),
                                  corba_enum=Registry.PublicRequest.Status)
    CreateTime = DateTimeIntervalField(label=_('Create time'))
    ResolveTime = DateTimeIntervalField(label=_('Resolve time'))
    Reason = CharField(label=_('Reason'))
    EmailToAnswer = CharField(label=_('Email to answer'))
    Object = CompoundFilterField(label=_('Object'),
                                 form_class=ObjectFilterForm)
Exemple #4
0
class MailFilterForm(FilterForm):
    default_fields_names = ['CreateTime', 'Type']

    Type = ChoiceField(label=_('Type'),
                       choices=CorbaLazyRequestIterStruct(
                           'Mailer', None, 'getMailTypes', ['id', 'name'],
                           None))
    #Handle = CharField(label=_('Handle'))
    CreateTime = DateTimeIntervalField(label=_('Create time'))
    ModifyTime = DateTimeIntervalField(label=_('Modify time'))
    # docasny, az bude v corba tak smazat
    Status = IntegerField(label=_('Status'))
    Attempt = IntegerField(label=_('Attempt'))
    Message = CharField(label=_('Message'))
    Attachment = CompoundFilterField(label=_('Attachment'),
                                     form_class=FileFilterForm)

    def get_key_time_field(self):
        return self.base_fields['CreateTime']
Exemple #5
0
class FileFilterForm(FilterForm):
    default_fields_names = ['Type']

    Name = CharField(label=_('Name'))
    Path = CharField(label=_('Path'))
    MimeType = CharField(label=_('Mime type'))
    CreateTime = DateTimeIntervalField(label=_('Create time'))
    Type = ChoiceField(label=_('Type'),
                       choices=CorbaLazyRequestIterStruct(
                           'FileManager', None, 'getTypeEnum', ['id', 'name'],
                           None))
Exemple #6
0
class ObjectFilterForm(FilterForm):
    default_fields_names = ['Handle']

    Handle = CharField(label=_('Handle'))
    AuthInfo = CharField(label=_('AuthInfo'))

    Registrar = CompoundFilterField(label=_('Registrar'),
                                    form_class=RegistrarFilterForm)
    CreateRegistrar = CompoundFilterField(label=_('Creation registrar'),
                                          form_class=RegistrarFilterForm)
    UpdateRegistrar = CompoundFilterField(label=_('Update registrar'),
                                          form_class=RegistrarFilterForm)

    CreateTime = DateTimeIntervalField(label=_('Registration date'))
    UpdateTime = DateTimeIntervalField(label=_('Update date'))
    TransferTime = DateTimeIntervalField(label=_('Transfer date'))
    DeleteTime = DateTimeIntervalField(label=_('Delete date'))

    ObjectState = CompoundFilterField(label=_('Object state'),
                                      form_class=ObjectStateFilterForm)
Exemple #7
0
class MessageFilterForm(FilterForm):
    default_fields_names = ['CrDate']
    CrDate = DateTimeIntervalField(label=_('Creation date'))
    ModDate = DateTimeIntervalField(label=_('Modification date'))
    Attempt = IntegerField(label=_('Attempts'))
    Status = ChoiceField(label=_('Status'),
                         choices=CorbaLazyRequestIterStruct(
                             'Messages', None, 'getStatusList', ['id', 'name'],
                             None))
    CommType = ChoiceField(label=_('Communication type'),
                           choices=CorbaLazyRequestIterStruct(
                               'Messages', None, 'getCommTypeList',
                               ['id', 'name'], None))
    MessageType = ChoiceField(label=_('Message type'),
                              choices=CorbaLazyRequestIterStruct(
                                  'Messages', None, 'getMessageTypeList',
                                  ['id', 'name'], None))
    SmsPhoneNumber = CharField(label=_('SMS phone number'))
    LetterAddrName = CharField(label=_('Letter address name'))
    MessageContact = CompoundFilterField(label=_('Message contact'),
                                         form_class=ContactFilterForm)
Exemple #8
0
class InvoiceFilterForm(FilterForm):
    default_fields_names = ['Type']

    Type = CorbaEnumChoiceField(label=_('Type'),
                                corba_enum=Registry.Invoicing.InvoiceType)
    Number = CharField(label=_('Number'))
    CreateTime = DateTimeIntervalField(label=_('Create time'))
    TaxDate = DateIntervalField(label=_('Tax date'))
    Registrar = CompoundFilterField(label=_('Registrar'),
                                    form_class=RegistrarFilterForm)
    Object = CompoundFilterField(label=_('Object'),
                                 form_class=ObjectFilterForm)
    File = CompoundFilterField(label=_('File'), form_class=FileFilterForm)
Exemple #9
0
class BankStatementFilterForm(FilterForm):
    def _get_header_title(self):
        return _("Payments")

    default_fields_names = ['Type']

    Type = IntegerChoiceField(
        label=_('Type'),
        choices=[(editforms.PAYMENT_UNASSIGNED,
                  editforms.payment_map[editforms.PAYMENT_UNASSIGNED]),
                 (editforms.PAYMENT_REGISTRAR,
                  editforms.payment_map[editforms.PAYMENT_REGISTRAR]),
                 (editforms.PAYMENT_BANK,
                  editforms.payment_map[editforms.PAYMENT_BANK]),
                 (editforms.PAYMENT_ACCOUNTS,
                  editforms.payment_map[editforms.PAYMENT_ACCOUNTS]),
                 (editforms.PAYMENT_ACADEMIA,
                  editforms.payment_map[editforms.PAYMENT_ACADEMIA]),
                 (editforms.PAYMENT_OTHER,
                  editforms.payment_map[editforms.PAYMENT_OTHER])])

    AccountDate = DateIntervalField(label=_('Account date'))

    AccountNumber = CharField(label=_('Account number'))
    BankCode = CharField(label=_('Bank code'))

    ConstSymb = CharField(label=_('Constant symbol'))
    VarSymb = CharField(label=_('Variable symbol'))

    CrTime = DateTimeIntervalField(label=_('Import time'))
    AccountMemo = CharField(label=_('Memo'))

    AccountId = ChoiceField(label=_('Destination account'),
                            choices=CorbaLazyRequestIterStruct(
                                'Admin', None, 'getBankAccounts',
                                ['id', 'name'], None))