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
b0c22b54
Commit
b0c22b54
authored
Feb 19, 2021
by
Illya Klymov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add CREATED status support
parent
a54340a9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
3 deletions
+9
-3
app/assets/javascripts/import_entities/constants.js
app/assets/javascripts/import_entities/constants.js
+6
-0
app/assets/javascripts/import_entities/import_groups/graphql/services/source_groups_manager.js
...s/import_groups/graphql/services/source_groups_manager.js
+1
-1
spec/frontend/import_entities/import_groups/graphql/client_factory_spec.js
...ort_entities/import_groups/graphql/client_factory_spec.js
+2
-2
No files found.
app/assets/javascripts/import_entities/constants.js
View file @
b0c22b54
...
...
@@ -7,6 +7,7 @@ export const STATUSES = {
FINISHED
:
'
finished
'
,
FAILED
:
'
failed
'
,
SCHEDULED
:
'
scheduled
'
,
CREATED
:
'
created
'
,
STARTED
:
'
started
'
,
NONE
:
'
none
'
,
SCHEDULING
:
'
scheduling
'
,
...
...
@@ -23,6 +24,11 @@ const STATUS_MAP = {
text
:
__
(
'
Failed
'
),
textClass
:
'
text-danger
'
,
},
[
STATUSES
.
CREATED
]:
{
icon
:
'
pending
'
,
text
:
__
(
'
Scheduled
'
),
textClass
:
'
text-warning
'
,
},
[
STATUSES
.
SCHEDULED
]:
{
icon
:
'
pending
'
,
text
:
__
(
'
Scheduled
'
),
...
...
app/assets/javascripts/import_entities/import_groups/graphql/services/source_groups_manager.js
View file @
b0c22b54
...
...
@@ -93,8 +93,8 @@ export class SourceGroupsManager {
},
DEBOUNCE_INTERVAL
);
startImport
({
group
,
importId
})
{
this
.
setImportStatus
(
group
,
STATUSES
.
CREATED
);
this
.
saveImportState
(
importId
,
group
);
this
.
setImportStatus
(
group
,
STATUSES
.
STARTED
);
}
setImportStatus
(
group
,
status
)
{
...
...
spec/frontend/import_entities/import_groups/graphql/client_factory_spec.js
View file @
b0c22b54
...
...
@@ -262,14 +262,14 @@ describe('Bulk import resolvers', () => {
expect
(
intermediateResults
[
0
].
status
).
toBe
(
STATUSES
.
SCHEDULING
);
});
it
(
'
sets
group status to STAR
TED when request completes
'
,
async
()
=>
{
it
(
'
sets
import status to CREA
TED when request completes
'
,
async
()
=>
{
axiosMockAdapter
.
onPost
(
FAKE_ENDPOINTS
.
createBulkImport
).
reply
(
httpStatus
.
OK
,
{
id
:
1
});
await
client
.
mutate
({
mutation
:
importGroupMutation
,
variables
:
{
sourceGroupId
:
GROUP_ID
},
});
expect
(
results
[
0
].
status
).
toBe
(
STATUSES
.
STAR
TED
);
expect
(
results
[
0
].
status
).
toBe
(
STATUSES
.
CREA
TED
);
});
it
(
'
resets status to NONE if request fails
'
,
async
()
=>
{
...
...
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