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
path: root/app
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2017-12-05 15:31:07 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2017-12-05 15:31:07 +0300
commit2fc29237aacd8df778ede532e450d06c79c63004 (patch)
treeffafca695f63d92897ce543c3c51fbf73a403d5d /app
parent9429514e303bdceee0621b5c4bf02ad8ca0a7add (diff)
parentf1357a1e15bead6b58c049357c765dd991c04d9b (diff)
Merge remote-tracking branch 'origin/list-multiple-clusters' into cluster-page-with-list-clusters
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/clusters/clusters_index.js2
-rw-r--r--app/assets/stylesheets/pages/clusters.scss4
-rw-r--r--app/controllers/projects/clusters_controller.rb2
-rw-r--r--app/models/project.rb1
-rw-r--r--app/views/projects/clusters/_tabs.html.haml4
5 files changed, 8 insertions, 5 deletions
diff --git a/app/assets/javascripts/clusters/clusters_index.js b/app/assets/javascripts/clusters/clusters_index.js
index 82ac8d93035..6844d1dbd83 100644
--- a/app/assets/javascripts/clusters/clusters_index.js
+++ b/app/assets/javascripts/clusters/clusters_index.js
@@ -28,7 +28,7 @@ const toggleValue = (button) => {
*
* When the user clicks the toggle button for each cluster, it:
* - toggles the button
- * - shows a loading and disabled state
+ * - shows a loading and disables button
* - Makes a put request to the given endpoint
* Once we receive the response, either:
* 1) Show updated status in case of successfull response
diff --git a/app/assets/stylesheets/pages/clusters.scss b/app/assets/stylesheets/pages/clusters.scss
index b5ac6db04ad..c303f016ff9 100644
--- a/app/assets/stylesheets/pages/clusters.scss
+++ b/app/assets/stylesheets/pages/clusters.scss
@@ -23,4 +23,8 @@
.empty-state .svg-content img {
width: 145px;
}
+
+ .top-area .nav-controls > .btn.btn-add-cluster {
+ margin-right: 0;
+ }
}
diff --git a/app/controllers/projects/clusters_controller.rb b/app/controllers/projects/clusters_controller.rb
index e0ded4ceb2f..f3939c74591 100644
--- a/app/controllers/projects/clusters_controller.rb
+++ b/app/controllers/projects/clusters_controller.rb
@@ -46,7 +46,7 @@ class Projects::ClustersController < Projects::ApplicationController
end
format.html do
flash[:notice] = "Cluster was successfully updated."
- redirect_to project_cluster_path(project, project.cluster)
+ redirect_to project_cluster_path(project, cluster)
end
end
else
diff --git a/app/models/project.rb b/app/models/project.rb
index 0a7e7617d9b..df3034d86ef 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -189,7 +189,6 @@ class Project < ActiveRecord::Base
has_one :statistics, class_name: 'ProjectStatistics'
has_one :cluster_project, class_name: 'Clusters::Project'
- has_one :cluster, through: :cluster_project, class_name: 'Clusters::Cluster'
has_many :clusters, through: :cluster_project, class_name: 'Clusters::Cluster'
# Container repositories need to remove data from the container registry,
diff --git a/app/views/projects/clusters/_tabs.html.haml b/app/views/projects/clusters/_tabs.html.haml
index 955a9940727..920ed40ea69 100644
--- a/app/views/projects/clusters/_tabs.html.haml
+++ b/app/views/projects/clusters/_tabs.html.haml
@@ -14,5 +14,5 @@
= link_to project_clusters_path(@project), class: "js-all-tab" do
= s_("ClusterIntegration|All")
%span.badge= @all_count
- .pull-right.nav-bar-right
- = link_to s_("ClusterIntegration|Add cluster"), new_project_cluster_path(@project), class: "btn btn-success disabled has-tooltip js-add-cluster", title: s_("ClusterIntegration|Multiple clusters are available in GitLab Entreprise Edition Premium and Ultimate")
+ .nav-controls
+ = link_to s_("ClusterIntegration|Add cluster"), new_project_cluster_path(@project), class: "btn btn-success btn-add-cluster disabled has-tooltip js-add-cluster", title: s_("ClusterIntegration|Multiple clusters are available in GitLab Entreprise Edition Premium and Ultimate")