Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gutyán Gábor
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
393afbe5
authored
May 29, 2017
by
Czémán Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hide command strings, it solves issue #474
parent
47e837a2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
11 deletions
+16
-11
circle/dashboard/static/dashboard/vm-details.js
+10
-5
circle/dashboard/templates/dashboard/vm-detail.html
+6
-6
No files found.
circle/dashboard/static/dashboard/vm-details.js
View file @
393afbe5
...
@@ -70,12 +70,12 @@ $(function() {
...
@@ -70,12 +70,12 @@ $(function() {
});
});
/* for js fallback */
/* for js fallback */
$
(
"
#vm-details-pw-show
"
).
parent
(
"div"
).
children
(
"input"
).
prop
(
"type"
,
"password"
);
$
(
"
.vm-details-show-password
"
).
parent
(
"div"
).
children
(
"input"
).
prop
(
"type"
,
"password"
);
/* show password */
/* show password */
$
(
"
#vm-details-pw-show
"
).
click
(
function
()
{
$
(
"
.vm-details-show-password
"
).
click
(
function
()
{
var
input
=
$
(
this
).
parent
(
"div"
).
children
(
"input"
);
var
input
=
$
(
this
).
parent
(
"div"
).
children
(
"input"
);
var
eye
=
$
(
this
).
children
(
"
#vm-details-pw
-eye"
);
var
eye
=
$
(
this
).
children
(
"
.vm-details-password
-eye"
);
var
span
=
$
(
this
);
var
span
=
$
(
this
);
span
.
tooltip
(
"destroy"
);
span
.
tooltip
(
"destroy"
);
...
@@ -253,6 +253,11 @@ $(function() {
...
@@ -253,6 +253,11 @@ $(function() {
});
});
// Clipboard for connection strings
// Clipboard for connection strings
if
(
Clipboard
.
isSupported
())
if
(
Clipboard
.
isSupported
())
{
new
Clipboard
(
".vm-details-connection-string-copy"
);
new
Clipboard
(
".vm-details-connection-string-copy"
,
{
text
:
function
(
trigger
)
{
return
$
(
$
(
trigger
).
data
(
"clipboard-target"
)).
val
();
}
});
}
});
});
circle/dashboard/templates/dashboard/vm-detail.html
View file @
393afbe5
...
@@ -133,9 +133,9 @@
...
@@ -133,9 +133,9 @@
<div
class=
"input-group"
>
<div
class=
"input-group"
>
<input
type=
"text"
id=
"vm-details-pw-input"
class=
"form-control input-sm input-tags"
<input
type=
"text"
id=
"vm-details-pw-input"
class=
"form-control input-sm input-tags"
value=
"{{ instance.pw }}"
spellcheck=
"false"
autocomplete=
"new-password"
/>
value=
"{{ instance.pw }}"
spellcheck=
"false"
autocomplete=
"new-password"
/>
<span
class=
"input-group-addon btn btn-default input-tags
"
id=
"vm-details-pw-show
"
<span
class=
"input-group-addon btn btn-default input-tags
vm-details-show-password
"
title=
"{% trans "
Show
password
"
%}"
data-container=
"body"
>
title=
"{% trans "
Show
password
"
%}"
data-container=
"body"
>
<i
class=
"fa fa-eye
"
id=
"vm-details-pw
-eye"
></i>
<i
class=
"fa fa-eye
vm-details-password
-eye"
></i>
</span>
</span>
</div>
</div>
</dd>
</dd>
...
@@ -160,6 +160,10 @@
...
@@ -160,6 +160,10 @@
<input
type=
"text"
spellcheck=
"false"
<input
type=
"text"
spellcheck=
"false"
value=
"{{ c.cmd }}"
value=
"{{ c.cmd }}"
id=
"vm-details-connection-string-{{ c.id }}"
class=
"form-control input-tags"
/>
id=
"vm-details-connection-string-{{ c.id }}"
class=
"form-control input-tags"
/>
<span
class=
"input-group-addon btn btn-default input-tags vm-details-show-password"
title=
"{% trans "
Show
password
"
%}"
data-container=
"body"
>
<i
class=
"fa fa-eye vm-details-password-eye"
></i>
</span>
<span
class=
"input-group-addon input-tags btn btn-default vm-details-connection-string-copy"
<span
class=
"input-group-addon input-tags btn btn-default vm-details-connection-string-copy"
title=
"{% trans "
Copy
to
clipboard
"
%}"
title=
"{% trans "
Copy
to
clipboard
"
%}"
data-container=
"body"
data-container=
"body"
...
@@ -167,15 +171,11 @@
...
@@ -167,15 +171,11 @@
<i
class=
"fa fa-copy"
></i>
<i
class=
"fa fa-copy"
></i>
</span>
</span>
</div>
</div>
{% empty %}
{% empty %}
<div
class=
"input-group dashboard-vm-details-connect-command"
>
<div
class=
"input-group dashboard-vm-details-connect-command"
>
<span
class=
"input-group-addon input-tags"
>
{% trans "Command" %}
</span>
<span
class=
"input-group-addon input-tags"
>
{% trans "Command" %}
</span>
<input
type=
"text"
spellcheck=
"false"
value=
"{% trans "
Connection
is
not
possible
."
%}"
<input
type=
"text"
spellcheck=
"false"
value=
"{% trans "
Connection
is
not
possible
."
%}"
id=
"vm-details-connection-string"
class=
"form-control input-tags"
/>
id=
"vm-details-connection-string"
class=
"form-control input-tags"
/>
<span
class=
"input-group-addon input-tags"
id=
"vm-details-connection-string-copy"
>
<i
class=
"fa fa-copy"
title=
"{% trans "
Select
all
"
%}"
></i>
</span>
</div>
</div>
{% endfor %}
{% endfor %}
{% if instance.get_connect_uri %}
{% if instance.get_connect_uri %}
...
...
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