Skip to content

Commit

Permalink
Link to sync progress page on GBIF compare page
Browse files Browse the repository at this point in the history
  • Loading branch information
matsbov committed Oct 4, 2024
1 parent 7635b74 commit d6b1ff9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion grails-app/views/gbif/compareWithAtlas.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
${result.size} datasets •
${pendingSyncCount} pending GBIF sync
<g:if test="${pendingSyncCount > 0}">
[ <a href="${grailsApplication.config.getProperty("grails.serverURL")}/ws/gbif/scan/${dataProvider.uid}" target="_blank">Sync now</a> ]
[ <a id="sync-now-link" href="javascript:void(0)">Sync now</a> ]
</g:if>
&bull;
${pendingIngestionCount} pending data ingestion
Expand Down Expand Up @@ -113,6 +113,13 @@
info: false,
columnDefs: [{ type: 'num-fmt', targets: [6, 7, 8] }],
});
$('#sync-now-link').on('click', function() {
var scanUrl = '${grailsApplication.config.getProperty("grails.serverURL")}/ws/gbif/scan/${dataProvider.uid}'
$.getJSON(scanUrl, function(data) {
location.href = '${grailsApplication.config.getProperty("grails.serverURL")}' + data.trackingUrl;
});
});
});
</script>
</body>
Expand Down

0 comments on commit d6b1ff9

Please sign in to comment.