Skip to content

Commit

Permalink
Merge pull request #251 from charvolant/develop
Browse files Browse the repository at this point in the history
Search all images in occurrence for preferred image
  • Loading branch information
charvolant committed Oct 7, 2021
2 parents e258b0f + 2ffd8e1 commit 2fbf393
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 23 deletions.
10 changes: 1 addition & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,7 @@ dependencies {
compile ('org.jasig.cas.client:cas-client-core:3.4.1') {
exclude group: 'javax.servlet', module: 'servlet-api'
}
compile('au.org.ala:ala-name-matching:3.4') {
exclude group: 'org.apache.lucene', module: 'lucene-core'
exclude group: 'org.apache.lucene', module: 'lucene-analyzers-common'
exclude group: 'org.apache.lucene', module: 'lucene-queryparser'
exclude group: 'uk.ac.shef.wit', module: 'simmetrics'
exclude group: 'org.apache.bval', module: 'org.apache.bval.bundle'
exclude group: 'org.slf4j', module: 'slf4j-log4j12'

}
compile group: 'au.org.ala', name: 'ala-name-matching-model', version: '4.0-SNAPSHOT', changing: true
compile "commons-httpclient:commons-httpclient:3.1"
compile "org.codehaus.jackson:jackson-core-asl:1.8.6"
compile "org.codehaus.jackson:jackson-mapper-asl:1.8.6"
Expand Down
4 changes: 2 additions & 2 deletions grails-app/assets/javascripts/species.show.js
Original file line number Diff line number Diff line change
Expand Up @@ -502,10 +502,10 @@ function loadOverviewImages(){
if (SHOW_CONF.preferredImageId) {
hasPreferredImage = true;
var prefUrl = SHOW_CONF.biocacheServiceUrl +
'/occurrences/search.json?q=image_url:' + SHOW_CONF.preferredImageId +
'/occurrences/search.json?q=images:' + SHOW_CONF.preferredImageId +
'&fq=-assertion_user_id:*&im=true&facet=off&pageSize=1&start=0&callback=?';
$.getJSON(prefUrl, function(data){
//console.log("prefUrl", prefUrl, data);
// console.log("prefUrl", prefUrl, data);
if (data && data.totalRecords > 0) {
addOverviewImage(data.occurrences[0]);
} else {
Expand Down
21 changes: 11 additions & 10 deletions grails-app/conf/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,34 +115,35 @@ projectNameShort: ALA
projectName: Atlas of Living Australia
languageCodesUrl: /languages.json
biocache:
baseURL: http://biocache.ala.org.au
baseURL: https://biocache.ala.org.au
biocacheService:
baseURL: http://biocache.ala.org.au/ws
baseURL: https://biocache-ws.ala.org.au/ws
queryContext:
spatial:
baseURL: http://spatial.ala.org.au
baseURL: https://spatial.ala.org.au
layersService:
baseURL: http://spatial.ala.org.au/ws
baseURL: https://spatial.ala.org.au/ws
ala:
baseURL: http://www.ala.org.au
baseURL: https://www.ala.org.au
collectory:
baseURL: http://collections.ala.org.au
baseURL: https://collections.ala.org.au
threatenedSpeciesCodesUrl: http://collections.ala.org.au/public/showDataResource
regions:
baseURL: http://regions.ala.org.au
baseURL: https://regions.ala.org.au
speciesList:
baseURL: http://lists.ala.org.au
baseURL: https://lists.ala.org.au
alerts:
baseUrl: http://alerts.ala.org.au/ws/
baseUrl: https://alerts.ala.org.au/ws/
sightings:
url: https://www.ala.org.au/home/record-a-sighting/
eol:
lang: en
defaultDecimalLatitude: -25.61
defaultDecimalLongitude: 134.35
defaultZoomLevel: 4
imageServiceBaseUrl: https://images.ala.org.au
image:
thumbnailUrl: http://images.ala.org.au/image/proxyImageThumbnail?imageId=
thumbnailUrl: https://images.ala.org.au/image/proxyImageThumbnail?imageId=
map:
default:
id:
Expand Down
2 changes: 1 addition & 1 deletion grails-app/views/species/show.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@
layersServiceUrl: "${grailsApplication.config.layersService.baseURL}",
collectoryUrl: "${grailsApplication.config.collectory.baseURL}",
profileServiceUrl: "${grailsApplication.config.profileService.baseURL}",
imageServiceBaseUrl:"${grailsApplication.config.imageServiceBaseURL}",
imageServiceBaseUrl:"${grailsApplication.config.imageServiceBaseUrl}",
guid: "${guid}",
scientificName: "${tc?.taxonConcept?.nameString ?: ''}",
rankString: "${tc?.taxonConcept?.rankString ?: ''}",
Expand Down
2 changes: 1 addition & 1 deletion src/test/groovy/au/org/ala/bie/BieTagLibSpec.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class BieTagLibSpec extends Specification {

def "test constructEYALink 1"() {
expect:
tagLib.constructEYALink(result: [centroid: '-38.9 145.5']) == '<a href=\'http://biocache.ala.org.au/explore/your-area#145.5|-38.9|12|ALL_SPECIES\'></a>'
tagLib.constructEYALink(result: [centroid: '-38.9 145.5']) == "<a href='https://biocache.ala.org.au/explore/your-area#145.5|-38.9|12|ALL_SPECIES'></a>"
}

def "test colourForStatus 1"() {
Expand Down

0 comments on commit 2fbf393

Please sign in to comment.