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
02fad0bc
Commit
02fad0bc
authored
Dec 23, 2020
by
Lukas Eipert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Run prettier on 33 files - 10 of 73
Part of our prettier migration; changing the arrow-parens style.
parent
16d4df3c
Changes
34
Hide whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
83 additions
and
118 deletions
+83
-118
.prettierignore
.prettierignore
+0
-35
app/assets/javascripts/create_cluster/eks_cluster/store/actions.js
...s/javascripts/create_cluster/eks_cluster/store/actions.js
+2
-2
app/assets/javascripts/create_cluster/eks_cluster/store/state.js
...ets/javascripts/create_cluster/eks_cluster/store/state.js
+1
-1
app/assets/javascripts/create_cluster/gke_cluster/components/gke_dropdown_mixin.js
...eate_cluster/gke_cluster/components/gke_dropdown_mixin.js
+2
-2
app/assets/javascripts/create_cluster/gke_cluster/components/gke_project_id_dropdown.vue
...luster/gke_cluster/components/gke_project_id_dropdown.vue
+1
-1
app/assets/javascripts/create_cluster/gke_cluster/index.js
app/assets/javascripts/create_cluster/gke_cluster/index.js
+1
-1
app/assets/javascripts/create_cluster/gke_cluster/store/actions.js
...s/javascripts/create_cluster/gke_cluster/store/actions.js
+4
-4
app/assets/javascripts/create_cluster/gke_cluster/store/getters.js
...s/javascripts/create_cluster/gke_cluster/store/getters.js
+3
-3
app/assets/javascripts/create_cluster/gke_cluster_namespace/index.js
...javascripts/create_cluster/gke_cluster_namespace/index.js
+1
-1
app/assets/javascripts/create_cluster/init_create_cluster.js
app/assets/javascripts/create_cluster/init_create_cluster.js
+3
-3
app/assets/javascripts/create_cluster/store/cluster_dropdown/actions.js
...ascripts/create_cluster/store/cluster_dropdown/actions.js
+3
-3
app/assets/javascripts/create_item_dropdown.js
app/assets/javascripts/create_item_dropdown.js
+2
-2
app/assets/javascripts/create_label.js
app/assets/javascripts/create_label.js
+3
-3
app/assets/javascripts/create_merge_request_dropdown.js
app/assets/javascripts/create_merge_request_dropdown.js
+4
-4
app/assets/javascripts/custom_metrics/components/custom_metrics_form_fields.vue
.../custom_metrics/components/custom_metrics_form_fields.vue
+3
-3
app/assets/javascripts/custom_metrics/constants.js
app/assets/javascripts/custom_metrics/constants.js
+2
-2
app/assets/javascripts/cycle_analytics/cycle_analytics_bundle.js
...ets/javascripts/cycle_analytics/cycle_analytics_bundle.js
+3
-3
app/assets/javascripts/cycle_analytics/cycle_analytics_service.js
...ts/javascripts/cycle_analytics/cycle_analytics_service.js
+2
-2
app/assets/javascripts/cycle_analytics/cycle_analytics_store.js
...sets/javascripts/cycle_analytics/cycle_analytics_store.js
+5
-5
app/assets/javascripts/deploy_freeze/store/actions.js
app/assets/javascripts/deploy_freeze/store/actions.js
+1
-1
app/assets/javascripts/deploy_freeze/store/index.js
app/assets/javascripts/deploy_freeze/store/index.js
+1
-1
app/assets/javascripts/deploy_freeze/store/mutations.js
app/assets/javascripts/deploy_freeze/store/mutations.js
+2
-2
app/assets/javascripts/deploy_keys/components/app.vue
app/assets/javascripts/deploy_keys/components/app.vue
+2
-2
app/assets/javascripts/deploy_keys/components/key.vue
app/assets/javascripts/deploy_keys/components/key.vue
+1
-1
app/assets/javascripts/deploy_keys/service/index.js
app/assets/javascripts/deploy_keys/service/index.js
+3
-3
app/assets/javascripts/deploy_keys/store/index.js
app/assets/javascripts/deploy_keys/store/index.js
+1
-1
app/assets/javascripts/deprecated_jquery_dropdown/gl_dropdown.js
...ets/javascripts/deprecated_jquery_dropdown/gl_dropdown.js
+12
-12
app/assets/javascripts/deprecated_jquery_dropdown/gl_dropdown_filter.js
...ascripts/deprecated_jquery_dropdown/gl_dropdown_filter.js
+5
-5
app/assets/javascripts/deprecated_jquery_dropdown/gl_dropdown_input.js
...vascripts/deprecated_jquery_dropdown/gl_dropdown_input.js
+3
-3
app/assets/javascripts/deprecated_jquery_dropdown/gl_dropdown_remote.js
...ascripts/deprecated_jquery_dropdown/gl_dropdown_remote.js
+1
-1
app/assets/javascripts/design_management/components/design_notes/design_discussion.vue
..._management/components/design_notes/design_discussion.vue
+1
-1
app/assets/javascripts/design_management/components/design_presentation.vue
...ipts/design_management/components/design_presentation.vue
+1
-1
app/assets/javascripts/design_management/components/design_sidebar.vue
...vascripts/design_management/components/design_sidebar.vue
+2
-2
app/assets/javascripts/design_management/components/design_todo_button.vue
...ripts/design_management/components/design_todo_button.vue
+2
-2
No files found.
.prettierignore
View file @
02fad0bc
...
...
@@ -162,41 +162,6 @@ app/assets/javascripts/ci_variable_list/ci_variable_list.js
app/assets/javascripts/ci_variable_list/components/ci_environments_dropdown.vue
app/assets/javascripts/ci_variable_list/components/ci_variable_table.vue
## lucid-lederberg
app/assets/javascripts/create_cluster/eks_cluster/store/actions.js
app/assets/javascripts/create_cluster/eks_cluster/store/state.js
app/assets/javascripts/create_cluster/gke_cluster/components/gke_dropdown_mixin.js
app/assets/javascripts/create_cluster/gke_cluster/components/gke_project_id_dropdown.vue
app/assets/javascripts/create_cluster/gke_cluster/index.js
app/assets/javascripts/create_cluster/gke_cluster/store/actions.js
app/assets/javascripts/create_cluster/gke_cluster/store/getters.js
app/assets/javascripts/create_cluster/gke_cluster_namespace/index.js
app/assets/javascripts/create_cluster/init_create_cluster.js
app/assets/javascripts/create_cluster/store/cluster_dropdown/actions.js
app/assets/javascripts/create_item_dropdown.js
app/assets/javascripts/create_label.js
app/assets/javascripts/create_merge_request_dropdown.js
app/assets/javascripts/custom_metrics/components/custom_metrics_form_fields.vue
app/assets/javascripts/custom_metrics/constants.js
app/assets/javascripts/cycle_analytics/cycle_analytics_bundle.js
app/assets/javascripts/cycle_analytics/cycle_analytics_service.js
app/assets/javascripts/cycle_analytics/cycle_analytics_store.js
app/assets/javascripts/deploy_freeze/store/actions.js
app/assets/javascripts/deploy_freeze/store/index.js
app/assets/javascripts/deploy_freeze/store/mutations.js
app/assets/javascripts/deploy_keys/components/app.vue
app/assets/javascripts/deploy_keys/components/key.vue
app/assets/javascripts/deploy_keys/service/index.js
app/assets/javascripts/deploy_keys/store/index.js
app/assets/javascripts/deprecated_jquery_dropdown/gl_dropdown.js
app/assets/javascripts/deprecated_jquery_dropdown/gl_dropdown_filter.js
app/assets/javascripts/deprecated_jquery_dropdown/gl_dropdown_input.js
app/assets/javascripts/deprecated_jquery_dropdown/gl_dropdown_remote.js
app/assets/javascripts/design_management/components/design_notes/design_discussion.vue
app/assets/javascripts/design_management/components/design_presentation.vue
app/assets/javascripts/design_management/components/design_sidebar.vue
app/assets/javascripts/design_management/components/design_todo_button.vue
## loving-feistel
app/assets/javascripts/design_management/components/toolbar/design_navigation.vue
app/assets/javascripts/design_management/components/toolbar/index.vue
...
...
app/assets/javascripts/create_cluster/eks_cluster/store/actions.js
View file @
02fad0bc
...
...
@@ -5,7 +5,7 @@ import axios from '~/lib/utils/axios_utils';
import
{
deprecatedCreateFlash
as
createFlash
}
from
'
~/flash
'
;
import
{
convertObjectPropsToCamelCase
}
from
'
~/lib/utils/common_utils
'
;
const
getErrorMessage
=
data
=>
{
const
getErrorMessage
=
(
data
)
=>
{
const
errorKey
=
Object
.
keys
(
data
)[
0
];
return
data
[
errorKey
][
0
];
...
...
@@ -42,7 +42,7 @@ export const createRole = ({ dispatch, state: { createRolePath } }, payload) =>
dispatch
(
'
createRoleSuccess
'
,
awsData
);
})
.
catch
(
error
=>
{
.
catch
(
(
error
)
=>
{
let
message
=
error
;
if
(
error
?.
response
?.
data
?.
message
)
{
message
=
error
.
response
.
data
.
message
;
...
...
app/assets/javascripts/create_cluster/eks_cluster/store/state.js
View file @
02fad0bc
import
{
KUBERNETES_VERSIONS
}
from
'
../constants
'
;
const
kubernetesVersion
=
KUBERNETES_VERSIONS
.
find
(
version
=>
version
.
default
).
value
;
const
kubernetesVersion
=
KUBERNETES_VERSIONS
.
find
(
(
version
)
=>
version
.
default
).
value
;
export
default
()
=>
({
createRolePath
:
null
,
...
...
app/assets/javascripts/create_cluster/gke_cluster/components/gke_dropdown_mixin.js
View file @
02fad0bc
...
...
@@ -42,13 +42,13 @@ export default {
return
[];
}
return
this
.
items
.
filter
(
item
=>
item
.
name
.
toLowerCase
().
indexOf
(
this
.
searchQuery
)
>
-
1
);
return
this
.
items
.
filter
(
(
item
)
=>
item
.
name
.
toLowerCase
().
indexOf
(
this
.
searchQuery
)
>
-
1
);
},
},
methods
:
{
fetchSuccessHandler
()
{
if
(
this
.
defaultValue
)
{
const
itemToSelect
=
this
.
items
.
find
(
item
=>
item
.
name
===
this
.
defaultValue
);
const
itemToSelect
=
this
.
items
.
find
(
(
item
)
=>
item
.
name
===
this
.
defaultValue
);
if
(
itemToSelect
)
{
this
.
setItem
(
itemToSelect
.
name
);
...
...
app/assets/javascripts/create_cluster/gke_cluster/components/gke_project_id_dropdown.vue
View file @
02fad0bc
...
...
@@ -106,7 +106,7 @@ export default {
...
mapActions
({
setItem
:
'
setProject
'
}),
fetchSuccessHandler
()
{
if
(
this
.
defaultValue
)
{
const
projectToSelect
=
this
.
items
.
find
(
item
=>
item
.
projectId
===
this
.
defaultValue
);
const
projectToSelect
=
this
.
items
.
find
(
(
item
)
=>
item
.
projectId
===
this
.
defaultValue
);
if
(
projectToSelect
)
{
this
.
setItem
(
projectToSelect
);
...
...
app/assets/javascripts/create_cluster/gke_cluster/index.js
View file @
02fad0bc
...
...
@@ -22,7 +22,7 @@ const mountComponent = (entryPoint, component, componentName, extraProps = {}) =
components
:
{
[
componentName
]:
component
,
},
render
:
createElement
=>
render
:
(
createElement
)
=>
createElement
(
componentName
,
{
props
:
{
fieldName
:
hiddenInput
.
getAttribute
(
'
name
'
),
...
...
app/assets/javascripts/create_cluster/gke_cluster/store/actions.js
View file @
02fad0bc
...
...
@@ -6,14 +6,14 @@ const gapiResourceListRequest = ({ resource, params, commit, mutation, payloadKe
const
request
=
resource
.
list
(
params
);
return
request
.
then
(
resp
=>
{
(
resp
)
=>
{
const
{
result
}
=
resp
;
commit
(
mutation
,
result
[
payloadKey
]);
resolve
();
},
resp
=>
{
(
resp
)
=>
{
reject
(
resp
);
},
);
...
...
@@ -54,14 +54,14 @@ export const validateProjectBilling = ({ dispatch, commit, state }) =>
commit
(
types
.
SET_MACHINE_TYPE
,
''
);
return
request
.
then
(
resp
=>
{
(
resp
)
=>
{
const
{
billingEnabled
}
=
resp
.
result
;
commit
(
types
.
SET_PROJECT_BILLING_STATUS
,
Boolean
(
billingEnabled
));
dispatch
(
'
setIsValidatingProjectBilling
'
,
false
);
resolve
();
},
resp
=>
{
(
resp
)
=>
{
dispatch
(
'
setIsValidatingProjectBilling
'
,
false
);
reject
(
resp
);
},
...
...
app/assets/javascripts/create_cluster/gke_cluster/store/getters.js
View file @
02fad0bc
export
const
hasProject
=
state
=>
Boolean
(
state
.
selectedProject
.
projectId
);
export
const
hasZone
=
state
=>
Boolean
(
state
.
selectedZone
);
export
const
hasMachineType
=
state
=>
Boolean
(
state
.
selectedMachineType
);
export
const
hasProject
=
(
state
)
=>
Boolean
(
state
.
selectedProject
.
projectId
);
export
const
hasZone
=
(
state
)
=>
Boolean
(
state
.
selectedZone
);
export
const
hasMachineType
=
(
state
)
=>
Boolean
(
state
.
selectedMachineType
);
export
const
hasValidData
=
(
state
,
getters
)
=>
Boolean
(
state
.
projectHasBillingEnabled
)
&&
getters
.
hasZone
&&
getters
.
hasMachineType
;
app/assets/javascripts/create_cluster/gke_cluster_namespace/index.js
View file @
02fad0bc
...
...
@@ -12,7 +12,7 @@ const setDisabled = (el, isDisabled) => {
}
};
const
setState
=
glManagedCheckbox
=>
{
const
setState
=
(
glManagedCheckbox
)
=>
{
const
glManaged
=
document
.
querySelector
(
'
.js-namespace-prefixed
'
);
const
selfManaged
=
document
.
querySelector
(
'
.js-namespace
'
);
...
...
app/assets/javascripts/create_cluster/init_create_cluster.js
View file @
02fad0bc
...
...
@@ -4,11 +4,11 @@ import PersistentUserCallout from '~/persistent_user_callout';
const
newClusterViews
=
[
'
:clusters:new
'
,
'
:clusters:create_gcp
'
,
'
:clusters:create_user
'
];
const
isProjectLevelCluster
=
page
=>
page
.
startsWith
(
'
project:clusters
'
);
const
isProjectLevelCluster
=
(
page
)
=>
page
.
startsWith
(
'
project:clusters
'
);
export
default
document
=>
{
export
default
(
document
)
=>
{
const
{
page
}
=
document
.
body
.
dataset
;
const
isNewClusterView
=
newClusterViews
.
some
(
view
=>
page
.
endsWith
(
view
));
const
isNewClusterView
=
newClusterViews
.
some
(
(
view
)
=>
page
.
endsWith
(
view
));
if
(
!
isNewClusterView
)
{
return
;
...
...
app/assets/javascripts/create_cluster/store/cluster_dropdown/actions.js
View file @
02fad0bc
import
*
as
types
from
'
./mutation_types
'
;
export
default
fetchItems
=>
({
export
default
(
fetchItems
)
=>
({
requestItems
:
({
commit
})
=>
commit
(
types
.
REQUEST_ITEMS
),
receiveItemsSuccess
:
({
commit
},
payload
)
=>
commit
(
types
.
RECEIVE_ITEMS_SUCCESS
,
payload
),
receiveItemsError
:
({
commit
},
payload
)
=>
commit
(
types
.
RECEIVE_ITEMS_ERROR
,
payload
),
...
...
@@ -8,7 +8,7 @@ export default fetchItems => ({
dispatch
(
'
requestItems
'
);
return
fetchItems
(
payload
)
.
then
(
items
=>
dispatch
(
'
receiveItemsSuccess
'
,
{
items
}))
.
catch
(
error
=>
dispatch
(
'
receiveItemsError
'
,
{
error
}));
.
then
(
(
items
)
=>
dispatch
(
'
receiveItemsSuccess
'
,
{
items
}))
.
catch
(
(
error
)
=>
dispatch
(
'
receiveItemsError
'
,
{
error
}));
},
});
app/assets/javascripts/create_item_dropdown.js
View file @
02fad0bc
...
...
@@ -47,7 +47,7 @@ export default class CreateItemDropdown {
return
escape
(
item
.
id
);
},
onFilter
:
this
.
toggleCreateNewButton
.
bind
(
this
),
clicked
:
options
=>
{
clicked
:
(
options
)
=>
{
options
.
e
.
preventDefault
();
this
.
onSelect
();
},
...
...
@@ -79,7 +79,7 @@ export default class CreateItemDropdown {
this
.
getDataOption
(
term
,
(
data
=
[])
=>
{
// Ensure the selected item isn't already in the data to avoid duplicates
const
alreadyHasSelectedItem
=
this
.
selectedItem
&&
data
.
some
(
item
=>
item
.
id
===
this
.
selectedItem
.
id
);
this
.
selectedItem
&&
data
.
some
(
(
item
)
=>
item
.
id
===
this
.
selectedItem
.
id
);
let
uniqueData
=
data
;
if
(
!
alreadyHasSelectedItem
)
{
...
...
app/assets/javascripts/create_label.js
View file @
02fad0bc
...
...
@@ -56,7 +56,7 @@ export default class CreateLabelDropdown {
this
.
$dropdownBack
.
on
(
'
click
'
,
this
.
resetForm
.
bind
(
this
));
this
.
$cancelButton
.
on
(
'
click
'
,
e
=>
{
this
.
$cancelButton
.
on
(
'
click
'
,
(
e
)
=>
{
e
.
preventDefault
();
e
.
stopPropagation
();
...
...
@@ -105,7 +105,7 @@ export default class CreateLabelDropdown {
title
:
this
.
$newLabelField
.
val
(),
color
:
this
.
$newColorField
.
val
(),
},
label
=>
{
(
label
)
=>
{
this
.
$newLabelCreateButton
.
enable
();
if
(
label
.
message
)
{
...
...
@@ -115,7 +115,7 @@ export default class CreateLabelDropdown {
errors
=
label
.
message
;
}
else
{
errors
=
Object
.
keys
(
label
.
message
)
.
map
(
key
=>
`
${
humanize
(
key
)}
${
label
.
message
[
key
].
join
(
'
,
'
)}
`
)
.
map
(
(
key
)
=>
`
${
humanize
(
key
)}
${
label
.
message
[
key
].
join
(
'
,
'
)}
`
)
.
join
(
'
<br/>
'
);
}
...
...
app/assets/javascripts/create_merge_request_dropdown.js
View file @
02fad0bc
...
...
@@ -191,7 +191,7 @@ export default class CreateMergeRequestDropdown {
static
findByValue
(
objects
,
ref
,
returnFirstMatch
=
false
)
{
if
(
!
objects
||
!
objects
.
length
)
return
false
;
if
(
objects
.
indexOf
(
ref
)
>
-
1
)
return
ref
;
if
(
returnFirstMatch
)
return
objects
.
find
(
item
=>
new
RegExp
(
`^
${
ref
}
`
).
test
(
item
));
if
(
returnFirstMatch
)
return
objects
.
find
(
(
item
)
=>
new
RegExp
(
`^
${
ref
}
`
).
test
(
item
));
return
false
;
}
...
...
@@ -356,7 +356,7 @@ export default class CreateMergeRequestDropdown {
event
.
preventDefault
();
if
(
isConfidentialIssue
()
&&
!
event
.
target
.
classList
.
contains
(
'
js-create-target
'
))
{
this
.
droplab
.
hooks
.
forEach
(
hook
=>
hook
.
list
.
toggle
());
this
.
droplab
.
hooks
.
forEach
(
(
hook
)
=>
hook
.
list
.
toggle
());
return
;
}
...
...
@@ -404,8 +404,8 @@ export default class CreateMergeRequestDropdown {
const
inputClasses
=
[
'
gl-field-error-outline
'
,
'
gl-field-success-outline
'
];
const
messageClasses
=
[
'
text-muted
'
,
'
text-danger
'
,
'
text-success
'
];
inputClasses
.
forEach
(
cssClass
=>
input
.
classList
.
remove
(
cssClass
));
messageClasses
.
forEach
(
cssClass
=>
message
.
classList
.
remove
(
cssClass
));
inputClasses
.
forEach
(
(
cssClass
)
=>
input
.
classList
.
remove
(
cssClass
));
messageClasses
.
forEach
(
(
cssClass
)
=>
message
.
classList
.
remove
(
cssClass
));
message
.
style
.
display
=
'
none
'
;
}
...
...
app/assets/javascripts/custom_metrics/components/custom_metrics_form_fields.vue
View file @
02fad0bc
...
...
@@ -22,7 +22,7 @@ let cancelTokenSource;
function
backOffRequest
(
makeRequestCallback
)
{
return
backOff
((
next
,
stop
)
=>
{
makeRequestCallback
()
.
then
(
resp
=>
{
.
then
(
(
resp
)
=>
{
if
(
resp
.
status
===
statusCodes
.
OK
)
{
stop
(
resp
);
}
else
{
...
...
@@ -32,7 +32,7 @@ function backOffRequest(makeRequestCallback) {
// If the request is cancelled by axios
// then consider it as noop so that its not
// caught by subsequent catches
.
catch
(
thrown
=>
(
axios
.
isCancel
(
thrown
)
?
undefined
:
stop
(
thrown
)));
.
catch
(
(
thrown
)
=>
(
axios
.
isCancel
(
thrown
)
?
undefined
:
stop
(
thrown
)));
},
VALIDATION_REQUEST_TIMEOUT
);
}
...
...
@@ -144,7 +144,7 @@ export default {
// as well.
cancelTokenSource
=
axiosCancelToken
.
source
();
this
.
requestValidation
(
this
.
query
,
cancelTokenSource
.
token
)
.
then
(
res
=>
{
.
then
(
(
res
)
=>
{
const
response
=
res
.
data
;
const
{
valid
,
error
}
=
response
.
query
;
if
(
response
.
success
)
{
...
...
app/assets/javascripts/custom_metrics/constants.js
View file @
02fad0bc
...
...
@@ -4,9 +4,9 @@ export const queryTypes = {
system
:
'
system
'
,
};
export
const
formDataValidator
=
val
=>
{
export
const
formDataValidator
=
(
val
)
=>
{
const
fieldNames
=
Object
.
keys
(
val
);
const
requiredFields
=
[
'
title
'
,
'
query
'
,
'
yLabel
'
,
'
unit
'
,
'
group
'
,
'
legend
'
];
return
requiredFields
.
every
(
name
=>
fieldNames
.
includes
(
name
));
return
requiredFields
.
every
(
(
name
)
=>
fieldNames
.
includes
(
name
));
};
app/assets/javascripts/cycle_analytics/cycle_analytics_bundle.js
View file @
02fad0bc
...
...
@@ -78,7 +78,7 @@ export default () => {
$dropdown
.
find
(
'
li a
'
)
.
off
(
'
click
'
)
.
on
(
'
click
'
,
e
=>
{
.
on
(
'
click
'
,
(
e
)
=>
{
e
.
preventDefault
();
const
$target
=
$
(
e
.
currentTarget
);
this
.
startDate
=
$target
.
data
(
'
value
'
);
...
...
@@ -94,7 +94,7 @@ export default () => {
this
.
service
.
fetchCycleAnalyticsData
(
fetchOptions
)
.
then
(
response
=>
{
.
then
(
(
response
)
=>
{
this
.
store
.
setCycleAnalyticsData
(
response
);
this
.
selectDefaultStage
();
this
.
initDropdown
();
...
...
@@ -128,7 +128,7 @@ export default () => {
startDate
:
this
.
startDate
,
projectIds
:
this
.
selectedProjectIds
,
})
.
then
(
response
=>
{
.
then
(
(
response
)
=>
{
this
.
isEmptyStage
=
!
response
.
events
.
length
;
this
.
store
.
setStageEvents
(
response
.
events
,
stage
);
this
.
isLoadingStage
=
false
;
...
...
app/assets/javascripts/cycle_analytics/cycle_analytics_service.js
View file @
02fad0bc
...
...
@@ -17,7 +17,7 @@ export default class CycleAnalyticsService {
'
cycle_analytics[project_ids]
'
:
projectIds
,
},
})
.
then
(
x
=>
x
.
data
);
.
then
(
(
x
)
=>
x
.
data
);
}
fetchStageData
(
options
)
{
...
...
@@ -30,6 +30,6 @@ export default class CycleAnalyticsService {
'
cycle_analytics[project_ids]
'
:
projectIds
,
},
})
.
then
(
x
=>
x
.
data
);
.
then
(
(
x
)
=>
x
.
data
);
}
}
app/assets/javascripts/cycle_analytics/cycle_analytics_store.js
View file @
02fad0bc
...
...
@@ -42,11 +42,11 @@ export default {
newData
.
stages
=
data
.
stats
||
[];
newData
.
summary
=
data
.
summary
||
[];
newData
.
summary
.
forEach
(
item
=>
{
newData
.
summary
.
forEach
(
(
item
)
=>
{
item
.
value
=
item
.
value
||
'
-
'
;
});
newData
.
stages
.
forEach
(
item
=>
{
newData
.
stages
.
forEach
(
(
item
)
=>
{
const
stageSlug
=
dasherize
(
item
.
name
.
toLowerCase
());
item
.
active
=
false
;
item
.
isUserAllowed
=
data
.
permissions
[
stageSlug
];
...
...
@@ -64,7 +64,7 @@ export default {
this
.
state
.
hasError
=
state
;
},
deactivateAllStages
()
{
this
.
state
.
stages
.
forEach
(
stage
=>
{
this
.
state
.
stages
.
forEach
(
(
stage
)
=>
{
stage
.
active
=
false
;
});
},
...
...
@@ -78,7 +78,7 @@ export default {
decorateEvents
(
events
,
stage
)
{
const
newEvents
=
[];
events
.
forEach
(
item
=>
{
events
.
forEach
(
(
item
)
=>
{
if
(
!
item
)
return
;
const
eventItem
=
{
...
DEFAULT_EVENT_OBJECTS
[
stage
.
slug
],
...
item
};
...
...
@@ -107,6 +107,6 @@ export default {
return
newEvents
;
},
currentActiveStage
()
{
return
this
.
state
.
stages
.
find
(
stage
=>
stage
.
active
);
return
this
.
state
.
stages
.
find
(
(
stage
)
=>
stage
.
active
);
},
};
app/assets/javascripts/deploy_freeze/store/actions.js
View file @
02fad0bc
...
...
@@ -28,7 +28,7 @@ export const addFreezePeriod = ({ state, dispatch, commit }) => {
commit
(
types
.
RESET_MODAL
);
dispatch
(
'
fetchFreezePeriods
'
);
})
.
catch
(
error
=>
{
.
catch
(
(
error
)
=>
{
createFlash
(
__
(
'
Error: Unable to create deploy freeze
'
));
dispatch
(
'
receiveAddFreezePeriodError
'
,
error
);
});
...
...
app/assets/javascripts/deploy_freeze/store/index.js
View file @
02fad0bc
...
...
@@ -6,7 +6,7 @@ import createState from './state';
Vue
.
use
(
Vuex
);
export
default
initialState
=>
export
default
(
initialState
)
=>
new
Vuex
.
Store
({
actions
,
mutations
,
...
...
app/assets/javascripts/deploy_freeze/store/mutations.js
View file @
02fad0bc
...
...
@@ -4,7 +4,7 @@ import * as types from './mutation_types';
const
formatTimezoneName
=
(
freezePeriod
,
timezoneList
)
=>
convertObjectPropsToCamelCase
({
...
freezePeriod
,
cron_timezone
:
timezoneList
.
find
(
tz
=>
tz
.
identifier
===
freezePeriod
.
cron_timezone
)?.
name
,
cron_timezone
:
timezoneList
.
find
(
(
tz
)
=>
tz
.
identifier
===
freezePeriod
.
cron_timezone
)?.
name
,
});
export
default
{
...
...
@@ -14,7 +14,7 @@ export default {
[
types
.
RECEIVE_FREEZE_PERIODS_SUCCESS
](
state
,
freezePeriods
)
{
state
.
isLoading
=
false
;
state
.
freezePeriods
=
freezePeriods
.
map
(
freezePeriod
=>
state
.
freezePeriods
=
freezePeriods
.
map
(
(
freezePeriod
)
=>
formatTimezoneName
(
freezePeriod
,
state
.
timezoneData
),
);
},
...
...
app/assets/javascripts/deploy_keys/components/app.vue
View file @
02fad0bc
...
...
@@ -39,7 +39,7 @@ export default {
},
computed
:
{
tabs
()
{
return
Object
.
keys
(
this
.
$options
.
scopes
).
map
(
scope
=>
{
return
Object
.
keys
(
this
.
$options
.
scopes
).
map
(
(
scope
)
=>
{
const
count
=
Array
.
isArray
(
this
.
keys
[
scope
])
?
this
.
keys
[
scope
].
length
:
null
;
return
{
...
...
@@ -81,7 +81,7 @@ export default {
return
this
.
service
.
getKeys
()
.
then
(
data
=>
{
.
then
(
(
data
)
=>
{
this
.
isLoading
=
false
;
this
.
store
.
keys
=
data
;
})
...
...
app/assets/javascripts/deploy_keys/components/key.vue
View file @
02fad0bc
...
...
@@ -48,7 +48,7 @@ export default {
if
(
this
.
projectId
!==
null
)
{
const
indexOfCurrentProject
=
projects
.
findIndex
(
project
=>
(
project
)
=>
project
&&
project
.
project
&&
project
.
project
.
id
&&
...
...
app/assets/javascripts/deploy_keys/service/index.js
View file @
02fad0bc
...
...
@@ -6,14 +6,14 @@ export default class DeployKeysService {
}
getKeys
()
{
return
axios
.
get
(
this
.
endpoint
).
then
(
response
=>
response
.
data
);
return
axios
.
get
(
this
.
endpoint
).
then
(
(
response
)
=>
response
.
data
);
}
enableKey
(
id
)
{
return
axios
.
put
(
`
${
this
.
endpoint
}
/
${
id
}
/enable`
).
then
(
response
=>
response
.
data
);
return
axios
.
put
(
`
${
this
.
endpoint
}
/
${
id
}
/enable`
).
then
(
(
response
)
=>
response
.
data
);
}
disableKey
(
id
)
{
return
axios
.
put
(
`
${
this
.
endpoint
}
/
${
id
}
/disable`
).
then
(
response
=>
response
.
data
);
return
axios
.
put
(
`
${
this
.
endpoint
}
/
${
id
}
/disable`
).
then
(
(
response
)
=>
response
.
data
);
}
}
app/assets/javascripts/deploy_keys/store/index.js
View file @
02fad0bc
...
...
@@ -4,6 +4,6 @@ export default class DeployKeysStore {
}
isEnabled
(
id
)
{
return
this
.
keys
.
enabled_keys
.
some
(
key
=>
key
.
id
===
id
);
return
this
.
keys
.
enabled_keys
.
some
(
(
key
)
=>
key
.
id
===
id
);
}
}
app/assets/javascripts/deprecated_jquery_dropdown/gl_dropdown.js
View file @
02fad0bc
...
...
@@ -68,7 +68,7 @@ export class GitLabDropdown {
this
.
remote
=
new
GitLabDropdownRemote
(
this
.
options
.
data
,
{
dataType
:
this
.
options
.
dataType
,
beforeSend
:
this
.
toggleLoading
.
bind
(
this
),
success
:
data
=>
{
success
:
(
data
)
=>
{
this
.
fullData
=
data
;
this
.
parseData
(
this
.
fullData
);
this
.
focusTextInput
();
...
...
@@ -113,7 +113,7 @@ export class GitLabDropdown {
return
$
(
selector
,
this
.
dropdown
);
},
data
:
()
=>
this
.
fullData
,
callback
:
data
=>
{
callback
:
(
data
)
=>
{
this
.
parseData
(
data
);
if
(
this
.
filterInput
.
val
()
!==
''
)
{
selector
=
SELECTABLE_CLASSES
;
...
...
@@ -135,13 +135,13 @@ export class GitLabDropdown {
this
.
dropdown
.
on
(
'
hidden.bs.dropdown
'
,
this
.
hidden
);
$
(
this
.
el
).
on
(
'
update.label
'
,
this
.
updateLabel
);
this
.
dropdown
.
on
(
'
click
'
,
'
.dropdown-menu, .dropdown-menu-close
'
,
this
.
shouldPropagate
);
this
.
dropdown
.
on
(
'
keyup
'
,
e
=>
{
this
.
dropdown
.
on
(
'
keyup
'
,
(
e
)
=>
{
// Escape key
if
(
e
.
which
===
27
)
{
return
$
(
'
.dropdown-menu-close
'
,
this
.
dropdown
).
trigger
(
'
click
'
);
}
});
this
.
dropdown
.
on
(
'
blur
'
,
'
a
'
,
e
=>
{
this
.
dropdown
.
on
(
'
blur
'
,
'
a
'
,
(
e
)
=>
{
let
$dropdownMenu
;
let
$relatedTarget
;
if
(
e
.
relatedTarget
!=
null
)
{
...
...
@@ -153,7 +153,7 @@ export class GitLabDropdown {
}
});
if
(
this
.
dropdown
.
find
(
'
.dropdown-toggle-page
'
).
length
)
{
this
.
dropdown
.
find
(
'
.dropdown-toggle-page, .dropdown-menu-back
'
).
on
(
'
click
'
,
e
=>
{
this
.
dropdown
.
find
(
'
.dropdown-toggle-page, .dropdown-menu-back
'
).
on
(
'
click
'
,
(
e
)
=>
{
e
.
preventDefault
();
e
.
stopPropagation
();
return
this
.
togglePage
();
...
...
@@ -164,7 +164,7 @@ export class GitLabDropdown {
if
(
this
.
dropdown
.
find
(
'
.dropdown-toggle-page
'
).
length
)
{
selector
=
'
.dropdown-page-one .dropdown-content a
'
;
}
this
.
dropdown
.
on
(
'
click
'
,
selector
,
e
=>
{
this
.
dropdown
.
on
(
'
click
'
,
selector
,
(
e
)
=>
{
const
$el
=
$
(
e
.
currentTarget
);
const
selected
=
self
.
rowClicked
(
$el
);
const
selectedObj
=
selected
?
selected
[
0
]
:
null
;
...
...
@@ -221,7 +221,7 @@ export class GitLabDropdown {
else
if
(
isObject
(
data
))
{
html
=
[];
Object
.
keys
(
data
).
forEach
(
name
=>
{
Object
.
keys
(
data
).
forEach
(
(
name
)
=>
{
groupData
=
data
[
name
];
html
.
push
(
this
.
renderItem
(
...
...
@@ -232,7 +232,7 @@ export class GitLabDropdown {
name
,
),
);
this
.
renderData
(
groupData
,
name
).
map
(
item
=>
html
.
push
(
item
));
this
.
renderData
(
groupData
,
name
).
map
(
(
item
)
=>
html
.
push
(
item
));
});
}
else
{
// Render each row
...
...
@@ -271,7 +271,7 @@ export class GitLabDropdown {
filteredFullData
()
{
return
this
.
fullData
.
filter
(
r
=>
(
r
)
=>
typeof
r
===
'
object
'
&&
!
Object
.
prototype
.
hasOwnProperty
.
call
(
r
,
'
beforeDivider
'
)
&&
!
Object
.
prototype
.
hasOwnProperty
.
call
(
r
,
'
header
'
),
...
...
@@ -389,7 +389,7 @@ export class GitLabDropdown {
...
this
.
options
,
icon
:
this
.
icon
,
highlight
:
this
.
highlight
,
highlightText
:
text
=>
this
.
highlightTextMatches
(
text
,
this
.
filterInput
.
val
()),
highlightText
:
(
text
)
=>
this
.
highlightTextMatches
(
text
,
this
.
filterInput
.
val
()),
highlightTemplate
:
this
.
highlightTemplate
.
bind
(
this
),
parent
,
},
...
...
@@ -536,7 +536,7 @@ export class GitLabDropdown {
}
if
(
this
.
options
.
multiSelect
)
{
Object
.
keys
(
selectedObject
).
forEach
(
attribute
=>
{
Object
.
keys
(
selectedObject
).
forEach
(
(
attribute
)
=>
{
$input
.
attr
(
`data-
${
attribute
}
`
,
selectedObject
[
attribute
]);
});
}
...
...
@@ -577,7 +577,7 @@ export class GitLabDropdown {
if
(
this
.
dropdown
.
find
(
'
.dropdown-toggle-page
'
).
length
)
{
selector
=
`.dropdown-page-one
${
selector
}
`
;
}
return
$
(
'
body
'
).
on
(
'
keydown
'
,
e
=>
{
return
$
(
'
body
'
).
on
(
'
keydown
'
,
(
e
)
=>
{
let
$listItems
;
let
PREV_INDEX
;
const
currentKeyCode
=
e
.
which
;
...
...
app/assets/javascripts/deprecated_jquery_dropdown/gl_dropdown_filter.js
View file @
02fad0bc
...
...
@@ -18,7 +18,7 @@ export class GitLabDropdownFilter {
this
.
filterInputBlur
=
(
ref
=
this
.
options
.
filterInputBlur
)
!=
null
?
ref
:
true
;
const
$inputContainer
=
this
.
input
.
parent
();
const
$clearButton
=
$inputContainer
.
find
(
'
.js-dropdown-input-clear
'
);
$clearButton
.
on
(
'
click
'
,
e
=>
{
$clearButton
.
on
(
'
click
'
,
(
e
)
=>
{
// Clear click
e
.
preventDefault
();
e
.
stopPropagation
();
...
...
@@ -27,7 +27,7 @@ export class GitLabDropdownFilter {
// Key events
timeout
=
''
;
this
.
input
.
on
(
'
keydown
'
,
e
=>
{
.
on
(
'
keydown
'
,
(
e
)
=>
{
const
keyCode
=
e
.
which
;
if
(
keyCode
===
13
&&
!
options
.
elIsInput
)
{
e
.
preventDefault
();
...
...
@@ -46,7 +46,7 @@ export class GitLabDropdownFilter {
return
(
timeout
=
setTimeout
(()
=>
{
$inputContainer
.
parent
().
addClass
(
'
is-loading
'
);
return
this
.
options
.
query
(
this
.
input
.
val
(),
data
=>
{
return
this
.
options
.
query
(
this
.
input
.
val
(),
(
data
)
=>
{
$inputContainer
.
parent
().
removeClass
(
'
is-loading
'
);
return
this
.
options
.
callback
(
data
);
});
...
...
@@ -94,13 +94,13 @@ export class GitLabDropdownFilter {
// }
else
if
(
isObject
(
data
))
{
results
=
{};
Object
.
keys
(
data
).
forEach
(
key
=>
{
Object
.
keys
(
data
).
forEach
(
(
key
)
=>
{
group
=
data
[
key
];
tmp
=
fuzzaldrinPlus
.
filter
(
group
,
searchText
,
{
key
:
this
.
options
.
keys
,
});
if
(
tmp
.
length
)
{
results
[
key
]
=
tmp
.
map
(
item
=>
item
);
results
[
key
]
=
tmp
.
map
(
(
item
)
=>
item
);
}
});
}
...
...
app/assets/javascripts/deprecated_jquery_dropdown/gl_dropdown_input.js
View file @
02fad0bc
...
...
@@ -5,7 +5,7 @@ export class GitLabDropdownInput {
this
.
fieldName
=
this
.
options
.
fieldName
||
'
field-name
'
;
const
$inputContainer
=
this
.
input
.
parent
();
const
$clearButton
=
$inputContainer
.
find
(
'
.js-dropdown-input-clear
'
);
$clearButton
.
on
(
'
click
'
,
e
=>
{
$clearButton
.
on
(
'
click
'
,
(
e
)
=>
{
// Clear click
e
.
preventDefault
();
e
.
stopPropagation
();
...
...
@@ -13,13 +13,13 @@ export class GitLabDropdownInput {
});
this
.
input
.
on
(
'
keydown
'
,
e
=>
{
.
on
(
'
keydown
'
,
(
e
)
=>
{
const
keyCode
=
e
.
which
;
if
(
keyCode
===
13
&&
!
options
.
elIsInput
)
{
e
.
preventDefault
();
}
})
.
on
(
'
input
'
,
e
=>
{
.
on
(
'
input
'
,
(
e
)
=>
{
let
val
=
e
.
currentTarget
.
value
||
this
.
options
.
inputFieldName
;
val
=
val
.
split
(
'
'
)
...
...
app/assets/javascripts/deprecated_jquery_dropdown/gl_dropdown_remote.js
View file @
02fad0bc
...
...
@@ -15,7 +15,7 @@ export class GitLabDropdownRemote {
if
(
this
.
options
.
beforeSend
)
{
this
.
options
.
beforeSend
();
}
return
this
.
dataEndpoint
(
''
,
data
=>
{
return
this
.
dataEndpoint
(
''
,
(
data
)
=>
{
// Fetch the data by calling the data function
if
(
this
.
options
.
success
)
{
this
.
options
.
success
(
data
);
...
...
app/assets/javascripts/design_management/components/design_notes/design_discussion.vue
View file @
02fad0bc
...
...
@@ -171,7 +171,7 @@ export default {
this
.
$emit
(
'
resolve-discussion-error
'
,
data
.
errors
[
0
]);
}
})
.
catch
(
err
=>
{
.
catch
(
(
err
)
=>
{
this
.
$emit
(
'
resolve-discussion-error
'
,
err
);
})
.
finally
(()
=>
{
...
...
app/assets/javascripts/design_management/components/design_presentation.vue
View file @
02fad0bc
...
...
@@ -58,7 +58,7 @@ export default {
},
computed
:
{
discussionStartingNotes
()
{
return
this
.
discussions
.
map
(
discussion
=>
({
return
this
.
discussions
.
map
(
(
discussion
)
=>
({
...
discussion
.
notes
[
0
],
index
:
discussion
.
index
,
}));
...
...
app/assets/javascripts/design_management/components/design_sidebar.vue
View file @
02fad0bc
...
...
@@ -63,10 +63,10 @@ export default {
return
extractParticipants
(
this
.
issue
.
participants
.
nodes
);
},
resolvedDiscussions
()
{
return
this
.
discussions
.
filter
(
discussion
=>
discussion
.
resolved
);
return
this
.
discussions
.
filter
(
(
discussion
)
=>
discussion
.
resolved
);
},
unresolvedDiscussions
()
{
return
this
.
discussions
.
filter
(
discussion
=>
!
discussion
.
resolved
);
return
this
.
discussions
.
filter
(
(
discussion
)
=>
!
discussion
.
resolved
);
},
resolvedCommentsToggleIcon
()
{
return
this
.
resolvedDiscussionsExpanded
?
'
chevron-down
'
:
'
chevron-right
'
;
...
...
app/assets/javascripts/design_management/components/design_todo_button.vue
View file @
02fad0bc
...
...
@@ -95,7 +95,7 @@ export default {
.
then
(()
=>
{
this
.
incrementGlobalTodoCount
();
})
.
catch
(
err
=>
{
.
catch
(
(
err
)
=>
{
this
.
$emit
(
'
error
'
,
Error
(
CREATE_DESIGN_TODO_ERROR
));
throw
err
;
})
...
...
@@ -133,7 +133,7 @@ export default {
.
then
(()
=>
{
this
.
decrementGlobalTodoCount
();
})
.
catch
(
err
=>
{
.
catch
(
(
err
)
=>
{
this
.
$emit
(
'
error
'
,
Error
(
DELETE_DESIGN_TODO_ERROR
));
throw
err
;
})
...
...
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