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
bcbbcb2e
Commit
bcbbcb2e
authored
Dec 23, 2020
by
Lukas Eipert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Run prettier on 31 files - 28 of 73
Part of our prettier migration; changing the arrow-parens style.
parent
a4c662da
Changes
31
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
86 additions
and
86 deletions
+86
-86
app/assets/javascripts/search_autocomplete.js
app/assets/javascripts/search_autocomplete.js
+2
-2
app/assets/javascripts/self_monitor/store/actions.js
app/assets/javascripts/self_monitor/store/actions.js
+9
-9
app/assets/javascripts/self_monitor/store/index.js
app/assets/javascripts/self_monitor/store/index.js
+1
-1
app/assets/javascripts/sentry_error_stack_trace/index.js
app/assets/javascripts/sentry_error_stack_trace/index.js
+1
-1
app/assets/javascripts/serverless/components/area.vue
app/assets/javascripts/serverless/components/area.vue
+4
-4
app/assets/javascripts/serverless/store/actions.js
app/assets/javascripts/serverless/store/actions.js
+9
-9
app/assets/javascripts/serverless/store/getters.js
app/assets/javascripts/serverless/store/getters.js
+2
-2
app/assets/javascripts/serverless/utils.js
app/assets/javascripts/serverless/utils.js
+4
-4
app/assets/javascripts/set_status_modal/utils.js
app/assets/javascripts/set_status_modal/utils.js
+2
-2
app/assets/javascripts/sidebar/components/assignees/assignees.vue
...ts/javascripts/sidebar/components/assignees/assignees.vue
+2
-2
app/assets/javascripts/sidebar/components/assignees/assignees_realtime.vue
...ripts/sidebar/components/assignees/assignees_realtime.vue
+1
-1
app/assets/javascripts/sidebar/components/assignees/collapsed_assignee_list.vue
.../sidebar/components/assignees/collapsed_assignee_list.vue
+3
-3
app/assets/javascripts/sidebar/components/confidential/edit_form_buttons.vue
...pts/sidebar/components/confidential/edit_form_buttons.vue
+1
-1
app/assets/javascripts/sidebar/components/reviewers/collapsed_reviewer_list.vue
.../sidebar/components/reviewers/collapsed_reviewer_list.vue
+3
-3
app/assets/javascripts/sidebar/components/reviewers/reviewers.vue
...ts/javascripts/sidebar/components/reviewers/reviewers.vue
+2
-2
app/assets/javascripts/sidebar/components/severity/sidebar_severity.vue
...ascripts/sidebar/components/severity/sidebar_severity.vue
+3
-3
app/assets/javascripts/sidebar/components/time_tracking/sidebar_time_tracking.vue
...idebar/components/time_tracking/sidebar_time_tracking.vue
+1
-1
app/assets/javascripts/sidebar/lib/sidebar_move_issue.js
app/assets/javascripts/sidebar/lib/sidebar_move_issue.js
+2
-2
app/assets/javascripts/sidebar/mount_milestone_sidebar.js
app/assets/javascripts/sidebar/mount_milestone_sidebar.js
+1
-1
app/assets/javascripts/sidebar/mount_sidebar.js
app/assets/javascripts/sidebar/mount_sidebar.js
+11
-11
app/assets/javascripts/sidebar/sidebar_mediator.js
app/assets/javascripts/sidebar/sidebar_mediator.js
+3
-3
app/assets/javascripts/sidebar/utils.js
app/assets/javascripts/sidebar/utils.js
+1
-1
app/assets/javascripts/single_file_diff.js
app/assets/javascripts/single_file_diff.js
+1
-1
app/assets/javascripts/smart_interval.js
app/assets/javascripts/smart_interval.js
+1
-1
app/assets/javascripts/snippet/collapsible_input.js
app/assets/javascripts/snippet/collapsible_input.js
+4
-4
app/assets/javascripts/snippets/components/edit.vue
app/assets/javascripts/snippets/components/edit.vue
+3
-3
app/assets/javascripts/snippets/components/snippet_blob_actions_edit.vue
...scripts/snippets/components/snippet_blob_actions_edit.vue
+2
-2
app/assets/javascripts/snippets/components/snippet_blob_edit.vue
...ets/javascripts/snippets/components/snippet_blob_edit.vue
+3
-3
app/assets/javascripts/snippets/components/snippet_blob_view.vue
...ets/javascripts/snippets/components/snippet_blob_view.vue
+1
-1
app/assets/javascripts/snippets/components/snippet_header.vue
...assets/javascripts/snippets/components/snippet_header.vue
+2
-2
app/assets/javascripts/snippets/mixins/snippets.js
app/assets/javascripts/snippets/mixins/snippets.js
+1
-1
No files found.
app/assets/javascripts/search_autocomplete.js
View file @
bcbbcb2e
...
...
@@ -172,7 +172,7 @@ export class SearchAutocomplete {
term
,
},
})
.
then
(
response
=>
{
.
then
(
(
response
)
=>
{
const
options
=
this
.
scopedSearchOptions
(
term
);
// List results
...
...
@@ -345,7 +345,7 @@ export class SearchAutocomplete {
this
.
clearInput
.
on
(
'
click
'
,
this
.
onClearInputClick
);
this
.
dropdownContent
.
on
(
'
scroll
'
,
throttle
(
this
.
setScrollFade
,
250
));
this
.
searchInput
.
on
(
'
click
'
,
e
=>
{
this
.
searchInput
.
on
(
'
click
'
,
(
e
)
=>
{
e
.
stopPropagation
();
});
}
...
...
app/assets/javascripts/self_monitor/store/actions.js
View file @
bcbbcb2e
...
...
@@ -9,7 +9,7 @@ const TWO_MINUTES = 120000;
function
backOffRequest
(
makeRequestCallback
)
{
return
backOff
((
next
,
stop
)
=>
{
makeRequestCallback
()
.
then
(
resp
=>
{
.
then
(
(
resp
)
=>
{
if
(
resp
.
status
===
statusCodes
.
ACCEPTED
)
{
next
();
}
else
{
...
...
@@ -30,24 +30,24 @@ export const requestCreateProject = ({ dispatch, state, commit }) => {
commit
(
types
.
SET_LOADING
,
true
);
axios
.
post
(
state
.
createProjectEndpoint
)
.
then
(
resp
=>
{
.
then
(
(
resp
)
=>
{
if
(
resp
.
status
===
statusCodes
.
ACCEPTED
)
{
dispatch
(
'
requestCreateProjectStatus
'
,
resp
.
data
.
job_id
);
}
})
.
catch
(
error
=>
{
.
catch
(
(
error
)
=>
{
dispatch
(
'
requestCreateProjectError
'
,
error
);
});
};
export
const
requestCreateProjectStatus
=
({
dispatch
,
state
},
jobId
)
=>
{
backOffRequest
(()
=>
axios
.
get
(
state
.
createProjectStatusEndpoint
,
{
params
:
{
job_id
:
jobId
}
}))
.
then
(
resp
=>
{
.
then
(
(
resp
)
=>
{
if
(
resp
.
status
===
statusCodes
.
OK
)
{
dispatch
(
'
requestCreateProjectSuccess
'
,
resp
.
data
);
}
})
.
catch
(
error
=>
{
.
catch
(
(
error
)
=>
{
dispatch
(
'
requestCreateProjectError
'
,
error
);
});
};
...
...
@@ -82,24 +82,24 @@ export const requestDeleteProject = ({ dispatch, state, commit }) => {
commit
(
types
.
SET_LOADING
,
true
);
axios
.
delete
(
state
.
deleteProjectEndpoint
)
.
then
(
resp
=>
{
.
then
(
(
resp
)
=>
{
if
(
resp
.
status
===
statusCodes
.
ACCEPTED
)
{
dispatch
(
'
requestDeleteProjectStatus
'
,
resp
.
data
.
job_id
);
}
})
.
catch
(
error
=>
{
.
catch
(
(
error
)
=>
{
dispatch
(
'
requestDeleteProjectError
'
,
error
);
});
};
export
const
requestDeleteProjectStatus
=
({
dispatch
,
state
},
jobId
)
=>
{
backOffRequest
(()
=>
axios
.
get
(
state
.
deleteProjectStatusEndpoint
,
{
params
:
{
job_id
:
jobId
}
}))
.
then
(
resp
=>
{
.
then
(
(
resp
)
=>
{
if
(
resp
.
status
===
statusCodes
.
OK
)
{
dispatch
(
'
requestDeleteProjectSuccess
'
,
resp
.
data
);
}
})
.
catch
(
error
=>
{
.
catch
(
(
error
)
=>
{
dispatch
(
'
requestDeleteProjectError
'
,
error
);
});
};
...
...
app/assets/javascripts/self_monitor/store/index.js
View file @
bcbbcb2e
...
...
@@ -6,7 +6,7 @@ import mutations from './mutations';
Vue
.
use
(
Vuex
);
export
const
createStore
=
initialState
=>
export
const
createStore
=
(
initialState
)
=>
new
Vuex
.
Store
({
modules
:
{
selfMonitoring
:
{
...
...
app/assets/javascripts/sentry_error_stack_trace/index.js
View file @
bcbbcb2e
...
...
@@ -13,7 +13,7 @@ export default function initSentryErrorStacktrace() {
SentryErrorStackTrace
,
},
store
,
render
:
createElement
=>
render
:
(
createElement
)
=>
createElement
(
'
sentry-error-stack-trace
'
,
{
props
:
{
issueStackTracePath
},
}),
...
...
app/assets/javascripts/serverless/components/area.vue
View file @
bcbbcb2e
...
...
@@ -39,13 +39,13 @@ export default {
},
{});
},
extractTimeData
()
{
return
this
.
chartData
.
requests
.
map
(
data
=>
data
.
time
);
return
this
.
chartData
.
requests
.
map
(
(
data
)
=>
data
.
time
);
},
generateSeries
()
{
return
{
name
:
__
(
'
Invocations
'
),
type
:
'
line
'
,
data
:
this
.
chartData
.
requests
.
map
(
data
=>
[
data
.
time
,
data
.
value
]),
data
:
this
.
chartData
.
requests
.
map
(
(
data
)
=>
[
data
.
time
,
data
.
value
]),
symbolSize
:
0
,
};
},
...
...
@@ -69,7 +69,7 @@ export default {
name
:
'
time
'
,
type
:
'
time
'
,
axisLabel
:
{
formatter
:
date
=>
dateFormat
(
date
,
'
h:MM TT
'
),
formatter
:
(
date
)
=>
dateFormat
(
date
,
'
h:MM TT
'
),
},
data
:
this
.
extractTimeData
,
nameTextStyle
:
{
...
...
@@ -90,7 +90,7 @@ export default {
};
},
xAxisLabel
()
{
return
this
.
graphData
.
queries
.
map
(
query
=>
query
.
label
).
join
(
'
,
'
);
return
this
.
graphData
.
queries
.
map
(
(
query
)
=>
query
.
label
).
join
(
'
,
'
);
},
yAxisLabel
()
{
const
[
query
]
=
this
.
graphData
.
queries
;
...
...
app/assets/javascripts/serverless/store/actions.js
View file @
bcbbcb2e
...
...
@@ -30,7 +30,7 @@ export const receiveMetricsError = ({ commit }, error) =>
export
const
fetchFunctions
=
({
dispatch
},
{
functionsPath
})
=>
{
let
retryCount
=
0
;
const
functionsPartiallyFetched
=
data
=>
{
const
functionsPartiallyFetched
=
(
data
)
=>
{
if
(
data
.
functions
!==
null
&&
data
.
functions
.
length
)
{
dispatch
(
'
receiveFunctionsPartial
'
,
data
);
}
...
...
@@ -41,7 +41,7 @@ export const fetchFunctions = ({ dispatch }, { functionsPath }) => {
backOff
((
next
,
stop
)
=>
{
axios
.
get
(
functionsPath
)
.
then
(
response
=>
{
.
then
(
(
response
)
=>
{
if
(
response
.
data
.
knative_installed
===
CHECKING_INSTALLED
)
{
retryCount
+=
1
;
if
(
retryCount
<
MAX_REQUESTS
)
{
...
...
@@ -56,7 +56,7 @@ export const fetchFunctions = ({ dispatch }, { functionsPath }) => {
})
.
catch
(
stop
);
})
.
then
(
data
=>
{
.
then
(
(
data
)
=>
{
if
(
data
===
TIMEOUT
)
{
dispatch
(
'
receiveFunctionsTimeout
'
);
createFlash
(
__
(
'
Loading functions timed out. Please reload the page to try again.
'
));
...
...
@@ -66,7 +66,7 @@ export const fetchFunctions = ({ dispatch }, { functionsPath }) => {
dispatch
(
'
receiveFunctionsNoDataSuccess
'
,
data
);
}
})
.
catch
(
error
=>
{
.
catch
(
(
error
)
=>
{
dispatch
(
'
receiveFunctionsError
'
,
error
);
createFlash
(
error
);
});
...
...
@@ -83,7 +83,7 @@ export const fetchMetrics = ({ dispatch }, { metricsPath, hasPrometheus }) => {
backOff
((
next
,
stop
)
=>
{
axios
.
get
(
metricsPath
)
.
then
(
response
=>
{
.
then
(
(
response
)
=>
{
if
(
response
.
status
===
statusCodes
.
NO_CONTENT
)
{
retryCount
+=
1
;
if
(
retryCount
<
MAX_REQUESTS
)
{
...
...
@@ -98,15 +98,15 @@ export const fetchMetrics = ({ dispatch }, { metricsPath, hasPrometheus }) => {
})
.
catch
(
stop
);
})
.
then
(
data
=>
{
.
then
(
(
data
)
=>
{
if
(
data
===
null
)
{
return
;
}
const
updatedMetric
=
data
.
metrics
;
const
queries
=
data
.
metrics
.
queries
.
map
(
query
=>
({
const
queries
=
data
.
metrics
.
queries
.
map
(
(
query
)
=>
({
...
query
,
result
:
query
.
result
.
map
(
result
=>
({
result
:
query
.
result
.
map
(
(
result
)
=>
({
...
result
,
values
:
result
.
values
.
map
(([
timestamp
,
value
])
=>
({
time
:
new
Date
(
timestamp
*
1000
).
toISOString
(),
...
...
@@ -118,7 +118,7 @@ export const fetchMetrics = ({ dispatch }, { metricsPath, hasPrometheus }) => {
updatedMetric
.
queries
=
queries
;
dispatch
(
'
receiveMetricsSuccess
'
,
updatedMetric
);
})
.
catch
(
error
=>
{
.
catch
(
(
error
)
=>
{
dispatch
(
'
receiveMetricsError
'
,
error
);
createFlash
(
error
);
});
...
...
app/assets/javascripts/serverless/store/getters.js
View file @
bcbbcb2e
import
{
translate
}
from
'
../utils
'
;
export
const
hasPrometheusMissingData
=
state
=>
state
.
hasPrometheus
&&
!
state
.
hasPrometheusData
;
export
const
hasPrometheusMissingData
=
(
state
)
=>
state
.
hasPrometheus
&&
!
state
.
hasPrometheusData
;
// Convert the function list into a k/v grouping based on the environment scope
export
const
getFunctions
=
state
=>
translate
(
state
.
functions
);
export
const
getFunctions
=
(
state
)
=>
translate
(
state
.
functions
);
app/assets/javascripts/serverless/utils.js
View file @
bcbbcb2e
// Validate that the object coming in has valid query details and results
export
const
validateGraphData
=
data
=>
export
const
validateGraphData
=
(
data
)
=>
data
.
queries
&&
Array
.
isArray
(
data
.
queries
)
&&
data
.
queries
.
filter
(
query
=>
{
data
.
queries
.
filter
(
(
query
)
=>
{
if
(
Array
.
isArray
(
query
.
result
))
{
return
query
.
result
.
filter
(
res
=>
Array
.
isArray
(
res
.
values
)).
length
===
query
.
result
.
length
;
return
query
.
result
.
filter
(
(
res
)
=>
Array
.
isArray
(
res
.
values
)).
length
===
query
.
result
.
length
;
}
return
false
;
}).
length
===
data
.
queries
.
length
;
export
const
translate
=
functions
=>
export
const
translate
=
(
functions
)
=>
functions
.
reduce
(
(
acc
,
func
)
=>
Object
.
assign
(
acc
,
{
...
...
app/assets/javascripts/set_status_modal/utils.js
View file @
bcbbcb2e
...
...
@@ -3,7 +3,7 @@ export const AVAILABILITY_STATUS = {
NOT_SET
:
'
not_set
'
,
};
export
const
isUserBusy
=
status
=>
status
===
AVAILABILITY_STATUS
.
BUSY
;
export
const
isUserBusy
=
(
status
)
=>
status
===
AVAILABILITY_STATUS
.
BUSY
;
export
const
isValidAvailibility
=
availability
=>
export
const
isValidAvailibility
=
(
availability
)
=>
availability
.
length
?
Object
.
values
(
AVAILABILITY_STATUS
).
includes
(
availability
)
:
true
;
app/assets/javascripts/sidebar/components/assignees/assignees.vue
View file @
bcbbcb2e
...
...
@@ -34,8 +34,8 @@ export default {
return
!
this
.
users
.
length
;
},
sortedAssigness
()
{
const
canMergeUsers
=
this
.
users
.
filter
(
user
=>
user
.
can_merge
);
const
canNotMergeUsers
=
this
.
users
.
filter
(
user
=>
!
user
.
can_merge
);
const
canMergeUsers
=
this
.
users
.
filter
(
(
user
)
=>
user
.
can_merge
);
const
canNotMergeUsers
=
this
.
users
.
filter
(
(
user
)
=>
!
user
.
can_merge
);
return
[...
canMergeUsers
,
...
canNotMergeUsers
];
},
...
...
app/assets/javascripts/sidebar/components/assignees/assignees_realtime.vue
View file @
bcbbcb2e
...
...
@@ -59,7 +59,7 @@ export default {
handleFetchResult
({
data
})
{
const
{
nodes
}
=
data
.
project
.
issue
.
assignees
;
const
assignees
=
nodes
.
map
(
n
=>
({
const
assignees
=
nodes
.
map
(
(
n
)
=>
({
...
n
,
avatar_url
:
n
.
avatarUrl
,
id
:
getIdFromGraphQLId
(
n
.
id
),
...
...
app/assets/javascripts/sidebar/components/assignees/collapsed_assignee_list.vue
View file @
bcbbcb2e
...
...
@@ -39,7 +39,7 @@ export default {
return
this
.
users
.
length
>
2
;
},
allAssigneesCanMerge
()
{
return
this
.
users
.
every
(
user
=>
user
.
can_merge
);
return
this
.
users
.
every
(
(
user
)
=>
user
.
can_merge
);
},
sidebarAvatarCounter
()
{
if
(
this
.
users
.
length
>
DEFAULT_MAX_COUNTER
)
{
...
...
@@ -58,7 +58,7 @@ export default {
return
''
;
}
const
mergeLength
=
this
.
users
.
filter
(
u
=>
u
.
can_merge
).
length
;
const
mergeLength
=
this
.
users
.
filter
(
(
u
)
=>
u
.
can_merge
).
length
;
if
(
mergeLength
===
this
.
users
.
length
)
{
return
''
;
...
...
@@ -74,7 +74,7 @@ export default {
tooltipTitle
()
{
const
maxRender
=
Math
.
min
(
DEFAULT_RENDER_COUNT
,
this
.
users
.
length
);
const
renderUsers
=
this
.
users
.
slice
(
0
,
maxRender
);
const
names
=
renderUsers
.
map
(
u
=>
u
.
name
);
const
names
=
renderUsers
.
map
(
(
u
)
=>
u
.
name
);
if
(
!
this
.
users
.
length
)
{
return
__
(
'
Assignee(s)
'
);
...
...
app/assets/javascripts/sidebar/components/confidential/edit_form_buttons.vue
View file @
bcbbcb2e
...
...
@@ -48,7 +48,7 @@ export default {
.
then
(()
=>
{
eventHub
.
$emit
(
'
updateIssuableConfidentiality
'
,
confidential
);
})
.
catch
(
err
=>
{
.
catch
(
(
err
)
=>
{
Flash
(
err
||
__
(
'
Something went wrong trying to change the confidentiality of this issue
'
),
);
...
...
app/assets/javascripts/sidebar/components/reviewers/collapsed_reviewer_list.vue
View file @
bcbbcb2e
...
...
@@ -33,7 +33,7 @@ export default {
return
this
.
users
.
length
>
2
;
},
allReviewersCanMerge
()
{
return
this
.
users
.
every
(
user
=>
user
.
can_merge
);
return
this
.
users
.
every
(
(
user
)
=>
user
.
can_merge
);
},
sidebarAvatarCounter
()
{
if
(
this
.
users
.
length
>
DEFAULT_MAX_COUNTER
)
{
...
...
@@ -48,7 +48,7 @@ export default {
return
this
.
users
.
slice
(
0
,
collapsedLength
);
},
tooltipTitleMergeStatus
()
{
const
mergeLength
=
this
.
users
.
filter
(
u
=>
u
.
can_merge
).
length
;
const
mergeLength
=
this
.
users
.
filter
(
(
u
)
=>
u
.
can_merge
).
length
;
if
(
mergeLength
===
this
.
users
.
length
)
{
return
''
;
...
...
@@ -64,7 +64,7 @@ export default {
tooltipTitle
()
{
const
maxRender
=
Math
.
min
(
DEFAULT_RENDER_COUNT
,
this
.
users
.
length
);
const
renderUsers
=
this
.
users
.
slice
(
0
,
maxRender
);
const
names
=
renderUsers
.
map
(
u
=>
u
.
name
);
const
names
=
renderUsers
.
map
(
(
u
)
=>
u
.
name
);
if
(
!
this
.
users
.
length
)
{
return
__
(
'
Reviewer(s)
'
);
...
...
app/assets/javascripts/sidebar/components/reviewers/reviewers.vue
View file @
bcbbcb2e
...
...
@@ -36,8 +36,8 @@ export default {
return
!
this
.
users
.
length
;
},
sortedReviewers
()
{
const
canMergeUsers
=
this
.
users
.
filter
(
user
=>
user
.
can_merge
);
const
canNotMergeUsers
=
this
.
users
.
filter
(
user
=>
!
user
.
can_merge
);
const
canMergeUsers
=
this
.
users
.
filter
(
(
user
)
=>
user
.
can_merge
);
const
canNotMergeUsers
=
this
.
users
.
filter
(
(
user
)
=>
!
user
.
can_merge
);
return
[...
canMergeUsers
,
...
canNotMergeUsers
];
},
...
...
app/assets/javascripts/sidebar/components/severity/sidebar_severity.vue
View file @
bcbbcb2e
...
...
@@ -41,7 +41,7 @@ export default {
type
:
String
,
required
:
false
,
default
:
ISSUABLE_TYPES
.
INCIDENT
,
validator
:
value
=>
{
validator
:
(
value
)
=>
{
// currently severity is supported only for incidents, but this list might be extended
return
[
ISSUABLE_TYPES
.
INCIDENT
].
includes
(
value
);
},
...
...
@@ -67,7 +67,7 @@ export default {
return
this
.
isDropdownShowing
?
'
show
'
:
'
gl-display-none
'
;
},
selectedItem
()
{
return
this
.
severitiesList
.
find
(
severity
=>
severity
.
value
===
this
.
severity
);
return
this
.
severitiesList
.
find
(
(
severity
)
=>
severity
.
value
===
this
.
severity
);
},
},
mounted
()
{
...
...
@@ -106,7 +106,7 @@ export default {
projectPath
:
this
.
projectPath
,
},
})
.
then
(
resp
=>
{
.
then
(
(
resp
)
=>
{
const
{
data
:
{
issueSetSeverity
:
{
...
...
app/assets/javascripts/sidebar/components/time_tracking/sidebar_time_tracking.vue
View file @
bcbbcb2e
...
...
@@ -27,7 +27,7 @@ export default {
listenForQuickActions
()
{
$
(
document
).
on
(
'
ajax:success
'
,
'
.gfm-form
'
,
this
.
quickActionListened
);
eventHub
.
$on
(
'
timeTrackingUpdated
'
,
data
=>
{
eventHub
.
$on
(
'
timeTrackingUpdated
'
,
(
data
)
=>
{
this
.
quickActionListened
({
detail
:
[
data
]
});
});
},
...
...
app/assets/javascripts/sidebar/lib/sidebar_move_issue.js
View file @
bcbbcb2e
...
...
@@ -46,14 +46,14 @@ class SidebarMoveIssue {
()
=>
new
window
.
Flash
(
__
(
'
An error occurred while fetching projects autocomplete.
'
)),
);
},
renderRow
:
project
=>
`
renderRow
:
(
project
)
=>
`
<li>
<a href="#" class="js-move-issue-dropdown-item">
${
escape
(
project
.
name_with_namespace
)}
</a>
</li>
`
,
clicked
:
options
=>
{
clicked
:
(
options
)
=>
{
const
project
=
options
.
selectedObj
;
const
selectedProjectId
=
options
.
isMarking
?
project
.
id
:
0
;
this
.
mediator
.
setMoveToProjectId
(
selectedProjectId
);
...
...
app/assets/javascripts/sidebar/mount_milestone_sidebar.js
View file @
bcbbcb2e
...
...
@@ -16,7 +16,7 @@ export default class SidebarMilestone {
components
:
{
timeTracker
,
},
render
:
createElement
=>
render
:
(
createElement
)
=>
createElement
(
'
timeTracker
'
,
{
props
:
{
timeEstimate
:
parseInt
(
timeEstimate
,
10
),
...
...
app/assets/javascripts/sidebar/mount_sidebar.js
View file @
bcbbcb2e
...
...
@@ -40,7 +40,7 @@ function mountAssigneesComponent(mediator) {
components
:
{
SidebarAssignees
,
},
render
:
createElement
=>
render
:
(
createElement
)
=>
createElement
(
'
sidebar-assignees
'
,
{
props
:
{
mediator
,
...
...
@@ -70,7 +70,7 @@ function mountReviewersComponent(mediator) {
components
:
{
SidebarReviewers
,
},
render
:
createElement
=>
render
:
(
createElement
)
=>
createElement
(
'
sidebar-reviewers
'
,
{
props
:
{
mediator
,
...
...
@@ -105,7 +105,7 @@ export function mountSidebarLabels() {
allowScopedLabels
:
parseBoolean
(
el
.
dataset
.
allowScopedLabels
),
initiallySelectedLabels
:
JSON
.
parse
(
el
.
dataset
.
selectedLabels
),
},
render
:
createElement
=>
createElement
(
SidebarLabels
),
render
:
(
createElement
)
=>
createElement
(
SidebarLabels
),
});
}
...
...
@@ -128,7 +128,7 @@ function mountConfidentialComponent(mediator) {
components
:
{
ConfidentialIssueSidebar
,
},
render
:
createElement
=>
render
:
(
createElement
)
=>
createElement
(
'
confidential-issue-sidebar
'
,
{
props
:
{
iid
:
String
(
iid
),
...
...
@@ -163,20 +163,20 @@ function mountLockComponent() {
);
}
else
{
importStore
=
import
(
/* webpackChunkName: 'mrNotesStore' */
'
~/mr_notes/stores
'
).
then
(
store
=>
store
.
default
,
(
store
)
=>
store
.
default
,
);
}
importStore
.
then
(
store
=>
(
store
)
=>
new
Vue
({
el
,
store
,
provide
:
{
fullPath
,
},
render
:
createElement
=>
render
:
(
createElement
)
=>
createElement
(
IssuableLockForm
,
{
props
:
{
isEditable
:
initialData
.
is_editable
,
...
...
@@ -200,7 +200,7 @@ function mountParticipantsComponent(mediator) {
components
:
{
sidebarParticipants
,
},
render
:
createElement
=>
render
:
(
createElement
)
=>
createElement
(
'
sidebar-participants
'
,
{
props
:
{
mediator
,
...
...
@@ -220,7 +220,7 @@ function mountSubscriptionsComponent(mediator) {
components
:
{
sidebarSubscriptions
,
},
render
:
createElement
=>
render
:
(
createElement
)
=>
createElement
(
'
sidebar-subscriptions
'
,
{
props
:
{
mediator
,
...
...
@@ -240,7 +240,7 @@ function mountTimeTrackingComponent() {
components
:
{
SidebarTimeTracking
,
},
render
:
createElement
=>
createElement
(
'
sidebar-time-tracking
'
,
{}),
render
:
(
createElement
)
=>
createElement
(
'
sidebar-time-tracking
'
,
{}),
});
}
...
...
@@ -262,7 +262,7 @@ function mountSeverityComponent() {
components
:
{
SidebarSeverity
,
},
render
:
createElement
=>
render
:
(
createElement
)
=>
createElement
(
'
sidebar-severity
'
,
{
props
:
{
projectPath
:
fullPath
,
...
...
app/assets/javascripts/sidebar/sidebar_mediator.js
View file @
bcbbcb2e
...
...
@@ -30,7 +30,7 @@ export default class SidebarMediator {
}
saveAssignees
(
field
)
{
const
selected
=
this
.
store
.
assignees
.
map
(
u
=>
u
.
id
);
const
selected
=
this
.
store
.
assignees
.
map
(
(
u
)
=>
u
.
id
);
// If there are no ids, that means we have to unassign (which is id = 0)
// And it only accepts an array, hence [0]
...
...
@@ -41,7 +41,7 @@ export default class SidebarMediator {
}
saveReviewers
(
field
)
{
const
selected
=
this
.
store
.
reviewers
.
map
(
u
=>
u
.
id
);
const
selected
=
this
.
store
.
reviewers
.
map
(
(
u
)
=>
u
.
id
);
// If there are no ids, that means we have to unassign (which is id = 0)
// And it only accepts an array, hence [0]
...
...
@@ -80,7 +80,7 @@ export default class SidebarMediator {
this
.
store
.
setSubscribedState
(
!
this
.
store
.
subscribed
);
this
.
store
.
setFetchingState
(
'
subscriptions
'
,
false
);
})
.
catch
(
err
=>
{
.
catch
(
(
err
)
=>
{
this
.
store
.
setFetchingState
(
'
subscriptions
'
,
false
);
throw
err
;
});
...
...
app/assets/javascripts/sidebar/utils.js
View file @
bcbbcb2e
export
const
toLabelGid
=
id
=>
`gid://gitlab/Label/
${
id
}
`
;
export
const
toLabelGid
=
(
id
)
=>
`gid://gitlab/Label/
${
id
}
`
;
app/assets/javascripts/single_file_diff.js
View file @
bcbbcb2e
...
...
@@ -39,7 +39,7 @@ export default class SingleFileDiff {
this
.
$chevronDownIcon
.
removeClass
(
'
gl-display-none
'
);
}
$
(
'
.js-file-title, .click-to-expand
'
,
this
.
file
).
on
(
'
click
'
,
e
=>
{
$
(
'
.js-file-title, .click-to-expand
'
,
this
.
file
).
on
(
'
click
'
,
(
e
)
=>
{
this
.
toggleDiff
(
$
(
e
.
target
));
});
}
...
...
app/assets/javascripts/smart_interval.js
View file @
bcbbcb2e
...
...
@@ -119,7 +119,7 @@ export default class SmartInterval {
.
then
(()
=>
{
this
.
isLoading
=
false
;
})
.
catch
(
err
=>
{
.
catch
(
(
err
)
=>
{
this
.
isLoading
=
false
;
throw
err
;
});
...
...
app/assets/javascripts/snippet/collapsible_input.js
View file @
bcbbcb2e
const
hide
=
el
=>
el
.
classList
.
add
(
'
d-none
'
);
const
show
=
el
=>
el
.
classList
.
remove
(
'
d-none
'
);
const
hide
=
(
el
)
=>
el
.
classList
.
add
(
'
d-none
'
);
const
show
=
(
el
)
=>
el
.
classList
.
remove
(
'
d-none
'
);
const
setupCollapsibleInput
=
el
=>
{
const
setupCollapsibleInput
=
(
el
)
=>
{
const
collapsedEl
=
el
.
querySelector
(
'
.js-collapsed
'
);
const
expandedEl
=
el
.
querySelector
(
'
.js-expanded
'
);
const
collapsedInputEl
=
collapsedEl
.
querySelector
(
'
textarea,input,select
'
);
...
...
@@ -21,7 +21,7 @@ const setupCollapsibleInput = el => {
// NOTE:
// We add focus listener to all form inputs so that we can collapse
// when something is focused that's not the expanded input.
formEl
.
addEventListener
(
'
focusin
'
,
e
=>
{
formEl
.
addEventListener
(
'
focusin
'
,
(
e
)
=>
{
if
(
e
.
target
===
collapsedInputEl
)
{
expand
();
expandedInputEl
.
focus
();
...
...
app/assets/javascripts/snippets/components/edit.vue
View file @
bcbbcb2e
...
...
@@ -73,7 +73,7 @@ export default {
return
this
.
actions
.
length
>
0
;
},
hasValidBlobs
()
{
return
this
.
actions
.
every
(
x
=>
x
.
content
);
return
this
.
actions
.
every
(
(
x
)
=>
x
.
content
);
},
updatePrevented
()
{
return
this
.
snippet
.
title
===
''
||
!
this
.
hasValidBlobs
||
this
.
isUpdating
;
...
...
@@ -130,7 +130,7 @@ export default {
},
getAttachedFiles
()
{
const
fileInputs
=
Array
.
from
(
this
.
$el
.
querySelectorAll
(
'
[name="files[]"]
'
));
return
fileInputs
.
map
(
node
=>
node
.
value
);
return
fileInputs
.
map
(
(
node
)
=>
node
.
value
);
},
createMutation
()
{
return
{
...
...
@@ -166,7 +166,7 @@ export default {
redirectTo
(
baseObj
.
snippet
.
webUrl
);
}
})
.
catch
(
e
=>
{
.
catch
(
(
e
)
=>
{
this
.
flashAPIFailure
(
e
);
});
},
...
...
app/assets/javascripts/snippets/components/snippet_blob_actions_edit.vue
View file @
bcbbcb2e
...
...
@@ -74,7 +74,7 @@ export default {
this
.
blobsOrig
=
blobsById
;
this
.
blobs
=
cloneDeep
(
blobsById
);
this
.
blobIds
=
blobs
.
map
(
x
=>
x
.
id
);
this
.
blobIds
=
blobs
.
map
(
(
x
)
=>
x
.
id
);
// Show 1 empty blob if none exist
if
(
!
this
.
blobIds
.
length
)
{
...
...
@@ -108,7 +108,7 @@ export default {
this
.
blobIds
.
push
(
blob
.
id
);
},
deleteBlob
(
id
)
{
this
.
blobIds
=
this
.
blobIds
.
filter
(
x
=>
x
!==
id
);
this
.
blobIds
=
this
.
blobIds
.
filter
(
(
x
)
=>
x
!==
id
);
this
.
$delete
(
this
.
blobs
,
id
);
},
updateBlob
(
id
,
args
)
{
...
...
app/assets/javascripts/snippets/components/snippet_blob_edit.vue
View file @
bcbbcb2e
...
...
@@ -55,12 +55,12 @@ export default {
axios
.
get
(
url
,
{
// This prevents axios from automatically JSON.parse response
transformResponse
:
[
f
=>
f
],
transformResponse
:
[
(
f
)
=>
f
],
})
.
then
(
res
=>
{
.
then
(
(
res
)
=>
{
this
.
notifyAboutUpdates
({
content
:
res
.
data
});
})
.
catch
(
e
=>
this
.
flashAPIFailure
(
e
));
.
catch
(
(
e
)
=>
this
.
flashAPIFailure
(
e
));
},
flashAPIFailure
(
err
)
{
Flash
(
sprintf
(
SNIPPET_BLOB_CONTENT_FETCH_ERROR
,
{
err
}));
...
...
app/assets/javascripts/snippets/components/snippet_blob_view.vue
View file @
bcbbcb2e
...
...
@@ -88,7 +88,7 @@ export default {
const
{
blobs
:
{
nodes
:
dataBlobs
},
}
=
data
.
snippets
.
nodes
[
0
];
const
updatedBlobData
=
dataBlobs
.
find
(
blob
=>
blob
.
path
===
blobPath
);
const
updatedBlobData
=
dataBlobs
.
find
(
(
blob
)
=>
blob
.
path
===
blobPath
);
return
updatedBlobData
.
richData
||
updatedBlobData
.
plainData
;
},
},
...
...
app/assets/javascripts/snippets/components/snippet_header.vue
View file @
bcbbcb2e
...
...
@@ -69,7 +69,7 @@ export default {
},
computed
:
{
snippetHasBinary
()
{
return
Boolean
(
this
.
snippet
.
blobs
.
find
(
blob
=>
blob
.
binary
));
return
Boolean
(
this
.
snippet
.
blobs
.
find
(
(
blob
)
=>
blob
.
binary
));
},
authoredMessage
()
{
return
this
.
snippet
.
author
...
...
@@ -164,7 +164,7 @@ export default {
this
.
closeDeleteModal
();
this
.
redirectToSnippets
();
})
.
catch
(
err
=>
{
.
catch
(
(
err
)
=>
{
this
.
isDeleting
=
false
;
this
.
errorMessage
=
err
.
message
;
});
...
...
app/assets/javascripts/snippets/mixins/snippets.js
View file @
bcbbcb2e
...
...
@@ -11,7 +11,7 @@ export const getSnippetMixin = {
ids
:
[
this
.
snippetGid
],
};
},
update
:
data
=>
{
update
:
(
data
)
=>
{
const
res
=
data
.
snippets
.
nodes
[
0
];
if
(
res
)
{
res
.
blobs
=
res
.
blobs
.
nodes
;
...
...
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