Exemple #1
0
 def on_edit_configuration(self, widget=None, data=None):
     '''
     Display a dialog to manually edit the configuration settings.
     '''
     config = self.board.config
     form = dict_to_form(config)
     dialog = FormViewDialog(form, 'Edit configuration settings')
     valid, response = dialog.run()
     if valid:
         self.board.update_config(**response)
 def on_edit_configuration(self, widget=None, data=None):
     '''
     Display a dialog to manually edit the configuration settings.
     '''
     config = self.dropbot_dx_remote.config
     form = dict_to_form(config)
     dialog = FormViewDialog(form, 'Edit configuration settings')
     valid, response = dialog.run()
     if valid:
         self.dropbot_dx_remote.update_config(**response)
    def on_set_dstat_params_file(self, widget, data=None):
        options = self.get_step_options()
        form = Form.of(Filepath.named('dstat_params_file')
                       .using(default=options.get('dstat_params_file', ''),
                              optional=True,
                              properties={'patterns':
                                          [('Dstat parameters file (*.yml)',
                                            ('*.yml', ))]}))
        dialog = FormViewDialog(form, 'Set DStat parameters file')
        valid, response = dialog.run()

        if valid:
            options['dstat_params_file'] = response['dstat_params_file']
            self.set_step_values(options)