Example #1
0
    def _get_browser_group(self):
        project_grp = VGroup(
            HGroup(Label('Filter'),
                   UItem('project_filter',
                         width=75),
                   icon_button_editor('clear_selection_button',
                                      'cross',
                                      tooltip='Clear selected')),
            UItem('projects',
                  editor=TabularEditor(editable=False,
                                       selected='selected_projects',
                                       adapter=ProjectAdapter(),
                                       multi_select=True),
                  width=75))

        sample_grp = VGroup(
            HGroup(
                #Label('Filter'),
                UItem('sample_filter_parameter',
                      editor=EnumEditor(name='sample_filter_parameters')),
                UItem('sample_filter',
                      width=75),
                UItem('sample_filter',
                      editor=EnumEditor(name='sample_filter_values'),
                      width=-25),
                # UItem('filter_non_run_samples',
                #       tooltip='Omit non-analyzed samples'),
                icon_button_editor('configure_sample_table',
                                   'cog',
                                   tooltip='Configure Sample Table')),
            UItem('samples',
                  editor=TabularEditor(
                      adapter=self.sample_tabular_adapter,
                      editable=False,
                      selected='selected_samples',
                      multi_select=True,
                      dclicked='dclicked_sample',
                      column_clicked='column_clicked',
                      #update='update_sample_table',
                      #refresh='update_sample_table',
                      stretch_last_section=False),
                  width=75))

        grp = VSplit(
            project_grp,
            sample_grp,
            self._get_analysis_group(),
            # label='Project/Sample'
        )

        return grp
Example #2
0
    def _get_browser_group(self):
        project_grp = VGroup(
            HGroup(
                Label('Filter'), UItem('project_filter', width=75),
                icon_button_editor('clear_selection_button',
                                   'cross',
                                   tooltip='Clear selected')),
            UItem('projects',
                  editor=TabularEditor(editable=False,
                                       selected='selected_projects',
                                       adapter=ProjectAdapter(),
                                       multi_select=True),
                  width=75))

        sample_grp = VGroup(
            HGroup(
                #Label('Filter'),
                UItem('sample_filter_parameter',
                      editor=EnumEditor(name='sample_filter_parameters')),
                UItem('sample_filter', width=75),
                UItem('sample_filter',
                      editor=EnumEditor(name='sample_filter_values'),
                      width=-25),
                # UItem('filter_non_run_samples',
                #       tooltip='Omit non-analyzed samples'),
                icon_button_editor('configure_sample_table',
                                   'cog',
                                   tooltip='Configure Sample Table')),
            UItem(
                'samples',
                editor=TabularEditor(
                    adapter=self.sample_tabular_adapter,
                    editable=False,
                    selected='selected_samples',
                    multi_select=True,
                    dclicked='dclicked_sample',
                    column_clicked='column_clicked',
                    #update='update_sample_table',
                    #refresh='update_sample_table',
                    stretch_last_section=False),
                width=75))

        grp = VSplit(
            project_grp,
            sample_grp,
            self._get_analysis_group(),
            # label='Project/Sample'
        )

        return grp
Example #3
0
    def _get_analysis_group(self, base='analysis'):
        def make_name(name):
            return 'object.{}_table.{}'.format(base, name)

        analysis_grp = VGroup(
            HGroup(
                #Label('Filter'),
                UItem(make_name('analysis_filter_parameter'),
                      editor=EnumEditor(
                          name=make_name('analysis_filter_parameters'))),
                UItem(make_name('analysis_filter_comparator')),
                UItem(make_name('analysis_filter'), width=75),
                UItem(make_name('analysis_filter'),
                      editor=EnumEditor(
                          name=make_name('analysis_filter_values')),
                      width=-25),
                icon_button_editor(make_name('configure_analysis_table'),
                                   'cog',
                                   tooltip='Configure/Advanced query')),
            UItem(
                make_name('analyses'),
                editor=myTabularEditor(
                    adapter=self.analysis_tabular_adapter,
                    #                                                       editable=False,
                    operations=['move'],
                    refresh=make_name('refresh_needed'),
                    selected=make_name('selected'),
                    dclicked=make_name('dclicked'),
                    multi_select=self.multi_select,
                    drag_external=True,
                    scroll_to_row=make_name('scroll_to_row'),
                    stretch_last_section=False),
                #                                  editor=ListStrEditor(editable=False,
                #                                           selected='selected_analysis'
                #                                           )
                width=300),
            HGroup(
                # Item(make_name('page_width'),
                #      label='N',
                #      tooltip='Page Width. Number of analyses to display per page'),
                #
                spring,
                #
                # icon_button_editor(make_name('backward'),
                #                    'control_rewind',
                #                    #enabled_when=make_name('backward_enabled'),
                #                    tooltip='Backward one page'),
                # icon_button_editor(make_name('forward'),
                #                    'control_fastforward',
                #                    #enabled_when=make_name('forward_enabled'),
                #                    tooltip='Forwad 1 page'),
                # UItem(make_name('page'),
                #       tooltip='Current page'),
                # UItem(make_name('npages'),
                #       format_str='%02i', style='readonly'),
                Item(make_name('omit_invalid'))),
            defined_when=self.analyses_defined,
        )
        return analysis_grp
Example #4
0
    def _get_analysis_group(self, base='analysis'):
        def make_name(name):
            return 'object.{}_table.{}'.format(base, name)

        analysis_grp = VGroup(
            HGroup(
                #Label('Filter'),
                UItem(make_name('analysis_filter_parameter'),
                      editor=EnumEditor(name=make_name('analysis_filter_parameters'))),
                UItem(make_name('analysis_filter_comparator')),
                UItem(make_name('analysis_filter'),
                      width=75),
                UItem(make_name('analysis_filter'),
                      editor=EnumEditor(name=make_name('analysis_filter_values')),
                      width=-25),
                icon_button_editor(make_name('configure_analysis_table'), 'cog',
                                   tooltip='Configure/Advanced query')),
            UItem(make_name('analyses'),
                  editor=myTabularEditor(
                      adapter=self.analysis_tabular_adapter,
                      #                                                       editable=False,
                      operations=['move'],
                      refresh=make_name('refresh_needed'),
                      selected=make_name('selected'),
                      dclicked=make_name('dclicked'),
                      multi_select=self.multi_select,
                      drag_external=True,
                      scroll_to_row=make_name('scroll_to_row'),
                      stretch_last_section=False),
                  #                                  editor=ListStrEditor(editable=False,
                  #                                           selected='selected_analysis'
                  #                                           )
                  width=300),
            HGroup(
                # Item(make_name('page_width'),
                #      label='N',
                #      tooltip='Page Width. Number of analyses to display per page'),
                #
                spring,
                #
                # icon_button_editor(make_name('backward'),
                #                    'control_rewind',
                #                    #enabled_when=make_name('backward_enabled'),
                #                    tooltip='Backward one page'),
                # icon_button_editor(make_name('forward'),
                #                    'control_fastforward',
                #                    #enabled_when=make_name('forward_enabled'),
                #                    tooltip='Forwad 1 page'),
                # UItem(make_name('page'),
                #       tooltip='Current page'),
                # UItem(make_name('npages'),
                #       format_str='%02i', style='readonly'),
                Item(make_name('omit_invalid'))
            ),
            defined_when=self.analyses_defined,
        )
        return analysis_grp
Example #5
0
    def traits_view(self):
        # main_grp= Group(
        #     self._get_browser_group(),
        #     self._get_date_group(),
        #     layout='tabbed')

        main_grp = self._get_browser_group()

        v = View(
            VGroup(
                HGroup(
                    icon_button_editor('advanced_query',
                                       'application_form_magnify',
                                       tooltip='Advanced Query'), spring,
                    CustomLabel('datasource_url', color='maroon'), spring),
                main_grp))

        return v
Example #6
0
    def traits_view(self):
        # main_grp= Group(
        #     self._get_browser_group(),
        #     self._get_date_group(),
        #     layout='tabbed')

        main_grp= self._get_browser_group()

        v = View(
            VGroup(
                HGroup(icon_button_editor('advanced_query', 'application_form_magnify',
                                          tooltip='Advanced Query'),
                       spring,
                       CustomLabel('datasource_url', color='maroon'),
                       spring),
                main_grp))

        return v