Exemplo n.º 1
0
 def render(self):
     if self._unit_id is None:
         return vd.div(vd.h3('No current unit selected.'))
     if self._unit_detail_widget:
         return vd.div(self._unit_detail_widget)
     else:
         return vd.div(vd.h3('Initializing......'),
                       vd.pre(self._init_log_text),
                       style=dict(overflow='auto'))
Exemplo n.º 2
0
 def render(self):
     if self._view:
         X = self._view
     else:
         X = vd.components.ScrollArea(
             vd.div(vd.h3('Preparing...'),
                    vd.pre(self._prepare_log_text_view)),
             height=self._size[1] - self._title_bar.height())
     return vd.div(self._title_bar, X)
Exemplo n.º 3
0
 def render(self):
     if self._unit_table_widget:
         return vd.div(
             self._unit_table_widget
         )
     else:
         return vd.div(
             vd.h3('Initializing......'),
             style=dict(overflow='auto')
         )
Exemplo n.º 4
0
    def createSession(self):
        status = Status()
        status.setStatus('test1')

        def on_click():
            print('clicked')
            status.setStatus('clicked...')
            return 'return_string'

        root = vd.div(vd.h3('testing'), vd.h2('testing2'),
                      vd.button('push me', onclick=on_click), status)
        return root
Exemplo n.º 5
0
 def render(self):
     if self._error_message:
         return vd.div(self._error_message)
     box_style = dict(float='left')
     boxes = [
         vd.div(W, style=box_style) for W in [
             self._true_unit_waveform_widget,
             self._sorted_unit_waveform_widget,
             self._unmatched_true_unit_waveform_widget,
             self._unmatched_sorted_unit_waveform_widget
         ]
     ]
     div = vd.div(
         vd.h3('True unit {}, Sorted unit {}'.format(
             self._true_unit_id, self._sorted_unit_id)), vd.div(boxes))
     return ScrollArea(div, size=self._size)
Exemplo n.º 6
0
 def render(self):
     if not self._job:
         return vd.div('none')
     status = self._job_status.get('status')
     if not status:
         status = 'unknown'
     if self._job_console_output is not None:
         #contenteditable is used to enable ctrl+a select
         console_output_elmt = vd.div(vd.pre(self._job_console_output),
                                      style={
                                          'background': 'black',
                                          'color': 'white'
                                      },
                                      contenteditable="true")
     else:
         console_output_elmt = self._show_console_output_button
     table = vd.table(vd.tr(vd.td('Status:'), vd.td(status)))
     out = vd.div(console_output_elmt,
                  style=dict(overflow='auto', height='300px'))
     ret = vd.div(vd.h3(self._job['label']), table, out)
     return ret
Exemplo n.º 7
0
 def render(self):
     if self._unit_table_widget:
         return vd.div(self._unit_table_widget)
     else:
         return vd.div(vd.h3('Initializing...'),
                       vd.pre(self._init_log_text))
Exemplo n.º 8
0
 def render(self):
     return vd.div(vd.h3('General'), self._general_view_launcher,
                   vd.h3('Ground truth'), self._truth_view_launcher,
                   vd.h3('Sorting'), self._sorting_view_launcher,
                   vd.h3('Comparison'), self._comparison_view_launcher)
Exemplo n.º 9
0
 def render(self):
     return vd.div(vd.h3('Select batch group----:'), self._SEL_group,
                   self._BMW)