Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
f2934fb6
authored
Mar 21, 2013
by
Bence Dányi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webui: toggle IPv6/IPv4 host, if possible
parent
a154a24c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
2 deletions
+25
-2
one/static/script/cloud.js
+14
-0
one/static/style/base.less
+9
-0
one/templates/vm-credentials.html
+2
-2
No files found.
one/static/script/cloud.js
View file @
f2934fb6
...
@@ -12,6 +12,20 @@ $(function() {
...
@@ -12,6 +12,20 @@ $(function() {
$
(
'a'
).
click
(
function
(
e
)
{
$
(
'a'
).
click
(
function
(
e
)
{
e
.
stopPropagation
();
e
.
stopPropagation
();
});
});
$
(
'.host-toggle'
).
click
(
function
(
e
){
e
.
preventDefault
();
if
(
$
(
this
).
find
(
'.v4'
).
is
(
':hidden'
)){
$
(
this
).
find
(
'.v4'
).
show
();
$
(
this
).
find
(
'.v6'
).
hide
();
$
(
this
).
parent
().
next
().
find
(
'.host'
).
show
();
$
(
this
).
parent
().
next
().
find
(
'.ipv4host'
).
hide
();
}
else
{
$
(
this
).
find
(
'.v6'
).
show
();
$
(
this
).
find
(
'.v4'
).
hide
();
$
(
this
).
parent
().
next
().
find
(
'.host'
).
hide
();
$
(
this
).
parent
().
next
().
find
(
'.ipv4host'
).
show
();
}
})
$
(
'.delete-template'
).
click
(
function
(
e
)
{
$
(
'.delete-template'
).
click
(
function
(
e
)
{
e
.
preventDefault
();
e
.
preventDefault
();
e
.
stopPropagation
();
e
.
stopPropagation
();
...
...
one/static/style/base.less
View file @
f2934fb6
...
@@ -419,6 +419,15 @@ body > footer {
...
@@ -419,6 +419,15 @@ body > footer {
}
}
}
}
.host-toggle {
.v6 {
display: none;
}
}
.ipv4host {
display: none;
}
@media (max-width: 900px) {
@media (max-width: 900px) {
#content {
#content {
width: 100%;
width: 100%;
...
...
one/templates/vm-credentials.html
View file @
f2934fb6
...
@@ -37,8 +37,8 @@
...
@@ -37,8 +37,8 @@
</td>
</td>
</tr>
</tr>
<tr>
<tr>
<th>
{% trans "
IP"
%}:
</th>
<th>
{% trans "
Host" %}{% if i.is_ipv6 %} (
<a
href=
"#"
class=
"host-toggle"
><span
class=
"v4"
>
IPv4
</span><span
class=
"v6"
>
IPv6
</span></a>
){% endif
%}:
</th>
<td>
{{ i.hostname }}
</td>
<td>
<span
class=
"host"
>
{{ i.hostname }}
</span><span
class=
"ipv4host"
>
{{i.hostname_v4}}
</span>
</td>
</tr>
</tr>
{% if i.nat %}
<tr>
{% if i.nat %}
<tr>
<th>
{% trans "Port" %}:
</th>
<th>
{% trans "Port" %}:
</th>
...
...
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