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
d53974df
Commit
d53974df
authored
Dec 23, 2020
by
Lukas Eipert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Run prettier on 38 files - 40 of 73
Part of our prettier migration; changing the arrow-parens style.
parent
81853752
Changes
38
Show whitespace changes
Inline
Side-by-side
Showing
38 changed files
with
88 additions
and
88 deletions
+88
-88
ee/app/assets/javascripts/requirements/requirements_bundle.js
...pp/assets/javascripts/requirements/requirements_bundle.js
+1
-1
ee/app/assets/javascripts/roadmap/components/epics_list_section.vue
...ets/javascripts/roadmap/components/epics_list_section.vue
+1
-1
ee/app/assets/javascripts/roadmap/components/roadmap_filters.vue
...assets/javascripts/roadmap/components/roadmap_filters.vue
+3
-3
ee/app/assets/javascripts/roadmap/roadmap_bundle.js
ee/app/assets/javascripts/roadmap/roadmap_bundle.js
+1
-1
ee/app/assets/javascripts/roadmap/store/actions.js
ee/app/assets/javascripts/roadmap/store/actions.js
+7
-7
ee/app/assets/javascripts/roadmap/store/getters.js
ee/app/assets/javascripts/roadmap/store/getters.js
+2
-2
ee/app/assets/javascripts/roadmap/store/mutations.js
ee/app/assets/javascripts/roadmap/store/mutations.js
+3
-3
ee/app/assets/javascripts/roadmap/utils/epic_utils.js
ee/app/assets/javascripts/roadmap/utils/epic_utils.js
+3
-3
ee/app/assets/javascripts/roadmap/utils/roadmap_item_utils.js
...pp/assets/javascripts/roadmap/utils/roadmap_item_utils.js
+1
-1
ee/app/assets/javascripts/saml_providers/dirty_form_checker.js
...p/assets/javascripts/saml_providers/dirty_form_checker.js
+4
-4
ee/app/assets/javascripts/saml_providers/saml_settings_form.js
...p/assets/javascripts/saml_providers/saml_settings_form.js
+6
-6
ee/app/assets/javascripts/saml_providers/scim_token_toggle_area.js
...sets/javascripts/saml_providers/scim_token_toggle_area.js
+2
-2
ee/app/assets/javascripts/search/highlight_blob_search_result.js
...assets/javascripts/search/highlight_blob_search_result.js
+1
-1
ee/app/assets/javascripts/security_configuration/components/auto_fix_settings.vue
...s/security_configuration/components/auto_fix_settings.vue
+2
-2
ee/app/assets/javascripts/security_configuration/components/create_merge_request_button.vue
..._configuration/components/create_merge_request_button.vue
+1
-1
ee/app/assets/javascripts/security_configuration/dast_profiles/components/dast_profiles.vue
..._configuration/dast_profiles/components/dast_profiles.vue
+2
-2
ee/app/assets/javascripts/security_configuration/dast_profiles/components/dast_profiles_list.vue
...iguration/dast_profiles/components/dast_profiles_list.vue
+1
-1
ee/app/assets/javascripts/security_configuration/dast_profiles/graphql/cache_utils.js
...curity_configuration/dast_profiles/graphql/cache_utils.js
+2
-2
ee/app/assets/javascripts/security_configuration/dast_scanner_profiles/components/dast_scanner_profile_form.vue
...scanner_profiles/components/dast_scanner_profile_form.vue
+1
-1
ee/app/assets/javascripts/security_configuration/dast_site_profiles_form/components/dast_site_profile_form.vue
..._site_profiles_form/components/dast_site_profile_form.vue
+1
-1
ee/app/assets/javascripts/security_configuration/modules/configuration/actions.js
...s/security_configuration/modules/configuration/actions.js
+2
-2
ee/app/assets/javascripts/security_configuration/sast/components/configuration_form.vue
...rity_configuration/sast/components/configuration_form.vue
+2
-2
ee/app/assets/javascripts/security_configuration/sast/components/dynamic_fields.vue
...security_configuration/sast/components/dynamic_fields.vue
+1
-1
ee/app/assets/javascripts/security_configuration/sast/components/form_input.vue
...pts/security_configuration/sast/components/form_input.vue
+1
-1
ee/app/assets/javascripts/security_configuration/sast/components/utils.js
...vascripts/security_configuration/sast/components/utils.js
+4
-4
ee/app/assets/javascripts/security_dashboard/components/filters/standard_filter.vue
...security_dashboard/components/filters/standard_filter.vue
+4
-4
ee/app/assets/javascripts/security_dashboard/components/first_class_group_security_dashboard_vulnerabilities.vue
.../first_class_group_security_dashboard_vulnerabilities.vue
+1
-1
ee/app/assets/javascripts/security_dashboard/components/first_class_instance_security_dashboard_vulnerabilities.vue
...rst_class_instance_security_dashboard_vulnerabilities.vue
+1
-1
ee/app/assets/javascripts/security_dashboard/components/first_class_project_manager/project_manager.vue
...omponents/first_class_project_manager/project_manager.vue
+8
-8
ee/app/assets/javascripts/security_dashboard/components/first_class_vulnerability_chart.vue
..._dashboard/components/first_class_vulnerability_chart.vue
+4
-4
ee/app/assets/javascripts/security_dashboard/components/first_class_vulnerability_severities.vue
...board/components/first_class_vulnerability_severities.vue
+3
-3
ee/app/assets/javascripts/security_dashboard/components/loading_error.vue
...vascripts/security_dashboard/components/loading_error.vue
+1
-1
ee/app/assets/javascripts/security_dashboard/components/project_security_charts.vue
...security_dashboard/components/project_security_charts.vue
+2
-2
ee/app/assets/javascripts/security_dashboard/components/selection_summary.vue
...ripts/security_dashboard/components/selection_summary.vue
+1
-1
ee/app/assets/javascripts/security_dashboard/components/vulnerability_chart_buttons.vue
...rity_dashboard/components/vulnerability_chart_buttons.vue
+1
-1
ee/app/assets/javascripts/security_dashboard/components/vulnerability_count_list.vue
...ecurity_dashboard/components/vulnerability_count_list.vue
+1
-1
ee/app/assets/javascripts/security_dashboard/components/vulnerability_count_list_layout.vue
..._dashboard/components/vulnerability_count_list_layout.vue
+1
-1
ee/app/assets/javascripts/security_dashboard/components/vulnerability_list.vue
...ipts/security_dashboard/components/vulnerability_list.vue
+5
-5
No files found.
ee/app/assets/javascripts/requirements/requirements_bundle.js
View file @
d53974df
...
...
@@ -24,7 +24,7 @@ export default () => {
{},
{
cacheConfig
:
{
dataIdFromObject
:
object
=>
dataIdFromObject
:
(
object
)
=>
// eslint-disable-next-line no-underscore-dangle, @gitlab/require-i18n-strings
object
.
__typename
===
'
Requirement
'
?
object
.
iid
:
defaultDataIdFromObject
(
object
),
},
...
...
ee/app/assets/javascripts/roadmap/components/epics_list_section.vue
View file @
d53974df
...
...
@@ -68,7 +68,7 @@ export default {
},
epicsWithAssociatedParents
()
{
return
this
.
epics
.
filter
(
epic
=>
!
epic
.
hasParent
||
(
epic
.
hasParent
&&
this
.
epicIds
.
indexOf
(
epic
.
parent
.
id
)
<
0
),
(
epic
)
=>
!
epic
.
hasParent
||
(
epic
.
hasParent
&&
this
.
epicIds
.
indexOf
(
epic
.
parent
.
id
)
<
0
),
);
},
displayedEpics
()
{
...
...
ee/app/assets/javascripts/roadmap/components/roadmap_filters.vue
View file @
d53974df
...
...
@@ -125,7 +125,7 @@ export default {
// b) Milestones Public API supports including child projects' milestones.
if
(
search
)
{
return
{
data
:
data
.
filter
(
m
=>
m
.
title
.
toLowerCase
().
includes
(
search
.
toLowerCase
())),
data
:
data
.
filter
(
(
m
)
=>
m
.
title
.
toLowerCase
().
includes
(
search
.
toLowerCase
())),
};
}
return
{
data
};
...
...
@@ -154,7 +154,7 @@ export default {
if
(
labelName
?.
length
)
{
filteredSearchValue
.
push
(
...
labelName
.
map
(
label
=>
({
...
labelName
.
map
(
(
label
)
=>
({
type
:
'
label_name
'
,
value
:
{
data
:
label
},
})),
...
...
@@ -217,7 +217,7 @@ export default {
const
filterParams
=
filters
.
length
?
{}
:
null
;
const
labels
=
[];
filters
.
forEach
(
filter
=>
{
filters
.
forEach
(
(
filter
)
=>
{
if
(
typeof
filter
===
'
object
'
)
{
switch
(
filter
.
type
)
{
case
'
author_username
'
:
...
...
ee/app/assets/javascripts/roadmap/roadmap_bundle.js
View file @
d53974df
...
...
@@ -34,7 +34,7 @@ export default () => {
// This event handler is to be removed in 11.1 once
// we allow user to save selected preset in db
if
(
presetButtonsContainer
)
{
presetButtonsContainer
.
addEventListener
(
'
click
'
,
e
=>
{
presetButtonsContainer
.
addEventListener
(
'
click
'
,
(
e
)
=>
{
const
presetType
=
e
.
target
.
querySelector
(
'
input[name="presetType"]
'
).
value
;
visitUrl
(
mergeUrlParams
({
layout
:
presetType
},
window
.
location
.
href
));
...
...
ee/app/assets/javascripts/roadmap/store/actions.js
View file @
d53974df
...
...
@@ -155,7 +155,7 @@ export const fetchEpics = ({ state, commit, dispatch }) => {
commit
(
types
.
REQUEST_EPICS
);
fetchGroupEpics
(
state
)
.
then
(
rawEpics
=>
{
.
then
(
(
rawEpics
)
=>
{
dispatch
(
'
receiveEpicsSuccess
'
,
{
rawEpics
});
})
.
catch
(()
=>
dispatch
(
'
receiveEpicsFailure
'
));
...
...
@@ -165,7 +165,7 @@ export const fetchEpicsForTimeframe = ({ state, commit, dispatch }, { timeframe
commit
(
types
.
REQUEST_EPICS_FOR_TIMEFRAME
);
return
fetchGroupEpics
(
state
,
timeframe
)
.
then
(
rawEpics
=>
{
.
then
(
(
rawEpics
)
=>
{
dispatch
(
'
receiveEpicsSuccess
'
,
{
rawEpics
,
newEpic
:
true
,
...
...
@@ -210,7 +210,7 @@ export const toggleEpic = ({ state, dispatch }, { parentItem }) => {
if
(
!
state
.
childrenEpics
[
parentItemId
])
{
dispatch
(
'
requestChildrenEpics
'
,
{
parentItemId
});
fetchChildrenEpics
(
state
,
{
parentItem
})
.
then
(
rawChildren
=>
{
.
then
(
(
rawChildren
)
=>
{
dispatch
(
'
receiveChildrenSuccess
'
,
{
parentItemId
,
rawChildren
,
...
...
@@ -234,10 +234,10 @@ export const toggleEpic = ({ state, dispatch }, { parentItem }) => {
* so that the epic bars get longer to appear infinitely scrolling.
*/
export
const
refreshEpicDates
=
({
commit
,
state
,
getters
})
=>
{
const
epics
=
state
.
epics
.
map
(
epic
=>
{
const
epics
=
state
.
epics
.
map
(
(
epic
)
=>
{
// Update child epic dates too
if
(
epic
.
children
?.
edges
?.
length
>
0
)
{
epic
.
children
.
edges
.
map
(
childEpic
=>
epic
.
children
.
edges
.
map
(
(
childEpic
)
=>
roadmapItemUtils
.
processRoadmapItemDates
(
childEpic
,
getters
.
timeframeStartDate
,
...
...
@@ -291,7 +291,7 @@ export const fetchMilestones = ({ state, dispatch }) => {
dispatch
(
'
requestMilestones
'
);
return
fetchGroupMilestones
(
state
)
.
then
(
rawMilestones
=>
{
.
then
(
(
rawMilestones
)
=>
{
dispatch
(
'
receiveMilestonesSuccess
'
,
{
rawMilestones
});
})
.
catch
(()
=>
dispatch
(
'
receiveMilestonesFailure
'
));
...
...
@@ -333,7 +333,7 @@ export const receiveMilestonesFailure = ({ commit }) => {
};
export
const
refreshMilestoneDates
=
({
commit
,
state
,
getters
})
=>
{
const
milestones
=
state
.
milestones
.
map
(
milestone
=>
const
milestones
=
state
.
milestones
.
map
(
(
milestone
)
=>
roadmapItemUtils
.
processRoadmapItemDates
(
milestone
,
getters
.
timeframeStartDate
,
...
...
ee/app/assets/javascripts/roadmap/store/getters.js
View file @
d53974df
...
...
@@ -7,14 +7,14 @@ import { PRESET_TYPES, DAYS_IN_WEEK } from '../constants';
*
* @param {Object} state
*/
export
const
lastTimeframeIndex
=
state
=>
state
.
timeframe
.
length
-
1
;
export
const
lastTimeframeIndex
=
(
state
)
=>
state
.
timeframe
.
length
-
1
;
/**
* Returns first item of the timeframe array from state
*
* @param {Object} state
*/
export
const
timeframeStartDate
=
state
=>
{
export
const
timeframeStartDate
=
(
state
)
=>
{
if
(
state
.
presetType
===
PRESET_TYPES
.
QUARTERS
)
{
return
state
.
timeframe
[
0
].
range
[
0
];
}
...
...
ee/app/assets/javascripts/roadmap/store/mutations.js
View file @
d53974df
...
...
@@ -2,7 +2,7 @@ import Vue from 'vue';
import
*
as
types
from
'
./mutation_types
'
;
const
resetEpics
=
state
=>
{
const
resetEpics
=
(
state
)
=>
{
state
.
epics
=
[];
state
.
childrenFlags
=
{};
state
.
epicIds
=
[];
...
...
@@ -44,7 +44,7 @@ export default {
state
.
epicsFetchInProgress
=
false
;
state
.
epicsFetchForTimeframeInProgress
=
false
;
state
.
epicsFetchFailure
=
true
;
Object
.
keys
(
state
.
childrenEpics
).
forEach
(
id
=>
{
Object
.
keys
(
state
.
childrenEpics
).
forEach
(
(
id
)
=>
{
Vue
.
set
(
state
.
childrenFlags
,
id
,
{
itemChildrenFetchInProgress
:
false
,
});
...
...
@@ -60,7 +60,7 @@ export default {
},
[
types
.
INIT_EPIC_CHILDREN_FLAGS
](
state
,
{
epics
})
{
epics
.
forEach
(
item
=>
{
epics
.
forEach
(
(
item
)
=>
{
Vue
.
set
(
state
.
childrenFlags
,
item
.
id
,
{
itemExpanded
:
false
,
itemChildrenFetchInProgress
:
false
,
...
...
ee/app/assets/javascripts/roadmap/utils/epic_utils.js
View file @
d53974df
...
...
@@ -22,8 +22,8 @@ export const flattenGroupProperty = ({ node: epicNode }) => ({
*
* @param {Object} edges
*/
export
const
extractGroupEpics
=
edges
=>
edges
.
map
(
flattenGroupProperty
);
export
const
extractGroupEpics
=
(
edges
)
=>
edges
.
map
(
flattenGroupProperty
);
export
const
addIsChildEpicTrueProperty
=
obj
=>
({
...
obj
,
isChildEpic
:
true
});
export
const
addIsChildEpicTrueProperty
=
(
obj
)
=>
({
...
obj
,
isChildEpic
:
true
});
export
const
generateKey
=
epic
=>
`
${
epic
.
isChildEpic
?
'
child-epic-
'
:
'
epic-
'
}${
epic
.
id
}
`
;
export
const
generateKey
=
(
epic
)
=>
`
${
epic
.
isChildEpic
?
'
child-epic-
'
:
'
epic-
'
}${
epic
.
id
}
`
;
ee/app/assets/javascripts/roadmap/utils/roadmap_item_utils.js
View file @
d53974df
...
...
@@ -105,7 +105,7 @@ export const formatRoadmapItemDetails = (rawRoadmapItem, timeframeStartDate, tim
*
* @param {Object} group
*/
export
const
extractGroupMilestones
=
edges
=>
export
const
extractGroupMilestones
=
(
edges
)
=>
edges
.
map
(({
node
,
milestoneNode
=
node
})
=>
({
...
milestoneNode
,
}));
ee/app/assets/javascripts/saml_providers/dirty_form_checker.js
View file @
d53974df
...
...
@@ -5,19 +5,19 @@ export default class DirtyFormChecker {
this
.
isDirty
=
false
;
this
.
editableInputs
=
Array
.
from
(
this
.
form
.
querySelectorAll
(
'
input[name]
'
)).
filter
(
el
=>
(
el
)
=>
(
el
.
type
!==
'
submit
'
&&
el
.
type
!==
'
hidden
'
)
||
el
.
classList
.
contains
(
'
js-project-feature-toggle-input
'
),
);
this
.
startingStates
=
{};
this
.
editableInputs
.
forEach
(
input
=>
{
this
.
editableInputs
.
forEach
(
(
input
)
=>
{
this
.
startingStates
[
input
.
name
]
=
input
.
value
;
});
}
init
()
{
this
.
form
.
addEventListener
(
'
input
'
,
event
=>
{
this
.
form
.
addEventListener
(
'
input
'
,
(
event
)
=>
{
if
(
event
.
target
.
matches
(
'
input[name]
'
))
{
this
.
recalculate
();
}
...
...
@@ -26,7 +26,7 @@ export default class DirtyFormChecker {
recalculate
()
{
const
wasDirty
=
this
.
isDirty
;
this
.
isDirty
=
this
.
editableInputs
.
some
(
input
=>
{
this
.
isDirty
=
this
.
editableInputs
.
some
(
(
input
)
=>
{
const
currentValue
=
input
.
value
;
const
startValue
=
this
.
startingStates
[
input
.
name
];
...
...
ee/app/assets/javascripts/saml_providers/saml_settings_form.js
View file @
d53974df
...
...
@@ -45,8 +45,8 @@ export default class SamlSettingsForm {
dependsOn
:
'
enforced-group-managed-accounts
'
,
},
]
.
filter
(
s
=>
s
.
el
)
.
map
(
setting
=>
({
.
filter
(
(
s
)
=>
s
.
el
)
.
map
(
(
setting
)
=>
({
...
setting
,
toggle
:
getToggle
(
setting
.
el
),
helperText
:
getHelperText
(
setting
.
el
),
...
...
@@ -60,7 +60,7 @@ export default class SamlSettingsForm {
}
findSetting
(
name
)
{
return
this
.
settings
.
find
(
s
=>
s
.
name
===
name
);
return
this
.
settings
.
find
(
(
s
)
=>
s
.
name
===
name
);
}
getValueWithDeps
(
name
)
{
...
...
@@ -92,7 +92,7 @@ export default class SamlSettingsForm {
}
updateSAMLSettings
()
{
this
.
settings
=
this
.
settings
.
map
(
setting
=>
({
this
.
settings
=
this
.
settings
.
map
(
(
setting
)
=>
({
...
setting
,
value
:
parseBoolean
(
setting
.
el
.
querySelector
(
'
input
'
).
value
),
}));
...
...
@@ -112,8 +112,8 @@ export default class SamlSettingsForm {
updateToggles
()
{
this
.
settings
.
filter
(
setting
=>
setting
.
dependsOn
)
.
forEach
(
setting
=>
{
.
filter
(
(
setting
)
=>
setting
.
dependsOn
)
.
forEach
(
(
setting
)
=>
{
const
{
helperText
,
callout
,
toggle
}
=
setting
;
const
isRelatedToggleOn
=
this
.
getValueWithDeps
(
setting
.
dependsOn
);
if
(
helperText
)
{
...
...
ee/app/assets/javascripts/saml_providers/scim_token_toggle_area.js
View file @
d53974df
...
...
@@ -68,10 +68,10 @@ export default class SCIMTokenToggleArea {
this
.
toggleLoading
();
return
this
.
fetchNewToken
()
.
then
(
response
=>
{
.
then
(
(
response
)
=>
{
this
.
setTokenAndToggleSCIMForm
(
response
.
data
);
})
.
catch
(
error
=>
{
.
catch
(
(
error
)
=>
{
createFlash
(
error
);
this
.
toggleLoading
();
this
.
toggleFormVisibility
(
container
);
...
...
ee/app/assets/javascripts/search/highlight_blob_search_result.js
View file @
d53974df
...
...
@@ -9,7 +9,7 @@ export default () => {
setHighlightClass
();
// Supports Advanced (backed by Elasticsearch) Search highlighting
blobs
.
forEach
(
blob
=>
{
blobs
.
forEach
(
(
blob
)
=>
{
const
lines
=
blob
.
querySelectorAll
(
'
.line
'
);
const
dataHighlightLine
=
blob
.
querySelector
(
'
[data-highlight-line]
'
);
if
(
dataHighlightLine
)
{
...
...
ee/app/assets/javascripts/security_configuration/components/auto_fix_settings.vue
View file @
d53974df
...
...
@@ -49,7 +49,7 @@ export default {
// In this first iteration, the auto-fix settings is toggled for all features at once via a
// single checkbox. The line below is a temporary workaround to initialize the setting's state
// until we have distinct checkboxes for each auto-fixable feature.
const
autoFixEnabled
=
Object
.
values
(
this
.
autoFixEnabled
).
some
(
enabled
=>
enabled
);
const
autoFixEnabled
=
Object
.
values
(
this
.
autoFixEnabled
).
some
(
(
enabled
)
=>
enabled
);
return
{
autoFixEnabledLocal
:
autoFixEnabled
,
isChecked
:
autoFixEnabled
,
...
...
@@ -75,7 +75,7 @@ export default {
this
.
autoFixEnabledLocal
=
enabled
;
this
.
isChecked
=
enabled
;
})
.
catch
(
e
=>
{
.
catch
(
(
e
)
=>
{
Sentry
.
captureException
(
e
);
createFlash
(
__
(
'
Something went wrong while toggling auto-fix settings, please try again later.
'
),
...
...
ee/app/assets/javascripts/security_configuration/components/create_merge_request_button.vue
View file @
d53974df
...
...
@@ -55,7 +55,7 @@ export default {
redirectTo
(
filePath
);
})
.
catch
(
error
=>
{
.
catch
(
(
error
)
=>
{
this
.
isCreatingMergeRequest
=
false
;
createFlash
(
s__
(
'
SecurityConfiguration|An error occurred while creating the merge request.
'
),
...
...
ee/app/assets/javascripts/security_configuration/dast_profiles/components/dast_profiles.vue
View file @
d53974df
...
...
@@ -141,7 +141,7 @@ export default {
variables
:
{
after
:
pageInfo
.
endCursor
},
updateQuery
:
cacheUtils
.
appendToPreviousResult
(
profileType
),
})
.
catch
(
error
=>
{
.
catch
(
(
error
)
=>
{
this
.
handleError
({
profileType
,
exception
:
error
,
...
...
@@ -199,7 +199,7 @@ export default {
},
optimisticResponse
:
deletion
.
optimisticResponse
,
})
.
catch
(
error
=>
{
.
catch
(
(
error
)
=>
{
this
.
handleError
({
profileType
,
exception
:
error
,
...
...
ee/app/assets/javascripts/security_configuration/dast_profiles/components/dast_profiles_list.vue
View file @
d53974df
...
...
@@ -88,7 +88,7 @@ export default {
},
tableFields
()
{
const
defaultClasses
=
[
'
gl-word-break-all
'
];
const
dataFields
=
this
.
fields
.
map
(
key
=>
({
key
,
class
:
defaultClasses
}));
const
dataFields
=
this
.
fields
.
map
(
(
key
)
=>
({
key
,
class
:
defaultClasses
}));
const
staticFields
=
[{
key
:
'
actions
'
}];
return
[...
dataFields
,
...
staticFields
];
...
...
ee/app/assets/javascripts/security_configuration/dast_profiles/graphql/cache_utils.js
View file @
d53974df
...
...
@@ -9,7 +9,7 @@ import dastSiteProfilesQuery from 'ee/security_configuration/dast_profiles/graph
* @param {*} profileType
* @returns {function(*, {fetchMoreResult: *}): *}
*/
export
const
appendToPreviousResult
=
profileType
=>
(
previousResult
,
{
fetchMoreResult
})
=>
{
export
const
appendToPreviousResult
=
(
profileType
)
=>
(
previousResult
,
{
fetchMoreResult
})
=>
{
const
newResult
=
{
...
fetchMoreResult
};
const
previousEdges
=
previousResult
.
project
[
profileType
].
edges
;
const
newEdges
=
newResult
.
project
[
profileType
].
edges
;
...
...
@@ -30,7 +30,7 @@ export const appendToPreviousResult = profileType => (previousResult, { fetchMor
export
const
removeProfile
=
({
profileId
,
profileType
,
store
,
queryBody
})
=>
{
const
sourceData
=
store
.
readQuery
(
queryBody
);
const
data
=
produce
(
sourceData
,
draftState
=>
{
const
data
=
produce
(
sourceData
,
(
draftState
)
=>
{
// eslint-disable-next-line no-param-reassign
draftState
.
project
[
profileType
].
edges
=
draftState
.
project
[
profileType
].
edges
.
filter
(
({
node
})
=>
{
...
...
ee/app/assets/javascripts/security_configuration/dast_scanner_profiles/components/dast_scanner_profile_form.vue
View file @
d53974df
...
...
@@ -201,7 +201,7 @@ export default {
}
},
)
.
catch
(
e
=>
{
.
catch
(
(
e
)
=>
{
Sentry
.
captureException
(
e
);
this
.
showErrors
();
this
.
loading
=
false
;
...
...
ee/app/assets/javascripts/security_configuration/dast_site_profiles_form/components/dast_site_profile_form.vue
View file @
d53974df
...
...
@@ -157,7 +157,7 @@ export default {
}
},
)
.
catch
(
exception
=>
{
.
catch
(
(
exception
)
=>
{
this
.
showErrors
({
message
:
errorMessage
});
this
.
captureException
(
exception
);
this
.
isLoading
=
false
;
...
...
ee/app/assets/javascripts/security_configuration/modules/configuration/actions.js
View file @
d53974df
...
...
@@ -12,11 +12,11 @@ export const fetchSecurityConfiguration = ({ commit, state }) => {
method
:
'
GET
'
,
url
:
state
.
securityConfigurationPath
,
})
.
then
(
response
=>
{
.
then
(
(
response
)
=>
{
const
{
data
}
=
response
;
commit
(
types
.
RECEIVE_SECURITY_CONFIGURATION_SUCCESS
,
data
);
})
.
catch
(
error
=>
{
.
catch
(
(
error
)
=>
{
Sentry
.
captureException
(
error
);
commit
(
types
.
RECEIVE_SECURITY_CONFIGURATION_ERROR
);
});
...
...
ee/app/assets/javascripts/security_configuration/sast/components/configuration_form.vue
View file @
d53974df
...
...
@@ -87,7 +87,7 @@ export default {
redirectTo
(
successPath
);
})
.
catch
(
error
=>
{
.
catch
(
(
error
)
=>
{
this
.
isSubmitting
=
false
;
this
.
hasSubmissionError
=
true
;
Sentry
.
captureException
(
error
);
...
...
@@ -101,7 +101,7 @@ export default {
};
},
onAnalyzerChange
(
name
,
updatedAnalyzer
)
{
const
index
=
this
.
analyzersConfiguration
.
findIndex
(
analyzer
=>
analyzer
.
name
===
name
);
const
index
=
this
.
analyzersConfiguration
.
findIndex
(
(
analyzer
)
=>
analyzer
.
name
===
name
);
if
(
index
===
-
1
)
{
return
;
}
...
...
ee/app/assets/javascripts/security_configuration/sast/components/dynamic_fields.vue
View file @
d53974df
...
...
@@ -16,7 +16,7 @@ export default {
entities
:
{
type
:
Array
,
required
:
true
,
validator
:
value
=>
value
.
every
(
isValidConfigurationEntity
),
validator
:
(
value
)
=>
value
.
every
(
isValidConfigurationEntity
),
},
disabled
:
{
type
:
Boolean
,
...
...
ee/app/assets/javascripts/security_configuration/sast/components/form_input.vue
View file @
d53974df
...
...
@@ -35,7 +35,7 @@ export default {
type
:
String
,
required
:
false
,
default
:
LARGE
,
validator
:
size
=>
Object
.
keys
(
SCHEMA_TO_PROP_SIZE_MAP
).
includes
(
size
),
validator
:
(
size
)
=>
Object
.
keys
(
SCHEMA_TO_PROP_SIZE_MAP
).
includes
(
size
),
},
label
:
{
type
:
String
,
...
...
ee/app/assets/javascripts/security_configuration/sast/components/utils.js
View file @
d53974df
const
isString
=
value
=>
typeof
value
===
'
string
'
;
const
isBoolean
=
value
=>
typeof
value
===
'
boolean
'
;
const
isString
=
(
value
)
=>
typeof
value
===
'
string
'
;
const
isBoolean
=
(
value
)
=>
typeof
value
===
'
boolean
'
;
export
const
isValidConfigurationEntity
=
object
=>
{
export
const
isValidConfigurationEntity
=
(
object
)
=>
{
if
(
object
==
null
)
{
return
false
;
}
...
...
@@ -18,7 +18,7 @@ export const isValidConfigurationEntity = object => {
);
};
export
const
isValidAnalyzerEntity
=
object
=>
{
export
const
isValidAnalyzerEntity
=
(
object
)
=>
{
if
(
object
==
null
)
{
return
false
;
}
...
...
ee/app/assets/javascripts/security_dashboard/components/filters/standard_filter.vue
View file @
d53974df
...
...
@@ -34,14 +34,14 @@ export default {
},
queryObject
()
{
// This is the object used to update the querystring.
return
{
[
this
.
filter
.
id
]:
this
.
selectedOptionsOrAll
.
map
(
x
=>
x
.
id
)
};
return
{
[
this
.
filter
.
id
]:
this
.
selectedOptionsOrAll
.
map
(
(
x
)
=>
x
.
id
)
};
},
filterObject
()
{
// This is the object used by the GraphQL query.
return
{
[
this
.
filter
.
id
]:
this
.
selectedOptions
.
map
(
x
=>
x
.
id
)
};
return
{
[
this
.
filter
.
id
]:
this
.
selectedOptions
.
map
(
(
x
)
=>
x
.
id
)
};
},
filteredOptions
()
{
return
this
.
filter
.
options
.
filter
(
option
=>
return
this
.
filter
.
options
.
filter
(
(
option
)
=>
option
.
name
.
toLowerCase
().
includes
(
this
.
searchTerm
.
toLowerCase
()),
);
},
...
...
@@ -50,7 +50,7 @@ export default {
return
Array
.
isArray
(
ids
)
?
ids
:
[
ids
];
},
routeQueryOptions
()
{
const
options
=
this
.
filter
.
options
.
filter
(
x
=>
this
.
routeQueryIds
.
includes
(
x
.
id
));
const
options
=
this
.
filter
.
options
.
filter
(
(
x
)
=>
this
.
routeQueryIds
.
includes
(
x
.
id
));
const
hasAllId
=
this
.
routeQueryIds
.
includes
(
this
.
filter
.
allOption
.
id
);
if
(
options
.
length
&&
!
hasAllId
)
{
...
...
ee/app/assets/javascripts/security_dashboard/components/first_class_group_security_dashboard_vulnerabilities.vue
View file @
d53974df
...
...
@@ -73,7 +73,7 @@ export default {
this
.
$apollo
.
queries
.
vulnerabilities
.
fetchMore
({
variables
:
{
after
:
this
.
pageInfo
.
endCursor
},
updateQuery
:
(
previousResult
,
{
fetchMoreResult
})
=>
{
const
results
=
produce
(
fetchMoreResult
,
draftData
=>
{
const
results
=
produce
(
fetchMoreResult
,
(
draftData
)
=>
{
// eslint-disable-next-line no-param-reassign
draftData
.
group
.
vulnerabilities
.
nodes
=
[
...
previousResult
.
group
.
vulnerabilities
.
nodes
,
...
...
ee/app/assets/javascripts/security_dashboard/components/first_class_instance_security_dashboard_vulnerabilities.vue
View file @
d53974df
...
...
@@ -69,7 +69,7 @@ export default {
this
.
$apollo
.
queries
.
vulnerabilities
.
fetchMore
({
variables
:
{
after
:
this
.
pageInfo
.
endCursor
},
updateQuery
:
(
previousResult
,
{
fetchMoreResult
})
=>
{
const
results
=
produce
(
fetchMoreResult
,
draftData
=>
{
const
results
=
produce
(
fetchMoreResult
,
(
draftData
)
=>
{
// eslint-disable-next-line no-param-reassign
draftData
.
vulnerabilities
.
nodes
=
[
...
previousResult
.
vulnerabilities
.
nodes
,
...
...
ee/app/assets/javascripts/security_dashboard/components/first_class_project_manager/project_manager.vue
View file @
d53974df
...
...
@@ -60,7 +60,7 @@ export default {
const
isProjectSelected
=
this
.
selectedProjects
.
some
(({
id
})
=>
id
===
project
.
id
);
if
(
isProjectSelected
)
{
this
.
selectedProjects
=
this
.
selectedProjects
.
filter
(
p
=>
p
.
id
!==
project
.
id
);
this
.
selectedProjects
=
this
.
selectedProjects
.
filter
(
(
p
)
=>
p
.
id
!==
project
.
id
);
}
else
{
this
.
selectedProjects
.
push
(
project
);
}
...
...
@@ -68,7 +68,7 @@ export default {
addProjects
()
{
this
.
$emit
(
'
handleProjectManipulation
'
,
true
);
const
addProjectsPromises
=
this
.
selectedProjects
.
map
(
project
=>
{
const
addProjectsPromises
=
this
.
selectedProjects
.
map
(
(
project
)
=>
{
return
this
.
$apollo
.
mutate
({
mutation
:
addProjectToSecurityDashboard
,
...
...
@@ -81,7 +81,7 @@ export default {
const
sourceData
=
store
.
readQuery
({
query
:
projectsQuery
});
const
newProject
=
results
.
addProjectToSecurityDashboard
.
project
;
const
data
=
produce
(
sourceData
,
draftData
=>
{
const
data
=
produce
(
sourceData
,
(
draftData
)
=>
{
// eslint-disable-next-line no-param-reassign
draftData
.
instanceSecurityDashboard
.
projects
.
nodes
=
[
...
draftData
.
instanceSecurityDashboard
.
projects
.
nodes
,
...
...
@@ -112,8 +112,8 @@ export default {
});
return
Promise
.
all
(
addProjectsPromises
)
.
then
(
response
=>
{
const
invalidProjects
=
response
.
filter
(
value
=>
value
.
error
);
.
then
(
(
response
)
=>
{
const
invalidProjects
=
response
.
filter
(
(
value
)
=>
value
.
error
);
this
.
$emit
(
'
handleProjectManipulation
'
,
false
);
if
(
invalidProjects
.
length
)
{
...
...
@@ -156,10 +156,10 @@ export default {
update
(
store
)
{
const
sourceData
=
store
.
readQuery
({
query
:
projectsQuery
});
const
data
=
produce
(
sourceData
,
draftData
=>
{
const
data
=
produce
(
sourceData
,
(
draftData
)
=>
{
// eslint-disable-next-line no-param-reassign
draftData
.
instanceSecurityDashboard
.
projects
.
nodes
=
draftData
.
instanceSecurityDashboard
.
projects
.
nodes
.
filter
(
curr
=>
curr
.
id
!==
id
,
(
curr
)
=>
curr
.
id
!==
id
,
);
});
...
...
@@ -188,7 +188,7 @@ export default {
}
return
this
.
searchProjects
(
this
.
searchQuery
,
this
.
pageInfo
)
.
then
(
payload
=>
{
.
then
(
(
payload
)
=>
{
const
{
data
:
{
projects
:
{
nodes
,
pageInfo
},
...
...
ee/app/assets/javascripts/security_dashboard/components/first_class_vulnerability_chart.vue
View file @
d53974df
...
...
@@ -53,7 +53,7 @@ export default {
SEVERITY_LEVELS
.
high
,
SEVERITY_LEVELS
.
medium
,
SEVERITY_LEVELS
.
low
,
].
map
(
l
=>
l
.
toLowerCase
()),
].
map
(
(
l
)
=>
l
.
toLowerCase
()),
apollo
:
{
vulnerabilitiesHistory
:
{
query
()
{
...
...
@@ -87,7 +87,7 @@ export default {
charts
()
{
const
{
severityLevels
}
=
this
.
$options
;
return
severityLevels
.
map
(
severityLevel
=>
{
return
severityLevels
.
map
(
(
severityLevel
)
=>
{
const
history
=
Object
.
entries
(
this
.
vulnerabilitiesHistory
[
severityLevel
]
||
{});
const
chartData
=
history
.
length
?
history
:
this
.
emptyDataSet
;
const
[
pastCount
,
currentCount
]
=
firstAndLastY
(
chartData
);
...
...
@@ -135,7 +135,7 @@ export default {
const
vulnerabilitiesData
=
vulnerabilitiesCountByDay
.
nodes
.
reduce
(
(
acc
,
v
)
=>
{
const
{
date
,
...
severities
}
=
v
;
Object
.
keys
(
severities
).
forEach
(
severity
=>
{
Object
.
keys
(
severities
).
forEach
(
(
severity
)
=>
{
acc
[
severity
]
=
acc
[
severity
]
||
{};
acc
[
severity
][
date
]
=
v
[
severity
];
},
{});
...
...
@@ -150,7 +150,7 @@ export default {
acc
[
severity
]
=
{};
Object
.
keys
(
vulnerabilitiesData
[
severity
])
.
sort
()
.
forEach
(
day
=>
{
.
forEach
(
(
day
)
=>
{
acc
[
severity
][
day
]
=
vulnerabilitiesData
[
severity
][
day
];
},
{});
...
...
ee/app/assets/javascripts/security_dashboard/components/first_class_vulnerability_severities.vue
View file @
d53974df
...
...
@@ -74,7 +74,7 @@ export default {
},
computed
:
{
severityGroups
()
{
return
SEVERITY_GROUPS
.
map
(
group
=>
({
return
SEVERITY_GROUPS
.
map
(
(
group
)
=>
({
...
group
,
projects
:
this
.
findProjectsForGroup
(
group
),
}));
...
...
@@ -86,7 +86,7 @@ export default {
return
[];
}
return
this
.
vulnerabilityGrades
[
group
.
type
].
map
(
project
=>
({
return
this
.
vulnerabilityGrades
[
group
.
type
].
map
(
(
project
)
=>
({
...
project
,
mostSevereVulnerability
:
this
.
findMostSevereVulnerabilityForGroup
(
project
,
group
),
}));
...
...
@@ -94,7 +94,7 @@ export default {
findMostSevereVulnerabilityForGroup
(
project
,
group
)
{
const
mostSevereVulnerability
=
{};
SEVERITY_LEVELS_ORDERED_BY_SEVERITY
.
some
(
level
=>
{
SEVERITY_LEVELS_ORDERED_BY_SEVERITY
.
some
(
(
level
)
=>
{
if
(
!
group
.
severityLevels
.
includes
(
level
))
{
return
false
;
}
...
...
ee/app/assets/javascripts/security_dashboard/components/loading_error.vue
View file @
d53974df
...
...
@@ -27,7 +27,7 @@ export default {
errorCode
:
{
type
:
Number
,
required
:
true
,
validator
:
value
=>
Object
.
values
(
ERROR_CODES
).
includes
(
value
),
validator
:
(
value
)
=>
Object
.
values
(
ERROR_CODES
).
includes
(
value
),
},
illustrations
:
{
type
:
Object
,
...
...
ee/app/assets/javascripts/security_dashboard/components/project_security_charts.vue
View file @
d53974df
...
...
@@ -90,11 +90,11 @@ export default {
},
}));
this
.
trendsByDay
.
forEach
(
trend
=>
{
this
.
trendsByDay
.
forEach
(
(
trend
)
=>
{
const
{
date
,
...
severities
}
=
trend
;
SEVERITIES
.
forEach
(({
key
})
=>
{
series
.
find
(
s
=>
s
.
key
===
key
).
data
.
push
([
date
,
severities
[
key
]]);
series
.
find
(
(
s
)
=>
s
.
key
===
key
).
data
.
push
([
date
,
severities
[
key
]]);
});
});
...
...
ee/app/assets/javascripts/security_dashboard/components/selection_summary.vue
View file @
d53974df
...
...
@@ -51,7 +51,7 @@ export default {
let
fulfilledCount
=
0
;
let
rejectedCount
=
0
;
const
promises
=
this
.
selectedVulnerabilities
.
map
(
vulnerability
=>
const
promises
=
this
.
selectedVulnerabilities
.
map
(
(
vulnerability
)
=>
this
.
$apollo
.
mutate
({
mutation
:
vulnerabilityDismiss
,
...
...
ee/app/assets/javascripts/security_dashboard/components/vulnerability_chart_buttons.vue
View file @
d53974df
...
...
@@ -19,7 +19,7 @@ export default {
},
computed
:
{
buttonContent
()
{
return
days
=>
n__
(
'
1 Day
'
,
'
%d Days
'
,
days
);
return
(
days
)
=>
n__
(
'
1 Day
'
,
'
%d Days
'
,
days
);
},
},
methods
:
{
...
...
ee/app/assets/javascripts/security_dashboard/components/vulnerability_count_list.vue
View file @
d53974df
...
...
@@ -12,7 +12,7 @@ export default {
scope
:
{
type
:
String
,
required
:
true
,
validator
:
value
=>
Object
.
values
(
vulnerabilitiesSeverityCountScopes
).
includes
(
value
),
validator
:
(
value
)
=>
Object
.
values
(
vulnerabilitiesSeverityCountScopes
).
includes
(
value
),
},
fullPath
:
{
type
:
String
,
...
...
ee/app/assets/javascripts/security_dashboard/components/vulnerability_count_list_layout.vue
View file @
d53974df
...
...
@@ -31,7 +31,7 @@ export default {
},
computed
:
{
counts
()
{
return
SEVERITIES
.
map
(
severity
=>
({
return
SEVERITIES
.
map
(
(
severity
)
=>
({
severity
,
count
:
this
.
vulnerabilitiesCount
[
severity
]
||
0
,
}));
...
...
ee/app/assets/javascripts/security_dashboard/components/vulnerability_list.vue
View file @
d53974df
...
...
@@ -97,7 +97,7 @@ export default {
// through the bulk update feature, but no longer matches the filters. For more details:
// https://gitlab.com/gitlab-org/gitlab/-/merge_requests/43468#note_420050017
filteredVulnerabilities
()
{
return
this
.
vulnerabilities
.
filter
(
x
=>
return
this
.
vulnerabilities
.
filter
(
(
x
)
=>
this
.
filters
.
state
?.
length
?
this
.
filters
.
state
.
includes
(
x
.
state
)
:
true
,
);
},
...
...
@@ -106,7 +106,7 @@ export default {
},
hasAnyScannersOtherThanGitLab
()
{
return
this
.
filteredVulnerabilities
.
some
(
v
=>
v
.
scanner
?.
vendor
!==
'
GitLab
'
&&
v
.
scanner
?.
vendor
!==
''
,
(
v
)
=>
v
.
scanner
?.
vendor
!==
'
GitLab
'
&&
v
.
scanner
?.
vendor
!==
''
,
);
},
notEnabledSecurityScanners
()
{
...
...
@@ -192,7 +192,7 @@ export default {
}
// Apply gl-bg-white! to every header.
baseFields
.
forEach
(
field
=>
{
baseFields
.
forEach
(
(
field
)
=>
{
field
.
thClass
=
[
field
.
thClass
,
'
gl-bg-white!
'
];
// eslint-disable-line no-param-reassign
});
...
...
@@ -204,9 +204,9 @@ export default {
this
.
selectedVulnerabilities
=
{};
},
filteredVulnerabilities
()
{
const
ids
=
new
Set
(
this
.
filteredVulnerabilities
.
map
(
v
=>
v
.
id
));
const
ids
=
new
Set
(
this
.
filteredVulnerabilities
.
map
(
(
v
)
=>
v
.
id
));
Object
.
keys
(
this
.
selectedVulnerabilities
).
forEach
(
vulnerabilityId
=>
{
Object
.
keys
(
this
.
selectedVulnerabilities
).
forEach
(
(
vulnerabilityId
)
=>
{
if
(
!
ids
.
has
(
vulnerabilityId
))
{
this
.
$delete
(
this
.
selectedVulnerabilities
,
vulnerabilityId
);
}
...
...
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