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
1acfd3ea
authored
Jun 05, 2014
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-connection-details'
Conflicts: circle/dashboard/static/dashboard/dashboard.css
parents
bbd8020b
bfe7a9b3
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
8 deletions
+53
-8
circle/dashboard/static/dashboard/dashboard.css
+13
-4
circle/dashboard/static/dashboard/vm-details.js
+5
-0
circle/dashboard/templates/dashboard/vm-detail.html
+32
-4
circle/dashboard/views.py
+3
-0
No files found.
circle/dashboard/static/dashboard/dashboard.css
View file @
1acfd3ea
...
@@ -334,12 +334,13 @@ a.hover-black {
...
@@ -334,12 +334,13 @@ a.hover-black {
}
}
/* vm details connection */
/* vm details connection */
.vm-details-
pw
dd
{
.vm-details-
connection
dd
{
margin-left
:
155px
;
padding
:
4px
0
4px
0
;
}
}
.vm-details-pw
dt
{
.vm-details-connection
dt
{
width
:
140px
;
text-align
:
left
;
padding
:
4px
0
4px
15px
;
}
}
#vm-details-pw-confirm
{
#vm-details-pw-confirm
{
...
@@ -347,6 +348,10 @@ a.hover-black {
...
@@ -347,6 +348,10 @@ a.hover-black {
display
:
none
;
display
:
none
;
}
}
#vm-details-pw-confirm
dt
{
text-align
:
right
;
}
.dashboard-vm-details-network-h3
{
.dashboard-vm-details-network-h3
{
margin-top
:
20px
;
margin-top
:
20px
;
}
}
...
@@ -683,3 +688,7 @@ textarea[name="list-new-namelist"] {
...
@@ -683,3 +688,7 @@ textarea[name="list-new-namelist"] {
.vm-list-table-admin
{
.vm-list-table-admin
{
width
:
130px
;
width
:
130px
;
}
}
#vm-details-connection-string-copy
{
cursor
:
pointer
;
}
circle/dashboard/static/dashboard/vm-details.js
View file @
1acfd3ea
...
@@ -289,6 +289,11 @@ $(function() {
...
@@ -289,6 +289,11 @@ $(function() {
$
(
this
).
parent
(
"div"
).
slideUp
();
$
(
this
).
parent
(
"div"
).
slideUp
();
});
});
// select connection string
$
(
"#vm-details-connection-string-copy"
).
click
(
function
()
{
$
(
"#vm-details-connection-string"
).
focus
();
});
});
});
...
...
circle/dashboard/templates/dashboard/vm-detail.html
View file @
1acfd3ea
...
@@ -67,10 +67,27 @@
...
@@ -67,10 +67,27 @@
<span>
{{ instance.get_status_display|upper }}
</span>
<span>
{{ instance.get_status_display|upper }}
</span>
</span>
</span>
</div>
</div>
<h3>
{% trans "Connection" %}
</h3>
<h3>
{% trans "Connection details" %}
</h3>
<input
type=
"text"
value=
"{{ instance.get_connect_command }}"
class=
"form-control"
readonly
/>
<dl
class=
"dl-horizontal vm-details-connection"
>
<dl
class=
"dl-horizontal vm-details-pw"
>
<dt>
{% trans "Protocol" %}
</dt>
<dt>
{% trans "Password" %}:
</dt>
<dd>
{{ instance.access_method|upper }}
</dd>
<dt>
{% trans "Host" %}
</dt>
<dd>
{% if instance.get_connect_port %}
{{ instance.get_connect_host }}:
<strong>
{{ instance.get_connect_port }}
</strong>
{% else %}
<strong>
{% trans "The required port for this protocol is not forwarded." %}
</strong>
{% endif %}
</dd>
{% if instance.ipv6 %}
<dt>
{% trans "Host (IPv6)" %}
</dt>
<dd>
{{ ipv6_host }}:
<strong>
{{ instance.ipv6_port }}
</strong></dd>
{% endif %}
<dt>
{% trans "Username" %}
</dt>
<dd>
cloud
</dd>
<dt>
{% trans "Password" %}
</dt>
<dd>
<dd>
<div
class=
"input-group"
>
<div
class=
"input-group"
>
<input
type=
"text"
id=
"vm-details-pw-input"
class=
"form-control input-sm input-tags"
value=
"{{ instance.pw }}"
/>
<input
type=
"text"
id=
"vm-details-pw-input"
class=
"form-control input-sm input-tags"
value=
"{{ instance.pw }}"
/>
...
@@ -92,6 +109,17 @@
...
@@ -92,6 +109,17 @@
</dd>
</dd>
</div>
</div>
</dl>
</dl>
<div
class=
"input-group"
>
<span
class=
"input-group-addon input-tags"
>
{% trans "Command" %}
</span>
<input
type=
"text"
value=
"{% if instance.get_connect_command %}{{ instance.get_connect_command }}
{% else %}{% trans "
Connection
is
not
possible
."
%}{%
endif
%}"
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=
"icon-copy"
title=
"{% trans "
Select
all
"
%}"
></i>
</span>
</div>
</div>
</div>
<div
class=
"col-md-8"
id=
"vm-detail-pane"
>
<div
class=
"col-md-8"
id=
"vm-detail-pane"
>
<div
class=
"panel panel-default"
id=
"vm-detail-panel"
>
<div
class=
"panel panel-default"
id=
"vm-detail-panel"
>
...
...
circle/dashboard/views.py
View file @
1acfd3ea
...
@@ -246,6 +246,9 @@ class VmDetailView(CheckedDetailView):
...
@@ -246,6 +246,9 @@ class VmDetailView(CheckedDetailView):
}
}
context
[
'os_type_icon'
]
=
instance
.
os_type
.
replace
(
"unknown"
,
context
[
'os_type_icon'
]
=
instance
.
os_type
.
replace
(
"unknown"
,
"question"
)
"question"
)
# ipv6 infos
context
[
'ipv6_host'
]
=
instance
.
get_connect_host
(
use_ipv6
=
True
)
context
[
'ipv6_port'
]
=
instance
.
get_connect_port
(
use_ipv6
=
True
)
return
context
return
context
def
post
(
self
,
request
,
*
args
,
**
kwargs
):
def
post
(
self
,
request
,
*
args
,
**
kwargs
):
...
...
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