Skip to content

Commit 0e2aadb

Browse files
authored
Merge pull request #278 from AtlasOfLivingAustralia/release/4.2.2
Release/4.2.2
2 parents 08e983d + de17fff commit 0e2aadb

File tree

9 files changed

+22
-19
lines changed

9 files changed

+22
-19
lines changed

build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* rights and limitations under the License.
1212
*/
1313
buildscript {
14-
version "4.2.1"
14+
version "4.2.2"
1515
group "au.org.ala"
1616
}
1717

@@ -121,7 +121,7 @@ dependencies {
121121
testImplementation "org.grails:grails-test-mixins:3.3.0"
122122

123123
// Grails plugin dependencies
124-
runtimeOnly "org.grails.plugins:ala-bootstrap3:4.4.0", noCache
124+
runtimeOnly "org.grails.plugins:ala-bootstrap3:4.5.0", noCache
125125
implementation "org.grails.plugins:ala-auth:$alaSecurityLibsVersion"
126126
implementation "org.grails.plugins:ala-ws-security-plugin:$alaSecurityLibsVersion"
127127
implementation "org.grails.plugins:ala-ws-plugin:$alaSecurityLibsVersion"

cicd/build/pipeline/pipeline.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Resources:
9494
Environment:
9595
Type: LINUX_CONTAINER
9696
ComputeType: BUILD_GENERAL1_SMALL
97-
Image: aws/codebuild/standard:5.0
97+
Image: aws/codebuild/standard:7.0
9898
Source:
9999
Type: CODEPIPELINE
100100
BuildSpec: !Sub cicd/${pProductComponent}/pipeline/build_alerts_buildspec.yaml

grails-app/controllers/au/org/ala/alerts/AdminController.groovy

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class AdminController {
4242
def subscriptionsPerPage = grailsApplication.config.biosecurity?.subscriptionsPerPage? grailsApplication.config.biosecurity.subscriptionsPerPage.toInteger() : 10
4343
def index() {}
4444

45-
@Transactional
45+
4646
def findUser() {
4747
List users = []
4848
if (params.term) {
@@ -51,7 +51,7 @@ class AdminController {
5151
render view: "/admin/userAlerts", model: [users: users]
5252
}
5353

54-
@Transactional
54+
5555
def updateUserEmails() {
5656
def updated = userService.updateUserEmails()
5757
flash.message = "Updated ${updated} email addresses in system"

grails-app/controllers/au/org/ala/alerts/NotificationController.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class NotificationController {
134134
notificationService.refreshProperties(queryResult, lastResult)
135135
boolean hasChanged = notificationService.hasChanged(queryResult)
136136
def records = notificationService.collectUpdatedRecords(queryResult)
137-
def results = ["hasChanged": hasChanged, "brief": queryResult.details(), "records": records]
137+
def results = ["hasChanged": hasChanged, "brief": queryResult.brief(), "records": records]
138138
render results as JSON
139139
}
140140

grails-app/services/au/org/ala/alerts/BiosecurityService.groovy

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ package au.org.ala.alerts;
1616

1717
import com.jayway.jsonpath.JsonPath
1818
import grails.converters.JSON
19+
import grails.gorm.transactions.Transactional
1920
import org.apache.commons.lang.time.DateUtils
2021
import org.apache.http.entity.ContentType
2122
import java.text.SimpleDateFormat
@@ -62,6 +63,7 @@ class BiosecurityService {
6263
* @param query
6364
* @param since The local date to check the subscription since
6465
*/
66+
@Transactional
6567
def triggerBiosecuritySubscription(Query query, Date since) {
6668
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'")
6769
Date now = new Date()
@@ -149,7 +151,6 @@ class BiosecurityService {
149151
}
150152
}
151153

152-
153154
def processQueryBiosecurity(Query query, Date since, Date to) {
154155
def drId = query.listId
155156
if (drId) {

grails-app/services/au/org/ala/alerts/NotificationService.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ class NotificationService {
385385
}
386386
}
387387

388-
if (queryService.checkChangeByDiff(queryResult)) {
388+
if (queryService.checkChangeByDiff(query)) {
389389
log.debug("[QUERY " + query.id + "] Has change check. Checking JSON for query : " + query.name)
390390
changed = diffService.hasChangedJsonDiff(jsonPrevious, jsonCurrent, query)
391391
}

grails-app/services/au/org/ala/alerts/UserService.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class UserService {
8585
*
8686
* @return total number of updates
8787
*/
88-
// @Transactional // transactions handled manually
88+
8989
int updateUserEmails() {
9090
final int pageSize = grailsApplication.config.getProperty('alerts.user-sync.batch-size', Integer, 1000)
9191
def toUpdate = []

grails-app/views/email/blogs.gsp

+11-10
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
<%@ page contentType="text/html"%>
1+
<%@ page contentType="text/html" %>
22
<%@ page import="java.text.SimpleDateFormat" %>
33
<%@ page import="org.apache.commons.lang3.StringUtils" %>
4-
<html xmlns="http://www.w3.org/1999/xhtml" >
4+
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
55
<head>
6+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
67
<meta charset="UTF-8">
78
<meta http-equiv="X-UA-Compatible" content="IE=edge">
89
<meta name="format-detection" content="telephone=no">
@@ -46,12 +47,12 @@
4647
}
4748
4849
.main-shadow-div {
49-
mso-table-lspace: 0pt;
50-
mso-table-rspace: 0pt;
50+
mso-table-lspace: 0;
51+
mso-table-rspace: 0;
5152
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
5253
width: 100%;
5354
max-width: 620px;
54-
margin: 20px auto 0px;
55+
margin: 20px auto 0;
5556
}
5657
5758
.center-white-div{
@@ -81,7 +82,7 @@
8182
}
8283
8384
.blog-thumbnail-div {
84-
padding: 10px 0px 10px 0px;
85+
padding: 10px 0 10px 0;
8586
align-items: center;
8687
max-width: 130px;
8788
}
@@ -191,7 +192,7 @@
191192
%{-- int responseCode = connection.responseCode--}%
192193
%{-- if (responseCode == 404) {--}%
193194
%{-- // Handle the case where the image URL returns a 404 status code--}%
194-
%{-- out << "<img src=\"${grailsApplication.config.grails.serverURL + '/assets/email/no-img-av-ALAsilver.png'}\" height='80' alt='Sorry, no image availabe' > "--}%
195+
%{-- out << "<img src=\"${grailsApplication.config.grails.serverURL + '/assets/email/no-img-av-ALAsilver.png'}\" height='80' alt='Sorry, no image available' > "--}%
195196
%{-- } else {--}%
196197
%{-- // Handle the case where the image URL returns a different status code--}%
197198
%{-- out << "<img src=\"${imageUrl}\" alt=\"${raw(blog.title.rendered)}\">"--}%
@@ -218,7 +219,7 @@
218219
219220
<div class="button-div" >
220221
<a href="${grailsApplication.config.ala.baseURL + '/blog'}">
221-
<button class="record-button" ><strong>All ALA news & updates</strong>
222+
<button class="record-button" ><strong>All ALA news &amp; updates</strong>
222223
</button>
223224
</a>
224225
</div>
@@ -237,14 +238,14 @@
237238
<area shape="rect" coords="100,0,180,100" href="https://csiro.au" alt="CSIRO">
238239
<area shape="rect" coords="180,0,300,100" href="https://www.gbif.org/" alt="GBIF">
239240
</map>
240-
<p>You are receiving this email because you opted in to ALA blog alerts.
241+
<div>You are receiving this email because you opted in to ALA blog alerts.
241242
<div>
242243
<p>Our mailing address is: </p>
243244
Atlas of Living Australia <br/> GPO Box 1700<br/> Canberra, ACT 2601<br/>Australia
244245
</div>
245246
<br>
246247
Don't want to receive these emails? You can <a href="${unsubscribeOne}" style="color: #C44D34;">unsubscribe</a>.
247-
</p>
248+
</div>
248249
</div>
249250
</div>
250251
</div>

grails-app/views/layouts/main.gsp

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<g:render template="/layouts/main" />

0 commit comments

Comments
 (0)