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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
2bc3a4dc
Commit
2bc3a4dc
authored
Dec 02, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update toggle button text in show page
parent
dc1ba68b
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
351 additions
and
9 deletions
+351
-9
app/assets/javascripts/clusters/clusters_index.js
app/assets/javascripts/clusters/clusters_index.js
+0
-1
app/views/projects/clusters/_cluster.html.haml
app/views/projects/clusters/_cluster.html.haml
+2
-2
app/views/projects/clusters/show.html.haml
app/views/projects/clusters/show.html.haml
+2
-2
locale/gitlab.pot
locale/gitlab.pot
+347
-4
No files found.
app/assets/javascripts/clusters/clusters_index.js
View file @
2bc3a4dc
import
Flash
from
'
../flash
'
;
import
Flash
from
'
../flash
'
;
import
{
s__
}
from
'
../locale
'
;
import
{
s__
}
from
'
../locale
'
;
import
ClustersService
from
'
./services/clusters_service
'
;
import
ClustersService
from
'
./services/clusters_service
'
;
/**
/**
* Toggles loading and disabled classes.
* Toggles loading and disabled classes.
* @param {HTMLElement} button
* @param {HTMLElement} button
...
...
app/views/projects/clusters/_cluster.html.haml
View file @
2bc3a4dc
...
@@ -13,9 +13,9 @@
...
@@ -13,9 +13,9 @@
.table-mobile-header
{
role:
"rowheader"
}
.table-mobile-header
{
role:
"rowheader"
}
.table-mobile-content
.table-mobile-content
%button
{
type:
"button"
,
%button
{
type:
"button"
,
class:
"js-toggle-cluster-list project-feature-toggle #{'is-checked' if cluster.enabled?} #{'is-disabled' if can_toggle_cluster?(cluster)}"
,
class:
"js-toggle-cluster-list project-feature-toggle #{'is-checked' if cluster.enabled?} #{'is-disabled' if
!
can_toggle_cluster?(cluster)}"
,
"aria-label"
:
s_
(
"ClusterIntegration|Toggle Cluster"
),
"aria-label"
:
s_
(
"ClusterIntegration|Toggle Cluster"
),
disabled:
!
can
?
(
current_user
,
:update_cluster
,
cluster
),
disabled:
!
can
_toggle_cluster?
(
cluster
),
data:
{
"enabled-text"
:
s_
(
"ClusterIntegration|Active"
),
data:
{
"enabled-text"
:
s_
(
"ClusterIntegration|Active"
),
"disabled-text"
:
s_
(
"ClusterIntegration|Inactive"
),
"disabled-text"
:
s_
(
"ClusterIntegration|Inactive"
),
endpoint:
namespace_project_cluster_path
(
@project
.
namespace
,
@project
,
cluster
,
format: :json
)
}
}
endpoint:
namespace_project_cluster_path
(
@project
.
namespace
,
@project
,
cluster
,
format: :json
)
}
}
...
...
app/views/projects/clusters/show.html.haml
View file @
2bc3a4dc
...
@@ -49,9 +49,9 @@
...
@@ -49,9 +49,9 @@
%button
{
type:
'button'
,
%button
{
type:
'button'
,
class:
"js-toggle-cluster project-feature-toggle #{'is-checked' unless !@cluster.enabled?} #{'is-disabled' unless can?(current_user, :update_cluster, @cluster)}"
,
class:
"js-toggle-cluster project-feature-toggle #{'is-checked' unless !@cluster.enabled?} #{'is-disabled' unless can?(current_user, :update_cluster, @cluster)}"
,
'aria-label'
:
s_
(
'ClusterIntegration|Toggle Cluster'
),
"aria-label"
:
s_
(
"ClusterIntegration|Toggle Cluster"
),
disabled:
!
can?
(
current_user
,
:update_cluster
,
@cluster
),
disabled:
!
can?
(
current_user
,
:update_cluster
,
@cluster
),
data:
{
'enabled-text'
:
'Enabled'
,
'disabled-text'
:
'Disabled'
}
}
data:
{
"enabled-text"
:
s_
(
"ClusterIntegration|Active"
),
"disabled-text"
:
s_
(
"ClusterIntegration|Inactive"
),
}
}
-
if
can?
(
current_user
,
:update_cluster
,
@cluster
)
-
if
can?
(
current_user
,
:update_cluster
,
@cluster
)
.form-group
.form-group
...
...
locale/gitlab.pot
View file @
2bc3a4dc
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