From 3761acc8f9e08db5109130e45851a33ae0586f72 Mon Sep 17 00:00:00 2001 From: slominskir Date: Thu, 4 Jan 2024 12:12:45 -0500 Subject: [PATCH] Fixes https://github.com/JeffersonLab/cnm/issues/1 --- README.md | 2 ++ src/main/webapp/WEB-INF/tags/page.tag | 6 +++--- src/main/webapp/WEB-INF/views/generator/step-five.jsp | 2 +- src/main/webapp/WEB-INF/views/translator.jsp | 2 +- src/main/webapp/resources/js/sector.js | 2 +- src/main/webapp/resources/js/system.js | 2 +- src/main/webapp/resources/js/type.js | 2 +- 7 files changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 75448ed..23c66f1 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,8 @@ Wildfly must be pre-configured before the first deployment of the app. The [wild ### Runtime Uses the [Smoothness Environment Variables](https://github.com/JeffersonLab/smoothness#environment-variables). +Additionally, the scheme, host name and port of the CEBAF Element Database (CED) server is configured with environment variable `CED_SERVER_URL`. + ## Build This project is built with [Java 17](https://adoptium.net/) (compiled to Java 11 bytecode), and uses the [Gradle 7](https://gradle.org/) build tool to automatically download dependencies and build the project from source: diff --git a/src/main/webapp/WEB-INF/tags/page.tag b/src/main/webapp/WEB-INF/tags/page.tag index c9678fe..967761c 100644 --- a/src/main/webapp/WEB-INF/tags/page.tag +++ b/src/main/webapp/WEB-INF/tags/page.tag @@ -13,12 +13,12 @@ + - - Note: The CED is only accessible from onsite -
    diff --git a/src/main/webapp/WEB-INF/views/generator/step-five.jsp b/src/main/webapp/WEB-INF/views/generator/step-five.jsp index ea2a5cc..cfb7f92 100644 --- a/src/main/webapp/WEB-INF/views/generator/step-five.jsp +++ b/src/main/webapp/WEB-INF/views/generator/step-five.jsp @@ -33,7 +33,7 @@

    The following names are already taken:

      - CED Inventory + CED Inventory

      Want to reserve your new element name? Contact the CED administrator

      diff --git a/src/main/webapp/WEB-INF/views/translator.jsp b/src/main/webapp/WEB-INF/views/translator.jsp index 69f9311..9d0d90d 100644 --- a/src/main/webapp/WEB-INF/views/translator.jsp +++ b/src/main/webapp/WEB-INF/views/translator.jsp @@ -64,7 +64,7 @@ }); $(document).on("click", "#ced-link", function() { var query = $("#name-input").val(); - window.open('https://ced.acc.jlab.org/inventory?q=' + encodeURIComponent(query) + '*'); + window.open(jlab.cedServerUrl + '/inventory?q=' + encodeURIComponent(query) + '*'); return false; }); diff --git a/src/main/webapp/resources/js/sector.js b/src/main/webapp/resources/js/sector.js index dd0bc22..a0d1ba2 100644 --- a/src/main/webapp/resources/js/sector.js +++ b/src/main/webapp/resources/js/sector.js @@ -163,5 +163,5 @@ $(document).on("click", "#open-edit-row-dialog-button", function() { }); $(document).on("click", "#inventory-button", function() { var code = $(".editable-row-table tr.selected-row td:first-child").text(); - window.open("http://ced.acc.jlab.org/inventory/?z=&t=LineElem&ng=___" + code + "%25"); + window.open(jlab.cedServerUrl + "/inventory/?z=&t=LineElem&ng=___" + code + "%25"); }); diff --git a/src/main/webapp/resources/js/system.js b/src/main/webapp/resources/js/system.js index 2378a07..c380b33 100644 --- a/src/main/webapp/resources/js/system.js +++ b/src/main/webapp/resources/js/system.js @@ -153,5 +153,5 @@ $(document).on("click", "#open-edit-row-dialog-button", function() { }); $(document).on("click", "#inventory-button", function() { var code = $(".editable-row-table tr.selected-row td:first-child").text(); - window.open("http://ced.acc.jlab.org/inventory/?z=&t=LineElem&ng=" + code + "%25"); + window.open(jlab.cedServerUrl + "/inventory/?z=&t=LineElem&ng=" + code + "%25"); }); diff --git a/src/main/webapp/resources/js/type.js b/src/main/webapp/resources/js/type.js index 2369e06..a4b1b2d 100644 --- a/src/main/webapp/resources/js/type.js +++ b/src/main/webapp/resources/js/type.js @@ -395,7 +395,7 @@ $(document).on("click", "#open-edit-row-dialog-button", function () { $(document).on("click", "#inventory-button", function () { var scode = $(".editable-row-table tr.selected-row td:first-child").text(), vvcode = $(".editable-row-table tr.selected-row td:nth-child(2)").text(); - window.open("http://ced.acc.jlab.org/inventory/?z=&t=LineElem&ng=" + scode + vvcode + "%25"); + window.open(jlab.cedServerUrl + "/inventory/?z=&t=LineElem&ng=" + scode + vvcode + "%25"); }); $(document).on("click", "#editable-attributes-button", function () { var $dialog = $("#editable-attributes-dialog"),