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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
e1a64f0c
Commit
e1a64f0c
authored
Jul 06, 2017
by
Kamil Trzciński
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'enable-polling-env' into 'master'
Re-enable polling for environments See merge request !12678
parents
dfd3178c
03976c8f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
app/controllers/projects/environments_controller.rb
app/controllers/projects/environments_controller.rb
+2
-0
changelogs/unreleased/enable-polling-env.yml
changelogs/unreleased/enable-polling-env.yml
+4
-0
spec/controllers/projects/environments_controller_spec.rb
spec/controllers/projects/environments_controller_spec.rb
+2
-4
No files found.
app/controllers/projects/environments_controller.rb
View file @
e1a64f0c
...
@@ -15,6 +15,8 @@ class Projects::EnvironmentsController < Projects::ApplicationController
...
@@ -15,6 +15,8 @@ class Projects::EnvironmentsController < Projects::ApplicationController
respond_to
do
|
format
|
respond_to
do
|
format
|
format
.
html
format
.
html
format
.
json
do
format
.
json
do
Gitlab
::
PollingInterval
.
set_header
(
response
,
interval:
3_000
)
render
json:
{
render
json:
{
environments:
EnvironmentSerializer
environments:
EnvironmentSerializer
.
new
(
project:
@project
,
current_user:
@current_user
)
.
new
(
project:
@project
,
current_user:
@current_user
)
...
...
changelogs/unreleased/enable-polling-env.yml
0 → 100644
View file @
e1a64f0c
---
title
:
Re-enable realtime for environments table
merge_request
:
author
:
spec/controllers/projects/environments_controller_spec.rb
View file @
e1a64f0c
...
@@ -58,11 +58,9 @@ describe Projects::EnvironmentsController do
...
@@ -58,11 +58,9 @@ describe Projects::EnvironmentsController do
expect
(
json_response
[
'stopped_count'
]).
to
eq
1
expect
(
json_response
[
'stopped_count'
]).
to
eq
1
end
end
it
'does not set the polling interval header'
do
it
'sets the polling interval header'
do
# TODO, this is a temporary fix, see follow up issue:
# https://gitlab.com/gitlab-org/gitlab-ee/issues/2677
expect
(
response
).
to
have_http_status
(
:ok
)
expect
(
response
).
to
have_http_status
(
:ok
)
expect
(
response
.
headers
[
'Poll-Interval'
]).
to
be_nil
expect
(
response
.
headers
[
'Poll-Interval'
]).
to
eq
(
"3000"
)
end
end
end
end
...
...
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