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
c8b5f9de
Commit
c8b5f9de
authored
Jan 27, 2021
by
Illya Klymov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address reviewer comments
- improve readability of import_table component
parent
39f12a7f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
29 deletions
+23
-29
app/assets/javascripts/import_entities/import_groups/components/import_table.vue
...import_entities/import_groups/components/import_table.vue
+23
-29
No files found.
app/assets/javascripts/import_entities/import_groups/components/import_table.vue
View file @
c8b5f9de
...
@@ -16,19 +16,6 @@ import importGroupMutation from '../graphql/mutations/import_group.mutation.grap
...
@@ -16,19 +16,6 @@ import importGroupMutation from '../graphql/mutations/import_group.mutation.grap
import
ImportTableRow
from
'
./import_table_row.vue
'
;
import
ImportTableRow
from
'
./import_table_row.vue
'
;
import
PaginationLinks
from
'
~/vue_shared/components/pagination_links.vue
'
;
import
PaginationLinks
from
'
~/vue_shared/components/pagination_links.vue
'
;
const
mapApolloMutations
=
(
mutations
)
=>
Object
.
fromEntries
(
Object
.
entries
(
mutations
).
map
(([
key
,
mutation
])
=>
[
key
,
function
mutate
(
config
)
{
return
this
.
$apollo
.
mutate
({
mutation
,
...
config
,
});
},
]),
);
export
default
{
export
default
{
components
:
{
components
:
{
GlEmptyState
,
GlEmptyState
,
...
@@ -106,11 +93,26 @@ export default {
...
@@ -106,11 +93,26 @@ export default {
this
.
page
=
page
;
this
.
page
=
page
;
},
},
...
mapApolloMutations
({
updateTargetNamespace
(
sourceGroupId
,
targetNamespace
)
{
setTargetNamespace
:
setTargetNamespaceMutation
,
this
.
$apollo
.
mutate
({
setNewName
:
setNewNameMutation
,
mutation
:
setTargetNamespaceMutation
,
importGroup
:
importGroupMutation
,
variables
:
{
sourceGroupId
,
targetNamespace
},
}),
});
},
updateNewName
(
sourceGroupId
,
newName
)
{
this
.
$apollo
.
mutate
({
mutation
:
setNewNameMutation
,
variables
:
{
sourceGroupId
,
newName
},
});
},
importGroup
(
sourceGroupId
)
{
this
.
$apollo
.
mutate
({
mutation
:
importGroupMutation
,
variables
:
{
sourceGroupId
},
});
},
},
},
};
};
</
script
>
</
script
>
...
@@ -164,17 +166,9 @@ export default {
...
@@ -164,17 +166,9 @@ export default {
:key=
"group.id"
:key=
"group.id"
:group=
"group"
:group=
"group"
:available-namespaces=
"availableNamespaces"
:available-namespaces=
"availableNamespaces"
@
update-target-namespace=
"
@
update-target-namespace=
"updateTargetNamespace(group.id, $event)"
setTargetNamespace(
{
@
update-new-name=
"updateNewName(group.id, $event)"
variables: { sourceGroupId: group.id, targetNamespace: $event },
@
import-group=
"importGroup(group.id)"
})
"
@update-new-name="
setNewName({
variables: { sourceGroupId: group.id, newName: $event },
})
"
@import-group="importGroup({ variables: { sourceGroupId: group.id } })"
/>
/>
</
template
>
</
template
>
</tbody>
</tbody>
...
...
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