Ejemplo n.º 1
0
 def get_widget_params(self, name):
     """Return a dictionary containing arguments specification for
     the widget with specified name.
     """
     return {
         'from': {
             'desc': """Display events before this date""",
             'type': DateField(),  # TODO: Custom datetime format
         },
         'daysback': {
             'desc': """Event time window""",
             'type': int,
         },
         'precision': {
             'desc': """Time precision""",
             'type': EnumField('second', 'minute', 'hour')
         },
         'doneby': {
             'desc': """Filter events related to user""",
         },
         'filters': {
             'desc': """Event filters""",
             'type': ListField()
         },
         'max': {
             'desc': """Limit the number of events displayed""",
             'type': int
         },
         'realm': {
             'desc': """Resource realm. Used to filter events""",
         },
         'id': {
             'desc': """Resource ID. Used to filter events""",
         },
     }
Ejemplo n.º 2
0
 def get_widget_params(self, name):
     """Return a dictionary containing arguments specification for
     the widget with specified name.
     """
     return {
         'query': {
             'default': 'status!=closed',
             'desc': """Query string""",
         },
         'stats_provider': {
             'desc': """Name of the component implementing
     `ITicketGroupStatsProvider`, which is used to collect statistics 
     on groups of tickets.""",
             'default': 'DefaultTicketGroupStatsProvider'
         },
         'skin': {
             'desc':
             """Look and feel of the progress bar""",
             'type':
             EnumField('info', 'success', 'warning', 'danger',
                       'info-stripped', 'success-stripped',
                       'warning-stripped', 'danger-stripped')
         },
         'title': {
             'desc': """Widget title""",
         },
         'legend': {
             'desc': """Text on top of the progress bar""",
         },
         'desc': {
             'desc': """Descriptive (wiki) text""",
         },
         'view': {
             'desc': """Display mode to render progress info""",
             'type': EnumField('compact', 'standard')
         },
     }
Ejemplo n.º 3
0
    def get_widget_params(self, name):
        """Return a dictionary containing arguments specification for
        the widget with specified name.
        """
        return {
            'field': {
                'desc':
                """Target ticket field. """
                """Required if no group in `query`.""",
            },
            'query': {
                'desc': """TracQuery used to filter target tickets.""",
            },
            'title': {
                'desc': """Widget title""",
            },
            'verbose': {
                'desc': """Show frequency next to each value""",
                'default': False,
                'type': bool,
            },
            'threshold': {
                'desc': """Filter items having smaller frequency""",
                'type': int,
            },
            'max': {
                'default': 0,
                'desc': """Limit the number of items displayed""",
                'type': int
            },
            'view': {
                'desc': """Display mode. Should be one of the following

                            - `list` : Unordered value list (default)
                            - `cloud` : Similar to tag cloud
                            """,
                'default': 'list',
                'type': EnumField('list', 'cloud', 'table', 'compact'),
            },
        }