From 7de11d9ffeb010a45689d3a816812cb6b16c2260 Mon Sep 17 00:00:00 2001 From: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com> Date: Fri, 27 Jan 2023 15:31:01 +0000 Subject: [PATCH 1/2] Fix URL for `cylc gui ` --- cylc/uiserver/app.py | 2 +- cylc/uiserver/scripts/gui.py | 4 ++-- cylc/uiserver/tests/test_gui.py | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cylc/uiserver/app.py b/cylc/uiserver/app.py index e0807fac..e2c55c7d 100644 --- a/cylc/uiserver/app.py +++ b/cylc/uiserver/app.py @@ -518,7 +518,7 @@ def initialize_templates(self): @classmethod def launch_instance(cls, argv=None, workflow_id=None, **kwargs): if workflow_id: - cls.default_url = f"/cylc/#/workflows/{workflow_id}" + cls.default_url = f"/cylc/#/workspace/{workflow_id}" else: cls.default_url = "/cylc" if argv is None: diff --git a/cylc/uiserver/scripts/gui.py b/cylc/uiserver/scripts/gui.py index 8fed803e..bb4a5c24 100644 --- a/cylc/uiserver/scripts/gui.py +++ b/cylc/uiserver/scripts/gui.py @@ -145,7 +145,7 @@ def update_html_file(gui_file, workflow_id): if not url_string: return url = url_string.group(1) - split_url = url.split('/workflows/') + split_url = url.split('/workspace/') if not workflow_id: # new url should point to dashboard if len(split_url) == 1: @@ -165,7 +165,7 @@ def update_html_file(gui_file, workflow_id): replacement_url_string = url.replace(old_workflow, workflow_id) else: # current url points to dashboard, update to point to workflow - replacement_url_string = f"{url}/workflows/{workflow_id}" + replacement_url_string = f"{url}/workspace/{workflow_id}" update_url_string(gui_file, url, replacement_url_string) diff --git a/cylc/uiserver/tests/test_gui.py b/cylc/uiserver/tests/test_gui.py index 3f390ab6..c42d4604 100644 --- a/cylc/uiserver/tests/test_gui.py +++ b/cylc/uiserver/tests/test_gui.py @@ -32,17 +32,17 @@ pytest.param( 'content="1;url=http://localhost:8892/cylc/?token=1234567890some_big_long_token1234567890#" /> ', 'some/workflow', - 'content="1;url=http://localhost:8892/cylc/?token=1234567890some_big_long_token1234567890#/workflows/some/workflow" /> ', + 'content="1;url=http://localhost:8892/cylc/?token=1234567890some_big_long_token1234567890#/workspace/some/workflow" /> ', id='existing_no_workflow_new_workflow' ), pytest.param( - 'content="1;url=http://localhost:8892/cylc/?token=1234567890some_big_long_token1234567890#/workflows/some/workflow" /> ', + 'content="1;url=http://localhost:8892/cylc/?token=1234567890some_big_long_token1234567890#/workspace/some/workflow" /> ', 'another/flow', - 'content="1;url=http://localhost:8892/cylc/?token=1234567890some_big_long_token1234567890#/workflows/another/flow" /> ', + 'content="1;url=http://localhost:8892/cylc/?token=1234567890some_big_long_token1234567890#/workspace/another/flow" /> ', id='existing_workflow_new_workflow' ), pytest.param( - 'content="1;url=http://localhost:8892/cylc/?token=1234567890some_big_long_token1234567890#/workflows/some/workflow" /> ', + 'content="1;url=http://localhost:8892/cylc/?token=1234567890some_big_long_token1234567890#/workspace/some/workflow" /> ', None, 'content="1;url=http://localhost:8892/cylc/?token=1234567890some_big_long_token1234567890#" /> ', id='existing_workflow_no_new_workflow' From 19797df1a167d5ba06ab6caca2a7938e60cd4f57 Mon Sep 17 00:00:00 2001 From: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com> Date: Fri, 27 Jan 2023 15:44:24 +0000 Subject: [PATCH 2/2] Update changelog --- CHANGES.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index d7f76dd1..0fd7057d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -11,9 +11,9 @@ creating a new release entry be sure to copy & paste the span tag with the updated. Only the first match gets replaced, so it's fine to leave the old ones in. --> ------------------------------------------------------------------------------- -## __cylc-uiserver-1.3.0 (Pending)__ +## __cylc-uiserver-1.2.1 (Pending)__ - +[Updated cylc-ui to 1.5.0](https://github.com/cylc/cylc-ui/blob/master/CHANGES.md) ### Enhancements