Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
8785aa64
Commit
8785aa64
authored
May 09, 2017
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue board transient failure
parent
aaafd639
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
9 deletions
+18
-9
app/assets/javascripts/boards/components/board_new_issue.js
app/assets/javascripts/boards/components/board_new_issue.js
+1
-1
app/assets/javascripts/boards/components/modal/index.js
app/assets/javascripts/boards/components/modal/index.js
+2
-1
app/assets/javascripts/boards/models/list.js
app/assets/javascripts/boards/models/list.js
+15
-7
No files found.
app/assets/javascripts/boards/components/board_new_issue.js
View file @
8785aa64
...
@@ -68,7 +68,7 @@ export default {
...
@@ -68,7 +68,7 @@ export default {
<div class="flash-container"
<div class="flash-container"
v-if="error">
v-if="error">
<div class="flash-alert">
<div class="flash-alert">
An error occured. Please try again.
An error occur
r
ed. Please try again.
</div>
</div>
</div>
</div>
<label class="label-light"
<label class="label-light"
...
...
app/assets/javascripts/boards/components/modal/index.js
View file @
8785aa64
/* global ListIssue */
/* global ListIssue */
/* global Flash */
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
import
queryData
from
'
../../utils/query_data
'
;
import
queryData
from
'
../../utils/query_data
'
;
...
@@ -108,7 +109,7 @@ gl.issueBoards.IssuesModal = Vue.extend({
...
@@ -108,7 +109,7 @@ gl.issueBoards.IssuesModal = Vue.extend({
if
(
!
this
.
issuesCount
)
{
if
(
!
this
.
issuesCount
)
{
this
.
issuesCount
=
data
.
size
;
this
.
issuesCount
=
data
.
size
;
}
}
});
})
.
catch
(()
=>
new
Flash
(
'
An unexpected error has occurred.
'
,
'
alert
'
))
;
},
},
},
},
computed
:
{
computed
:
{
...
...
app/assets/javascripts/boards/models/list.js
View file @
8785aa64
/* eslint-disable space-before-function-paren, no-underscore-dangle, class-methods-use-this, consistent-return, no-shadow, no-param-reassign, max-len, no-unused-vars */
/* eslint-disable space-before-function-paren, no-underscore-dangle, class-methods-use-this, consistent-return, no-shadow, no-param-reassign, max-len, no-unused-vars */
/* global ListIssue */
/* global ListIssue */
/* global ListLabel */
/* global ListLabel */
/* global Flash */
import
queryData
from
'
../utils/query_data
'
;
import
queryData
from
'
../utils/query_data
'
;
const
PER_PAGE
=
20
;
const
PER_PAGE
=
20
;
...
@@ -44,7 +45,8 @@ class List {
...
@@ -44,7 +45,8 @@ class List {
this
.
position
=
data
.
position
;
this
.
position
=
data
.
position
;
return
this
.
getIssues
();
return
this
.
getIssues
();
});
})
.
catch
(()
=>
new
Flash
(
'
An unexpected error has occurred.
'
,
'
alert
'
));
}
}
destroy
()
{
destroy
()
{
...
@@ -52,11 +54,13 @@ class List {
...
@@ -52,11 +54,13 @@ class List {
gl
.
issueBoards
.
BoardsStore
.
state
.
lists
.
splice
(
index
,
1
);
gl
.
issueBoards
.
BoardsStore
.
state
.
lists
.
splice
(
index
,
1
);
gl
.
issueBoards
.
BoardsStore
.
updateNewListDropdown
(
this
.
id
);
gl
.
issueBoards
.
BoardsStore
.
updateNewListDropdown
(
this
.
id
);
gl
.
boardService
.
destroyList
(
this
.
id
);
gl
.
boardService
.
destroyList
(
this
.
id
)
.
catch
(()
=>
new
Flash
(
'
An unexpected error has occurred.
'
,
'
alert
'
));
}
}
update
()
{
update
()
{
gl
.
boardService
.
updateList
(
this
.
id
,
this
.
position
);
gl
.
boardService
.
updateList
(
this
.
id
,
this
.
position
)
.
catch
(()
=>
new
Flash
(
'
An unexpected error has occurred.
'
,
'
alert
'
));
}
}
nextPage
()
{
nextPage
()
{
...
@@ -91,7 +95,8 @@ class List {
...
@@ -91,7 +95,8 @@ class List {
}
}
this
.
createIssues
(
data
.
issues
);
this
.
createIssues
(
data
.
issues
);
});
})
.
catch
(()
=>
new
Flash
(
'
Failed to load issues, please try again.
'
,
'
alert
'
));
}
}
newIssue
(
issue
)
{
newIssue
(
issue
)
{
...
@@ -103,7 +108,8 @@ class List {
...
@@ -103,7 +108,8 @@ class List {
const
data
=
resp
.
json
();
const
data
=
resp
.
json
();
issue
.
id
=
data
.
iid
;
issue
.
id
=
data
.
iid
;
issue
.
milestone
=
data
.
milestone
;
issue
.
milestone
=
data
.
milestone
;
});
})
.
catch
(()
=>
new
Flash
(
'
An unexpected error has occurred.
'
,
'
alert
'
));
}
}
createIssues
(
data
)
{
createIssues
(
data
)
{
...
@@ -147,11 +153,13 @@ class List {
...
@@ -147,11 +153,13 @@ class List {
this
.
issues
.
splice
(
oldIndex
,
1
);
this
.
issues
.
splice
(
oldIndex
,
1
);
this
.
issues
.
splice
(
newIndex
,
0
,
issue
);
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
(()
=>
new
Flash
(
'
An unexpected error has occurred.
'
,
'
alert
'
));
}
}
updateIssueLabel
(
issue
,
listFrom
,
moveBeforeIid
,
moveAfterIid
)
{
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
(()
=>
new
Flash
(
'
An unexpected error has occurred.
'
,
'
alert
'
));
}
}
findIssue
(
id
)
{
findIssue
(
id
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment