Skip to content

Commit

Permalink
Closes #155
Browse files Browse the repository at this point in the history
  • Loading branch information
jonherrmann committed May 30, 2018
1 parent 9f585e9 commit b515ab3
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 96 deletions.
30 changes: 0 additions & 30 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -223,33 +223,3 @@ war {

}

if(project.hasProperty("opbeat.organizationId")) {
task opbeatRelease {
doLast {
final String reqPath = "/api/v1/organizations/" +
project.getProperty("opbeat.organizationId") +
"/apps/" +
project.getProperty("opbeat.appId") + "/releases/"
def releaseData = [
'rev' : repo.head().abbreviatedId,
'branch': 'master',
'status': 'completed']
def reqHeaders = [
'User-Agent' : 'gradle-notify',
'Authorization': "Bearer " + project.getProperty("opbeat.api_key")]

def http = new groovyx.net.http.HTTPBuilder("https://intake.opbeat.com");
http.request(groovyx.net.http.Method.POST, groovyx.net.http.ContentType.JSON) {
uri.path = reqPath
headers = reqHeaders
body = releaseData
response.failure = { resp, reader -> System.out << reader }
response.success = { println "Notified Opbeat" }
}
}
if (tasks.findByPath('uploadArchives') != null) {
opbeatRelease.shouldRunAfter uploadArchives
afterReleaseBuild.dependsOn opbeatRelease
}
}
}
6 changes: 0 additions & 6 deletions src/main/resources/etf-config.properties
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,6 @@ etf.webapp.base.url = http://localhost:8080/etf-webapp
# Default: simplified
# etf.workflows = simplified

# Help to improve our application by automatically reporting internal errors
# (last user action, error message and stacktrace) to interactive instruments through
# the third party service platform opbeat (see https://opbeat.com/about for more information).
# Default: false
# etf.errors.autoreport=false


##################################################################################
## Contact, legal notice, privacy statement
Expand Down
16 changes: 0 additions & 16 deletions src/main/webapp/error.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,6 @@ <h1 th:text="#{l.error.occured}">An error occurred</h1>

<p th:if="${hint != null}" th:text="${hint}"></p>

<script th:if="${submitReport == true}" th:inline="javascript">
/*<![CDATA[*/
var exType = /*[[${ex.class.simpleName}]]*/ null;
var message = /*[[${ex.message}]]*/ null;
var exid = /*[[${exid}]]*/ null;
var e = new Error(exid+" -> "+message);
e.name=exType;
_opbeat('captureException', e);
/*]]>*/
</script>


<div th:if="${ex != null}">

<p><b th:if="${ex.message}" th:text="${ex.message}">exception message...</b></p>
Expand All @@ -47,10 +35,6 @@ <h2>Stacktrace</h2>
<div th:if="${ex == null}">
<p>Error logged</p>
</div>
<div th:if="${submitReport == true}">
<p>Error report submitted</p>
</div>


</body>
</html>
12 changes: 0 additions & 12 deletions src/main/webapp/etf.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,6 @@
<meta property="og:description" content="ETF is an open source testing framework for validating spatial data, metadata and web services in Spatial Data Infrastructures" />
<meta property="og:type" content="WebApplication" />
<title th:text="${T(de.interactive_instruments.etf.webapp.helpers.View).brandingText}">BRANDING TEXT</title>
<!-- Opbeat for Javascript bug reports -->
<!-- https://opbeat.com/docs/articles/get-started-with-javascript/ -->
<script th:if="${T(de.interactive_instruments.etf.webapp.helpers.View).submitAnalysisData == 'true'}"
src="https://d3tvtfb6518e3e.cloudfront.net/3/opbeat.min.js"
data-org-id="51578fc580a94ef3a79e0d4f94769114"
data-app-id="ea471c7d24" async="async">
</script>
<script type="text/javascript">
// This feature is activated with the etf.errors.autoreport configuration property
_opbeat = window._opbeat || function() { (window._opbeat.q = window._opbeat.q || []).push(arguments) };
_opbeat('config', { /* Configuration options */ });
</script>
<link rel="fluid-icon" th:href="@{/310x310.png}" th:title="${T(de.interactive_instruments.etf.webapp.helpers.View).brandingText}" />
<link rel="mask-icon" th:href="@{/icon-mono.svg}" color="#000000" />
<link rel="shortcut icon" th:href="@{/favicon.ico}" href="/favicon.ico" type="image/vnd.microsoft.icon" />
Expand Down
4 changes: 1 addition & 3 deletions src/main/webapp/js/app/v2.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ define(['toastr'], function (toastr) {
}

function unexpectedError(error) {
if(!_.isUndefined(_opbeat)) {
_opbeat('captureException', error);
}
// https://github.com/etf-validator/etf-webapp/issues/155
}

function apiCallError(message, title, xhr) {
Expand Down
28 changes: 0 additions & 28 deletions src/main/webapp/js/app/views/MonitorView.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,33 +55,6 @@ define([
this.monitorLogArea.text("Connecting to test runner and waiting for new messages...");
this.currentLogPos = 0;

/*
this.container.html(
this.template({ moment: moment,
// todo ETS
})
);
this.addListener($("body"), "pagecontainerchangefailed", function(event, data) {
console.log("Test report not available");
var lastLog = monitor.val();
var eO = new Error("Internal error occurred during test run: " + lastLog);
eO.name = 'InternalTestRunError';
// _opbeat('captureException', eO);
alert("An internal error occurred during the execution of " +
"the test run and a test report could not be generated. " +
"The error may be occurred due to a defect in an executable test suite " +
"or due to a defect in the test engine. " +
"Please check the log of the test run or " +
" contact the system administrator to check " +
"the 'etf.log' log path. Sorry for the inconvenience!");
throw eO;
});
*/


this.container.trigger('create');
return this;
},
Expand Down Expand Up @@ -161,7 +134,6 @@ define([
" a report or the internet connection to the web application has been lost!");
var e = new Error("Internal error occurred during test run: " + _this.monitorLogArea.val());
e.name = 'InternalTestRunError';
// _opbeat('captureException', e);
}
}
});
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/offline.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<head>
<meta charset="UTF-8">
<title>ETF down</title>
<!-- TODO Check if user is in offline mode, show Admin mail address, fire opbeat error-->
<!-- TODO Check if user is in offline mode, show Admin mail address -->
</head>
<body>
<p>This ETF instance may be temporarily not available due to unscheduled maintenance work!</p>
Expand Down

0 comments on commit b515ab3

Please sign in to comment.