diff --git a/src/webmon_app/reporting/report/views.py b/src/webmon_app/reporting/report/views.py index 31d1b896..8506a7d0 100644 --- a/src/webmon_app/reporting/report/views.py +++ b/src/webmon_app/reporting/report/views.py @@ -8,7 +8,6 @@ import sys import logging import json -import string import datetime from django.http import HttpResponse, HttpResponseNotFound from django.shortcuts import render, get_object_or_404 @@ -250,19 +249,12 @@ def detail(request, instrument, run_id): except: # noqa: E722 prev_url = None - # Fitting URL - fitting_url = None - if hasattr(settings, "FITTING_URLS") and instrument.lower() in settings.FITTING_URLS: - url_template = string.Template(settings.FITTING_URLS[instrument.lower()]) - fitting_url = url_template.substitute(run_number=run_id) - template_values = { "instrument": instrument.upper(), "run_object": run_object, "status": status_objects, "breadcrumbs": breadcrumbs, "icat_info": icat_info, - "fitting_url": fitting_url, "reduce_url": reduce_url, "reduction_setup_url": reporting_view_util.reduction_setup_url(instrument), "prev_url": prev_url, diff --git a/src/webmon_app/reporting/reporting_app/settings/base.py b/src/webmon_app/reporting/reporting_app/settings/base.py index c17c1e4a..1336ca9c 100644 --- a/src/webmon_app/reporting/reporting_app/settings/base.py +++ b/src/webmon_app/reporting/reporting_app/settings/base.py @@ -152,6 +152,7 @@ def validate_ldap_settings(server_uri, user_dn_template): CATALOG_URL = environ.get("CATALOG_URL") CATALOG_ID = environ.get("CATALOG_ID") CATALOG_SECRET = environ.get("CATALOG_SECRET") +CATALOG_API_TOKEN = environ.get("CATALOG_API_TOKEN") # The DB settings are defined the same as in the workflow manager DATABASES = { @@ -365,10 +366,6 @@ def validate_ldap_settings(server_uri, user_dn_template): for instr, facility in additions.items(): FACILITY_INFO[instr] = facility -# Link out to fitting application -FITTING_URLS = {} - - # remote worker options # setting these will force all execution to happen as a single user TEST_REMOTE_USER = "" diff --git a/src/webmon_app/reporting/reporting_app/settings/envtest.py b/src/webmon_app/reporting/reporting_app/settings/envtest.py index 4c829093..4b4d2e90 100644 --- a/src/webmon_app/reporting/reporting_app/settings/envtest.py +++ b/src/webmon_app/reporting/reporting_app/settings/envtest.py @@ -11,6 +11,4 @@ GENERAL_USER_USERNAME = environ.get("GENERAL_USER_USERNAME", "GeneralUser") # noqa: F405 GENERAL_USER_PASSWORD = environ.get("GENERAL_USER_PASSWORD", "GeneralUser") # noqa: F405 -FITTING_URLS = {"ref_l": "https://reflectivity-test.ornl.gov/fit/ref_l/$run_number"} - validate_ldap_settings(server_uri=AUTH_LDAP_SERVER_URI, user_dn_template=AUTH_LDAP_USER_DN_TEMPLATE) # noqa: F405 diff --git a/src/webmon_app/reporting/reporting_app/settings/prod.py b/src/webmon_app/reporting/reporting_app/settings/prod.py index 61272614..8dbf4a19 100644 --- a/src/webmon_app/reporting/reporting_app/settings/prod.py +++ b/src/webmon_app/reporting/reporting_app/settings/prod.py @@ -12,6 +12,4 @@ # SECURITY WARNING: don't run with debug turned on in production! DEBUG = environ.get("DEBUG", False) -FITTING_URLS = {"ref_l": "https://reflectivity.sns.gov/fit/ref_l/$run_number"} - validate_ldap_settings(server_uri=AUTH_LDAP_SERVER_URI, user_dn_template=AUTH_LDAP_USER_DN_TEMPLATE) # noqa: F405 diff --git a/src/webmon_app/reporting/templates/report/detail.html b/src/webmon_app/reporting/templates/report/detail.html index 70a0ffdf..145ed61f 100644 --- a/src/webmon_app/reporting/templates/report/detail.html +++ b/src/webmon_app/reporting/templates/report/detail.html @@ -133,11 +133,6 @@
{% endif %} - {% if fitting_url %} -
- fit data | - {% endif %} - {% if html_data %} {% if data_url %} Data access: download plot data points diff --git a/tests/data/REF_L/IPTS-33077/nexus/REF_L_214746.nxs.h5 b/tests/data/REF_L/IPTS-33077/nexus/REF_L_214746.nxs.h5 new file mode 100644 index 00000000..e69de29b diff --git a/tests/data/REF_L/IPTS-33077/nexus/REF_L_214747.nxs.h5 b/tests/data/REF_L/IPTS-33077/nexus/REF_L_214747.nxs.h5 new file mode 100644 index 00000000..e69de29b diff --git a/tests/data/REF_L/shared/autoreduce/reduce_REF_L.py b/tests/data/REF_L/shared/autoreduce/reduce_REF_L.py new file mode 100644 index 00000000..b025ae49 --- /dev/null +++ b/tests/data/REF_L/shared/autoreduce/reduce_REF_L.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python +import os +import sys +import socket +from datetime import datetime +from postprocessing.publish_plot import publish_plot + +if __name__ == "__main__": + time = datetime.isoformat(datetime.now()) + filename = sys.argv[1] + print("Running reduction for " + filename + " at " + time) + + publish_plot( + "REF_L", + os.path.basename(filename).split(".")[0].split("_")[-1], + files={ + "file": f"
Filename: {filename}
" + f"Time: {time}
Hostname: {socket.gethostname()}