Skip to content

Commit

Permalink
Merge pull request #26 from AtlasOfLivingAustralia/develop
Browse files Browse the repository at this point in the history
Release 2.1.0 PR
  • Loading branch information
sughics authored Sep 20, 2022
2 parents d524b43 + b01cf61 commit 8c895cd
Show file tree
Hide file tree
Showing 13 changed files with 156 additions and 115 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
dist: trusty
language: groovy
jdk:
- oraclejdk8
- oraclejdk11
sudo: false
branches:
only:
- master
- develop
- feature/oidc-auth
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
Expand All @@ -19,5 +19,6 @@ after_success:
- '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && travis_retry ./gradlew publish'
env:
global:
- JAVA_TOOL_OPTIONS=-Dhttps.protocols=TLSv1.2
- secure: Z6Jfqbjh+XtuJZpVEmBq3ZarQYG2Hb++md9uBKQeWyy23pM7Mh3S3enne3DNs7zyPEUYVr+udUZI5uGyKmjMKZqAgacZZeAtaj4tcJyZPJDzxCTyxzA+BlcYT3/tdmv/9jH4iwolp9CPHGZA69WhlttV9NLg9GBCpElfxi2bs7A=
- secure: Bl6/Y0aI9Dq3CxZBJgES+M39O62+zkxzI93/6R0g0b7e86i6v5l319Y9fi3PLQ+YsIwJDMMSPvksKOLCk+e0WrizcdF21fDcJlHyO6WrnPoZIHA+dvMJ2AORIbHtBWo5KdczDmWR9/n2UkV6xwRZ0MRZ25bZLy3AsHh/I/5FMPA=
15 changes: 7 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ buildscript {
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
classpath "gradle.plugin.com.github.erdi.webdriver-binaries:webdriver-binaries-gradle-plugin:2.0"
// classpath "org.grails.plugins:hibernate5:7.0.4"
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:3.2.4"
}
}

version "2.0.1"

version "2.1-SNAPSHOT"
group "au.org.ala"

apply plugin:"eclipse"
Expand All @@ -24,8 +24,6 @@ apply plugin:"com.bertramlabs.asset-pipeline"
apply plugin:"org.grails.grails-gsp"
apply plugin:"maven-publish"

sourceCompatibility = 1.8
targetCompatibility = 1.8

repositories {
mavenLocal()
Expand Down Expand Up @@ -82,10 +80,11 @@ dependencies {
compile 'org.webjars:knockout:3.5.1'

// ALA Plugins
compile group: 'org.grails.plugins', name: 'ala-auth', version: '3.2.2'
compile group: 'org.grails.plugins', name: 'ala-admin-plugin', version: '2.2'
compile group: 'org.grails.plugins', name: 'ala-bootstrap3', version: '3.2.3'
compile group: 'au.org.ala.plugins.grails', name: 'images-client-plugin', version: '1.2'
compile "org.grails.plugins:ala-auth:5.1.1"
compile "org.grails.plugins:ala-admin-plugin:2.3.0"
runtime "org.grails.plugins:ala-bootstrap3:4.1.0"
compile "au.org.ala.plugins.grails:images-client-plugin:1.4"

}

bootRun {
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
grailsVersion=4.0.5
grailsVersion=4.1.1
gorm.version=7.0.8.RELEASE
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Xmx1024M
org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Xmx1024M
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
22 changes: 19 additions & 3 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
#!/usr/bin/env sh

#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

##############################################################################
##
## Gradle start up script for UN*X
Expand Down Expand Up @@ -28,7 +44,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m"'
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
Expand Down Expand Up @@ -109,8 +125,8 @@ if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi

# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
Expand Down
184 changes: 100 additions & 84 deletions gradlew.bat
Original file line number Diff line number Diff line change
@@ -1,84 +1,100 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto init

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:init
@rem Get command-line arguments, handling Windows variants

if not "%OS%" == "Windows_NT" goto win9xME_args

:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2

:win9xME_args_slurp
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto init

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:init
@rem Get command-line arguments, handling Windows variants

if not "%OS%" == "Windows_NT" goto win9xME_args

:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2

:win9xME_args_slurp
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega
24 changes: 17 additions & 7 deletions grails-app/conf/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,24 @@ security:
cas:
appServerName: https://specimens.ala.org.au
casServerName: https://auth.ala.org.au
uriFilterPattern: /admin.*,/alaAdmin.*
uriFilterPattern: /admin/*,/alaAdmin/*
enabled: false
oidc:
enabled: true
discoveryUri: https://auth-test.ala.org.au/cas/oidc/.well-known
scope: openid profile email ala roles
clientId: 'change me'
secret: 'change me'

headerAndFooter:
baseURL: "https://www.ala.org.au/commonui-bs3-2019"
version: "2"

skin:
layout: main
fluidLayout: true
orgNameLong: Atlas of Living Australia
layout: "ala-main"
orgNameLong: "Atlas of Living Australia"
orgNameShort: "ALA"

specimenbrowser:
data:
url: file:///data/specimenbrowser/config/data.json
headerAndFooter:
baseURL: https://www.ala.org.au/commonui-bs3-2019
version: 2
2 changes: 1 addition & 1 deletion grails-app/views/admin/counts.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!doctype html>
<html>
<head>
<meta name="layout" content="main"/>
<meta name="layout" content="${grailsApplication.config.skin.layout}"/>
<meta name="breadcrumbs" content="${g.createLink(controller: 'admin', action: 'index')},Admin"/>
<title>Image Counts - Specimen image browser - Atlas of Living Australia</title>
<asset:javascript src="admin.js"/>
Expand Down
2 changes: 1 addition & 1 deletion grails-app/views/admin/index.gsp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!doctype html>
<html>
<head>
<meta name="layout" content="main"/>
<meta name="layout" content="${grailsApplication.config.skin.layout}"/>
<meta name="breadcrumbs" content="${g.createLink(controller: 'view', action: 'homePage')},Specimen Images"/>
<title>Admin - Specimen image browser - Atlas of Living Australia</title>
<style type="text/css" media="screen">
Expand Down
7 changes: 3 additions & 4 deletions grails-app/views/browse/index.gsp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<%@ page contentType="text/html;charset=UTF-8" %>
<html>
<head>
<meta name="layout" content="main"/>
<meta name="layout" content="${grailsApplication.config.skin.layout}"/>
<meta name="breadcrumbs" content="${g.createLink(controller: 'view', action: 'homePage')},Specimen Images"/>
<title>Specimens | Atlas of Living Australia</title>
<asset:javascript src="browser.js"/>
Expand Down Expand Up @@ -60,7 +60,7 @@
</div>
<div class="col-md-9">
<div class="alert alert-info" data-bind="visible:loadStatus()==='done'">
<span data-bind="text:totalRecords"></span> images are available.
<strong><span data-bind="text:imageList.images().length"></span></strong> image(s) loaded from <strong><span data-bind="text:totalRecords"></span></strong> records
</div>
<div class="alert alert-warning" data-bind="visible:loadStatus()==='no results'">No images are available for this search.</div>
<div class="alert alert-error" data-bind="visible:loadStatus()==='error'">An error occurred.</div>
Expand Down Expand Up @@ -132,10 +132,9 @@
richQuery += allCollectionsFilter;
}

var entityNameLookup = new AjaxLauncher(collectoryServicesURL + '/resolveNames/'),
var entityNameLookup = new AjaxLauncher(collectoryServicesURL + 'resolveNames/'),
richQueryUrl = richQuery + "&q=" + (entityUid === '' ? '*:*' : buildQueryString(entityUid)),
imagesLookup = new AjaxLauncher(urlConcat(biocacheServicesUrl, wsBase + richQueryUrl));

var initialQueryResultsLoaded;

$(window).load(function () {
Expand Down
2 changes: 1 addition & 1 deletion grails-app/views/error.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title><g:if env="development">Grails Runtime Exception</g:if><g:else>Error</g:else></title>
<meta name="layout" content="main">
<meta name="layout" content="${grailsApplication.config.skin.layout}"/>
<g:if env="development"><link rel="stylesheet" href="${resource(dir: 'css', file: 'errors.css')}" type="text/css"></g:if>
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion grails-app/views/notFound.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>Page Not Found</title>
<meta name="layout" content="main">
<meta name="layout" content="${grailsApplication.config.skin.layout}"/>
<g:if env="development"><asset:stylesheet src="errors.css"/></g:if>
</head>
<body>
Expand Down
Loading

0 comments on commit 8c895cd

Please sign in to comment.