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

sentry for remote javascript debugging

parent 204e359d
...@@ -77,6 +77,10 @@ processResources { ...@@ -77,6 +77,10 @@ processResources {
from ('node_modules/jquery/dist/jquery.min.js') { from ('node_modules/jquery/dist/jquery.min.js') {
into 'static/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') { from ('node_modules/openseadragon/build/openseadragon/openseadragon.min.js') {
into 'static/js' into 'static/js'
} }
...@@ -94,7 +98,7 @@ processResources { ...@@ -94,7 +98,7 @@ processResources {
jsOptions { jsOptions {
inputPath = file("./src/main/resources/static/js/") inputPath = file("./src/main/resources/static/js/")
outputPath = file("${buildDir}/js/") outputPath = file("${buildDir}/js/")
compilationLevel = "SIMPLE_OPTIMIZATIONS" compilationLevel = "WHITESPACE_ONLY"
jsVersionIn = 'ECMASCRIPT_2020' jsVersionIn = 'ECMASCRIPT_2020'
jsVersionOut = 'ECMASCRIPT5' jsVersionOut = 'ECMASCRIPT5'
combineAllFiles = false combineAllFiles = false
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
"name": "textgridrep-portal", "name": "textgridrep-portal",
"version": "3.0.0", "version": "3.0.0",
"dependencies": { "dependencies": {
"@sentry/browser": "^5.17.0",
"font-awesome": "4.3.0", "font-awesome": "4.3.0",
"jquery": "^3.5.1", "jquery": "^3.5.1",
"openseadragon": "^2.4.1" "openseadragon": "^2.4.1"
......
...@@ -25,6 +25,8 @@ public class TgrepConfigurationService { ...@@ -25,6 +25,8 @@ public class TgrepConfigurationService {
private String toolDigilibHost; private String toolDigilibHost;
@Value("${tool.switchboard.host}") @Value("${tool.switchboard.host}")
private String toolSwitchboardHost; private String toolSwitchboardHost;
@Value("${sentry.enabled}")
private Boolean sentryEnabled;
public String getTextgridHost() { public String getTextgridHost() {
return textgridHost; return textgridHost;
...@@ -75,6 +77,13 @@ public class TgrepConfigurationService { ...@@ -75,6 +77,13 @@ public class TgrepConfigurationService {
this.toolSwitchboardHost = toolSwitchboardHost; this.toolSwitchboardHost = toolSwitchboardHost;
} }
public Boolean getSentryEnabled() {
return sentryEnabled;
}
public void setSentryEnabled(Boolean sentryEnabled) {
this.sentryEnabled = sentryEnabled;
}
// composed // composed
public String getAggregatorUrl() { public String getAggregatorUrl() {
return getTextgridHost()+"/1.0/aggregator"; return getTextgridHost()+"/1.0/aggregator";
......
...@@ -22,3 +22,5 @@ lang.default: en ...@@ -22,3 +22,5 @@ lang.default: en
tgsearch.query.facetlimit = 10000 tgsearch.query.facetlimit = 10000
#tgsearch.query.facetlimit = 10 #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> </main>
<footer class="tg footer" role="contentinfo"> <footer class="tg footer" role="contentinfo">
...@@ -41,6 +43,10 @@ ...@@ -41,6 +43,10 @@
</footer> </footer>
<script src="/js/jquery.min.js"></script> <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> <script src="/js/theme.min.js"></script>
</div> </div>
......
Supports Markdown
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