From f2f8a7c5c2bfb7eba79a30f20ebb5091682c474b Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Sun, 23 Jan 2022 11:59:57 -0700 Subject: [PATCH] Print the URL for the web page If analysis is on a known machine with a web portal, print the URL where the analysis can be found at the end of the run. --- mpas_analysis/shared/html/pages.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/mpas_analysis/shared/html/pages.py b/mpas_analysis/shared/html/pages.py index 5f9607fa4..caf46b641 100644 --- a/mpas_analysis/shared/html/pages.py +++ b/mpas_analysis/shared/html/pages.py @@ -87,7 +87,17 @@ def generate_html(config, analyses, controlConfig, customConfigFiles): page.generate() - print("Done.") + url = None + if config.has_section('web_portal'): + section = config['web_portal'] + base_path = section.get('base_path') + base_url = section.get('base_url') + html_dir = config.get('output', 'htmlSubdirectory') + if html_dir.startswith(base_path): + url = base_url + html_dir[len(base_path):] + print(f'Web page: {url}') + if url is None: + print("Done.") # }}}