Commit f46ad91d authored by Ubbo Veentjer's avatar Ubbo Veentjer
Browse files

sentry for remote javascript debugging

parent 204e359d
......@@ -77,6 +77,10 @@ processResources {
from ('node_modules/jquery/dist/jquery.min.js') {
into 'static/js'
}
from ('node_modules/@sentry/browser/build/bundle.min.js') {
rename '(.*)', 'sentry.$1'
into 'static/js'
}
from ('node_modules/openseadragon/build/openseadragon/openseadragon.min.js') {
into 'static/js'
}
......@@ -94,7 +98,7 @@ processResources {
jsOptions {
inputPath = file("./src/main/resources/static/js/")
outputPath = file("${buildDir}/js/")
compilationLevel = "SIMPLE_OPTIMIZATIONS"
compilationLevel = "WHITESPACE_ONLY"
jsVersionIn = 'ECMASCRIPT_2020'
jsVersionOut = 'ECMASCRIPT5'
combineAllFiles = false
......
......@@ -2,6 +2,7 @@
"name": "textgridrep-portal",
"version": "3.0.0",
"dependencies": {
"@sentry/browser": "^5.17.0",
"font-awesome": "4.3.0",
"jquery": "^3.5.1",
"openseadragon": "^2.4.1"
......
......@@ -25,6 +25,8 @@ public class TgrepConfigurationService {
private String toolDigilibHost;
@Value("${tool.switchboard.host}")
private String toolSwitchboardHost;
@Value("${sentry.enabled}")
private Boolean sentryEnabled;
public String getTextgridHost() {
return textgridHost;
......@@ -75,6 +77,13 @@ public class TgrepConfigurationService {
this.toolSwitchboardHost = toolSwitchboardHost;
}
public Boolean getSentryEnabled() {
return sentryEnabled;
}
public void setSentryEnabled(Boolean sentryEnabled) {
this.sentryEnabled = sentryEnabled;
}
// composed
public String getAggregatorUrl() {
return getTextgridHost()+"/1.0/aggregator";
......
......@@ -21,4 +21,6 @@ lang.available: en, de
lang.default: en
tgsearch.query.facetlimit = 10000
#tgsearch.query.facetlimit = 10
\ No newline at end of file
#tgsearch.query.facetlimit = 10
sentry.enabled = false
\ No newline at end of file
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
</main>
<footer class="tg footer" role="contentinfo">
......@@ -41,6 +43,10 @@
</footer>
<script src="/js/jquery.min.js"></script>
<c:if test="${config.sentryEnabled}">
<script src="/js/sentry.bundle.min.js"></script>
<script src="/js/sentry.min.js"></script>
</c:if>
<script src="/js/theme.min.js"></script>
</div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment