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
09d10207
Commit
09d10207
authored
Feb 07, 2020
by
Tristan Read
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert underscore to lodash for error_tracking_settings
parent
bbcd604f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
8 deletions
+5
-8
app/assets/javascripts/error_tracking_settings/store/getters.js
...sets/javascripts/error_tracking_settings/store/getters.js
+2
-2
app/assets/javascripts/error_tracking_settings/store/mutations.js
...ts/javascripts/error_tracking_settings/store/mutations.js
+3
-6
No files found.
app/assets/javascripts/error_tracking_settings/store/getters.js
View file @
09d10207
import
_
from
'
underscore
'
;
import
{
isMatch
}
from
'
lodash
'
;
import
{
__
,
s__
,
sprintf
}
from
'
~/locale
'
;
import
{
getDisplayName
}
from
'
../utils
'
;
...
...
@@ -7,7 +7,7 @@ export const hasProjects = state => Boolean(state.projects) && state.projects.le
export
const
isProjectInvalid
=
(
state
,
getters
)
=>
Boolean
(
state
.
selectedProject
)
&&
getters
.
hasProjects
&&
!
state
.
projects
.
some
(
project
=>
_
.
isMatch
(
state
.
selectedProject
,
project
));
!
state
.
projects
.
some
(
project
=>
isMatch
(
state
.
selectedProject
,
project
));
export
const
dropdownLabel
=
(
state
,
getters
)
=>
{
if
(
state
.
selectedProject
!==
null
)
{
...
...
app/assets/javascripts/error_tracking_settings/store/mutations.js
View file @
09d10207
import
_
from
'
underscore
'
;
import
{
pick
}
from
'
lodash
'
;
import
{
convertObjectPropsToCamelCase
,
parseBoolean
}
from
'
~/lib/utils/common_utils
'
;
import
*
as
types
from
'
./mutation_types
'
;
import
{
projectKeys
}
from
'
../utils
'
;
...
...
@@ -12,7 +12,7 @@ export default {
.
map
(
convertObjectPropsToCamelCase
)
// The `pick` strips out extra properties returned from Sentry.
// Such properties could be problematic later, e.g. when checking whether `projects` contains `selectedProject`
.
map
(
project
=>
_
.
pick
(
project
,
projectKeys
));
.
map
(
project
=>
pick
(
project
,
projectKeys
));
},
[
types
.
RESET_CONNECT
](
state
)
{
state
.
connectSuccessful
=
false
;
...
...
@@ -29,10 +29,7 @@ export default {
state
.
operationsSettingsEndpoint
=
operationsSettingsEndpoint
;
if
(
project
)
{
state
.
selectedProject
=
_
.
pick
(
convertObjectPropsToCamelCase
(
JSON
.
parse
(
project
)),
projectKeys
,
);
state
.
selectedProject
=
pick
(
convertObjectPropsToCamelCase
(
JSON
.
parse
(
project
)),
projectKeys
);
}
},
[
types
.
UPDATE_API_HOST
](
state
,
apiHost
)
{
...
...
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