From 064f1d87cfda7f4d852ea00edeb9983eb8b00ecd Mon Sep 17 00:00:00 2001 From: Ray Lee Date: Tue, 10 Sep 2024 16:48:51 -0400 Subject: [PATCH] DRYD-1516: Install public browser front-end along with UI. (#422) --- build.properties | 9 +++- cspace-ui/anthro/WEB-INF/web.xml | 14 +++++++ cspace-ui/anthro/build.properties | 3 ++ cspace-ui/anthro/public/index.jsp | 22 ++++++++++ cspace-ui/bonsai/WEB-INF/web.xml | 14 +++++++ cspace-ui/bonsai/build.properties | 3 ++ cspace-ui/bonsai/public/index.jsp | 22 ++++++++++ cspace-ui/botgarden/WEB-INF/web.xml | 14 +++++++ cspace-ui/botgarden/build.properties | 3 ++ cspace-ui/botgarden/public/index.jsp | 22 ++++++++++ cspace-ui/build.xml | 61 +++++++++++++++++++++++----- cspace-ui/build_js.sh | 5 ++- cspace-ui/core/WEB-INF/web.xml | 14 +++++++ cspace-ui/core/build.properties | 3 ++ cspace-ui/core/public/index.jsp | 21 ++++++++++ cspace-ui/fcart/WEB-INF/web.xml | 14 +++++++ cspace-ui/fcart/build.properties | 3 ++ cspace-ui/fcart/public/index.jsp | 22 ++++++++++ cspace-ui/herbarium/WEB-INF/web.xml | 14 +++++++ cspace-ui/herbarium/build.properties | 3 ++ cspace-ui/herbarium/public/index.jsp | 22 ++++++++++ cspace-ui/lhmc/WEB-INF/web.xml | 14 +++++++ cspace-ui/lhmc/build.properties | 3 ++ cspace-ui/lhmc/public/index.jsp | 22 ++++++++++ cspace-ui/materials/WEB-INF/web.xml | 14 +++++++ cspace-ui/materials/build.properties | 3 ++ cspace-ui/materials/public/index.jsp | 22 ++++++++++ cspace-ui/publicart/WEB-INF/web.xml | 14 +++++++ cspace-ui/publicart/build.properties | 3 ++ cspace-ui/publicart/public/index.jsp | 22 ++++++++++ 30 files changed, 411 insertions(+), 14 deletions(-) create mode 100644 cspace-ui/anthro/public/index.jsp create mode 100644 cspace-ui/bonsai/public/index.jsp create mode 100644 cspace-ui/botgarden/public/index.jsp create mode 100644 cspace-ui/core/public/index.jsp create mode 100644 cspace-ui/fcart/public/index.jsp create mode 100644 cspace-ui/herbarium/public/index.jsp create mode 100644 cspace-ui/lhmc/public/index.jsp create mode 100644 cspace-ui/materials/public/index.jsp create mode 100644 cspace-ui/publicart/public/index.jsp diff --git a/build.properties b/build.properties index 7a9843f60..de8942d14 100644 --- a/build.properties +++ b/build.properties @@ -29,9 +29,16 @@ cspace.ui.package.name=cspace-ui cspace.ui.library.name=cspaceUI cspace.ui.version=9.0.1 cspace.ui.build.branch=master -cspace.ui.build.node.ver=14 +cspace.ui.build.node.ver=20 service.ui.library.name=${cspace.ui.library.name}-service +# Public browser settings +cspace.public.browser.package.name=@collectionspace/cspace-public-browser +cspace.public.browser.library.name=cspacePublicBrowser +cspace.public.browser.version=3.1.0 +cspace.public.browser.build.branch=master +cspace.public.browser.build.node.ver=20 + #nuxeo nuxeo.release=9.10-HF30 nuxeo.ear=nuxeo.ear diff --git a/cspace-ui/anthro/WEB-INF/web.xml b/cspace-ui/anthro/WEB-INF/web.xml index 3c1a184fb..843689fda 100644 --- a/cspace-ui/anthro/WEB-INF/web.xml +++ b/cspace-ui/anthro/WEB-INF/web.xml @@ -8,6 +8,20 @@ FallbackResourceFilter /* + + + PublicBrowserFallbackResourceFilter + org.collectionspace.services.common.filter.FallbackResourceFilter + + file + /public/index.jsp + + + + PublicBrowserFallbackResourceFilter + /public/* + + ExpiresFilter org.apache.catalina.filters.ExpiresFilter diff --git a/cspace-ui/anthro/build.properties b/cspace-ui/anthro/build.properties index 3941db9be..59da7133a 100644 --- a/cspace-ui/anthro/build.properties +++ b/cspace-ui/anthro/build.properties @@ -5,3 +5,6 @@ tenant.ui.profile.plugin.package.name=cspace-ui-plugin-profile-anthro tenant.ui.profile.plugin.library.name=cspaceUIPluginProfileAnthro tenant.ui.profile.plugin.version=8.0.0 tenant.ui.profile.plugin.build.branch=master + +# If not set, defaults to /gateway/${tenant.shortname} on the current host. +# tenant.public.browser.gateway.url=https://core.dev.collectionspace.org/gateway/${tenant.shortname} diff --git a/cspace-ui/anthro/public/index.jsp b/cspace-ui/anthro/public/index.jsp new file mode 100644 index 000000000..eff259d17 --- /dev/null +++ b/cspace-ui/anthro/public/index.jsp @@ -0,0 +1,22 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> +<%! String configuredGatewayUrl = "@GATEWAY_URL@"; %> + + + + + +
+ + + + diff --git a/cspace-ui/bonsai/WEB-INF/web.xml b/cspace-ui/bonsai/WEB-INF/web.xml index 3c1a184fb..843689fda 100644 --- a/cspace-ui/bonsai/WEB-INF/web.xml +++ b/cspace-ui/bonsai/WEB-INF/web.xml @@ -8,6 +8,20 @@ FallbackResourceFilter /* + + + PublicBrowserFallbackResourceFilter + org.collectionspace.services.common.filter.FallbackResourceFilter + + file + /public/index.jsp + + + + PublicBrowserFallbackResourceFilter + /public/* + + ExpiresFilter org.apache.catalina.filters.ExpiresFilter diff --git a/cspace-ui/bonsai/build.properties b/cspace-ui/bonsai/build.properties index 7c26ae75b..9ce31e95c 100644 --- a/cspace-ui/bonsai/build.properties +++ b/cspace-ui/bonsai/build.properties @@ -5,3 +5,6 @@ tenant.ui.profile.plugin.package.name=cspace-ui-plugin-profile-bonsai tenant.ui.profile.plugin.library.name=cspaceUIPluginProfileBonsai tenant.ui.profile.plugin.version=6.0.0 tenant.ui.profile.plugin.build.branch=master + +# If not set, defaults to /gateway/${tenant.shortname} on the current host. +# tenant.public.browser.gateway.url=https://core.dev.collectionspace.org/gateway/${tenant.shortname} diff --git a/cspace-ui/bonsai/public/index.jsp b/cspace-ui/bonsai/public/index.jsp new file mode 100644 index 000000000..eff259d17 --- /dev/null +++ b/cspace-ui/bonsai/public/index.jsp @@ -0,0 +1,22 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> +<%! String configuredGatewayUrl = "@GATEWAY_URL@"; %> + + + + + +
+ + + + diff --git a/cspace-ui/botgarden/WEB-INF/web.xml b/cspace-ui/botgarden/WEB-INF/web.xml index 3c1a184fb..843689fda 100644 --- a/cspace-ui/botgarden/WEB-INF/web.xml +++ b/cspace-ui/botgarden/WEB-INF/web.xml @@ -8,6 +8,20 @@ FallbackResourceFilter /* + + + PublicBrowserFallbackResourceFilter + org.collectionspace.services.common.filter.FallbackResourceFilter + + file + /public/index.jsp + + + + PublicBrowserFallbackResourceFilter + /public/* + + ExpiresFilter org.apache.catalina.filters.ExpiresFilter diff --git a/cspace-ui/botgarden/build.properties b/cspace-ui/botgarden/build.properties index c0d1282b0..8475b59b6 100644 --- a/cspace-ui/botgarden/build.properties +++ b/cspace-ui/botgarden/build.properties @@ -5,3 +5,6 @@ tenant.ui.profile.plugin.package.name=cspace-ui-plugin-profile-botgarden tenant.ui.profile.plugin.library.name=cspaceUIPluginProfileBotGarden tenant.ui.profile.plugin.version=3.1.1 tenant.ui.profile.plugin.build.branch=master + +# If not set, defaults to /gateway/${tenant.shortname} on the current host. +# tenant.public.browser.gateway.url=https://core.dev.collectionspace.org/gateway/${tenant.shortname} diff --git a/cspace-ui/botgarden/public/index.jsp b/cspace-ui/botgarden/public/index.jsp new file mode 100644 index 000000000..eff259d17 --- /dev/null +++ b/cspace-ui/botgarden/public/index.jsp @@ -0,0 +1,22 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> +<%! String configuredGatewayUrl = "@GATEWAY_URL@"; %> + + + + + +
+ + + + diff --git a/cspace-ui/build.xml b/cspace-ui/build.xml index 08ec1076d..e4954e801 100644 --- a/cspace-ui/build.xml +++ b/cspace-ui/build.xml @@ -29,6 +29,7 @@ + @@ -51,14 +52,14 @@ - + - + @@ -67,13 +68,7 @@ - - - - - - - + @@ -89,6 +84,12 @@ + + + + + + @@ -101,7 +102,39 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -155,7 +188,7 @@ - + @@ -199,11 +232,17 @@ + + + + + + diff --git a/cspace-ui/build_js.sh b/cspace-ui/build_js.sh index 147d6ea98..460ee9ecd 100755 --- a/cspace-ui/build_js.sh +++ b/cspace-ui/build_js.sh @@ -7,12 +7,13 @@ OUTPUT_DIR=$4 LIBRARY_NAME=$5 SERVICE_LIBRARY_NAME=$6 -CODE_DIR=$CHECKOUT_DIR/$PACKAGE_NAME.js +UNORG_PACKAGE_NAME=`echo $PACKAGE_NAME | sed -e 's/^@.*\///'` +CODE_DIR=$CHECKOUT_DIR/$UNORG_PACKAGE_NAME.js . "$HOME/.nvm/nvm.sh" rm -r $CODE_DIR -git clone --branch $BRANCH_NAME --depth 1 https://github.com/collectionspace/$PACKAGE_NAME.js.git $CODE_DIR +git clone --branch $BRANCH_NAME --depth 1 https://github.com/collectionspace/$UNORG_PACKAGE_NAME.js.git $CODE_DIR pushd $CODE_DIR COMMIT_HASH=`git rev-parse --short HEAD` diff --git a/cspace-ui/core/WEB-INF/web.xml b/cspace-ui/core/WEB-INF/web.xml index 3c1a184fb..843689fda 100644 --- a/cspace-ui/core/WEB-INF/web.xml +++ b/cspace-ui/core/WEB-INF/web.xml @@ -8,6 +8,20 @@ FallbackResourceFilter /* + + + PublicBrowserFallbackResourceFilter + org.collectionspace.services.common.filter.FallbackResourceFilter + + file + /public/index.jsp + + + + PublicBrowserFallbackResourceFilter + /public/* + + ExpiresFilter org.apache.catalina.filters.ExpiresFilter diff --git a/cspace-ui/core/build.properties b/cspace-ui/core/build.properties index edcfe5fae..dc3d652fe 100644 --- a/cspace-ui/core/build.properties +++ b/cspace-ui/core/build.properties @@ -1,2 +1,5 @@ tenant.ui.webapp.dir=cspace#${tenant.shortname} tenant.ui.basename=/cspace/${tenant.shortname} + +# If not set, defaults to /gateway/${tenant.shortname} on the current host. +# tenant.public.browser.gateway.url=https://core.dev.collectionspace.org/gateway/${tenant.shortname} diff --git a/cspace-ui/core/public/index.jsp b/cspace-ui/core/public/index.jsp new file mode 100644 index 000000000..1ca1527df --- /dev/null +++ b/cspace-ui/core/public/index.jsp @@ -0,0 +1,21 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> +<%! String configuredGatewayUrl = "@GATEWAY_URL@"; %> + + + + + +
+ + + + diff --git a/cspace-ui/fcart/WEB-INF/web.xml b/cspace-ui/fcart/WEB-INF/web.xml index 3c1a184fb..843689fda 100644 --- a/cspace-ui/fcart/WEB-INF/web.xml +++ b/cspace-ui/fcart/WEB-INF/web.xml @@ -8,6 +8,20 @@ FallbackResourceFilter /* + + + PublicBrowserFallbackResourceFilter + org.collectionspace.services.common.filter.FallbackResourceFilter + + file + /public/index.jsp + + + + PublicBrowserFallbackResourceFilter + /public/* + + ExpiresFilter org.apache.catalina.filters.ExpiresFilter diff --git a/cspace-ui/fcart/build.properties b/cspace-ui/fcart/build.properties index 996d906f6..3dacbca52 100644 --- a/cspace-ui/fcart/build.properties +++ b/cspace-ui/fcart/build.properties @@ -5,3 +5,6 @@ tenant.ui.profile.plugin.package.name=cspace-ui-plugin-profile-fcart tenant.ui.profile.plugin.library.name=cspaceUIPluginProfileFCart tenant.ui.profile.plugin.version=7.0.0 tenant.ui.profile.plugin.build.branch=master + +# If not set, defaults to /gateway/${tenant.shortname} on the current host. +# tenant.public.browser.gateway.url=https://core.dev.collectionspace.org/gateway/${tenant.shortname} diff --git a/cspace-ui/fcart/public/index.jsp b/cspace-ui/fcart/public/index.jsp new file mode 100644 index 000000000..eff259d17 --- /dev/null +++ b/cspace-ui/fcart/public/index.jsp @@ -0,0 +1,22 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> +<%! String configuredGatewayUrl = "@GATEWAY_URL@"; %> + + + + + +
+ + + + diff --git a/cspace-ui/herbarium/WEB-INF/web.xml b/cspace-ui/herbarium/WEB-INF/web.xml index 3c1a184fb..843689fda 100644 --- a/cspace-ui/herbarium/WEB-INF/web.xml +++ b/cspace-ui/herbarium/WEB-INF/web.xml @@ -8,6 +8,20 @@ FallbackResourceFilter /* + + + PublicBrowserFallbackResourceFilter + org.collectionspace.services.common.filter.FallbackResourceFilter + + file + /public/index.jsp + + + + PublicBrowserFallbackResourceFilter + /public/* + + ExpiresFilter org.apache.catalina.filters.ExpiresFilter diff --git a/cspace-ui/herbarium/build.properties b/cspace-ui/herbarium/build.properties index ddf2d1e42..01c12e2c1 100644 --- a/cspace-ui/herbarium/build.properties +++ b/cspace-ui/herbarium/build.properties @@ -5,3 +5,6 @@ tenant.ui.profile.plugin.package.name=cspace-ui-plugin-profile-herbarium tenant.ui.profile.plugin.library.name=cspaceUIPluginProfileHerbarium tenant.ui.profile.plugin.version=2.0.12 tenant.ui.profile.plugin.build.branch=master + +# If not set, defaults to /gateway/${tenant.shortname} on the current host. +# tenant.public.browser.gateway.url=https://core.dev.collectionspace.org/gateway/${tenant.shortname} diff --git a/cspace-ui/herbarium/public/index.jsp b/cspace-ui/herbarium/public/index.jsp new file mode 100644 index 000000000..eff259d17 --- /dev/null +++ b/cspace-ui/herbarium/public/index.jsp @@ -0,0 +1,22 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> +<%! String configuredGatewayUrl = "@GATEWAY_URL@"; %> + + + + + +
+ + + + diff --git a/cspace-ui/lhmc/WEB-INF/web.xml b/cspace-ui/lhmc/WEB-INF/web.xml index 3c1a184fb..843689fda 100644 --- a/cspace-ui/lhmc/WEB-INF/web.xml +++ b/cspace-ui/lhmc/WEB-INF/web.xml @@ -8,6 +8,20 @@ FallbackResourceFilter /* + + + PublicBrowserFallbackResourceFilter + org.collectionspace.services.common.filter.FallbackResourceFilter + + file + /public/index.jsp + + + + PublicBrowserFallbackResourceFilter + /public/* + + ExpiresFilter org.apache.catalina.filters.ExpiresFilter diff --git a/cspace-ui/lhmc/build.properties b/cspace-ui/lhmc/build.properties index 9a570a588..7a643f2b6 100644 --- a/cspace-ui/lhmc/build.properties +++ b/cspace-ui/lhmc/build.properties @@ -5,3 +5,6 @@ tenant.ui.profile.plugin.package.name=cspace-ui-plugin-profile-lhmc tenant.ui.profile.plugin.library.name=cspaceUIPluginProfileLHMC tenant.ui.profile.plugin.version=7.0.0 tenant.ui.profile.plugin.build.branch=master + +# If not set, defaults to /gateway/${tenant.shortname} on the current host. +# tenant.public.browser.gateway.url=https://core.dev.collectionspace.org/gateway/${tenant.shortname} diff --git a/cspace-ui/lhmc/public/index.jsp b/cspace-ui/lhmc/public/index.jsp new file mode 100644 index 000000000..eff259d17 --- /dev/null +++ b/cspace-ui/lhmc/public/index.jsp @@ -0,0 +1,22 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> +<%! String configuredGatewayUrl = "@GATEWAY_URL@"; %> + + + + + +
+ + + + diff --git a/cspace-ui/materials/WEB-INF/web.xml b/cspace-ui/materials/WEB-INF/web.xml index 3c1a184fb..843689fda 100644 --- a/cspace-ui/materials/WEB-INF/web.xml +++ b/cspace-ui/materials/WEB-INF/web.xml @@ -8,6 +8,20 @@ FallbackResourceFilter /* + + + PublicBrowserFallbackResourceFilter + org.collectionspace.services.common.filter.FallbackResourceFilter + + file + /public/index.jsp + + + + PublicBrowserFallbackResourceFilter + /public/* + + ExpiresFilter org.apache.catalina.filters.ExpiresFilter diff --git a/cspace-ui/materials/build.properties b/cspace-ui/materials/build.properties index 4f0692beb..6ccff352f 100644 --- a/cspace-ui/materials/build.properties +++ b/cspace-ui/materials/build.properties @@ -5,3 +5,6 @@ tenant.ui.profile.plugin.package.name=cspace-ui-plugin-profile-materials tenant.ui.profile.plugin.library.name=cspaceUIPluginProfileMaterials tenant.ui.profile.plugin.version=4.0.0 tenant.ui.profile.plugin.build.branch=master + +# If not set, defaults to /gateway/${tenant.shortname} on the current host. +# tenant.public.browser.gateway.url=https://core.dev.collectionspace.org/gateway/${tenant.shortname} diff --git a/cspace-ui/materials/public/index.jsp b/cspace-ui/materials/public/index.jsp new file mode 100644 index 000000000..eff259d17 --- /dev/null +++ b/cspace-ui/materials/public/index.jsp @@ -0,0 +1,22 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> +<%! String configuredGatewayUrl = "@GATEWAY_URL@"; %> + + + + + +
+ + + + diff --git a/cspace-ui/publicart/WEB-INF/web.xml b/cspace-ui/publicart/WEB-INF/web.xml index 3c1a184fb..843689fda 100644 --- a/cspace-ui/publicart/WEB-INF/web.xml +++ b/cspace-ui/publicart/WEB-INF/web.xml @@ -8,6 +8,20 @@ FallbackResourceFilter /* + + + PublicBrowserFallbackResourceFilter + org.collectionspace.services.common.filter.FallbackResourceFilter + + file + /public/index.jsp + + + + PublicBrowserFallbackResourceFilter + /public/* + + ExpiresFilter org.apache.catalina.filters.ExpiresFilter diff --git a/cspace-ui/publicart/build.properties b/cspace-ui/publicart/build.properties index 576928317..d970762ce 100644 --- a/cspace-ui/publicart/build.properties +++ b/cspace-ui/publicart/build.properties @@ -5,3 +5,6 @@ tenant.ui.profile.plugin.package.name=cspace-ui-plugin-profile-publicart tenant.ui.profile.plugin.library.name=cspaceUIPluginProfilePublicArt tenant.ui.profile.plugin.version=6.0.0 tenant.ui.profile.plugin.build.branch=master + +# If not set, defaults to /gateway/${tenant.shortname} on the current host. +# tenant.public.browser.gateway.url=https://core.dev.collectionspace.org/gateway/${tenant.shortname} diff --git a/cspace-ui/publicart/public/index.jsp b/cspace-ui/publicart/public/index.jsp new file mode 100644 index 000000000..eff259d17 --- /dev/null +++ b/cspace-ui/publicart/public/index.jsp @@ -0,0 +1,22 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> +<%! String configuredGatewayUrl = "@GATEWAY_URL@"; %> + + + + + +
+ + + + -- 2.47.3