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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
dd66c6a2
Commit
dd66c6a2
authored
7 years ago
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use helper for feature check in cluster partials
parent
56f719f8
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
2 deletions
+15
-2
app/helpers/clusters_helper.rb
app/helpers/clusters_helper.rb
+5
-0
app/views/projects/clusters/gcp/_form.html.haml
app/views/projects/clusters/gcp/_form.html.haml
+1
-1
app/views/projects/clusters/gcp/_show.html.haml
app/views/projects/clusters/gcp/_show.html.haml
+4
-0
app/views/projects/clusters/user/_form.html.haml
app/views/projects/clusters/user/_form.html.haml
+1
-1
app/views/projects/clusters/user/_show.html.haml
app/views/projects/clusters/user/_show.html.haml
+4
-0
No files found.
app/helpers/clusters_helper.rb
0 → 100644
View file @
dd66c6a2
module
ClustersHelper
def
has_multiple_clusters?
(
project
)
project
.
feature_available?
(
:multiple_clusters
)
end
end
This diff is collapsed.
Click to expand it.
app/views/projects/clusters/gcp/_form.html.haml
View file @
dd66c6a2
...
...
@@ -9,7 +9,7 @@
=
field
.
text_field
:name
,
class:
'form-control'
,
placeholder:
s_
(
'ClusterIntegration|Cluster name'
)
.form-group
=
field
.
label
:environment_scope
,
s_
(
'ClusterIntegration|Environment scope'
)
=
field
.
text_field
:environment_scope
,
class:
'form-control
js-select-on-focus'
,
disabled:
true
,
placeholder:
s_
(
'ClusterIntegration|Environment scope'
)
=
field
.
text_field
:environment_scope
,
class:
'form-control
'
,
readonly:
has_multiple_clusters?
(
@project
)
,
placeholder:
s_
(
'ClusterIntegration|Environment scope'
)
=
field
.
fields_for
:provider_gcp
,
@cluster
.
provider_gcp
do
|
provider_gcp_field
|
.form-group
...
...
This diff is collapsed.
Click to expand it.
app/views/projects/clusters/gcp/_show.html.haml
View file @
dd66c6a2
...
...
@@ -9,6 +9,10 @@
=
form_for
@cluster
,
url:
namespace_project_cluster_path
(
@project
.
namespace
,
@project
,
@cluster
),
as: :cluster
do
|
field
|
=
form_errors
(
@cluster
)
.form-group
=
field
.
label
:environment_scope
,
s_
(
'ClusterIntegration|Environment scope'
)
=
field
.
text_field
:environment_scope
,
class:
'form-control js-select-on-focus'
,
readonly:
has_multiple_clusters?
(
@project
),
placeholder:
s_
(
'ClusterIntegration|Environment scope'
)
=
field
.
fields_for
:platform_kubernetes
,
@cluster
.
platform_kubernetes
do
|
platform_kubernetes_field
|
.form-group
=
platform_kubernetes_field
.
label
:api_url
,
s_
(
'ClusterIntegration|API URL'
)
...
...
This diff is collapsed.
Click to expand it.
app/views/projects/clusters/user/_form.html.haml
View file @
dd66c6a2
...
...
@@ -5,7 +5,7 @@
=
field
.
text_field
:name
,
class:
'form-control'
,
placeholder:
s_
(
'ClusterIntegration|Cluster name'
)
.form-group
=
field
.
label
:environment_scope
,
s_
(
'ClusterIntegration|Environment scope'
)
=
field
.
text_field
:environment_scope
,
class:
'form-control
js-select-on-focus'
,
disabled:
true
,
placeholder:
s_
(
'ClusterIntegration|Environment scope'
)
=
field
.
text_field
:environment_scope
,
class:
'form-control
'
,
readonly:
has_multiple_clusters?
(
@project
)
,
placeholder:
s_
(
'ClusterIntegration|Environment scope'
)
=
field
.
fields_for
:platform_kubernetes
,
@cluster
.
platform_kubernetes
do
|
platform_kubernetes_field
|
.form-group
...
...
This diff is collapsed.
Click to expand it.
app/views/projects/clusters/user/_show.html.haml
View file @
dd66c6a2
...
...
@@ -4,6 +4,10 @@
=
field
.
label
:name
,
s_
(
'ClusterIntegration|Cluster name'
)
=
field
.
text_field
:name
,
class:
'form-control'
,
placeholder:
s_
(
'ClusterIntegration|Cluster name'
)
.form-group
=
field
.
label
:environment_scope
,
s_
(
'ClusterIntegration|Environment scope'
)
=
field
.
text_field
:environment_scope
,
class:
'form-control js-select-on-focus'
,
readonly:
has_multiple_clusters?
(
@project
),
placeholder:
s_
(
'ClusterIntegration|Environment scope'
)
=
field
.
fields_for
:platform_kubernetes
,
@cluster
.
platform_kubernetes
do
|
platform_kubernetes_field
|
.form-group
=
platform_kubernetes_field
.
label
:api_url
,
s_
(
'ClusterIntegration|API URL'
)
...
...
This diff is collapsed.
Click to expand it.
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