Commit e1a64f0c authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch 'enable-polling-env' into 'master'

Re-enable polling for environments

See merge request !12678
parents dfd3178c 03976c8f
...@@ -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)
......
---
title: Re-enable realtime for environments table
merge_request:
author:
...@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment