Skip to content

Commit

Permalink
Merge pull request #191 from charvolant/master
Browse files Browse the repository at this point in the history
Version 1.4.20
  • Loading branch information
charvolant authored Oct 18, 2019
2 parents 221cfde + 44d6406 commit 9f8d89d
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 15 deletions.
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildscript {
}
}

version "1.4.19.2"
version "1.4.20"
group "au.org.ala.plugins.grails"

apply plugin:"eclipse"
Expand Down Expand Up @@ -70,10 +70,10 @@ dependencies {
compile "org.jsoup:jsoup:1.8.3"

compile group: 'org.grails.plugins', name: 'ala-bootstrap3', version: '3.0.6'
compile group: 'org.grails.plugins', name: 'ala-auth', version:'3.1.0', changing: true
compile group: 'org.grails.plugins', name: 'ala-auth', version:'3.1.2', changing: true
compile group: 'au.org.ala.plugins.grails', name: 'ala-citation-plugin', version: '1.0'
runtime group: 'au.org.ala.plugins.grails', name: 'ala-charts-plugin', version: '2.0.1'
compile group: 'au.org.ala.plugins.grails', name: 'images-client-plugin', version: '1.0'
compile group: 'au.org.ala.plugins.grails', name: 'images-client-plugin', version: '1.2'
//runtime group: 'org.grails.plugins', name: 'ala-charts-plugin', version: '1.3', changing: true
//compile (group: 'org.grails.plugins', name: 'images-client-plugin', version: '0.8', changing: true) {
// exclude group: 'org.grails.plugins', module: 'ala-auth'
Expand Down
2 changes: 1 addition & 1 deletion grails-app/assets/javascripts/atlas.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ $(document).ready(function() {
dislikeUrl: SHOW_CONF.dislikeUrl + '?id=' + imageId,
userRatingUrl: SHOW_CONF.userRatingUrl + '?id=' + imageId,
userRatingHelpText: SHOW_CONF.userRatingHelpText.replace('RECORD_URL', recordUrl),
savePreferredSpeciesListUrl: SHOW_CONF.savePreferredSpeciesListUrl + '?id=' + imageId + '&scientificName=' + SHOW_CONF.scientificName,
savePreferredSpeciesListUrl: SHOW_CONF.savePreferredSpeciesListUrl + '?id=' + imageId + '&scientificName=' + SHOW_CONF.scientificName + '&family=' + SHOW_CONF.family,
getPreferredSpeciesListUrl: SHOW_CONF.getPreferredSpeciesListUrl,
druid: SHOW_CONF.druid
});
Expand Down
12 changes: 6 additions & 6 deletions grails-app/services/au/org/ala/bie/BieService.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import org.grails.web.json.JSONObject

class BieService {

def webService
def webClientService
def grailsApplication

def searchBie(SearchRequestParamsDTO requestObj) {
Expand All @@ -24,7 +24,7 @@ class BieService {
queryUrl = queryUrl + "&bqc=" + URLEncoder.encode(grailsApplication.config.biocacheService.queryContext, "UTF-8")
}

def json = webService.get(queryUrl)
def json = webClientService.get(queryUrl)
JSON.parse(json)
}

Expand All @@ -33,7 +33,7 @@ class BieService {
return null
}
try {
def json = webService.get(grailsApplication.config.speciesList.baseURL + "/ws/species/" + guid.replaceAll(/\s+/,'+') + "?isBIE=true", true)
def json = webClientService.get(grailsApplication.config.speciesList.baseURL + "/ws/species/" + guid.replaceAll(/\s+/,'+') + "?isBIE=true", true)
return JSON.parse(json)
} catch(Exception e){
//handles the situation where time out exceptions etc occur.
Expand All @@ -46,7 +46,7 @@ class BieService {
if (!guid && guid != "undefined") {
return null
}
def json = webService.get(grailsApplication.config.bie.index.url + "/taxon/" + guid.replaceAll(/\s+/,'+'))
def json = webClientService.get(grailsApplication.config.bie.index.url + "/taxon/" + guid.replaceAll(/\s+/,'+'))
//log.debug "ETC json: " + json
try{
JSON.parse(json)
Expand All @@ -58,7 +58,7 @@ class BieService {

def getClassificationForGuid(guid) {
def url = grailsApplication.config.bie.index.url + "/classification/" + guid.replaceAll(/\s+/,'+')
def json = webService.getJson(url)
def json = webClientService.getJson(url)
log.debug "json type = " + json
if (json instanceof JSONObject && json.has("error")) {
log.warn "classification request error: " + json.error
Expand All @@ -76,7 +76,7 @@ class BieService {
url = url + "?" + URLEncoder.encode(grailsApplication.config.bieService.queryContext, "UTF-8")
}

def json = webService.getJson(url).sort() { it.rankID?:0 }
def json = webClientService.getJson(url).sort() { it.rankID?:0 }

if (json instanceof JSONObject && json.has("error")) {
log.warn "child concepts request error: " + json.error
Expand Down
6 changes: 3 additions & 3 deletions grails-app/services/au/org/ala/bie/BiocacheService.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import org.grails.web.json.JSONObject
class BiocacheService {

def grailsApplication
def webService
def webClientService

/**
* Retrieve the available sounds for this taxon.
Expand All @@ -22,11 +22,11 @@ class BiocacheService {
def queryUrl = grailsApplication.config.biocacheService.baseURL + "/occurrences/search?q=" + URIUtil.encodeWithinQuery("lsid:\"${taxonID}\"", "UTF-8") + "&fq=multimedia:Sound"

log.debug "calling url = ${queryUrl}"
def data = webService.getJson(queryUrl)
def data = webClientService.getJson(queryUrl)

if (data.size() && data.has("occurrences") && data.get("occurrences").size()) {
def recordUrl = grailsApplication.config.biocacheService.baseURL + "/occurrence/" + data.get("occurrences").get(0).uuid
jsonObj = webService.getJson(recordUrl)
jsonObj = webClientService.getJson(recordUrl)
}

jsonObj
Expand Down
2 changes: 1 addition & 1 deletion grails-app/services/au/org/ala/bie/UtilityService.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import org.grails.web.json.JSONObject
class UtilityService {

def grailsApplication
def webService
def webClientService

/**
* Get a map of region names to collectory codes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import org.grails.web.converters.exceptions.ConverterException
import org.grails.web.json.JSONObject
import org.springframework.beans.factory.InitializingBean

class WebService implements InitializingBean {
class WebClientService implements InitializingBean {

public void afterPropertiesSet() {
// JSONObject.NULL.metaClass.asBoolean = {-> false}
Expand Down
2 changes: 2 additions & 0 deletions grails-app/views/species/show.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,8 @@
rankString: "${tc?.taxonConcept?.rankString ?: ''}",
taxonRankID: "${tc?.taxonConcept?.rankID ?: ''}",
synonyms: [ <g:each in="${tc?.synonyms}" var="syn" status="si">"${syn.nameString.encodeAsJavaScript()}"<g:if test="${si < tc.synonyms.size() - 1}">, </g:if></g:each> ],
family: "${tc?.classification?.family ?: ''}",
kingdom: "${tc?.classification?.kingdom ?: ''}",
preferredImageId: "${tc?.imageIdentifier?: ''}",
citizenSciUrl: "${citizenSciUrl}",
serverName: "${grailsApplication.config.grails.serverURL}",
Expand Down

0 comments on commit 9f8d89d

Please sign in to comment.