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
b36ca1d8
Commit
b36ca1d8
authored
Nov 04, 2020
by
Coung Ngo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix incorrect usages of createFlash
Usages of createFlash were not passing objects as the first argument
parent
e8ee5540
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
9 deletions
+11
-9
app/assets/javascripts/issue_show/components/header_actions.vue
...sets/javascripts/issue_show/components/header_actions.vue
+2
-2
app/assets/javascripts/pages/projects/ci/lints/new/index.js
app/assets/javascripts/pages/projects/ci/lints/new/index.js
+2
-2
app/assets/javascripts/pages/projects/ci/lints/show/index.js
app/assets/javascripts/pages/projects/ci/lints/show/index.js
+2
-2
app/assets/javascripts/pages/projects/commit/show/index.js
app/assets/javascripts/pages/projects/commit/show/index.js
+1
-1
app/assets/javascripts/vue_shared/components/filtered_search_bar/tokens/milestone_token.vue
...components/filtered_search_bar/tokens/milestone_token.vue
+1
-1
spec/frontend/vue_shared/components/filtered_search_bar/tokens/milestone_token_spec.js
...onents/filtered_search_bar/tokens/milestone_token_spec.js
+3
-1
No files found.
app/assets/javascripts/issue_show/components/header_actions.vue
View file @
b36ca1d8
...
...
@@ -81,7 +81,7 @@ export default {
})
.
then
(({
data
})
=>
{
if
(
data
.
updateIssue
.
errors
.
length
)
{
createFlash
(
data
.
updateIssue
.
errors
.
join
(
'
.
'
)
);
createFlash
(
{
message
:
data
.
updateIssue
.
errors
.
join
(
'
.
'
)
}
);
return
;
}
...
...
@@ -95,7 +95,7 @@ export default {
// Dispatch event which updates open/close state, shared among the issue show page
document
.
dispatchEvent
(
new
CustomEvent
(
'
issuable_vue_app:change
'
,
payload
));
})
.
catch
(()
=>
createFlash
(
__
(
'
Update failed. Please try again.
'
)
))
.
catch
(()
=>
createFlash
(
{
message
:
__
(
'
Update failed. Please try again.
'
)
}
))
.
finally
(()
=>
{
this
.
isUpdatingState
=
false
;
});
...
...
app/assets/javascripts/pages/projects/ci/lints/new/index.js
View file @
b36ca1d8
...
...
@@ -7,11 +7,11 @@ document.addEventListener('DOMContentLoaded', () => {
if
(
gon
?.
features
?.
ciLintVue
)
{
import
(
/* webpackChunkName: 'ciLintIndex' */
'
~/ci_lint/index
'
)
.
then
(
module
=>
module
.
default
())
.
catch
(()
=>
createFlash
(
ERROR
));
.
catch
(()
=>
createFlash
(
{
message
:
ERROR
}
));
}
else
{
import
(
/* webpackChunkName: 'ciLintEditor' */
'
../ci_lint_editor
'
)
// eslint-disable-next-line new-cap
.
then
(
module
=>
new
module
.
default
())
.
catch
(()
=>
createFlash
(
ERROR
));
.
catch
(()
=>
createFlash
(
{
message
:
ERROR
}
));
}
});
app/assets/javascripts/pages/projects/ci/lints/show/index.js
View file @
b36ca1d8
...
...
@@ -7,11 +7,11 @@ document.addEventListener('DOMContentLoaded', () => {
if
(
gon
?.
features
?.
ciLintVue
)
{
import
(
/* webpackChunkName: 'ciLintIndex' */
'
~/ci_lint/index
'
)
.
then
(
module
=>
module
.
default
())
.
catch
(()
=>
createFlash
(
ERROR
));
.
catch
(()
=>
createFlash
(
{
message
:
ERROR
}
));
}
else
{
import
(
/* webpackChunkName: 'ciLintEditor' */
'
../ci_lint_editor
'
)
// eslint-disable-next-line new-cap
.
then
(
module
=>
new
module
.
default
())
.
catch
(()
=>
createFlash
(
ERROR
));
.
catch
(()
=>
createFlash
(
{
message
:
ERROR
}
));
}
});
app/assets/javascripts/pages/projects/commit/show/index.js
View file @
b36ca1d8
...
...
@@ -40,7 +40,7 @@ document.addEventListener('DOMContentLoaded', () => {
new
Diff
();
})
.
catch
(()
=>
{
flash
(
__
(
'
An error occurred while retrieving diff files
'
)
);
flash
(
{
message
:
__
(
'
An error occurred while retrieving diff files
'
)
}
);
});
}
else
{
new
Diff
();
...
...
app/assets/javascripts/vue_shared/components/filtered_search_bar/tokens/milestone_token.vue
View file @
b36ca1d8
...
...
@@ -65,7 +65,7 @@ export default {
.
then
(({
data
})
=>
{
this
.
milestones
=
data
;
})
.
catch
(()
=>
createFlash
(
__
(
'
There was a problem fetching milestones.
'
)
))
.
catch
(()
=>
createFlash
(
{
message
:
__
(
'
There was a problem fetching milestones.
'
)
}
))
.
finally
(()
=>
{
this
.
loading
=
false
;
});
...
...
spec/frontend/vue_shared/components/filtered_search_bar/tokens/milestone_token_spec.js
View file @
b36ca1d8
...
...
@@ -120,7 +120,9 @@ describe('MilestoneToken', () => {
wrapper
.
vm
.
fetchMilestoneBySearchTerm
(
'
foo
'
);
return
waitForPromises
().
then
(()
=>
{
expect
(
createFlash
).
toHaveBeenCalledWith
(
'
There was a problem fetching milestones.
'
);
expect
(
createFlash
).
toHaveBeenCalledWith
({
message
:
'
There was a problem fetching milestones.
'
,
});
});
});
...
...
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