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
19a6cc26
Commit
19a6cc26
authored
Mar 17, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adss changelog entry
parent
32dfa801
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
poll.js
app/assets/javascripts/lib/utils/poll.js
+6
-6
29575-polling.yml
changelogs/unreleased/29575-polling.yml
+4
-0
No files found.
app/assets/javascripts/lib/utils/poll.js
View file @
19a6cc26
...
...
@@ -11,21 +11,21 @@ Vue.use(VueResource);
* new poll({
* url: 'endopoint',
* data: {},
* successCallback: () => {}
* errorCallback: () => {}
* successCallback: () => {}
,
* errorCallback: () => {}
,
* }).makeRequest();
*
*
* 1. Checks for response and headers before start polling
* 2. Interval is provided by `
X-
Poll-Interval` header.
* 3. If `
X-
Poll-Interval` is -1, we stop polling
* 2. Interval is provided by `Poll-Interval` header.
* 3. If `Poll-Interval` is -1, we stop polling
* 4. If HTTP response is 200, we poll.
* 5. If HTTP response is different from 200, we stop polling.
*
*/
export
default
class
poll
{
constructor
(
options
)
{
this
.
options
=
options
||
{}
;
constructor
(
options
=
{}
)
{
this
.
options
=
options
;
this
.
intervalHeader
=
'POLL-INTERVAL'
;
}
...
...
changelogs/unreleased/29575-polling.yml
0 → 100644
View file @
19a6cc26
---
title
:
Adds polling utility function for vue resource
merge_request
:
author
:
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