Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-26 12:08:36 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-26 12:08:36 +0300
commit23d237110e6a646dec08e1f5b4696d2d9c51cfef (patch)
tree3c568514c8e22203f50d38940cbb9865aad5bb02 /app/controllers/clusters
parent274dff4f027da636f62361c811285cbb5d5a7c0c (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers/clusters')
-rw-r--r--app/controllers/clusters/clusters_controller.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/app/controllers/clusters/clusters_controller.rb b/app/controllers/clusters/clusters_controller.rb
index 673ead04709..9da8ad229fe 100644
--- a/app/controllers/clusters/clusters_controller.rb
+++ b/app/controllers/clusters/clusters_controller.rb
@@ -3,14 +3,14 @@
class Clusters::ClustersController < Clusters::BaseController
include RoutableActions
- before_action :cluster, only: [:cluster_status, :show, :update, :destroy]
+ before_action :cluster, only: [:cluster_status, :show, :update, :destroy, :clear_cache]
before_action :generate_gcp_authorize_url, only: [:new]
before_action :validate_gcp_token, only: [:new]
before_action :gcp_cluster, only: [:new]
before_action :user_cluster, only: [:new]
before_action :authorize_create_cluster!, only: [:new, :authorize_aws_role, :revoke_aws_role, :aws_proxy]
before_action :authorize_update_cluster!, only: [:update]
- before_action :authorize_admin_cluster!, only: [:destroy]
+ before_action :authorize_admin_cluster!, only: [:destroy, :clear_cache]
before_action :update_applications_status, only: [:cluster_status]
before_action only: [:new, :create_gcp] do
push_frontend_feature_flag(:create_eks_clusters)
@@ -169,6 +169,12 @@ class Clusters::ClustersController < Clusters::BaseController
render json: response.body, status: response.status
end
+ def clear_cache
+ cluster.delete_cached_resources!
+
+ redirect_to cluster.show_path, notice: _('Cluster cache cleared.')
+ end
+
private
def destroy_params