summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2016-12-01 13:09:45 -0600
committerMike Greiling <mike@pixelcog.com>2016-12-02 17:38:58 -0600
commit8732ac4084c1f6a2a5b4e491e32424f738f7a01a (patch)
treecc36b60b1e284dad9c6320a44248159108c7399c
parentc1ea41e2f564f3113b3dfcd2e654531d6b475a7f (diff)
downloadgitlab-ce-8732ac4084c1f6a2a5b4e491e32424f738f7a01a.tar.gz
display error when a tab cannot be loaded
-rw-r--r--app/assets/javascripts/merge_request_tabs.js.es66
1 files changed, 5 insertions, 1 deletions
diff --git a/app/assets/javascripts/merge_request_tabs.js.es6 b/app/assets/javascripts/merge_request_tabs.js.es6
index 73828c8ab0e..35e869d2e39 100644
--- a/app/assets/javascripts/merge_request_tabs.js.es6
+++ b/app/assets/javascripts/merge_request_tabs.js.es6
@@ -1,5 +1,8 @@
/* eslint-disable no-new, no-param-reassign, class-methods-use-this */
-/* global Breakpoints, Cookies, DiffNotesApp */
+/* global Breakpoints */
+/* global Cookies */
+/* global DiffNotesApp */
+/* global Flash */
/*= require js.cookie */
/*= require breakpoints */
@@ -294,6 +297,7 @@
ajaxGet(options) {
const defaults = {
beforeSend: () => this.toggleLoading(true),
+ error: () => new Flash('An error occurred while fetching this tab.', 'alert'),
complete: () => this.toggleLoading(false),
dataType: 'json',
type: 'GET',