Skip to content

Commit d65d155

Browse files
author
Andrei Neagu
committed
refactor
1 parent 1db89fe commit d65d155

File tree

1 file changed

+3
-6
lines changed
  • services/dynamic-scheduler/src/simcore_service_dynamic_scheduler/api/frontend/routes

1 file changed

+3
-6
lines changed

services/dynamic-scheduler/src/simcore_service_dynamic_scheduler/api/frontend/routes/_service.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ async def service_details(node_id: NodeID):
6464
with ui.dialog() as confirm_dialog, ui.card():
6565

6666
async def remove_from_tracking():
67-
confirm_dialog.submit("Remove")
67+
confirm_dialog.close()
6868
await httpx.AsyncClient(timeout=10).get(
6969
f"http://localhost:{DEFAULT_FASTAPI_PORT}/service/{node_id}/tracker:remove"
7070
)
@@ -89,16 +89,13 @@ async def remove_from_tracking():
8989

9090
with ui.row():
9191
ui.button("Remove service", color="red", on_click=remove_from_tracking)
92-
ui.button("Cancel", on_click=lambda: confirm_dialog.submit("Cancel"))
93-
94-
async def display_confirm_dialog():
95-
await confirm_dialog
92+
ui.button("Cancel", on_click=confirm_dialog.close)
9693

9794
ui.button(
9895
"Remove from tracking",
9996
icon="remove_circle",
10097
color="red",
101-
on_click=display_confirm_dialog,
98+
on_click=confirm_dialog.open,
10299
).tooltip("Removes the service form the dynamic-scheduler's internal tracking")
103100

104101

0 commit comments

Comments
 (0)