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
232b98b5
Commit
232b98b5
authored
Dec 18, 2017
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add update environment scope filed
parent
78573248
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
17 deletions
+20
-17
app/controllers/projects/clusters_controller.rb
app/controllers/projects/clusters_controller.rb
+0
-13
app/views/projects/clusters/gcp/_form.html.haml
app/views/projects/clusters/gcp/_form.html.haml
+3
-2
app/views/projects/clusters/gcp/_show.html.haml
app/views/projects/clusters/gcp/_show.html.haml
+7
-0
app/views/projects/clusters/user/_form.html.haml
app/views/projects/clusters/user/_form.html.haml
+3
-2
app/views/projects/clusters/user/_show.html.haml
app/views/projects/clusters/user/_show.html.haml
+7
-0
No files found.
app/controllers/projects/clusters_controller.rb
View file @
232b98b5
...
...
@@ -70,19 +70,6 @@ class Projects::ClustersController < Projects::ApplicationController
.
present
(
current_user:
current_user
)
end
def
create_params
params
.
require
(
:cluster
).
permit
(
:enabled
,
:name
,
:provider_type
,
provider_gcp_attributes:
[
:gcp_project_id
,
:zone
,
:num_nodes
,
:machine_type
])
end
def
update_params
if
cluster
.
managed?
params
.
require
(
:cluster
).
permit
(
...
...
app/views/projects/clusters/gcp/_form.html.haml
View file @
232b98b5
...
...
@@ -7,12 +7,13 @@
.form-group
=
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'
)
-
if
@project
.
feature_available?
(
:multiple_clusters
)
=
field
.
text_field
:environment_scope
,
class:
'form-control
js-select-on-focus
'
,
placeholder:
s_
(
'ClusterIntegration|Environment scope'
)
=
field
.
text_field
:environment_scope
,
class:
'form-control'
,
placeholder:
s_
(
'ClusterIntegration|Environment scope'
)
-
else
=
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'
,
disabled:
true
,
placeholder:
s_
(
'ClusterIntegration|Environment scope'
)
=
field
.
fields_for
:provider_gcp
,
@cluster
.
provider_gcp
do
|
provider_gcp_field
|
.form-group
...
...
app/views/projects/clusters/gcp/_show.html.haml
View file @
232b98b5
...
...
@@ -9,6 +9,13 @@
=
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'
)
-
if
@project
.
feature_available?
(
:multiple_clusters
)
=
field
.
text_field
:environment_scope
,
class:
'form-control js-select-on-focus'
,
placeholder:
s_
(
'ClusterIntegration|Environment scope'
)
-
else
=
field
.
text_field
:environment_scope
,
class:
'form-control js-select-on-focus'
,
disabled:
true
,
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'
)
...
...
app/views/projects/clusters/user/_form.html.haml
View file @
232b98b5
...
...
@@ -3,12 +3,13 @@
.form-group
=
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'
)
-
if
@project
.
feature_available?
(
:multiple_clusters
)
=
field
.
text_field
:environment_scope
,
class:
'form-control
js-select-on-focus
'
,
placeholder:
s_
(
'ClusterIntegration|Environment scope'
)
=
field
.
text_field
:environment_scope
,
class:
'form-control'
,
placeholder:
s_
(
'ClusterIntegration|Environment scope'
)
-
else
=
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'
,
disabled:
true
,
placeholder:
s_
(
'ClusterIntegration|Environment scope'
)
=
field
.
fields_for
:platform_kubernetes
,
@cluster
.
platform_kubernetes
do
|
platform_kubernetes_field
|
.form-group
...
...
app/views/projects/clusters/user/_show.html.haml
View file @
232b98b5
...
...
@@ -4,6 +4,13 @@
=
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'
)
-
if
@project
.
feature_available?
(
:multiple_clusters
)
=
field
.
text_field
:environment_scope
,
class:
'form-control js-select-on-focus'
,
placeholder:
s_
(
'ClusterIntegration|Environment scope'
)
-
else
=
field
.
text_field
:environment_scope
,
class:
'form-control js-select-on-focus'
,
disabled:
true
,
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'
)
...
...
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