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
aa653d5a
Commit
aa653d5a
authored
Dec 23, 2020
by
Lukas Eipert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Run prettier on 32 files - 37 of 73
Part of our prettier migration; changing the arrow-parens style.
parent
96ed4677
Changes
33
Hide whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
71 additions
and
105 deletions
+71
-105
.prettierignore
.prettierignore
+0
-34
ee/app/assets/javascripts/epic/store/actions.js
ee/app/assets/javascripts/epic/store/actions.js
+4
-4
ee/app/assets/javascripts/epic/store/mutations.js
ee/app/assets/javascripts/epic/store/mutations.js
+3
-3
ee/app/assets/javascripts/epic/utils/epic_utils.js
ee/app/assets/javascripts/epic/utils/epic_utils.js
+2
-2
ee/app/assets/javascripts/event_tracking/navbar.js
ee/app/assets/javascripts/event_tracking/navbar.js
+3
-3
ee/app/assets/javascripts/filtered_search/dropdown_weight.js
ee/app/assets/javascripts/filtered_search/dropdown_weight.js
+2
-2
ee/app/assets/javascripts/filtered_search/filtered_search_manager.js
...ts/javascripts/filtered_search/filtered_search_manager.js
+1
-1
ee/app/assets/javascripts/filtered_search/issuable_filtered_search_token_keys.js
...ts/filtered_search/issuable_filtered_search_token_keys.js
+3
-3
ee/app/assets/javascripts/geo_node_form/components/geo_node_form_capacities.vue
...pts/geo_node_form/components/geo_node_form_capacities.vue
+1
-1
ee/app/assets/javascripts/geo_node_form/components/geo_node_form_namespaces.vue
...pts/geo_node_form/components/geo_node_form_namespaces.vue
+1
-1
ee/app/assets/javascripts/geo_node_form/components/geo_node_form_shards.vue
...scripts/geo_node_form/components/geo_node_form_shards.vue
+1
-1
ee/app/assets/javascripts/geo_node_form/store/actions.js
ee/app/assets/javascripts/geo_node_form/store/actions.js
+4
-4
ee/app/assets/javascripts/geo_node_form/store/getters.js
ee/app/assets/javascripts/geo_node_form/store/getters.js
+1
-1
ee/app/assets/javascripts/geo_node_form/validations.js
ee/app/assets/javascripts/geo_node_form/validations.js
+2
-2
ee/app/assets/javascripts/geo_nodes/components/app.vue
ee/app/assets/javascripts/geo_nodes/components/app.vue
+7
-7
ee/app/assets/javascripts/geo_nodes/components/node_detail_sections/node_details_section_main.vue
...onents/node_detail_sections/node_details_section_main.vue
+1
-1
ee/app/assets/javascripts/geo_nodes/store/geo_nodes_store.js
ee/app/assets/javascripts/geo_nodes/store/geo_nodes_store.js
+4
-4
ee/app/assets/javascripts/geo_replicable/graphql/replicable_type_query_builder.js
...s/geo_replicable/graphql/replicable_type_query_builder.js
+1
-1
ee/app/assets/javascripts/geo_replicable/store/actions.js
ee/app/assets/javascripts/geo_replicable/store/actions.js
+2
-2
ee/app/assets/javascripts/geo_replicable/store/getters.js
ee/app/assets/javascripts/geo_replicable/store/getters.js
+1
-1
ee/app/assets/javascripts/geo_replicable/store/index.js
ee/app/assets/javascripts/geo_replicable/store/index.js
+1
-1
ee/app/assets/javascripts/geo_settings/store/getters.js
ee/app/assets/javascripts/geo_settings/store/getters.js
+3
-3
ee/app/assets/javascripts/geo_settings/store/state.js
ee/app/assets/javascripts/geo_settings/store/state.js
+1
-1
ee/app/assets/javascripts/geo_settings/validations.js
ee/app/assets/javascripts/geo_settings/validations.js
+5
-5
ee/app/assets/javascripts/gfm_auto_complete.js
ee/app/assets/javascripts/gfm_auto_complete.js
+2
-2
ee/app/assets/javascripts/group_member_contributions/store/group_member_store.js
...ts/group_member_contributions/store/group_member_store.js
+4
-4
ee/app/assets/javascripts/groups/members/utils.js
ee/app/assets/javascripts/groups/members/utils.js
+1
-1
ee/app/assets/javascripts/groups/settings/access_restriction_field/validate_ip_address.js
.../settings/access_restriction_field/validate_ip_address.js
+1
-1
ee/app/assets/javascripts/groups/settings/compliance_frameworks/components/list.vue
...groups/settings/compliance_frameworks/components/list.vue
+1
-1
ee/app/assets/javascripts/groups/settings/compliance_frameworks/init_list.js
...cripts/groups/settings/compliance_frameworks/init_list.js
+1
-1
ee/app/assets/javascripts/groups/settings/components/comma_separated_list_token_selector.vue
...ttings/components/comma_separated_list_token_selector.vue
+1
-1
ee/app/assets/javascripts/insights/components/insights.vue
ee/app/assets/javascripts/insights/components/insights.vue
+4
-4
ee/app/assets/javascripts/insights/components/insights_chart.vue
...assets/javascripts/insights/components/insights_chart.vue
+2
-2
No files found.
.prettierignore
View file @
aa653d5a
...
@@ -1020,40 +1020,6 @@ ee/app/assets/javascripts/analytics/cycle_analytics/store/modules/duration_chart
...
@@ -1020,40 +1020,6 @@ ee/app/assets/javascripts/analytics/cycle_analytics/store/modules/duration_chart
ee/app/assets/javascripts/analytics/cycle_analytics/store/modules/type_of_work/actions.js
ee/app/assets/javascripts/analytics/cycle_analytics/store/modules/type_of_work/actions.js
ee/app/assets/javascripts/analytics/cycle_analytics/store/mutations.js
ee/app/assets/javascripts/analytics/cycle_analytics/store/mutations.js
## stoic-einstein
ee/app/assets/javascripts/epic/store/actions.js
ee/app/assets/javascripts/epic/store/mutations.js
ee/app/assets/javascripts/epic/utils/epic_utils.js
ee/app/assets/javascripts/event_tracking/navbar.js
ee/app/assets/javascripts/filtered_search/dropdown_weight.js
ee/app/assets/javascripts/filtered_search/filtered_search_manager.js
ee/app/assets/javascripts/filtered_search/issuable_filtered_search_token_keys.js
ee/app/assets/javascripts/geo_node_form/components/geo_node_form_capacities.vue
ee/app/assets/javascripts/geo_node_form/components/geo_node_form_namespaces.vue
ee/app/assets/javascripts/geo_node_form/components/geo_node_form_shards.vue
ee/app/assets/javascripts/geo_node_form/store/actions.js
ee/app/assets/javascripts/geo_node_form/store/getters.js
ee/app/assets/javascripts/geo_node_form/validations.js
ee/app/assets/javascripts/geo_nodes/components/app.vue
ee/app/assets/javascripts/geo_nodes/components/node_detail_sections/node_details_section_main.vue
ee/app/assets/javascripts/geo_nodes/store/geo_nodes_store.js
ee/app/assets/javascripts/geo_replicable/graphql/replicable_type_query_builder.js
ee/app/assets/javascripts/geo_replicable/store/actions.js
ee/app/assets/javascripts/geo_replicable/store/getters.js
ee/app/assets/javascripts/geo_replicable/store/index.js
ee/app/assets/javascripts/geo_settings/store/getters.js
ee/app/assets/javascripts/geo_settings/store/state.js
ee/app/assets/javascripts/geo_settings/validations.js
ee/app/assets/javascripts/gfm_auto_complete.js
ee/app/assets/javascripts/group_member_contributions/store/group_member_store.js
ee/app/assets/javascripts/groups/members/utils.js
ee/app/assets/javascripts/groups/settings/access_restriction_field/validate_ip_address.js
ee/app/assets/javascripts/groups/settings/compliance_frameworks/components/list.vue
ee/app/assets/javascripts/groups/settings/compliance_frameworks/init_list.js
ee/app/assets/javascripts/groups/settings/components/comma_separated_list_token_selector.vue
ee/app/assets/javascripts/insights/components/insights.vue
ee/app/assets/javascripts/insights/components/insights_chart.vue
## pedantic-noether
## pedantic-noether
ee/app/assets/javascripts/insights/stores/modules/insights/actions.js
ee/app/assets/javascripts/insights/stores/modules/insights/actions.js
ee/app/assets/javascripts/insights/stores/modules/insights/helpers.js
ee/app/assets/javascripts/insights/stores/modules/insights/helpers.js
...
...
ee/app/assets/javascripts/epic/store/actions.js
View file @
aa653d5a
...
@@ -29,7 +29,7 @@ export const fetchEpicDetails = ({ state, dispatch }) => {
...
@@ -29,7 +29,7 @@ export const fetchEpicDetails = ({ state, dispatch }) => {
variables
,
variables
,
})
})
.
then
(({
data
})
=>
{
.
then
(({
data
})
=>
{
const
participants
=
data
.
group
.
epic
.
participants
.
edges
.
map
(
participant
=>
({
const
participants
=
data
.
group
.
epic
.
participants
.
edges
.
map
(
(
participant
)
=>
({
name
:
participant
.
node
.
name
,
name
:
participant
.
node
.
name
,
avatar_url
:
participant
.
node
.
avatarUrl
,
avatar_url
:
participant
.
node
.
avatarUrl
,
web_url
:
participant
.
node
.
webUrl
,
web_url
:
participant
.
node
.
webUrl
,
...
@@ -218,7 +218,7 @@ export const updateConfidentialityOnIssuable = ({ state, commit }, { confidentia
...
@@ -218,7 +218,7 @@ export const updateConfidentialityOnIssuable = ({ state, commit }, { confidentia
throw
errMsg
;
throw
errMsg
;
}
}
})
})
.
catch
(
error
=>
{
.
catch
(
(
error
)
=>
{
flash
(
error
);
flash
(
error
);
throw
error
;
throw
error
;
});
});
...
@@ -235,8 +235,8 @@ export const receiveEpicLabelsSelectFailure = ({ commit }) => {
...
@@ -235,8 +235,8 @@ export const receiveEpicLabelsSelectFailure = ({ commit }) => {
flash
(
s__
(
'
Epics|An error occurred while updating labels.
'
));
flash
(
s__
(
'
Epics|An error occurred while updating labels.
'
));
};
};
export
const
updateEpicLabels
=
({
dispatch
,
state
},
labels
)
=>
{
export
const
updateEpicLabels
=
({
dispatch
,
state
},
labels
)
=>
{
const
addLabelIds
=
labels
.
filter
(
label
=>
label
.
set
).
map
(
label
=>
label
.
id
);
const
addLabelIds
=
labels
.
filter
(
(
label
)
=>
label
.
set
).
map
((
label
)
=>
label
.
id
);
const
removeLabelIds
=
labels
.
filter
(
label
=>
!
label
.
set
).
map
(
label
=>
label
.
id
);
const
removeLabelIds
=
labels
.
filter
(
(
label
)
=>
!
label
.
set
).
map
((
label
)
=>
label
.
id
);
const
updateEpicInput
=
{
const
updateEpicInput
=
{
iid
:
`
${
state
.
epicIid
}
`
,
iid
:
`
${
state
.
epicIid
}
`
,
groupPath
:
state
.
fullPath
,
groupPath
:
state
.
fullPath
,
...
...
ee/app/assets/javascripts/epic/store/mutations.js
View file @
aa653d5a
...
@@ -110,9 +110,9 @@ export default {
...
@@ -110,9 +110,9 @@ export default {
state
.
epicLabelsSelectInProgress
=
true
;
state
.
epicLabelsSelectInProgress
=
true
;
},
},
[
types
.
RECEIVE_EPIC_LABELS_SELECT_SUCCESS
](
state
,
labels
)
{
[
types
.
RECEIVE_EPIC_LABELS_SELECT_SUCCESS
](
state
,
labels
)
{
const
addedLabels
=
labels
.
filter
(
label
=>
label
.
set
);
const
addedLabels
=
labels
.
filter
(
(
label
)
=>
label
.
set
);
const
removeLabelIds
=
labels
.
filter
(
label
=>
!
label
.
set
).
map
(
label
=>
label
.
id
);
const
removeLabelIds
=
labels
.
filter
(
(
label
)
=>
!
label
.
set
).
map
((
label
)
=>
label
.
id
);
const
updatedLabels
=
state
.
labels
.
filter
(
label
=>
!
removeLabelIds
.
includes
(
label
.
id
));
const
updatedLabels
=
state
.
labels
.
filter
(
(
label
)
=>
!
removeLabelIds
.
includes
(
label
.
id
));
updatedLabels
.
push
(...
addedLabels
);
updatedLabels
.
push
(...
addedLabels
);
state
.
epicLabelsSelectInProgress
=
false
;
state
.
epicLabelsSelectInProgress
=
false
;
...
...
ee/app/assets/javascripts/epic/utils/epic_utils.js
View file @
aa653d5a
...
@@ -24,7 +24,7 @@ const bindDocumentEvent = (eventName, callback) => {
...
@@ -24,7 +24,7 @@ const bindDocumentEvent = (eventName, callback) => {
$
(
document
).
on
(
eventName
,
callback
);
$
(
document
).
on
(
eventName
,
callback
);
};
};
const
toggleContainerClass
=
className
=>
{
const
toggleContainerClass
=
(
className
)
=>
{
const
containerEl
=
document
.
querySelector
(
'
.page-with-contextual-sidebar
'
);
const
containerEl
=
document
.
querySelector
(
'
.page-with-contextual-sidebar
'
);
if
(
containerEl
)
{
if
(
containerEl
)
{
...
@@ -34,7 +34,7 @@ const toggleContainerClass = className => {
...
@@ -34,7 +34,7 @@ const toggleContainerClass = className => {
const
getCollapsedGutter
=
()
=>
parseBoolean
(
Cookies
.
get
(
'
collapsed_gutter
'
));
const
getCollapsedGutter
=
()
=>
parseBoolean
(
Cookies
.
get
(
'
collapsed_gutter
'
));
const
setCollapsedGutter
=
value
=>
Cookies
.
set
(
'
collapsed_gutter
'
,
value
);
const
setCollapsedGutter
=
(
value
)
=>
Cookies
.
set
(
'
collapsed_gutter
'
,
value
);
const
getDateValidity
=
(
startDateTime
,
dueDateTime
)
=>
{
const
getDateValidity
=
(
startDateTime
,
dueDateTime
)
=>
{
// If both dates are defined
// If both dates are defined
...
...
ee/app/assets/javascripts/event_tracking/navbar.js
View file @
aa653d5a
...
@@ -9,7 +9,7 @@ const NAVSOURCE_VALUE = 'navbar';
...
@@ -9,7 +9,7 @@ const NAVSOURCE_VALUE = 'navbar';
* intercepts clicks on navbar links
* intercepts clicks on navbar links
* and adds the 'nav_source=navbar' query parameter
* and adds the 'nav_source=navbar' query parameter
*/
*/
const
appendLinkParam
=
e
=>
{
const
appendLinkParam
=
(
e
)
=>
{
const
target
=
e
.
currentTarget
;
const
target
=
e
.
currentTarget
;
// get closest link in case the target is a wrapping DOM node
// get closest link in case the target is a wrapping DOM node
...
@@ -28,8 +28,8 @@ export default function trackNavbarEvents() {
...
@@ -28,8 +28,8 @@ export default function trackNavbarEvents() {
if
(
!
navbar
)
return
;
if
(
!
navbar
)
return
;
// track search inputs within frequent-items component
// track search inputs within frequent-items component
navbar
.
querySelectorAll
(
`.frequent-items-dropdown-container input`
).
forEach
(
el
=>
{
navbar
.
querySelectorAll
(
`.frequent-items-dropdown-container input`
).
forEach
(
(
el
)
=>
{
el
.
addEventListener
(
'
click
'
,
e
=>
{
el
.
addEventListener
(
'
click
'
,
(
e
)
=>
{
const
parentDropdown
=
e
.
currentTarget
.
closest
(
'
li.dropdown
'
);
const
parentDropdown
=
e
.
currentTarget
.
closest
(
'
li.dropdown
'
);
Tracking
.
event
(
TRACKING_CATEGORY
,
'
activate_form_input
'
,
{
Tracking
.
event
(
TRACKING_CATEGORY
,
'
activate_form_input
'
,
{
...
...
ee/app/assets/javascripts/filtered_search/dropdown_weight.js
View file @
aa653d5a
...
@@ -16,7 +16,7 @@ export default class DropdownWeight extends FilteredSearchDropdown {
...
@@ -16,7 +16,7 @@ export default class DropdownWeight extends FilteredSearchDropdown {
}
}
itemClicked
(
e
)
{
itemClicked
(
e
)
{
super
.
itemClicked
(
e
,
selected
=>
{
super
.
itemClicked
(
e
,
(
selected
)
=>
{
const
title
=
selected
.
querySelector
(
'
.js-data-value
'
).
innerText
.
trim
();
const
title
=
selected
.
querySelector
(
'
.js-data-value
'
).
innerText
.
trim
();
return
`
${
DropdownUtils
.
getEscapedText
(
title
)}
`
;
return
`
${
DropdownUtils
.
getEscapedText
(
title
)}
`
;
});
});
...
@@ -25,7 +25,7 @@ export default class DropdownWeight extends FilteredSearchDropdown {
...
@@ -25,7 +25,7 @@ export default class DropdownWeight extends FilteredSearchDropdown {
renderContent
(
forceShowList
=
false
)
{
renderContent
(
forceShowList
=
false
)
{
this
.
droplab
.
changeHookList
(
this
.
hookId
,
this
.
dropdown
,
[
CustomNumber
],
this
.
config
);
this
.
droplab
.
changeHookList
(
this
.
hookId
,
this
.
dropdown
,
[
CustomNumber
],
this
.
config
);
const
defaultDropdownOptions
=
this
.
defaultOptions
.
map
(
o
=>
({
id
:
o
,
title
:
o
}));
const
defaultDropdownOptions
=
this
.
defaultOptions
.
map
(
(
o
)
=>
({
id
:
o
,
title
:
o
}));
this
.
droplab
.
setData
(
defaultDropdownOptions
);
this
.
droplab
.
setData
(
defaultDropdownOptions
);
super
.
renderContent
(
forceShowList
);
super
.
renderContent
(
forceShowList
);
...
...
ee/app/assets/javascripts/filtered_search/filtered_search_manager.js
View file @
aa653d5a
...
@@ -6,7 +6,7 @@ export default class extends FilteredSearchManager {
...
@@ -6,7 +6,7 @@ export default class extends FilteredSearchManager {
const
{
tokens
,
...
rest
}
=
super
.
getSearchTokens
();
const
{
tokens
,
...
rest
}
=
super
.
getSearchTokens
();
const
hasEqualsToEpicIdToken
=
tokens
.
some
(
const
hasEqualsToEpicIdToken
=
tokens
.
some
(
token
=>
(
token
)
=>
token
?.
key
===
epicTokenKey
.
key
&&
token
?.
key
===
epicTokenKey
.
key
&&
token
?.
operator
===
'
=
'
&&
token
?.
operator
===
'
=
'
&&
!
Number
.
isNaN
(
Number
(
token
?.
value
)),
!
Number
.
isNaN
(
Number
(
token
?.
value
)),
...
...
ee/app/assets/javascripts/filtered_search/issuable_filtered_search_token_keys.js
View file @
aa653d5a
...
@@ -120,7 +120,7 @@ export const iterationConditions = [
...
@@ -120,7 +120,7 @@ export const iterationConditions = [
*/
*/
class
IssuesFilteredSearchTokenKeysEE
extends
FilteredSearchTokenKeys
{
class
IssuesFilteredSearchTokenKeysEE
extends
FilteredSearchTokenKeys
{
constructor
()
{
constructor
()
{
const
milestoneTokenKeyIndex
=
tokenKeys
.
findIndex
(
tk
=>
tk
.
key
===
'
milestone
'
);
const
milestoneTokenKeyIndex
=
tokenKeys
.
findIndex
(
(
tk
)
=>
tk
.
key
===
'
milestone
'
);
tokenKeys
.
splice
(
milestoneTokenKeyIndex
+
1
,
0
,
iterationTokenKey
);
tokenKeys
.
splice
(
milestoneTokenKeyIndex
+
1
,
0
,
iterationTokenKey
);
super
([...
tokenKeys
,
epicTokenKey
,
weightTokenKey
],
alternativeTokenKeys
,
[
super
([...
tokenKeys
,
epicTokenKey
,
weightTokenKey
],
alternativeTokenKeys
,
[
...
@@ -135,7 +135,7 @@ class IssuesFilteredSearchTokenKeysEE extends FilteredSearchTokenKeys {
...
@@ -135,7 +135,7 @@ class IssuesFilteredSearchTokenKeysEE extends FilteredSearchTokenKeys {
* Changes assignee token to accept multiple values.
* Changes assignee token to accept multiple values.
*/
*/
enableMultipleAssignees
()
{
enableMultipleAssignees
()
{
const
assigneeTokenKey
=
this
.
tokenKeys
.
find
(
tk
=>
tk
.
key
===
'
assignee
'
);
const
assigneeTokenKey
=
this
.
tokenKeys
.
find
(
(
tk
)
=>
tk
.
key
===
'
assignee
'
);
// Add the original as an alternative token key
// Add the original as an alternative token key
this
.
tokenKeysWithAlternative
.
push
({
...
assigneeTokenKey
});
this
.
tokenKeysWithAlternative
.
push
({
...
assigneeTokenKey
});
...
@@ -153,7 +153,7 @@ class IssuesFilteredSearchTokenKeysEE extends FilteredSearchTokenKeys {
...
@@ -153,7 +153,7 @@ class IssuesFilteredSearchTokenKeysEE extends FilteredSearchTokenKeys {
}
}
removeToken
(
tokenKey
)
{
removeToken
(
tokenKey
)
{
const
index
=
this
.
tokenKeys
.
findIndex
(
token
=>
token
.
key
===
tokenKey
.
key
);
const
index
=
this
.
tokenKeys
.
findIndex
(
(
token
)
=>
token
.
key
===
tokenKey
.
key
);
if
(
index
>=
0
)
{
if
(
index
>=
0
)
{
this
.
tokenKeys
.
splice
(
index
,
1
);
this
.
tokenKeys
.
splice
(
index
,
1
);
}
}
...
...
ee/app/assets/javascripts/geo_node_form/components/geo_node_form_capacities.vue
View file @
aa653d5a
...
@@ -57,7 +57,7 @@ export default {
...
@@ -57,7 +57,7 @@ export default {
computed
:
{
computed
:
{
...
mapState
([
'
formErrors
'
]),
...
mapState
([
'
formErrors
'
]),
visibleFormGroups
()
{
visibleFormGroups
()
{
return
this
.
formGroups
.
filter
(
group
=>
{
return
this
.
formGroups
.
filter
(
(
group
)
=>
{
if
(
group
.
conditional
)
{
if
(
group
.
conditional
)
{
return
this
.
nodeData
.
primary
return
this
.
nodeData
.
primary
?
group
.
conditional
===
'
primary
'
?
group
.
conditional
===
'
primary
'
...
...
ee/app/assets/javascripts/geo_node_form/components/geo_node_form_namespaces.vue
View file @
aa653d5a
...
@@ -32,7 +32,7 @@ export default {
...
@@ -32,7 +32,7 @@ export default {
methods
:
{
methods
:
{
...
mapActions
([
'
fetchSyncNamespaces
'
]),
...
mapActions
([
'
fetchSyncNamespaces
'
]),
toggleNamespace
(
namespace
)
{
toggleNamespace
(
namespace
)
{
const
index
=
this
.
selectedNamespaces
.
findIndex
(
id
=>
id
===
namespace
.
id
);
const
index
=
this
.
selectedNamespaces
.
findIndex
(
(
id
)
=>
id
===
namespace
.
id
);
if
(
index
>
-
1
)
{
if
(
index
>
-
1
)
{
this
.
$emit
(
'
removeSyncOption
'
,
{
key
:
SELECTIVE_SYNC_NAMESPACES
,
index
});
this
.
$emit
(
'
removeSyncOption
'
,
{
key
:
SELECTIVE_SYNC_NAMESPACES
,
index
});
}
else
{
}
else
{
...
...
ee/app/assets/javascripts/geo_node_form/components/geo_node_form_shards.vue
View file @
aa653d5a
...
@@ -34,7 +34,7 @@ export default {
...
@@ -34,7 +34,7 @@ export default {
},
},
methods
:
{
methods
:
{
toggleShard
(
shard
)
{
toggleShard
(
shard
)
{
const
index
=
this
.
selectedShards
.
findIndex
(
value
=>
value
===
shard
.
value
);
const
index
=
this
.
selectedShards
.
findIndex
(
(
value
)
=>
value
===
shard
.
value
);
if
(
index
>
-
1
)
{
if
(
index
>
-
1
)
{
this
.
$emit
(
'
removeSyncOption
'
,
{
key
:
SELECTIVE_SYNC_SHARDS
,
index
});
this
.
$emit
(
'
removeSyncOption
'
,
{
key
:
SELECTIVE_SYNC_SHARDS
,
index
});
}
else
{
}
else
{
...
...
ee/app/assets/javascripts/geo_node_form/store/actions.js
View file @
aa653d5a
...
@@ -6,13 +6,13 @@ import { convertObjectPropsToSnakeCase } from '~/lib/utils/common_utils';
...
@@ -6,13 +6,13 @@ import { convertObjectPropsToSnakeCase } from '~/lib/utils/common_utils';
import
{
__
}
from
'
~/locale
'
;
import
{
__
}
from
'
~/locale
'
;
import
*
as
types
from
'
./mutation_types
'
;
import
*
as
types
from
'
./mutation_types
'
;
const
getSaveErrorMessageParts
=
messages
=>
{
const
getSaveErrorMessageParts
=
(
messages
)
=>
{
return
flatten
(
return
flatten
(
Object
.
entries
(
messages
||
{}).
map
(([
key
,
value
])
=>
value
.
map
(
x
=>
`
${
key
}
${
x
}
`
)),
Object
.
entries
(
messages
||
{}).
map
(([
key
,
value
])
=>
value
.
map
(
(
x
)
=>
`
${
key
}
${
x
}
`
)),
);
);
};
};
const
getSaveErrorMessage
=
messages
=>
{
const
getSaveErrorMessage
=
(
messages
)
=>
{
const
parts
=
getSaveErrorMessageParts
(
messages
);
const
parts
=
getSaveErrorMessageParts
(
messages
);
return
`
${
__
(
'
Errors:
'
)}
${
parts
.
join
(
'
,
'
)}
`
;
return
`
${
__
(
'
Errors:
'
)}
${
parts
.
join
(
'
,
'
)}
`
;
};
};
...
@@ -29,7 +29,7 @@ export const fetchSyncNamespaces = ({ dispatch }, search) => {
...
@@ -29,7 +29,7 @@ export const fetchSyncNamespaces = ({ dispatch }, search) => {
dispatch
(
'
requestSyncNamespaces
'
);
dispatch
(
'
requestSyncNamespaces
'
);
Api
.
groups
(
search
)
Api
.
groups
(
search
)
.
then
(
res
=>
{
.
then
(
(
res
)
=>
{
dispatch
(
'
receiveSyncNamespacesSuccess
'
,
res
);
dispatch
(
'
receiveSyncNamespacesSuccess
'
,
res
);
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
...
...
ee/app/assets/javascripts/geo_node_form/store/getters.js
View file @
aa653d5a
export
const
formHasError
=
state
=>
Object
.
values
(
state
.
formErrors
).
some
(
val
=>
Boolean
(
val
));
export
const
formHasError
=
(
state
)
=>
Object
.
values
(
state
.
formErrors
).
some
((
val
)
=>
Boolean
(
val
));
ee/app/assets/javascripts/geo_node_form/validations.js
View file @
aa653d5a
import
{
sprintf
,
s__
}
from
'
~/locale
'
;
import
{
sprintf
,
s__
}
from
'
~/locale
'
;
import
{
isSafeURL
}
from
'
~/lib/utils/url_utility
'
;
import
{
isSafeURL
}
from
'
~/lib/utils/url_utility
'
;
export
const
validateName
=
data
=>
{
export
const
validateName
=
(
data
)
=>
{
if
(
!
data
)
{
if
(
!
data
)
{
return
s__
(
"
Geo|Node name can't be blank
"
);
return
s__
(
"
Geo|Node name can't be blank
"
);
}
else
if
(
data
.
length
>
255
)
{
}
else
if
(
data
.
length
>
255
)
{
...
@@ -11,7 +11,7 @@ export const validateName = data => {
...
@@ -11,7 +11,7 @@ export const validateName = data => {
return
''
;
return
''
;
};
};
export
const
validateUrl
=
data
=>
{
export
const
validateUrl
=
(
data
)
=>
{
if
(
!
data
)
{
if
(
!
data
)
{
return
s__
(
"
Geo|URL can't be blank
"
);
return
s__
(
"
Geo|URL can't be blank
"
);
}
else
if
(
!
isSafeURL
(
data
))
{
}
else
if
(
!
isSafeURL
(
data
))
{
...
...
ee/app/assets/javascripts/geo_nodes/components/app.vue
View file @
aa653d5a
...
@@ -89,8 +89,8 @@ export default {
...
@@ -89,8 +89,8 @@ export default {
fetchGeoNodes
()
{
fetchGeoNodes
()
{
return
this
.
service
return
this
.
service
.
getGeoNodes
()
.
getGeoNodes
()
.
then
(
res
=>
res
.
data
)
.
then
(
(
res
)
=>
res
.
data
)
.
then
(
nodes
=>
{
.
then
(
(
nodes
)
=>
{
this
.
store
.
setNodes
(
nodes
);
this
.
store
.
setNodes
(
nodes
);
this
.
isLoading
=
false
;
this
.
isLoading
=
false
;
})
})
...
@@ -103,8 +103,8 @@ export default {
...
@@ -103,8 +103,8 @@ export default {
const
nodeId
=
node
.
id
;
const
nodeId
=
node
.
id
;
return
this
.
service
return
this
.
service
.
getGeoNodeDetails
(
node
)
.
getGeoNodeDetails
(
node
)
.
then
(
res
=>
res
.
data
)
.
then
(
(
res
)
=>
res
.
data
)
.
then
(
nodeDetails
=>
{
.
then
(
(
nodeDetails
)
=>
{
const
primaryNodeVersion
=
this
.
store
.
getPrimaryNodeVersion
();
const
primaryNodeVersion
=
this
.
store
.
getPrimaryNodeVersion
();
const
updatedNodeDetails
=
Object
.
assign
(
nodeDetails
,
{
const
updatedNodeDetails
=
Object
.
assign
(
nodeDetails
,
{
primaryVersion
:
primaryNodeVersion
.
version
,
primaryVersion
:
primaryNodeVersion
.
version
,
...
@@ -113,7 +113,7 @@ export default {
...
@@ -113,7 +113,7 @@ export default {
this
.
store
.
setNodeDetails
(
nodeId
,
updatedNodeDetails
);
this
.
store
.
setNodeDetails
(
nodeId
,
updatedNodeDetails
);
eventHub
.
$emit
(
'
nodeDetailsLoaded
'
,
this
.
store
.
getNodeDetails
(
nodeId
));
eventHub
.
$emit
(
'
nodeDetailsLoaded
'
,
this
.
store
.
getNodeDetails
(
nodeId
));
})
})
.
catch
(
err
=>
{
.
catch
(
(
err
)
=>
{
this
.
store
.
setNodeDetails
(
nodeId
,
{
this
.
store
.
setNodeDetails
(
nodeId
,
{
geo_node_id
:
nodeId
,
geo_node_id
:
nodeId
,
health
:
err
.
message
,
health
:
err
.
message
,
...
@@ -142,8 +142,8 @@ export default {
...
@@ -142,8 +142,8 @@ export default {
this
.
setNodeActionStatus
(
targetNode
,
true
);
this
.
setNodeActionStatus
(
targetNode
,
true
);
return
this
.
service
return
this
.
service
.
toggleNode
(
targetNode
)
.
toggleNode
(
targetNode
)
.
then
(
res
=>
res
.
data
)
.
then
(
(
res
)
=>
res
.
data
)
.
then
(
node
=>
{
.
then
(
(
node
)
=>
{
Object
.
assign
(
targetNode
,
{
Object
.
assign
(
targetNode
,
{
enabled
:
node
.
enabled
,
enabled
:
node
.
enabled
,
nodeActionActive
:
false
,
nodeActionActive
:
false
,
...
...
ee/app/assets/javascripts/geo_nodes/components/node_detail_sections/node_details_section_main.vue
View file @
aa653d5a
...
@@ -61,7 +61,7 @@ export default {
...
@@ -61,7 +61,7 @@ export default {
if
(
selectiveSyncType
===
'
namespaces
'
)
{
if
(
selectiveSyncType
===
'
namespaces
'
)
{
return
sprintf
(
__
(
'
Groups (%{groups})
'
),
{
return
sprintf
(
__
(
'
Groups (%{groups})
'
),
{
groups
:
this
.
nodeDetails
.
namespaces
.
map
(
n
=>
n
.
full_path
).
join
(
'
,
'
),
groups
:
this
.
nodeDetails
.
namespaces
.
map
(
(
n
)
=>
n
.
full_path
).
join
(
'
,
'
),
});
});
}
}
...
...
ee/app/assets/javascripts/geo_nodes/store/geo_nodes_store.js
View file @
aa653d5a
...
@@ -11,7 +11,7 @@ export default class GeoNodesStore {
...
@@ -11,7 +11,7 @@ export default class GeoNodesStore {
}
}
setNodes
(
nodes
)
{
setNodes
(
nodes
)
{
this
.
state
.
nodes
=
nodes
.
map
(
node
=>
GeoNodesStore
.
formatNode
(
node
));
this
.
state
.
nodes
=
nodes
.
map
(
(
node
)
=>
GeoNodesStore
.
formatNode
(
node
));
}
}
getNodes
()
{
getNodes
()
{
...
@@ -67,7 +67,7 @@ export default class GeoNodesStore {
...
@@ -67,7 +67,7 @@ export default class GeoNodesStore {
}
}
static
formatNodeDetails
(
rawNodeDetails
,
replicableTypes
)
{
static
formatNodeDetails
(
rawNodeDetails
,
replicableTypes
)
{
const
syncStatuses
=
replicableTypes
.
map
(
replicable
=>
{
const
syncStatuses
=
replicableTypes
.
map
(
(
replicable
)
=>
{
return
{
return
{
itemEnabled
:
rawNodeDetails
[
`
${
replicable
.
namePlural
}
_replication_enabled`
],
itemEnabled
:
rawNodeDetails
[
`
${
replicable
.
namePlural
}
_replication_enabled`
],
itemTitle
:
replicable
.
titlePlural
,
itemTitle
:
replicable
.
titlePlural
,
...
@@ -87,7 +87,7 @@ export default class GeoNodesStore {
...
@@ -87,7 +87,7 @@ export default class GeoNodesStore {
});
});
// Adds replicable to array as long as value is defined
// Adds replicable to array as long as value is defined
const
verificationStatuses
=
syncStatuses
.
filter
(
s
=>
const
verificationStatuses
=
syncStatuses
.
filter
(
(
s
)
=>
Boolean
(
Boolean
(
!
isNil
(
s
.
itemValue
.
verificationSuccessCount
)
||
!
isNil
(
s
.
itemValue
.
verificationSuccessCount
)
||
!
isNil
(
s
.
itemValue
.
verificationFailureCount
),
!
isNil
(
s
.
itemValue
.
verificationFailureCount
),
...
@@ -95,7 +95,7 @@ export default class GeoNodesStore {
...
@@ -95,7 +95,7 @@ export default class GeoNodesStore {
);
);
// Adds replicable to array as long as value is defined
// Adds replicable to array as long as value is defined
const
checksumStatuses
=
syncStatuses
.
filter
(
s
=>
const
checksumStatuses
=
syncStatuses
.
filter
(
(
s
)
=>
Boolean
(
!
isNil
(
s
.
itemValue
.
checksumSuccessCount
)
||
!
isNil
(
s
.
itemValue
.
checksumFailureCount
)),
Boolean
(
!
isNil
(
s
.
itemValue
.
checksumSuccessCount
)
||
!
isNil
(
s
.
itemValue
.
checksumFailureCount
)),
);
);
...
...
ee/app/assets/javascripts/geo_replicable/graphql/replicable_type_query_builder.js
View file @
aa653d5a
import
gql
from
'
graphql-tag
'
;
import
gql
from
'
graphql-tag
'
;
import
PageInfo
from
'
~/graphql_shared/fragments/pageInfo.fragment.graphql
'
;
import
PageInfo
from
'
~/graphql_shared/fragments/pageInfo.fragment.graphql
'
;
export
default
graphQlFieldName
=>
{
export
default
(
graphQlFieldName
)
=>
{
return
gql
`
return
gql
`
query($first: Int, $last: Int, $before: String!, $after: String!) {
query($first: Int, $last: Int, $before: String!, $after: String!) {
geoNode {
geoNode {
...
...
ee/app/assets/javascripts/geo_replicable/store/actions.js
View file @
aa653d5a
...
@@ -54,7 +54,7 @@ export const fetchReplicableItemsGraphQl = ({ state, dispatch }, direction) => {
...
@@ -54,7 +54,7 @@ export const fetchReplicableItemsGraphQl = ({ state, dispatch }, direction) => {
query
:
buildReplicableTypeQuery
(
state
.
graphqlFieldName
),
query
:
buildReplicableTypeQuery
(
state
.
graphqlFieldName
),
variables
:
{
first
,
last
,
before
,
after
},
variables
:
{
first
,
last
,
before
,
after
},
})
})
.
then
(
res
=>
{
.
then
(
(
res
)
=>
{
if
(
!
res
.
data
.
geoNode
||
!
(
state
.
graphqlFieldName
in
res
.
data
.
geoNode
))
{
if
(
!
res
.
data
.
geoNode
||
!
(
state
.
graphqlFieldName
in
res
.
data
.
geoNode
))
{
dispatch
(
'
receiveReplicableItemsSuccess
'
,
{
data
:
[],
pagination
:
null
});
dispatch
(
'
receiveReplicableItemsSuccess
'
,
{
data
:
[],
pagination
:
null
});
return
;
return
;
...
@@ -86,7 +86,7 @@ export const fetchReplicableItemsRestful = ({ state, dispatch }) => {
...
@@ -86,7 +86,7 @@ export const fetchReplicableItemsRestful = ({ state, dispatch }) => {
};
};
Api
.
getGeoReplicableItems
(
state
.
replicableType
,
query
)
Api
.
getGeoReplicableItems
(
state
.
replicableType
,
query
)
.
then
(
res
=>
{
.
then
(
(
res
)
=>
{
const
normalizedHeaders
=
normalizeHeaders
(
res
.
headers
);
const
normalizedHeaders
=
normalizeHeaders
(
res
.
headers
);
const
pagination
=
parseIntPagination
(
normalizedHeaders
);
const
pagination
=
parseIntPagination
(
normalizedHeaders
);
const
data
=
convertObjectPropsToCamelCase
(
res
.
data
,
{
deep
:
true
});
const
data
=
convertObjectPropsToCamelCase
(
res
.
data
,
{
deep
:
true
});
...
...
ee/app/assets/javascripts/geo_replicable/store/getters.js
View file @
aa653d5a
export
const
replicableTypeName
=
state
=>
state
.
replicableType
.
split
(
'
_
'
).
join
(
'
'
);
export
const
replicableTypeName
=
(
state
)
=>
state
.
replicableType
.
split
(
'
_
'
).
join
(
'
'
);
ee/app/assets/javascripts/geo_replicable/store/index.js
View file @
aa653d5a
...
@@ -14,5 +14,5 @@ export const getStoreConfig = ({ replicableType, graphqlFieldName }) => ({
...
@@ -14,5 +14,5 @@ export const getStoreConfig = ({ replicableType, graphqlFieldName }) => ({
state
:
createState
({
replicableType
,
graphqlFieldName
}),
state
:
createState
({
replicableType
,
graphqlFieldName
}),
});
});
const
createStore
=
config
=>
new
Vuex
.
Store
(
getStoreConfig
(
config
));
const
createStore
=
(
config
)
=>
new
Vuex
.
Store
(
getStoreConfig
(
config
));
export
default
createStore
;
export
default
createStore
;
ee/app/assets/javascripts/geo_settings/store/getters.js
View file @
aa653d5a
export
const
formHasError
=
state
=>
export
const
formHasError
=
(
state
)
=>
Object
.
keys
(
state
.
formErrors
)
Object
.
keys
(
state
.
formErrors
)
.
map
(
key
=>
state
.
formErrors
[
key
])
.
map
(
(
key
)
=>
state
.
formErrors
[
key
])
.
some
(
val
=>
Boolean
(
val
));
.
some
(
(
val
)
=>
Boolean
(
val
));
ee/app/assets/javascripts/geo_settings/store/state.js
View file @
aa653d5a
...
@@ -5,6 +5,6 @@ export default () => ({
...
@@ -5,6 +5,6 @@ export default () => ({
timeout
:
DEFAULT_TIMEOUT
,
timeout
:
DEFAULT_TIMEOUT
,
allowedIp
:
DEFAULT_ALLOWED_IP
,
allowedIp
:
DEFAULT_ALLOWED_IP
,
formErrors
:
Object
.
keys
(
FORM_VALIDATION_FIELDS
)
formErrors
:
Object
.
keys
(
FORM_VALIDATION_FIELDS
)
.
map
(
key
=>
FORM_VALIDATION_FIELDS
[
key
])
.
map
(
(
key
)
=>
FORM_VALIDATION_FIELDS
[
key
])
.
reduce
((
acc
,
cur
)
=>
({
...
acc
,
[
cur
]:
''
}),
{}),
.
reduce
((
acc
,
cur
)
=>
({
...
acc
,
[
cur
]:
''
}),
{}),
});
});
ee/app/assets/javascripts/geo_settings/validations.js
View file @
aa653d5a
import
validateIpAddress
from
'
ee/validators/ip_address
'
;
import
validateIpAddress
from
'
ee/validators/ip_address
'
;
import
{
s__
}
from
'
~/locale
'
;
import
{
s__
}
from
'
~/locale
'
;
const
validateIP
=
data
=>
{
const
validateIP
=
(
data
)
=>
{
let
addresses
=
data
.
replace
(
/
\s
/g
,
''
).
split
(
'
,
'
);
let
addresses
=
data
.
replace
(
/
\s
/g
,
''
).
split
(
'
,
'
);
addresses
=
addresses
.
map
(
address
=>
validateIpAddress
(
address
));
addresses
=
addresses
.
map
(
(
address
)
=>
validateIpAddress
(
address
));
return
!
addresses
.
some
(
a
=>
!
a
);
return
!
addresses
.
some
(
(
a
)
=>
!
a
);
};
};
export
const
validateTimeout
=
data
=>
{
export
const
validateTimeout
=
(
data
)
=>
{
if
(
!
data
&&
data
!==
0
)
{
if
(
!
data
&&
data
!==
0
)
{
return
s__
(
"
Geo|Connection timeout can't be blank
"
);
return
s__
(
"
Geo|Connection timeout can't be blank
"
);
}
else
if
(
data
&&
Number
.
isNaN
(
Number
(
data
)))
{
}
else
if
(
data
&&
Number
.
isNaN
(
Number
(
data
)))
{
...
@@ -21,7 +21,7 @@ export const validateTimeout = data => {
...
@@ -21,7 +21,7 @@ export const validateTimeout = data => {
return
''
;
return
''
;
};
};
export
const
validateAllowedIp
=
data
=>
{
export
const
validateAllowedIp
=
(
data
)
=>
{
if
(
!
data
)
{
if
(
!
data
)
{
return
s__
(
"
Geo|Allowed Geo IP can't be blank
"
);
return
s__
(
"
Geo|Allowed Geo IP can't be blank
"
);
}
else
if
(
data
.
length
>
255
)
{
}
else
if
(
data
.
length
>
255
)
{
...
...
ee/app/assets/javascripts/gfm_auto_complete.js
View file @
aa653d5a
...
@@ -41,7 +41,7 @@ class GfmAutoCompleteEE extends GfmAutoComplete {
...
@@ -41,7 +41,7 @@ class GfmAutoCompleteEE extends GfmAutoComplete {
callbacks
:
{
callbacks
:
{
...
defaultCallbacks
,
...
defaultCallbacks
,
beforeSave
(
merges
)
{
beforeSave
(
merges
)
{
return
$
.
map
(
merges
,
m
=>
{
return
$
.
map
(
merges
,
(
m
)
=>
{
if
(
m
.
title
==
null
)
{
if
(
m
.
title
==
null
)
{
return
m
;
return
m
;
}
}
...
@@ -75,7 +75,7 @@ class GfmAutoCompleteEE extends GfmAutoComplete {
...
@@ -75,7 +75,7 @@ class GfmAutoCompleteEE extends GfmAutoComplete {
callbacks
:
{
callbacks
:
{
...
defaultCallbacks
,
...
defaultCallbacks
,
beforeSave
(
merges
)
{
beforeSave
(
merges
)
{
return
merges
.
map
(
m
=>
{
return
merges
.
map
(
(
m
)
=>
{
if
(
m
.
title
==
null
)
{
if
(
m
.
title
==
null
)
{
return
m
;
return
m
;
}
}
...
...
ee/app/assets/javascripts/group_member_contributions/store/group_member_store.js
View file @
aa653d5a
...
@@ -37,7 +37,7 @@ export default class GroupMemberStore {
...
@@ -37,7 +37,7 @@ export default class GroupMemberStore {
}
}
setMembers
(
rawMembers
)
{
setMembers
(
rawMembers
)
{
this
.
state
.
members
=
rawMembers
.
map
(
rawMember
=>
GroupMemberStore
.
formatMember
(
rawMember
));
this
.
state
.
members
=
rawMembers
.
map
(
(
rawMember
)
=>
GroupMemberStore
.
formatMember
(
rawMember
));
}
}
sortMembers
(
sortByColumn
)
{
sortMembers
(
sortByColumn
)
{
...
@@ -67,13 +67,13 @@ export default class GroupMemberStore {
...
@@ -67,13 +67,13 @@ export default class GroupMemberStore {
fetchContributedMembers
()
{
fetchContributedMembers
()
{
return
axios
return
axios
.
get
(
this
.
memberContributionsPath
)
.
get
(
this
.
memberContributionsPath
)
.
then
(
res
=>
res
.
data
)
.
then
(
(
res
)
=>
res
.
data
)
.
then
(
members
=>
{
.
then
(
(
members
)
=>
{
this
.
setColumns
(
COLUMNS
);
this
.
setColumns
(
COLUMNS
);
this
.
setMembers
(
members
);
this
.
setMembers
(
members
);
this
.
state
.
isLoading
=
false
;
this
.
state
.
isLoading
=
false
;
})
})
.
catch
(
e
=>
{
.
catch
(
(
e
)
=>
{
this
.
state
.
isLoading
=
false
;
this
.
state
.
isLoading
=
false
;
Flash
(
__
(
'
Something went wrong while fetching group member contributions
'
));
Flash
(
__
(
'
Something went wrong while fetching group member contributions
'
));
throw
e
;
throw
e
;
...
...
ee/app/assets/javascripts/groups/members/utils.js
View file @
aa653d5a
import
{
parseDataAttributes
as
CEParseDataAttributes
}
from
'
~/groups/members/utils
'
;
import
{
parseDataAttributes
as
CEParseDataAttributes
}
from
'
~/groups/members/utils
'
;
export
const
parseDataAttributes
=
el
=>
{
export
const
parseDataAttributes
=
(
el
)
=>
{
const
{
ldapOverridePath
}
=
el
.
dataset
;
const
{
ldapOverridePath
}
=
el
.
dataset
;
return
{
return
{
...
...
ee/app/assets/javascripts/groups/settings/access_restriction_field/validate_ip_address.js
View file @
aa653d5a
import
validateIpAddress
from
'
ee/validators/ip_address
'
;
import
validateIpAddress
from
'
ee/validators/ip_address
'
;
import
{
__
,
sprintf
}
from
'
~/locale
'
;
import
{
__
,
sprintf
}
from
'
~/locale
'
;
export
default
address
=>
{
export
default
(
address
)
=>
{
if
(
!
validateIpAddress
(
address
))
{
if
(
!
validateIpAddress
(
address
))
{
return
sprintf
(
__
(
'
%{address} is an invalid IP address range
'
),
{
address
});
return
sprintf
(
__
(
'
%{address} is an invalid IP address range
'
),
{
address
});
}
}
...
...
ee/app/assets/javascripts/groups/settings/compliance_frameworks/components/list.vue
View file @
aa653d5a
...
@@ -46,7 +46,7 @@ export default {
...
@@ -46,7 +46,7 @@ export default {
const
nodes
=
data
.
namespace
?.
complianceFrameworks
?.
nodes
;
const
nodes
=
data
.
namespace
?.
complianceFrameworks
?.
nodes
;
return
(
return
(
nodes
?.
map
(
framework
=>
({
nodes
?.
map
(
(
framework
)
=>
({
...
framework
,
...
framework
,
parsedId
:
getIdFromGraphQLId
(
framework
.
id
),
parsedId
:
getIdFromGraphQLId
(
framework
.
id
),
}))
||
[]
}))
||
[]
...
...
ee/app/assets/javascripts/groups/settings/compliance_frameworks/init_list.js
View file @
aa653d5a
...
@@ -10,7 +10,7 @@ const apolloProvider = new VueApollo({
...
@@ -10,7 +10,7 @@ const apolloProvider = new VueApollo({
defaultClient
:
createDefaultClient
(),
defaultClient
:
createDefaultClient
(),
});
});
const
createComplianceFrameworksListApp
=
el
=>
{
const
createComplianceFrameworksListApp
=
(
el
)
=>
{
if
(
!
el
)
{
if
(
!
el
)
{
return
false
;
return
false
;
}
}
...
...
ee/app/assets/javascripts/groups/settings/components/comma_separated_list_token_selector.vue
View file @
aa653d5a
...
@@ -71,7 +71,7 @@ export default {
...
@@ -71,7 +71,7 @@ export default {
},
},
watch
:
{
watch
:
{
selectedTokens
(
newValue
)
{
selectedTokens
(
newValue
)
{
this
.
$options
.
hiddenInput
.
value
=
newValue
.
map
(
token
=>
token
.
name
).
join
(
'
,
'
);
this
.
$options
.
hiddenInput
.
value
=
newValue
.
map
(
(
token
)
=>
token
.
name
).
join
(
'
,
'
);
// Dispatch `input` event so form submit button becomes active
// Dispatch `input` event so form submit button becomes active
this
.
$options
.
hiddenInput
.
dispatchEvent
(
this
.
$options
.
hiddenInput
.
dispatchEvent
(
...
...
ee/app/assets/javascripts/insights/components/insights.vue
View file @
aa653d5a
...
@@ -44,11 +44,11 @@ export default {
...
@@ -44,11 +44,11 @@ export default {
};
};
},
},
hasAllChartsLoaded
()
{
hasAllChartsLoaded
()
{
const
requestedChartKeys
=
this
.
activePage
?.
charts
?.
map
(
chart
=>
chart
.
title
)
||
[];
const
requestedChartKeys
=
this
.
activePage
?.
charts
?.
map
(
(
chart
)
=>
chart
.
title
)
||
[];
return
requestedChartKeys
.
every
(
key
=>
this
.
chartData
[
key
]?.
loaded
);
return
requestedChartKeys
.
every
(
(
key
)
=>
this
.
chartData
[
key
]?.
loaded
);
},
},
hasChartsError
()
{
hasChartsError
()
{
return
Object
.
values
(
this
.
chartData
).
some
(
data
=>
data
.
error
);
return
Object
.
values
(
this
.
chartData
).
some
(
(
data
)
=>
data
.
error
);
},
},
pageLoading
()
{
pageLoading
()
{
return
!
this
.
hasChartsError
&&
!
this
.
hasAllChartsLoaded
;
return
!
this
.
hasChartsError
&&
!
this
.
hasAllChartsLoaded
;
...
@@ -71,7 +71,7 @@ export default {
...
@@ -71,7 +71,7 @@ export default {
}
}
}
}
return
Object
.
keys
(
configData
).
map
(
key
=>
({
return
Object
.
keys
(
configData
).
map
(
(
key
)
=>
({
name
:
configData
[
key
].
title
,
name
:
configData
[
key
].
title
,
scope
:
key
,
scope
:
key
,
isActive
:
this
.
activeTab
===
key
,
isActive
:
this
.
activeTab
===
key
,
...
...
ee/app/assets/javascripts/insights/components/insights_chart.vue
View file @
aa653d5a
...
@@ -100,12 +100,12 @@ export default {
...
@@ -100,12 +100,12 @@ export default {
methods
:
{
methods
:
{
setSvg
(
name
)
{
setSvg
(
name
)
{
return
getSvgIconPathContent
(
name
)
return
getSvgIconPathContent
(
name
)
.
then
(
path
=>
{
.
then
(
(
path
)
=>
{
if
(
path
)
{
if
(
path
)
{
this
.
$set
(
this
.
svgs
,
name
,
`path://
${
path
}
`
);
this
.
$set
(
this
.
svgs
,
name
,
`path://
${
path
}
`
);
}
}
})
})
.
catch
(
e
=>
{
.
catch
(
(
e
)
=>
{
// eslint-disable-next-line no-console, @gitlab/require-i18n-strings
// eslint-disable-next-line no-console, @gitlab/require-i18n-strings
console
.
error
(
'
SVG could not be rendered correctly:
'
,
e
);
console
.
error
(
'
SVG could not be rendered correctly:
'
,
e
);
});
});
...
...
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