Skip to content

Commit

Permalink
Merge pull request #661 from oliver-sanders/gui-new
Browse files Browse the repository at this point in the history
gui: always allow starting a standalone GUI with --new
  • Loading branch information
oliver-sanders authored Jan 15, 2025
2 parents 2dde11b + a4c944b commit 94ff043
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions changes.d/661.feat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The GUI can now be launched in standalone mode even if `[hub]url` is configured, using the `--new` option.
4 changes: 3 additions & 1 deletion cylc/uiserver/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ class CylcUIServer(ExtensionApp):
cylc gui # Start the Cylc GUI (at the dashboard page)
cylc gui [workflow] # Start the Cylc GUI (at the workflow page)
cylc gui --new [workflow] # Start a new Cylc server instance if an old one
# has become unresponsive.
# has become unresponsive, or, if the GUI has
# been configured to launch via a centralised
# hub.
cylc gui --no-browser # Start the server but don't open the browser
''') # type: ignore[assignment]
Expand Down
2 changes: 1 addition & 1 deletion cylc/uiserver/scripts/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def main(*argv):
'''))
return
if not {'--help', '--help-all'} & set(sys.argv):
if hub_url:
if hub_url and not new_gui:
print(f"Running on {hub_url } as specified in global config.")
webbrowser.open(
update_url(hub_url, workflow_id), autoraise=True
Expand Down

0 comments on commit 94ff043

Please sign in to comment.