Commit 1acfd3ea by Kálmán Viktor

Merge branch 'feature-connection-details'

Conflicts:
	circle/dashboard/static/dashboard/dashboard.css
parents bbd8020b bfe7a9b3
......@@ -334,12 +334,13 @@ a.hover-black {
}
/* vm details connection */
.vm-details-pw dd {
margin-left: 155px;
.vm-details-connection dd {
padding: 4px 0 4px 0;
}
.vm-details-pw dt {
width: 140px;
.vm-details-connection dt {
text-align: left;
padding: 4px 0 4px 15px;
}
#vm-details-pw-confirm {
......@@ -347,6 +348,10 @@ a.hover-black {
display: none;
}
#vm-details-pw-confirm dt {
text-align: right;
}
.dashboard-vm-details-network-h3 {
margin-top: 20px;
}
......@@ -683,3 +688,7 @@ textarea[name="list-new-namelist"] {
.vm-list-table-admin {
width: 130px;
}
#vm-details-connection-string-copy {
cursor: pointer;
}
......@@ -289,6 +289,11 @@ $(function() {
$(this).parent("div").slideUp();
});
// select connection string
$("#vm-details-connection-string-copy").click(function() {
$("#vm-details-connection-string").focus();
});
});
......
......@@ -67,10 +67,27 @@
<span>{{ instance.get_status_display|upper }}</span>
</span>
</div>
<h3>{% trans "Connection" %}</h3>
<input type="text" value="{{ instance.get_connect_command }}" class="form-control" readonly />
<dl class="dl-horizontal vm-details-pw">
<dt>{% trans "Password" %}:</dt>
<h3>{% trans "Connection details" %}</h3>
<dl class="dl-horizontal vm-details-connection">
<dt>{% trans "Protocol" %}</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>
<div class="input-group">
<input type="text" id="vm-details-pw-input" class="form-control input-sm input-tags" value="{{ instance.pw }}"/>
......@@ -92,6 +109,17 @@
</dd>
</div>
</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 class="col-md-8" id="vm-detail-pane">
<div class="panel panel-default" id="vm-detail-panel">
......
......@@ -246,6 +246,9 @@ class VmDetailView(CheckedDetailView):
}
context['os_type_icon'] = instance.os_type.replace("unknown",
"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
def post(self, request, *args, **kwargs):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment