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
f3099eae
Commit
f3099eae
authored
Nov 05, 2020
by
pburdette
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create mutation files
Create starting place mutation files for header actions.
parent
9df13896
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
2 deletions
+29
-2
app/assets/javascripts/pipelines/components/header_component.vue
...ets/javascripts/pipelines/components/header_component.vue
+14
-2
app/assets/javascripts/pipelines/graphql/mutations/cancel_pipeline.mutation.graphql
...elines/graphql/mutations/cancel_pipeline.mutation.graphql
+5
-0
app/assets/javascripts/pipelines/graphql/mutations/delete_pipeline.mutation.graphql
...elines/graphql/mutations/delete_pipeline.mutation.graphql
+5
-0
app/assets/javascripts/pipelines/graphql/mutations/retry_pipeline.mutation.graphql
...pelines/graphql/mutations/retry_pipeline.mutation.graphql
+5
-0
No files found.
app/assets/javascripts/pipelines/components/header_component.vue
View file @
f3099eae
...
...
@@ -5,9 +5,13 @@ import axios from '~/lib/utils/axios_utils';
import
ciHeader
from
'
~/vue_shared/components/header_ci_component.vue
'
;
import
{
setUrlFragment
,
redirectTo
}
from
'
~/lib/utils/url_utility
'
;
import
getPipelineQuery
from
'
../graphql/queries/get_pipeline_header_data.query.graphql
'
;
import
deletePipelineMutation
from
'
../graphql/mutations/delete_pipeline.mutation.graphql
'
;
import
retryPipelineMutation
from
'
../graphql/mutations/retry_pipeline.mutation.graphql
'
;
import
cancelPipelineMutation
from
'
../graphql/mutations/cancel_pipeline.mutation.graphql
'
;
import
{
LOAD_FAILURE
,
POST_FAILURE
,
DELETE_FAILURE
,
DEFAULT
}
from
'
../constants
'
;
const
DELETE_MODAL_ID
=
'
pipeline-delete-modal
'
;
const
POLL_INTERVAL
=
10000
;
export
default
{
name
:
'
PipelineHeaderSection
'
,
...
...
@@ -52,7 +56,7 @@ export default {
error
()
{
this
.
reportFailure
(
LOAD_FAILURE
);
},
pollInterval
:
10000
,
pollInterval
:
POLL_INTERVAL
,
watchLoading
(
isLoading
)
{
if
(
!
isLoading
)
{
// To ensure apollo has updated the cache,
...
...
@@ -144,9 +148,17 @@ export default {
try
{
const
{
request
}
=
await
axios
.
delete
(
this
.
paths
.
delete
);
// const data = await this.$apollo.mutate({
// mutation: deletePipelineMutation,
// variables: {
// id: this.pipelineId,
// },
// });
redirectTo
(
setUrlFragment
(
request
.
responseURL
,
'
delete_success
'
));
}
catch
{
this
.
$apollo
.
queries
.
pipeline
.
startPolling
();
this
.
$apollo
.
queries
.
pipeline
.
startPolling
(
POLL_INTERVAL
);
this
.
reportFailure
(
DELETE_FAILURE
);
this
.
isDeleting
=
false
;
}
...
...
app/assets/javascripts/pipelines/graphql/mutations/cancel_pipeline.mutation.graphql
0 → 100644
View file @
f3099eae
mutation
cancelPipeline
(
$id
:
CiPipelineID
!)
{
pipelineCancel
(
input
:
{
id
:
$id
})
{
errors
}
}
\ No newline at end of file
app/assets/javascripts/pipelines/graphql/mutations/delete_pipeline.mutation.graphql
0 → 100644
View file @
f3099eae
mutation
deletePipeline
(
$id
:
CiPipelineID
!)
{
pipelineDestroy
(
input
:
{
id
:
$id
})
{
errors
}
}
\ No newline at end of file
app/assets/javascripts/pipelines/graphql/mutations/retry_pipeline.mutation.graphql
0 → 100644
View file @
f3099eae
mutation
retryPipeline
(
$id
:
CiPipelineID
!)
{
pipelineRetry
(
input
:
{
id
:
$id
})
{
errors
}
}
\ No newline at end of file
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