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
cddab09b
Commit
cddab09b
authored
Oct 02, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Starts edit form
parent
25d1c786
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
68 additions
and
10 deletions
+68
-10
app/assets/javascripts/clusters.js
app/assets/javascripts/clusters.js
+11
-0
app/assets/stylesheets/pages/clusters.scss
app/assets/stylesheets/pages/clusters.scss
+5
-0
app/views/projects/clusters/_sidebar.html.haml
app/views/projects/clusters/_sidebar.html.haml
+1
-1
app/views/projects/clusters/edit.html.haml
app/views/projects/clusters/edit.html.haml
+51
-9
No files found.
app/assets/javascripts/clusters.js
0 → 100644
View file @
cddab09b
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
const
toggleButton
=
document
.
querySelector
(
'
.js-toggle-cluster
'
);
// disable in case of no permissions
toggleButton
.
addEventListener
(()
=>
{
// update text
});
// poll the status
});
app/assets/stylesheets/pages/clusters.scss
0 → 100644
View file @
cddab09b
.edit-cluster-form
{
.clipboard-addon
{
background-color
:
$white-light
;
}
}
\ No newline at end of file
app/views/projects/clusters/_sidebar.html.haml
View file @
cddab09b
...
@@ -5,4 +5,4 @@
...
@@ -5,4 +5,4 @@
=
s_
(
'ClusterIntegration|With cluster integration you can take advantage of Kubernetes auto deployment.'
)
=
s_
(
'ClusterIntegration|With cluster integration you can take advantage of Kubernetes auto deployment.'
)
%p
%p
-
link
=
link_to
(
s_
(
'ClusterIntegration|auto deployment'
),
help_page_path
(
'TODO'
),
target:
'_blank'
,
rel:
'noopener noreferrer'
)
-
link
=
link_to
(
s_
(
'ClusterIntegration|auto deployment'
),
help_page_path
(
'TODO'
),
target:
'_blank'
,
rel:
'noopener noreferrer'
)
=
s_
(
'ClusterIntegration|Learn more about %{link_to_documentation} in GitLab'
).
html_safe
%
{
link_to_documentation:
link
}
=
s_
(
'ClusterIntegration|Learn more about %{link_to_documentation} in GitLab
.
'
).
html_safe
%
{
link_to_documentation:
link
}
app/views/projects/clusters/edit.html.haml
View file @
cddab09b
edit/show cluster
.row.prepend-top-default.edit-cluster-form
%br
=
render
'sidebar'
=
@cluster
.
inspect
.col-lg-8
%br
%h4
.prepend-top-0
=
@cluster
.
service
.
inspect
=
s_
(
'ClusterIntegration|Enable cluster integration'
)
%br
%p
=
form_errors
(
@cluster
)
-#TODO: if can?(current_user, :update_cluster, @cluster)
-# if :enabled
=
s_
(
'ClusterIntegration|Disabling cluster integration will not affect your cluster. It will only temporarily turn off GitLab\'s conection to it.'
)
-# else
=
s_
(
'ClusterIntegration|Missing test/state in mockups.'
)
-# else !can?(current_user, :update_cluster, @cluster)
-# if :enabled
=
s_
(
'ClusterIntegration|Cluster integration is enabled for this project.'
)
-# else
=
s_
(
'ClusterIntegration|Cluster integration is disabled for this project.'
)
%label
.toggle-wrapper
%button
{
type:
'button'
,
class:
'js-toggle-cluster project-feature-toggle'
,
aria:
{
label:
'Toggle'
},
data:
{
'enabled-text'
:
'Enable'
,
'disabled-text'
:
'disabled'
}
}
-# render errors TODO
#= form_errors(@cluster)
-# if can?(current_user, :update_cluster, @cluster)
.form_group
%label
=
s_
(
'ClusterIntegration|Google container engine'
)
%p
-
link_gke
=
link_to
(
s_
(
'ClusterIntegration|Manage your cluster on GKE'
),
path:
''
,
target:
'_blank'
,
rel:
'noopener noreferrer'
)
=
s_
(
'ClusterIntegration|This cluster was not set up on Google Container Engine. %{link_gke}'
).
html_safe
%
{
link_gke:
link_gke
}
.form_group
%label
=
s_
(
'ClusterIntegration|Cluster name'
)
.input-group
%input
.form-control
{
value:
@cluster
.
cluster_name
,
disabled:
true
}
%span
.input-group-addon.clipboard-addon
=
clipboard_button
(
text:
@cluster
.
cluster_name
,
title:
s_
(
'ClusterIntegration|Copy cluster name'
))
%br
-# - if can?(current_user, :admin_cluster, @cluster)
.well.form_group
%label
.text-danger
=
s_
(
'ClusterIntegration|Remove cluster integration'
)
%p
=
s_
(
'ClusterIntegration|Removing cluster integration will remove the cluster configuration you have added to this project. It will not delete your project.'
)
=
link_to
(
s_
(
'ClusterIntegration|Remove integration'
),
namespace_project_cluster_path
(
@project
.
namespace
,
@project
,
@cluster
.
id
),
method: :delete
,
class:
'btn btn-danger'
)
%br
%br
=
link_to
"Enable"
,
namespace_project_cluster_path
(
@project
.
namespace
,
@project
,
@cluster
.
id
,
cluster:
{
enabled:
'true'
}),
method: :put
=
link_to
"Enable"
,
namespace_project_cluster_path
(
@project
.
namespace
,
@project
,
@cluster
.
id
,
cluster:
{
enabled:
'true'
}),
method: :put
%br
%br
=
link_to
"Disable"
,
namespace_project_cluster_path
(
@project
.
namespace
,
@project
,
@cluster
.
id
,
cluster:
{
enabled:
'false'
}),
method: :put
=
link_to
"Disable"
,
namespace_project_cluster_path
(
@project
.
namespace
,
@project
,
@cluster
.
id
,
cluster:
{
enabled:
'false'
}),
method: :put
%br
=
link_to
"Soft-delete the cluster"
,
namespace_project_cluster_path
(
@project
.
namespace
,
@project
,
@cluster
.
id
),
method: :delete
%br
%br
-# status GET
-# status GET
-# status: The current status of the operation.
-# status: The current status of the operation.
...
...
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