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
510ea543
Commit
510ea543
authored
Jul 16, 2018
by
gfyoung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Toggle Show / Hide Button for Kubernetes Password
Closes #49193.
parent
0d488c7b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
1 deletion
+27
-1
app/assets/javascripts/clusters/clusters_bundle.js
app/assets/javascripts/clusters/clusters_bundle.js
+2
-0
changelogs/unreleased/toggle-password-cluster.yml
changelogs/unreleased/toggle-password-cluster.yml
+5
-0
locale/gitlab.pot
locale/gitlab.pot
+3
-0
spec/javascripts/clusters/clusters_bundle_spec.js
spec/javascripts/clusters/clusters_bundle_spec.js
+17
-1
No files found.
app/assets/javascripts/clusters/clusters_bundle.js
View file @
510ea543
...
...
@@ -162,8 +162,10 @@ export default class Clusters {
if
(
type
===
'
password
'
)
{
this
.
tokenField
.
setAttribute
(
'
type
'
,
'
text
'
);
this
.
showTokenButton
.
textContent
=
s__
(
'
ClusterIntegration|Hide
'
);
}
else
{
this
.
tokenField
.
setAttribute
(
'
type
'
,
'
password
'
);
this
.
showTokenButton
.
textContent
=
s__
(
'
ClusterIntegration|Show
'
);
}
}
...
...
changelogs/unreleased/toggle-password-cluster.yml
0 → 100644
View file @
510ea543
---
title
:
Toggle Show / Hide Button for Kubernetes Password
merge_request
:
20659
author
:
gfyoung
type
:
fixed
locale/gitlab.pot
View file @
510ea543
...
...
@@ -1286,6 +1286,9 @@ msgstr ""
msgid "ClusterIntegration|Helm Tiller"
msgstr ""
msgid "ClusterIntegration|Hide"
msgstr ""
msgid "ClusterIntegration|Ingress"
msgstr ""
...
...
spec/javascripts/clusters/clusters_bundle_spec.js
View file @
510ea543
...
...
@@ -45,17 +45,33 @@ describe('Clusters', () => {
});
describe
(
'
showToken
'
,
()
=>
{
it
(
'
should update t
ye
field type
'
,
()
=>
{
it
(
'
should update t
oken
field type
'
,
()
=>
{
cluster
.
showTokenButton
.
click
();
expect
(
cluster
.
tokenField
.
getAttribute
(
'
type
'
),
).
toEqual
(
'
text
'
);
cluster
.
showTokenButton
.
click
();
expect
(
cluster
.
tokenField
.
getAttribute
(
'
type
'
),
).
toEqual
(
'
password
'
);
});
it
(
'
should update show token button text
'
,
()
=>
{
cluster
.
showTokenButton
.
click
();
expect
(
cluster
.
showTokenButton
.
textContent
,
).
toEqual
(
'
Hide
'
);
cluster
.
showTokenButton
.
click
();
expect
(
cluster
.
showTokenButton
.
textContent
,
).
toEqual
(
'
Show
'
);
});
});
describe
(
'
checkForNewInstalls
'
,
()
=>
{
...
...
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