Skip to content

Commit

Permalink
Merge pull request #278 from AtlasOfLivingAustralia/release/4.2.2
Browse files Browse the repository at this point in the history
Release/4.2.2
  • Loading branch information
nickdos authored Sep 10, 2024
2 parents 08e983d + de17fff commit 0e2aadb
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 19 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* rights and limitations under the License.
*/
buildscript {
version "4.2.1"
version "4.2.2"
group "au.org.ala"
}

Expand Down Expand Up @@ -121,7 +121,7 @@ dependencies {
testImplementation "org.grails:grails-test-mixins:3.3.0"

// Grails plugin dependencies
runtimeOnly "org.grails.plugins:ala-bootstrap3:4.4.0", noCache
runtimeOnly "org.grails.plugins:ala-bootstrap3:4.5.0", noCache
implementation "org.grails.plugins:ala-auth:$alaSecurityLibsVersion"
implementation "org.grails.plugins:ala-ws-security-plugin:$alaSecurityLibsVersion"
implementation "org.grails.plugins:ala-ws-plugin:$alaSecurityLibsVersion"
Expand Down
2 changes: 1 addition & 1 deletion cicd/build/pipeline/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Resources:
Environment:
Type: LINUX_CONTAINER
ComputeType: BUILD_GENERAL1_SMALL
Image: aws/codebuild/standard:5.0
Image: aws/codebuild/standard:7.0
Source:
Type: CODEPIPELINE
BuildSpec: !Sub cicd/${pProductComponent}/pipeline/build_alerts_buildspec.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class AdminController {
def subscriptionsPerPage = grailsApplication.config.biosecurity?.subscriptionsPerPage? grailsApplication.config.biosecurity.subscriptionsPerPage.toInteger() : 10
def index() {}

@Transactional

def findUser() {
List users = []
if (params.term) {
Expand All @@ -51,7 +51,7 @@ class AdminController {
render view: "/admin/userAlerts", model: [users: users]
}

@Transactional

def updateUserEmails() {
def updated = userService.updateUserEmails()
flash.message = "Updated ${updated} email addresses in system"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class NotificationController {
notificationService.refreshProperties(queryResult, lastResult)
boolean hasChanged = notificationService.hasChanged(queryResult)
def records = notificationService.collectUpdatedRecords(queryResult)
def results = ["hasChanged": hasChanged, "brief": queryResult.details(), "records": records]
def results = ["hasChanged": hasChanged, "brief": queryResult.brief(), "records": records]
render results as JSON
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package au.org.ala.alerts;

import com.jayway.jsonpath.JsonPath
import grails.converters.JSON
import grails.gorm.transactions.Transactional
import org.apache.commons.lang.time.DateUtils
import org.apache.http.entity.ContentType
import java.text.SimpleDateFormat
Expand Down Expand Up @@ -62,6 +63,7 @@ class BiosecurityService {
* @param query
* @param since The local date to check the subscription since
*/
@Transactional
def triggerBiosecuritySubscription(Query query, Date since) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'")
Date now = new Date()
Expand Down Expand Up @@ -149,7 +151,6 @@ class BiosecurityService {
}
}


def processQueryBiosecurity(Query query, Date since, Date to) {
def drId = query.listId
if (drId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ class NotificationService {
}
}

if (queryService.checkChangeByDiff(queryResult)) {
if (queryService.checkChangeByDiff(query)) {
log.debug("[QUERY " + query.id + "] Has change check. Checking JSON for query : " + query.name)
changed = diffService.hasChangedJsonDiff(jsonPrevious, jsonCurrent, query)
}
Expand Down
2 changes: 1 addition & 1 deletion grails-app/services/au/org/ala/alerts/UserService.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class UserService {
*
* @return total number of updates
*/
// @Transactional // transactions handled manually

int updateUserEmails() {
final int pageSize = grailsApplication.config.getProperty('alerts.user-sync.batch-size', Integer, 1000)
def toUpdate = []
Expand Down
21 changes: 11 additions & 10 deletions grails-app/views/email/blogs.gsp
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<%@ page contentType="text/html"%>
<%@ page contentType="text/html" %>
<%@ page import="java.text.SimpleDateFormat" %>
<%@ page import="org.apache.commons.lang3.StringUtils" %>
<html xmlns="http://www.w3.org/1999/xhtml" >
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="format-detection" content="telephone=no">
Expand Down Expand Up @@ -46,12 +47,12 @@
}
.main-shadow-div {
mso-table-lspace: 0pt;
mso-table-rspace: 0pt;
mso-table-lspace: 0;
mso-table-rspace: 0;
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
width: 100%;
max-width: 620px;
margin: 20px auto 0px;
margin: 20px auto 0;
}
.center-white-div{
Expand Down Expand Up @@ -81,7 +82,7 @@
}
.blog-thumbnail-div {
padding: 10px 0px 10px 0px;
padding: 10px 0 10px 0;
align-items: center;
max-width: 130px;
}
Expand Down Expand Up @@ -191,7 +192,7 @@
%{-- int responseCode = connection.responseCode--}%
%{-- if (responseCode == 404) {--}%
%{-- // Handle the case where the image URL returns a 404 status code--}%
%{-- out << "<img src=\"${grailsApplication.config.grails.serverURL + '/assets/email/no-img-av-ALAsilver.png'}\" height='80' alt='Sorry, no image availabe' > "--}%
%{-- out << "<img src=\"${grailsApplication.config.grails.serverURL + '/assets/email/no-img-av-ALAsilver.png'}\" height='80' alt='Sorry, no image available' > "--}%
%{-- } else {--}%
%{-- // Handle the case where the image URL returns a different status code--}%
%{-- out << "<img src=\"${imageUrl}\" alt=\"${raw(blog.title.rendered)}\">"--}%
Expand All @@ -218,7 +219,7 @@
<div class="button-div" >
<a href="${grailsApplication.config.ala.baseURL + '/blog'}">
<button class="record-button" ><strong>All ALA news & updates</strong>
<button class="record-button" ><strong>All ALA news &amp; updates</strong>
</button>
</a>
</div>
Expand All @@ -237,14 +238,14 @@
<area shape="rect" coords="100,0,180,100" href="https://csiro.au" alt="CSIRO">
<area shape="rect" coords="180,0,300,100" href="https://www.gbif.org/" alt="GBIF">
</map>
<p>You are receiving this email because you opted in to ALA blog alerts.
<div>You are receiving this email because you opted in to ALA blog alerts.
<div>
<p>Our mailing address is: </p>
Atlas of Living Australia <br/> GPO Box 1700<br/> Canberra, ACT 2601<br/>Australia
</div>
<br>
Don't want to receive these emails? You can <a href="${unsubscribeOne}" style="color: #C44D34;">unsubscribe</a>.
</p>
</div>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions grails-app/views/layouts/main.gsp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<g:render template="/layouts/main" />

0 comments on commit 0e2aadb

Please sign in to comment.