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
81853752
Commit
81853752
authored
Dec 23, 2020
by
Lukas Eipert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Run prettier on 31 files - 39 of 73
Part of our prettier migration; changing the arrow-parens style.
parent
dc6c2412
Changes
31
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
68 additions
and
68 deletions
+68
-68
ee/app/assets/javascripts/oncall_schedules/utils/cache_updates.js
...ssets/javascripts/oncall_schedules/utils/cache_updates.js
+3
-3
ee/app/assets/javascripts/oncall_schedules/utils/common_utils.js
...assets/javascripts/oncall_schedules/utils/common_utils.js
+1
-1
ee/app/assets/javascripts/pages/admin/application_settings/ci_cd/ci_template.js
...pts/pages/admin/application_settings/ci_cd/ci_template.js
+3
-3
ee/app/assets/javascripts/pages/admin/application_settings/index.js
...ets/javascripts/pages/admin/application_settings/index.js
+2
-2
ee/app/assets/javascripts/pages/admin/application_settings/integrations/index.js
...ts/pages/admin/application_settings/integrations/index.js
+2
-2
ee/app/assets/javascripts/pages/admin/emails/show/admin_email_select.js
...javascripts/pages/admin/emails/show/admin_email_select.js
+3
-3
ee/app/assets/javascripts/pages/admin/geo/index.js
ee/app/assets/javascripts/pages/admin/geo/index.js
+1
-1
ee/app/assets/javascripts/pages/admin/licenses/new/index.js
ee/app/assets/javascripts/pages/admin/licenses/new/index.js
+1
-1
ee/app/assets/javascripts/pages/admin/users/pipeline_minutes/reset_button.vue
...ripts/pages/admin/users/pipeline_minutes/reset_button.vue
+1
-1
ee/app/assets/javascripts/pages/groups/saml_providers/saml_members/store/actions.js
...pages/groups/saml_providers/saml_members/store/actions.js
+1
-1
ee/app/assets/javascripts/pages/groups/saml_providers/saml_members/store/index.js
...s/pages/groups/saml_providers/saml_members/store/index.js
+1
-1
ee/app/assets/javascripts/pages/projects/pipelines/show/codequality_report.js
...ripts/pages/projects/pipelines/show/codequality_report.js
+2
-2
ee/app/assets/javascripts/pages/projects/pipelines/show/license_report.js
...vascripts/pages/projects/pipelines/show/license_report.js
+1
-1
ee/app/assets/javascripts/pages/projects/settings/ci_cd/show/index.js
...s/javascripts/pages/projects/settings/ci_cd/show/index.js
+1
-1
ee/app/assets/javascripts/pages/projects/settings/repository/show/ee_mirror_repos.js
...ages/projects/settings/repository/show/ee_mirror_repos.js
+2
-2
ee/app/assets/javascripts/path_locks.js
ee/app/assets/javascripts/path_locks.js
+1
-1
ee/app/assets/javascripts/projects/merge_requests/blocking_mr_input.js
.../javascripts/projects/merge_requests/blocking_mr_input.js
+1
-1
ee/app/assets/javascripts/protected_environments/protected_environment_create.js
...ts/protected_environments/protected_environment_create.js
+3
-3
ee/app/assets/javascripts/protected_environments/protected_environment_edit.js
...ipts/protected_environments/protected_environment_edit.js
+2
-2
ee/app/assets/javascripts/protected_tags/protected_tag_create.js
...assets/javascripts/protected_tags/protected_tag_create.js
+2
-2
ee/app/assets/javascripts/protected_tags/protected_tag_edit.js
...p/assets/javascripts/protected_tags/protected_tag_edit.js
+2
-2
ee/app/assets/javascripts/registrations/groups/new/index.js
ee/app/assets/javascripts/registrations/groups/new/index.js
+2
-2
ee/app/assets/javascripts/related_items_tree/components/related_items_tree_app.vue
.../related_items_tree/components/related_items_tree_app.vue
+1
-1
ee/app/assets/javascripts/related_items_tree/related_items_tree_bundle.js
...vascripts/related_items_tree/related_items_tree_bundle.js
+1
-1
ee/app/assets/javascripts/related_items_tree/store/actions.js
...pp/assets/javascripts/related_items_tree/store/actions.js
+4
-4
ee/app/assets/javascripts/related_items_tree/store/getters.js
...pp/assets/javascripts/related_items_tree/store/getters.js
+3
-3
ee/app/assets/javascripts/related_items_tree/utils/epic_utils.js
...assets/javascripts/related_items_tree/utils/epic_utils.js
+6
-6
ee/app/assets/javascripts/repository/index.js
ee/app/assets/javascripts/repository/index.js
+1
-1
ee/app/assets/javascripts/repository/utils/commit.js
ee/app/assets/javascripts/repository/utils/commit.js
+1
-1
ee/app/assets/javascripts/requirements/components/requirement_item.vue
.../javascripts/requirements/components/requirement_item.vue
+2
-2
ee/app/assets/javascripts/requirements/components/requirements_root.vue
...javascripts/requirements/components/requirements_root.vue
+11
-11
No files found.
ee/app/assets/javascripts/oncall_schedules/utils/cache_updates.js
View file @
81853752
...
...
@@ -13,7 +13,7 @@ const addScheduleToStore = (store, query, { oncallSchedule: schedule }, variable
variables
,
});
const
data
=
produce
(
sourceData
,
draftData
=>
{
const
data
=
produce
(
sourceData
,
(
draftData
)
=>
{
draftData
.
project
.
incidentManagementOncallSchedules
.
nodes
.
push
(
schedule
);
});
...
...
@@ -35,7 +35,7 @@ const deleteScheduleFromStore = (store, query, { oncallScheduleDestroy }, variab
variables
,
});
const
data
=
produce
(
sourceData
,
draftData
=>
{
const
data
=
produce
(
sourceData
,
(
draftData
)
=>
{
// eslint-disable-next-line no-param-reassign
draftData
.
project
.
incidentManagementOncallSchedules
.
nodes
=
draftData
.
project
.
incidentManagementOncallSchedules
.
nodes
.
filter
(
({
id
})
=>
id
!==
schedule
.
id
,
...
...
@@ -60,7 +60,7 @@ const updateScheduleFromStore = (store, query, { oncallScheduleUpdate }, variabl
variables
,
});
const
data
=
produce
(
sourceData
,
draftData
=>
{
const
data
=
produce
(
sourceData
,
(
draftData
)
=>
{
// eslint-disable-next-line no-param-reassign
draftData
.
project
.
incidentManagementOncallSchedules
.
nodes
=
[
...
draftData
.
project
.
incidentManagementOncallSchedules
.
nodes
,
...
...
ee/app/assets/javascripts/oncall_schedules/utils/common_utils.js
View file @
81853752
...
...
@@ -11,7 +11,7 @@ import { getDateInFuture } from '~/lib/utils/datetime_utility';
*
* @returns {String}
*/
export
const
getFormattedTimezone
=
tz
=>
{
export
const
getFormattedTimezone
=
(
tz
)
=>
{
return
sprintf
(
__
(
'
(UTC %{offset}) %{timezone}
'
),
{
offset
:
tz
.
formatted_offset
,
timezone
:
`
${
tz
.
abbr
}
${
tz
.
name
}
`
,
...
...
ee/app/assets/javascripts/pages/admin/application_settings/ci_cd/ci_template.js
View file @
81853752
...
...
@@ -16,12 +16,12 @@ export default class CiTemplate {
selectable
:
true
,
filterable
:
true
,
allowClear
:
true
,
toggleLabel
:
item
=>
item
.
name
,
toggleLabel
:
(
item
)
=>
item
.
name
,
search
:
{
fields
:
[
'
name
'
],
},
clicked
:
clickEvent
=>
this
.
updateInputValue
(
clickEvent
),
text
:
item
=>
item
.
name
,
clicked
:
(
clickEvent
)
=>
this
.
updateInputValue
(
clickEvent
),
text
:
(
item
)
=>
item
.
name
,
});
this
.
setDropdownToggle
();
...
...
ee/app/assets/javascripts/pages/admin/application_settings/index.js
View file @
81853752
...
...
@@ -29,7 +29,7 @@ const getDropdownConfig = (placeholder, apiPath, textProp) => ({
},
results
(
data
)
{
return
{
results
:
data
.
map
(
entity
=>
({
results
:
data
.
map
(
(
entity
)
=>
({
id
:
entity
.
id
,
text
:
entity
[
textProp
],
})),
...
...
@@ -45,7 +45,7 @@ const $container = $('#js-elasticsearch-settings');
$container
.
find
(
'
.js-limit-checkbox
'
)
.
on
(
'
change
'
,
e
=>
.
on
(
'
change
'
,
(
e
)
=>
onLimitCheckboxChange
(
e
.
currentTarget
.
checked
,
$container
.
find
(
'
.js-limit-namespaces
'
),
...
...
ee/app/assets/javascripts/pages/admin/application_settings/integrations/index.js
View file @
81853752
...
...
@@ -27,7 +27,7 @@ const getDropdownConfig = (placeholder, url) => ({
},
results
(
data
)
{
return
{
results
:
data
.
map
(
entity
=>
({
results
:
data
.
map
(
(
entity
)
=>
({
id
:
entity
.
source_id
,
text
:
entity
.
path
,
})),
...
...
@@ -44,7 +44,7 @@ const $container = $('#js-elasticsearch-settings');
$container
.
find
(
'
.js-limit-checkbox
'
)
.
on
(
'
change
'
,
e
=>
.
on
(
'
change
'
,
(
e
)
=>
onLimitCheckboxChange
(
e
.
currentTarget
.
checked
,
$container
.
find
(
'
.js-limit-namespaces
'
),
...
...
ee/app/assets/javascripts/pages/admin/emails/show/admin_email_select.js
View file @
81853752
...
...
@@ -4,7 +4,7 @@ import { sprintf, __ } from '~/locale';
import
{
sanitizeItem
}
from
'
~/frequent_items/utils
'
;
import
{
loadCSSFile
}
from
'
~/lib/utils/css_utils
'
;
const
formatResult
=
selectedItem
=>
{
const
formatResult
=
(
selectedItem
)
=>
{
if
(
selectedItem
.
path_with_namespace
)
{
return
`<div class='project-result'> <div class='project-name'>
${
selectedItem
.
name
}
</div> <div class='project-path'>
${
selectedItem
.
path_with_namespace
}
</div> </div>`
;
}
else
if
(
selectedItem
.
path
)
{
...
...
@@ -15,7 +15,7 @@ const formatResult = selectedItem => {
)}
</div> <div class='group-path'>
${
__
(
'
All groups and projects
'
)}
</div> </div>`
;
};
const
formatSelection
=
selectedItem
=>
{
const
formatSelection
=
(
selectedItem
)
=>
{
if
(
selectedItem
.
path_with_namespace
)
{
return
sprintf
(
__
(
'
Project: %{name}
'
),
{
name
:
selectedItem
.
name
});
}
else
if
(
selectedItem
.
path
)
{
...
...
@@ -24,7 +24,7 @@ const formatSelection = selectedItem => {
return
__
(
'
All groups and projects
'
);
};
const
QueryAdmin
=
query
=>
{
const
QueryAdmin
=
(
query
)
=>
{
const
groupsFetch
=
Api
.
groups
(
query
.
term
,
{});
const
projectsFetch
=
Api
.
projects
(
query
.
term
,
{
order_by
:
'
id
'
,
...
...
ee/app/assets/javascripts/pages/admin/geo/index.js
View file @
81853752
...
...
@@ -6,4 +6,4 @@ initVueAlerts();
initConfirmModal
();
const
toasts
=
document
.
querySelectorAll
(
'
.js-toast-message
'
);
toasts
.
forEach
(
toast
=>
showToast
(
toast
.
dataset
.
message
));
toasts
.
forEach
(
(
toast
)
=>
showToast
(
toast
.
dataset
.
message
));
ee/app/assets/javascripts/pages/admin/licenses/new/index.js
View file @
81853752
...
...
@@ -15,6 +15,6 @@ const toggleUploadLicenseButton = () => {
uploadLicenseBtn
.
toggleAttribute
(
'
disabled
'
,
!
acceptEULACheckBox
.
checked
);
};
licenseType
.
forEach
(
el
=>
el
.
addEventListener
(
'
change
'
,
showLicenseType
));
licenseType
.
forEach
(
(
el
)
=>
el
.
addEventListener
(
'
change
'
,
showLicenseType
));
acceptEULACheckBox
.
addEventListener
(
'
change
'
,
toggleUploadLicenseButton
);
showLicenseType
();
ee/app/assets/javascripts/pages/admin/users/pipeline_minutes/reset_button.vue
View file @
81853752
...
...
@@ -17,7 +17,7 @@ export default {
resetPipelineMinutes
()
{
axios
.
post
(
this
.
resetMinutesPath
)
.
then
(
resp
=>
{
.
then
(
(
resp
)
=>
{
if
(
resp
.
status
===
statusCodes
.
OK
)
{
this
.
$toast
.
show
(
__
(
'
User pipeline minutes were successfully reset.
'
));
}
...
...
ee/app/assets/javascripts/pages/groups/saml_providers/saml_members/store/actions.js
View file @
81853752
...
...
@@ -10,7 +10,7 @@ export function fetchPage({ commit, state }, newPage) {
page
:
newPage
||
state
.
pageInfo
.
page
,
per_page
:
state
.
pageInfo
.
perPage
,
})
.
then
(
response
=>
{
.
then
(
(
response
)
=>
{
const
{
headers
,
data
}
=
response
;
const
pageInfo
=
parseIntPagination
(
normalizeHeaders
(
headers
));
commit
(
types
.
RECEIVE_SAML_MEMBERS_SUCCESS
,
{
...
...
ee/app/assets/javascripts/pages/groups/saml_providers/saml_members/store/index.js
View file @
81853752
...
...
@@ -7,7 +7,7 @@ import state from './state';
Vue
.
use
(
Vuex
);
export
default
initialState
=>
export
default
(
initialState
)
=>
new
Vuex
.
Store
({
actions
,
mutations
,
...
...
ee/app/assets/javascripts/pages/projects/pipelines/show/codequality_report.js
View file @
81853752
...
...
@@ -21,7 +21,7 @@ export default () => {
if
(
isCodequalityTabActive
)
{
store
.
dispatch
(
fetchReportAction
);
}
else
{
const
tabClickHandler
=
e
=>
{
const
tabClickHandler
=
(
e
)
=>
{
if
(
e
.
target
.
className
===
'
codequality-tab
'
)
{
store
.
dispatch
(
fetchReportAction
);
tabsElement
.
removeEventListener
(
'
click
'
,
tabClickHandler
);
...
...
@@ -38,7 +38,7 @@ export default () => {
CodequalityReportApp
,
},
store
,
render
:
createElement
=>
createElement
(
'
codequality-report-app
'
),
render
:
(
createElement
)
=>
createElement
(
'
codequality-report-app
'
),
});
}
};
ee/app/assets/javascripts/pages/projects/pipelines/show/license_report.js
View file @
81853752
...
...
@@ -34,7 +34,7 @@ export default () => {
reportSectionClass
:
'
split-report-section
'
,
},
on
:
{
updateBadgeCount
:
count
=>
{
updateBadgeCount
:
(
count
)
=>
{
updateBadgeCount
(
'
.js-licenses-counter
'
,
count
);
},
},
...
...
ee/app/assets/javascripts/pages/projects/settings/ci_cd/show/index.js
View file @
81853752
...
...
@@ -27,7 +27,7 @@ if (el?.dataset?.apiUrl) {
});
}
toasts
.
forEach
(
toast
=>
showToast
(
toast
.
dataset
.
message
));
toasts
.
forEach
(
(
toast
)
=>
showToast
(
toast
.
dataset
.
message
));
// eslint-disable-next-line no-new
new
ProtectedEnvironmentCreate
();
...
...
ee/app/assets/javascripts/pages/projects/settings/repository/show/ee_mirror_repos.js
View file @
81853752
...
...
@@ -37,7 +37,7 @@ export default class EEMirrorRepos extends MirrorRepos {
}
hideForm
()
{
return
new
Promise
(
resolve
=>
{
return
new
Promise
(
(
resolve
)
=>
{
if
(
!
this
.
$insertionPoint
.
html
())
return
resolve
();
this
.
$insertionPoint
.
one
(
'
hidden.bs.collapse
'
,
()
=>
{
...
...
@@ -48,7 +48,7 @@ export default class EEMirrorRepos extends MirrorRepos {
}
showForm
()
{
return
new
Promise
(
resolve
=>
{
return
new
Promise
(
(
resolve
)
=>
{
this
.
$insertionPoint
.
one
(
'
shown.bs.collapse
'
,
()
=>
{
resolve
();
});
...
...
ee/app/assets/javascripts/path_locks.js
View file @
81853752
...
...
@@ -4,7 +4,7 @@ import { __ } from '~/locale';
import
axios
from
'
~/lib/utils/axios_utils
'
;
export
default
function
initPathLocks
(
url
,
path
)
{
$
(
'
a.path-lock
'
).
on
(
'
click
'
,
e
=>
{
$
(
'
a.path-lock
'
).
on
(
'
click
'
,
(
e
)
=>
{
e
.
preventDefault
();
axios
...
...
ee/app/assets/javascripts/projects/merge_requests/blocking_mr_input.js
View file @
81853752
...
...
@@ -2,7 +2,7 @@ import Vue from 'vue';
import
BlockingMrInput
from
'
ee/projects/merge_requests/blocking_mr_input_root.vue
'
;
import
{
n__
}
from
'
~/locale
'
;
export
default
el
=>
{
export
default
(
el
)
=>
{
if
(
!
el
)
{
return
null
;
}
...
...
ee/app/assets/javascripts/protected_environments/protected_environment_create.js
View file @
81853752
...
...
@@ -59,7 +59,7 @@ export default class ProtectedEnvironmentCreate {
.
get
(
gon
.
search_unprotected_environments_url
,
{
params
:
{
query
:
term
}
})
.
then
(({
data
})
=>
{
const
environments
=
[].
concat
(
data
);
const
results
=
environments
.
map
(
environment
=>
({
const
results
=
environments
.
map
(
(
environment
)
=>
({
id
:
environment
,
text
:
environment
,
title
:
environment
,
...
...
@@ -80,12 +80,12 @@ export default class ProtectedEnvironmentCreate {
},
};
Object
.
keys
(
ACCESS_LEVELS
).
forEach
(
level
=>
{
Object
.
keys
(
ACCESS_LEVELS
).
forEach
(
(
level
)
=>
{
const
accessLevel
=
ACCESS_LEVELS
[
level
];
const
selectedItems
=
this
[
`
${
accessLevel
}
_dropdown`
].
getSelectedItems
();
const
levelAttributes
=
[];
selectedItems
.
forEach
(
item
=>
{
selectedItems
.
forEach
(
(
item
)
=>
{
if
(
item
.
type
===
LEVEL_TYPES
.
USER
)
{
levelAttributes
.
push
({
user_id
:
item
.
user_id
,
...
...
ee/app/assets/javascripts/protected_environments/protected_environment_edit.js
View file @
81853752
...
...
@@ -60,7 +60,7 @@ export default class ProtectedEnvironmentEdit {
.
then
(({
data
})
=>
{
this
.
hasChanges
=
false
;
Object
.
keys
(
ACCESS_LEVELS
).
forEach
(
level
=>
{
Object
.
keys
(
ACCESS_LEVELS
).
forEach
(
(
level
)
=>
{
const
accessLevelName
=
ACCESS_LEVELS
[
level
];
// The data coming from server will be the new persisted *state* for each dropdown
...
...
@@ -75,7 +75,7 @@ export default class ProtectedEnvironmentEdit {
}
setSelectedItemsToDropdown
(
items
=
[],
dropdownName
)
{
const
itemsToAdd
=
items
.
map
(
currentItem
=>
{
const
itemsToAdd
=
items
.
map
(
(
currentItem
)
=>
{
if
(
currentItem
.
user_id
)
{
// Do this only for users for now
// get the current data for selected items
...
...
ee/app/assets/javascripts/protected_tags/protected_tag_create.js
View file @
81853752
...
...
@@ -64,12 +64,12 @@ export default class ProtectedTagCreate {
},
};
Object
.
keys
(
ACCESS_LEVELS
).
forEach
(
level
=>
{
Object
.
keys
(
ACCESS_LEVELS
).
forEach
(
(
level
)
=>
{
const
accessLevel
=
ACCESS_LEVELS
[
level
];
const
selectedItems
=
this
[
`
${
ACCESS_LEVELS
.
CREATE
}
_dropdown`
].
getSelectedItems
();
const
levelAttributes
=
[];
selectedItems
.
forEach
(
item
=>
{
selectedItems
.
forEach
(
(
item
)
=>
{
if
(
item
.
type
===
LEVEL_TYPES
.
USER
)
{
levelAttributes
.
push
({
user_id
:
item
.
user_id
,
...
...
ee/app/assets/javascripts/protected_tags/protected_tag_edit.js
View file @
81853752
...
...
@@ -60,7 +60,7 @@ export default class ProtectedTagEdit {
.
then
(({
data
})
=>
{
this
.
hasChanges
=
false
;
Object
.
keys
(
ACCESS_LEVELS
).
forEach
(
level
=>
{
Object
.
keys
(
ACCESS_LEVELS
).
forEach
(
(
level
)
=>
{
const
accessLevelName
=
ACCESS_LEVELS
[
level
];
// The data coming from server will be the new persisted *state* for each dropdown
...
...
@@ -74,7 +74,7 @@ export default class ProtectedTagEdit {
}
setSelectedItemsToDropdown
(
items
=
[],
dropdownName
)
{
const
itemsToAdd
=
items
.
map
(
currentItem
=>
{
const
itemsToAdd
=
items
.
map
(
(
currentItem
)
=>
{
if
(
currentItem
.
user_id
)
{
// Do this only for users for now
// get the current data for selected items
...
...
ee/app/assets/javascripts/registrations/groups/new/index.js
View file @
81853752
...
...
@@ -32,7 +32,7 @@ function toggleTrialForm(trial) {
}
form
.
classList
.
toggle
(
'
hidden
'
,
!
trial
);
fields
.
forEach
(
f
=>
{
fields
.
forEach
(
(
f
)
=>
{
f
.
disabled
=
!
trial
;
// eslint-disable-line no-param-reassign
});
...
...
@@ -54,7 +54,7 @@ function mountTrialToggle() {
return
createElement
(
RegistrationTrialToggle
,
{
props
:
{
active
},
on
:
{
changed
:
event
=>
toggleTrialForm
(
event
.
trial
),
changed
:
(
event
)
=>
toggleTrialForm
(
event
.
trial
),
},
});
},
...
...
ee/app/assets/javascripts/related_items_tree/components/related_items_tree_app.vue
View file @
81853752
...
...
@@ -117,7 +117,7 @@ export default {
'
fetchProjects
'
,
]),
getRawRefs
(
value
)
{
return
value
.
split
(
/
\s
+/
).
filter
(
ref
=>
ref
.
trim
().
length
>
0
);
return
value
.
split
(
/
\s
+/
).
filter
(
(
ref
)
=>
ref
.
trim
().
length
>
0
);
},
handlePendingItemRemove
(
index
)
{
this
.
removePendingReference
(
index
);
...
...
ee/app/assets/javascripts/related_items_tree/related_items_tree_bundle.js
View file @
81853752
...
...
@@ -69,6 +69,6 @@ export default () => {
methods
:
{
...
Vuex
.
mapActions
([
'
setInitialParentItem
'
,
'
setInitialConfig
'
]),
},
render
:
createElement
=>
createElement
(
'
related-items-tree-app
'
),
render
:
(
createElement
)
=>
createElement
(
'
related-items-tree-app
'
),
});
};
ee/app/assets/javascripts/related_items_tree/store/actions.js
View file @
81853752
...
...
@@ -269,7 +269,7 @@ export const setItemInputValue = ({ commit }, data) => commit(types.SET_ITEM_INP
export
const
requestAddItem
=
({
commit
})
=>
commit
(
types
.
REQUEST_ADD_ITEM
);
export
const
receiveAddItemSuccess
=
({
dispatch
,
commit
,
getters
},
{
rawItems
})
=>
{
const
items
=
rawItems
.
map
(
item
=>
{
const
items
=
rawItems
.
map
(
(
item
)
=>
{
// This is needed since Rails API to add Epic/Issue
// doesn't return global ID string.
// We can remove this change once add epic/issue
...
...
@@ -300,7 +300,7 @@ export const receiveAddItemSuccess = ({ dispatch, commit, getters }, { rawItems
items
,
});
items
.
forEach
(
item
=>
{
items
.
forEach
(
(
item
)
=>
{
dispatch
(
'
updateChildrenCount
'
,
{
item
});
});
...
...
@@ -332,7 +332,7 @@ export const addItem = ({ state, dispatch, getters }) => {
rawItems
:
data
.
issuables
.
slice
(
0
,
state
.
pendingReferences
.
length
),
});
})
.
catch
(
data
=>
{
.
catch
(
(
data
)
=>
{
const
{
response
}
=
data
;
if
(
response
.
status
===
httpStatusCodes
.
NOT_FOUND
)
{
dispatch
(
'
receiveAddItemFailure
'
,
{
itemAddFailureType
:
itemAddFailureTypesMap
.
NOT_FOUND
});
...
...
@@ -557,7 +557,7 @@ export const createNewIssue = ({ state, dispatch }, { issuesEndpoint, title }) =
parentItem
,
});
})
.
catch
(
e
=>
{
.
catch
(
(
e
)
=>
{
dispatch
(
'
receiveCreateIssueFailure
'
);
throw
e
;
});
...
...
ee/app/assets/javascripts/related_items_tree/store/getters.js
View file @
81853752
...
...
@@ -3,10 +3,10 @@ import { processIssueTypeIssueSources } from '../utils/epic_utils';
export
const
autoCompleteSources
=
()
=>
gl
.
GfmAutoComplete
&&
gl
.
GfmAutoComplete
.
dataSources
;
export
const
directChildren
=
state
=>
state
.
children
[
state
.
parentItem
.
reference
]
||
[];
export
const
directChildren
=
(
state
)
=>
state
.
children
[
state
.
parentItem
.
reference
]
||
[];
export
const
anyParentHasChildren
=
(
state
,
getters
)
=>
getters
.
directChildren
.
some
(
item
=>
item
.
hasChildren
||
item
.
hasIssues
);
getters
.
directChildren
.
some
(
(
item
)
=>
item
.
hasChildren
||
item
.
hasIssues
);
export
const
itemAutoCompleteSources
=
(
state
,
getters
)
=>
{
if
(
getters
.
isEpic
)
{
...
...
@@ -26,4 +26,4 @@ export const itemAutoCompleteSources = (state, getters) => {
export
const
itemPathIdSeparator
=
(
state
,
getters
)
=>
getters
.
isEpic
?
PathIdSeparator
.
Epic
:
PathIdSeparator
.
Issue
;
export
const
isEpic
=
state
=>
state
.
issuableType
===
issuableTypesMap
.
EPIC
;
export
const
isEpic
=
(
state
)
=>
state
.
issuableType
===
issuableTypesMap
.
EPIC
;
ee/app/assets/javascripts/related_items_tree/utils/epic_utils.js
View file @
81853752
...
...
@@ -42,14 +42,14 @@ export const sortByState = (a, b) => stateOrder.indexOf(a.state) - stateOrder.in
*
* @param {Array} items
*/
export
const
applySorts
=
array
=>
array
.
sort
(
sortChildren
).
sort
(
sortByState
);
export
const
applySorts
=
(
array
)
=>
array
.
sort
(
sortChildren
).
sort
(
sortByState
);
/**
* Returns formatted child item to include additional
* flags and properties to use while rendering tree.
* @param {Object} item
*/
export
const
formatChildItem
=
item
=>
({
...
item
,
pathIdSeparator
:
PathIdSeparator
[
item
.
type
]
});
export
const
formatChildItem
=
(
item
)
=>
({
...
item
,
pathIdSeparator
:
PathIdSeparator
[
item
.
type
]
});
/**
* Returns formatted array of Epics that doesn't contain
...
...
@@ -57,7 +57,7 @@ export const formatChildItem = item => ({ ...item, pathIdSeparator: PathIdSepara
*
* @param {Array} children
*/
export
const
extractChildEpics
=
children
=>
export
const
extractChildEpics
=
(
children
)
=>
children
.
edges
.
map
(({
node
,
epicNode
=
node
})
=>
formatChildItem
({
...
epicNode
,
...
...
@@ -72,8 +72,8 @@ export const extractChildEpics = children =>
*
* @param {Array} assignees
*/
export
const
extractIssueAssignees
=
assignees
=>
assignees
.
edges
.
map
(
assigneeNode
=>
({
export
const
extractIssueAssignees
=
(
assignees
)
=>
assignees
.
edges
.
map
(
(
assigneeNode
)
=>
({
...
assigneeNode
.
node
,
}));
...
...
@@ -83,7 +83,7 @@ export const extractIssueAssignees = assignees =>
*
* @param {Array} issues
*/
export
const
extractChildIssues
=
issues
=>
export
const
extractChildIssues
=
(
issues
)
=>
issues
.
edges
.
map
(({
node
,
issueNode
=
node
})
=>
formatChildItem
({
...
issueNode
,
...
...
ee/app/assets/javascripts/repository/index.js
View file @
81853752
...
...
@@ -11,7 +11,7 @@ export default () => {
if
(
!
toggleBtn
)
return
;
toggleBtn
.
addEventListener
(
'
click
'
,
e
=>
{
toggleBtn
.
addEventListener
(
'
click
'
,
(
e
)
=>
{
e
.
preventDefault
();
toggleBtn
.
setAttribute
(
'
disabled
'
,
'
disabled
'
);
...
...
ee/app/assets/javascripts/repository/utils/commit.js
View file @
81853752
import
{
normalizeData
as
normalizeDataFOSS
}
from
'
~/repository/utils/commit
'
;
export
function
normalizeData
(
data
,
path
)
{
return
normalizeDataFOSS
(
data
,
path
,
d
=>
({
return
normalizeDataFOSS
(
data
,
path
,
(
d
)
=>
({
lockLabel
:
d
.
lock_label
||
false
,
}));
}
ee/app/assets/javascripts/requirements/components/requirement_item.vue
View file @
81853752
...
...
@@ -23,7 +23,7 @@ export default {
requirement
:
{
type
:
Object
,
required
:
true
,
validator
:
value
=>
validator
:
(
value
)
=>
[
'
iid
'
,
'
state
'
,
...
...
@@ -33,7 +33,7 @@ export default {
'
updatedAt
'
,
'
author
'
,
'
testReports
'
,
].
every
(
prop
=>
value
[
prop
]),
].
every
(
(
prop
)
=>
value
[
prop
]),
},
stateChangeRequestActive
:
{
type
:
Boolean
,
...
...
ee/app/assets/javascripts/requirements/components/requirements_root.vue
View file @
81853752
...
...
@@ -74,8 +74,8 @@ export default {
initialRequirementsCount
:
{
type
:
Object
,
required
:
true
,
validator
:
value
=>
[
'
OPENED
'
,
'
ARCHIVED
'
,
'
ALL
'
].
every
(
prop
=>
typeof
value
[
prop
]
===
'
number
'
),
validator
:
(
value
)
=>
[
'
OPENED
'
,
'
ARCHIVED
'
,
'
ALL
'
].
every
(
(
prop
)
=>
typeof
value
[
prop
]
===
'
number
'
),
},
page
:
{
type
:
Number
,
...
...
@@ -150,7 +150,7 @@ export default {
update
(
data
)
{
const
requirementsRoot
=
data
.
project
?.
requirements
;
const
list
=
requirementsRoot
?.
nodes
.
map
(
node
=>
{
const
list
=
requirementsRoot
?.
nodes
.
map
(
(
node
)
=>
{
return
{
...
node
,
satisfied
:
node
.
lastTestReportState
===
TestReportStatus
.
Passed
,
...
...
@@ -278,7 +278,7 @@ export default {
];
},
getFilteredSearchValue
()
{
const
value
=
this
.
authorUsernames
.
map
(
author
=>
({
const
value
=
this
.
authorUsernames
.
map
(
(
author
)
=>
({
type
:
'
author_username
'
,
value
:
{
data
:
author
},
}));
...
...
@@ -378,7 +378,7 @@ export default {
updateRequirementInput
,
},
})
.
catch
(
e
=>
{
.
catch
(
(
e
)
=>
{
createFlash
({
message
:
errorFlashMessage
,
parent
:
flashMessageContainer
,
...
...
@@ -399,7 +399,7 @@ export default {
.
then
(({
data
})
=>
{
createFlash
({
message
:
data
?.
message
,
type
:
FLASH_TYPES
.
NOTICE
});
})
.
catch
(
err
=>
{
.
catch
(
(
err
)
=>
{
const
{
data
:
{
message
=
__
(
'
Something went wrong
'
)
}
=
{}
}
=
err
.
response
;
createFlash
({
message
});
});
...
...
@@ -445,7 +445,7 @@ export default {
},
},
})
.
then
(
res
=>
{
.
then
(
(
res
)
=>
{
const
createReqMutation
=
res
?.
data
?.
createRequirement
||
{};
if
(
createReqMutation
.
errors
?.
length
===
0
)
{
...
...
@@ -461,7 +461,7 @@ export default {
throw
new
Error
(
`Error creating a requirement
${
res
.
message
}
`
);
}
})
.
catch
(
e
=>
{
.
catch
(
(
e
)
=>
{
createFlash
({
message
:
__
(
'
Something went wrong while creating a requirement.
'
),
parent
:
this
.
$el
,
...
...
@@ -485,7 +485,7 @@ export default {
errorFlashMessage
:
__
(
'
Something went wrong while updating a requirement.
'
),
flashMessageContainer
:
this
.
$el
,
})
.
then
(
res
=>
{
.
then
(
(
res
)
=>
{
const
updateReqMutation
=
res
?.
data
?.
updateRequirement
||
{};
if
(
updateReqMutation
.
errors
?.
length
===
0
)
{
...
...
@@ -512,7 +512,7 @@ export default {
?
__
(
'
Something went wrong while reopening a requirement.
'
)
:
__
(
'
Something went wrong while archiving a requirement.
'
),
})
.
then
(
res
=>
{
.
then
(
(
res
)
=>
{
const
updateReqMutation
=
res
?.
data
?.
updateRequirement
||
{};
if
(
updateReqMutation
.
errors
?.
length
===
0
)
{
...
...
@@ -546,7 +546,7 @@ export default {
const
authors
=
[];
let
textSearch
=
''
;
filters
.
forEach
(
filter
=>
{
filters
.
forEach
(
(
filter
)
=>
{
if
(
typeof
filter
===
'
string
'
)
{
textSearch
=
filter
;
}
else
if
(
filter
.
value
.
data
!==
DEFAULT_LABEL_ANY
.
value
)
{
...
...
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