Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClement Ho <clemmakesapps@gmail.com>2017-05-10 07:24:59 +0300
committerClement Ho <clemmakesapps@gmail.com>2017-05-10 07:24:59 +0300
commita6eaa51caed33a1f3a6d7e71769c6ae9161f35bb (patch)
treea06347f2b987acfd12899aea0a89aafde45d189c
parentb2fc6326f2b893c67c2ed33ebbbfe113ecef1641 (diff)
parentfb7c9401d4fe8309ca0199e8a182d06eaac159dc (diff)
Merge branch '32030-transient-failure-in-spec-features-boards-boards_spec-rb' into 'master'
Fix transient job failures relating to "unhandled Promise rejection" in issue boards Closes #32030 See merge request !11222
-rw-r--r--app/assets/javascripts/boards/components/board.js5
-rw-r--r--app/assets/javascripts/boards/components/board_blank_state.js5
-rw-r--r--app/assets/javascripts/boards/components/board_list.js5
-rw-r--r--app/assets/javascripts/boards/components/modal/index.js2
-rw-r--r--app/assets/javascripts/boards/models/list.js24
5 files changed, 33 insertions, 8 deletions
diff --git a/app/assets/javascripts/boards/components/board.js b/app/assets/javascripts/boards/components/board.js
index 239eeacf2d7..0d23bdeeb99 100644
--- a/app/assets/javascripts/boards/components/board.js
+++ b/app/assets/javascripts/boards/components/board.js
@@ -35,7 +35,10 @@ gl.issueBoards.Board = Vue.extend({
filter: {
handler() {
this.list.page = 1;
- this.list.getIssues(true);
+ this.list.getIssues(true)
+ .catch(() => {
+ // TODO: handle request error
+ });
},
deep: true,
},
diff --git a/app/assets/javascripts/boards/components/board_blank_state.js b/app/assets/javascripts/boards/components/board_blank_state.js
index 3fc68457961..870e115bd1a 100644
--- a/app/assets/javascripts/boards/components/board_blank_state.js
+++ b/app/assets/javascripts/boards/components/board_blank_state.js
@@ -70,7 +70,10 @@ export default {
list.id = listObj.id;
list.label.id = listObj.label.id;
- list.getIssues();
+ list.getIssues()
+ .catch(() => {
+ // TODO: handle request error
+ });
});
})
.catch(() => {
diff --git a/app/assets/javascripts/boards/components/board_list.js b/app/assets/javascripts/boards/components/board_list.js
index b13386536bf..49a775002c3 100644
--- a/app/assets/javascripts/boards/components/board_list.js
+++ b/app/assets/javascripts/boards/components/board_list.js
@@ -90,7 +90,10 @@ export default {
if (this.scrollHeight() <= this.listHeight() &&
this.list.issuesSize > this.list.issues.length) {
this.list.page += 1;
- this.list.getIssues(false);
+ this.list.getIssues(false)
+ .catch(() => {
+ // TODO: handle request error
+ });
}
if (this.scrollHeight() > Math.ceil(this.listHeight())) {
diff --git a/app/assets/javascripts/boards/components/modal/index.js b/app/assets/javascripts/boards/components/modal/index.js
index fdab317dc23..a61cc7954a1 100644
--- a/app/assets/javascripts/boards/components/modal/index.js
+++ b/app/assets/javascripts/boards/components/modal/index.js
@@ -108,6 +108,8 @@ gl.issueBoards.IssuesModal = Vue.extend({
if (!this.issuesCount) {
this.issuesCount = data.size;
}
+ }).catch(() => {
+ // TODO: handle request error
});
},
},
diff --git a/app/assets/javascripts/boards/models/list.js b/app/assets/javascripts/boards/models/list.js
index bd2f62bcc1a..90561d0f7a8 100644
--- a/app/assets/javascripts/boards/models/list.js
+++ b/app/assets/javascripts/boards/models/list.js
@@ -25,7 +25,9 @@ class List {
}
if (this.type !== 'blank' && this.id) {
- this.getIssues();
+ this.getIssues().catch(() => {
+ // TODO: handle request error
+ });
}
}
@@ -52,11 +54,17 @@ class List {
gl.issueBoards.BoardsStore.state.lists.splice(index, 1);
gl.issueBoards.BoardsStore.updateNewListDropdown(this.id);
- gl.boardService.destroyList(this.id);
+ gl.boardService.destroyList(this.id)
+ .catch(() => {
+ // TODO: handle request error
+ });
}
update () {
- gl.boardService.updateList(this.id, this.position);
+ gl.boardService.updateList(this.id, this.position)
+ .catch(() => {
+ // TODO: handle request error
+ });
}
nextPage () {
@@ -146,11 +154,17 @@ class List {
this.issues.splice(oldIndex, 1);
this.issues.splice(newIndex, 0, issue);
- gl.boardService.moveIssue(issue.id, null, null, moveBeforeIid, moveAfterIid);
+ gl.boardService.moveIssue(issue.id, null, null, moveBeforeIid, moveAfterIid)
+ .catch(() => {
+ // TODO: handle request error
+ });
}
updateIssueLabel(issue, listFrom, moveBeforeIid, moveAfterIid) {
- gl.boardService.moveIssue(issue.id, listFrom.id, this.id, moveBeforeIid, moveAfterIid);
+ gl.boardService.moveIssue(issue.id, listFrom.id, this.id, moveBeforeIid, moveAfterIid)
+ .catch(() => {
+ // TODO: handle request error
+ });
}
findIssue (id) {