diff --git a/changes.d/661.feat.md b/changes.d/661.feat.md new file mode 100644 index 00000000..62fa704b --- /dev/null +++ b/changes.d/661.feat.md @@ -0,0 +1 @@ +The GUI can now be launched in standalone mode even if `[hub]url` is configured, using the `--new` option. diff --git a/cylc/uiserver/app.py b/cylc/uiserver/app.py index 46abeab4..afe9aa3c 100644 --- a/cylc/uiserver/app.py +++ b/cylc/uiserver/app.py @@ -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] diff --git a/cylc/uiserver/scripts/gui.py b/cylc/uiserver/scripts/gui.py index 6aa86ca1..40a12c4c 100644 --- a/cylc/uiserver/scripts/gui.py +++ b/cylc/uiserver/scripts/gui.py @@ -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