2 Replies Latest reply: May 11, 2015 2:27 AM by aaa RSS

How can I order criteria forms in steelscript AppFramework ?

aaa

Hello,

 

I am trying to create a new appframework plugin. I want to understand how can I order criteria forms. I tried to understand how It works by trying to analyse the code here https://github.com/riverbed/steelscript-appfwk/blob/master/steelscript/appfwk/apps/datasource/forms.py with no success.

 

Order that I would like to have:

 

Account

Start time

End Time

 

What I get:

 

Capture.PNG.png

 

My code:

 

class GateTable(DatasourceTable):

 

    class Meta:

        proxy = True

 

    # When a custom column is used, it must be linked

    _column_class = 'GateColumn'

    _query_class = 'GateTableQuery'

 

    # TABLE_OPTIONS is a dictionary of options that are specific to

    # TableQuery objects in this file.  These by be overriden by

    # keyword arguments to the GateTable.create() call in a report

    # file

    TABLE_OPTIONS = { }

 

    # FIELD_OPTIONS is a dictionary of default values for field

    # options.  These by be overriden by keyword arguments to the

    # GateTable.create() call in a report file

    FIELD_OPTIONS = {'userid': 'type an id'}

 

 

 

    def post_process_table(self, field_options):

        #

        # Add criteria fields that are required by this table

        #

     

        TableField.create(obj=self, keyword='userid', label='Account',

                                    initial=field_options['userid'],

                                    help_text=('Enter the user id you are looking for.'),

                                    required=True)

                                   

        fields_add_time_selection(self, show_duration=False, show_start=True, show_end=True)

                              

        self.add_column('gnagna', 'gnagna', iskey=True,

                        datatype=Column.DATATYPE_STRING)

        self.add_column('gnagna2', 'gnagna2', iskey=True,

                        datatype=Column.DATATYPE_STRING)

 

Best regards,