diff --git a/assets/js/error_handler.js b/assets/js/error_handler.js
index 573a0915..a8c5c683 100644
--- a/assets/js/error_handler.js
+++ b/assets/js/error_handler.js
@@ -10,6 +10,61 @@ class ErrorHandlerHelper {
const content = document.getElementById('content');
content.addEventListener('turbo:before-fetch-response', (event) => this.handleError(event));
+
+ $(document).ajaxError(this.handleJqueryErrror.bind(this));
+ }
+
+ _showAlert(statusText, statusCode, location, responseHTML)
+ {
+ //Create error text
+ const title = statusText + ' (Status ' + statusCode + ')';
+
+ let trimString = function (string, length) {
+ return string.length > length ?
+ string.substring(0, length) + '...' :
+ string;
+ };
+
+ const short_location = trimString(location, 50);
+
+ const alert = bootbox.alert(
+ {
+ size: 'large',
+ message: function() {
+ let url = location;
+ let msg = `Error calling ${short_location}.
`;
+ msg += 'Try to reload the page or contact the administrator if this error persists.';
+
+ msg += '
' + 'View details' + "";
+ msg += "
' + err + ''); }); } } diff --git a/src/Controller/HomepageController.php b/src/Controller/HomepageController.php index b9126867..0dd55c1e 100644 --- a/src/Controller/HomepageController.php +++ b/src/Controller/HomepageController.php @@ -84,6 +84,8 @@ class HomepageController extends AbstractController */ public function homepage(Request $request, GitVersionInfo $versionInfo): Response { + throw new \RuntimeException("Test"); + if ($this->isGranted('@tools.lastActivity')) { $table = $this->dataTable->createFromType( LogDataTable::class,