コード例 #1
0
 def refresh(self):
     """Refresh the details of the specified job, and update the UI."""
     self.base.update_job(self.index)
     maya.execute(self.base.load_tasks)
     maya.execute(self.base.get_thumbnail)
     self.selected_dir = utils.get_default_output_path()
     maya.text_field(self._dir, edit=True, text=self.selected_dir)
     maya.refresh()
コード例 #2
0
 def refresh(self, *args):
     """Refresh Submit tab. Command for refresh_button.
     Remove all existing UI elements and renderer details and re-build
     from scratch.
     """
     self.refresh_button.start()
     self.base.refresh_renderer(self.render_module)
     self.selected_dir = utils.get_default_output_path()
     maya.text_field(self.dir, edit=True, text=self.selected_dir)
     self.refresh_button.finish()
コード例 #3
0
 def job_watcher_ui(self):
     """Create UI elements for enabling and configuring job watcher."""
     self.watch_job = maya.check_box(
         label="Watch this job",
         onCommand=lambda e: self.enable_watcher(True),
         offCommand=lambda e: self.enable_watcher(False),
         annotation="Watching a job will download tasks as they complete.")
     self.selected_dir = utils.get_default_output_path()
     self.dir = maya.text_field(text=self.selected_dir, editable=False)
     self.dir_button = maya.symbol_button(
         image="SP_DirOpenIcon.png",
         command=self.select_dir,
         annotation="Select Download Directory")
コード例 #4
0
 def refresh(self, *args):
     """Refresh Submit tab.
     Remove all existing UI elements and renderer details and re-build
     from scratch.
     """
     self.base.refresh_renderer(self.render_module)
     self.selected_dir = utils.get_default_output_path()
     maya.text_field(self.dir, edit=True, text=self.selected_dir)
     if self.persistent_pool_dropdown_row is not None:
         if self.container_image_text_row is not None:
             maya.delete_ui(self.container_image_text_row)
         if self.container_image_dropdown_row is not None:
             maya.delete_ui(self.container_image_dropdown_row)
         pool_options = self.base.available_pools()
         self.pool_dropdown.clear()
         self.pool_dropdown.add_item("")
         for pool_id in pool_options:
             self.pool_dropdown.add_item(pool_id)
コード例 #5
0
    def __init__(self, base, index, layout):
        """Create a new job reference.

        :param base: The base class for handling jobs monitoring functionality.
        :type base: :class:`.AzureBatchJobHistory`
        :param int index: The index of where this reference is displayed on
         the current page.
        :param layout: The layout on which the job details will be displayed.
        :type layout: :class:`.utils.FrameLayout`
        """
        self.base = base
        self.index = index
        self.layout = layout
        self.data_path = self.base.get_data_dir()
        self.selected_dir = utils.get_default_output_path()
        maya.frame_layout(layout,
                          edit=True,
                          collapseCommand=self.on_collapse,
                          expandCommand=self.on_expand)
        self.job_details = maya.form_layout(parent=self.layout)
        maya.parent()
        self.content = []
        self.url = ""