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
2f8dbd48
Commit
2f8dbd48
authored
Dec 23, 2020
by
Lukas Eipert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Run prettier on 31 files - 17 of 73
Part of our prettier migration; changing the arrow-parens style.
parent
e7d50054
Changes
31
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
79 additions
and
79 deletions
+79
-79
app/assets/javascripts/image_diff/init_discussion_tab.js
app/assets/javascripts/image_diff/init_discussion_tab.js
+1
-1
app/assets/javascripts/image_diff/replaced_image_diff.js
app/assets/javascripts/image_diff/replaced_image_diff.js
+2
-2
app/assets/javascripts/image_diff/view_types.js
app/assets/javascripts/image_diff/view_types.js
+1
-1
app/assets/javascripts/import_entities/import_groups/components/import_table.vue
...import_entities/import_groups/components/import_table.vue
+1
-1
app/assets/javascripts/import_entities/import_groups/components/import_table_row.vue
...rt_entities/import_groups/components/import_table_row.vue
+1
-1
app/assets/javascripts/import_entities/import_groups/graphql/client_factory.js
...s/import_entities/import_groups/graphql/client_factory.js
+4
-4
app/assets/javascripts/import_entities/import_groups/graphql/services/source_groups_manager.js
...s/import_groups/graphql/services/source_groups_manager.js
+1
-1
app/assets/javascripts/import_entities/import_groups/graphql/services/status_poller.js
..._entities/import_groups/graphql/services/status_poller.js
+3
-3
app/assets/javascripts/import_entities/import_projects/store/actions.js
...ascripts/import_entities/import_projects/store/actions.js
+7
-7
app/assets/javascripts/import_entities/import_projects/store/getters.js
...ascripts/import_entities/import_projects/store/getters.js
+8
-8
app/assets/javascripts/import_entities/import_projects/store/mutations.js
...cripts/import_entities/import_projects/store/mutations.js
+11
-11
app/assets/javascripts/init_changes_dropdown.js
app/assets/javascripts/init_changes_dropdown.js
+1
-1
app/assets/javascripts/integrations/edit/components/dynamic_field.vue
...avascripts/integrations/edit/components/dynamic_field.vue
+1
-1
app/assets/javascripts/integrations/edit/components/override_dropdown.vue
...cripts/integrations/edit/components/override_dropdown.vue
+1
-1
app/assets/javascripts/integrations/edit/store/getters.js
app/assets/javascripts/integrations/edit/store/getters.js
+2
-2
app/assets/javascripts/integrations/integration_settings_form.js
...ets/javascripts/integrations/integration_settings_form.js
+1
-1
app/assets/javascripts/invite_member/init_invite_member_modal.js
...ets/javascripts/invite_member/init_invite_member_modal.js
+1
-1
app/assets/javascripts/invite_member/init_invite_member_trigger.js
...s/javascripts/invite_member/init_invite_member_trigger.js
+1
-1
app/assets/javascripts/invite_members/components/invite_members_modal.vue
...cripts/invite_members/components/invite_members_modal.vue
+1
-1
app/assets/javascripts/invite_members/components/members_token_select.vue
...cripts/invite_members/components/members_token_select.vue
+3
-3
app/assets/javascripts/invite_members/init_invite_members_modal.js
...s/javascripts/invite_members/init_invite_members_modal.js
+1
-1
app/assets/javascripts/invite_members/init_invite_members_trigger.js
...javascripts/invite_members/init_invite_members_trigger.js
+1
-1
app/assets/javascripts/issuable_bulk_update_actions.js
app/assets/javascripts/issuable_bulk_update_actions.js
+2
-2
app/assets/javascripts/issuable_bulk_update_sidebar.js
app/assets/javascripts/issuable_bulk_update_sidebar.js
+4
-4
app/assets/javascripts/issuable_context.js
app/assets/javascripts/issuable_context.js
+1
-1
app/assets/javascripts/issuable_form.js
app/assets/javascripts/issuable_form.js
+4
-4
app/assets/javascripts/issuable_index.js
app/assets/javascripts/issuable_index.js
+1
-1
app/assets/javascripts/issuable_list/components/issuable_list_root.vue
...vascripts/issuable_list/components/issuable_list_root.vue
+1
-1
app/assets/javascripts/issuable_suggestions/components/app.vue
...ssets/javascripts/issuable_suggestions/components/app.vue
+1
-1
app/assets/javascripts/issue.js
app/assets/javascripts/issue.js
+2
-2
app/assets/javascripts/issue_show/components/app.vue
app/assets/javascripts/issue_show/components/app.vue
+9
-9
No files found.
app/assets/javascripts/image_diff/init_discussion_tab.js
View file @
2f8dbd48
...
...
@@ -7,7 +7,7 @@ export default () => {
const
renderCommentBadge
=
true
;
const
diffFileEls
=
document
.
querySelectorAll
(
'
.timeline-content .diff-file.js-image-file
'
);
[...
diffFileEls
].
forEach
(
diffFileEl
=>
[...
diffFileEls
].
forEach
(
(
diffFileEl
)
=>
initImageDiffHelper
.
initImageDiff
(
diffFileEl
,
canCreateNote
,
renderCommentBadge
),
);
};
app/assets/javascripts/image_diff/replaced_image_diff.js
View file @
2f8dbd48
...
...
@@ -26,7 +26,7 @@ export default class ReplacedImageDiff extends ImageDiff {
this
.
imageEls
=
{};
const
viewTypeNames
=
Object
.
getOwnPropertyNames
(
viewTypes
);
viewTypeNames
.
forEach
(
viewType
=>
{
viewTypeNames
.
forEach
(
(
viewType
)
=>
{
this
.
imageEls
[
viewType
]
=
this
.
imageFrameEls
[
viewType
].
querySelector
(
'
img
'
);
});
}
...
...
@@ -62,7 +62,7 @@ export default class ReplacedImageDiff extends ImageDiff {
// Clear existing badges on new view
const
existingBadges
=
this
.
imageFrameEl
.
querySelectorAll
(
'
.badge
'
);
[...
existingBadges
].
map
(
badge
=>
badge
.
remove
());
[...
existingBadges
].
map
(
(
badge
)
=>
badge
.
remove
());
// Remove existing references to old view image badges
this
.
imageBadges
=
[];
...
...
app/assets/javascripts/image_diff/view_types.js
View file @
2f8dbd48
...
...
@@ -5,5 +5,5 @@ export const viewTypes = {
};
export
function
isValidViewType
(
validate
)
{
return
Boolean
(
Object
.
getOwnPropertyNames
(
viewTypes
).
find
(
viewType
=>
viewType
===
validate
));
return
Boolean
(
Object
.
getOwnPropertyNames
(
viewTypes
).
find
(
(
viewType
)
=>
viewType
===
validate
));
}
app/assets/javascripts/import_entities/import_groups/components/import_table.vue
View file @
2f8dbd48
...
...
@@ -7,7 +7,7 @@ import setNewNameMutation from '../graphql/mutations/set_new_name.mutation.graph
import
importGroupMutation
from
'
../graphql/mutations/import_group.mutation.graphql
'
;
import
ImportTableRow
from
'
./import_table_row.vue
'
;
const
mapApolloMutations
=
mutations
=>
const
mapApolloMutations
=
(
mutations
)
=>
Object
.
fromEntries
(
Object
.
entries
(
mutations
).
map
(([
key
,
mutation
])
=>
[
key
,
...
...
app/assets/javascripts/import_entities/import_groups/components/import_table_row.vue
View file @
2f8dbd48
...
...
@@ -35,7 +35,7 @@ export default {
select2Options
()
{
return
{
data
:
this
.
availableNamespaces
.
map
(
namespace
=>
({
data
:
this
.
availableNamespaces
.
map
(
(
namespace
)
=>
({
id
:
namespace
.
full_path
,
text
:
namespace
.
full_path
,
})),
...
...
app/assets/javascripts/import_entities/import_groups/graphql/client_factory.js
View file @
2f8dbd48
...
...
@@ -23,7 +23,7 @@ export function createResolvers({ endpoints }) {
}
=
await
client
.
query
({
query
:
availableNamespacesQuery
});
return
axios
.
get
(
endpoints
.
status
).
then
(({
data
})
=>
{
return
data
.
importable_data
.
map
(
group
=>
({
return
data
.
importable_data
.
map
(
(
group
)
=>
({
__typename
:
clientTypenames
.
BulkImportSourceGroup
,
...
group
,
status
:
STATUSES
.
NONE
,
...
...
@@ -37,7 +37,7 @@ export function createResolvers({ endpoints }) {
availableNamespaces
:
()
=>
axios
.
get
(
endpoints
.
availableNamespaces
).
then
(({
data
})
=>
data
.
map
(
namespace
=>
({
data
.
map
(
(
namespace
)
=>
({
__typename
:
clientTypenames
.
AvailableNamespace
,
...
namespace
,
})),
...
...
@@ -45,14 +45,14 @@ export function createResolvers({ endpoints }) {
},
Mutation
:
{
setTargetNamespace
(
_
,
{
targetNamespace
,
sourceGroupId
},
{
client
})
{
new
SourceGroupsManager
({
client
}).
updateById
(
sourceGroupId
,
sourceGroup
=>
{
new
SourceGroupsManager
({
client
}).
updateById
(
sourceGroupId
,
(
sourceGroup
)
=>
{
// eslint-disable-next-line no-param-reassign
sourceGroup
.
import_target
.
target_namespace
=
targetNamespace
;
});
},
setNewName
(
_
,
{
newName
,
sourceGroupId
},
{
client
})
{
new
SourceGroupsManager
({
client
}).
updateById
(
sourceGroupId
,
sourceGroup
=>
{
new
SourceGroupsManager
({
client
}).
updateById
(
sourceGroupId
,
(
sourceGroup
)
=>
{
// eslint-disable-next-line no-param-reassign
sourceGroup
.
import_target
.
new_name
=
newName
;
});
...
...
app/assets/javascripts/import_entities/import_groups/graphql/services/source_groups_manager.js
View file @
2f8dbd48
...
...
@@ -37,7 +37,7 @@ export class SourceGroupsManager {
}
setImportStatus
(
group
,
status
)
{
this
.
update
(
group
,
sourceGroup
=>
{
this
.
update
(
group
,
(
sourceGroup
)
=>
{
// eslint-disable-next-line no-param-reassign
sourceGroup
.
status
=
status
;
});
...
...
app/assets/javascripts/import_entities/import_groups/graphql/services/status_poller.js
View file @
2f8dbd48
...
...
@@ -5,7 +5,7 @@ import bulkImportSourceGroupsQuery from '../queries/bulk_import_source_groups.qu
import
{
STATUSES
}
from
'
../../../constants
'
;
import
{
SourceGroupsManager
}
from
'
./source_groups_manager
'
;
const
groupId
=
i
=>
`group
${
i
}
`
;
const
groupId
=
(
i
)
=>
`group
${
i
}
`
;
function
generateGroupsQuery
(
groups
)
{
return
gql
`{
...
...
@@ -46,14 +46,14 @@ export class StatusPoller {
const
{
bulkImportSourceGroups
}
=
this
.
client
.
readQuery
({
query
:
bulkImportSourceGroupsQuery
,
});
const
groupsInProgress
=
bulkImportSourceGroups
.
filter
(
g
=>
g
.
status
===
STATUSES
.
STARTED
);
const
groupsInProgress
=
bulkImportSourceGroups
.
filter
(
(
g
)
=>
g
.
status
===
STATUSES
.
STARTED
);
if
(
groupsInProgress
.
length
)
{
const
{
data
:
results
}
=
await
this
.
client
.
query
({
query
:
generateGroupsQuery
(
groupsInProgress
),
fetchPolicy
:
'
no-cache
'
,
});
const
completedGroups
=
groupsInProgress
.
filter
((
_
,
idx
)
=>
Boolean
(
results
[
groupId
(
idx
)]));
completedGroups
.
forEach
(
group
=>
{
completedGroups
.
forEach
(
(
group
)
=>
{
this
.
groupManager
.
setImportStatus
(
group
,
STATUSES
.
FINISHED
);
});
}
...
...
app/assets/javascripts/import_entities/import_projects/store/actions.js
View file @
2f8dbd48
...
...
@@ -12,9 +12,9 @@ import { capitalizeFirstCharacter } from '~/lib/utils/text_utility';
let
eTagPoll
;
const
hasRedirectInError
=
e
=>
e
?.
response
?.
data
?.
error
?.
redirect
;
const
redirectToUrlInError
=
e
=>
visitUrl
(
e
.
response
.
data
.
error
.
redirect
);
const
tooManyRequests
=
e
=>
e
.
response
.
status
===
httpStatusCodes
.
TOO_MANY_REQUESTS
;
const
hasRedirectInError
=
(
e
)
=>
e
?.
response
?.
data
?.
error
?.
redirect
;
const
redirectToUrlInError
=
(
e
)
=>
visitUrl
(
e
.
response
.
data
.
error
.
redirect
);
const
tooManyRequests
=
(
e
)
=>
e
.
response
.
status
===
httpStatusCodes
.
TOO_MANY_REQUESTS
;
const
pathWithParams
=
({
path
,
...
params
})
=>
{
const
filteredParams
=
Object
.
fromEntries
(
Object
.
entries
(
params
).
filter
(([,
value
])
=>
value
!==
''
),
...
...
@@ -47,7 +47,7 @@ const importAll = ({ state, dispatch }) => {
return
Promise
.
all
(
state
.
repositories
.
filter
(
isProjectImportable
)
.
map
(
r
=>
dispatch
(
'
fetchImport
'
,
r
.
importSource
.
id
)),
.
map
(
(
r
)
=>
dispatch
(
'
fetchImport
'
,
r
.
importSource
.
id
)),
);
};
...
...
@@ -69,7 +69,7 @@ const fetchReposFactory = ({ reposPath = isRequired() }) => ({ state, commit })
.
then
(({
data
})
=>
{
commit
(
types
.
RECEIVE_REPOS_SUCCESS
,
convertObjectPropsToCamelCase
(
data
,
{
deep
:
true
}));
})
.
catch
(
e
=>
{
.
catch
(
(
e
)
=>
{
commit
(
types
.
SET_PAGE
,
nextPage
-
1
);
if
(
hasRedirectInError
(
e
))
{
...
...
@@ -114,7 +114,7 @@ const fetchImportFactory = (importPath = isRequired()) => ({ state, commit, gett
repoId
,
});
})
.
catch
(
e
=>
{
.
catch
(
(
e
)
=>
{
const
serverErrorMessage
=
e
?.
response
?.
data
?.
errors
;
const
flashMessage
=
serverErrorMessage
?
sprintf
(
...
...
@@ -145,7 +145,7 @@ export const fetchJobsFactory = (jobsPath = isRequired()) => ({ state, commit, d
method
:
'
fetchJobs
'
,
successCallback
:
({
data
})
=>
commit
(
types
.
RECEIVE_JOBS_SUCCESS
,
convertObjectPropsToCamelCase
(
data
,
{
deep
:
true
})),
errorCallback
:
e
=>
{
errorCallback
:
(
e
)
=>
{
if
(
hasRedirectInError
(
e
))
{
redirectToUrlInError
(
e
);
}
else
{
...
...
app/assets/javascripts/import_entities/import_projects/store/getters.js
View file @
2f8dbd48
import
{
STATUSES
}
from
'
../../constants
'
;
import
{
isProjectImportable
,
isIncompatible
}
from
'
../utils
'
;
export
const
isLoading
=
state
=>
state
.
isLoadingRepos
||
state
.
isLoadingNamespaces
;
export
const
isLoading
=
(
state
)
=>
state
.
isLoadingRepos
||
state
.
isLoadingNamespaces
;
export
const
isImportingAnyRepo
=
state
=>
state
.
repositories
.
some
(
repo
=>
export
const
isImportingAnyRepo
=
(
state
)
=>
state
.
repositories
.
some
(
(
repo
)
=>
[
STATUSES
.
SCHEDULING
,
STATUSES
.
SCHEDULED
,
STATUSES
.
STARTED
].
includes
(
repo
.
importedProject
?.
importStatus
,
),
);
export
const
hasIncompatibleRepos
=
state
=>
state
.
repositories
.
some
(
isIncompatible
);
export
const
hasIncompatibleRepos
=
(
state
)
=>
state
.
repositories
.
some
(
isIncompatible
);
export
const
hasImportableRepos
=
state
=>
state
.
repositories
.
some
(
isProjectImportable
);
export
const
hasImportableRepos
=
(
state
)
=>
state
.
repositories
.
some
(
isProjectImportable
);
export
const
importAllCount
=
state
=>
state
.
repositories
.
filter
(
isProjectImportable
).
length
;
export
const
importAllCount
=
(
state
)
=>
state
.
repositories
.
filter
(
isProjectImportable
).
length
;
export
const
getImportTarget
=
state
=>
repoId
=>
{
export
const
getImportTarget
=
(
state
)
=>
(
repoId
)
=>
{
if
(
state
.
customImportTargets
[
repoId
])
{
return
state
.
customImportTargets
[
repoId
];
}
const
repo
=
state
.
repositories
.
find
(
r
=>
r
.
importSource
.
id
===
repoId
);
const
repo
=
state
.
repositories
.
find
(
(
r
)
=>
r
.
importSource
.
id
===
repoId
);
return
{
newName
:
repo
.
importSource
.
sanitizedName
,
...
...
app/assets/javascripts/import_entities/import_projects/store/mutations.js
View file @
2f8dbd48
...
...
@@ -2,7 +2,7 @@ import Vue from 'vue';
import
*
as
types
from
'
./mutation_types
'
;
import
{
STATUSES
}
from
'
../../constants
'
;
const
makeNewImportedProject
=
importedProject
=>
({
const
makeNewImportedProject
=
(
importedProject
)
=>
({
importSource
:
{
id
:
importedProject
.
id
,
fullName
:
importedProject
.
importSource
,
...
...
@@ -12,15 +12,15 @@ const makeNewImportedProject = importedProject => ({
importedProject
,
});
const
makeNewIncompatibleProject
=
project
=>
({
const
makeNewIncompatibleProject
=
(
project
)
=>
({
importSource
:
{
...
project
,
incompatible
:
true
},
importedProject
:
null
,
});
const
processLegacyEntries
=
({
newRepositories
,
existingRepositories
,
factory
})
=>
{
const
newEntries
=
[];
newRepositories
.
forEach
(
project
=>
{
const
existingProject
=
existingRepositories
.
find
(
p
=>
p
.
importSource
.
id
===
project
.
id
);
newRepositories
.
forEach
(
(
project
)
=>
{
const
existingProject
=
existingRepositories
.
find
(
(
p
)
=>
p
.
importSource
.
id
===
project
.
id
);
const
importedProjectShape
=
factory
(
project
);
if
(
existingProject
)
{
...
...
@@ -66,7 +66,7 @@ export default {
state
.
repositories
=
[
...
newImportedProjects
,
...
state
.
repositories
,
...
repositories
.
providerRepos
.
map
(
project
=>
({
...
repositories
.
providerRepos
.
map
(
(
project
)
=>
({
importSource
:
project
,
importedProject
:
null
,
})),
...
...
@@ -91,7 +91,7 @@ export default {
},
[
types
.
REQUEST_IMPORT
](
state
,
{
repoId
,
importTarget
})
{
const
existingRepo
=
state
.
repositories
.
find
(
r
=>
r
.
importSource
.
id
===
repoId
);
const
existingRepo
=
state
.
repositories
.
find
(
(
r
)
=>
r
.
importSource
.
id
===
repoId
);
existingRepo
.
importedProject
=
{
importStatus
:
STATUSES
.
SCHEDULING
,
fullPath
:
`/
${
importTarget
.
targetNamespace
}
/
${
importTarget
.
newName
}
`
,
...
...
@@ -99,18 +99,18 @@ export default {
},
[
types
.
RECEIVE_IMPORT_SUCCESS
](
state
,
{
importedProject
,
repoId
})
{
const
existingRepo
=
state
.
repositories
.
find
(
r
=>
r
.
importSource
.
id
===
repoId
);
const
existingRepo
=
state
.
repositories
.
find
(
(
r
)
=>
r
.
importSource
.
id
===
repoId
);
existingRepo
.
importedProject
=
importedProject
;
},
[
types
.
RECEIVE_IMPORT_ERROR
](
state
,
repoId
)
{
const
existingRepo
=
state
.
repositories
.
find
(
r
=>
r
.
importSource
.
id
===
repoId
);
const
existingRepo
=
state
.
repositories
.
find
(
(
r
)
=>
r
.
importSource
.
id
===
repoId
);
existingRepo
.
importedProject
=
null
;
},
[
types
.
RECEIVE_JOBS_SUCCESS
](
state
,
updatedProjects
)
{
updatedProjects
.
forEach
(
updatedProject
=>
{
const
repo
=
state
.
repositories
.
find
(
p
=>
p
.
importedProject
?.
id
===
updatedProject
.
id
);
updatedProjects
.
forEach
(
(
updatedProject
)
=>
{
const
repo
=
state
.
repositories
.
find
(
(
p
)
=>
p
.
importedProject
?.
id
===
updatedProject
.
id
);
if
(
repo
?.
importedProject
)
{
repo
.
importedProject
.
importStatus
=
updatedProject
.
importStatus
;
}
...
...
@@ -131,7 +131,7 @@ export default {
},
[
types
.
SET_IMPORT_TARGET
](
state
,
{
repoId
,
importTarget
})
{
const
existingRepo
=
state
.
repositories
.
find
(
r
=>
r
.
importSource
.
id
===
repoId
);
const
existingRepo
=
state
.
repositories
.
find
(
(
r
)
=>
r
.
importSource
.
id
===
repoId
);
if
(
importTarget
.
targetNamespace
===
state
.
defaultTargetNamespace
&&
...
...
app/assets/javascripts/init_changes_dropdown.js
View file @
2f8dbd48
...
...
@@ -2,7 +2,7 @@ import $ from 'jquery';
import
{
stickyMonitor
}
from
'
./lib/utils/sticky
'
;
import
initDeprecatedJQueryDropdown
from
'
~/deprecated_jquery_dropdown
'
;
export
default
stickyTop
=>
{
export
default
(
stickyTop
)
=>
{
stickyMonitor
(
document
.
querySelector
(
'
.js-diff-files-changed
'
),
stickyTop
);
initDeprecatedJQueryDropdown
(
$
(
'
.js-diff-stats-dropdown
'
),
{
...
...
app/assets/javascripts/integrations/edit/components/dynamic_field.vue
View file @
2f8dbd48
...
...
@@ -92,7 +92,7 @@ export default {
return
isEmpty
(
this
.
value
)
&&
this
.
required
;
},
options
()
{
return
this
.
choices
.
map
(
choice
=>
{
return
this
.
choices
.
map
(
(
choice
)
=>
{
return
{
value
:
choice
[
1
],
text
:
choice
[
0
],
...
...
app/assets/javascripts/integrations/edit/components/override_dropdown.vue
View file @
2f8dbd48
...
...
@@ -40,7 +40,7 @@ export default {
},
data
()
{
return
{
selected
:
dropdownOptions
.
find
(
x
=>
x
.
value
===
this
.
override
),
selected
:
dropdownOptions
.
find
(
(
x
)
=>
x
.
value
===
this
.
override
),
};
},
computed
:
{
...
...
app/assets/javascripts/integrations/edit/store/getters.js
View file @
2f8dbd48
export
const
isInheriting
=
state
=>
(
state
.
defaultState
===
null
?
false
:
!
state
.
override
);
export
const
isInheriting
=
(
state
)
=>
(
state
.
defaultState
===
null
?
false
:
!
state
.
override
);
export
const
isDisabled
=
state
=>
state
.
isSaving
||
state
.
isTesting
||
state
.
isResetting
;
export
const
isDisabled
=
(
state
)
=>
state
.
isSaving
||
state
.
isTesting
||
state
.
isResetting
;
export
const
propsSource
=
(
state
,
getters
)
=>
getters
.
isInheriting
?
state
.
defaultState
:
state
.
customState
;
...
...
app/assets/javascripts/integrations/integration_settings_form.js
View file @
2f8dbd48
...
...
@@ -23,7 +23,7 @@ export default class IntegrationSettingsForm {
document
.
querySelector
(
'
.js-vue-integration-settings
'
),
document
.
querySelector
(
'
.js-vue-default-integration-settings
'
),
);
eventHub
.
$on
(
'
toggle
'
,
active
=>
{
eventHub
.
$on
(
'
toggle
'
,
(
active
)
=>
{
this
.
formActive
=
active
;
this
.
toggleServiceState
();
});
...
...
app/assets/javascripts/invite_member/init_invite_member_modal.js
View file @
2f8dbd48
...
...
@@ -16,6 +16,6 @@ export default function initInviteMembersModal() {
return
new
Vue
({
el
,
provide
:
{
membersPath
},
render
:
createElement
=>
createElement
(
InviteMemberModal
),
render
:
(
createElement
)
=>
createElement
(
InviteMemberModal
),
});
}
app/assets/javascripts/invite_member/init_invite_member_trigger.js
View file @
2f8dbd48
...
...
@@ -11,6 +11,6 @@ export default function initInviteMembersTrigger() {
return
new
Vue
({
el
,
provide
:
{
...
el
.
dataset
},
render
:
createElement
=>
createElement
(
InviteMemberTrigger
),
render
:
(
createElement
)
=>
createElement
(
InviteMemberTrigger
),
});
}
app/assets/javascripts/invite_members/components/invite_members_modal.vue
View file @
2f8dbd48
...
...
@@ -93,7 +93,7 @@ export default {
},
selectedRoleName
()
{
return
Object
.
keys
(
this
.
accessLevels
).
find
(
key
=>
this
.
accessLevels
[
key
]
===
Number
(
this
.
selectedAccessLevel
),
(
key
)
=>
this
.
accessLevels
[
key
]
===
Number
(
this
.
selectedAccessLevel
),
);
},
},
...
...
app/assets/javascripts/invite_members/components/members_token_select.vue
View file @
2f8dbd48
...
...
@@ -34,7 +34,7 @@ export default {
computed
:
{
newUsersToInvite
()
{
return
this
.
selectedTokens
.
map
(
obj
=>
{
.
map
(
(
obj
)
=>
{
return
obj
.
id
;
})
.
join
(
'
,
'
);
...
...
@@ -55,8 +55,8 @@ export default {
},
retrieveUsers
:
debounce
(
function
debouncedRetrieveUsers
()
{
return
Api
.
users
(
this
.
query
,
this
.
$options
.
queryOptions
)
.
then
(
response
=>
{
this
.
users
=
response
.
data
.
map
(
token
=>
({
.
then
(
(
response
)
=>
{
this
.
users
=
response
.
data
.
map
(
(
token
)
=>
({
id
:
token
.
id
,
name
:
token
.
name
,
username
:
token
.
username
,
...
...
app/assets/javascripts/invite_members/init_invite_members_modal.js
View file @
2f8dbd48
...
...
@@ -13,7 +13,7 @@ export default function initInviteMembersModal() {
return
new
Vue
({
el
,
render
:
createElement
=>
render
:
(
createElement
)
=>
createElement
(
InviteMembersModal
,
{
props
:
{
...
el
.
dataset
,
...
...
app/assets/javascripts/invite_members/init_invite_members_trigger.js
View file @
2f8dbd48
...
...
@@ -10,7 +10,7 @@ export default function initInviteMembersTrigger() {
return
new
Vue
({
el
,
render
:
createElement
=>
render
:
(
createElement
)
=>
createElement
(
InviteMembersTrigger
,
{
props
:
{
...
el
.
dataset
,
...
...
app/assets/javascripts/issuable_bulk_update_actions.js
View file @
2f8dbd48
...
...
@@ -101,7 +101,7 @@ export default {
// Collect unique label IDs for all checked issues
this
.
getElement
(
'
.selected-issuable:checked
'
).
each
((
i
,
el
)
=>
{
issuableLabels
=
this
.
getElement
(
`#
${
this
.
prefixId
}${
el
.
dataset
.
id
}
`
).
data
(
'
labels
'
);
issuableLabels
.
forEach
(
labelId
=>
{
issuableLabels
.
forEach
(
(
labelId
)
=>
{
// Store unique IDs
if
(
uniqueIds
.
indexOf
(
labelId
)
===
-
1
)
{
uniqueIds
.
push
(
labelId
);
...
...
@@ -113,7 +113,7 @@ export default {
// Add uniqueIds to add it as argument for _.intersection
labelIds
.
unshift
(
uniqueIds
);
// Return IDs that are present but not in all selected issueables
return
uniqueIds
.
filter
(
x
=>
!
intersection
.
apply
(
this
,
labelIds
).
includes
(
x
));
return
uniqueIds
.
filter
(
(
x
)
=>
!
intersection
.
apply
(
this
,
labelIds
).
includes
(
x
));
},
getElement
(
selector
)
{
...
...
app/assets/javascripts/issuable_bulk_update_sidebar.js
View file @
2f8dbd48
...
...
@@ -39,9 +39,9 @@ export default class IssuableBulkUpdateSidebar {
}
bindEvents
()
{
this
.
$bulkUpdateEnableBtn
.
on
(
'
click
'
,
e
=>
this
.
toggleBulkEdit
(
e
,
true
));
this
.
$bulkEditCancelBtn
.
on
(
'
click
'
,
e
=>
this
.
toggleBulkEdit
(
e
,
false
));
this
.
$checkAllContainer
.
on
(
'
click
'
,
e
=>
this
.
selectAll
(
e
));
this
.
$bulkUpdateEnableBtn
.
on
(
'
click
'
,
(
e
)
=>
this
.
toggleBulkEdit
(
e
,
true
));
this
.
$bulkEditCancelBtn
.
on
(
'
click
'
,
(
e
)
=>
this
.
toggleBulkEdit
(
e
,
false
));
this
.
$checkAllContainer
.
on
(
'
click
'
,
(
e
)
=>
this
.
selectAll
(
e
));
this
.
$issuesList
.
on
(
'
change
'
,
()
=>
this
.
updateFormState
());
this
.
$bulkEditSubmitBtn
.
on
(
'
click
'
,
()
=>
this
.
prepForSubmit
());
this
.
$checkAllContainer
.
on
(
'
click
'
,
()
=>
this
.
updateFormState
());
...
...
@@ -159,7 +159,7 @@ export default class IssuableBulkUpdateSidebar {
const
$checkedIssues
=
$
(
'
.selected-issuable:checked
'
);
if
(
$checkedIssues
.
length
>
0
)
{
return
$
.
map
(
$checkedIssues
,
value
=>
$
(
value
).
data
(
'
id
'
));
return
$
.
map
(
$checkedIssues
,
(
value
)
=>
$
(
value
).
data
(
'
id
'
));
}
return
[];
...
...
app/assets/javascripts/issuable_context.js
View file @
2f8dbd48
...
...
@@ -31,7 +31,7 @@ export default class IssuableContext {
});
$
(
document
)
.
off
(
'
click
'
,
'
.issuable-sidebar .dropdown-content a
'
)
.
on
(
'
click
'
,
'
.issuable-sidebar .dropdown-content a
'
,
e
=>
e
.
preventDefault
());
.
on
(
'
click
'
,
'
.issuable-sidebar .dropdown-content a
'
,
(
e
)
=>
e
.
preventDefault
());
$
(
document
)
.
off
(
'
click
'
,
'
.edit-link
'
)
...
...
app/assets/javascripts/issuable_form.js
View file @
2f8dbd48
...
...
@@ -89,9 +89,9 @@ export default class IssuableForm {
theme
:
'
gitlab-theme animate-picker
'
,
format
:
'
yyyy-mm-dd
'
,
container
:
$issuableDueDate
.
parent
().
get
(
0
),
parse
:
dateString
=>
parsePikadayDate
(
dateString
),
toString
:
date
=>
pikadayToString
(
date
),
onSelect
:
dateText
=>
$issuableDueDate
.
val
(
calendar
.
toString
(
dateText
)),
parse
:
(
dateString
)
=>
parsePikadayDate
(
dateString
),
toString
:
(
date
)
=>
pikadayToString
(
date
),
onSelect
:
(
dateText
)
=>
$issuableDueDate
.
val
(
calendar
.
toString
(
dateText
)),
firstDay
:
gon
.
first_day_of_week
,
});
calendar
.
setDate
(
parsePikadayDate
(
$issuableDueDate
.
val
()));
...
...
@@ -202,7 +202,7 @@ export default class IssuableForm {
results
(
data
)
{
return
{
// `data` keys are translated so we can't just access them with a string based key
results
:
data
[
Object
.
keys
(
data
)[
0
]].
map
(
name
=>
({
results
:
data
[
Object
.
keys
(
data
)[
0
]].
map
(
(
name
)
=>
({
id
:
name
,
text
:
name
,
})),
...
...
app/assets/javascripts/issuable_index.js
View file @
2f8dbd48
...
...
@@ -13,7 +13,7 @@ export default class IssuableIndex {
static
resetIncomingEmailToken
()
{
const
$resetToken
=
$
(
'
.incoming-email-token-reset
'
);
$resetToken
.
on
(
'
click
'
,
e
=>
{
$resetToken
.
on
(
'
click
'
,
(
e
)
=>
{
e
.
preventDefault
();
$resetToken
.
text
(
s__
(
'
EmailToken|resetting...
'
));
...
...
app/assets/javascripts/issuable_list/components/issuable_list_root.vue
View file @
2f8dbd48
...
...
@@ -200,7 +200,7 @@ export default {
this
.
checkedIssuables
[
this
.
issuableId
(
issuable
)].
checked
=
value
;
},
handleAllIssuablesCheckedInput
(
value
)
{
Object
.
keys
(
this
.
checkedIssuables
).
forEach
(
issuableId
=>
{
Object
.
keys
(
this
.
checkedIssuables
).
forEach
(
(
issuableId
)
=>
{
this
.
checkedIssuables
[
issuableId
].
checked
=
value
;
});
},
...
...
app/assets/javascripts/issuable_suggestions/components/app.vue
View file @
2f8dbd48
...
...
@@ -29,7 +29,7 @@ export default {
skip
()
{
return
this
.
isSearchEmpty
;
},
update
:
data
=>
data
.
project
.
issues
.
edges
.
map
(({
node
})
=>
node
),
update
:
(
data
)
=>
data
.
project
.
issues
.
edges
.
map
(({
node
})
=>
node
),
variables
()
{
return
{
fullPath
:
this
.
projectPath
,
...
...
app/assets/javascripts/issue.js
View file @
2f8dbd48
...
...
@@ -23,7 +23,7 @@ export default class Issue {
}
// Listen to state changes in the Vue app
document
.
addEventListener
(
'
issuable_vue_app:change
'
,
event
=>
{
document
.
addEventListener
(
'
issuable_vue_app:change
'
,
(
event
)
=>
{
this
.
updateTopState
(
event
.
detail
.
isClosed
,
event
.
detail
.
data
);
});
}
...
...
@@ -80,7 +80,7 @@ export default class Issue {
alertMovedFromServiceDeskWarning
.
show
();
}
alertMovedFromServiceDeskWarning
.
on
(
'
click
'
,
'
.js-close
'
,
e
=>
{
alertMovedFromServiceDeskWarning
.
on
(
'
click
'
,
'
.js-close
'
,
(
e
)
=>
{
e
.
preventDefault
();
e
.
stopImmediatePropagation
();
alertMovedFromServiceDeskWarning
.
remove
();
...
...
app/assets/javascripts/issue_show/components/app.vue
View file @
2f8dbd48
...
...
@@ -250,7 +250,7 @@ export default {
this
.
poll
=
new
Poll
({
resource
:
this
.
service
,
method
:
'
getData
'
,
successCallback
:
res
=>
this
.
store
.
updateState
(
res
.
data
),
successCallback
:
(
res
)
=>
this
.
store
.
updateState
(
res
.
data
),
errorCallback
(
err
)
{
throw
new
Error
(
err
);
},
...
...
@@ -294,8 +294,8 @@ export default {
updateStoreState
()
{
return
this
.
service
.
getData
()
.
then
(
res
=>
res
.
data
)
.
then
(
data
=>
{
.
then
(
(
res
)
=>
res
.
data
)
.
then
(
(
data
)
=>
{
this
.
store
.
updateState
(
data
);
})
.
catch
(()
=>
{
...
...
@@ -320,7 +320,7 @@ export default {
requestTemplatesAndShowForm
()
{
return
this
.
service
.
loadTemplates
(
this
.
issuableTemplateNamesPath
)
.
then
(
res
=>
{
.
then
(
(
res
)
=>
{
this
.
updateAndShowForm
(
res
.
data
);
})
.
catch
(()
=>
{
...
...
@@ -345,9 +345,9 @@ export default {
updateIssuable
()
{
return
this
.
service
.
updateIssuable
(
this
.
store
.
formState
)
.
then
(
res
=>
res
.
data
)
.
then
(
data
=>
this
.
checkForSpam
(
data
))
.
then
(
data
=>
{
.
then
(
(
res
)
=>
res
.
data
)
.
then
(
(
data
)
=>
this
.
checkForSpam
(
data
))
.
then
(
(
data
)
=>
{
if
(
!
window
.
location
.
pathname
.
includes
(
data
.
web_url
))
{
visitUrl
(
data
.
web_url
);
}
...
...
@@ -384,8 +384,8 @@ export default {
deleteIssuable
(
payload
)
{
return
this
.
service
.
deleteIssuable
(
payload
)
.
then
(
res
=>
res
.
data
)
.
then
(
data
=>
{
.
then
(
(
res
)
=>
res
.
data
)
.
then
(
(
data
)
=>
{
// Stop the poll so we don't get 404's with the issuable not existing
this
.
poll
.
stop
();
...
...
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