Skip to content

Commit

Permalink
Replace ipw.dlink with tl.dlink
Browse files Browse the repository at this point in the history
  • Loading branch information
yakutovicha committed Oct 19, 2023
1 parent 7f47e0f commit 0696364
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions aiidalab_widgets_base/computational_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def __init__(
enable_detailed_setup=enable_detailed_setup,
)
self.resource_setup.observe(self.refresh, "success")
ipw.dlink(
tl.dlink(
(self.resource_setup, "message"),
(self.setup_message, "message"),
)
Expand Down Expand Up @@ -252,7 +252,7 @@ def __init__(self, ssh_folder: Path | None = None, **kwargs):

self._ssh_connection_message = None
self._password_message = ipw.HTML()
ipw.dlink(
tl.dlink(
(self, "password_message"),
(self._password_message, "value"),
transform=lambda x: f"<b>SSH log: {x}</b>",
Expand Down Expand Up @@ -1576,62 +1576,62 @@ def __init__(
# )

self.ssh_computer_setup = SshComputerSetup()
ipw.dlink(
tl.dlink(
(self.ssh_computer_setup, "message"),
(self, "message"),
)

# Computer setup template.
self.template_computer_setup = TemplateVariablesWidget()
ipw.dlink(
tl.dlink(
(self.comp_resources_database, "computer_setup"),
(self.template_computer_setup, "templates"),
)

# Computer configure template.
self.template_computer_configure = TemplateVariablesWidget()
ipw.dlink(
tl.dlink(
(self.comp_resources_database, "computer_configure"),
(self.template_computer_configure, "templates"),
)

# Computer setup and configure.
self.aiida_computer_setup = AiidaComputerSetup()
ipw.dlink(
tl.dlink(
(self.template_computer_setup, "filled_templates"),
(self.aiida_computer_setup, "computer_setup"),
)
ipw.dlink(
tl.dlink(
(self.template_computer_configure, "filled_templates"),
(self.aiida_computer_setup, "computer_configure"),
)
self.aiida_computer_setup.on_setup_computer_success(
self._on_setup_computer_success
)
ipw.dlink(
tl.dlink(
(self.aiida_computer_setup, "message"),
(self, "message"),
)

# SSH connection setup.
ipw.dlink(
tl.dlink(
(self.template_computer_configure, "filled_templates"),
(self.ssh_computer_setup, "ssh_config"),
)

# Code setup.
self.template_code = TemplateVariablesWidget()
ipw.dlink(
tl.dlink(
(self.comp_resources_database, "code_setup"),
(self.template_code, "templates"),
)
self.aiida_code_setup = AiidaCodeSetup()
ipw.dlink(
tl.dlink(
(self.template_code, "filled_templates"),
(self.aiida_code_setup, "code_setup"),
)
self.aiida_code_setup.on_setup_code_success(self._on_setup_code_success)
ipw.dlink(
tl.dlink(
(self.aiida_code_setup, "message"),
(self, "message"),
)
Expand Down

0 comments on commit 0696364

Please sign in to comment.