Skip to content

Commit

Permalink
feat: add tooltips for 'Job Attachments FileSystem' config options in…
Browse files Browse the repository at this point in the history
… GUI

Signed-off-by: Gahyun Suh <[email protected]>
  • Loading branch information
Gahyun Suh committed Dec 1, 2023
1 parent d68ec2c commit b2e1b37
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/deadline/client/ui/dialogs/deadline_config_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,12 +256,21 @@ def _build_farm_settings_ui(self, group, layout):
self.handle_background_exception
)
layout.addRow(default_storage_profile_box_label, self.default_storage_profile_box)
self.file_system_box = self._init_combobox_setting(

job_attachments_file_system_tooltip = (
"This setting determines how job attachments are loaded on the worker instance. "
"'COPIED' downloads all job attachments to disk before rendering begins, while "
"'VIRTUAL' downloads attachments only when needed by each Task. 'COPIED' may be "
"faster if every Task needs all attachments, while 'VIRTUAL' may perform better "
"if tasks only require a subset of attachments."
)
self.job_attachments_file_system_box = self._init_combobox_setting(
group,
layout,
"defaults.job_attachments_file_system",
"Job Attachments FileSystem Options",
["COPIED", "VIRTUAL"],
tooltip=job_attachments_file_system_tooltip,
)

def _build_general_settings_ui(self, group, layout):
Expand Down Expand Up @@ -336,6 +345,7 @@ def _init_combobox_setting(
setting_name: str,
label_text: str,
values: List[str],
tooltip: Optional[str] = None,
):
"""
Creates a combobox setting and adds it to the specified group and layout. This function also connects state
Expand All @@ -355,6 +365,9 @@ def _init_combobox_setting(
combo_box = QComboBox(parent=group)
layout.addRow(label, combo_box)
combo_box.addItems(values)
if tooltip:
label.setToolTip(tooltip)
combo_box.setToolTip(tooltip)

def refresh_combo_box():
"""Function that refreshes the state of the combo box based on the setting name"""
Expand Down

0 comments on commit b2e1b37

Please sign in to comment.