Esempio n. 1
0
class AddForm(r.FlaskForm):
    #TODO: List the fields here, FIELDS MUST BE PREFIXED WITH rgen_
    # The names here after the rgen_ prefix must correspond to a var name in the respective model
    rgen_username = r.StringField(
        'MQTT UserName', validators=[r.Length(max=r.lim.MAX_USERNAME_SIZE)])
    rgen_access_key = r.StringField(
        'MQTT UserPass(Plaintext)',
        validators=[r.Length(max=r.lim.MAX_PASSWORD_SIZE)])
    rgen_usertype = r.SelectField('API Type', choices=apitypes)
Esempio n. 2
0
class AddForm(r.FlaskForm):
    #TODO: List the fields here, FIELDS MUST BE PREFIXED WITH rgen_
    # The names here after the rgen_ prefix must correspond to a var name in the respective model
    rgen_config_name = r.StringField(
        'MQTT Broker Configuration Name',
        validators=[r.Length(max=r.lim.MAX_CONFIG_NAME_SIZE)])
    rgen_config_value = r.StringField(
        'MQTT Broker Configuration Value',
        validators=[r.Length(max=r.lim.MAX_CONFIG_VALU_SIZE)])
Esempio n. 3
0
class EditForm(r.FlaskForm):
    #TODO: List the fields here, FIELDS MUST BE PREFIXED WITH rgen_
    # The names here after the rgen_ prefix must correspond to a var name in the respective model
    rgen_ip_address = r.StringField('IP Address',
                                    validators=[
                                        r.InputRequired(),
                                        r.Length(min=1,
                                                 max=r.lim.MAX_IPADDR_SIZE)
                                    ])
    rgen_description = r.TextAreaField(
        'Description',
        validators=[r.Length(min=1, max=r.lim.MAX_DESCRIPTION_SIZE)])
Esempio n. 4
0
class AddForm(r.FlaskForm):
    #TODO: List the fields here, FIELDS MUST BE PREFIXED WITH rgen_
    # The names here after the rgen_ prefix must correspond to a var name in the respective model
    rgen_param0 = r.StringField(
        'parameter0 Not Nullable',
        validators=[r.InputRequired(),
                    r.Length(max=r.lim.MAX_UUPARAM_SIZE)])
    rgen_param1 = r.StringField(
        'parameter1 Nullable',
        validators=[r.Length(max=r.lim.MAX_UUPARAM_SIZE)])
    rgen_param2 = r.StringField(
        'parameter2 Nullable',
        validators=[r.Length(max=r.lim.MAX_UUPARAM_SIZE)])
Esempio n. 5
0
class AddForm(r.FlaskForm):
    #TODO: List the fields here, FIELDS MUST BE PREFIXED WITH rgen_
    # The names here after the rgen_ prefix must correspond to a var name in the respective model
    rgen_topic = r.StringField(
        'MQTT Topic', validators=[r.Length(max=r.lim.MAX_MQTT_TOPIC_SIZE)])
    rgen_description = r.TextAreaField(
        'Description', validators=[r.Length(max=r.lim.MAX_DESCRIPTION_SIZE)])
    rgen_stordur = r.IntegerField(
        'Store at most N seconds (leave empty to store forever)')
    rgenbool_delonproc = r.SelectField('Delete messages after process?',
                                       choices=r.boolchoice)
    rgenbool_deloncas = r.SelectField('Delete messages on cascade?',
                                      choices=r.boolchoice)
    rgenbool_instantp = r.SelectField('Instantly process message?',
                                      choices=r.boolchoice)
    rgen_onrecv = r.SelectField('OnReceive action', choices=r.proctab_sel)
Esempio n. 6
0
class AddForm(r.FlaskForm):
    #TODO: List the fields here, FIELDS MUST BE PREFIXED WITH rgen_
    # The names here after the rgen_ prefix must correspond to a var name in the respective model
    rgen_long = r.StringField(
        'New Longitude',
        validators=[r.InputRequired(),
                    r.Length(min=1, max=10)])
    rgen_lati = r.StringField(
        'New Latitude',
        validators=[r.InputRequired(),
                    r.Length(min=1, max=10)])

    #sample datepicker widget (allows date selection), use the rgentim_ prefix
    rgentim_time = r.DateField('T stamp',
                               widget=r.DatePickerWidget(),
                               default=r.datetime.datetime.now())

    #TODO: List select fields here, FIELDS MUST BE PREFIXED WITH rgensel_
    # The names here after the rgen_ prefix must correspond to a var name in the respective model
    rgensel_route_id = r.SelectField('Assigned Route',
                                     choices=[('0', 'No route')])
    fKeylist = {"route_id": ("Georoute", "name")}