BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
0bc8440d
Commit
0bc8440d
authored
Apr 10, 2018
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stop polling and fetch the table
parent
6c76e81b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
pipelines.js
app/assets/javascripts/pipelines/mixins/pipelines.js
+8
-5
pipelines_service.js
...ssets/javascripts/pipelines/services/pipelines_service.js
+5
-0
No files found.
app/assets/javascripts/pipelines/mixins/pipelines.js
View file @
0bc8440d
...
...
@@ -65,13 +65,13 @@ export default {
updateTable
()
{
// Cancel ongoing request
if
(
this
.
isMakingRequest
)
{
this
.
service
.
cancelationSource
.
cancel
();
}
// Stop polling
this
.
poll
.
stop
();
// make new request
this
.
fetch
Pipelines
();
this
.
get
Pipelines
();
// restart polling
this
.
poll
.
restart
();
},
...
...
@@ -79,11 +79,14 @@ export default {
if
(
!
this
.
isMakingRequest
)
{
this
.
isLoading
=
true
;
this
.
service
.
getPipelines
(
this
.
requestData
)
.
then
(
response
=>
this
.
successCallback
(
response
))
.
catch
(()
=>
this
.
errorCallback
());
this
.
getPipelines
();
}
},
getPipelines
()
{
this
.
service
.
getPipelines
(
this
.
requestData
)
.
then
(
response
=>
this
.
successCallback
(
response
))
.
catch
(()
=>
this
.
errorCallback
());
},
setCommonData
(
pipelines
)
{
this
.
store
.
storePipelines
(
pipelines
);
this
.
isLoading
=
false
;
...
...
app/assets/javascripts/pipelines/services/pipelines_service.js
View file @
0bc8440d
...
...
@@ -19,8 +19,13 @@ export default class PipelinesService {
getPipelines
(
data
=
{})
{
const
{
scope
,
page
}
=
data
;
const
CancelToken
=
axios
.
CancelToken
;
this
.
cancelationSource
=
CancelToken
.
source
();
return
axios
.
get
(
this
.
endpoint
,
{
params
:
{
scope
,
page
},
cancelToken
:
this
.
cancelationSource
.
token
,
});
}
...
...
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