diff --git a/application.properties b/application.properties index 0cf72ebc..360a8c71 100644 --- a/application.properties +++ b/application.properties @@ -4,4 +4,4 @@ app.build=163 app.grails.version=2.3.8 app.name=collectory app.servlet.version=2.5 -app.version=1.1.2-SNAPSHOT +app.version=1.1.2 diff --git a/grails-app/views/public/show.gsp b/grails-app/views/public/show.gsp index 809f3e80..693a8ab2 100644 --- a/grails-app/views/public/show.gsp +++ b/grails-app/views/public/show.gsp @@ -384,7 +384,7 @@ function onLoadCallback() { // $('div.learnMaps').css('display','none'); // } - loadDownloadStats("${instance.uid}","${instance.name}", "1002"); + loadDownloadStats("${grailsApplication.config.loggerURL}", "${instance.uid}","${instance.name}", "1002"); // records $.ajax({ diff --git a/grails-app/views/public/showDataProvider.gsp b/grails-app/views/public/showDataProvider.gsp index 9cc08e78..d4c4bb30 100644 --- a/grails-app/views/public/showDataProvider.gsp +++ b/grails-app/views/public/showDataProvider.gsp @@ -195,7 +195,7 @@ \************************************************************/ function onLoadCallback() { // stats - loadDownloadStats("${instance.uid}", "${instance.name}", "1002"); + loadDownloadStats("${grailsApplication.config.loggerURL}", "${instance.uid}", "${instance.name}", "1002"); } /************************************************************\ diff --git a/grails-app/views/public/showDataResource.gsp b/grails-app/views/public/showDataResource.gsp index e4b3b413..9d6b615a 100644 --- a/grails-app/views/public/showDataResource.gsp +++ b/grails-app/views/public/showDataResource.gsp @@ -358,9 +358,9 @@ function onLoadCallback() { // stats if (${instance.resourceType == 'website'}) { - loadDownloadStats("${instance.uid}","${instance.name}", "2000"); + loadDownloadStats("${grailsApplication.config.loggerURL}", "${instance.uid}","${instance.name}", "2000"); } else if (${instance.resourceType == 'records'}) { - loadDownloadStats("${instance.uid}","${instance.name}", "1002"); + loadDownloadStats("${grailsApplication.config.loggerURL}", "${instance.uid}","${instance.name}", "1002"); } // species pages diff --git a/grails-app/views/public/showInstitution.gsp b/grails-app/views/public/showInstitution.gsp index 75475859..a2096d0c 100644 --- a/grails-app/views/public/showInstitution.gsp +++ b/grails-app/views/public/showInstitution.gsp @@ -234,7 +234,7 @@ function onLoadCallback() { // stats - loadDownloadStats("${instance.uid}","${instance.name}", "1002"); + loadDownloadStats("${grailsApplication.config.loggerURL}", "${instance.uid}","${instance.name}", "1002"); // records $.ajax({ diff --git a/web-app/js/collectory.js b/web-app/js/collectory.js index fd9d1a35..f75e09ae 100644 --- a/web-app/js/collectory.js +++ b/web-app/js/collectory.js @@ -211,12 +211,15 @@ function contactCurator(email, firstName, uid, instUid, name) { /************************************************************\ ******* LOAD DOWNLOAD STATS ***** \************************************************************/ -function loadDownloadStats(uid, name, eventType) { +function loadDownloadStats(loggerServicesUrl, uid, name, eventType) { if (eventType == '') { // nothing to show return; } - var loggerServicesUrl = "http://logger.ala.org.au/service/"; + if (loggerServicesUrl == ''){ + return; + } + var url = loggerServicesUrl + uid + "/events/" + eventType + "/counts.json"; $.ajax({ url: url,